java.lang.Object
org.litebridge.orm.meta.QueryField
- All Implemented Interfaces:
ExpressionSpec
- Direct Known Subclasses:
NumericQueryField,StringQueryField
public sealed class QueryField
extends Object
implements ExpressionSpec
permits NumericQueryField, StringQueryField
Basic metamodel field definition.
Entity/DTO metamodels are used for type-safe queries. This implementation provides no additional functionality beyond the ability to be used in queries.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Class<?> Class of the DTO the field belongs toprotected final StringTarget field name.protected final @Nullable ExpressionSpecPending chained expression spec to use; -
Constructor Summary
ConstructorsModifierConstructorDescriptionQueryField(Class<?> dtoClass, String field) Creates a newQueryFieldinstance.protectedQueryField(QueryField other, ExpressionSpec pendingExpressionSpec) -
Method Summary
Modifier and TypeMethodDescriptionas(AliasReferenceSpec alias) <T> ConvertSpec<T> Converts the value of the database column targeted by this field into the specified Java type.toString()
-
Field Details
-
dtoClass
Class of the DTO the field belongs to -
field
Target field name. -
pendingExpressionSpec
Pending chained expression spec to use;
-
-
Constructor Details
-
QueryField
Creates a newQueryFieldinstance.- Parameters:
dtoClass- DTO class the field belongs to.field- Target field name.
-
QueryField
-
-
Method Details
-
as
-
as
-
convert
Converts the value of the database column targeted by this field into the specified Java type.This uses Litebridge's registered type converter to perform the conversion; it is not a database operation.
- Type Parameters:
T- The type to convert the expression result to- Parameters:
returnType- The type to convert the expression result to- Returns:
- a
ProtoColumnExpressionSpecexpression instance to convert the return value of the nested expression
-
toString
-