java.lang.Object
org.litebridgedb.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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionQueryField(Class<?> dtoClass, String field) Creates a newQueryFieldinstance. -
Method Summary
Modifier and TypeMethodDescription<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.
-
-
Constructor Details
-
QueryField
Creates a newQueryFieldinstance.- Parameters:
dtoClass- DTO class the field belongs to.field- Target field name.
-
-
Method Details
-
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.
- Parameters:
returnType- The type to convert the expression result to- Returns:
- a
ProtoColumnExpressionSpecexpression instance to convert the return value of the nested expression
-
toString
-