Interface SqlTransformer<S,​Q extends FlexibleRelationalPathBase<R>,​R>

  • Type Parameters:
    S - schema type
    Q - type of entity path
    R - 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.
    • Method Detail

      • toSchemaObject

        S toSchemaObject​(R row)
                  throws SchemaException
        Transforms row of SqlTransformer type to schema type SqlTransformer. 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