java.lang.Object
org.litebridge.orm.expression.AbstractAliasable
org.litebridge.orm.expression.ProtoNestableTOExpr<T>
- All Implemented Interfaces:
Aliasable,ExpressionSpec,ProtoExpressionSpec,ProtoNestableExpressionSpec,Resolvable,TypeOverride<T>,TypeOverrideExpressionSpec<T>
public final class ProtoNestableTOExpr<T>
extends AbstractAliasable
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.
-
Field Summary
Fields inherited from class org.litebridge.orm.expression.AbstractAliasable
alias -
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) -
Method Summary
Modifier and TypeMethodDescription@Nullable Stringalias()Gets the column alias to use, ornullif not specified.@Nullable Object @Nullable []args()Gets any extra expression-specific arguments.booleaninthashCode()Gets the return type override of the query result.target()The nested target expression.toString()Class<? extends ExpressionSpec> type()Returns the type ofExpressionSpecthat thisResolvablecan resolve to.Methods inherited from class org.litebridge.orm.expression.AbstractAliasable
getAlias, setAliasMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.litebridge.orm.expression.ProtoNestableExpressionSpec
column
-
Constructor Details
-
ProtoNestableTOExpr
public ProtoNestableTOExpr(Class<T> typeOverride, Class<? extends ExpressionSpec> type, ExpressionSpec target, @Nullable String alias, @Nullable Object @Nullable [] args) - 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 viaSelectColumnSpecalias- The column alias to use, ornullif not specified.args- Extra expression-specific arguments.
-
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 viaSelectColumnSpecalias- 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.args- Extra expression-specific arguments.
-
-
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.
-
type
Description copied from interface:ResolvableReturns the type ofExpressionSpecthat thisResolvablecan resolve to.- Specified by:
typein interfaceResolvable- Returns:
- the type of
ExpressionSpecthat thisResolvablecan resolve to.
-
target
Description copied from interface:ProtoNestableExpressionSpecThe nested target expression.Target expressions are typically a column name to select via e.g.
SelectColumnSpec..- Specified by:
targetin interfaceProtoNestableExpressionSpec- Returns:
- the nested target expression.
-
alias
Description copied from interface:ProtoExpressionSpecGets the column alias to use, ornullif not specified.- Specified by:
aliasin interfaceProtoExpressionSpec- Returns:
- the column alias to use, or
nullif not specified.
-
args
Description copied from interface:ProtoExpressionSpecGets any extra expression-specific arguments.- Specified by:
argsin interfaceProtoExpressionSpec- Returns:
- the extra arguments, or
nullif none
-
as
- Specified by:
asin interfaceAliasable- Overrides:
asin classAbstractAliasable
-
equals
- Overrides:
equalsin classAbstractAliasable
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractAliasable
-
toString
-