Class QueryClassProperty
- java.lang.Object
-
- org.apache.ignite.internal.processors.query.property.QueryClassProperty
-
- All Implemented Interfaces:
GridQueryProperty
public class QueryClassProperty extends Object implements GridQueryProperty
Description of type property.
-
-
Constructor Summary
Constructors Constructor Description QueryClassProperty(QueryPropertyAccessor accessor, boolean key, String name, boolean notNull, @Nullable CacheObjectContext coCtx)Constructor.
-
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()voidparent(QueryClassProperty parent)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.StringtoString()Class<?>type()Objectvalue(Object key, Object val)Gets this property value from the given object.
-
-
-
Constructor Detail
-
QueryClassProperty
public QueryClassProperty(QueryPropertyAccessor accessor, boolean key, String name, boolean notNull, @Nullable @Nullable CacheObjectContext coCtx)
Constructor.- Parameters:
accessor- Way of accessing the property.key-trueif key property,falseotherwise.name- Property name.notNull-trueif null value is not allowed.coCtx- Cache Object Context.
-
-
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.
-
key
public boolean key()
Property ownership flag.- Specified by:
keyin interfaceGridQueryProperty- Returns:
trueif this property belongs to key,falseif it belongs to value.
-
name
public String name()
- Specified by:
namein interfaceGridQueryProperty- Returns:
- Property name.
-
type
public Class<?> type()
- Specified by:
typein interfaceGridQueryProperty- Returns:
- Class member type.
-
parent
public void parent(QueryClassProperty parent)
- Parameters:
parent- Parent property if this is embeddable element.
-
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.
-
-