Package net.sf.basedb.core
Class ExtendedPropertyAccessor.GetterSetter
- java.lang.Object
-
- net.sf.basedb.core.ExtendedPropertyAccessor.GetterSetter
-
- All Implemented Interfaces:
Serializable
,Getter
,PropertyAccess
,Setter
- Enclosing class:
- ExtendedPropertyAccessor
static final class ExtendedPropertyAccessor.GetterSetter extends Object implements PropertyAccess, Getter, Setter
This class implements the HibernateGetter
andSetter
interfaces. For each property of anExtendable
item there exist oneGetter
andSetter
object.
-
-
Field Summary
Fields Modifier and Type Field Description private Class<?>
clazz
private String
property
private static long
serialVersionUID
private PropertyAccessStrategy
strategy
-
Constructor Summary
Constructors Constructor Description GetterSetter(PropertyAccessStrategy strategy, Class<?> clazz, String property)
Create a new getter or setter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
get(Object target)
Get the value of the extended property.Object
getForInsert(Object target, Map mergeMap, SharedSessionContractImplementor session)
Get the value of the extended property.Getter
getGetter()
Member
getMember()
Always return null.Method
getMethod()
Always return null.String
getMethodName()
Always return null.PropertyAccessStrategy
getPropertyAccessStrategy()
Class
getReturnType()
Always return null.Setter
getSetter()
void
set(Object target, Object value, SessionFactoryImplementor factory)
Set the value of the extended property.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
strategy
private final PropertyAccessStrategy strategy
-
clazz
private final Class<?> clazz
-
property
private final String property
-
-
Constructor Detail
-
GetterSetter
GetterSetter(PropertyAccessStrategy strategy, Class<?> clazz, String property)
Create a new getter or setter.- Parameters:
clazz
- TheClass
of the itemproperty
- The name of the extended property
-
-
Method Detail
-
getPropertyAccessStrategy
public PropertyAccessStrategy getPropertyAccessStrategy()
- Specified by:
getPropertyAccessStrategy
in interfacePropertyAccess
-
getGetter
public Getter getGetter()
- Specified by:
getGetter
in interfacePropertyAccess
-
getSetter
public Setter getSetter()
- Specified by:
getSetter
in interfacePropertyAccess
-
get
public Object get(Object target)
Get the value of the extended property.- Specified by:
get
in interfaceGetter
- Parameters:
target
- TheExtendableData
that holds the value- Throws:
ClassCastException
- If the target is notExtendableData
-
getForInsert
public Object getForInsert(Object target, Map mergeMap, SharedSessionContractImplementor session)
Get the value of the extended property.- Specified by:
getForInsert
in interfaceGetter
- Parameters:
target
- TheExtendableData
that holds the valuemergeMap
- A map of merged persistent instances to detached instances, whatever that means...session
- The session from which this request originated.- Throws:
ClassCastException
- If the target is notExtendableData
-
set
public void set(Object target, Object value, SessionFactoryImplementor factory)
Set the value of the extended property.- Specified by:
set
in interfaceSetter
- Parameters:
target
- TheExtendable
that holds the valuevalue
- The new valuefactory
- The session factory from which this request originated.- Throws:
ClassCastException
- If the target is notExtendableData
-
getReturnType
public Class getReturnType()
Always return null.- Specified by:
getReturnType
in interfaceGetter
-
getMethodName
public String getMethodName()
Always return null.- Specified by:
getMethodName
in interfaceGetter
- Specified by:
getMethodName
in interfaceSetter
-
-