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(Class<?> keyCls,
Class<?> valCls)
Creates a query entity with the given key and value types.
|
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.
|
boolean |
equals(Object o) |
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.
|
Map<String,Object> |
getDefaultFieldValues()
Gets fields default values.
|
LinkedHashMap<String,String> |
getFields()
Gets query fields for this query pair.
|
Map<String,Integer> |
getFieldsPrecision() |
Map<String,Integer> |
getFieldsScale() |
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.
|
Set<String> |
getNotNullFields()
Gets names of fields that must be checked for null.
|
String |
getTableName()
Gets table name for this query entity.
|
String |
getValueFieldName()
Get value field name.
|
String |
getValueType()
Gets value type for this query pair.
|
int |
hashCode() |
QueryEntityPatch |
makePatch(QueryEntity target)
Make query entity patch.
|
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 |
setDefaultFieldValues(Map<String,Object> defaultFieldValues)
Sets fields default values.
|
QueryEntity |
setFields(LinkedHashMap<String,String> fields)
Sets query fields for this query pair.
|
QueryEntity |
setFieldsPrecision(Map<String,Integer> fieldsPrecision)
Sets fieldsPrecision map for a fields.
|
QueryEntity |
setFieldsScale(Map<String,Integer> fieldsScale)
Sets fieldsScale map for a fields.
|
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.
|
QueryEntity |
setNotNullFields(Set<String> notNullFields)
Sets names of fields that must checked for null.
|
QueryEntity |
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 QueryEntity(String keyType, String valType)
keyType - Key type.valType - Value type.public QueryEntityPatch makePatch(QueryEntity target)
target - Query entity to which this entity should be expanded.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 QueryEntity setTableName(String tableName)
tableName - table namethis for chaining.public Set<String> getNotNullFields()
public QueryEntity setNotNullFields(Set<String> notNullFields)
notNullFields - Set of names of fields that must have non-null values. If null,
will clear previously set fields.this for chaining.public Map<String,Integer> getFieldsPrecision()
public QueryEntity setFieldsPrecision(Map<String,Integer> fieldsPrecision)
fieldsPrecision - Precision map for a fields.This for chaining.public QueryEntity setFieldsScale(Map<String,Integer> fieldsScale)
fieldsScale - Scale map for a fields.This for chaining.public Map<String,Object> getDefaultFieldValues()
public QueryEntity setDefaultFieldValues(Map<String,Object> defaultFieldValues)
defaultFieldValues - Field's name to default value map.this for chaining.public 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.
GridGain In-Memory Computing Platform : ver. 8.9.26 Release Date : October 16 2025