org.apache.ignite.internal.sql.optimizer.affinity

## Class PartitionParameterNode

- java.lang.Object
- - org.apache.ignite.internal.sql.optimizer.affinity.PartitionSingleNode
  - - org.apache.ignite.internal.sql.optimizer.affinity.PartitionParameterNode

All Implemented Interfaces:
  PartitionNode

    public class PartitionParameterNode
    extends PartitionSingleNode

Node with partition which should be extracted from argument.

### Field Summary

### Fields inherited from class org.apache.ignite.internal.sql.optimizer.affinity.PartitionSingleNode

`tbl`

### Constructor Summary

Constructors
Constructor and Description
`PartitionParameterNode(PartitionTable tbl, PartitionResolver partRslvr, int idx, int type, PartitionParameterType clientType)` Constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`Integer` `applySingle(PartitionClientContext cliCtx, Object... args)` Apply arguments and get single partition.
`PartitionParameterType` `clientType()`
`boolean` `constant()`
`String` `toString()`
`int` `type()`
`int` `value()`

### Methods inherited from class org.apache.ignite.internal.sql.optimizer.affinity.PartitionSingleNode

`apply, cacheName, equals, hashCode, joinGroup, table`

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

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface org.apache.ignite.internal.sql.optimizer.affinity.PartitionNode

`optimize`

### Constructor Detail

#### PartitionParameterNode

    public PartitionParameterNode(PartitionTable tbl,
                                  PartitionResolver partRslvr,
                                  int idx,
                                  int type,
                                  PartitionParameterType clientType)

Constructor.

Parameters:
  `tbl` - Table descriptor.
  `partRslvr` - Partition resolver.
  `idx` - Parameter index.
  `type` - Parameter data type.
  `clientType` - Mapped parameter type to be used by thin clients.

### Method Detail

#### applySingle

    public Integer applySingle(PartitionClientContext cliCtx,
                               Object... args)
                        throws IgniteCheckedException

Apply arguments and get single partition.

Specified by:
  `applySingle` in class `PartitionSingleNode`
Parameters:
  `cliCtx` - Client context.
  `args` - Arguments.
Returns:
  Partition or `null` if failed.
Throws:
  `IgniteCheckedException`

#### constant

    public boolean constant()

Specified by:
  `constant` in class `PartitionSingleNode`
Returns:
  `True` if constant, `false` if argument.

#### value

    public int value()

Specified by:
  `value` in class `PartitionSingleNode`
Returns:
  Partition for constant node, index for argument node.

#### type

    public int type()

Returns:
  Parameter data type.

#### clientType

    public PartitionParameterType clientType()

Returns:
  Client parameter type.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.11.0
Release Date | : September 11 2021