public interface SqlRuntimeContext
For more info please see the Tutorials.
| Modifier and Type | Method and Description |
|---|---|
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<?>[] |
getAttributeParameterizedTypes(Class<?> clazz,
String attrName)
Returns the Java parameterized type info for the attribute, if there is one.
|
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.
|
String getFeature(String name)
name - name of the featureString getFeature(SqlFeature feature)
feature - the featureString getFeature(SqlFeature feature, String specName)
feature - the featurespecName - the specific nameString[] getFeatures(String feature)
feature - the featureboolean isFeature(SqlFeature feature)
feature - the featureInteger getFeatureAsInt(SqlFeature feature)
feature - the featureObject getFeatureAsObject(SqlFeature feature)
feature - the featureSqlTypeFactory getTypeFactory()
SqlPluginFactory getPluginFactory()
Object getInstance(Class<?> clazz)
clazz - the class to be constructedClass<?> getAttributeType(Class<?> clazz, String attrName)
clazz - the class for which the attribute type is requestedattrName - the name of the attribute which type is requestedClass<?>[] getAttributeParameterizedTypes(Class<?> clazz, String attrName)
clazz - the class for which the attribute type is requestedattrName - the name of the attribute which type is requestedBeanUtilsPlugin.GetterType getGetterType(Class<?> clazz, String attrName)
clazz - the class for which the getter is requestedattrName - the name of the attribute which getter is requestedBeanUtilsPlugin.GetterType getGetterType(Object bean, String attrName)
bean - the bean for which the getter is requestedattrName - the name of the attribute which getter is requestedboolean checkAttribute(Object bean, String attrName)
bean - the bean for which the getter is checkedattrName - the name of the attribute which getter is checkedObject 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 requestedSqlRuntimeException - in the case of any errorboolean 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 typesvoid 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 setSqlRuntimeException - in the case of any errorboolean 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 typesboolean 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 parametersObject 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 parametersSqlRuntimeException - in the case of any errorObject 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 parametersSqlRuntimeException - in the case of any errorObject getEnumToValue(Object bean)
bean - the bean of the enumeration typeClass<?> getEnumToClass(Class<?> clazz)
clazz - the class of the enumeration typeCopyright © 2018. All rights reserved.