Class FieldInfo

java.lang.Object
org.neo4j.ogm.metadata.FieldInfo

public class FieldInfo extends Object
Author:
Vince Bickers, Luanne Misquitta, Mark Angrish, Michael J. Simons, Nicolas Labrot
  • Method Details

    • getName

      public String getName()
      Returns:
      The name of the underlying field
    • property

      public String property()
    • relationship

      public String relationship()
    • relationshipTypeAnnotation

      public String relationshipTypeAnnotation()
    • getAnnotations

      public ObjectAnnotations getAnnotations()
    • persistableAsProperty

      public boolean persistableAsProperty()
    • getPropertyConverter

      public AttributeConverter getPropertyConverter()
    • setPropertyConverter

      public void setPropertyConverter(AttributeConverter<?,?> propertyConverter)
    • hasPropertyConverter

      public boolean hasPropertyConverter()
    • getCompositeConverter

      public CompositeAttributeConverter getCompositeConverter()
    • setCompositeConverter

      public void setCompositeConverter(CompositeAttributeConverter<?> converter)
    • hasCompositeConverter

      public boolean hasCompositeConverter()
    • relationshipDirectionOrDefault

      public Relationship.Direction relationshipDirectionOrDefault(Relationship.Direction defaultDirection)
    • isIterable

      public boolean isIterable()
    • isTypeOf

      public boolean isTypeOf(Class<?> type)
    • isParameterisedTypeOf

      public boolean isParameterisedTypeOf(Class<?> type)
    • isArrayOf

      public boolean isArrayOf(Class<?> type)
    • getCollectionClassname

      public String getCollectionClassname()
      Get the collection class name for the field
      Returns:
      collection class name
    • isScalar

      public boolean isScalar()
    • isLabelField

      public boolean isLabelField()
    • isArray

      public boolean isArray()
    • hasAnnotation

      public boolean hasAnnotation(String annotationName)
    • hasAnnotation

      public boolean hasAnnotation(Class<?> annotationNameClass)
    • getTypeDescriptor

      public String getTypeDescriptor()
      Get the type descriptor
      Returns:
      the descriptor if the field is scalar or an array, otherwise the type parameter descriptor.
    • convertedType

      public Class<?> convertedType()
      Returns:
      The type that is stored in the graph.
    • isReadOnly

      public boolean isReadOnly()
    • write

      public static void write(Field field, Object instance, Object value)
    • read

      public static Object read(Field field, Object instance)
    • write

      public void write(Object instance, Object value)
    • convert

      public Object convert(Object valueFromDriver)
    • writeDirect

      public void writeDirect(Object instance, Object value)
      Write the value of the field directly to the instance, bypassing the converters
      Parameters:
      instance - class instance
      value - field value to be written
    • type

      public Class<?> type()
      Returns:
      The field type (may be List, while the mapped type is retrievable from getTypeDescriptor() ()}).
    • forScalar

      public boolean forScalar()
    • read

      public Object read(Object instance)
    • readProperty

      public Object readProperty(Object instance)
    • readComposite

      public Map<String,?> readComposite(Object instance)
    • relationshipType

      public String relationshipType()
    • propertyName

      public String propertyName()
    • isComposite

      public boolean isComposite()
    • relationshipDirection

      public Relationship.Direction relationshipDirection()
    • getField

      public Field getField()
    • containingClassInfo

      public ClassInfo containingClassInfo()
      ClassInfo for the class this field is defined in
      Returns:
      ClassInfo of containing
    • isVersionField

      public boolean isVersionField()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object