Class GetterFieldImpl

  • All Implemented Interfaces:
    java.io.Serializable, Getter

    public class GetterFieldImpl
    extends java.lang.Object
    implements Getter
    Field-based implementation of Getter
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      GetterFieldImpl​(java.lang.Class containerClass, java.lang.String propertyName, java.lang.reflect.Field field)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object get​(java.lang.Object owner)
      Get the property value from the given owner instance.
      java.lang.Object getForInsert​(java.lang.Object owner, java.util.Map mergeMap, SharedSessionContractImplementor session)
      Get the property value from the given owner instance.
      java.lang.reflect.Member getMember()
      Retrieve the member to which this property maps.
      java.lang.reflect.Method getMethod()
      Retrieve the getter-method.
      java.lang.String getMethodName()
      Retrieve the getter-method name.
      java.lang.Class getReturnType()
      Retrieve the declared Java type
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GetterFieldImpl

        public GetterFieldImpl​(java.lang.Class containerClass,
                               java.lang.String propertyName,
                               java.lang.reflect.Field field)
    • Method Detail

      • get

        public java.lang.Object get​(java.lang.Object owner)
        Description copied from interface: Getter
        Get the property value from the given owner instance.
        Specified by:
        get in interface Getter
        Parameters:
        owner - The instance containing the property value to be retrieved.
        Returns:
        The extracted value.
      • getForInsert

        public java.lang.Object getForInsert​(java.lang.Object owner,
                                             java.util.Map mergeMap,
                                             SharedSessionContractImplementor session)
        Description copied from interface: Getter
        Get the property value from the given owner instance.
        Specified by:
        getForInsert in interface Getter
        Parameters:
        owner - The instance containing the value to be retrieved.
        mergeMap - a map of merged persistent instances to detached instances
        session - The session from which this request originated.
        Returns:
        The extracted value.
      • getReturnType

        public java.lang.Class getReturnType()
        Description copied from interface: Getter
        Retrieve the declared Java type
        Specified by:
        getReturnType in interface Getter
        Returns:
        The declared java type.
      • getMember

        public java.lang.reflect.Member getMember()
        Description copied from interface: Getter
        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)

        Specified by:
        getMember in interface Getter
        Returns:
        The mapped member, or null.
      • getMethodName

        public java.lang.String getMethodName()
        Description copied from interface: Getter
        Retrieve the getter-method name.

        Optional operation (may return null)

        Specified by:
        getMethodName in interface Getter
        Returns:
        The name of the getter method, or null.
      • getMethod

        public java.lang.reflect.Method getMethod()
        Description copied from interface: Getter
        Retrieve the getter-method.

        Optional operation (may return null)

        Specified by:
        getMethod in interface Getter
        Returns:
        The getter method, or null.