Class QueryUtils.KeyOrValProperty
- java.lang.Object
-
- org.apache.ignite.internal.processors.query.QueryUtils.KeyOrValProperty
-
- All Implemented Interfaces:
GridQueryProperty
- Enclosing class:
- QueryUtils
public static class QueryUtils.KeyOrValProperty extends Object implements GridQueryProperty
Property used for keyFieldName or valueFieldName
-
-
Constructor Summary
Constructors Constructor Description KeyOrValProperty(boolean key, String name, Class<?> cls)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectdefaultValue()Gets the default value for this property.booleankey()Property ownership flag.Stringname()booleannotNull()Gets the flag restrictingnullvalue for this property.GridQueryPropertyparent()intprecision()Gets precision for this property.intscale()Gets scale for this property.voidsetValue(Object key, Object val, Object propVal)Sets this property value for the given object.Class<?>type()Objectvalue(Object key, Object val)Gets this property value from the given object.
-
-
-
Method Detail
-
value
public Object value(Object key, Object val) throws IgniteCheckedException
Gets this property value from the given object.- Specified by:
valuein interfaceGridQueryProperty- Parameters:
key- Key.val- Value.- Returns:
- Property value.
- Throws:
IgniteCheckedException- If failed.
-
setValue
public void setValue(Object key, Object val, Object propVal) throws IgniteCheckedException
Sets this property value for the given object.- Specified by:
setValuein interfaceGridQueryProperty- Parameters:
key- Key.val- Value.propVal- Property value.- Throws:
IgniteCheckedException- If failed.
-
name
public String name()
- Specified by:
namein interfaceGridQueryProperty- Returns:
- Property name.
-
type
public Class<?> type()
- Specified by:
typein interfaceGridQueryProperty- Returns:
- Class member type.
-
key
public boolean key()
Property ownership flag.- Specified by:
keyin interfaceGridQueryProperty- Returns:
trueif this property belongs to key,falseif it belongs to value.
-
parent
public GridQueryProperty parent()
- Specified by:
parentin interfaceGridQueryProperty- Returns:
- Parent property or
nullif this property is not nested.
-
notNull
public boolean notNull()
Gets the flag restrictingnullvalue for this property.- Specified by:
notNullin interfaceGridQueryProperty- Returns:
trueif property does not allownullvalue.
-
defaultValue
public Object defaultValue()
Gets the default value for this property.- Specified by:
defaultValuein interfaceGridQueryProperty- Returns:
nullif a default value is not set for the property.
-
precision
public int precision()
Gets precision for this property.- Specified by:
precisionin interfaceGridQueryProperty- Returns:
- Precision for a decimal property or -1.
-
scale
public int scale()
Gets scale for this property.- Specified by:
scalein interfaceGridQueryProperty- Returns:
- Scale for a decimal property or -1.
-
-