org.apache.ignite.internal.processors.query.property

## Class QueryBinaryProperty

- java.lang.Object
- - org.apache.ignite.internal.processors.query.property.QueryBinaryProperty

All Implemented Interfaces:
  GridQueryProperty

    public class QueryBinaryProperty
    extends Object
    implements GridQueryProperty

Binary property.

### Constructor Summary

Constructors
Constructor and Description
`QueryBinaryProperty(GridKernalContext ctx, String propName, QueryBinaryProperty parent, Class<?> type, Boolean key, String alias, boolean notNull, Object defaultValue, int precision, int scale)` Constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`Object` `defaultValue()` Gets the default value for this property.
`boolean` `key()` Property ownership flag.
`String` `name()`
`boolean` `notNull()` Gets the flag restricting `null` value for this property.
`GridQueryProperty` `parent()`
`int` `precision()` Gets precision for this property.
`int` `scale()` Gets scale for this property.
`void` `setValue(Object key, Object val, Object propVal)` Sets this property value for the given object.
`Class<?>` `type()`
`Object` `value(Object key, Object val)` Gets this property value from the given object.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### QueryBinaryProperty

    public QueryBinaryProperty(GridKernalContext ctx,
                               String propName,
                               QueryBinaryProperty parent,
                               Class<?> type,
                               @Nullable
                               Boolean key,
                               String alias,
                               boolean notNull,
                               Object defaultValue,
                               int precision,
                               int scale)

Constructor.

Parameters:
  `ctx` - Kernal context.
  `propName` - Property name.
  `parent` - Parent property.
  `type` - Result type.
  `key` - `true` if key property, `false` otherwise, `null` if unknown.
  `alias` - Field alias.
  `notNull` - `true` if null value is not allowed.
  `defaultValue` - Default value.
  `precision` - Precision.
  `scale` - Scale.

### Method Detail

#### value

    public Object value(Object key,
                        Object val)
                 throws IgniteCheckedException

Gets this property value from the given object.

Specified by:
  `value` in interface `GridQueryProperty`
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:
  `setValue` in interface `GridQueryProperty`
Parameters:
  `key` - Key.
  `val` - Value.
  `propVal` - Property value.
Throws:
  `IgniteCheckedException` - If failed.

#### name

    public String name()

Specified by:
  `name` in interface `GridQueryProperty`
Returns:
  Property name.

#### type

    public Class<?> type()

Specified by:
  `type` in interface `GridQueryProperty`
Returns:
  Class member type.

#### key

    public boolean key()

Property ownership flag.

Specified by:
  `key` in interface `GridQueryProperty`
Returns:
  `true` if this property belongs to key, `false` if it belongs to value.

#### parent

    public GridQueryProperty parent()

Specified by:
  `parent` in interface `GridQueryProperty`
Returns:
  Parent property or `null` if this property is not nested.

#### notNull

    public boolean notNull()

Gets the flag restricting `null` value for this property.

Specified by:
  `notNull` in interface `GridQueryProperty`
Returns:
  `true` if property does not allow `null` value.

#### defaultValue

    public Object defaultValue()

Gets the default value for this property.

Specified by:
  `defaultValue` in interface `GridQueryProperty`
Returns:
  `null` if a default value is not set for the property.

#### precision

    public int precision()

Gets precision for this property.

Specified by:
  `precision` in interface `GridQueryProperty`
Returns:
  Precision for a decimal property or -1.

#### scale

    public int scale()

Gets scale for this property.

Specified by:
  `scale` in interface `GridQueryProperty`
Returns:
  Scale for a decimal property or -1.

2018 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.7.0
Release Date | : November 30 2018