Record Class TranslatedBatch
java.lang.Object
java.lang.Record
org.apache.cayenne.access.translator.TranslatedBatch
- All Implemented Interfaces:
TranslatedStatement
public record TranslatedBatch(String sql, PSBatchParameter[] bindings)
extends Record
implements TranslatedStatement
An immutable result of translating a batch query: the SQL String shared by all rows of the batch, and one
PSBatchParameter per PreparedStatement placeholder, each carrying the values of all batch rows for
its placeholder.- Since:
- 5.0
-
Constructor Summary
ConstructorsConstructorDescriptionTranslatedBatch(String sql, PSBatchParameter[] bindings) Creates an instance of aTranslatedBatchrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbindings()Returns the value of thebindingsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.sql()Returns the value of thesqlrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TranslatedBatch
Creates an instance of aTranslatedBatchrecord class.- Parameters:
sql- the value for thesqlrecord componentbindings- the value for thebindingsrecord component
-
-
Method Details
-
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. -
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. -
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. All components in this record class are compared withObjects::equals(Object,Object). -
sql
Returns the value of thesqlrecord component.- Specified by:
sqlin interfaceTranslatedStatement- Returns:
- the value of the
sqlrecord component
-
bindings
Returns the value of thebindingsrecord component.- Returns:
- the value of the
bindingsrecord component
-