Record Class TranslatedSelect
java.lang.Object
java.lang.Record
org.apache.cayenne.access.translator.TranslatedSelect
- All Implemented Interfaces:
TranslatedStatement
public record TranslatedSelect(String sql, PSParameter<?>[] bindings, RSColumn[] resultColumns, boolean suppressingDistinct, boolean hasJoins)
extends Record
implements TranslatedStatement
An immutable result of translating a
Select query to SQL,
produced by SelectTranslator.translate(org.apache.cayenne.query.Select<?>, org.apache.cayenne.dba.DbAdapter, org.apache.cayenne.map.EntityResolver).- Since:
- 5.0
-
Constructor Summary
ConstructorsConstructorDescriptionTranslatedSelect(String sql, PSParameter<?>[] bindings, RSColumn[] resultColumns, boolean suppressingDistinct, boolean hasJoins) Creates an instance of aTranslatedSelectrecord class. -
Method Summary
Modifier and TypeMethodDescriptionPSParameter<?>[]bindings()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.booleanhasJoins()Returns the value of thehasJoinsrecord component.RSColumn[]Returns the value of theresultColumnsrecord component.sql()Returns the value of thesqlrecord component.booleanReturns the value of thesuppressingDistinctrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TranslatedSelect
public TranslatedSelect(String sql, PSParameter<?>[] bindings, RSColumn[] resultColumns, boolean suppressingDistinct, boolean hasJoins) Creates an instance of aTranslatedSelectrecord class.- Parameters:
sql- the value for thesqlrecord componentbindings- the value for thebindingsrecord componentresultColumns- the value for theresultColumnsrecord componentsuppressingDistinct- the value for thesuppressingDistinctrecord componenthasJoins- the value for thehasJoinsrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
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
-
resultColumns
Returns the value of theresultColumnsrecord component.- Returns:
- the value of the
resultColumnsrecord component
-
suppressingDistinct
public boolean suppressingDistinct()Returns the value of thesuppressingDistinctrecord component.- Returns:
- the value of the
suppressingDistinctrecord component
-
hasJoins
public boolean hasJoins()Returns the value of thehasJoinsrecord component.- Returns:
- the value of the
hasJoinsrecord component
-