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 |
|---|---|
boolean |
equals(Object o) |
Collection<String> |
getFieldNames() |
LinkedHashMap<String,Boolean> |
getFields()
Gets fields included in the index.
|
QueryIndexType |
getIndexType()
Gets index type.
|
int |
getInlineSize()
Gets inline size.
|
String |
getName()
Gets index name.
|
int |
hashCode() |
QueryIndex |
setFieldNames(Collection<String> fields,
boolean asc)
Sets a collection of field names altogether with the field sorting direction.
|
QueryIndex |
setFields(LinkedHashMap<String,Boolean> fields)
Sets fields included in the index.
|
QueryIndex |
setIndexType(QueryIndexType type)
Sets index type.
|
void |
setInlineSize(int inlineSize)
Sets inline size.
|
QueryIndex |
setName(String name)
Sets index name.
|
String |
toString() |
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 QueryIndex setName(String name)
name - Index name.this for chaining.public LinkedHashMap<String,Boolean> getFields()
public QueryIndex setFields(LinkedHashMap<String,Boolean> fields)
fields - Collection of index fields.this for chaining.public Collection<String> getFieldNames()
public QueryIndex setFieldNames(Collection<String> fields, boolean asc)
fields - Collection of fields.asc - Ascending flag.this for chaining.public QueryIndexType getIndexType()
public QueryIndex setIndexType(QueryIndexType type)
type - Index type.this for chaining.public int getInlineSize()
public void setInlineSize(int inlineSize)
inlineSize - Inline size.
Follow @ApacheIgnite
Ignite Fabric : ver. 2.1.0 Release Date : July 20 2017