|
||||||||||
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, SqlControl, SqlEngine)
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 | |
---|---|
(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) Set<String> |
oppositeNames
Unset features in the runtime. |
(package private) SqlControl |
sqlControl
The compound parameters controlling the META SQL execution. |
(package private) SqlEngine |
sqlEngine
The primary SQL Processor class for the META SQL execution. |
(package private) SqlMetaStatement.Type |
sqlStatementType
The SQL command type. |
Constructor Summary | |
---|---|
SqlProcessContext(SqlMetaStatement.Type sqlStatementType,
Object dynamicInputValues,
SqlControl sqlControl,
SqlEngine sqlEngine)
Creates a new instance. |
|
SqlProcessContext(SqlProcessContext ctx,
Object dynamicInputValues,
SqlControl sqlControl)
Creates a new instance. |
Method Summary | |
---|---|
Object |
getDynamicInputValues()
Returns the SQL statement dynamic parameters. |
String |
getFeature(String name)
Convenient method to obtain a String feature based on the name. |
Integer |
getFeatureAsInt(String name)
Convenient method to obtain an Integer feature based on the name. |
Object |
getFeatureAsObject(String name)
Convenient method to obtain an Object feature based on the name. |
String[] |
getFeatures(String name)
Convenient method to obtain a String array features based on the name. |
(package private) List<SqlOrder> |
getOrder()
Returns the list of ordering directives. |
(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. |
SqlPluginFactory |
getPluginFactory()
Returns the factory responsible for the SQL Processor plugins. |
Object |
getRawFeature(String name)
Convenient method to obtain a feature based on the name. |
(package private) SqlMetaStatement.Type |
getSqlStatementType()
Returns the SQL command type. |
Object |
getStaticInputValues()
Returns the SQL statement static parameters. |
SqlTypeFactory |
getTypeFactory()
Returns the factory responsible for the META types construction. |
private void |
initFeatures()
Initialize the optional features. |
boolean |
isFeature(String name)
Convenient method to obtain a boolean feature based on the name. |
String |
toString()
For debug purposes. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
SqlMetaStatement.Type sqlStatementType
Object dynamicInputValues
SqlControl sqlControl
SqlEngine sqlEngine
boolean inSqlSetOrInsert
Set<String> oppositeNames
Constructor Detail |
---|
SqlProcessContext(SqlMetaStatement.Type sqlStatementType, Object dynamicInputValues, SqlControl sqlControl, SqlEngine sqlEngine)
sqlStatementType
- the type of the SQL commanddynamicInputValues
- the dynamic input parameterssqlControl
- the compound parameters controlling the META SQL executionsqlEngine
- the primary SQL Processor class for the META SQL executionSqlProcessContext(SqlProcessContext ctx, Object dynamicInputValues, SqlControl sqlControl)
ctx
- the crate for all input parameters and the context of processingdynamicInputValues
- the dynamic input parameterssqlControl
- the compound parameters controlling the META SQL executionMethod Detail |
---|
private void initFeatures()
SqlMetaStatement.Type getSqlStatementType()
public Object getDynamicInputValues()
public Object getStaticInputValues()
public String getFeature(String name)
getFeature
in interface SqlRuntimeContext
name
- name of the feature
public String[] getFeatures(String name)
getFeatures
in interface SqlRuntimeContext
name
- name of the feature
public boolean isFeature(String name)
isFeature
in interface SqlRuntimeContext
name
- name of the feature
public Integer getFeatureAsInt(String name)
getFeatureAsInt
in interface SqlRuntimeContext
name
- name of the feature
public Object getFeatureAsObject(String name)
getFeatureAsObject
in interface SqlRuntimeContext
name
- name of the feature
public Object getRawFeature(String name)
getRawFeature
in interface SqlRuntimeContext
name
- name of the feature
List<SqlOrder> getOrder()
int getOrderIndex(int orderId)
orderId
- the order number
SqlOrder.Order getOrder(int orderIndex)
orderIndex
- the index of the ordering rule
public SqlTypeFactory getTypeFactory()
getTypeFactory
in interface SqlRuntimeContext
public SqlPluginFactory getPluginFactory()
getPluginFactory
in interface SqlRuntimeContext
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |