Interface GridQueryRowDescriptor
-
- All Known Implementing Classes:
GridQueryRowDescriptorImpl
public interface GridQueryRowDescriptorRow descriptor.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @Nullable GridCacheContext<?,?>context()Gets cache context for this row descriptor.intfieldsCount()intgetAlternativeColumnId(int colId)Gets alternative column id that may substitute the given column id.ObjectgetFieldValue(Object key, Object val, int fieldIdx)Gets field value by field index.Set<String>getRowKeyColumnNames()Gets a copy of a set of table key column names.booleanisFieldKeyProperty(int fieldIdx)Determine whether a field corresponds to a property of key or to one of value.booleanisKeyColumn(int colId)Checks if provided column id matches key column or key alias.booleanisValueColumn(int colId)Checks if provided column id matches value column or alias.voidonMetadataUpdated()Callback for table metadata update event.voidsetFieldValue(Object key, Object val, Object fieldVal, int fieldIdx)Sets field value by field index.GridQueryTypeDescriptortype()Gets type descriptor.
-
-
-
Method Detail
-
onMetadataUpdated
void onMetadataUpdated()
Callback for table metadata update event.
-
type
GridQueryTypeDescriptor type()
Gets type descriptor.- Returns:
- Type descriptor.
-
context
@Nullable @Nullable GridCacheContext<?,?> context()
Gets cache context for this row descriptor.- Returns:
- Cache context.
-
fieldsCount
int fieldsCount()
- Returns:
- Total fields count.
-
getFieldValue
Object getFieldValue(Object key, Object val, int fieldIdx)
Gets field value by field index.- Parameters:
key- Key.val- Value.fieldIdx- Field index.- Returns:
- Field value.
-
setFieldValue
void setFieldValue(Object key, Object val, Object fieldVal, int fieldIdx)
Sets field value by field index.- Parameters:
key- Key.val- Value.fieldVal- Value to set to field.fieldIdx- Field index.
-
isFieldKeyProperty
boolean isFieldKeyProperty(int fieldIdx)
Determine whether a field corresponds to a property of key or to one of value.- Parameters:
fieldIdx- Field index.- Returns:
trueif given field corresponds to a key property,falseotherwise.
-
isKeyColumn
boolean isKeyColumn(int colId)
Checks if provided column id matches key column or key alias.- Parameters:
colId- Column id.- Returns:
- Result.
-
isValueColumn
boolean isValueColumn(int colId)
Checks if provided column id matches value column or alias.- Parameters:
colId- Column id.- Returns:
- Result.
-
getAlternativeColumnId
int getAlternativeColumnId(int colId)
Gets alternative column id that may substitute the given column id. For alias column returns original one. For original column returns its alias. Otherwise, returns the given column id.- Parameters:
colId- Column id.- Returns:
- Result.
-
-