Package org.sqlproc.engine.hibernate

The adapters and proxies for the Hibernate stack.

See:
          Description

Class Summary
HibernateEngineFactory The implementation of the SqlEngineFactory optimized for the Hibernate stack.
HibernateQuery The Hibernate stack implementation of the SQL Engine query contract.
HibernateSession The Hibernate stack implementation of the SQL Engine session contract.
HibernateSimpleSession The Hibernate stack implementation of the SQL Engine session contract.
 

Package org.sqlproc.engine.hibernate Description

The adapters and proxies for the Hibernate stack. The simple usage can be the next one:

 // by default it loads "queries.properties" file
 SqlEngineFactory sqlFactory = new HibernateEngineFactory();
 SqlQueryEngine sqlEngine = sqlFactory.getQueryEngine("ALL_PEOPLE");
 
 // for the case it runs on the top of the Hibernate stack
 Configuration configuration = new Configuration().configure("hibernate.cfg.xml");
 SessionFactory sessionFactory = configuration.buildSessionFactory();
 SqlSession session = HibernateSession.generateProxy(sessionFactory.openSession());
 
 List<Person> list = sqlEngine.query(session, Person.class, null, SqlQueryEngine.ASC_ORDER);
 

For more info please see the Reference Guide or the tutorials.

Author:
Vladimir Hudec


Copyright © 2011. All Rights Reserved.