public class QueryIndex extends Object implements Serializable
sorted index
the list can be provided as following (id, name asc, age desc).| Constructor and Description |
|---|
QueryIndex()
Creates an empty index.
|
QueryIndex(Collection<String> fields,
QueryIndexType type)
Creates index for a collection of fields.
|
QueryIndex(LinkedHashMap<String,Boolean> fields,
QueryIndexType type)
Creates index for a collection of fields.
|
QueryIndex(String field)
Creates single-field sorted ascending index.
|
QueryIndex(String field,
boolean asc)
Creates single-field sorted index.
|
QueryIndex(String field,
boolean asc,
String name)
Creates single-field sorted index.
|
QueryIndex(String field,
QueryIndexType type)
Creates index for one field.
|
QueryIndex(String field,
QueryIndexType type,
boolean asc)
Creates index for one field.
|
QueryIndex(String field,
QueryIndexType type,
boolean asc,
String name)
Creates index for one field.
|
| Modifier and Type | Method and Description |
|---|---|
Collection<String> |
getFieldNames() |
LinkedHashMap<String,Boolean> |
getFields()
Gets fields included in the index.
|
QueryIndexType |
getIndexType()
Gets index type.
|
String |
getName()
Gets index name.
|
void |
setFieldNames(Collection<String> fields,
boolean asc)
Sets a collection of field names altogether with the field sorting direction.
|
void |
setFields(LinkedHashMap<String,Boolean> fields)
Sets fields included in the index.
|
void |
setIndexType(QueryIndexType type)
Sets index type.
|
void |
setName(String name)
Sets index name.
|
public QueryIndex()
public QueryIndex(String field)
field - Field name.public QueryIndex(String field, boolean asc)
field - Field name.asc - Ascending flag.public QueryIndex(String field, boolean asc, String name)
field - Field name.asc - Ascending flag.name - Index name.public QueryIndex(String field, QueryIndexType type)
field - Field name.type - Index type.public QueryIndex(String field, QueryIndexType type, boolean asc)
field - Field name.type - Index type.asc - Ascending flag.public QueryIndex(String field, QueryIndexType type, boolean asc, String name)
field - Field name.type - Index type.asc - Ascending flag.name - Index name.public QueryIndex(Collection<String> fields, QueryIndexType type)
fields - Collection of fields to create an index.type - Index type.public QueryIndex(LinkedHashMap<String,Boolean> fields, QueryIndexType type)
fields - Field name to field sort direction for sorted indexes.type - Index type.public String getName()
public void setName(String name)
name - Index name.public LinkedHashMap<String,Boolean> getFields()
public void setFields(LinkedHashMap<String,Boolean> fields)
fields - Collection of index fields.public Collection<String> getFieldNames()
public void setFieldNames(Collection<String> fields, boolean asc)
fields - Collection of fields.asc - Ascending flag.public QueryIndexType getIndexType()
public void setIndexType(QueryIndexType type)
type - Index type.
Follow @ApacheIgnite
Ignite Fabric : ver. 1.5.11 Release Date : April 8 2016