Interface Getter
-
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
ChainedPropertyAccessImpl,EnhancedGetterFieldImpl,GetterFieldImpl,GetterMethodImpl,PropertyAccessCompositeUserTypeImpl,PropertyAccessMapImpl.GetterImpl
public interface Getter extends Serializable
The contract for getting the value of a persistent attribute from its container/owner.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @Nullable Objectget(Object owner)Get the property value from the given owner instance.@Nullable ObjectgetForInsert(Object owner, Map mergeMap, SharedSessionContractImplementor session)Get the property value from the given owner instance.@Nullable MembergetMember()Retrieve the member to which this property maps.@Nullable MethodgetMethod()Retrieve the getter-method.@Nullable StringgetMethodName()Retrieve the getter-method name.TypegetReturnType()Retrieve the declared Java typeClass<?>getReturnTypeClass()Retrieve the declared Java type class
-
-
-
Method Detail
-
get
@Nullable Object get(Object owner)
Get the property value from the given owner instance.- Parameters:
owner- The instance containing the property value to be retrieved.- Returns:
- The extracted value.
-
getForInsert
@Nullable Object getForInsert(Object owner, Map mergeMap, SharedSessionContractImplementor session)
Get the property value from the given owner instance.- Parameters:
owner- The instance containing the value to be retrieved.mergeMap- a map of merged persistent instances to detached instancessession- The session from which this request originated.- Returns:
- The extracted value.
-
getReturnTypeClass
Class<?> getReturnTypeClass()
Retrieve the declared Java type class- Returns:
- The declared java type class.
-
getReturnType
Type getReturnType()
Retrieve the declared Java type- Returns:
- The declared java type.
-
getMember
@Nullable Member getMember()
Retrieve the member to which this property maps. This might be the field or it might be the getter method.Optional operation (may return
null)- Returns:
- The mapped member, or
null.
-
getMethodName
@Nullable String getMethodName()
Retrieve the getter-method name.Optional operation (may return
null)- Returns:
- The name of the getter method, or
null.
-
getMethod
@Nullable Method getMethod()
Retrieve the getter-method.Optional operation (may return
null)- Returns:
- The getter method, or
null.
-
-