Class ObjectQueryUtil
- java.lang.Object
-
- com.evolveum.midpoint.schema.util.ObjectQueryUtil
-
public class ObjectQueryUtil extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ObjectQueryUtil.FilterComponents
Result of the query/filter factorization.static class
ObjectQueryUtil.FilterExtractor
Describes how to treat a filter when factoring out a query/filter.
-
Field Summary
Fields Modifier and Type Field Description static List<ObjectQueryUtil.FilterExtractor>
DEFAULT_EXTRACTORS
static ObjectQueryUtil.FilterExtractor
EQUAL_EXTRACTOR
static ObjectQueryUtil.FilterExtractor
REF_EXTRACTOR
-
Constructor Summary
Constructors Constructor Description ObjectQueryUtil()
-
Method Summary
-
-
-
Field Detail
-
EQUAL_EXTRACTOR
public static final ObjectQueryUtil.FilterExtractor EQUAL_EXTRACTOR
-
REF_EXTRACTOR
public static final ObjectQueryUtil.FilterExtractor REF_EXTRACTOR
-
DEFAULT_EXTRACTORS
public static final List<ObjectQueryUtil.FilterExtractor> DEFAULT_EXTRACTORS
-
-
Method Detail
-
createNameQuery
public static ObjectQuery createNameQuery(String name, PrismContext prismContext) throws SchemaException
- Throws:
SchemaException
-
createOrigNameQuery
public static ObjectQuery createOrigNameQuery(String name, PrismContext prismContext) throws SchemaException
- Throws:
SchemaException
-
createNormNameQuery
public static ObjectQuery createNormNameQuery(String name, PrismContext prismContext) throws SchemaException
- Throws:
SchemaException
-
createNameQuery
public static ObjectQuery createNameQuery(PolyStringType name, PrismContext prismContext) throws SchemaException
- Throws:
SchemaException
-
createOrigNameQuery
public static ObjectQuery createOrigNameQuery(PolyStringType name, PrismContext prismContext) throws SchemaException
- Throws:
SchemaException
-
createNameQuery
public static ObjectQuery createNameQuery(PolyString name, PrismContext prismContext) throws SchemaException
- Throws:
SchemaException
-
createOrigNameQuery
public static ObjectQuery createOrigNameQuery(PolyString name, PrismContext prismContext) throws SchemaException
- Throws:
SchemaException
-
createNormNameQuery
public static ObjectQuery createNormNameQuery(PolyString name, PrismContext prismContext) throws SchemaException
- Throws:
SchemaException
-
createNameQuery
public static ObjectQuery createNameQuery(ObjectType object) throws SchemaException
- Throws:
SchemaException
-
createNameQuery
public static <O extends ObjectType> ObjectQuery createNameQuery(PrismObject<O> object) throws SchemaException
- Throws:
SchemaException
-
createResourceAndObjectClassQuery
public static ObjectQuery createResourceAndObjectClassQuery(String resourceOid, QName objectClass, PrismContext prismContext) throws SchemaException
- Throws:
SchemaException
-
createResourceAndObjectClassFilter
public static ObjectFilter createResourceAndObjectClassFilter(String resourceOid, QName objectClass, PrismContext prismContext) throws SchemaException
- Throws:
SchemaException
-
createResourceAndObjectClassFilterPrefix
public static S_AtomicFilterExit createResourceAndObjectClassFilterPrefix(String resourceOid, QName objectClass, PrismContext prismContext) throws SchemaException
- Throws:
SchemaException
-
createResourceAndKindIntent
public static ObjectQuery createResourceAndKindIntent(String resourceOid, ShadowKindType kind, String intent, PrismContext prismContext) throws SchemaException
- Throws:
SchemaException
-
createResourceAndKind
public static ObjectQuery createResourceAndKind(String resourceOid, ShadowKindType kind, PrismContext prismContext) throws SchemaException
- Throws:
SchemaException
-
createResourceAndKindIntentFilter
public static ObjectFilter createResourceAndKindIntentFilter(String resourceOid, ShadowKindType kind, String intent, PrismContext prismContext) throws SchemaException
- Throws:
SchemaException
-
createResourceQuery
public static ObjectQuery createResourceQuery(String resourceOid, PrismContext prismContext) throws SchemaException
- Throws:
SchemaException
-
createResourceFilter
public static ObjectFilter createResourceFilter(String resourceOid, PrismContext prismContext) throws SchemaException
- Throws:
SchemaException
-
createObjectClassFilter
public static ObjectFilter createObjectClassFilter(QName objectClass, PrismContext prismContext)
-
createNameQuery
public static <T extends ObjectType> ObjectQuery createNameQuery(Class<T> clazz, PrismContext prismContext, String name) throws SchemaException
- Throws:
SchemaException
-
createOrgSubtreeQuery
public static ObjectQuery createOrgSubtreeQuery(PrismContext prismContext, String orgOid) throws SchemaException
- Throws:
SchemaException
-
createRootOrgQuery
public static ObjectQuery createRootOrgQuery(PrismContext prismContext) throws SchemaException
- Throws:
SchemaException
-
hasAllDefinitions
public static boolean hasAllDefinitions(ObjectQuery query)
-
hasAllDefinitions
public static boolean hasAllDefinitions(ObjectFilter filter)
-
assertPropertyOnly
public static void assertPropertyOnly(ObjectFilter filter, String message)
-
assertNotRaw
public static void assertNotRaw(ObjectFilter filter, String message)
-
dump
public static String dump(QueryType query, @NotNull PrismContext prismContext) throws SchemaException
- Throws:
SchemaException
-
filterAnd
public static ObjectFilter filterAnd(ObjectFilter origFilter, ObjectFilter additionalFilter, PrismContext prismContext)
Merges the two provided arguments into one AND filter in the most efficient way. TODO consider moving to QueryFactory
-
filterOr
public static ObjectFilter filterOr(ObjectFilter origFilter, ObjectFilter additionalFilter, PrismContext prismContext)
Merges the two provided arguments into one OR filter in the most efficient way. TODO consider moving to QueryFactory
-
isAll
public static boolean isAll(ObjectFilter filter)
-
isNone
public static boolean isNone(ObjectFilter filter)
-
simplify
public static ObjectFilter simplify(ObjectFilter filter, PrismContext prismContext)
-
getCoordinates
public static ResourceShadowDiscriminator getCoordinates(ObjectFilter filter, PrismContext prismContext) throws SchemaException
- Throws:
SchemaException
-
factorOutQuery
public static ObjectQueryUtil.FilterComponents factorOutQuery(PrismContext prismContext, ObjectQuery query, List<ObjectQueryUtil.FilterExtractor> extractors, ItemPath... paths)
-
createReferences
public static List<PrismReferenceValue> createReferences(String oid, RelationKindType kind, RelationRegistry relationRegistry)
-
createReferences
public static List<PrismReferenceValue> createReferences(Collection<String> oids, RelationKindType kind, RelationRegistry relationRegistry)
-
-