2.17.2: 2011-06-17

net.sf.basedb.core
Class ExtendedPropertyAccessor.GetterSetter

java.lang.Object
  extended by net.sf.basedb.core.ExtendedPropertyAccessor.GetterSetter
All Implemented Interfaces:
Serializable, org.hibernate.property.Getter, org.hibernate.property.Setter
Enclosing class:
ExtendedPropertyAccessor

static final class ExtendedPropertyAccessor.GetterSetter
extends Object
implements org.hibernate.property.Getter, org.hibernate.property.Setter

This class implements the Hibernate Getter and Setter interfaces. For each property of an Extendable item there exist one Getter and Setter object.


Field Summary
private  Class clazz
           
private  String property
           
private static long serialVersionUID
           
 
Constructor Summary
private ExtendedPropertyAccessor.GetterSetter(Class clazz, String property)
          Create a new getter or setter.
 
Method Summary
 Object get(Object target)
          Get the value of the extended property.
 Object getForInsert(Object target, Map mergeMap, org.hibernate.engine.SessionImplementor session)
          Get the value of the extended property.
 Member getMember()
          Always return null.
 Method getMethod()
          Always return null.
 String getMethodName()
          Always return null.
 Class getReturnType()
          Always return null.
 void set(Object target, Object value, org.hibernate.engine.SessionFactoryImplementor factory)
          Set the value of the extended property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

clazz

private final Class clazz

property

private final String property
Constructor Detail

ExtendedPropertyAccessor.GetterSetter

private ExtendedPropertyAccessor.GetterSetter(Class clazz,
                                              String property)
Create a new getter or setter.

Parameters:
clazz - The Class of the item
property - The name of the extended property
Method Detail

get

public Object get(Object target)
Get the value of the extended property.

Specified by:
get in interface org.hibernate.property.Getter
Parameters:
target - The ExtendableData that holds the value
Throws:
ClassCastException - If the target is not ExtendableData

getForInsert

public Object getForInsert(Object target,
                           Map mergeMap,
                           org.hibernate.engine.SessionImplementor session)
Get the value of the extended property.

Specified by:
getForInsert in interface org.hibernate.property.Getter
Parameters:
target - The ExtendableData that holds the value
mergeMap - 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 not ExtendableData

set

public void set(Object target,
                Object value,
                org.hibernate.engine.SessionFactoryImplementor factory)
Set the value of the extended property.

Specified by:
set in interface org.hibernate.property.Setter
Parameters:
target - The Extendable that holds the value
value - The new value
factory - The session factory from which this request originated.
Throws:
ClassCastException - If the target is not ExtendableData

getMember

public Member getMember()
Always return null.

Specified by:
getMember in interface org.hibernate.property.Getter

getReturnType

public Class getReturnType()
Always return null.

Specified by:
getReturnType in interface org.hibernate.property.Getter

getMethodName

public String getMethodName()
Always return null.

Specified by:
getMethodName in interface org.hibernate.property.Getter
Specified by:
getMethodName in interface org.hibernate.property.Setter

getMethod

public Method getMethod()
Always return null.

Specified by:
getMethod in interface org.hibernate.property.Getter
Specified by:
getMethod in interface org.hibernate.property.Setter

2.17.2: 2011-06-17