# Record Class PSParameter<T>

java.lang.Object
java.lang.Record
org.apache.cayenne.access.jdbc.PSParameter<T>

public record PSParameter<T>(T value, int psPosition, int psType, int psScale, ExtendedType<T> binder, DbAttribute attribute) extends Record
Describes a single immutable PreparedStatement parameter binding.

Since:
  5.0

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PSParameter(T value, int psPosition, int psType, int psScale, ExtendedType<T> binder, DbAttribute attribute)`
  Creates an instance of a `PSParameter` record class.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `DbAttribute`
  `attribute()`
  Returns the value of the `attribute` record component.
  `ExtendedType<T>`
  `binder()`
  Returns the value of the `binder` record component.
  `final boolean`
  `equals(Object o)`
  Indicates whether some other object is "equal to" this one.
  `final int`
  `hashCode()`
  Returns a hash code value for this object.
  `int`
  `psPosition()`
  Returns the value of the `psPosition` record component.
  `int`
  `psScale()`
  Returns the value of the `psScale` record component.
  `int`
  `psType()`
  Returns the value of the `psType` record component.
  `final String`
  `toString()`
  Returns a string representation of this record class.
  `T`
  `value()`
  Returns the value of the `value` record component.

  ### Methods inherited from class Object

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

- ## Constructor Details

  - ### PSParameter

    public PSParameter(T value, int psPosition, int psType, int psScale, ExtendedType<T> binder, DbAttribute attribute)
    Creates an instance of a `PSParameter` record class.
    Parameters:
      `value` - the value for the `value` record component
      `psPosition` - the value for the `psPosition` record component
      `psType` - the value for the `psType` record component
      `psScale` - the value for the `psScale` record component
      `binder` - the value for the `binder` record component
      `attribute` - the value for the `attribute` record component

- ## Method Details

  - ### toString

    public final String toString()
    Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
    Specified by:
      `toString` in class `Record`
    Returns:
      a string representation of this object

  - ### hashCode

    public final int hashCode()
    Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
    Specified by:
      `hashCode` in class `Record`
    Returns:
      a hash code value for this object

  - ### equals

    public final boolean equals(Object o)
    Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with `Objects::equals(Object,Object)`; primitive components are compared with the `compare` method from their corresponding wrapper classes.
    Specified by:
      `equals` in class `Record`
    Parameters:
      `o` - the object with which to compare
    Returns:
      `true` if this object is the same as the `o` argument; `false` otherwise.

  - ### value

    public T value()
    Returns the value of the `value` record component.
    Returns:
      the value of the `value` record component

  - ### psPosition

    public int psPosition()
    Returns the value of the `psPosition` record component.
    Returns:
      the value of the `psPosition` record component

  - ### psType

    public int psType()
    Returns the value of the `psType` record component.
    Returns:
      the value of the `psType` record component

  - ### psScale

    public int psScale()
    Returns the value of the `psScale` record component.
    Returns:
      the value of the `psScale` record component

  - ### binder

    public ExtendedType<T> binder()
    Returns the value of the `binder` record component.
    Returns:
      the value of the `binder` record component

  - ### attribute

    public DbAttribute attribute()
    Returns the value of the `attribute` record component.
    Returns:
      the value of the `attribute` record component