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.LoggerloggerThe internal slf4j logger.
-
Constructor Summary
Constructors Constructor Description CommonsBeanUtilsPlugin()
-
Method Summary
-
-
-
Method Detail
-
getInstance
public Object getInstance(SqlRuntimeContext runtimeCtx, Class<?> clazz)
- Specified by:
getInstancein interfaceBeanUtilsPlugin
-
getAttributeDescriptor
protected PropertyDescriptor getAttributeDescriptor(Class<?> clazz, String attrName)
-
getAttributeType
public Class<?> getAttributeType(SqlRuntimeContext runtimeCtx, Class<?> clazz, String attrName)
- Specified by:
getAttributeTypein interfaceBeanUtilsPlugin
-
getAttributeParameterizedTypes
public Class<?>[] getAttributeParameterizedTypes(SqlRuntimeContext runtimeCtx, Class<?> clazz, String attrName)
- Specified by:
getAttributeParameterizedTypesin 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:
getGetterTypein interfaceBeanUtilsPlugin
-
getGetterType
public BeanUtilsPlugin.GetterType getGetterType(SqlRuntimeContext runtimeCtx, Object bean, String attrName)
- Specified by:
getGetterTypein interfaceBeanUtilsPlugin
-
checkAttribute
public boolean checkAttribute(SqlRuntimeContext runtimeCtx, Object bean, String attrName)
- Specified by:
checkAttributein interfaceBeanUtilsPlugin
-
getAttribute
public Object getAttribute(SqlRuntimeContext runtimeCtx, Object bean, String attrName) throws SqlRuntimeException
- Specified by:
getAttributein 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:
simpleSetAttributein interfaceBeanUtilsPlugin
-
setAttribute
public void setAttribute(SqlRuntimeContext runtimeCtx, Object bean, String attrName, Object attrValue) throws SqlRuntimeException
- Specified by:
setAttributein 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:
checkMethodin interfaceBeanUtilsPlugin
-
checkMethod
public boolean checkMethod(SqlRuntimeContext runtimeCtx, Object bean, String methodName, Object... args)
- Specified by:
checkMethodin interfaceBeanUtilsPlugin
-
invokeMethod
public Object invokeMethod(SqlRuntimeContext runtimeCtx, Class<?> clazz, String methodName, Object... args) throws SqlRuntimeException
- Specified by:
invokeMethodin interfaceBeanUtilsPlugin- Throws:
SqlRuntimeException
-
invokeMethod
public Object invokeMethod(SqlRuntimeContext runtimeCtx, Object bean, String methodName, Object... args) throws SqlRuntimeException
- Specified by:
invokeMethodin 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:
getEnumToValuein interfaceBeanUtilsPlugin
-
getEnumToClass
public Class<?> getEnumToClass(SqlRuntimeContext runtimeCtx, Class<?> clazz)
- Specified by:
getEnumToClassin interfaceBeanUtilsPlugin
-
getValueToEnum
public Object getValueToEnum(SqlRuntimeContext runtimeCtx, Class<?> clazz, Object val)
- Specified by:
getValueToEnumin interfaceBeanUtilsPlugin
-
-