Class StoredFieldImpl

  • All Implemented Interfaces:
    StoredField

    public class StoredFieldImpl
    extends java.lang.Object
    implements StoredField
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void createIndex()
      creates an index on this field at runtime.
      void dropIndex()
      drops an existing index on this field at runtime.
      boolean equals​(java.lang.Object obj)  
      FieldMetadata fieldMetadata()  
      java.lang.Object get​(java.lang.Object onObject)
      returns the field value on the passed object.
      java.lang.String getName()
      returns the name of the field.
      ReflectClass getStoredType()
      returns the Class (Java) / Type (.NET) of the field.
      int hashCode()  
      boolean hasIndex()
      Returns whether this field has an index or not.
      boolean isArray()
      returns true if the field is an array.
      void rename​(java.lang.String name)
      modifies the name of this stored field.
      void traverseValues​(Visitor4 visitor)
      specialized highspeed API to collect all values of a field for all instances of a class, if the field is indexed.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • createIndex

        public void createIndex()
        Description copied from interface: StoredField
        creates an index on this field at runtime.
        Specified by:
        createIndex in interface StoredField
      • dropIndex

        public void dropIndex()
        Description copied from interface: StoredField
        drops an existing index on this field at runtime.
        Specified by:
        dropIndex in interface StoredField
      • get

        public java.lang.Object get​(java.lang.Object onObject)
        Description copied from interface: StoredField
        returns the field value on the passed object.

        This method will also work, if the field is not present in the current version of the class.

        It is recommended to use this method for refactoring purposes, if fields are removed and the field values need to be copied to other fields.
        Specified by:
        get in interface StoredField
      • getName

        public java.lang.String getName()
        Description copied from interface: StoredField
        returns the name of the field.
        Specified by:
        getName in interface StoredField
      • hasIndex

        public boolean hasIndex()
        Description copied from interface: StoredField
        Returns whether this field has an index or not.
        Specified by:
        hasIndex in interface StoredField
        Returns:
        true if this field has an index.
      • isArray

        public boolean isArray()
        Description copied from interface: StoredField
        returns true if the field is an array.
        Specified by:
        isArray in interface StoredField
      • rename

        public void rename​(java.lang.String name)
        Description copied from interface: StoredField
        modifies the name of this stored field.

        After renaming one or multiple fields the ObjectContainer has to be closed and reopened to allow internal caches to be refreshed.

        Specified by:
        rename in interface StoredField
        Parameters:
        name - the new name
      • traverseValues

        public void traverseValues​(Visitor4 visitor)
        Description copied from interface: StoredField
        specialized highspeed API to collect all values of a field for all instances of a class, if the field is indexed.

        The field values will be taken directly from the index without the detour through class indexes or object instantiation.

        If this method is used to get the values of a first class object index, deactivated objects will be passed to the visitor.
        Specified by:
        traverseValues in interface StoredField
        Parameters:
        visitor - the visitor to be called with each index value.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object