Package org.dizitart.no2.index
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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description IndexDescriptor(String indexType, Fields fields, String collectionName)Instantiates a new Index.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(IndexDescriptor other)booleanequals(Object o)StringgetCollectionName()Gets the collection name.FieldsgetFields()Gets the target fields for the index.StringgetIndexType()Specifies the type of the index.inthashCode()booleanisCompoundIndex()Indicates if this descriptor is for a compound index.voidsetCollectionName(String collectionName)Gets the collection name.voidsetFields(Fields fields)Gets the target fields for the index.voidsetIndexType(String indexType)Specifies the type of the index.StringtoString()
-
-
-
Method Detail
-
compareTo
public int compareTo(IndexDescriptor other)
- Specified by:
compareToin interfaceComparable<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:
IndexType
-
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
-
getIndexType
public String getIndexType()
Specifies the type of the index.- Returns:
- the type of the index.
- See Also:
IndexType
-
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.
-
-