Class R_Filter
- java.lang.Object
-
- com.evolveum.midpoint.prism.impl.query.builder.R_Filter
-
- All Implemented Interfaces:
S_FilterEntry,S_FilterEntryOrEmpty,S_FilterExit,S_QueryExit
public class R_Filter extends Object implements S_FilterEntryOrEmpty
Implementation of the top-level of the Query fluent API grammar (seeQueryBuilder). SeeR_AtomicFilterfor low-level filters.
-
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.evolveum.midpoint.prism.query.builder.S_FilterEntry
ownedBy, ownedBy, ref, ref, referencedBy
-
-
-
-
Method Detail
-
create
public static S_FilterEntryOrEmpty create(QueryBuilder builder)
-
create
public static S_FilterEntryOrEmpty create(QueryBuilder builder, PrismReferenceDefinition refDefinition)
-
all
public S_FilterExit all()
- Specified by:
allin interfaceS_FilterEntry
-
none
public S_FilterExit none()
- Specified by:
nonein interfaceS_FilterEntry
-
undefined
public S_FilterExit undefined()
- Specified by:
undefinedin interfaceS_FilterEntry
-
filter
public S_FilterExit filter(ObjectFilter filter)
- Specified by:
filterin interfaceS_FilterEntry
-
id
public S_FilterExit id(String... identifiers)
- Specified by:
idin interfaceS_FilterEntry
-
id
public S_FilterExit id(long... identifiers)
- Specified by:
idin interfaceS_FilterEntry
-
ownerId
public S_FilterExit ownerId(String... identifiers)
- Specified by:
ownerIdin interfaceS_FilterEntry
-
ownerId
public S_FilterExit ownerId(long... identifiers)
- Specified by:
ownerIdin interfaceS_FilterEntry
-
isDirectChildOf
public S_FilterExit isDirectChildOf(PrismReferenceValue value)
- Specified by:
isDirectChildOfin interfaceS_FilterEntry
-
isChildOf
public S_FilterExit isChildOf(PrismReferenceValue value)
- Specified by:
isChildOfin interfaceS_FilterEntry
-
isParentOf
public S_FilterExit isParentOf(PrismReferenceValue value)
- Specified by:
isParentOfin interfaceS_FilterEntry
-
isDirectChildOf
public S_FilterExit isDirectChildOf(String oid)
- Specified by:
isDirectChildOfin interfaceS_FilterEntry
-
isChildOf
public S_FilterExit isChildOf(String oid)
- Specified by:
isChildOfin interfaceS_FilterEntry
-
isInScopeOf
public S_FilterExit isInScopeOf(String oid, OrgFilter.Scope scope)
- Specified by:
isInScopeOfin interfaceS_FilterEntry
-
isInScopeOf
public S_FilterExit isInScopeOf(PrismReferenceValue value, OrgFilter.Scope scope)
- Specified by:
isInScopeOfin interfaceS_FilterEntry
-
isParentOf
public S_FilterExit isParentOf(String oid)
- Specified by:
isParentOfin interfaceS_FilterEntry
-
isRoot
public S_FilterExit isRoot()
- Specified by:
isRootin interfaceS_FilterEntry
-
fullText
public S_FilterExit fullText(String... words)
- Specified by:
fullTextin interfaceS_FilterEntry
-
block
public S_FilterEntryOrEmpty block()
- Specified by:
blockin interfaceS_FilterEntry
-
type
public S_FilterEntryOrEmpty type(Class<? extends Containerable> type)
- Specified by:
typein interfaceS_FilterEntry
-
referencedBy
public S_FilterEntryOrEmpty referencedBy(@NotNull @NotNull Class<? extends Containerable> type, @NotNull @NotNull ItemPath path, QName relation)
Description copied from interface:S_FilterEntryCreates `referencedBy` filter that matches if the queried object is referenced by other specified object or container. This is a "blocky" filter that allows for inner filter, applied to the referencing entity. For example: ---- // query for role referenced by user assignment, with inner filter applied to user .referencedBy(UserType.class, ItemPath.create(F_ASSIGNMENT, F_TARGET_REF)) .block() .not().item(UserType.F_COST_CENTER).isNull() .and() .item(UserType.F_POLICY_SITUATION).isNull() .endBlock() ----- Specified by:
referencedByin interfaceS_FilterEntry- Parameters:
type- type of the referenced object (can be an abstract type too)path- item path of the referencerelation- optional relation of the incoming reference, null means it does not matter (any)
-
ref
public S_FilterEntryOrEmpty ref(ItemPath path, QName targetType, QName relation, String... oids)
Description copied from interface:S_FilterEntryRef filter with single value and optional ref-target filter that can follow this call immediately. Use comboS_FilterEntry.item(ItemPath)andS_ConditionEntry.ref(PrismReferenceValue...)for simple REF filters and multi-value support.- Specified by:
refin interfaceS_FilterEntry
-
ownedBy
public com.evolveum.midpoint.prism.impl.query.builder.R_Filter.OwnedByEntry ownedBy(Class<? extends Containerable> type, ItemPath path)
- Specified by:
ownedByin interfaceS_FilterEntry
-
type
public S_FilterEntryOrEmpty type(@NotNull @NotNull QName typeName)
- Specified by:
typein interfaceS_FilterEntry
-
exists
public S_FilterEntryOrEmpty exists(Object... components)
- Specified by:
existsin interfaceS_FilterEntry
-
and
public S_FilterEntry and()
- Specified by:
andin interfaceS_FilterExit
-
or
public S_FilterEntry or()
- Specified by:
orin interfaceS_FilterExit
-
not
public S_FilterEntry not()
- Specified by:
notin interfaceS_FilterEntry
-
item
public S_ConditionEntry item(QName... names)
- Specified by:
itemin interfaceS_FilterEntry
-
item
public S_ConditionEntry item(String... names)
- Specified by:
itemin interfaceS_FilterEntry
-
item
public S_ConditionEntry item(ItemPath itemPath)
- Specified by:
itemin interfaceS_FilterEntry
-
itemWithDef
public S_ConditionEntry itemWithDef(ItemDefinition<?> itemDefinition, QName... names)
- Specified by:
itemWithDefin interfaceS_FilterEntry
-
item
public S_ConditionEntry item(ItemPath itemPath, ItemDefinition<?> itemDefinition)
- Specified by:
itemin interfaceS_FilterEntry
-
item
public S_ConditionEntry item(PrismContainerDefinition<?> containerDefinition, QName... names)
- Specified by:
itemin interfaceS_FilterEntry
-
item
public S_ConditionEntry item(PrismContainerDefinition<?> containerDefinition, ItemPath itemPath)
- Specified by:
itemin interfaceS_FilterEntry
-
itemAs
public S_MatchingRuleEntry itemAs(PrismProperty<?> property)
- Specified by:
itemAsin interfaceS_FilterEntry
-
endBlock
public S_FilterExit endBlock()
Description copied from interface:S_QueryExitCloses theS_FilterEntry.block()construction. It is a bit high in hierarchy to allow empty block().end() construction without additional interface.- Specified by:
endBlockin interfaceS_QueryExit
-
hasRestriction
protected boolean hasRestriction()
-
asc
public S_QueryExit asc(QName... names)
- Specified by:
ascin interfaceS_QueryExit
-
asc
public S_QueryExit asc(ItemPath path)
- Specified by:
ascin interfaceS_QueryExit
-
desc
public S_QueryExit desc(QName... names)
- Specified by:
descin interfaceS_QueryExit
-
desc
public S_QueryExit desc(ItemPath path)
- Specified by:
descin interfaceS_QueryExit
-
offset
public S_QueryExit offset(Integer n)
- Specified by:
offsetin interfaceS_QueryExit
-
maxSize
public S_QueryExit maxSize(Integer n)
- Specified by:
maxSizein interfaceS_QueryExit
-
build
public ObjectQuery build()
- Specified by:
buildin interfaceS_QueryExit
-
buildFilter
public ObjectFilter buildFilter()
- Specified by:
buildFilterin interfaceS_QueryExit
-
getPrismContext
public PrismContext getPrismContext()
-
getCurrentClass
public <C> Class<C> getCurrentClass()
Client-friendly getter that assumes the expected type. This was created to make working with both containers and references easier.
-
-