org.sqlproc.engine.plugin
Class SimpleSqlPluginFactory

java.lang.Object
  extended by org.sqlproc.engine.plugin.SimpleSqlPluginFactory
All Implemented Interfaces:
SqlPluginFactory

public class SimpleSqlPluginFactory
extends Object
implements SqlPluginFactory

The simple implementation of the SqlPluginFactory.

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

 <beans ...>
   ...
   <bean id="pluginFactory" class="org.sqlproc.engine.plugin.SimpleSqlPluginFactory" factory-method="getInstance" >
     <property name="isTruePlugin" ref="..." />
   </bean>
 
   <bean id="typeFactory" class="org.sqlproc.engine.jdbc.type.JdbcTypeFactory" factory-method="getInstance" />
 
   <bean id="sqlFactory" class="org.sqlproc.engine.SqlSimpleFactory" init-method="init">
     <property name="metaFilesNames">
       <list>
         <value>statements.qry</value>
       </list>
     </property>
     <property name="pluginFactory" ref="pluginFactory" />
     <property name="typeFactory" ref="typeFactory" />
   </bean>
 </beans>
 

For more info please see the Tutorials.

Author:
Vladimir Hudec

Field Summary
private  DefaultSqlPlugins defaultSqlPlugins
          The SQL Processor plugins standard implementation.
private static SimpleSqlPluginFactory factory
          The private static instance of this factory.
private  IsEmptyPlugin isEmptyPlugin
          The SQL Processor plugin devoted to evaluate the emptiness of the input value.
private  IsTruePlugin isTruePlugin
          The SQL Processor plugin devoted to evaluate the boolean value of the logical expression.
private  SqlCountPlugin sqlCountPlugin
          The SQL Processor plugin devoted to the COUNT SQL construction.
private  SqlFromToPlugin sqlFromToPlugin
          The SQL Processor plugin devoted to the FROM-TO SQL construction.
private  SqlIdentityPlugin sqlIdentityPlugin
          The SQL Processor plugin devoted to the identity SELECT SQL construction.
private  SqlSequencePlugin sqlSequencePlugin
          The SQL Processor plugin devoted to the sequence SELECT SQL construction.
 
Constructor Summary
private SimpleSqlPluginFactory()
          The private constructor.
 
Method Summary
static SimpleSqlPluginFactory getInstance()
          The main method to obtain the singleton instance of this factory.
 IsEmptyPlugin getIsEmptyPlugin()
          Returns the SQL Processor plugin devoted to evaluate the emptiness of the input value.
 IsTruePlugin getIsTruePlugin()
          Returns the SQL Processor plugin devoted to evaluate the boolean value of the logical expression.
 SqlCountPlugin getSqlCountPlugin()
          Returns the SQL Processor plugin devoted to the COUNT SQL construction.
 SqlFromToPlugin getSqlFromToPlugin()
          Returns the SQL Processor plugin devoted to the FROM-TO SQL construction.
 SqlIdentityPlugin getSqlIdentityPlugin()
          Returns the SQL Processor plugin devoted to the identity SELECT SQL construction.
 SqlSequencePlugin getSqlSequencePlugin()
          Returns the SQL Processor plugin devoted to the sequence SELECT SQL construction.
 void setIsEmptyPlugin(IsEmptyPlugin isEmptyPlugin)
          Sets the SQL Processor plugin devoted to evaluate the emptiness of the input value.
 void setIsTruePlugin(IsTruePlugin isTruePlugin)
          Sets the SQL Processor plugin devoted to evaluate the boolean value of the logical expression.
 void setSqlCountPlugin(SqlCountPlugin sqlCountPlugin)
          Sets the SQL Processor plugin devoted to the COUNT SQL construction.
 void setSqlFromToPlugin(SqlFromToPlugin sqlFromToPlugin)
          Sets the SQL Processor plugin devoted to the FROM-TO SQL construction.
 void setSqlIdentityPlugin(SqlIdentityPlugin sqlIdentityPlugin)
          Sets the SQL Processor plugin devoted to the identity SELECT SQL construction.
 void setSqlSequencePlugin(SqlSequencePlugin sqlSequencePlugin)
          Sets the SQL Processor plugin devoted to the sequence SELECT SQL construction.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

factory

private static SimpleSqlPluginFactory factory
The private static instance of this factory.


defaultSqlPlugins

private DefaultSqlPlugins defaultSqlPlugins
The SQL Processor plugins standard implementation.


isTruePlugin

private IsTruePlugin isTruePlugin
The SQL Processor plugin devoted to evaluate the boolean value of the logical expression.


isEmptyPlugin

private IsEmptyPlugin isEmptyPlugin
The SQL Processor plugin devoted to evaluate the emptiness of the input value.


