java.lang.Object
org.litebridge.orm.expression.AbstractAliasable
org.litebridge.orm.expression.ProtoNestableBasicExprSpec
- All Implemented Interfaces:
Aliasable,ExpressionSpec,ProtoExpressionSpec,ProtoNestableExpressionSpec,Resolvable
public final class ProtoNestableBasicExprSpec
extends AbstractAliasable
implements ProtoNestableExpressionSpec
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
ConstructorsConstructorDescriptionProtoNestableBasicExprSpec(Class<? extends ExpressionSpec> type, String column, @Nullable String alias) Constructs a new ProtoNestableBasicExprSpec instance via column name.ProtoNestableBasicExprSpec(Class<? extends ExpressionSpec> type, ProtoExpressionSpec target, @Nullable String alias) Creates a new ProtoNestableBasicExprSpec. -
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()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
-
ProtoNestableBasicExprSpec
public ProtoNestableBasicExprSpec(Class<? extends ExpressionSpec> type, ProtoExpressionSpec target, @Nullable String alias) Creates a new ProtoNestableBasicExprSpec.- Parameters:
type- the type of expression to createtarget- the target expression specificationalias- the column alias
-
ProtoNestableBasicExprSpec
public ProtoNestableBasicExprSpec(Class<? extends ExpressionSpec> type, String column, @Nullable String alias) Constructs a new ProtoNestableBasicExprSpec instance via column name.- Parameters:
type- The type of expression to create.column- The target column name to select.alias- The column alias to use, ornullif not specified.
-
-
Method Details
-
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
-
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.
-
equals
- Overrides:
equalsin classAbstractAliasable
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractAliasable
-
toString
-
as
- Specified by:
asin interfaceAliasable- Overrides:
asin classAbstractAliasable
-