Class QContainerMapping<S extends Containerable,Q extends QContainer<R,OR>,R extends MContainer,OR>
java.lang.Object
com.evolveum.midpoint.repo.sqlbase.mapping.QueryModelMapping<S,Q,R>
com.evolveum.midpoint.repo.sqlbase.mapping.QueryTableMapping<S,Q,R>
com.evolveum.midpoint.repo.sqale.mapping.SqaleTableMapping<S,Q,R>
com.evolveum.midpoint.repo.sqale.qmodel.common.QContainerMapping<S,Q,R,OR>
- Type Parameters:
S- schema typeQ- type of entity pathR- row type related to theQContainerMappingOR- type of the owner row
- All Implemented Interfaces:
QOwnedByMapping<S,,R, OR> SqaleMappingMixin<S,Q, R>
- Direct Known Subclasses:
QAccessCertificationCaseMapping,QAccessCertificationWorkItemMapping,QAffectedObjectsMapping,QCaseWorkItemMapping,QClusterDetectedPatternMapping,QContainerWithFullObjectMapping,QLookupTableRowMapping,QOutlierPartitionMapping,QProcessedObjectMapping,QTriggerMapping,QValueMetadataMapping
public class QContainerMapping<S extends Containerable,Q extends QContainer<R,OR>,R extends MContainer,OR>
extends SqaleTableMapping<S,Q,R>
implements QOwnedByMapping<S,R,OR>
Mapping between
QContainer and Containerable.-
Field Summary
FieldsFields inherited from class com.evolveum.midpoint.repo.sqlbase.mapping.QueryModelMapping
logger -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedQContainerMapping(@NotNull String tableName, @NotNull String defaultAliasName, @NotNull Class<S> schemaType, @NotNull Class<Q> queryType, @NotNull SqaleRepoContext repositoryContext) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidattachContainerIdPath(S ret, com.querydsl.core.Tuple tuple, Q entityPath) protected voidattachOwnerOid(S ret, com.querydsl.core.Tuple tuple, Q entityPath) Attaches ownerOid (UUID) to user data of container, since this is required for iterativer search for proper continuation.intcom.querydsl.core.types.PredicatecontainerIdentityPredicate(Q entityPath, S container) containerIdPath(com.querydsl.core.Tuple tuple, Q e) Descendant path of container ids to current rowstatic QContainerMapping<?,?, ?, ?> initContainerMapping(@NotNull SqaleRepoContext repositoryContext) initRowObject(S schemaObject, OR ownerRow) This creates the right type of object and fills in the baseMContainerattributes.insert(S schemaObject, OR ownerRow, JdbcSession jdbcSession) protected QnewAliasInstance(String alias) Method returning new instance ofEntityPath- to be implemented by sub-mapping.newRowObject(OR ownerRow) Returns a row with foreign key fields referencing the provided owner row.@NotNull com.querydsl.core.types.Path<?>[]selectExpressions(Q entity, Collection<SelectorOptions<GetOperationOptions>> options) By default, usesQueryTableMapping.selectExpressionsWithCustomColumns(Q)and does not use options.toSchemaObject(@NotNull com.querydsl.core.Tuple tuple, Q entityPath, @NotNull JdbcSession jdbcSession, Collection<SelectorOptions<GetOperationOptions>> options) Transforms row Tuple containingSqaleTableMappingunder entity path and extension columns.toSchemaObject(R row) Implemented for searchable containers that do not use fullObject for their recreation.booleanMethods inherited from class com.evolveum.midpoint.repo.sqale.mapping.SqaleTableMapping
addExtensionMapping, binaryMapper, booleanMapper, createFullObject, createRowTransformer, definitionDerivation, definitionDerivationKey, doubleMapper, enumMapper, fullObjectItemsToSkip, getDefinition, getPartitionManager, insert, integerMapper, multiPolyStringMapper, multiStringMapper, multiUriMapper, multiValueMapper, needsInitialization, objectReference, objectReference, objectTypeToQName, parseSchemaObject, parseSchemaObject, polyStringMapper, preprocessCacheableUris, processCacheableRelation, processCacheableUri, processCacheableUri, processCacheableUris, processExtensionColumns, processExtensions, repositoryContext, resolveIdToUri, resolveReferenceNames, resolveUriIdToQName, schemaTypeToObjectType, setPolyString, setReference, storeRefs, stringMapper, stringsToArray, timestampMapper, toSchemaObjectComplete, toSchemaObjectCompleteSafe, toSchemaObjectInternal, uriMapper, uuidMapperMethods inherited from class com.evolveum.midpoint.repo.sqlbase.mapping.QueryTableMapping
addDetailFetchMapper, addExtensionColumn, appendPaths, defaultAlias, defaultAliasName, detailFetchMappers, getExtensionColumns, joinOn, longMapper, newAlias, newRowObject, paths, prismContext, selectExpressionsWithCustomColumns, tableName, toString, updateGetOptionsMethods inherited from class com.evolveum.midpoint.repo.sqlbase.mapping.QueryModelMapping
addItemMapping, addRelationResolver, getItemMapper, getItemMappings, getRelationResolver, itemDefinition, itemMapper, queryType, relationResolver, schemaTypeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.evolveum.midpoint.repo.sqale.mapping.SqaleMappingMixin
addAuditRefMapping, addContainerTableMapping, addExtensionMapping, addItemMapping, addNestedMapping, addRefMapping, addRefMapping, addRelationResolver, afterModify, queryType
-
Field Details
-
DEFAULT_ALIAS_NAME
- See Also:
-
-
Constructor Details
-
QContainerMapping
-
-
Method Details
-
initContainerMapping
public static QContainerMapping<?,?, initContainerMapping?, ?> (@NotNull @NotNull SqaleRepoContext repositoryContext) -
toSchemaObject
Implemented for searchable containers that do not use fullObject for their recreation.- Overrides:
toSchemaObjectin classSqaleTableMapping<S extends Containerable,Q extends QContainer<R, OR>, R extends MContainer> - Throws:
SchemaException
-
toSchemaObject
public S toSchemaObject(@NotNull @NotNull com.querydsl.core.Tuple tuple, @NotNull Q entityPath, @NotNull @NotNull JdbcSession jdbcSession, Collection<SelectorOptions<GetOperationOptions>> options) throws SchemaException Description copied from class:SqaleTableMappingTransforms row Tuple containingSqaleTableMappingunder entity path and extension columns. While public, for Sqale repo it should only be called for internal mapping purposes. *Do not call this in result list transformers* because the results would not have resolved reference names (if requested). Notice that the default implementation ofQueryTableMapping.createRowTransformer(com.evolveum.midpoint.repo.sqlbase.SqlQueryContext<S, Q, R>, com.evolveum.midpoint.repo.sqlbase.JdbcSession, java.util.Collection<com.evolveum.midpoint.schema.SelectorOptions<com.evolveum.midpoint.schema.GetOperationOptions>>)in this class callsSqaleTableMapping.toSchemaObjectCompleteSafe(com.querydsl.core.Tuple, Q, java.util.Collection<com.evolveum.midpoint.schema.SelectorOptions<com.evolveum.midpoint.schema.GetOperationOptions>>, com.evolveum.midpoint.repo.sqlbase.JdbcSession, boolean)which is the right thing to call in result list transformers.- Overrides:
toSchemaObjectin classSqaleTableMapping<S extends Containerable,Q extends QContainer<R, OR>, R extends MContainer> - Throws:
SchemaException
-
attachContainerIdPath
-
selectExpressions
@NotNull public @NotNull com.querydsl.core.types.Path<?>[] selectExpressions(Q entity, Collection<SelectorOptions<GetOperationOptions>> options) Description copied from class:QueryTableMappingBy default, usesQueryTableMapping.selectExpressionsWithCustomColumns(Q)and does not use options. Can be overridden to fulfil other needs, e.g. to select just full object.- Overrides:
selectExpressionsin classQueryTableMapping<S extends Containerable,Q extends QContainer<R, OR>, R extends MContainer>
-
containerIdPath
Descendant path of container ids to current row -
attachOwnerOid
Attaches ownerOid (UUID) to user data of container, since this is required for iterativer search for proper continuation.- Parameters:
ret- Parsed Container Resulttuple- Tuple representing containerentityPath- path
-
newAliasInstance
Description copied from class:QueryTableMappingMethod returning new instance ofEntityPath- to be implemented by sub-mapping. This will create entity path without any extension columns, seeQueryTableMapping.newAlias(java.lang.String)for that.- Specified by:
newAliasInstancein classQueryTableMapping<S extends Containerable,Q extends QContainer<R, OR>, R extends MContainer>
-
newRowObject
Description copied from interface:QOwnedByMappingReturns a row with foreign key fields referencing the provided owner row.- Specified by:
newRowObjectin interfaceQOwnedByMapping<S extends Containerable,Q extends QContainer<R, OR>, R extends MContainer>
-
initRowObject
This creates the right type of object and fills in the baseMContainerattributes. -
insert
- Specified by:
insertin interfaceQOwnedByMapping<S extends Containerable,Q extends QContainer<R, OR>, R extends MContainer> - Throws:
SchemaException
-
containerIdentityPredicate
-
containerDepth
public int containerDepth() -
useDeltaApplyResults
public boolean useDeltaApplyResults()
-