static final class ExtendedPropertyAccessor.GetterSetter extends java.lang.Object implements org.hibernate.property.access.spi.PropertyAccess, org.hibernate.property.access.spi.Getter, org.hibernate.property.access.spi.Setter
Getter
and
Setter
interfaces. For each property of
an Extendable
item there exist one Getter
and Setter
object.Modifier and Type | Field and Description |
---|---|
private java.lang.Class<?> |
clazz |
private java.lang.String |
property |
private static long |
serialVersionUID |
private org.hibernate.property.access.spi.PropertyAccessStrategy |
strategy |
Constructor and Description |
---|
GetterSetter(org.hibernate.property.access.spi.PropertyAccessStrategy strategy,
java.lang.Class<?> clazz,
java.lang.String property)
Create a new getter or setter.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
get(java.lang.Object target)
Get the value of the extended property.
|
java.lang.Object |
getForInsert(java.lang.Object target,
java.util.Map mergeMap,
SharedSessionContractImplementor session)
Get the value of the extended property.
|
org.hibernate.property.access.spi.Getter |
getGetter() |
java.lang.reflect.Member |
getMember()
Always return null.
|
java.lang.reflect.Method |
getMethod()
Always return null.
|
java.lang.String |
getMethodName()
Always return null.
|
org.hibernate.property.access.spi.PropertyAccessStrategy |
getPropertyAccessStrategy() |
java.lang.Class |
getReturnType()
Always return null.
|
org.hibernate.property.access.spi.Setter |
getSetter() |
void |
set(java.lang.Object target,
java.lang.Object value,
SessionFactoryImplementor factory)
Set the value of the extended property.
|
private static final long serialVersionUID
private final org.hibernate.property.access.spi.PropertyAccessStrategy strategy
private final java.lang.Class<?> clazz
private final java.lang.String property
GetterSetter(org.hibernate.property.access.spi.PropertyAccessStrategy strategy, java.lang.Class<?> clazz, java.lang.String property)
clazz
- The Class
of the itemproperty
- The name of the extended propertypublic org.hibernate.property.access.spi.PropertyAccessStrategy getPropertyAccessStrategy()
getPropertyAccessStrategy
in interface org.hibernate.property.access.spi.PropertyAccess
public org.hibernate.property.access.spi.Getter getGetter()
getGetter
in interface org.hibernate.property.access.spi.PropertyAccess
public org.hibernate.property.access.spi.Setter getSetter()
getSetter
in interface org.hibernate.property.access.spi.PropertyAccess
public java.lang.Object get(java.lang.Object target)
get
in interface org.hibernate.property.access.spi.Getter
target
- The ExtendableData
that holds the valuejava.lang.ClassCastException
- If the target is not
ExtendableData
public java.lang.Object getForInsert(java.lang.Object target, java.util.Map mergeMap, SharedSessionContractImplementor session)
getForInsert
in interface org.hibernate.property.access.spi.Getter
target
- The ExtendableData
that holds the valuemergeMap
- A map of merged persistent instances to detached instances, whatever
that means...session
- The session from which this request originated.java.lang.ClassCastException
- If the target is not
ExtendableData
public void set(java.lang.Object target, java.lang.Object value, SessionFactoryImplementor factory)
set
in interface org.hibernate.property.access.spi.Setter
target
- The Extendable
that holds the valuevalue
- The new valuefactory
- The session factory from which this request originated.java.lang.ClassCastException
- If the target is not
ExtendableData
public java.lang.reflect.Member getMember()
getMember
in interface org.hibernate.property.access.spi.Getter
public java.lang.Class getReturnType()
getReturnType
in interface org.hibernate.property.access.spi.Getter
public java.lang.String getMethodName()
getMethodName
in interface org.hibernate.property.access.spi.Getter
getMethodName
in interface org.hibernate.property.access.spi.Setter
public java.lang.reflect.Method getMethod()
getMethod
in interface org.hibernate.property.access.spi.Getter
getMethod
in interface org.hibernate.property.access.spi.Setter