Interface SqlTransformer<S,Q extends FlexibleRelationalPathBase<R>,R>
-
- Type Parameters:
S
- schema typeQ
- type of entity pathR
- type of the transformed data, a row bean
public interface SqlTransformer<S,Q extends FlexibleRelationalPathBase<R>,R>
Contract for SQL transformers translating from query beans or tuples to model types. TODO: Competencies of this class are not clear yet; in general it contains the "stuff specific to the related type". It may not only transform, but can also store entities (especially sub-entities of object aggregate) and more which is a bit beyond mere "transformation". Also the implemented methods vary wildly as some are used by very generic mechanisms (query interpreter) while others are called on concrete transformer of known type needed in particular situation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
SqlTransformer.SqlTransformationException
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description S
toSchemaObject(com.querydsl.core.Tuple row, Q entityPath, Collection<SelectorOptions<GetOperationOptions>> options)
Transforms row Tuple containing attributes ofSqlTransformer
to schema typeSqlTransformer
.S
toSchemaObject(R row)
Transforms row ofSqlTransformer
type to schema typeSqlTransformer
.default S
toSchemaObjectSafe(com.querydsl.core.Tuple tuple, Q entityPath, Collection<SelectorOptions<GetOperationOptions>> options)
-
-
-
Method Detail
-
toSchemaObject
S toSchemaObject(R row) throws SchemaException
Transforms row ofSqlTransformer
type to schema typeSqlTransformer
. If pre-generated bean is used as row it does not include extension (dynamic) columns, which is OK if extension columns are used only for query and their information is still contained in the object somehow else (e.g. full object LOB).Alternative would be dynamically generated list of select expressions and transforming row to M object directly from
Tuple
.- Throws:
SchemaException
-
toSchemaObject
S toSchemaObject(com.querydsl.core.Tuple row, Q entityPath, Collection<SelectorOptions<GetOperationOptions>> options) throws SchemaException
Transforms row Tuple containing attributes ofSqlTransformer
to schema typeSqlTransformer
. Entity path can be used to access tuple elements. This allows loading also dynamically defined columns (like extensions).- Throws:
SchemaException
-
toSchemaObjectSafe
default S toSchemaObjectSafe(com.querydsl.core.Tuple tuple, Q entityPath, Collection<SelectorOptions<GetOperationOptions>> options)
-
-