public class QueryEntity extends Object implements Serializable
cache
entry (composed of key and value)
in a way of how it must be indexed and can be queried.Constructor and Description |
---|
QueryEntity()
Creates an empty query entity.
|
QueryEntity(QueryEntity other)
Copy constructor.
|
QueryEntity(String keyType,
String valType)
Creates a query entity with the given key and value types.
|
Modifier and Type | Method and Description |
---|---|
QueryEntity |
addQueryField(String fullName,
String type,
String alias)
Utility method for building query entities programmatically.
|
String |
findKeyType()
Attempts to get key type from fields in case it was not set directly.
|
String |
findValueType()
Attempts to get value type from fields in case it was not set directly.
|
Map<String,String> |
getAliases()
Gets aliases map.
|
LinkedHashMap<String,String> |
getFields()
Gets query fields for this query pair.
|
Collection<QueryIndex> |
getIndexes()
Gets a collection of index entities.
|
String |
getKeyFieldName()
Gets key field name.
|
Set<String> |
getKeyFields()
Gets query fields for this query pair that belongs to the key.
|
String |
getKeyType()
Gets key type for this query pair.
|
String |
getTableName()
Gets table name for this query entity.
|
String |
getValueFieldName()
Get value field name.
|
String |
getValueType()
Gets value type for this query pair.
|
QueryEntity |
setAliases(Map<String,String> aliases)
Sets mapping from full property name in dot notation to an alias that will be used as SQL column name.
|
QueryEntity |
setFields(LinkedHashMap<String,String> fields)
Sets query fields for this query pair.
|
QueryEntity |
setIndexes(Collection<QueryIndex> idxs)
Sets a collection of index entities.
|
QueryEntity |
setKeyFieldName(String keyFieldName)
Sets key field name.
|
QueryEntity |
setKeyFields(Set<String> keyFields)
Gets query fields for this query pair that belongs to the key.
|
QueryEntity |
setKeyType(String keyType)
Sets key type for this query pair.
|
void |
setTableName(String tableName)
Sets table name for this query entity.
|
QueryEntity |
setValueFieldName(String valueFieldName)
Sets value field name.
|
QueryEntity |
setValueType(String valType)
Sets value type for this query pair.
|
String |
toString() |
public QueryEntity()
public QueryEntity(QueryEntity other)
other
- Other entity.public String getKeyType()
public String findKeyType()
public QueryEntity setKeyType(String keyType)
keyType
- Key type.this
for chaining.public String getValueType()
public String findValueType()
public QueryEntity setValueType(String valType)
valType
- Value type.this
for chaining.public LinkedHashMap<String,String> getFields()
public QueryEntity setFields(LinkedHashMap<String,String> fields)
fields
- Field-to-type map.this
for chaining.public Set<String> getKeyFields()
public QueryEntity setKeyFields(Set<String> keyFields)
keyFields
- Set of names of key fields.this
for chaining.public String getKeyFieldName()
public QueryEntity setKeyFieldName(String keyFieldName)
keyFieldName
- Key name.this
for chaining.public String getValueFieldName()
public QueryEntity setValueFieldName(String valueFieldName)
valueFieldName
- value name.this
for chaining.public Collection<QueryIndex> getIndexes()
public QueryEntity setAliases(Map<String,String> aliases)
aliases
- Aliases map.this
for chaining.public QueryEntity setIndexes(Collection<QueryIndex> idxs)
idxs
- Collection of index entities.this
for chaining.public String getTableName()
public void setTableName(String tableName)
tableName
- table namepublic QueryEntity addQueryField(String fullName, String type, String alias)
fullName
- Full name of the field.type
- Type of the field.alias
- Field alias.this
for chaining.
Follow @ApacheIgnite
Ignite Fabric : ver. 2.0.0 Release Date : April 30 2017