java.lang.Object
java.lang.Record
org.litebridgedb.orm.expression.ProtoNestableTOExpr<T>
- Type Parameters:
T- The type override of the expression result.- Record Components:
typeOverride- The type of the expression result.type- The type of expression to create.target- The target expression; typically a column name to select viaSelectColumnSpecorSelectFieldSpec.alias- The column alias to use, ornullif not specified.args- Extra expression-specific arguments.
- All Implemented Interfaces:
ExpressionSpec,ProtoExpressionSpec,ProtoNestableExpressionSpec,Resolvable,TypeOverride<T>,TypeOverrideExpressionSpec<T>
public record ProtoNestableTOExpr<T>(Class<T> typeOverride, Class<? extends ExpressionSpec> type, ExpressionSpec target, @Nullable String alias, @Nullable Object @Nullable [] args)
extends Record
implements ProtoNestableExpressionSpec, TypeOverrideExpressionSpec<T>
Type override proto-expression that allows nesting other proto-expressions.
This record is used to create a nested chain of expression instances (e.g. UpperSpec) when table information is available.
-
Constructor Summary
ConstructorsConstructorDescriptionProtoNestableTOExpr(Class<T> typeOverride, Class<? extends ExpressionSpec> type, String column, @Nullable String alias) Constructs a new ProtoTOColumnExpression instance via column name.ProtoNestableTOExpr(Class<T> typeOverride, Class<? extends ExpressionSpec> type, String column, @Nullable String alias, @Nullable Object @Nullable [] args) Constructs a new ProtoTOColumnExpression instance.ProtoNestableTOExpr(Class<T> typeOverride, Class<? extends ExpressionSpec> type, ExpressionSpec target, @Nullable String alias) Constructs a new ProtoTOColumnExpression instance with empty extra arguments.ProtoNestableTOExpr(Class<T> typeOverride, Class<? extends ExpressionSpec> type, ExpressionSpec target, @Nullable String alias, @Nullable Object @Nullable [] args) Creates an instance of aProtoNestableTOExprrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable Stringalias()Returns the value of thealiasrecord component.@Nullable Object @Nullable []args()Returns the value of theargsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Gets the return type override of the query result.target()Returns the value of thetargetrecord component.final StringtoString()Returns a string representation of this record class.Class<? extends ExpressionSpec> type()Returns the value of thetyperecord component.Returns the value of thetypeOverriderecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.litebridgedb.orm.expression.ProtoNestableExpressionSpec
column
-
Constructor Details
-
ProtoNestableTOExpr
public ProtoNestableTOExpr(Class<T> typeOverride, Class<? extends ExpressionSpec> type, ExpressionSpec target, @Nullable String alias) Constructs a new ProtoTOColumnExpression instance with empty extra arguments.- Parameters:
typeOverride- The type of the expression result.type- The type of expression to create.target- The target expression; typically a column name to select viaSelectColumnSpecorSelectFieldSpec.alias- The column alias to use, ornullif not specified.
-
ProtoNestableTOExpr
public ProtoNestableTOExpr(Class<T> typeOverride, Class<? extends ExpressionSpec> type, String column, @Nullable String alias) Constructs a new ProtoTOColumnExpression instance via column name.- Parameters:
typeOverride- The type of the expression result.type- The type of expression to create.column- The target column name to select.alias- The column alias to use, ornullif not specified.
-
ProtoNestableTOExpr
public ProtoNestableTOExpr(Class<T> typeOverride, Class<? extends ExpressionSpec> type, String column, @Nullable String alias, @Nullable Object @Nullable [] args) Constructs a new ProtoTOColumnExpression instance.- Parameters:
typeOverride- The type of the expression result.type- The type of expression to create.column- The target column name to select.alias- The column alias to use, ornullif not specified.
-
ProtoNestableTOExpr
public ProtoNestableTOExpr(Class<T> typeOverride, Class<? extends ExpressionSpec> type, ExpressionSpec target, @Nullable String alias, @Nullable Object @Nullable [] args) Creates an instance of aProtoNestableTOExprrecord class.- Parameters:
typeOverride- the value for thetypeOverriderecord componenttype- the value for thetyperecord componenttarget- the value for thetargetrecord componentalias- the value for thealiasrecord componentargs- the value for theargsrecord component
-
-
Method Details
-
returnType
Description copied from interface:TypeOverrideGets the return type override of the query result.- Specified by:
returnTypein interfaceTypeOverride<T>- Returns:
- the type of the result.
-
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). -
typeOverride
Returns the value of thetypeOverriderecord component.- Returns:
- the value of the
typeOverriderecord component
-
type
Returns the value of thetyperecord component.- Specified by:
typein interfaceResolvable- Returns:
- the value of the
typerecord component
-
target
Returns the value of thetargetrecord component.- Specified by:
targetin interfaceProtoNestableExpressionSpec- Returns:
- the value of the
targetrecord component
-
alias
Returns the value of thealiasrecord component.- Specified by:
aliasin interfaceProtoExpressionSpec- Returns:
- the value of the
aliasrecord component
-
args
Returns the value of theargsrecord component.- Specified by:
argsin interfaceProtoExpressionSpec- Returns:
- the value of the
argsrecord component
-