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

    • Constructor Detail

      • SqlTransformer

        protected SqlTransformer​(PrismContext prismContext,
                                 QueryModelMapping<S,​Q,​R> mapping,
                                 com.querydsl.sql.Configuration querydslConfiguration)
    • Method Detail

      • toSchemaObject

        public abstract S toSchemaObject​(R row)
                                  throws SchemaException
        Transforms row of R to M type - typically a model/schema object. 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
      • processExtensionColumns

        protected void processExtensionColumns​(S schemaObject,
                                               com.querydsl.core.Tuple tuple,
                                               Q entityPath)
      • toSchemaObjectSafe

        public S toSchemaObjectSafe​(com.querydsl.core.Tuple row,
                                    Q entityPath)
      • objectReferenceType

        @Nullable
        protected @Nullable ObjectReferenceType objectReferenceType​(@Nullable
                                                                    @Nullable String oid,
                                                                    RObjectType repoObjectType,
                                                                    String description)
        Returns ObjectReferenceType with specified oid, proper type based on RObjectType and, optionally, description. Returns null if OID is null. Fails if OID is not null and repoObjectType is null.
      • repoObjectType

        @NotNull
        protected @NotNull RObjectType repoObjectType​(@Nullable
                                                      @Nullable Integer repoObjectTypeId,
                                                      @NotNull
                                                      @NotNull RObjectType defaultValue)
        Returns RObjectType from ordinal Integer or specified default value.
      • trim

        @Nullable
        protected @Nullable String trim​(@Nullable
                                        @Nullable String value,
                                        @NotNull
                                        @NotNull com.querydsl.sql.ColumnMetadata columnMetadata)
        Trimming the value to the column size from column metadata (must be specified).