Class ObjectRetriever
- java.lang.Object
-
- com.evolveum.midpoint.repo.sql.helpers.ObjectRetriever
-
@Component public class ObjectRetriever extends Object
- Author:
- lazyman, mederly
-
-
Field Summary
Fields Modifier and Type Field Description static String
CLASS_DOT
static String
NULL_OID_MARKER
-
Constructor Summary
Constructors Constructor Description ObjectRetriever()
-
Method Summary
-
-
-
Field Detail
-
CLASS_DOT
public static final String CLASS_DOT
-
NULL_OID_MARKER
public static final String NULL_OID_MARKER
- See Also:
- Constant Field Values
-
-
Method Detail
-
getObjectAttempt
public <T extends ObjectType> PrismObject<T> getObjectAttempt(Class<T> type, String oid, Collection<SelectorOptions<GetOperationOptions>> options, OperationResult result) throws ObjectNotFoundException, SchemaException
-
getObjectInternal
public <T extends ObjectType> PrismObject<T> getObjectInternal(org.hibernate.Session session, Class<T> type, String oid, Collection<SelectorOptions<GetOperationOptions>> options, boolean lockForUpdate) throws ObjectNotFoundException, SchemaException, DtoTranslationException
-
getConfiguration
protected SqlRepositoryConfiguration getConfiguration()
-
searchShadowOwnerAttempt
public <F extends FocusType> PrismObject<F> searchShadowOwnerAttempt(String shadowOid, Collection<SelectorOptions<GetOperationOptions>> options, OperationResult result)
-
listAccountShadowOwnerAttempt
public PrismObject<UserType> listAccountShadowOwnerAttempt(String accountOid, OperationResult result)
-
countObjectsAttempt
public <T extends ObjectType> int countObjectsAttempt(Class<T> type, ObjectQuery query, Collection<SelectorOptions<GetOperationOptions>> options, OperationResult result)
-
countContainersAttempt
public <C extends Containerable> int countContainersAttempt(Class<C> type, ObjectQuery query, Collection<SelectorOptions<GetOperationOptions>> options, OperationResult result)
-
searchObjectsAttempt
@NotNull public <T extends ObjectType> @NotNull SearchResultList<PrismObject<T>> searchObjectsAttempt(Class<T> type, ObjectQuery query, Collection<SelectorOptions<GetOperationOptions>> options, OperationResult result) throws SchemaException
- Throws:
SchemaException
-
searchContainersAttempt
public <C extends Containerable> SearchResultList<C> searchContainersAttempt(Class<C> type, ObjectQuery query, Collection<SelectorOptions<GetOperationOptions>> options, OperationResult result) throws SchemaException
- Throws:
SchemaException
-
getVersionAttempt
public <T extends ObjectType> String getVersionAttempt(Class<T> type, String oid, OperationResult result) throws ObjectNotFoundException
- Throws:
ObjectNotFoundException
-
searchObjectsIterativeAttempt
public <T extends ObjectType> void searchObjectsIterativeAttempt(Class<T> type, ObjectQuery query, ResultHandler<T> handler, Collection<SelectorOptions<GetOperationOptions>> options, OperationResult result, Set<String> retrievedOids)
-
searchObjectsIterativeByPaging
public <T extends ObjectType> void searchObjectsIterativeByPaging(Class<T> type, ObjectQuery query, ResultHandler<T> handler, Collection<SelectorOptions<GetOperationOptions>> options, OperationResult result) throws SchemaException
- Throws:
SchemaException
-
searchObjectsIterativeByPagingStrictlySequential
public <T extends ObjectType> void searchObjectsIterativeByPagingStrictlySequential(Class<T> type, ObjectQuery query, ResultHandler<T> handler, Collection<SelectorOptions<GetOperationOptions>> options, OperationResult result) throws SchemaException
Strictly-sequential version of paged search.Assumptions: - During processing of returned object(s), any objects can be added, deleted or modified.
Guarantees: - We return each object that existed in the moment of search start: - exactly once if it was not deleted in the meanwhile, - at most once otherwise. - However, we may or may not return any objects that were added during the processing.
Constraints: - There can be no ordering prescribed. We use our own ordering. - We also disallow any explicit paging - except for maxSize setting.
Implementation is very simple - we fetch objects ordered by OID, and remember last OID fetched. Obviously no object will be present in output more than once. Objects that are not deleted will be there exactly once, provided their oid is not changed.
- Throws:
SchemaException
-
searchObjectsIterativeByFetchAll
public <T extends ObjectType> void searchObjectsIterativeByFetchAll(Class<T> type, ObjectQuery query, ResultHandler<T> handler, Collection<SelectorOptions<GetOperationOptions>> options, OperationResult result) throws SchemaException
- Throws:
SchemaException
-
isAnySubordinateAttempt
public boolean isAnySubordinateAttempt(String upperOrgOid, Collection<String> lowerObjectOids)
-
executeQueryDiagnosticsRequest
public RepositoryQueryDiagResponse executeQueryDiagnosticsRequest(RepositoryQueryDiagRequest request, OperationResult result)
-
-