Package org.sqlproc.engine
Class SqlDefaultFactory
- java.lang.Object
-
- org.sqlproc.engine.SqlDefaultFactory
-
- All Implemented Interfaces:
SqlEngineFactory
- Direct Known Subclasses:
JdbcEngineFactory
public class SqlDefaultFactory extends Object implements SqlEngineFactory
The simple implementation of theSqlEngineFactory.It's suitable mainly for the Spring DI based configuration, like the next one for the loader
SqlProcessorLoader:
<beans ...> ... <bean id="typeFactory" class="org.sqlproc.engine.jdbc.type.JdbcTypeFactory" factory-method="getInstance" /> <bean id="sqlFactory" class="org.sqlproc.engine.SqlDefaultFactory" init-method="init"> <property name="metaFilesNames"> <list> <value>statements.qry</value> </list> </property> <property name="typeFactory" ref="typeFactory" /> </bean> </beans>and use the next code to obtain an instance of the SQL Query engineSqlQueryEngine sqlEngine = sqlFactory.getQueryEngine("ALL");or the next code to obtain an instance of the SQL CRUD engineSqlCrudEngine sqlEngine = sqlFactory.getCrudEngine("ALL");In the case the SQL Processor runs on the top of the JDBC stack, there's more suitable
JdbcEngineFactory.For more info please see the Tutorials.
- Author:
- Vladimir Hudec
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSqlDefaultFactory.SqlThreadPoolExecutorThe customized ThreadPoolExecutor.
-
Field Summary
Fields Modifier and Type Field Description private IntegerasyncInitThreadsThe number of threads used for asynchronous initialization.private booleancollectionsAreStandardTypesThe indicator that Collections should be handled as standard types.private SqlEngineConfigurationconfigurationThe overall configuration, which can be persisted.private List<SqlMetaType>customTypesThe custom META types.private ExecutorexecutorThe asynchronous SQL Processor engines initialization executor.private BooleanexecutorTerminatedThe flag indicating the asynchronous SQL Processor engines initialization has been finished.private StringfilterThe name of the filter to filter the META SQL statements, mapping rules and optional features.private booleanjdbcThe indicator the JDBC stack is used.private BooleanlazyInitThis flag indicates to speed up the initialization process.private static StringLINESEPThe platform based line separator.protected org.slf4j.LoggerloggerThe internal slf4j logger.private List<String>metaFilesNamesThe names of files, which hold a collection of the SQL Processor artifacts (META SQL statements, mapping rules and optional features).private StringBuildermetaStatementsThe String representation of all SQL Processor artifacts (META SQL statements, mapping rules and optional features).private SqlMonitorFactorymonitorFactoryThe monitor factory used in the process of the SQL Monitor instances creation.private String[]onlyStatementsOnly statements and rules with the names in this set are picked up from the properties repository.protected SqlPluginFactorypluginFactoryThe factory for the SQL Processor plugins.private SqlProcessorLoaderprocessorLoaderThe helper class for the META SQL statements and mapping rules parsing.private booleanskipAliasesInQqlCommandThe indicator that column aliases are not included in generated SQL command.private SqlTypeFactorytypeFactoryThe factory for the META types construction.private SqlValidatorFactoryvalidatorFactoryThe validator factory used in the process of the SQL Monitor instances creation.
-
Constructor Summary
Constructors Constructor Description SqlDefaultFactory()Creates a new instance with no default values.SqlDefaultFactory(boolean lazyInit)Creates a new instance with no default values.SqlDefaultFactory(boolean lazyInit, int asyncInitThreads)Creates a new instance with no default values.SqlDefaultFactory(int asyncInitThreads)Creates a new instance with no default values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCustomType(SqlMetaType customType)Adds a new custom META type.private voidcheck(String name, SqlEngine sqlEngine)Check the SQL Engine instance is not nullintgetAsyncInitThreads()Returns the number of threads used for asynchronous initializationSqlCrudEnginegetCheckedCrudEngine(String name)Returns the named static or dynamic SQL CRUD Engine instance (the primary SQL Processor class).SqlProcedureEnginegetCheckedProcedureEngine(String name)Returns the named static or dynamic SQL Procedure Engine instance (the primary SQL Processor class).SqlQueryEnginegetCheckedQueryEngine(String name)Returns the named static or dynamic SQL Query Engine instance (the primary SQL Processor class).SqlCrudEnginegetCheckedStaticCrudEngine(String name)Returns the named static SQL CRUD Engine instance (the primary SQL Processor class).SqlProcedureEnginegetCheckedStaticProcedureEngine(String name)Returns the named static SQL Procedure Engine instance (the primary SQL Processor class).SqlQueryEnginegetCheckedStaticQueryEngine(String name)Returns the named static SQL Query Engine instance (the primary SQL Processor class).SqlEngineConfigurationgetConfiguration()Returns the overall dynamic configurationMap<String,SqlEngine>getCrudDynamicEngines()Returns the collection of names of all initialized/constructed dynamic SQL CRUD Engine instances.Collection<String>getCrudDynamicNames()Returns the collection of names of all initialized/constructed dynamic SQL CRUD Engine instances.SqlCrudEnginegetCrudEngine(String name)Returns the named static or dynamic SQL CRUD Engine instance (the primary SQL Processor class).Map<String,SqlEngine>getCrudEngines()Returns the collection of named dynamic SQL CRUD Engines (the primary SQL Processor class) instances.Collection<String>getCrudNames()Returns the collection of names of all initialized/constructed static SQL CRUD Engine instances.List<SqlMetaType>getCustomTypes()Returns the custom META types.SqlCrudEnginegetDynamicCrudEngine(String name, String sqlStatement)Returns the named dynamic SQL CRUD Engine instance (the primary SQL Processor class).SqlProcedureEnginegetDynamicProcedureEngine(String name, String sqlStatement)Returns the named dynamic SQL Procedure Engine instance (the primary SQL Processor class).SqlQueryEnginegetDynamicQueryEngine(String name, String sqlStatement)Returns the named dynamic SQL Query Engine instance (the primary SQL Processor class).Map<String,String>getEnginesInitErrors()Returns the result of engines initialization process.StringgetEnginesInitErrorsMsg()Returns the result of engines initialization process.protected ExecutorgetExecutor()Returns the asynchronous SQL Processor engines initialization executor.StringgetFilter()Returns the name of the filter to filter the META SQL statements, mapping rules and optional features.SqlProcessorLoadergetLoader()Returns the internal SQL engine or processor loader.List<String>getMetaFilesNames()Returns the names of files, which holds a collection of META SQL statements, mapping rules and optional features.StringBuildergetMetaStatements()Returns the String representation of the META SQL statements, mapping rules and optional features.SqlMonitorFactorygetMonitorFactory()Returns the monitor factory used in the process of the SQL Monitor instances creation.String[]getOnlyStatements()Returns the only statements and rules, which are picked up from the properties repository.SqlPluginFactorygetPluginFactory()Returns the factory for the SQL Processor plugins.Map<String,SqlEngine>getProcedureDynamicEngines()Returns the collection of names of all initialized/constructed dynamic SQL Procedure Engine instances.Collection<String>getProcedureDynamicNames()Returns the collection of names of all initialized/constructed dynamic SQL Procedure Engine instances.SqlProcedureEnginegetProcedureEngine(String name)Returns the named static or dynamic SQL Procedure Engine instance (the primary SQL Processor class).Map<String,SqlEngine>getProcedureEngines()Returns the collection of named dynamic SQL Procedure Engines (the primary SQL Processor class) instances.Collection<String>getProcedureNames()Returns the collection of names of all initialized/constructed static SQL Procedure Engine instances.Map<String,SqlEngine>getQueryDynamicEngines()Returns the collection of names of all initialized/constructed dynamic SQL Query Engine instances.Collection<String>getQueryDynamicNames()Returns the collection of names of all initialized/constructed dynamic SQL Query Engine instances.SqlQueryEnginegetQueryEngine(String name)Returns the named static or dynamic SQL Query Engine instance (the primary SQL Processor class).Map<String,SqlEngine>getQueryEngines()Returns the collection of named dynamic SQL Query Engines (the primary SQL Processor class) instances.Collection<String>getQueryNames()Returns the collection of names of all initialized/constructed static SQL Query Engine instances.SqlCrudEnginegetStaticCrudEngine(String name)Returns the named static SQL CRUD Engine instance (the primary SQL Processor class).SqlProcedureEnginegetStaticProcedureEngine(String name)Returns the named static SQL Procedure Engine instance (the primary SQL Processor class).SqlQueryEnginegetStaticQueryEngine(String name)Returns the named static SQL Query Engine instance (the primary SQL Processor class).SqlTypeFactorygetTypeFactory()Returns the factory for the META types construction.SqlValidatorFactorygetValidatorFactory()Returns the validator factory used in the process of the SQL Monitor instances creation.voidinit()Dynamic initialization, called mainly from the Spring configuration initialization.voidinit0()Conditional dynamic initialization, called mainly from the Spring configuration initialization.BooleanisAsyncInitFinished()Returns the flag indicating the asynchronous SQL Processor engines initialization has been finished.booleanisCollectionsAreStandardTypes()Returns the indicator that Collections should be handled as standard types.booleanisJdbc()Returns the indicator the JDBC stack is used.booleanisLazyInit()Returns the indicator to speed up the initialization processbooleanisSkipAliasesInQqlCommand()Returns the indicator that column aliases are not included in generated SQL command.voidsetAsyncInitThreads(Integer asyncInitThreads)Sets the number of threads used for asynchronous initializationvoidsetCollectionsAreStandardTypes(boolean collectionsAreStandardTypes)Sets the indicator that Collections should be handled as standard types.voidsetConfiguration(SqlEngineConfiguration configuration)Sets the overall dynamic configurationvoidsetCustomTypes(List<SqlMetaType> customTypes)Sets the custom META types.voidsetCustomTypes(SqlMetaType... customTypes)Sets the custom META types.voidsetExecutor(Executor executor)Sets the asynchronous SQL Processor engines initialization executor.voidsetFilter(String filter)Sets the name of the filter to filter the META SQL statements, mapping rules and optional features.voidsetFilter(SqlFeature filter)Sets the name of the filter to filter the META SQL statements, mapping rules and optional features.voidsetJdbc(boolean jdbc)Sets the indicator the JDBC stack is used.voidsetLazyInit(Boolean lazyInit)Sets the indicator to speed up the initialization processvoidsetMetaFilesNames(String... metaFilesNames)Sets the names of files, which holds a collection of META SQL statements, mapping rules and optional features.voidsetMetaFilesNames(List<String> metaFilesNames)Sets the names of files, which holds a collection of META SQL statements, mapping rules and optional features.voidsetMetaStatements(StringBuilder metaStatements)Sets the String representation of the META SQL statements, mapping rules and optional features.voidsetMonitorFactory(SqlMonitorFactory monitorFactory)Sets the monitor factory used in the process of the SQL Monitor instances creation.voidsetOnlyStatements(String[] selectQueries)Sets the only statements and rules, which are picked up from the properties repository.voidsetPluginFactory(SqlPluginFactory pluginFactory)Sets the factory for the SQL Processor plugins.voidsetSkipAliasesInQqlCommand(boolean skipAliasesInQqlCommand)Sets the indicator that column aliases are not included in generated SQL command.voidsetTypeFactory(SqlTypeFactory typeFactory)Sets the factory for the META types construction.voidsetValidatorFactory(SqlValidatorFactory validatorFactory)Sets the validator factory used in the process of the SQL Monitor instances creation.
-
-
-
Field Detail
-
logger
protected final org.slf4j.Logger logger
The internal slf4j logger.
-
LINESEP
private static final String LINESEP
The platform based line separator.
-
metaFilesNames
private List<String> metaFilesNames
The names of files, which hold a collection of the SQL Processor artifacts (META SQL statements, mapping rules and optional features).
-
metaStatements
private StringBuilder metaStatements
The String representation of all SQL Processor artifacts (META SQL statements, mapping rules and optional features).
-
typeFactory
private SqlTypeFactory typeFactory
The factory for the META types construction.
-
pluginFactory
protected SqlPluginFactory pluginFactory
The factory for the SQL Processor plugins.
-
filter
private String filter
The name of the filter to filter the META SQL statements, mapping rules and optional features.
-
monitorFactory
private SqlMonitorFactory monitorFactory
The monitor factory used in the process of the SQL Monitor instances creation.
-
customTypes
private List<SqlMetaType> customTypes
The custom META types.
-
onlyStatements
private String[] onlyStatements
Only statements and rules with the names in this set are picked up from the properties repository.
-
jdbc
private boolean jdbc
The indicator the JDBC stack is used.
-
processorLoader
private volatile SqlProcessorLoader processorLoader
The helper class for the META SQL statements and mapping rules parsing. All artifacts are loaded from new grammar based files.
-
validatorFactory
private SqlValidatorFactory validatorFactory
The validator factory used in the process of the SQL Monitor instances creation.
-
lazyInit
private Boolean lazyInit
This flag indicates to speed up the initialization process.
-
asyncInitThreads
private Integer asyncInitThreads
The number of threads used for asynchronous initialization.
-
configuration
private SqlEngineConfiguration configuration
The overall configuration, which can be persisted.
-
executor
private Executor executor
The asynchronous SQL Processor engines initialization executor. It can be a Spring TaskExecutor.
-
executorTerminated
private Boolean executorTerminated
The flag indicating the asynchronous SQL Processor engines initialization has been finished.
-
collectionsAreStandardTypes
private boolean collectionsAreStandardTypes
The indicator that Collections should be handled as standard types. This is standard behaviour for Cassandra DB..
-
skipAliasesInQqlCommand
private boolean skipAliasesInQqlCommand
The indicator that column aliases are not included in generated SQL command. This is standard behaviour for Cassandra DB.
-
-
Constructor Detail
-
SqlDefaultFactory
public SqlDefaultFactory()
Creates a new instance with no default values.
-
SqlDefaultFactory
public SqlDefaultFactory(boolean lazyInit)
Creates a new instance with no default values.- Parameters:
lazyInit- this flag indicates to speed up the initialization process.
-
SqlDefaultFactory
public SqlDefaultFactory(int asyncInitThreads)
Creates a new instance with no default values.- Parameters:
asyncInitThreads- number of threads used for asynchronous initialization
-
SqlDefaultFactory
public SqlDefaultFactory(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
-
-
Method Detail
-
init
public void init()
Dynamic initialization, called mainly from the Spring configuration initialization.
-
init0
public void init0()
Conditional dynamic initialization, called mainly from the Spring configuration initialization.
-
getQueryEngine
public SqlQueryEngine getQueryEngine(String name)
Returns the named static or dynamic SQL Query Engine instance (the primary SQL Processor class). In fact it returns the cached instance in the case it exists (it can be a static or dynamic one). Otherwise it instantiates a new static instance.- Specified by:
getQueryEnginein interfaceSqlEngineFactory- Parameters:
name- the name of the required SQL Query Engine instance- Returns:
- the SQL Engine instance or null value in the case the related statement is missing
-
getCrudEngine
public SqlCrudEngine getCrudEngine(String name)
Returns the named static or dynamic SQL CRUD Engine instance (the primary SQL Processor class). In fact it returns the cached instance in the case it exists (it can be a static or dynamic one). Otherwise it instantiates a new static instance.- Specified by:
getCrudEnginein interfaceSqlEngineFactory- Parameters:
name- the name of the required SQL CRUD Engine instance- Returns:
- the SQL Engine instance or null value in the case the related statement is missing
-
getProcedureEngine
public SqlProcedureEngine getProcedureEngine(String name)
Returns the named static or dynamic SQL Procedure Engine instance (the primary SQL Processor class). In fact it returns the cached instance in the case it exists (it can be a static or dynamic one). Otherwise it instantiates a new static instance.- Specified by:
getProcedureEnginein interfaceSqlEngineFactory- Parameters:
name- the name of the required SQL Procedure Engine instance- Returns:
- the SQL Engine instance or null value in the case the related statement is missing
-
getStaticQueryEngine
public SqlQueryEngine getStaticQueryEngine(String name)
Returns the named static SQL Query Engine instance (the primary SQL Processor class).- Specified by:
getStaticQueryEnginein interfaceSqlEngineFactory- Parameters:
name- the name of the required SQL Query Engine instance- Returns:
- the SQL Engine instance or null value in the case the related statement is missing
-
getStaticCrudEngine
public SqlCrudEngine getStaticCrudEngine(String name)
Returns the named static SQL CRUD Engine instance (the primary SQL Processor class).- Specified by:
getStaticCrudEnginein interfaceSqlEngineFactory- Parameters:
name- the name of the required SQL CRUD Engine instance- Returns:
- the SQL Engine instance or null value in the case the related statement is missing
-
getStaticProcedureEngine
public SqlProcedureEngine getStaticProcedureEngine(String name)
Returns the named static SQL Procedure Engine instance (the primary SQL Processor class).- Specified by:
getStaticProcedureEnginein interfaceSqlEngineFactory- Parameters:
name- the name of the required SQL Procedure Engine instance- Returns:
- the SQL Engine instance or null value in the case the related statement is missing
-
check
private void check(String name, SqlEngine sqlEngine)
Check the SQL Engine instance is not null- Parameters:
name- the name of the required SQL Engine instancesqlEngine- the checked SQL Engine instance- Throws:
SqlEngineException- in the case the the SQL Engine instance is null
-
getCheckedQueryEngine
public SqlQueryEngine getCheckedQueryEngine(String name) throws SqlEngineException
Returns the named static or dynamic SQL Query Engine instance (the primary SQL Processor class). In fact it returns the cached instance in the case it exists (it can be a static or dynamic one). Otherwise it instantiates a new static instance.- Specified by:
getCheckedQueryEnginein interfaceSqlEngineFactory- Parameters:
name- the name of the required SQL Query Engine instance- Returns:
- the SQL Engine instance
- Throws:
SqlEngineException- in the case the related statement is missing
-
getCheckedCrudEngine
public SqlCrudEngine getCheckedCrudEngine(String name)
Returns the named static or dynamic SQL CRUD Engine instance (the primary SQL Processor class). In fact it returns the cached instance in the case it exists (it can be a static or dynamic one). Otherwise it instantiates a new static instance.- Specified by:
getCheckedCrudEnginein interfaceSqlEngineFactory- Parameters:
name- the name of the required SQL CRUD Engine instance- Returns:
- the SQL Engine instance
-
getCheckedProcedureEngine
public SqlProcedureEngine getCheckedProcedureEngine(String name)
Returns the named static or dynamic SQL Procedure Engine instance (the primary SQL Processor class). In fact it returns the cached instance in the case it exists (it can be a static or dynamic one). Otherwise it instantiates a new static instance.- Specified by:
getCheckedProcedureEnginein interfaceSqlEngineFactory- Parameters:
name- the name of the required SQL Procedure Engine instance- Returns:
- the SQL Engine instance
-
getCheckedStaticQueryEngine
public SqlQueryEngine getCheckedStaticQueryEngine(String name) throws SqlEngineException
Returns the named static SQL Query Engine instance (the primary SQL Processor class).- Specified by:
getCheckedStaticQueryEnginein interfaceSqlEngineFactory- Parameters:
name- the name of the required SQL Query Engine instance- Returns:
- the SQL Engine instance
- Throws:
SqlEngineException- in the case the related statement is missing
-
getCheckedStaticCrudEngine
public SqlCrudEngine getCheckedStaticCrudEngine(String name)
Returns the named static SQL CRUD Engine instance (the primary SQL Processor class).- Specified by:
getCheckedStaticCrudEnginein interfaceSqlEngineFactory- Parameters:
name- the name of the required SQL CRUD Engine instance- Returns:
- the SQL Engine instance
-
getCheckedStaticProcedureEngine
public SqlProcedureEngine getCheckedStaticProcedureEngine(String name)
Returns the named static SQL Procedure Engine instance (the primary SQL Processor class).- Specified by:
getCheckedStaticProcedureEnginein interfaceSqlEngineFactory- Parameters:
name- the name of the required SQL Procedure Engine instance- Returns:
- the SQL Engine instance
-
getDynamicQueryEngine
public SqlQueryEngine getDynamicQueryEngine(String name, String sqlStatement) throws SqlEngineException
Returns the named dynamic SQL Query Engine instance (the primary SQL Processor class).- Specified by:
getDynamicQueryEnginein interfaceSqlEngineFactory- Parameters:
name- the name of the required SQL Query Engine instancesqlStatement- the new SQL statement, which is going to replace the original one- Returns:
- the SQL Engine instance
- Throws:
SqlEngineException- in the case the original statement is missing
-
getDynamicCrudEngine
public SqlCrudEngine getDynamicCrudEngine(String name, String sqlStatement)
Returns the named dynamic SQL CRUD Engine instance (the primary SQL Processor class).- Specified by:
getDynamicCrudEnginein interfaceSqlEngineFactory- Parameters:
name- the name of the required SQL CRUD Engine instancesqlStatement- the new SQL statement, which is going to replace the original one- Returns:
- the SQL Engine instance
-
getDynamicProcedureEngine
public SqlProcedureEngine getDynamicProcedureEngine(String name, String sqlStatement)
Returns the named dynamic SQL Procedure Engine instance (the primary SQL Processor class).- Specified by:
getDynamicProcedureEnginein interfaceSqlEngineFactory- Parameters:
name- the name of the required SQL Procedure Engine instancesqlStatement- the new SQL statement, which is going to replace the original one- Returns:
- the SQL Engine instance
-
getMetaFilesNames
public List<String> getMetaFilesNames()
Returns the names of files, which holds a collection of META SQL statements, mapping rules and optional features.- Returns:
- the names of files, which holds a collection of META SQL statements, mapping rules and optional features
-
setMetaFilesNames
public void setMetaFilesNames(List<String> metaFilesNames)
Sets the names of files, which holds a collection of META SQL statements, mapping rules and optional features.- Parameters:
metaFilesNames- the names of files, which holds a collection of META SQL statements, mapping rules and optional features
-
setMetaFilesNames
public void setMetaFilesNames(String... metaFilesNames)
Sets the names of files, which holds a collection of META SQL statements, mapping rules and optional features.- Parameters:
metaFilesNames- the names of files, which holds a collection of META SQL statements, mapping rules and optional features
-
getMetaStatements
public StringBuilder getMetaStatements()
Returns the String representation of the META SQL statements, mapping rules and optional features.- Returns:
- the String representation of the META SQL statements, mapping rules and optional features
-
setMetaStatements
public void setMetaStatements(StringBuilder metaStatements)
Sets the String representation of the META SQL statements, mapping rules and optional features.- Parameters:
metaStatements- the String representation of the META SQL statements, mapping rules and optional features
-
getTypeFactory
public SqlTypeFactory getTypeFactory()
Returns the factory for the META types construction.- Returns:
- the factory for the META types construction
-
setTypeFactory
public void setTypeFactory(SqlTypeFactory typeFactory)
Sets the factory for the META types construction.- Parameters:
typeFactory- the factory for the META types construction
-
getPluginFactory
public SqlPluginFactory getPluginFactory()
Returns the factory for the SQL Processor plugins.- Returns:
- the factory for the SQL Processor plugins
-
setPluginFactory
public void setPluginFactory(SqlPluginFactory pluginFactory)
Sets the factory for the SQL Processor plugins.- Parameters:
pluginFactory- the factory for the SQL Processor plugins
-
getFilter
public String getFilter()
Returns the name of the filter to filter the META SQL statements, mapping rules and optional features.- Returns:
- the name of the filter to filter the META SQL statements, mapping rules and optional features
-
setFilter
public void setFilter(String filter)
Sets the name of the filter to filter the META SQL statements, mapping rules and optional features.- Parameters:
filter- the name of the filter to filter the META SQL statements, mapping rules and optional features
-
setFilter
public void setFilter(SqlFeature filter)
Sets the name of the filter to filter the META SQL statements, mapping rules and optional features.- Parameters:
filter- the name of the filter to filter the META SQL statements, mapping rules and optional features
-
getMonitorFactory
public SqlMonitorFactory getMonitorFactory()
Returns the monitor factory used in the process of the SQL Monitor instances creation.- Returns:
- the monitor factory used in the process of the SQL Monitor instances creation
-
setMonitorFactory
public void setMonitorFactory(SqlMonitorFactory monitorFactory)
Sets the monitor factory used in the process of the SQL Monitor instances creation.- Parameters:
monitorFactory- the monitor factory used in the process of the SQL Monitor instances creation
-
getCustomTypes
public List<SqlMetaType> getCustomTypes()
Returns the custom META types.- Returns:
- the custom META types
-
setCustomTypes
public void setCustomTypes(List<SqlMetaType> customTypes)
Sets the custom META types.- Parameters:
customTypes- the custom META types
-
setCustomTypes
public void setCustomTypes(SqlMetaType... customTypes)
Sets the custom META types.- Parameters:
customTypes- the custom META types
-
addCustomType
public void addCustomType(SqlMetaType customType)
Adds a new custom META type.- Parameters:
customType- the custom META type
-
getOnlyStatements
public String[] getOnlyStatements()
Returns the only statements and rules, which are picked up from the properties repository.- Returns:
- the only statements and rules, which are picked up from the properties repository
-
setOnlyStatements
public void setOnlyStatements(String[] selectQueries)
Sets the only statements and rules, which are picked up from the properties repository.- Parameters:
selectQueries- the only statements and rules, which are picked up from the properties repository
-
isJdbc
public boolean isJdbc()
Returns the indicator the JDBC stack is used.- Returns:
- the indicator the JDBC stack is used
-
setJdbc
public void setJdbc(boolean jdbc)
Sets the indicator the JDBC stack is used.- Parameters:
jdbc- the indicator the JDBC stack is used
-
isCollectionsAreStandardTypes
public boolean isCollectionsAreStandardTypes()
Returns the indicator that Collections should be handled as standard types.- Returns:
- the indicator that Collections should be handled as standard types.
-
setCollectionsAreStandardTypes
public void setCollectionsAreStandardTypes(boolean collectionsAreStandardTypes)
Sets the indicator that Collections should be handled as standard types.- Parameters:
collectionsAreStandardTypes- the indicator that Collections should be handled as standard types.
-
isSkipAliasesInQqlCommand
public boolean isSkipAliasesInQqlCommand()
Returns the indicator that column aliases are not included in generated SQL command.- Returns:
- the indicator that column aliases are not included in generated SQL command
-
setSkipAliasesInQqlCommand
public void setSkipAliasesInQqlCommand(boolean skipAliasesInQqlCommand)
Sets the indicator that column aliases are not included in generated SQL command.- Parameters:
skipAliasesInQqlCommand- the indicator that column aliases are not included in generated SQL command
-
isLazyInit
public boolean isLazyInit()
Returns the indicator to speed up the initialization process- Specified by:
isLazyInitin interfaceSqlEngineFactory- Returns:
- the indicator to speed up the initialization process
-
setLazyInit
public void setLazyInit(Boolean lazyInit)
Sets the indicator to speed up the initialization process- Parameters:
lazyInit- the indicator to speed up the initialization process
-
getAsyncInitThreads
public int getAsyncInitThreads()
Returns the number of threads used for asynchronous initialization- Specified by:
getAsyncInitThreadsin interfaceSqlEngineFactory- Returns:
- the number of threads used for asynchronous initialization
-
setAsyncInitThreads
public void setAsyncInitThreads(Integer asyncInitThreads)
Sets the number of threads used for asynchronous initialization- Parameters:
asyncInitThreads- the number of threads used for asynchronous initialization
-
isAsyncInitFinished
public Boolean isAsyncInitFinished()
Returns the flag indicating the asynchronous SQL Processor engines initialization has been finished.- Specified by:
isAsyncInitFinishedin interfaceSqlEngineFactory- Returns:
- the flag indicating the asynchronous SQL Processor engines initialization has been finished
-
getLoader
public SqlProcessorLoader getLoader()
Returns the internal SQL engine or processor loader.- Returns:
- the internal SQL engine or processor loader
-
getValidatorFactory
public SqlValidatorFactory getValidatorFactory()
Returns the validator factory used in the process of the SQL Monitor instances creation.- Returns:
- the validator factory used in the process of the SQL Monitor instances creation
-
setValidatorFactory
public void setValidatorFactory(SqlValidatorFactory validatorFactory)
Sets the validator factory used in the process of the SQL Monitor instances creation.- Parameters:
validatorFactory- the validator factory used in the process of the SQL Monitor instances creation
-
getQueryNames
public Collection<String> getQueryNames()
Returns the collection of names of all initialized/constructed static SQL Query Engine instances.- Specified by:
getQueryNamesin interfaceSqlEngineFactory- Returns:
- The collection of all initialized static SQL Query Engine instances' names
-
getQueryDynamicNames
public Collection<String> getQueryDynamicNames()
Returns the collection of names of all initialized/constructed dynamic SQL Query Engine instances.- Specified by:
getQueryDynamicNamesin interfaceSqlEngineFactory- Returns:
- The collection of all initialized dynamic SQL Query Engine instances' names
-
getQueryEngines
public Map<String,SqlEngine> getQueryEngines()
Returns the collection of named dynamic SQL Query Engines (the primary SQL Processor class) instances.- Specified by:
getQueryEnginesin interfaceSqlEngineFactory- Returns:
- The collection of named dynamic SQL Query Engines (the primary SQL Processor class) instances
-
getQueryDynamicEngines
public Map<String,SqlEngine> getQueryDynamicEngines()
Returns the collection of names of all initialized/constructed dynamic SQL Query Engine instances.- Specified by:
getQueryDynamicEnginesin interfaceSqlEngineFactory- Returns:
- The collection of all initialized dynamic SQL Query Engine instances' names
-
getCrudNames
public Collection<String> getCrudNames()
Returns the collection of names of all initialized/constructed static SQL CRUD Engine instances.- Specified by:
getCrudNamesin interfaceSqlEngineFactory- Returns:
- The collection of all initialized static SQL CRUD Engine instances' names
-
getCrudDynamicNames
public Collection<String> getCrudDynamicNames()
Returns the collection of names of all initialized/constructed dynamic SQL CRUD Engine instances.- Specified by:
getCrudDynamicNamesin interfaceSqlEngineFactory- Returns:
- The collection of all initialized dynamic SQL CRUD Engine instances' names
-
getCrudEngines
public Map<String,SqlEngine> getCrudEngines()
Returns the collection of named dynamic SQL CRUD Engines (the primary SQL Processor class) instances.- Specified by:
getCrudEnginesin interfaceSqlEngineFactory- Returns:
- The collection of named dynamic SQL CRUD Engines (the primary SQL Processor class) instances
-
getCrudDynamicEngines
public Map<String,SqlEngine> getCrudDynamicEngines()
Returns the collection of names of all initialized/constructed dynamic SQL CRUD Engine instances.- Specified by:
getCrudDynamicEnginesin interfaceSqlEngineFactory- Returns:
- The collection of all initialized dynamic SQL CRUD Engine instances' names
-
getProcedureNames
public Collection<String> getProcedureNames()
Returns the collection of names of all initialized/constructed static SQL Procedure Engine instances.- Specified by:
getProcedureNamesin interfaceSqlEngineFactory- Returns:
- The collection of all initialized static SQL Procedure Engine instances' names
-
getProcedureDynamicNames
public Collection<String> getProcedureDynamicNames()
Returns the collection of names of all initialized/constructed dynamic SQL Procedure Engine instances.- Specified by:
getProcedureDynamicNamesin interfaceSqlEngineFactory- Returns:
- The collection of all initialized dynamic SQL Procedure Engine instances' names
-
getProcedureEngines
public Map<String,SqlEngine> getProcedureEngines()
Returns the collection of named dynamic SQL Procedure Engines (the primary SQL Processor class) instances.- Specified by:
getProcedureEnginesin interfaceSqlEngineFactory- Returns:
- The collection of named dynamic SQL Procedure Engines (the primary SQL Processor class) instances
-
getProcedureDynamicEngines
public Map<String,SqlEngine> getProcedureDynamicEngines()
Returns the collection of names of all initialized/constructed dynamic SQL Procedure Engine instances.- Specified by:
getProcedureDynamicEnginesin interfaceSqlEngineFactory- Returns:
- The collection of all initialized dynamic SQL Procedure Engine instances' names
-
getEnginesInitErrors
public Map<String,String> getEnginesInitErrors()
Returns the result of engines initialization process. For every engine, for which there's error in the initialization process there a error message. In the case there's no error, the result message is null.- Specified by:
getEnginesInitErrorsin interfaceSqlEngineFactory- Returns:
- the result of engines initialization process
-
getEnginesInitErrorsMsg
public String getEnginesInitErrorsMsg()
Returns the result of engines initialization process. For every engine, for which there's error in the initialization process there a error message. In the case there's no error, the result message is null.- Specified by:
getEnginesInitErrorsMsgin interfaceSqlEngineFactory- Returns:
- the result of engines initialization process
-
getConfiguration
public SqlEngineConfiguration getConfiguration()
Returns the overall dynamic configuration- Specified by:
getConfigurationin interfaceSqlEngineFactory- Returns:
- the overall dynamic configuration
-
setConfiguration
public void setConfiguration(SqlEngineConfiguration configuration)
Sets the overall dynamic configuration- Parameters:
configuration- the overall dynamic configuration
-
getExecutor
protected Executor getExecutor()
Returns the asynchronous SQL Processor engines initialization executor. It can be a Spring TaskExecutor or null for the case of synchronous SQL Processor engines initialization.- Returns:
- the asynchronous SQL Processor engines initialization executor
-
setExecutor
public void setExecutor(Executor executor)
Sets the asynchronous SQL Processor engines initialization executor. It can be a Spring TaskExecutor or null for the case of synchronous SQL Processor engines initialization.- Parameters:
executor- the asynchronous SQL Processor engines initialization executor
-
-