List of usage examples for com.mongodb DBCursor next
@Override
public DBObject next()
From source file:achmad.rifai.erp1.entity.dao.DAOLedger.java
@Override public List<Ledger> all() throws Exception { List<Ledger> l = new java.util.LinkedList<>(); achmad.rifai.erp1.util.RSA r = achmad.rifai.erp1.util.Work.loadRSA(); com.mongodb.DBCursor c = d.getD().getCollectionFromString("ledger").find(); while (c.hasNext()) { com.mongodb.BasicDBList li = (com.mongodb.BasicDBList) c.next().get("bin"); String json = ""; for (int x = 0; x < li.size(); x++) json += r.decrypt("" + li.get(x)); Ledger le = new Ledger(json); if (!le.isDeleted()) l.add(le);/*from w ww.ja v a2 s.c o m*/ } l.sort(sorter()); return l; }
From source file:achmad.rifai.erp1.entity.dao.DAOPelanggan.java
@Override public List<Pelanggan> all() throws Exception { List<Pelanggan> l = new java.util.LinkedList<>(); achmad.rifai.erp1.util.RSA r = achmad.rifai.erp1.util.Work.loadRSA(); com.mongodb.DBCursor c = d.getD().getCollectionFromString("pelanggan").find(); while (c.hasNext()) { com.mongodb.BasicDBList li = (com.mongodb.BasicDBList) c.next().get("bin"); String json = ""; for (int x = 0; x < li.size(); x++) json += r.decrypt("" + li.get(x)); Pelanggan p = new Pelanggan(json); if (!p.isDeleted()) l.add(p);// w w w.j a v a2 s. co m } return l; }
From source file:achmad.rifai.erp1.entity.dao.DAOPembelian.java
@Override public List<Pembelian> all() throws Exception { List<Pembelian> l = new java.util.LinkedList<>(); achmad.rifai.erp1.util.RSA r = achmad.rifai.erp1.util.Work.loadRSA(); com.mongodb.DBCursor c = d.getD().getCollectionFromString("pembelian").find(); while (c.hasNext()) { com.mongodb.DBObject o = c.next(); com.mongodb.BasicDBList li = (com.mongodb.BasicDBList) o.get("bin"); String json = ""; for (int x = 0; x < li.size(); x++) json += r.decrypt("" + li.get(x)); Pembelian p = new Pembelian(json); if (!p.isDeleted()) l.add(p);// w ww . j a v a2 s . c o m } l.sort(sorter()); return l; }
From source file:achmad.rifai.erp1.entity.dao.DAOPenjualan.java
@Override public List<Penjualan> all() throws Exception { List<Penjualan> l = new java.util.LinkedList<>(); achmad.rifai.erp1.util.RSA r = achmad.rifai.erp1.util.Work.loadRSA(); com.mongodb.DBCursor c = d.getD().getCollectionFromString("penjualan").find(); while (c.hasNext()) { com.mongodb.DBObject o = c.next(); com.mongodb.BasicDBList li = (com.mongodb.BasicDBList) o.get("bin"); String json = ""; for (int x = 0; x < li.size(); x++) json += r.decrypt("" + li.get(x)); Penjualan p = new Penjualan(json); if (!p.isDeleted()) l.add(p);// w ww. j a v a 2s . c o m } l.sort(sorter()); return l; }
From source file:achmad.rifai.erp1.entity.dao.DAOPesan.java
@Override public List<Pesan> all() throws Exception { List<Pesan> l = new java.util.LinkedList<>(); achmad.rifai.erp1.util.RSA r = achmad.rifai.erp1.util.Work.loadRSA(); com.mongodb.DBCursor c = d.getD().getCollectionFromString("pesan").find(); while (c.hasNext()) { com.mongodb.DBObject o = c.next(); com.mongodb.BasicDBList li = (com.mongodb.BasicDBList) o.get("bin"); String json = ""; for (int x = 0; x < li.size(); x++) json += r.decrypt("" + li.get(x)); Pesan p = new Pesan(json); if (!p.isDeleted()) l.add(p);//from w ww. j a v a2 s . com } l.sort(sorter()); return l; }
From source file:achmad.rifai.erp1.entity.dao.DAORekening.java
@Override public List<Rekening> all() throws Exception { List<Rekening> l = new java.util.LinkedList<>(); achmad.rifai.erp1.util.RSA r = achmad.rifai.erp1.util.Work.loadRSA(); com.mongodb.DBCursor c = d.getD().getCollectionFromString("rekening").find(); while (c.hasNext()) { com.mongodb.DBObject o = c.next(); com.mongodb.BasicDBList li = (com.mongodb.BasicDBList) o.get("bin"); String json = ""; for (int x = 0; x < li.size(); x++) json += r.decrypt("" + li.get(x)); Rekening re = new Rekening(json); if (!re.isDeleted()) l.add(re);//from w w w.j a v a 2s . co m } return l; }
From source file:achmad.rifai.erp1.entity.dao.DAOSuplier.java
@Override public List<Suplier> all() throws Exception { List<Suplier> l = new java.util.LinkedList<>(); achmad.rifai.erp1.util.RSA r = achmad.rifai.erp1.util.Work.loadRSA(); com.mongodb.DBCursor c = d.getD().getCollectionFromString("suplier").find(); while (c.hasNext()) { com.mongodb.DBObject o = c.next(); com.mongodb.BasicDBList li = (com.mongodb.BasicDBList) o.get("bin"); String json = ""; for (int x = 0; x < li.size(); x++) json += r.decrypt("" + li.get(x)); Suplier su = new Suplier(json); if (!su.isDeleted()) l.add(su);/*from w w w . j a v a 2s. com*/ } return l; }
From source file:achmad.rifai.erp1.entity.dao.DAOTerima.java
@Override public List<Terima> all() throws Exception { List<Terima> l = new java.util.LinkedList<>(); achmad.rifai.erp1.util.RSA r = achmad.rifai.erp1.util.Work.loadRSA(); com.mongodb.DBCursor c = d.getD().getCollectionFromString("terima").find(); while (c.hasNext()) { com.mongodb.DBObject o = c.next(); com.mongodb.BasicDBList li = (com.mongodb.BasicDBList) o.get("bin"); String json = ""; for (int x = 0; x < li.size(); x++) json += r.decrypt("" + li.get(x)); Terima t = new Terima(json); if (!t.isDeleted()) l.add(t);/* w ww. jav a2s . c om*/ } l.sort(sorter()); return l; }
From source file:achmad.rifai.erp1.entity.dao.DAOTracks.java
@Override public List<Tracks> all() throws Exception { List<Tracks> l = new java.util.LinkedList<>(); achmad.rifai.erp1.util.RSA r = achmad.rifai.erp1.util.Work.loadRSA(); com.mongodb.DBCursor c = d.getD().getCollectionFromString("tracks").find(); while (c.hasNext()) { com.mongodb.DBObject o = c.next(); com.mongodb.BasicDBList li = (com.mongodb.BasicDBList) o.get("bin"); String json = ""; for (int x = 0; x < li.size(); x++) json += r.decrypt("" + li.get(x)); Tracks t = new Tracks(json); if (!t.isDeleted()) l.add(t);//from ww w. j a v a 2 s . c o m } l.sort(sorter()); return l; }
From source file:achmad.rifai.erp1.entity.dao.DAOTugas.java
@Override public List<Tugas> all() throws Exception { List<Tugas> l = new java.util.LinkedList<>(); achmad.rifai.erp1.util.RSA r = achmad.rifai.erp1.util.Work.loadRSA(); com.mongodb.DBCursor c = d.getD().getCollectionFromString("tugas").find(); while (c.hasNext()) { com.mongodb.DBObject o = c.next(); com.mongodb.BasicDBList li = (com.mongodb.BasicDBList) o.get("bin"); String json = ""; for (int x = 0; x < li.size(); x++) json += r.decrypt("" + li.get(x)); Tugas t = new Tugas(json); if (!t.isDeleted()) l.add(t);//from www. j a v a2 s . c om } l.sort(sorter()); return l; }