|
||||||||||
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 | |
---|---|
boolean |
checkAttribute(Object bean,
String attrName)
|
boolean |
checkMethod(Class<?> clazz,
String methodName,
Class<?>... args)
|
boolean |
checkMethod(Object bean,
String methodName,
Object... args)
|
Object |
getAttribute(Object bean,
String attrName)
|
Class<?> |
getAttributeType(Class<?> clazz,
String attrName)
|
Object |
getDynamicInputValues()
Returns the SQL statement dynamic parameters. |
Class<?> |
getEnumToClass(Class<?> clazz)
|
Object |
getEnumToValue(Object bean)
|
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. |
BeanUtilsPlugin.GetterType |
getGetterType(Class<?> clazz,
String attrName)
|
BeanUtilsPlugin.GetterType |
getGetterType(Object bean,
String attrName)
|
Object |
getInstance(Class<?> clazz)
|
(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. |
Object |
getValueToEnum(Class<?> objClass,
Object val)
|
private void |
initFeatures()
Initialize the optional features. |
Object |
invokeMethod(Class<?> clazz,
String methodName,
Object... args)
|
Object |
invokeMethod(Object bean,
String methodName,
Object... args)
|
boolean |
isFeature(String name)
Convenient method to obtain a boolean feature based on the name. |
void |
setAttribute(Object bean,
String attrName,
Object attrValue)
|
boolean |
simpleSetAttribute(Object bean,
String attrName,
Object attrValue,
Class<?>... attrTypes)
|
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
public Object getInstance(Class<?> clazz)
getInstance
in interface SqlRuntimeContext
public Class<?> getAttributeType(Class<?> clazz, String attrName)
getAttributeType
in interface SqlRuntimeContext
public BeanUtilsPlugin.GetterType getGetterType(Class<?> clazz, String attrName)
getGetterType
in interface SqlRuntimeContext
public BeanUtilsPlugin.GetterType getGetterType(Object bean, String attrName)
getGetterType
in interface SqlRuntimeContext
public boolean checkAttribute(Object bean, String attrName)
checkAttribute
in interface SqlRuntimeContext
public Object getAttribute(Object bean, String attrName)
getAttribute
in interface SqlRuntimeContext
public boolean simpleSetAttribute(Object bean, String attrName, Object attrValue, Class<?>... attrTypes)
simpleSetAttribute
in interface SqlRuntimeContext
public void setAttribute(Object bean, String attrName, Object attrValue)
setAttribute
in interface SqlRuntimeContext
public boolean checkMethod(Class<?> clazz, String methodName, Class<?>... args)
checkMethod
in interface SqlRuntimeContext
public boolean checkMethod(Object bean, String methodName, Object... args)
checkMethod
in interface SqlRuntimeContext
public Object invokeMethod(Class<?> clazz, String methodName, Object... args)
invokeMethod
in interface SqlRuntimeContext
public Object invokeMethod(Object bean, String methodName, Object... args)
invokeMethod
in interface SqlRuntimeContext
public Object getEnumToValue(Object bean)
getEnumToValue
in interface SqlRuntimeContext
public Class<?> getEnumToClass(Class<?> clazz)
getEnumToClass
in interface SqlRuntimeContext
public Object getValueToEnum(Class<?> objClass, Object val)
getValueToEnum
in interface SqlRuntimeContext
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |