|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.sqlproc.engine.impl.SqlProcessContext
public class SqlProcessContext
The crate (design pattern) for all input parameters for the
SqlMetaStatement.process(org.sqlproc.engine.impl.SqlMetaStatement.Type, Object, Object, List, Map, Map, SqlTypeFactory, SqlPluginFactory)
Also can work as a context for a dynamic ANSI SQL query generation. This processing is based on the contract
SqlMetaElement.process(SqlProcessContext)
.
Field Summary | |
---|---|
private static ThreadLocal<Map<String,Object>> |
currentFeatures
The thread local holder for the configuration object. |
private static ThreadLocal<SqlPluginFactory> |
currentPluginFactory
The thread local holder for the factory for the SQL Processor plugins. |
private static ThreadLocal<SqlTypeFactory> |
currentTypeFactory
The thread local holder for the factory responsible for the META types construction. |
(package private) Object |
dynamicInputValues
The SQL statement dynamic parameters. |
(package private) boolean |
inSqlSetOrInsert
An indicator, that the processing is inside of the special SQL fragment - SET or VALUES. |
(package private) List<SqlOrder> |
order
The list of ordering directives. |
(package private) SqlMetaStatement.Type |
sqlStatementType
The SQL command type. |
(package private) Object |
staticInputValues
The SQL statement static parameters. |
Constructor Summary | |
---|---|
SqlProcessContext(SqlMetaStatement.Type sqlStatementType,
Object dynamicInputValues,
Object staticInputValues,
List<SqlOrder> order,
Map<String,Object> features,
Map<String,Object> runtimeFeatures,
SqlTypeFactory typeFactory,
SqlPluginFactory pluginFactory)
Creates a new instance. |
Method Summary | |
---|---|
static String |
getFeature(String name)
Convenient method to obtain a String feature based on the name. |
static Integer |
getFeatureAsInt(String name)
Convenient method to obtain an Integer feature based on the name. |
static Object |
getFeatureAsObject(String name)
Convenient method to obtain an Object feature based on the name. |
(package private) static Map<String,Object> |
getFeatures()
Returns the features for the current thread. |
static String[] |
getFeatures(String name)
Convenient method to obtain a String array features based on the name. |
(package private) SqlOrder.Order |
getOrder(int orderIndex)
Convenient method to obtain the ordering directive based on the index. |
(package private) int |
getOrderIndex(int orderId)
Convenient method to obtain the index of the ordering directive. |
static SqlPluginFactory |
getPluginFactory()
Returns the factory for the current thread responsible for the SQL Processor plugins. |
SqlMetaStatement.Type |
getSqlStatementType()
|
static SqlTypeFactory |
getTypeFactory()
Returns the factory for the current thread responsible for the META types construction. |
static boolean |
isFeature(String name)
Convenient method to obtain a boolean feature based on the name. |
(package private) static void |
nullFeatures()
THIS METHOD IS NOT PART OF THE SQL PROCESSOR PUBLIC API. |
(package private) static void |
nullPluginFactory()
THIS METHOD IS NOT PART OF THE SQL PROCESSOR PUBLIC API. |
(package private) static void |
nullTypeFactory()
THIS METHOD IS NOT PART OF THE SQL PROCESSOR PUBLIC API. |
(package private) static void |
setFeatures(Map<String,Object> features,
Map<String,Object> runtimeFeatures)
THIS METHOD IS NOT PART OF THE SQL PROCESSOR PUBLIC API. |
(package private) static void |
setPluginFactory(SqlPluginFactory pluginFactory)
THIS METHOD IS NOT PART OF THE SQL PROCESSOR PUBLIC API. |
(package private) static void |
setTypeFactory(SqlTypeFactory typeFactory)
THIS METHOD IS NOT PART OF THE SQL PROCESSOR PUBLIC API. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
SqlMetaStatement.Type sqlStatementType
Object dynamicInputValues
Object staticInputValues
List<SqlOrder> order
boolean inSqlSetOrInsert
private static final ThreadLocal<Map<String,Object>> currentFeatures
private static final ThreadLocal<SqlTypeFactory> currentTypeFactory
private static final ThreadLocal<SqlPluginFactory> currentPluginFactory
Constructor Detail |
---|
SqlProcessContext(SqlMetaStatement.Type sqlStatementType, Object dynamicInputValues, Object staticInputValues, List<SqlOrder> order, Map<String,Object> features, Map<String,Object> runtimeFeatures, SqlTypeFactory typeFactory, SqlPluginFactory pluginFactory)
sqlStatementType
- the type of the SQL commanddynamicInputValues
- the dynamic input parametersstaticInputValues
- the static input parametersorder
- the list of ordering directivesfeatures
- the optional features in the statement/global scoperuntimeFeatures
- the optional features in the statement's exection scopetypeFactory
- the factory for the META types constructionpluginFactory
- the factory for the SQL Processor pluginsMethod Detail |
---|
public SqlMetaStatement.Type getSqlStatementType()
public static String getFeature(String name)
name
- name of the feature
public static String[] getFeatures(String name)
name
- name of the feature
public static boolean isFeature(String name)
name
- name of the feature
public static Integer getFeatureAsInt(String name)
name
- name of the feature
public static Object getFeatureAsObject(String name)
name
- name of the feature
int getOrderIndex(int orderId)
orderId
- the order number
SqlOrder.Order getOrder(int orderIndex)
orderIndex
- the index of the ordering rule
static Map<String,Object> getFeatures()
static void setFeatures(Map<String,Object> features, Map<String,Object> runtimeFeatures)
features
- the optional features in the statement/global scoperuntimeFeatures
- the optional features in the statement's exection scopestatic void nullFeatures()
public static SqlTypeFactory getTypeFactory()
static void setTypeFactory(SqlTypeFactory typeFactory)
typeFactory
- the factory for the META types constructionstatic void nullTypeFactory()
public static SqlPluginFactory getPluginFactory()
static void setPluginFactory(SqlPluginFactory pluginFactory)
pluginFactory
- the factory for the SQL Processor pluginsstatic void nullPluginFactory()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |