Class QObjectReferenceFullObjectMapping<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>
com.evolveum.midpoint.repo.sqale.qmodel.ref.QObjectReferenceFullObjectMapping<OS,OQ,OR>
- All Implemented Interfaces:
QOwnedByMapping<ObjectReferenceType,,MReference, OR> SqaleMappingMixin<ObjectReferenceType,,QObjectReference<OR>, MReference> QSeparatelySerializedItem<QObjectReferenceWithMeta<OR>,MReference>
public class QObjectReferenceFullObjectMapping<OS extends ObjectType,OQ extends QObject<OR>,OR extends MObject>
extends QObjectReferenceMapping<OS,OQ,OR>
implements QSeparatelySerializedItem<QObjectReferenceWithMeta<OR>,MReference>
-
Field Summary
Fields inherited from class com.evolveum.midpoint.repo.sqale.qmodel.ref.QObjectReferenceMapping
instanceArchetype, instanceCreateApprover, instanceDelegated, instanceEffectiveMark, instanceInclude, instanceModifyApprover, instanceParentOrg, instancePersona, instanceProjection, instanceResourceBusinessConfigurationApprover, instanceRoleMembershipFields inherited from class com.evolveum.midpoint.repo.sqale.qmodel.ref.QReferenceMapping
DEFAULT_ALIAS_NAME, MAPPING_BY_OWNER_TYPE_AND_PATH, referencePathFields inherited from class com.evolveum.midpoint.repo.sqlbase.mapping.QueryModelMapping
logger -
Constructor Summary
ConstructorsConstructorDescriptionQObjectReferenceFullObjectMapping(Class<? extends ObjectType> baseType, ItemPath path, String tableName, String defaultAliasName, @NotNull SqaleRepoContext repositoryContext, @NotNull Supplier<QueryTableMapping<?, TQ, TR>> targetMappingSupplier, @Nullable Supplier<QueryTableMapping<OS, OQ, OR>> ownerMappingSupplier, @Nullable BiFunction<QObjectReference<OR>, OQ, com.querydsl.core.types.Predicate> ownerJoin, @Nullable Class<?> ownerType, @Nullable ItemPath referencePath) -
Method Summary
Modifier and TypeMethodDescriptionvoidafterModify(SqaleUpdateContext<ObjectReferenceType, QObjectReference<OR>, MReference> updateContext) Method called from `SqaleUpdateContext.finishExecutionOwn()` for containers.com.querydsl.core.types.PredicateallOwnedBy(QObjectReferenceWithMeta<OR> q, Collection<UUID> oidList) protected voidapplyToOwner(ObjectType owner, ObjectReferenceType candidate) <C extends Containerable>
byte[]com.querydsl.core.types.Path<?>[]getOwner(com.querydsl.core.Tuple row, QObjectReferenceWithMeta<OR> path) Class<? extends Item<? extends PrismValue,?>> booleanhasFullObject(com.querydsl.core.Tuple row, QObjectReferenceWithMeta<OR> path) protected voidinitRowObject(MReference row, ObjectReferenceType reference) insert(ObjectReferenceType reference, OR ownerRow, JdbcSession jdbcSession) There is no need to override this, only reference creation is different and that is covered byQReferenceMapping.newRowObject(Object)including setting FK columns.protected QObjectReferenceWithMeta<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.com.querydsl.core.types.OrderSpecifier<?>orderSpecifier(QObjectReferenceWithMeta<OR> orqObjectReferenceWithMeta) protected booleanrequiresParent(com.querydsl.core.Tuple t, QObjectReference<OR> entityPath) toSchemaObject(MReference row) Transforms row ofQueryTableMappingtype to schema typeQueryTableMapping.toSchemaObjectEmbedded(com.querydsl.core.Tuple row, QObjectReferenceWithMeta<OR> alias) Methods inherited from class com.evolveum.midpoint.repo.sqale.qmodel.ref.QObjectReferenceMapping
correlationPredicate, createRowTransformer, getForArchetype, getForCreateApprover, getForDelegated, getForEffectiveMark, getForInclude, getForModifyApprover, getForParentOrg, getForPersona, getForProjection, getForResourceBusinessConfigurationApprover, getForRoleMembership, initForArchetype, initForCreateApprover, initForDelegated, initForEffectiveMark, initForInclude, initForModifyApprover, initForParentOrg, initForPersona, initForProjection, initForResourceBusinessConfigurationApprover, initForRoleMembershipMethods inherited from class com.evolveum.midpoint.repo.sqale.qmodel.ref.QReferenceMapping
getByOwnerTypeAndPath, init, registerByOwnerTypeAndPathMethods inherited from class com.evolveum.midpoint.repo.sqale.mapping.SqaleTableMapping
addExtensionMapping, binaryMapper, booleanMapper, createFullObject, 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, toSchemaObject, 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, selectExpressions, 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.qmodel.object.QSeparatelySerializedItem
tableNameMethods inherited from interface com.evolveum.midpoint.repo.sqale.mapping.SqaleMappingMixin
addAuditRefMapping, addContainerTableMapping, addExtensionMapping, addItemMapping, addNestedMapping, addRefMapping, addRefMapping, addRelationResolver, queryType
-
Constructor Details
-
QObjectReferenceFullObjectMapping
public QObjectReferenceFullObjectMapping(Class<? extends ObjectType> baseType, ItemPath path, String tableName, String defaultAliasName, @NotNull @NotNull SqaleRepoContext repositoryContext, @NotNull @NotNull Supplier<QueryTableMapping<?, TQ, TR>> targetMappingSupplier, @Nullable @Nullable Supplier<QueryTableMapping<OS, OQ, OR>> ownerMappingSupplier, @Nullable @Nullable BiFunction<QObjectReference<OR>, OQ, com.querydsl.core.types.Predicate> ownerJoin, @Nullable @Nullable Class<?> ownerType, @Nullable @Nullable ItemPath referencePath)
-
-
Method Details
-
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.- Overrides:
newAliasInstancein classQObjectReferenceMapping<OS extends ObjectType,OQ extends QObject<OR>, OR extends MObject>
-
newRowObject
Description copied from class:QReferenceMappingDefines a contract for creating the reference for the provided owner row.- Specified by:
newRowObjectin interfaceQOwnedByMapping<OS extends ObjectType,OQ extends QObject<OR>, OR extends MObject> - Overrides:
newRowObjectin classQObjectReferenceMapping<OS extends ObjectType,OQ extends QObject<OR>, OR extends MObject>
-
initRowObject
- Overrides:
initRowObjectin classQReferenceMapping<QObjectReference<OR extends MObject>,MReference, OQ extends QObject<OR>, OR extends MObject> - Throws:
SchemaException
-
createFullObject
public <C extends Containerable> byte[] createFullObject(ObjectReferenceType ref) throws SchemaException - Throws:
SchemaException
-
insert
public MReference insert(ObjectReferenceType reference, OR ownerRow, JdbcSession jdbcSession) throws SchemaException Description copied from class:QReferenceMappingThere is no need to override this, only reference creation is different and that is covered byQReferenceMapping.newRowObject(Object)including setting FK columns. All the other columns are based on a single schema type, so there is no variation.- Specified by:
insertin interfaceQOwnedByMapping<OS extends ObjectType,OQ extends QObject<OR>, OR extends MObject> - Overrides:
insertin classQReferenceMapping<QObjectReference<OR extends MObject>,MReference, OQ extends QObject<OR>, OR extends MObject> - Throws:
SchemaException
-
afterModify
public void afterModify(SqaleUpdateContext<ObjectReferenceType, QObjectReference<OR>, throws SchemaExceptionMReference> updateContext) Description copied from interface:SqaleMappingMixinMethod called from `SqaleUpdateContext.finishExecutionOwn()` for containers. This can be handy when more than just column set is required, e.g. to refresh fullObject, etc.- Specified by:
afterModifyin interfaceSqaleMappingMixin<OS extends ObjectType,OQ extends QObject<OR>, OR extends MObject> - Overrides:
afterModifyin classQObjectReferenceMapping<OS extends ObjectType,OQ extends QObject<OR>, OR extends MObject> - Throws:
SchemaException
-
hasFullObject
- Specified by:
hasFullObjectin interfaceQSeparatelySerializedItem<OS extends ObjectType,OQ extends QObject<OR>>
-
fullObjectExpressions
- Specified by:
fullObjectExpressionsin interfaceQSeparatelySerializedItem<OS extends ObjectType,OQ extends QObject<OR>>
-
getPrismItemType
- Specified by:
getPrismItemTypein interfaceQSeparatelySerializedItem<OS extends ObjectType,OQ extends QObject<OR>>
-
allOwnedBy
public com.querydsl.core.types.Predicate allOwnedBy(QObjectReferenceWithMeta<OR> q, Collection<UUID> oidList) - Specified by:
allOwnedByin interfaceQSeparatelySerializedItem<OS extends ObjectType,OQ extends QObject<OR>>
-
toSchemaObject
Description copied from class:QueryTableMappingTransforms row ofQueryTableMappingtype to schema typeQueryTableMapping. 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 is to dynamically generate the list of select expressions reading directly from theTuple- seeQueryTableMapping.toSchemaObject(Tuple, FlexibleRelationalPathBase, JdbcSession, Collection).- Overrides:
toSchemaObjectin classSqaleTableMapping<ObjectReferenceType,QObjectReference<OR extends MObject>, MReference> - Throws:
SchemaException
-
toSchemaObjectEmbedded
public PrismReferenceValue toSchemaObjectEmbedded(com.querydsl.core.Tuple row, QObjectReferenceWithMeta<OR> alias) throws SchemaException - Specified by:
toSchemaObjectEmbeddedin interfaceQSeparatelySerializedItem<OS extends ObjectType,OQ extends QObject<OR>> - Throws:
SchemaException
-
getOwner
- Specified by:
getOwnerin interfaceQSeparatelySerializedItem<OS extends ObjectType,OQ extends QObject<OR>>
-
createAlias
- Specified by:
createAliasin interfaceQSeparatelySerializedItem<OS extends ObjectType,OQ extends QObject<OR>>
-
getItemPath
- Specified by:
getItemPathin interfaceQSeparatelySerializedItem<OS extends ObjectType,OQ extends QObject<OR>>
-
requiresParent
- Overrides:
requiresParentin classQObjectReferenceMapping<OS extends ObjectType,OQ extends QObject<OR>, OR extends MObject>
-
applyToOwner
- Overrides:
applyToOwnerin classQObjectReferenceMapping<OS extends ObjectType,OQ extends QObject<OR>, OR extends MObject> - Throws:
SchemaException
-
orderSpecifier
public com.querydsl.core.types.OrderSpecifier<?> orderSpecifier(QObjectReferenceWithMeta<OR> orqObjectReferenceWithMeta) - Specified by:
orderSpecifierin interfaceQSeparatelySerializedItem<OS extends ObjectType,OQ extends QObject<OR>>
-