Example usage for com.mongodb DBObject put

List of usage examples for com.mongodb DBObject put

Introduction

In this page you can find the example usage for com.mongodb DBObject put.

Prototype

Object put(String key, Object v);

Source Link

Document

Sets a name/value pair in this object.

Usage

From source file:achmad.rifai.erp1.entity.dao.DAORekening.java

public void trueDelete(Rekening v) throws Exception {
    com.mongodb.DBObject o = new com.mongodb.BasicDBObject();
    o.put("berkas", v.getKode());
    d.getD().getCollectionFromString("rekening").remove(o);
}

From source file:achmad.rifai.erp1.entity.dao.DAOSuplier.java

@Override
public void update(Suplier a, Suplier b) throws Exception {
    achmad.rifai.erp1.beans.Form1 f = new achmad.rifai.erp1.beans.Form1(b.getKode(), b);
    com.mongodb.DBObject w = new com.mongodb.BasicDBObject();
    w.put("berkas", a.getKode());
    d.getD().getCollectionFromString("suplier").update(w, f.genComparasion());
}

From source file:achmad.rifai.erp1.entity.dao.DAOSuplier.java

public void trueDelete(Suplier v) throws Exception {
    com.mongodb.DBObject o = new com.mongodb.BasicDBObject();
    o.put("berkas", v.getKode());
    d.getD().getCollectionFromString("suplier").remove(o);
}

From source file:achmad.rifai.erp1.entity.dao.DAOTerima.java

@Override
public void update(Terima a, Terima b) throws Exception {
    achmad.rifai.erp1.beans.Form1 f = new achmad.rifai.erp1.beans.Form1(b.getKode(), b);
    com.mongodb.DBObject w = new com.mongodb.BasicDBObject();
    w.put("berkas", b.getKode());
    d.getD().getCollectionFromString("terima").update(w, f.genComparasion());
}

From source file:achmad.rifai.erp1.entity.dao.DAOTerima.java

public void trueDelete(Terima v) throws Exception {
    com.mongodb.DBObject o = new com.mongodb.BasicDBObject();
    o.put("berkas", v.getKode());
    d.getD().getCollectionFromString("terima").remove(o);
}

From source file:achmad.rifai.erp1.entity.dao.DAOTracks.java

@Override
public void update(Tracks a, Tracks b) throws Exception {
    achmad.rifai.erp1.beans.Form1 f = new achmad.rifai.erp1.beans.Form1(b.getKode(), b);
    com.mongodb.DBObject w = new com.mongodb.BasicDBObject();
    w.put("berkas", a.getKode());
    d.getD().getCollectionFromString("tracks").update(w, f.genComparasion());
}

From source file:achmad.rifai.erp1.entity.dao.DAOTracks.java

public void trueDelete(Tracks a) throws Exception {
    com.mongodb.DBObject o = new com.mongodb.BasicDBObject();
    o.put("berkas", a.getKode());
    d.getD().getCollectionFromString("tugas").remove(o);
}

From source file:achmad.rifai.erp1.entity.dao.DAOTugas.java

@Override
public void update(Tugas a, Tugas b) throws Exception {
    achmad.rifai.erp1.beans.Form1 f = new achmad.rifai.erp1.beans.Form1(b.getKode(), b);
    com.mongodb.DBObject w = new com.mongodb.BasicDBObject();
    w.put("berkas", a.getKode());
    d.getD().getCollectionFromString("tugas").update(w, f.genComparasion());
}

From source file:achmad.rifai.erp1.entity.dao.DAOTugas.java

public void trueDelete(Tugas v) throws Exception {
    com.mongodb.DBObject o = new com.mongodb.BasicDBObject();
    o.put("berkas", v.getKode());
    d.getD().getCollectionFromString("tugas").remove(o);
}

From source file:achmad.rifai.erp1.entity.Jabatan.java

public static Jabatan of(Db d, String nama) throws Exception {
    Jabatan v = null;/*w  w  w .  j  a  v a  2  s.  c  o m*/
    achmad.rifai.erp1.util.RSA r = achmad.rifai.erp1.util.Work.loadRSA();
    com.mongodb.DBObject p = new com.mongodb.BasicDBObject();
    p.put("berkas", nama);
    com.mongodb.DBCursor c = d.getD().getCollectionFromString("jabatan").find(p);
    while (c.hasNext()) {
        com.mongodb.BasicDBList l = (com.mongodb.BasicDBList) c.next().get("bin");
        String json = "";
        for (int x = 0; x < l.size(); x++)
            json += r.decrypt("" + l.get(x));
        v = new Jabatan(json);
        break;
    }
    return v;
}