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
Implementation of the top-level of the Query fluent API grammar (see
QueryBuilder
).
See R_AtomicFilter
for low-level filters.-
Method Summary
Modifier and TypeMethodDescriptionall()
and()
block()
build()
static S_FilterEntryOrEmpty
create
(QueryBuilder builder) static S_FilterEntryOrEmpty
create
(QueryBuilder builder, PrismReferenceDefinition refDefinition) endBlock()
Closes theS_FilterEntry.block()
construction.filter
(ObjectFilter filter) <C> Class<C>
Client-friendly getter that assumes the expected type.protected boolean
id
(long... identifiers) isChildOf
(PrismReferenceValue value) isDirectChildOf
(String oid) isInScopeOf
(PrismReferenceValue value, OrgFilter.Scope scope) isInScopeOf
(String oid, OrgFilter.Scope scope) isParentOf
(PrismReferenceValue value) isParentOf
(String oid) isRoot()
item
(ItemPath itemPath, ItemDefinition<?> itemDefinition) item
(PrismContainerDefinition<?> containerDefinition, ItemPath itemPath) item
(PrismContainerDefinition<?> containerDefinition, QName... names) itemAs
(PrismProperty<?> property) itemWithDef
(ItemDefinition<?> itemDefinition, QName... names) none()
not()
or()
com.evolveum.midpoint.prism.impl.query.builder.R_Filter.OwnedByEntry
ownedBy
(Class<? extends Containerable> type, ItemPath path) ownerId
(long... identifiers) Ref filter with single value and optional ref-target filter that can follow this call immediately.referencedBy
(@NotNull Class<? extends Containerable> type, @NotNull ItemPath path, QName relation) Creates `referencedBy` filter that matches if the queried object is referenced by other specified object or container.type
(Class<? extends Containerable> type) 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 Details
-
create
-
create
public static S_FilterEntryOrEmpty create(QueryBuilder builder, PrismReferenceDefinition refDefinition) -
all
- Specified by:
all
in interfaceS_FilterEntry
-
none
- Specified by:
none
in interfaceS_FilterEntry
-
undefined
- Specified by:
undefined
in interfaceS_FilterEntry
-
filter
- Specified by:
filter
in interfaceS_FilterEntry
-
id
- Specified by:
id
in interfaceS_FilterEntry
-
id
- Specified by:
id
in interfaceS_FilterEntry
-
ownerId
- Specified by:
ownerId
in interfaceS_FilterEntry
-
ownerId
- Specified by:
ownerId
in interfaceS_FilterEntry
-
isDirectChildOf
- Specified by:
isDirectChildOf
in interfaceS_FilterEntry
-
isChildOf
- Specified by:
isChildOf
in interfaceS_FilterEntry
-
isParentOf
- Specified by:
isParentOf
in interfaceS_FilterEntry
-
isDirectChildOf
- Specified by:
isDirectChildOf
in interfaceS_FilterEntry
-
isChildOf
- Specified by:
isChildOf
in interfaceS_FilterEntry
-
isInScopeOf
- Specified by:
isInScopeOf
in interfaceS_FilterEntry
-
isInScopeOf
- Specified by:
isInScopeOf
in interfaceS_FilterEntry
-
isParentOf
- Specified by:
isParentOf
in interfaceS_FilterEntry
-
isRoot
- Specified by:
isRoot
in interfaceS_FilterEntry
-
fullText
- Specified by:
fullText
in interfaceS_FilterEntry
-
block
- Specified by:
block
in interfaceS_FilterEntry
-
type
- Specified by:
type
in interfaceS_FilterEntry
-
referencedBy
public S_FilterEntryOrEmpty referencedBy(@NotNull @NotNull Class<? extends Containerable> type, @NotNull @NotNull ItemPath path, QName relation) Description copied from interface:S_FilterEntry
Creates `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:
referencedBy
in 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
Description copied from interface:S_FilterEntry
Ref 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:
ref
in interfaceS_FilterEntry
-
ownedBy
public com.evolveum.midpoint.prism.impl.query.builder.R_Filter.OwnedByEntry ownedBy(Class<? extends Containerable> type, ItemPath path) - Specified by:
ownedBy
in interfaceS_FilterEntry
-
type
- Specified by:
type
in interfaceS_FilterEntry
-
exists
- Specified by:
exists
in interfaceS_FilterEntry
-
and
- Specified by:
and
in interfaceS_FilterExit
-
or
- Specified by:
or
in interfaceS_FilterExit
-
not
- Specified by:
not
in interfaceS_FilterEntry
-
item
- Specified by:
item
in interfaceS_FilterEntry
-
item
- Specified by:
item
in interfaceS_FilterEntry
-
item
- Specified by:
item
in interfaceS_FilterEntry
-
itemWithDef
- Specified by:
itemWithDef
in interfaceS_FilterEntry
-
item
- Specified by:
item
in interfaceS_FilterEntry
-
item
- Specified by:
item
in interfaceS_FilterEntry
-
item
- Specified by:
item
in interfaceS_FilterEntry
-
itemAs
- Specified by:
itemAs
in interfaceS_FilterEntry
-
endBlock
Description copied from interface:S_QueryExit
Closes theS_FilterEntry.block()
construction. It is a bit high in hierarchy to allow empty block().end() construction without additional interface.- Specified by:
endBlock
in interfaceS_QueryExit
-
hasRestriction
protected boolean hasRestriction() -
asc
- Specified by:
asc
in interfaceS_QueryExit
-
asc
- Specified by:
asc
in interfaceS_QueryExit
-
desc
- Specified by:
desc
in interfaceS_QueryExit
-
desc
- Specified by:
desc
in interfaceS_QueryExit
-
offset
- Specified by:
offset
in interfaceS_QueryExit
-
maxSize
- Specified by:
maxSize
in interfaceS_QueryExit
-
build
- Specified by:
build
in interfaceS_QueryExit
-
buildFilter
- Specified by:
buildFilter
in interfaceS_QueryExit
-
getPrismContext
-
getCurrentClass
Client-friendly getter that assumes the expected type. This was created to make working with both containers and references easier.
-