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 int
compareTo(IndexDescriptor other)
boolean
equals(Object o)
String
getCollectionName()
Gets the collection name.Fields
getFields()
Gets the target fields for the index.String
getIndexType()
Specifies the type of the index.int
hashCode()
boolean
isCompoundIndex()
Indicates if this descriptor is for a compound index.void
setCollectionName(String collectionName)
Gets the collection name.void
setFields(Fields fields)
Gets the target fields for the index.void
setIndexType(String indexType)
Specifies the type of the index.String
toString()
-
-
-
Method Detail
-
compareTo
public int compareTo(IndexDescriptor other)
- Specified by:
compareTo
in 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.
-
-