Package org.sqlproc.engine.plugin
Class CommonsBeanUtilsPlugin
- java.lang.Object
-
- org.sqlproc.engine.plugin.CommonsBeanUtilsPlugin
-
- All Implemented Interfaces:
BeanUtilsPlugin
public class CommonsBeanUtilsPlugin extends Object implements BeanUtilsPlugin
Bean utilities implementation based on Apache commons library.- Author:
- Vladimir Hudec
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.sqlproc.engine.plugin.BeanUtilsPlugin
BeanUtilsPlugin.GetterType
-
-
Field Summary
Fields Modifier and Type Field Description (package private) org.slf4j.Logger
logger
The internal slf4j logger.
-
Constructor Summary
Constructors Constructor Description CommonsBeanUtilsPlugin()
-
Method Summary
-
-
-
Method Detail
-
getInstance
public Object getInstance(SqlRuntimeContext runtimeCtx, Class<?> clazz)
- Specified by:
getInstance
in interfaceBeanUtilsPlugin
-
getAttributeDescriptor
protected PropertyDescriptor getAttributeDescriptor(Class<?> clazz, String attrName)
-
getAttributeType
public Class<?> getAttributeType(SqlRuntimeContext runtimeCtx, Class<?> clazz, String attrName)
- Specified by:
getAttributeType
in interfaceBeanUtilsPlugin
-
getAttributeParameterizedTypes
public Class<?>[] getAttributeParameterizedTypes(SqlRuntimeContext runtimeCtx, Class<?> clazz, String attrName)
- Specified by:
getAttributeParameterizedTypes
in interfaceBeanUtilsPlugin
-
getGetter
protected Method getGetter(SqlRuntimeContext runtimeCtx, Class<?> clazz, String attrName, boolean onlyCheck)
-
getGetterType
public BeanUtilsPlugin.GetterType getGetterType(SqlRuntimeContext runtimeCtx, Class<?> clazz, String attrName)
- Specified by:
getGetterType
in interfaceBeanUtilsPlugin
-
getGetterType
public BeanUtilsPlugin.GetterType getGetterType(SqlRuntimeContext runtimeCtx, Object bean, String attrName)
- Specified by:
getGetterType
in interfaceBeanUtilsPlugin
-
checkAttribute
public boolean checkAttribute(SqlRuntimeContext runtimeCtx, Object bean, String attrName)
- Specified by:
checkAttribute
in interfaceBeanUtilsPlugin
-
getAttribute
public Object getAttribute(SqlRuntimeContext runtimeCtx, Object bean, String attrName) throws SqlRuntimeException
- Specified by:
getAttribute
in interfaceBeanUtilsPlugin
- Throws:
SqlRuntimeException
-
getSetter
protected Method getSetter(SqlRuntimeContext runtimeCtx, Class<?> clazz, String attrName, boolean onlyCheck, Class<?>... attrTypes)
-
getSetter
protected Method getSetter(SqlRuntimeContext runtimeCtx, Object bean, String attrName, Class<?>... attrTypes)
-
simpleSetAttribute
public boolean simpleSetAttribute(SqlRuntimeContext runtimeCtx, Object bean, String attrName, Object attrValue, Class<?>... attrTypes)
- Specified by:
simpleSetAttribute
in interfaceBeanUtilsPlugin
-
setAttribute
public void setAttribute(SqlRuntimeContext runtimeCtx, Object bean, String attrName, Object attrValue) throws SqlRuntimeException
- Specified by:
setAttribute
in interfaceBeanUtilsPlugin
- Throws:
SqlRuntimeException
-
invokeMethod
protected Object invokeMethod(SqlRuntimeContext runtimeCtx, Object bean, Method method, Object... args) throws SqlRuntimeException
- Throws:
SqlRuntimeException
-
checkMethod
public boolean checkMethod(SqlRuntimeContext runtimeCtx, Class<?> clazz, String methodName, Class<?>... argTypes)
- Specified by:
checkMethod
in interfaceBeanUtilsPlugin
-
checkMethod
public boolean checkMethod(SqlRuntimeContext runtimeCtx, Object bean, String methodName, Object... args)
- Specified by:
checkMethod
in interfaceBeanUtilsPlugin
-
invokeMethod
public Object invokeMethod(SqlRuntimeContext runtimeCtx, Class<?> clazz, String methodName, Object... args) throws SqlRuntimeException
- Specified by:
invokeMethod
in interfaceBeanUtilsPlugin
- Throws:
SqlRuntimeException
-
invokeMethod
public Object invokeMethod(SqlRuntimeContext runtimeCtx, Object bean, String methodName, Object... args) throws SqlRuntimeException
- Specified by:
invokeMethod
in interfaceBeanUtilsPlugin
- Throws:
SqlRuntimeException
-
invokeMethod
protected Object invokeMethod(SqlRuntimeContext runtimeCtx, Class<?> clazz, Object bean, String methodName, Object... args) throws SqlRuntimeException
- Throws:
SqlRuntimeException
-
getEnumToValue
public Object getEnumToValue(SqlRuntimeContext runtimeCtx, Object bean)
- Specified by:
getEnumToValue
in interfaceBeanUtilsPlugin
-
getEnumToClass
public Class<?> getEnumToClass(SqlRuntimeContext runtimeCtx, Class<?> clazz)
- Specified by:
getEnumToClass
in interfaceBeanUtilsPlugin
-
getValueToEnum
public Object getValueToEnum(SqlRuntimeContext runtimeCtx, Class<?> clazz, Object val)
- Specified by:
getValueToEnum
in interfaceBeanUtilsPlugin
-
-