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 theQContainerMapping
OR
- type of the owner row
- All Implemented Interfaces:
QOwnedByMapping<S,
,R, OR> SqaleMappingMixin<S,
Q, R>
- Direct Known Subclasses:
QAccessCertificationCaseMapping
,QAccessCertificationWorkItemMapping
,QAffectedObjectsMapping
,QAssignmentMapping
,QCaseWorkItemMapping
,QFocusIdentityMapping
,QLookupTableRowMapping
,QOperationExecutionMapping
,QProcessedObjectMapping
,QTriggerMapping
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
Fields inherited from class com.evolveum.midpoint.repo.sqlbase.mapping.QueryModelMapping
logger
-
Constructor Summary
ModifierConstructorDescriptionprotected
QContainerMapping
(@NotNull String tableName, @NotNull String defaultAliasName, @NotNull Class<S> schemaType, @NotNull Class<Q> queryType, @NotNull SqaleRepoContext repositoryContext) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
attachOwnerOid
(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.com.querydsl.core.types.Predicate
containerIdentityPredicate
(Q entityPath, S container) static QContainerMapping<?,
?, ?, ?> initContainerMapping
(@NotNull SqaleRepoContext repositoryContext) initRowObject
(S schemaObject, OR ownerRow) This creates the right type of object and fills in the baseMContainer
attributes.insert
(S schemaObject, OR ownerRow, JdbcSession jdbcSession) protected Q
newAliasInstance
(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.toSchemaObject
(@NotNull com.querydsl.core.Tuple tuple, Q entityPath, @NotNull JdbcSession jdbcSession, Collection<SelectorOptions<GetOperationOptions>> options) Transforms row Tuple containingSqaleTableMapping
under entity path and extension columns.toSchemaObject
(R row) Implemented for searchable containers that do not use fullObject for their recreation.Methods inherited from class com.evolveum.midpoint.repo.sqale.mapping.SqaleTableMapping
addExtensionMapping, binaryMapper, booleanMapper, createFullObject, createRowTransformer, enumMapper, fullObjectItemsToSkip, insert, integerMapper, multiPolyStringMapper, multiStringMapper, multiUriMapper, multiValueMapper, needsInitialization, objectReference, objectReference, objectTypeToQName, parseSchemaObject, parseSchemaObject, polyStringMapper, processCacheableRelation, processCacheableUri, processCacheableUri, processCacheableUris, processExtensionColumns, processExtensions, repositoryContext, resolveIdToUri, resolveReferenceNames, resolveUriIdToQName, schemaTypeToObjectType, setPolyString, setReference, storeRefs, stringMapper, stringsToArray, timestampMapper, toSchemaObjectComplete, toSchemaObjectCompleteSafe, toSchemaObjectInternal, uriMapper, uuidMapper
Methods inherited from class com.evolveum.midpoint.repo.sqlbase.mapping.QueryTableMapping
addDetailFetchMapper, addExtensionColumn, defaultAlias, defaultAliasName, detailFetchMappers, getExtensionColumns, joinOn, longMapper, newAlias, newRowObject, prismContext, selectExpressions, selectExpressionsWithCustomColumns, tableName, toString, updateGetOptions
Methods inherited from class com.evolveum.midpoint.repo.sqlbase.mapping.QueryModelMapping
addItemMapping, addRelationResolver, getItemMapper, getItemMappings, getRelationResolver, itemDefinition, itemMapper, queryType, relationResolver, schemaType
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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:
toSchemaObject
in 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:SqaleTableMapping
Transforms row Tuple containingSqaleTableMapping
under 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 ofSqaleTableMapping.createRowTransformer(com.evolveum.midpoint.repo.sqlbase.SqlQueryContext<S, Q, R>, com.evolveum.midpoint.repo.sqlbase.JdbcSession)
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:
toSchemaObject
in classSqaleTableMapping<S extends Containerable,
Q extends QContainer<R, OR>, R extends MContainer> - Throws:
SchemaException
-
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:QueryTableMapping
Method 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:
newAliasInstance
in classQueryTableMapping<S extends Containerable,
Q extends QContainer<R, OR>, R extends MContainer>
-
newRowObject
Description copied from interface:QOwnedByMapping
Returns a row with foreign key fields referencing the provided owner row.- Specified by:
newRowObject
in interfaceQOwnedByMapping<S extends Containerable,
Q extends QContainer<R, OR>, R extends MContainer>
-
initRowObject
This creates the right type of object and fills in the baseMContainer
attributes. -
insert
- Specified by:
insert
in interfaceQOwnedByMapping<S extends Containerable,
Q extends QContainer<R, OR>, R extends MContainer> - Throws:
SchemaException
-
containerIdentityPredicate
-