use of com.evolveum.midpoint.repo.sqlbase.mapping.QueryModelMappingRegistry in project midpoint by Evolveum.
the class SqaleAuditServiceFactory method createSqaleRepoContext.
private SqaleRepoContext createSqaleRepoContext(JdbcRepositoryConfiguration config, DataSource dataSource, SchemaService schemaService) {
QueryModelMappingRegistry mappingRegistry = new QueryModelMappingRegistry();
SqaleRepoContext repositoryContext = new SqaleRepoContext(config, dataSource, schemaService, mappingRegistry);
repositoryContext.setQuerydslSqlListener(new SqlLogger());
// Registered mapping needs repository context which needs registry - now we have both:
mappingRegistry.register(AuditEventRecordType.COMPLEX_TYPE, QAuditEventRecordMapping.init(repositoryContext)).register(QAuditRefValueMapping.init(repositoryContext)).register(QAuditDeltaMapping.init(repositoryContext)).seal();
return repositoryContext;
}
use of com.evolveum.midpoint.repo.sqlbase.mapping.QueryModelMappingRegistry in project midpoint by Evolveum.
the class SqlAuditServiceFactory method createSqlRepoContext.
private SqlRepoContext createSqlRepoContext(JdbcRepositoryConfiguration config, DataSource dataSource, SchemaService schemaService) {
QueryModelMappingRegistry mappingRegistry = new QueryModelMappingRegistry();
SqlRepoContext repositoryContext = new SqlRepoContext(config, dataSource, schemaService, mappingRegistry);
repositoryContext.setQuerydslSqlListener(new SqlLogger());
// Registered mapping needs repository context which needs registry - but we fill it now:
mappingRegistry.register(AuditEventRecordType.COMPLEX_TYPE, QAuditEventRecordMapping.init(repositoryContext)).register(QAuditItemMapping.init(repositoryContext)).register(QAuditPropertyValueMapping.init(repositoryContext)).register(QAuditRefValueMapping.init(repositoryContext)).register(QAuditResourceMapping.init(repositoryContext)).register(QAuditDeltaMapping.init(repositoryContext)).seal();
return repositoryContext;
}
use of com.evolveum.midpoint.repo.sqlbase.mapping.QueryModelMappingRegistry in project midpoint by Evolveum.
the class SqaleRepositoryBeanConfig method sqlRepoContext.
@Bean
public SqaleRepoContext sqlRepoContext(SqaleRepositoryConfiguration repositoryConfiguration, SchemaService schemaService, DataSource dataSource) {
QueryModelMappingRegistry mappingRegistry = new QueryModelMappingRegistry();
SqaleRepoContext repositoryContext = new SqaleRepoContext(repositoryConfiguration, dataSource, schemaService, mappingRegistry);
// logger on com.evolveum.midpoint.repo.sqlbase.querydsl.SqlLogger
// DEBUG = show query, TRACE = add parameter values too (bindings)
repositoryContext.setQuerydslSqlListener(new SqlLogger());
// Registered mapping needs repository context which needs registry. Now we can fill it.
// Mappings are ordered alphabetically here, mappings without schema type are at the end.
mappingRegistry.register(AbstractRoleType.COMPLEX_TYPE, QAbstractRoleMapping.initAbstractRoleMapping(repositoryContext)).register(AccessCertificationCampaignType.COMPLEX_TYPE, QAccessCertificationCampaignMapping.initAccessCertificationCampaignMapping(repositoryContext)).register(AccessCertificationCaseType.COMPLEX_TYPE, QAccessCertificationCaseMapping.initAccessCertificationCaseMapping(repositoryContext)).register(AccessCertificationDefinitionType.COMPLEX_TYPE, QAccessCertificationDefinitionMapping.init(repositoryContext)).register(AccessCertificationWorkItemType.COMPLEX_TYPE, QAccessCertificationWorkItemMapping.init(repositoryContext)).register(ArchetypeType.COMPLEX_TYPE, QArchetypeMapping.initArchetypeMapping(repositoryContext)).register(AssignmentHolderType.COMPLEX_TYPE, QAssignmentHolderMapping.initAssignmentHolderMapping(repositoryContext)).register(AssignmentType.COMPLEX_TYPE, QAssignmentMapping.initAssignmentMapping(repositoryContext)).register(CaseType.COMPLEX_TYPE, QCaseMapping.initCaseMapping(repositoryContext)).register(CaseWorkItemType.COMPLEX_TYPE, QCaseWorkItemMapping.initCaseWorkItemMapping(repositoryContext)).register(DashboardType.COMPLEX_TYPE, QDashboardMapping.init(repositoryContext)).register(FocusType.COMPLEX_TYPE, QFocusMapping.initFocusMapping(repositoryContext)).register(FormType.COMPLEX_TYPE, QFormMapping.init(repositoryContext)).register(FunctionLibraryType.COMPLEX_TYPE, QFunctionLibraryMapping.init(repositoryContext)).register(ConnectorType.COMPLEX_TYPE, QConnectorMapping.init(repositoryContext)).register(ConnectorHostType.COMPLEX_TYPE, QConnectorHostMapping.init(repositoryContext)).register(GenericObjectType.COMPLEX_TYPE, QGenericObjectMapping.init(repositoryContext)).register(LookupTableType.COMPLEX_TYPE, QLookupTableMapping.init(repositoryContext)).register(LookupTableRowType.COMPLEX_TYPE, QLookupTableRowMapping.init(repositoryContext)).register(MessageTemplateType.COMPLEX_TYPE, QMessageTemplateMapping.init(repositoryContext)).register(NodeType.COMPLEX_TYPE, QNodeMapping.init(repositoryContext)).register(ObjectType.COMPLEX_TYPE, QObjectMapping.initObjectMapping(repositoryContext)).register(ObjectCollectionType.COMPLEX_TYPE, QObjectCollectionMapping.init(repositoryContext)).register(ObjectTemplateType.COMPLEX_TYPE, QObjectTemplateMapping.initObjectTemplateMapping(repositoryContext)).register(OperationExecutionType.COMPLEX_TYPE, QOperationExecutionMapping.init(repositoryContext)).register(OrgType.COMPLEX_TYPE, QOrgMapping.initOrgMapping(repositoryContext)).register(ReportType.COMPLEX_TYPE, QReportMapping.init(repositoryContext)).register(ReportDataType.COMPLEX_TYPE, QReportDataMapping.init(repositoryContext)).register(ResourceType.COMPLEX_TYPE, QResourceMapping.init(repositoryContext)).register(RoleType.COMPLEX_TYPE, QRoleMapping.init(repositoryContext)).register(SecurityPolicyType.COMPLEX_TYPE, QSecurityPolicyMapping.init(repositoryContext)).register(SequenceType.COMPLEX_TYPE, QSequenceMapping.init(repositoryContext)).register(ServiceType.COMPLEX_TYPE, QServiceMapping.init(repositoryContext)).register(ShadowType.COMPLEX_TYPE, QShadowMapping.initShadowMapping(repositoryContext)).register(SystemConfigurationType.COMPLEX_TYPE, QSystemConfigurationMapping.init(repositoryContext)).register(TaskType.COMPLEX_TYPE, QTaskMapping.init(repositoryContext)).register(TriggerType.COMPLEX_TYPE, QTriggerMapping.init(repositoryContext)).register(UserType.COMPLEX_TYPE, QUserMapping.initUserMapping(repositoryContext)).register(ValuePolicyType.COMPLEX_TYPE, QValuePolicyMapping.init(repositoryContext)).register(QContainerMapping.initContainerMapping(repositoryContext)).register(QReferenceMapping.init(repositoryContext)).seal();
return repositoryContext;
}
Aggregations