Class QObjectReferenceMapping<OS extends ObjectType,OQ extends QObject<OR>,OR extends MObject>
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<ObjectReferenceType,Q,R>
com.evolveum.midpoint.repo.sqale.qmodel.ref.QReferenceMapping<QObjectReference<OR>,MReference,OQ,OR>
com.evolveum.midpoint.repo.sqale.qmodel.ref.QObjectReferenceMapping<OS,OQ,OR>
- Type Parameters:
OS
- owner schema typeOQ
- query type of the reference ownerOR
- row type of the reference owner (related toQObjectReferenceMapping
)
- All Implemented Interfaces:
QOwnedByMapping<ObjectReferenceType,
,MReference, OR> SqaleMappingMixin<ObjectReferenceType,
QObjectReference<OR>, MReference>
public class QObjectReferenceMapping<OS extends ObjectType,OQ extends QObject<OR>,OR extends MObject>
extends QReferenceMapping<QObjectReference<OR>,MReference,OQ,OR>
Mapping between
QObjectReference
and ObjectReferenceType
.
The mapping is the same for all sub-tables, see various static `get*()` methods below.
Mapping instances are initialized (`init*()` methods) in QObjectMapping
subclasses.
Both `init*` and `get*` methods are flexibly parametrized to adapt to the client code.
Init methods can be called multiple times, only one instance for each sub-tables is created.-
Field Summary
Modifier and TypeFieldDescriptionstatic QObjectReferenceMapping<?,
?, ?> static QObjectReferenceMapping<?,
?, ?> static QObjectReferenceMapping<?,
?, ?> static QObjectReferenceMapping<?,
?, ?> static QObjectReferenceMapping<?,
QObjectTemplate, MObject> static QObjectReferenceMapping<?,
?, ?> static QObjectReferenceMapping<?,
?, ?> static QObjectReferenceMapping<?,
?, ?> static QObjectReferenceMapping<?,
?, ?> static QObjectReferenceMapping<?,
QResource, MResource> static QObjectReferenceMapping<?,
?, ?> Fields inherited from class com.evolveum.midpoint.repo.sqale.qmodel.ref.QReferenceMapping
DEFAULT_ALIAS_NAME, MAPPING_BY_OWNER_TYPE_AND_PATH, referencePath
Fields inherited from class com.evolveum.midpoint.repo.sqlbase.mapping.QueryModelMapping
logger
-
Method Summary
Modifier and TypeMethodDescriptionBiFunction<OQ,
QObjectReference<OR>, com.querydsl.core.types.Predicate> Returns a bi-function that constructs correlation query predicate for owner and reference.createRowTransformer
(SqlQueryContext<ObjectReferenceType, QObjectReference<OR>, MReference> sqlQueryContext, JdbcSession jdbcSession) References are extracted from their owner objects insideResultListRowTransformer.beforeTransformation(java.util.List<com.querydsl.core.Tuple>, Q)
.static <OQ extends QObject<OR>,
OR extends MObject>
QObjectReferenceMapping<?,OQ, OR> static <Q extends QObject<R>,
R extends MObject>
QObjectReferenceMapping<?,Q, R> static <Q extends QObject<R>,
R extends MObject>
QObjectReferenceMapping<?,Q, R> static <Q extends QObject<R>,
R extends MObject>
QObjectReferenceMapping<?,Q, R> static QObjectReferenceMapping<?,
QObjectTemplate, MObject> static <Q extends QObject<R>,
R extends MObject>
QObjectReferenceMapping<?,Q, R> static <OQ extends QObject<OR>,
OR extends MObject>
QObjectReferenceMapping<?,OQ, OR> static <Q extends QObject<R>,
R extends MObject>
QObjectReferenceMapping<?,Q, R> static <Q extends QObject<R>,
R extends MObject>
QObjectReferenceMapping<?,Q, R> static QObjectReferenceMapping<?,
QResource, MResource> static <OS extends ObjectType,
OQ extends QObject<OR>, OR extends MObject>
QObjectReferenceMapping<OS,OQ, OR> static <Q extends QObject<R>,
R extends MObject>
QObjectReferenceMapping<?,Q, R> initForArchetype
(@NotNull SqaleRepoContext repositoryContext) static <Q extends QObject<R>,
R extends MObject>
QObjectReferenceMapping<?,Q, R> initForCreateApprover
(@NotNull SqaleRepoContext repositoryContext) static <OQ extends QObject<OR>,
OR extends MObject>
QObjectReferenceMapping<?,OQ, OR> initForDelegated
(@NotNull SqaleRepoContext repositoryContext) static <Q extends QObject<R>,
R extends MObject>
QObjectReferenceMapping<?,Q, R> initForEffectiveMark
(@NotNull SqaleRepoContext repositoryContext) static QObjectReferenceMapping<?,
QObjectTemplate, MObject> initForInclude
(@NotNull SqaleRepoContext repositoryContext) static <Q extends QObject<R>,
R extends MObject>
QObjectReferenceMapping<?,Q, R> initForModifyApprover
(@NotNull SqaleRepoContext repositoryContext) static <Q extends QObject<R>,
R extends MObject>
QObjectReferenceMapping<?,Q, R> initForParentOrg
(@NotNull SqaleRepoContext repositoryContext) static <Q extends QObject<R>,
R extends MObject>
QObjectReferenceMapping<?,Q, R> initForPersona
(@NotNull SqaleRepoContext repositoryContext) static <Q extends QObject<R>,
R extends MObject>
QObjectReferenceMapping<?,Q, R> initForProjection
(@NotNull SqaleRepoContext repositoryContext) static QObjectReferenceMapping<?,
QResource, MResource> initForResourceBusinessConfigurationApprover
(@NotNull SqaleRepoContext repositoryContext) static <OS extends ObjectType,
OQ extends QObject<OR>, OR extends MObject>
QObjectReferenceMapping<OS,OQ, OR> initForRoleMembership
(@NotNull SqaleRepoContext repositoryContext) protected QObjectReference<OR>
newAliasInstance
(String alias) Method returning new instance ofEntityPath
- to be implemented by sub-mapping.newRowObject
(MObject ownerRow) Defines a contract for creating the reference for the provided owner row.Methods inherited from class com.evolveum.midpoint.repo.sqale.qmodel.ref.QReferenceMapping
getByOwnerTypeAndPath, init, insert, registerByOwnerTypeAndPath
Methods inherited from class com.evolveum.midpoint.repo.sqale.mapping.SqaleTableMapping
addExtensionMapping, binaryMapper, booleanMapper, createFullObject, 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, toSchemaObject, toSchemaObject, 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
-
instanceArchetype
-
instanceDelegated
-
instanceInclude
-
instanceProjection
-
instanceCreateApprover
-
instanceModifyApprover
-
instanceParentOrg
-
instancePersona
-
instanceResourceBusinessConfigurationApprover
public static QObjectReferenceMapping<?,QResource, instanceResourceBusinessConfigurationApproverMResource> -
instanceRoleMembership
-
instanceEffectiveMark
-
-
Method Details
-
initForArchetype
public static <Q extends QObject<R>,R extends MObject> QObjectReferenceMapping<?,Q, initForArchetypeR> (@NotNull @NotNull SqaleRepoContext repositoryContext) -
getForArchetype
public static <OQ extends QObject<OR>,OR extends MObject> QObjectReferenceMapping<?,OQ, getForArchetype()OR> -
initForDelegated
public static <OQ extends QObject<OR>,OR extends MObject> QObjectReferenceMapping<?,OQ, initForDelegatedOR> (@NotNull @NotNull SqaleRepoContext repositoryContext) -
getForDelegated
public static <Q extends QObject<R>,R extends MObject> QObjectReferenceMapping<?,Q, getForDelegated()R> -
initForEffectiveMark
public static <Q extends QObject<R>,R extends MObject> QObjectReferenceMapping<?,Q, initForEffectiveMarkR> (@NotNull @NotNull SqaleRepoContext repositoryContext) -
getForEffectiveMark
public static <Q extends QObject<R>,R extends MObject> QObjectReferenceMapping<?,Q, getForEffectiveMark()R> -
initForInclude
public static QObjectReferenceMapping<?,QObjectTemplate, initForIncludeMObject> (@NotNull @NotNull SqaleRepoContext repositoryContext) -
getForInclude
-
initForProjection
public static <Q extends QObject<R>,R extends MObject> QObjectReferenceMapping<?,Q, initForProjectionR> (@NotNull @NotNull SqaleRepoContext repositoryContext) -
getForProjection
public static <Q extends QObject<R>,R extends MObject> QObjectReferenceMapping<?,Q, getForProjection()R> -
initForCreateApprover
public static <Q extends QObject<R>,R extends MObject> QObjectReferenceMapping<?,Q, initForCreateApproverR> (@NotNull @NotNull SqaleRepoContext repositoryContext) -
getForCreateApprover
public static <Q extends QObject<R>,R extends MObject> QObjectReferenceMapping<?,Q, getForCreateApprover()R> -
initForModifyApprover
public static <Q extends QObject<R>,R extends MObject> QObjectReferenceMapping<?,Q, initForModifyApproverR> (@NotNull @NotNull SqaleRepoContext repositoryContext) -
getForModifyApprover
public static <Q extends QObject<R>,R extends MObject> QObjectReferenceMapping<?,Q, getForModifyApprover()R> -
initForParentOrg
public static <Q extends QObject<R>,R extends MObject> QObjectReferenceMapping<?,Q, initForParentOrgR> (@NotNull @NotNull SqaleRepoContext repositoryContext) -
getForParentOrg
public static <OQ extends QObject<OR>,OR extends MObject> QObjectReferenceMapping<?,OQ, getForParentOrg()OR> -
initForPersona
public static <Q extends QObject<R>,R extends MObject> QObjectReferenceMapping<?,Q, initForPersonaR> (@NotNull @NotNull SqaleRepoContext repositoryContext) -
getForPersona
public static <Q extends QObject<R>,R extends MObject> QObjectReferenceMapping<?,Q, getForPersona()R> -
initForResourceBusinessConfigurationApprover
public static QObjectReferenceMapping<?,QResource, initForResourceBusinessConfigurationApproverMResource> (@NotNull @NotNull SqaleRepoContext repositoryContext) -
getForResourceBusinessConfigurationApprover
public static QObjectReferenceMapping<?,QResource, getForResourceBusinessConfigurationApprover()MResource> -
initForRoleMembership
public static <OS extends ObjectType,OQ extends QObject<OR>, QObjectReferenceMapping<OS,OR extends MObject> OQ, initForRoleMembershipOR> (@NotNull @NotNull SqaleRepoContext repositoryContext) -
getForRoleMembership
public static <OS extends ObjectType,OQ extends QObject<OR>, QObjectReferenceMapping<OS,OR extends MObject> OQ, getForRoleMembership()OR> -
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.- Overrides:
newAliasInstance
in classQReferenceMapping<QObjectReference<OR extends MObject>,
MReference, OQ extends QObject<OR>, OR extends MObject>
-
newRowObject
Description copied from class:QReferenceMapping
Defines a contract for creating the reference for the provided owner row.- Specified by:
newRowObject
in interfaceQOwnedByMapping<OS extends ObjectType,
OQ extends QObject<OR>, OR extends MObject> - Overrides:
newRowObject
in classQReferenceMapping<QObjectReference<OR extends MObject>,
MReference, OQ extends QObject<OR>, OR extends MObject>
-
correlationPredicate
Description copied from class:QReferenceMapping
Returns a bi-function that constructs correlation query predicate for owner and reference.- Overrides:
correlationPredicate
in classQReferenceMapping<QObjectReference<OR extends MObject>,
MReference, OQ extends QObject<OR>, OR extends MObject>
-
createRowTransformer
public ResultListRowTransformer<ObjectReferenceType,QObjectReference<OR>, createRowTransformerMReference> (SqlQueryContext<ObjectReferenceType, QObjectReference<OR>, MReference> sqlQueryContext, JdbcSession jdbcSession) References are extracted from their owner objects insideResultListRowTransformer.beforeTransformation(java.util.List<com.querydsl.core.Tuple>, Q)
.- Overrides:
createRowTransformer
in classSqaleTableMapping<ObjectReferenceType,
QObjectReference<OR extends MObject>, MReference>
-