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 void
clearCaches()
byte[]
createFullResult(OperationResultType operationResult)
String
fullTextIndex(ObjectType object)
Returns string with words for full-text index, or null if there is nothing to index.@Nullable MExtItem
getExtensionItem(MExtItem.ItemNameKey extItemKey)
@Nullable MExtItem
getExtensionItem(Integer id)
void
initialize()
Integer
processCacheableRelation(QName qName)
Returns ID for relation QName creating newQUri
row in DB as needed.Integer
processCacheableUri(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 MExtItem
resolveExtensionItem(MExtItem.Key extItemKey)
String
resolveIdToUri(Integer uriId)
QName
resolveUriIdToQName(Integer uriId)
@NotNull Integer
searchCachedRelationId(QName qName)
Returns ID for relation QName orUriCache.UNKNOWN_ID
without going to the database.@NotNull Integer
searchCachedUriId(@NotNull Object uri)
Supports search for URI ID by QName or String or any other type using `toString`.void
setFullTextSearchConfiguration(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_ID
without 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 newQUri
row 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(@NotNull MExtItem.ItemNameKey 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)
-
-