Record Class PSBatchParameter
java.lang.Object
java.lang.Record
org.apache.cayenne.access.jdbc.PSBatchParameter
public record PSBatchParameter(Object[] values, int psPosition, int psType, int psScale, DbAttribute attribute)
extends Record
An immutable batch parameter corresponding to a single PreparedStatement placeholder, carrying the values of all
batch rows for that placeholder alongside the static position and column metadata. The value of a given row is
resolved via
getValue(int).
A value may be a DeferredValue, e.g. when it comes from a generated key of another row in the same
transaction. Deferred values are resolved when the corresponding row is bound, i.e. after the rows preceding it
have been executed.
- Since:
- 5.0
-
Constructor Summary
ConstructorsConstructorDescriptionPSBatchParameter(Object[] values, int psPosition, int psType, int psScale, DbAttribute attribute) Creates an instance of aPSBatchParameterrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theattributerecord component.final booleanIndicates whether some other object is "equal to" this one.getValue(int row) final inthashCode()Returns a hash code value for this object.intReturns the value of thepsPositionrecord component.intpsScale()Returns the value of thepsScalerecord component.intpsType()Returns the value of thepsTyperecord component.final StringtoString()Returns a string representation of this record class.Object[]values()Returns the value of thevaluesrecord component.
-
Constructor Details
-
PSBatchParameter
public PSBatchParameter(Object[] values, int psPosition, int psType, int psScale, DbAttribute attribute) Creates an instance of aPSBatchParameterrecord class.- Parameters:
values- the value for thevaluesrecord componentpsPosition- the value for thepsPositionrecord componentpsType- the value for thepsTyperecord componentpsScale- the value for thepsScalerecord componentattribute- the value for theattributerecord component
-
-
Method Details
-
getValue
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
values
Returns the value of thevaluesrecord component.- Returns:
- the value of the
valuesrecord component
-
psPosition
public int psPosition()Returns the value of thepsPositionrecord component.- Returns:
- the value of the
psPositionrecord component
-
psType
public int psType()Returns the value of thepsTyperecord component.- Returns:
- the value of the
psTyperecord component
-
psScale
public int psScale()Returns the value of thepsScalerecord component.- Returns:
- the value of the
psScalerecord component
-
attribute
Returns the value of theattributerecord component.- Returns:
- the value of the
attributerecord component
-