devloop icon
Metastores

Data Access Objects

There are 2 main ways of accessing objects after the mapping phase:

The IOHelper provides static method whereas DAO provides instance methods.
Here is an example of how to use the DAO:


DBDataMapper dbm = new DBDataMapper();
dbm.checkApplication(One.class);
dbm.createSchema();
DAO<One> dao = new DAO<One>(One.class);
One one = new One();
dao.insert(one);
Collection<One> ones = dao.readAll();
dbm.dropSchema();