All Superinterfaces:
Comparable<OProperty>
All Known Implementing Classes:
OImmutableProperty, OPropertyAbstractDelegate, OPropertyDistributed, OPropertyEmbedded, OPropertyImpl, OPropertyRemote

public interface OProperty extends Comparable<OProperty>
Contains the description of a persistent class property.
Author:
Luca Garulli (l.garulli--(at)--orientdb.com)
  • Method Details

    • getName

      String getName()
    • getFullName

      String getFullName()
      Returns the full name as .
    • setName

      OProperty setName(String iName)
    • set

      void set(OProperty.ATTRIBUTES attribute, Object iValue)
    • getType

      OType getType()
    • getLinkedClass

      OClass getLinkedClass()
      Returns the linked class in lazy mode because while unmarshalling the class could be not loaded yet.
      Returns:
    • setLinkedClass

      OProperty setLinkedClass(OClass oClass)
    • getLinkedType

      OType getLinkedType()
    • setLinkedType

      OProperty setLinkedType(OType type)
    • isNotNull

      boolean isNotNull()
    • setNotNull

      OProperty setNotNull(boolean iNotNull)
    • getCollate

      OCollate getCollate()
    • setCollate

      OProperty setCollate(String iCollateName)
    • setCollate

      OProperty setCollate(OCollate collate)
    • isMandatory

      boolean isMandatory()
    • setMandatory

      OProperty setMandatory(boolean mandatory)
    • isReadonly

      boolean isReadonly()
    • setReadonly

      OProperty setReadonly(boolean iReadonly)
    • getMin

      String getMin()
      Min behavior depends on the Property OType.

      • String : minimum length
      • Number : minimum value
      • date and time : minimum time in millisecond, date must be written in the storage date format
      • binary : minimum size of the byte array
      • List,Set,Collection : minimum size of the collection
      Returns:
      String, can be null
    • setMin

      OProperty setMin(String min)
      Parameters:
      min - can be null
      Returns:
      this property
      See Also:
    • getMax

      String getMax()
      Max behavior depends on the Property OType.

      • String : maximum length
      • Number : maximum value
      • date and time : maximum time in millisecond, date must be written in the storage date format
      • binary : maximum size of the byte array
      • List,Set,Collection : maximum size of the collection
      Returns:
      String, can be null
    • setMax

      OProperty setMax(String max)
      Parameters:
      max - can be null
      Returns:
      this property
      See Also:
    • getDefaultValue

      String getDefaultValue()
      Default value for the property; can be function
      Returns:
      String, can be null
    • setDefaultValue

      OProperty setDefaultValue(String defaultValue)
      Parameters:
      defaultValue - can be null
      Returns:
      this property
      See Also:
    • createIndex

      OIndex createIndex(OClass.INDEX_TYPE iType)
      Creates an index on this property. Indexes speed up queries but slow down insert and update operations. For massive inserts we suggest to remove the index, make the massive insert and recreate it.
      Parameters:
      iType - One of types supported.
      • UNIQUE: Doesn't allow duplicates
      • NOTUNIQUE: Allow duplicates
      • FULLTEXT: Indexes single word for full text search
      Returns:
      see OClass.createIndex(String, OClass.INDEX_TYPE, String...).
    • createIndex

      OIndex createIndex(String iType)
      Creates an index on this property. Indexes speed up queries but slow down insert and update operations. For massive inserts we suggest to remove the index, make the massive insert and recreate it.
      Parameters:
      iType -
      Returns:
      see OClass.createIndex(String, OClass.INDEX_TYPE, String...).
    • createIndex

      OIndex createIndex(String iType, ODocument metadata)
      Creates an index on this property. Indexes speed up queries but slow down insert and update operations. For massive inserts we suggest to remove the index, make the massive insert and recreate it.
      Parameters:
      iType - One of types supported.
      • UNIQUE: Doesn't allow duplicates
      • NOTUNIQUE: Allow duplicates
      • FULLTEXT: Indexes single word for full text search
      metadata - the index metadata
      Returns:
      see OClass.createIndex(String, OClass.INDEX_TYPE, String...).
    • createIndex

      OIndex createIndex(OClass.INDEX_TYPE iType, ODocument metadata)
      Creates an index on this property. Indexes speed up queries but slow down insert and update operations. For massive inserts we suggest to remove the index, make the massive insert and recreate it.
      Parameters:
      iType - One of types supported.
      • UNIQUE: Doesn't allow duplicates
      • NOTUNIQUE: Allow duplicates
      • FULLTEXT: Indexes single word for full text search
      metadata - the index metadata
      Returns:
      see OClass.createIndex(String, OClass.INDEX_TYPE, String...).
    • dropIndexes

      @Deprecated OProperty dropIndexes()
      Deprecated.
      Use SQL command instead.
      Remove the index on property
      Returns:
    • getIndexes

      @Deprecated Set<OIndex> getIndexes()
      Deprecated.
      Returns:
      All indexes in which this property participates as first key item.
    • getIndex

      @Deprecated OIndex getIndex()
      Deprecated.
      Returns:
      The first index in which this property participates as first key item.
    • getAllIndexes

      Collection<OIndex> getAllIndexes()
      Returns:
      All indexes in which this property participates.
    • isIndexed

      @Deprecated boolean isIndexed()
      Deprecated.
      Indicates whether property is contained in indexes as its first key item. If you would like to fetch all indexes or check property presence in other indexes use getAllIndexes() instead.
      Returns:
      true if and only if this property is contained in indexes as its first key item.
    • getRegexp

      String getRegexp()
    • setRegexp

      OProperty setRegexp(String regexp)
    • setType

      OProperty setType(OType iType)
      Change the type. It checks for compatibility between the change of type.
      Parameters:
      iType -
    • getCustom

      String getCustom(String iName)
    • setCustom

      OProperty setCustom(String iName, String iValue)
    • removeCustom

      void removeCustom(String iName)
    • clearCustom

      void clearCustom()
    • getCustomKeys

      Set<String> getCustomKeys()
    • getOwnerClass

      OClass getOwnerClass()
    • get

      Object get(OProperty.ATTRIBUTES iAttribute)
    • getId

      Integer getId()
    • getDescription

      String getDescription()
    • setDescription

      OProperty setDescription(String iDescription)