|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SqlRuntimeContext
The public runtime context.
For more info please see the Tutorials.
| Method Summary | |
|---|---|
boolean |
checkAttribute(Object bean,
String attrName)
Checks the attribute getter method existence. |
boolean |
checkMethod(Class<?> clazz,
String methodName,
Class<?>... argTypes)
Checks the class method existence. |
boolean |
checkMethod(Object bean,
String methodName,
Object... args)
Checks the bean method existence. |
Object |
getAttribute(Object bean,
String attrName)
Returns the value of the specified simple attribute of the specified bean. |
Class<?> |
getAttributeType(Class<?> clazz,
String attrName)
Returns the Java type info for the attribute, if there is one. |
Class<?> |
getEnumToClass(Class<?> clazz)
Returns the bean enumeration type. |
Object |
getEnumToValue(Object bean)
Returns the bean enumeration value. |
String |
getFeature(SqlFeature feature)
Convenient method to obtain a String feature based on the name. |
String |
getFeature(SqlFeature feature,
String specName)
Convenient method to obtain a String feature based on the name. |
String |
getFeature(String name)
Convenient method to obtain a String feature based on the name. |
Integer |
getFeatureAsInt(SqlFeature feature)
Convenient method to obtain an Integer feature based on the name. |
Object |
getFeatureAsObject(SqlFeature feature)
Convenient method to obtain an Object feature based on the name. |
String[] |
getFeatures(String feature)
Convenient method to obtain a String array features based on the name. |
BeanUtilsPlugin.GetterType |
getGetterType(Class<?> clazz,
String attrName)
Returns the attribute getter method types, if there is one. |
BeanUtilsPlugin.GetterType |
getGetterType(Object bean,
String attrName)
Returns the attribute getter method types, if there is one. |
Object |
getInstance(Class<?> clazz)
Returns the new class instance |
SqlPluginFactory |
getPluginFactory()
Returns the factory responsible for the SQL Processor plugins. |
SqlTypeFactory |
getTypeFactory()
Returns the factory responsible for the META types construction. |
Object |
getValueToEnum(Class<?> clazz,
Object val)
Returns the enumeration instance for the enumeration value |
Object |
invokeMethod(Class<?> clazz,
String methodName,
Object... args)
Invokes the class method with the specified name and parameters. |
Object |
invokeMethod(Object bean,
String methodName,
Object... args)
Invokes the bean method with the specified name and parameters. |
boolean |
isFeature(SqlFeature feature)
Convenient method to obtain a boolean feature based on the name. |
void |
setAttribute(Object bean,
String attrName,
Object attrValue)
Sets the value of the specified simple attribute of the specified bean. |
boolean |
simpleSetAttribute(Object bean,
String attrName,
Object attrValue,
Class<?>... attrTypes)
Sets the value of the specified simple attribute of the specified bean, if there is one. |
| Method Detail |
|---|
String getFeature(String name)
name - name of the feature
String getFeature(SqlFeature feature)
feature - the feature
String getFeature(SqlFeature feature,
String specName)
feature - the featurespecName - the specific name
String[] getFeatures(String feature)
feature - the feature
boolean isFeature(SqlFeature feature)
feature - the feature
Integer getFeatureAsInt(SqlFeature feature)
feature - the feature
Object getFeatureAsObject(SqlFeature feature)
feature - the feature
SqlTypeFactory getTypeFactory()
SqlPluginFactory getPluginFactory()
Object getInstance(Class<?> clazz)
clazz - the class to be constructed
Class<?> getAttributeType(Class<?> clazz,
String attrName)
clazz - the class for which the attribute type is requestedattrName - the name of the attribute which type is requested
BeanUtilsPlugin.GetterType getGetterType(Class<?> clazz,
String attrName)
clazz - the class for which the getter is requestedattrName - the name of the attribute which getter is requested
BeanUtilsPlugin.GetterType getGetterType(Object bean,
String attrName)
bean - the bean for which the getter is requestedattrName - the name of the attribute which getter is requested
boolean checkAttribute(Object bean,
String attrName)
bean - the bean for which the getter is checkedattrName - the name of the attribute which getter is checked
Object getAttribute(Object bean,
String attrName)
throws SqlRuntimeException
bean - the bean for which the attribute value is requestedattrName - the name of the attribute which value is requested
SqlRuntimeException - in the case of any error
boolean simpleSetAttribute(Object bean,
String attrName,
Object attrValue,
Class<?>... attrTypes)
bean - the bean for which the attribute value is to be modifiedattrName - the name of the attribute to be modifiedattrValue - the value to which the attribute should be setattrTypes - the possible attribute types
void setAttribute(Object bean,
String attrName,
Object attrValue)
throws SqlRuntimeException
bean - the bean for which the attribute value is to be modifiedattrName - the name of the attribute to be modifiedattrValue - the value to which the attribute should be set
SqlRuntimeException - in the case of any error
boolean checkMethod(Class<?> clazz,
String methodName,
Class<?>... argTypes)
clazz - the class for which the method existence is checkedmethodName - the name of the method to be checkedargTypes - the method parameters types
boolean checkMethod(Object bean,
String methodName,
Object... args)
bean - the bean for which the method existence is checkedmethodName - the name of the method to be checkedargs - the method parameters
Object invokeMethod(Class<?> clazz,
String methodName,
Object... args)
throws SqlRuntimeException
clazz - the class which method is going to be invokedmethodName - the requested method nameargs - the method parameters
SqlRuntimeException - in the case of any error
Object invokeMethod(Object bean,
String methodName,
Object... args)
throws SqlRuntimeException
bean - the bean which method is going to be invokedmethodName - the requested method nameargs - the method parameters
SqlRuntimeException - in the case of any errorObject getEnumToValue(Object bean)
bean - the bean of the enumeration type
Class<?> getEnumToClass(Class<?> clazz)
clazz - the class of the enumeration type
Object getValueToEnum(Class<?> clazz,
Object val)
clazz - the class of the enumeration typeval - the enumeration value
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||