Class IndexDescriptor

java.lang.Object
org.dizitart.no2.index.IndexDescriptor
All Implemented Interfaces:
Serializable, Comparable<IndexDescriptor>

public class IndexDescriptor extends Object implements Comparable<IndexDescriptor>, Serializable
A class representing the descriptor of a Nitrite index.
Since:
1.0
Author:
Anindya Chatterjee
See Also:
  • Constructor Details

    • IndexDescriptor

      public IndexDescriptor(String indexType, Fields fields, String collectionName)
      Instantiates a new Index.
      Parameters:
      indexType - the index type
      fields - the value
      collectionName - the collection name
  • Method Details

    • compareTo

      public int compareTo(IndexDescriptor other)
      Specified by:
      compareTo in interface Comparable<IndexDescriptor>
    • isCompoundIndex

      public boolean isCompoundIndex()
      Indicates if this descriptor is for a compound index.
      Returns:
      the boolean
    • setIndexType

      public void setIndexType(String indexType)
      Specifies the type of the index.
      Parameters:
      indexType - index type
      See Also:
    • setFields

      public void setFields(Fields fields)
      Gets the target fields for the index.
    • setCollectionName

      public void setCollectionName(String collectionName)
      Gets the collection name.
      Parameters:
      collectionName - collection name
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getIndexType

      public String getIndexType()
      Specifies the type of the index.
      Returns:
      the type of the index.
      See Also:
    • getFields

      public Fields getFields()
      Gets the target fields for the index.
      Returns:
      the target fields.
    • getCollectionName

      public String getCollectionName()
      Gets the collection name.
      Returns:
      the collection name.