Class ReflectionBasedPropertyMetadata

  • All Implemented Interfaces:
    PropertyMetadata

    public class ReflectionBasedPropertyMetadata
    extends Object
    implements PropertyMetadata
    The property metadata implementation based on java reflection.
    Since:
    2.2.0
    • Constructor Detail

      • ReflectionBasedPropertyMetadata

        public ReflectionBasedPropertyMetadata​(Field fieldReference)
    • Method Detail

      • isId

        public boolean isId()
        Description copied from interface: PropertyMetadata
        If this property represents the Document ID.
        Specified by:
        isId in interface PropertyMetadata
        Returns:
        true if it does, false otherwise.
      • isField

        public boolean isField()
        Description copied from interface: PropertyMetadata
        If this property represents a field in the Document.
        Specified by:
        isField in interface PropertyMetadata
        Returns:
        true if it does, false otherwise.
      • realName

        public String realName()
        Description copied from interface: PropertyMetadata
        The name of the actual property inside the java entity.
        Specified by:
        realName in interface PropertyMetadata
        Returns:
        the real field name.
      • get

        public Object get​(Object source)
        Description copied from interface: PropertyMetadata
        Returns the content of the field property.
        Specified by:
        get in interface PropertyMetadata
        Parameters:
        source - the source object.
        Returns:
        the content of the field.
      • set

        public void set​(Object value,
                        Object source)
        Description copied from interface: PropertyMetadata
        Sets the content of the field property.
        Specified by:
        set in interface PropertyMetadata
        Parameters:
        value - the value to set.
        source - the source object.