Package com.evolveum.midpoint.repo.sqale
Class SqaleRepoContext
- java.lang.Object
-
- com.evolveum.midpoint.repo.sqlbase.SqlRepoContext
-
- com.evolveum.midpoint.repo.sqale.SqaleRepoContext
-
public class SqaleRepoContext extends SqlRepoContext
SQL repository context adding support for QName cache.
-
-
Field Summary
-
Fields inherited from class com.evolveum.midpoint.repo.sqlbase.SqlRepoContext
querydslConfig, schemaService
-
-
Constructor Summary
Constructors Constructor Description SqaleRepoContext(JdbcRepositoryConfiguration jdbcRepositoryConfiguration, DataSource dataSource, SchemaService schemaService, QueryModelMappingRegistry mappingRegistry, String schemaChangeNumberLabel, int schemaChangeNumberValue)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearCaches()byte[]createFullResult(OperationResultType operationResult)StringfullTextIndex(ObjectType object)Returns string with words for full-text index, or null if there is nothing to index.@Nullable MExtItemgetExtensionItem(MExtItem.Key extItemKey)@Nullable MExtItemgetExtensionItem(Integer id)voidinitialize()IntegerprocessCacheableRelation(QName qName)Returns ID for relation QName creating newQUrirow in DB as needed.IntegerprocessCacheableUri(Object uri)Returns ID for URI creating new cache row in DB as needed.<S extends ObjectType>
booleanrequiresFullTextReindex(Collection<? extends ItemDelta<?,?>> modifications, PrismObject<S> prismObject)@NotNull MExtItemresolveExtensionItem(MExtItem.Key extItemKey)StringresolveIdToUri(Integer uriId)QNameresolveUriIdToQName(Integer uriId)@NotNull IntegersearchCachedRelationId(QName qName)Returns ID for relation QName orUriCache.UNKNOWN_IDwithout going to the database.@NotNull IntegersearchCachedUriId(@NotNull Object uri)Supports search for URI ID by QName or String or any other type using `toString`.voidsetFullTextSearchConfiguration(FullTextSearchConfigurationType fullTextSearchConfig)-
Methods inherited from class com.evolveum.midpoint.repo.sqlbase.SqlRepoContext
createStringParser, createStringSerializer, getJdbcRepositoryConfiguration, getMappingByQueryType, getMappingBySchemaType, getQuerydslConfiguration, getQuerydslTemplates, matchingRuleRegistry, newDelete, newInsert, newJdbcSession, newQuery, newQuery, newUpdate, normalizeAllRelations, normalizeRelation, parsePrismObject, prismContext, qNameToSchemaClass, relationRegistry, schemaClassToQName, setQuerydslSqlListener
-
-
-
-
Constructor Detail
-
SqaleRepoContext
public SqaleRepoContext(JdbcRepositoryConfiguration jdbcRepositoryConfiguration, DataSource dataSource, SchemaService schemaService, QueryModelMappingRegistry mappingRegistry, String schemaChangeNumberLabel, int schemaChangeNumberValue)
-
-
Method Detail
-
initialize
@PostConstruct public void initialize()
-
clearCaches
public void clearCaches()
-
searchCachedUriId
@NotNull public @NotNull Integer searchCachedUriId(@NotNull @NotNull Object uri)
Supports search for URI ID by QName or String or any other type using `toString`.
-
searchCachedRelationId
@NotNull public @NotNull Integer searchCachedRelationId(QName qName)
Returns ID for relation QName orUriCache.UNKNOWN_IDwithout going to the database. Relation is normalized before consultingUriCache. Never returns null; returns default ID for configured default relation if provided with null.
-
processCacheableUri
public Integer processCacheableUri(Object uri)
Returns ID for URI creating new cache row in DB as needed.
-
processCacheableRelation
public Integer processCacheableRelation(QName qName)
Returns ID for relation QName creating newQUrirow in DB as needed. Relation is normalized before consulting the cache. Never returns null, returns default ID for configured default relation.
-
resolveExtensionItem
@NotNull public @NotNull MExtItem resolveExtensionItem(@NotNull MExtItem.Key extItemKey)
-
getExtensionItem
@Nullable public @Nullable MExtItem getExtensionItem(MExtItem.Key extItemKey)
-
setFullTextSearchConfiguration
public void setFullTextSearchConfiguration(FullTextSearchConfigurationType fullTextSearchConfig)
-
fullTextIndex
public String fullTextIndex(ObjectType object)
Returns string with words for full-text index, or null if there is nothing to index. This also checks whether the configuration is enabled.
-
requiresFullTextReindex
public <S extends ObjectType> boolean requiresFullTextReindex(Collection<? extends ItemDelta<?,?>> modifications, PrismObject<S> prismObject)
-
createFullResult
public byte[] createFullResult(OperationResultType operationResult)
-
-