java.lang.Object
java.lang.Record
st.orm.template.impl.Elements.From
- All Implemented Interfaces:
Element
- Enclosing class:
Elements
public static record Elements.From(@Nonnull Elements.Source source, @Nonnull String alias, boolean autoJoin)
extends Record
implements Element
From relies on preview features of the Java platform:
Fromrefers to one or more preview APIs:StringTemplate.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
-
Constructor Summary
ConstructorsConstructorDescriptionFrom(StringTemplatePREVIEW template) From(Elements.Source source, String alias, boolean autoJoin) Creates an instance of aFromrecord class. -
Method Summary
Modifier and TypeMethodDescriptionalias()Returns the value of thealiasrecord component.booleanautoJoin()Returns the value of theautoJoinrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.source()Returns the value of thesourcerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
From
Creates an instance of aFromrecord class.- Parameters:
source- the value for thesourcerecord componentalias- the value for thealiasrecord componentautoJoin- the value for theautoJoinrecord component
-
From
-
From
-
-
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 '=='. -
source
Returns the value of thesourcerecord component.- Returns:
- the value of the
sourcerecord component
-
alias
Returns the value of thealiasrecord component.- Returns:
- the value of the
aliasrecord component
-
autoJoin
public boolean autoJoin()Returns the value of theautoJoinrecord component.- Returns:
- the value of the
autoJoinrecord component
-
Fromwhen preview features are enabled.