Class HibernateEngineFactory

  • All Implemented Interfaces:
    SqlEngineFactory

    public class HibernateEngineFactory
    extends SqlDefaultFactory
    The implementation of the SqlEngineFactory optimized for the Hibernate stack.

    It's suitable mainly for the Spring DI based configuration, like the next one for the new loader SqlProcessorLoader:

     <beans ...>
       ...
       <bean id="sqlFactory" class="org.sqlproc.engine.hibernate.HibernateEngineFactory" init-method="init">
         <property name="metaFilesNames">
           <list>
             <value>statements.qry</value>
           </list>
         </property>
       </bean>
     </beans>
     
    and use the next code to obtain an instance of the SQL Query engine
     SqlQueryEngine sqlEngine = sqlFactory.getQueryEngine("ALL");
     
    or the next code to obtain an instance of the SQL CRUD engine
     SqlCrudEngine sqlEngine = sqlFactory.getCrudEngine("ALL");
     

    For more info please see the Tutorials.

    Author:
    Vladimir Hudec
    • Constructor Detail

      • HibernateEngineFactory

        public HibernateEngineFactory()
        Creates a new instance with default values for the Hibernate stack.
      • HibernateEngineFactory

        public HibernateEngineFactory​(boolean lazyInit)
        Creates a new instance with default values for the Hibernate stack.
        Parameters:
        lazyInit - this flag indicates to speed up the initialization process.
      • HibernateEngineFactory

        public HibernateEngineFactory​(int asyncInitThreads)
        Creates a new instance with no default values.
        Parameters:
        asyncInitThreads - number of threads used for asynchronous initialization
      • HibernateEngineFactory

        public HibernateEngineFactory​(boolean lazyInit,
                                      int asyncInitThreads)
        Creates a new instance with no default values.
        Parameters:
        lazyInit - this flag indicates to speed up the initialization process.
        asyncInitThreads - number of threads used for asynchronous initialization