use of org.simpleflatmapper.jpa.beans.MappedObject16 in project mapping-benchmark by arnaudroger.
the class BatooBenchmark method main.
public static void main(String[] args) throws Exception {
ConnectionParam connParam = new ConnectionParam();
connParam.db = DbTarget.HSQLDB;
connParam.init();
EntityManagerFactory sf = Persistence.createEntityManagerFactory("jpa");
EntityManager session = sf.createEntityManager();
try {
Query query = session.createQuery("select s from MappedObject16 s");
query.setMaxResults(2);
List<MappedObject16> sr = query.getResultList();
for (MappedObject16 o : sr) {
System.out.println("o. = " + o.getEmail());
System.out.println("o. = " + o.getField12());
}
} finally {
session.close();
}
}
Aggregations