Interface Adapter.Contract.Array<T,E,A extends Adapter<E,?>>

Type Parameters:
T - the type to be returned by an instance of the contract.
E - the type returned by an associated Adapter for the element type (or the boxed type, if the adapter returns a primitive type).
A - The subtype of Adapter that the contract requires; reference-returning (As) and all of the primitive-returning types must be distinguished.
All Superinterfaces:
Adapter.Contract<T>
All Known Subinterfaces:
Array.AsFlatList<E>
Enclosing interface:
Adapter.Contract<T>

public static interface Adapter.Contract.Array<T,E,A extends Adapter<E,?>> extends Adapter.Contract<T>
Base for functional interfaces that serve as contracts for array-like types.

The distinguishing feature is an associated Adapter handling the element type of the array-like type. This form of contract may be useful for range and multirange types as well as for arrays.

  • Method Details

    • construct

      T construct(int nDims, int[] dimsAndBounds, A adapter, TupleTableSlot.Indexed slot) throws SQLException
      Constructs a representation T representing a PostgreSQL array.
      Parameters:
      nDims - the number of array dimensions (always one half of dimsAndBounds.length, but passed separately for convenience)
      dimsAndBounds - the first nDims elements represent the total number of valid indices for each dimension, and the next nDims elements represent the first valid index for each dimension. For example, if nDims is 3, dimsAndBounds[1] is 6, and dimsAndBounds[4] is -2, then the array's second dimension uses indices in [-2,4). The array is a copy and may be used freely.
      adapter - an Adapter producing a representation of the array's element type.
      slot - A TupleTableSlot with multiple components accessible by a (single, flat) index, all of the same type, described by a one-element TupleDescriptor.
      Throws:
      SQLException