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 class
SqlDefaultFactory.SqlThreadPoolExecutor
The customized ThreadPoolExecutor.
-
Field Summary
Fields Modifier and Type Field Description private Integer
asyncInitThreads
The number of threads used for asynchronous initialization.private boolean
collectionsAreStandardTypes
The indicator that Collections should be handled as standard types.private SqlEngineConfiguration
configuration
The overall configuration, which can be persisted.private List<SqlMetaType>
customTypes
The custom META types.private Executor
executor
The asynchronous SQL Processor engines initialization executor.private Boolean
executorTerminated
The flag indicating the asynchronous SQL Processor engines initialization has been finished.private String
filter
The name of the filter to filter the META SQL statements, mapping rules and optional features.private boolean
jdbc
The indicator the JDBC stack is used.private Boolean
lazyInit
This flag indicates to speed up the initialization process.private static String
LINESEP
The platform based line separator.protected org.slf4j.Logger
logger
The internal slf4j logger.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).private StringBuilder
metaStatements
The String representation of all SQL Processor artifacts (META SQL statements, mapping rules and optional features).private SqlMonitorFactory
monitorFactory
The monitor factory used in the process of the SQL Monitor instances creation.private String[]
onlyStatements
Only statements and rules with the names in this set are picked up from the properties repository.protected SqlPluginFactory
pluginFactory
The factory for the SQL Processor plugins.private SqlProcessorLoader
processorLoader
The helper class for the META SQL statements and mapping rules parsing.private boolean
skipAliasesInQqlCommand
The indicator that column aliases are not included in generated SQL command.private SqlTypeFactory
typeFactory
The factory for the META types construction.private SqlValidatorFactory
validatorFactory
The 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 void
addCustomType(SqlMetaType customType)
Adds a new custom META type.private void
check(String name, SqlEngine sqlEngine)
Check the SQL Engine instance is not nullint
getAsyncInitThreads()
Returns the number of threads used for asynchronous initializationSqlCrudEngine
getCheckedCrudEngine(String name)
Returns the named static or dynamic SQL CRUD Engine instance (the primary SQL Processor class).SqlProcedureEngine
getCheckedProcedureEngine(String name)
Returns the named static or dynamic SQL Procedure Engine instance (the primary SQL Processor class).SqlQueryEngine
getCheckedQueryEngine(String name)
Returns the named static or dynamic SQL Query Engine instance (the primary SQL Processor class).SqlCrudEngine
getCheckedStaticCrudEngine(String name)
Returns the named static SQL CRUD Engine instance (the primary SQL Processor class).SqlProcedureEngine
getCheckedStaticProcedureEngine(String name)
Returns the named static SQL Procedure Engine instance (the primary SQL Processor class).SqlQueryEngine
getCheckedStaticQueryEngine(String name)
Returns the named static SQL Query Engine instance (the primary SQL Processor class).SqlEngineConfiguration
getConfiguration()
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.SqlCrudEngine
getCrudEngine(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.SqlCrudEngine
getDynamicCrudEngine(String name, String sqlStatement)
Returns the named dynamic SQL CRUD Engine instance (the primary SQL Processor class).SqlProcedureEngine
getDynamicProcedureEngine(String name, String sqlStatement)
Returns the named dynamic SQL Procedure Engine instance (the primary SQL Processor class).SqlQueryEngine
getDynamicQueryEngine(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.String
getEnginesInitErrorsMsg()
Returns the result of engines initialization process.protected Executor
getExecutor()
Returns the asynchronous SQL Processor engines initialization executor.String
getFilter()
Returns the name of the filter to filter the META SQL statements, mapping rules and optional features.SqlProcessorLoader
getLoader()
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.StringBuilder
getMetaStatements()
Returns the String representation of the META SQL statements, mapping rules and optional features.SqlMonitorFactory
getMonitorFactory()
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.SqlPluginFactory
getPluginFactory()
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.SqlProcedureEngine
getProcedureEngine(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.SqlQueryEngine
getQueryEngine(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.SqlCrudEngine
getStaticCrudEngine(String name)
Returns the named static SQL CRUD Engine instance (the primary SQL Processor class).SqlProcedureEngine
getStaticProcedureEngine(String name)
Returns the named static SQL Procedure Engine instance (the primary SQL Processor class).SqlQueryEngine
getStaticQueryEngine(String name)
Returns the named static SQL Query Engine instance (the primary SQL Processor class).SqlTypeFactory
getTypeFactory()
Returns the factory for the META types construction.SqlValidatorFactory
getValidatorFactory()
Returns the validator factory used in the process of the SQL Monitor instances creation.void
init()
Dynamic initialization, called mainly from the Spring configuration initialization.void
init0()
Conditional dynamic initialization, called mainly from the Spring configuration initialization.Boolean
isAsyncInitFinished()
Returns the flag indicating the asynchronous SQL Processor engines initialization has been finished.boolean
isCollectionsAreStandardTypes()
Returns the indicator that Collections should be handled as standard types.boolean
isJdbc()
Returns the indicator the JDBC stack is used.boolean
isLazyInit()
Returns the indicator to speed up the initialization processboolean
isSkipAliasesInQqlCommand()
Returns the indicator that column aliases are not included in generated SQL command.void
setAsyncInitThreads(Integer asyncInitThreads)
Sets the number of threads used for asynchronous initializationvoid
setCollectionsAreStandardTypes(boolean collectionsAreStandardTypes)
Sets the indicator that Collections should be handled as standard types.void
setConfiguration(SqlEngineConfiguration configuration)
Sets the overall dynamic configurationvoid
setCustomTypes(List<SqlMetaType> customTypes)
Sets the custom META types.void
setCustomTypes(SqlMetaType... customTypes)
Sets the custom META types.void
setExecutor(Executor executor)
Sets the asynchronous SQL Processor engines initialization executor.void
setFilter(String filter)
Sets the name of the filter to filter the META SQL statements, mapping rules and optional features.void
setFilter(SqlFeature filter)
Sets the name of the filter to filter the META SQL statements, mapping rules and optional features.void
setJdbc(boolean jdbc)
Sets the indicator the JDBC stack is used.void
setLazyInit(Boolean lazyInit)
Sets the indicator to speed up the initialization processvoid
setMetaFilesNames(String... metaFilesNames)
Sets the names of files, which holds a collection of META SQL statements, mapping rules and optional features.void
setMetaFilesNames(List<String> metaFilesNames)
Sets the names of files, which holds a collection of META SQL statements, mapping rules and optional features.void
setMetaStatements(StringBuilder metaStatements)
Sets the String representation of the META SQL statements, mapping rules and optional features.void
setMonitorFactory(SqlMonitorFactory monitorFactory)
Sets the monitor factory used in the process of the SQL Monitor instances creation.void
setOnlyStatements(String[] selectQueries)
Sets the only statements and rules, which are picked up from the properties repository.void
setPluginFactory(SqlPluginFactory pluginFactory)
Sets the factory for the SQL Processor plugins.void
setSkipAliasesInQqlCommand(boolean skipAliasesInQqlCommand)
Sets the indicator that column aliases are not included in generated SQL command.void
setTypeFactory(SqlTypeFactory typeFactory)
Sets the factory for the META types construction.void
setValidatorFactory(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:
getQueryEngine
in 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:
getCrudEngine
in 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:
getProcedureEngine
in 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:
getStaticQueryEngine
in 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:
getStaticCrudEngine
in 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:
getStaticProcedureEngine
in 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:
getCheckedQueryEngine
in 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:
getCheckedCrudEngine
in 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:
getCheckedProcedureEngine
in 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:
getCheckedStaticQueryEngine
in 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:
getCheckedStaticCrudEngine
in 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:
getCheckedStaticProcedureEngine
in 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:
getDynamicQueryEngine
in 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:
getDynamicCrudEngine
in 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:
getDynamicProcedureEngine
in 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:
isLazyInit
in 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:
getAsyncInitThreads
in 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:
isAsyncInitFinished
in 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:
getQueryNames
in 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:
getQueryDynamicNames
in 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:
getQueryEngines
in 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:
getQueryDynamicEngines
in 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:
getCrudNames
in 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:
getCrudDynamicNames
in 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:
getCrudEngines
in 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:
getCrudDynamicEngines
in 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:
getProcedureNames
in 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:
getProcedureDynamicNames
in 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:
getProcedureEngines
in 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:
getProcedureDynamicEngines
in 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:
getEnginesInitErrors
in 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:
getEnginesInitErrorsMsg
in interfaceSqlEngineFactory
- Returns:
- the result of engines initialization process
-
getConfiguration
public SqlEngineConfiguration getConfiguration()
Returns the overall dynamic configuration- Specified by:
getConfiguration
in 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
-
-