org.sqlproc.engine.spring
Class SpringEngineFactory
java.lang.Object
org.sqlproc.engine.SqlSimpleFactory
org.sqlproc.engine.spring.SpringEngineFactory
- All Implemented Interfaces:
- SqlEngineFactory
public class SpringEngineFactory
- extends SqlSimpleFactory
The implementation of the SqlEngineFactory
optimized for the Spring 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.spring.SpringEngineFactory" init-method="init">
<property name="metaFilesNames">
<list>
<value>statements.qry</value>
</list>
</property>
</bean>
</beans>
or like the next one for the old loader SqlEngineLoader
:
<beans ...>
...
<bean id="sqlQueries" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
<property name="location">
<value>classpath:queries.properties</value>
</property>
</bean>
<bean id="sqlFactory" class="org.sqlproc.engine.spring.SpringEngineFactory" init-method="init">
<property name="metaProps" ref="sqlQueries" />
</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 Summary |
SpringEngineFactory()
Creates a new instance with default values for the Spring stack. |
Methods inherited from class org.sqlproc.engine.SqlSimpleFactory |
addCustomType, getCrudEngine, getCustomTypes, getFilter, getLoader, getMetaFilesNames, getMetaProps, getMetaPropsNames, getMetaStatements, getMonitorFactory, getOnlyStatements, getProcedureEngine, getQueryEngine, getTypeFactory, init, isJdbc, setCustomTypes, setCustomTypes, setFilter, setJdbc, setMetaFilesNames, setMetaFilesNames, setMetaProps, setMetaPropsNames, setMetaPropsNames, setMetaStatements, setMonitorFactory, setOnlyStatements, setTypeFactory |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SpringEngineFactory
public SpringEngineFactory()
- Creates a new instance with default values for the Spring stack.
Copyright © 2011. All Rights Reserved.