sqlCountPlugin

private SqlCountPlugin sqlCountPlugin
The SQL Processor plugin devoted to the COUNT SQL construction.


sqlFromToPlugin

private SqlFromToPlugin sqlFromToPlugin
The SQL Processor plugin devoted to the FROM-TO SQL construction.


sqlSequencePlugin

private SqlSequencePlugin sqlSequencePlugin
The SQL Processor plugin devoted to the sequence SELECT SQL construction.


sqlIdentityPlugin

private SqlIdentityPlugin sqlIdentityPlugin
The SQL Processor plugin devoted to the identity SELECT SQL construction.

Constructor Detail

SimpleSqlPluginFactory

private SimpleSqlPluginFactory()
The private constructor.

Method Detail

getInstance

public static SimpleSqlPluginFactory getInstance()
The main method to obtain the singleton instance of this factory.

Returns:
the META types factory for the JDBC stack

getIsEmptyPlugin

public IsEmptyPlugin getIsEmptyPlugin()
Returns the SQL Processor plugin devoted to evaluate the emptiness of the input value.

Specified by:
getIsEmptyPlugin in interface SqlPluginFactory
Returns:
the SQL Processor plugin devoted to evaluate the emptiness of the input value

getIsTruePlugin

public IsTruePlugin getIsTruePlugin()
Returns the SQL Processor plugin devoted to evaluate the boolean value of the logical expression.

Specified by:
getIsTruePlugin in interface SqlPluginFactory
Returns:
the SQL Processor plugin devoted to evaluate the boolean value of the logical expression

getSqlCountPlugin

public SqlCountPlugin getSqlCountPlugin()
Returns the SQL Processor plugin devoted to the COUNT SQL construction.

Specified by:
getSqlCountPlugin in interface SqlPluginFactory
Returns:
the SQL Processor plugin devoted to the COUNT SQL construction

getSqlFromToPlugin

public SqlFromToPlugin getSqlFromToPlugin()
Returns the SQL Processor plugin devoted to the FROM-TO SQL construction.

Specified by:
getSqlFromToPlugin in interface SqlPluginFactory
Returns:
the SQL Processor plugin devoted to the FROM-TO SQL construction

getSqlSequencePlugin

public SqlSequencePlugin getSqlSequencePlugin()
Returns the SQL Processor plugin devoted to the sequence SELECT SQL construction.

Specified by:
getSqlSequencePlugin in interface SqlPluginFactory
Returns:
the SQL Processor plugin devoted to the sequence SELECT SQL construction

getSqlIdentityPlugin

public SqlIdentityPlugin getSqlIdentityPlugin()
Returns the SQL Processor plugin devoted to the identity SELECT SQL construction.

Specified by:
getSqlIdentityPlugin in interface SqlPluginFactory
Returns:
the SQL Processor plugin devoted to the identity SELECT SQL construction

setIsTruePlugin

public void setIsTruePlugin(IsTruePlugin isTruePlugin)
Sets the SQL Processor plugin devoted to evaluate the boolean value of the logical expression.

Parameters:
isTruePlugin - the SQL Processor plugin devoted to evaluate the boolean value of the logical expression

setIsEmptyPlugin

public void setIsEmptyPlugin(IsEmptyPlugin isEmptyPlugin)
Sets the SQL Processor plugin devoted to evaluate the emptiness of the input value.

Parameters:
isEmptyPlugin - the SQL Processor plugin devoted to evaluate the emptiness of the input value

setSqlCountPlugin

public void setSqlCountPlugin(SqlCountPlugin sqlCountPlugin)
Sets the SQL Processor plugin devoted to the COUNT SQL construction.

Parameters:
sqlCountPlugin - the SQL Processor plugin devoted to the COUNT SQL construction

setSqlFromToPlugin

public void setSqlFromToPlugin(SqlFromToPlugin sqlFromToPlugin)
Sets the SQL Processor plugin devoted to the FROM-TO SQL construction.

Parameters:
sqlFromToPlugin - the SQL Processor plugin devoted to the FROM-TO SQL construction

setSqlSequencePlugin

public void setSqlSequencePlugin(SqlSequencePlugin sqlSequencePlugin)
Sets the SQL Processor plugin devoted to the sequence SELECT SQL construction.

Parameters:
sqlSequencePlugin - the SQL Processor plugin devoted to the sequence SELECT SQL construction

setSqlIdentityPlugin

public void setSqlIdentityPlugin(SqlIdentityPlugin sqlIdentityPlugin)
Sets the SQL Processor plugin devoted to the identity SELECT SQL construction.

Parameters:
sqlIdentityPlugin - the SQL Processor plugin devoted to the identity SELECT SQL construction


Copyright © 2012. All Rights Reserved.