Package oracle.jdbc.pool

## Class OracleShardingKeyBuilderImpl

- java.lang.Object
- - oracle.jdbc.pool.OracleShardingKeyBuilderImpl

All Implemented Interfaces:
  `java.sql.ShardingKeyBuilder`, `OracleShardingKeyBuilder`

    public class OracleShardingKeyBuilderImpl
    extends java.lang.Object
    implements OracleShardingKeyBuilder

### Field Summary

Fields
`static long` `DEFAULT_ORA_HASH`

### Constructor Summary

Constructors
`OracleShardingKeyBuilderImpl()`

### Method Summary

All Methods Instance Methods Concrete Methods
`OracleShardingKeyImpl` `build()` Builds the sharding key with the sub keys provided and their default metadata.
`OracleShardingKeyBuilderImpl` `oraHash​(long oraHash)` Used to build the shard key with the known ORA HASH value.
`OracleShardingKeyBuilderImpl` `subkey​(java.lang.Object subkey, java.sql.SQLType subkeyType)` This method is called to include a subkey into a sharding key object being built.

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

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

### Field Detail

#### DEFAULT_ORA_HASH

    public static final long DEFAULT_ORA_HASH

See Also:
  Constant Field Values

### Constructor Detail

#### OracleShardingKeyBuilderImpl

    public OracleShardingKeyBuilderImpl()

### Method Detail

#### subkey

    public OracleShardingKeyBuilderImpl subkey​(java.lang.Object subkey,
                                               java.sql.SQLType subkeyType)

This method is called to include a subkey into a sharding key object being built. The order in which subkey method is called is important as it indicates the order of placement of the subkey within the sharding key.

Specified by:
  `subkey` in interface `OracleShardingKeyBuilder`
Specified by:
  `subkey` in interface `java.sql.ShardingKeyBuilder`
Parameters:
  `subkey` - contains the object that needs to be part of sharding sub key
  `subkeyType` - sub-key data type which can be specified using one of the types from java.sql.JDBCType or oracle.jdbc.OracleType
Returns:
  this builder object
See Also:
  `OracleShardingKeyBuilder.subkey(java.lang.Object, java.sql.SQLType)`

#### oraHash

    public OracleShardingKeyBuilderImpl oraHash​(long oraHash)

Used to build the shard key with the known ORA HASH value. This is used to optimize sharding key comparisons for hash based sharding.

Parameters:
  `oraHash` - the known ORA HASH value for the shard key that is being built.
Returns:
  this builder object

#### build

    public OracleShardingKeyImpl build()

Builds the sharding key with the sub keys provided and their default metadata. The sharding key object built is immutable. The build() method can be called only once on a builder object, subsequent attempts to call build() will result in IllegalStateException.

Specified by:
  `build` in interface `OracleShardingKeyBuilder`
Specified by:
  `build` in interface `java.sql.ShardingKeyBuilder`
Returns:
  returns the new sharding key object that is built
See Also:
  `OracleShardingKeyBuilder.build()`