Package net.sf.basedb.core
Class ExtendedPropertyAccessor.GetterSetter
- java.lang.Object
-
- net.sf.basedb.core.ExtendedPropertyAccessor.GetterSetter
-
- All Implemented Interfaces:
Serializable
,org.hibernate.property.access.spi.Getter
,org.hibernate.property.access.spi.PropertyAccess
,org.hibernate.property.access.spi.Setter
- Enclosing class:
- ExtendedPropertyAccessor
static final class ExtendedPropertyAccessor.GetterSetter extends Object implements org.hibernate.property.access.spi.PropertyAccess, org.hibernate.property.access.spi.Getter, org.hibernate.property.access.spi.Setter
This class implements the HibernateGetter
andSetter
interfaces. For each property of anExtendable
item there exist oneGetter
andSetter
object.
-
-
Constructor Summary
Constructors Constructor Description GetterSetter(org.hibernate.property.access.spi.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, org.hibernate.engine.spi.SharedSessionContractImplementor session)
Get the value of the extended property.org.hibernate.property.access.spi.Getter
getGetter()
Member
getMember()
Always return null.Method
getMethod()
Always return null.String
getMethodName()
Always return null.org.hibernate.property.access.spi.PropertyAccessStrategy
getPropertyAccessStrategy()
Class
getReturnType()
Always return null.org.hibernate.property.access.spi.Setter
getSetter()
void
set(Object target, Object value, org.hibernate.engine.spi.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 org.hibernate.property.access.spi.PropertyAccessStrategy strategy
-
clazz
private final Class<?> clazz
-
property
private final String property
-
-
Method Detail
-
getPropertyAccessStrategy
public org.hibernate.property.access.spi.PropertyAccessStrategy getPropertyAccessStrategy()
- Specified by:
getPropertyAccessStrategy
in interfaceorg.hibernate.property.access.spi.PropertyAccess
-
getGetter
public org.hibernate.property.access.spi.Getter getGetter()
- Specified by:
getGetter
in interfaceorg.hibernate.property.access.spi.PropertyAccess
-
getSetter
public org.hibernate.property.access.spi.Setter getSetter()
- Specified by:
getSetter
in interfaceorg.hibernate.property.access.spi.PropertyAccess
-
get
public Object get(Object target)
Get the value of the extended property.- Specified by:
get
in interfaceorg.hibernate.property.access.spi.Getter
- Parameters:
target
- TheExtendableData
that holds the value- Throws:
ClassCastException
- If the target is notExtendableData
-
getForInsert
public Object getForInsert(Object target, Map mergeMap, org.hibernate.engine.spi.SharedSessionContractImplementor session)
Get the value of the extended property.- Specified by:
getForInsert
in interfaceorg.hibernate.property.access.spi.Getter
- 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, org.hibernate.engine.spi.SessionFactoryImplementor factory)
Set the value of the extended property.- Specified by:
set
in interfaceorg.hibernate.property.access.spi.Setter
- 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
-
getMember
public Member getMember()
Always return null.- Specified by:
getMember
in interfaceorg.hibernate.property.access.spi.Getter
-
getReturnType
public Class getReturnType()
Always return null.- Specified by:
getReturnType
in interfaceorg.hibernate.property.access.spi.Getter
-
getMethodName
public String getMethodName()
Always return null.- Specified by:
getMethodName
in interfaceorg.hibernate.property.access.spi.Getter
- Specified by:
getMethodName
in interfaceorg.hibernate.property.access.spi.Setter
-
getMethod
public Method getMethod()
Always return null.- Specified by:
getMethod
in interfaceorg.hibernate.property.access.spi.Getter
- Specified by:
getMethod
in interfaceorg.hibernate.property.access.spi.Setter
-
-