Class DeltaBuilder<C extends Containerable>
- java.lang.Object
-
- com.evolveum.midpoint.prism.impl.delta.builder.DeltaBuilder<C>
-
- All Implemented Interfaces:
S_ItemEntry
,S_MaybeAdd
,S_MaybeDelete
,S_ValuesEntry
@Experimental public class DeltaBuilder<C extends Containerable> extends Object implements S_ItemEntry, S_MaybeDelete, S_MaybeAdd, S_ValuesEntry
Grammar ---- ObjectDelta ::= (ItemDelta)* ( 'OBJECT-DELTA(oid)' | 'ITEM-DELTA' | 'ITEM-DELTAS' ) ItemDelta ::= 'ITEM(...)' ( ( 'ADD-VALUES(...)' 'DELETE-VALUES(...)'? ) | ( 'DELETE-VALUES(...)' 'ADD-VALUES(...)'? ) | 'REPLACE-VALUES(...)' ) ---- When combining DELETE and ADD prefer using DELETE first to match the actual behavior.
-
-
Constructor Summary
Constructors Constructor Description DeltaBuilder(Class<C> objectClass, PrismContext prismContext, ItemDefinitionResolver itemDefinitionResolver)
-
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.delta.builder.S_ItemEntry
asObjectDeltaCast
-
-
-
-
Constructor Detail
-
DeltaBuilder
public DeltaBuilder(Class<C> objectClass, PrismContext prismContext, ItemDefinitionResolver itemDefinitionResolver) throws SchemaException
- Throws:
SchemaException
-
-
Method Detail
-
getPrismContext
public PrismContext getPrismContext()
-
optimizing
public S_ItemEntry optimizing()
Description copied from interface:S_ItemEntry
Should we skip idempotent item deltas? (Default is `false`.)- Specified by:
optimizing
in interfaceS_ItemEntry
-
oldObject
public S_ItemEntry oldObject(Containerable object)
Description copied from interface:S_ItemEntry
The state of object before the delta is applied. Used to compute estimatedOldValues.- Specified by:
oldObject
in interfaceS_ItemEntry
-
item
public S_ValuesEntry item(QName... names)
- Specified by:
item
in interfaceS_ItemEntry
-
item
public S_ValuesEntry item(Object... namesOrIds)
- Specified by:
item
in interfaceS_ItemEntry
-
item
public S_ValuesEntry item(ItemPath path)
- Specified by:
item
in interfaceS_ItemEntry
-
item
public S_ValuesEntry item(ItemPath path, ItemDefinition definition)
- Specified by:
item
in interfaceS_ItemEntry
-
property
public S_ValuesEntry property(QName... names)
Description copied from interface:S_ItemEntry
Can be used with dynamic paths.- Specified by:
property
in interfaceS_ItemEntry
-
property
public S_ValuesEntry property(Object... namesOrIds)
- Specified by:
property
in interfaceS_ItemEntry
-
property
public S_ValuesEntry property(ItemPath path)
- Specified by:
property
in interfaceS_ItemEntry
-
property
public <T> S_ValuesEntry property(ItemPath path, PrismPropertyDefinition<T> definition)
- Specified by:
property
in interfaceS_ItemEntry
-
asObjectDelta
public ObjectDelta asObjectDelta(String oid)
- Specified by:
asObjectDelta
in interfaceS_ItemEntry
-
asObjectDeltas
public List<ObjectDelta<?>> asObjectDeltas(String oid)
- Specified by:
asObjectDeltas
in interfaceS_ItemEntry
-
asItemDelta
public ItemDelta asItemDelta()
- Specified by:
asItemDelta
in interfaceS_ItemEntry
-
asItemDeltas
public List<ItemDelta<?,?>> asItemDeltas()
- Specified by:
asItemDeltas
in interfaceS_ItemEntry
-
add
public S_MaybeDelete add(Object... realValues)
- Specified by:
add
in interfaceS_MaybeAdd
- Specified by:
add
in interfaceS_ValuesEntry
-
addRealValues
public S_MaybeDelete addRealValues(Collection<?> realValues)
- Specified by:
addRealValues
in interfaceS_MaybeAdd
- Specified by:
addRealValues
in interfaceS_ValuesEntry
-
add
public S_MaybeDelete add(PrismValue... values)
- Specified by:
add
in interfaceS_MaybeAdd
- Specified by:
add
in interfaceS_ValuesEntry
-
add
public S_MaybeDelete add(Collection<? extends PrismValue> values)
- Specified by:
add
in interfaceS_MaybeAdd
- Specified by:
add
in interfaceS_ValuesEntry
-
old
public S_ValuesEntry old(Object... realValues)
- Specified by:
old
in interfaceS_ValuesEntry
-
oldRealValues
public S_ValuesEntry oldRealValues(Collection<?> realValues)
- Specified by:
oldRealValues
in interfaceS_ValuesEntry
-
oldRealValue
public <T> S_ValuesEntry oldRealValue(T realValue)
- Specified by:
oldRealValue
in interfaceS_ValuesEntry
-
old
public S_ValuesEntry old(PrismValue... values)
- Specified by:
old
in interfaceS_ValuesEntry
-
old
public S_ValuesEntry old(Collection<? extends PrismValue> values)
- Specified by:
old
in interfaceS_ValuesEntry
-
delete
public S_MaybeAdd delete(Object... realValues)
- Specified by:
delete
in interfaceS_MaybeDelete
- Specified by:
delete
in interfaceS_ValuesEntry
-
deleteRealValues
public S_MaybeAdd deleteRealValues(Collection<?> realValues)
- Specified by:
deleteRealValues
in interfaceS_MaybeDelete
- Specified by:
deleteRealValues
in interfaceS_ValuesEntry
-
delete
public S_MaybeAdd delete(PrismValue... values)
- Specified by:
delete
in interfaceS_MaybeDelete
- Specified by:
delete
in interfaceS_ValuesEntry
-
delete
public S_MaybeAdd delete(Collection<? extends PrismValue> values)
- Specified by:
delete
in interfaceS_MaybeDelete
- Specified by:
delete
in interfaceS_ValuesEntry
-
replace
public S_ItemEntry replace(Object... realValues)
- Specified by:
replace
in interfaceS_ValuesEntry
-
replaceRealValues
public S_ItemEntry replaceRealValues(Collection<?> realValues)
- Specified by:
replaceRealValues
in interfaceS_ValuesEntry
-
replace
public S_ItemEntry replace(Collection<? extends PrismValue> values)
- Specified by:
replace
in interfaceS_ValuesEntry
-
replace
public S_ItemEntry replace(PrismValue... values)
- Specified by:
replace
in interfaceS_ValuesEntry
-
mod
public S_ItemEntry mod(PlusMinusZero plusMinusZero, Object... realValues)
Description copied from interface:S_ValuesEntry
Create proper modification type based on parameter. Plus means add, minus delete, zero means replace.- Specified by:
mod
in interfaceS_ValuesEntry
-
modRealValues
public S_ItemEntry modRealValues(PlusMinusZero plusMinusZero, Collection<?> realValues)
- Specified by:
modRealValues
in interfaceS_ValuesEntry
-
mod
public S_ItemEntry mod(PlusMinusZero plusMinusZero, Collection<? extends PrismValue> values)
- Specified by:
mod
in interfaceS_ValuesEntry
-
mod
public S_ItemEntry mod(PlusMinusZero plusMinusZero, PrismValue... values)
- Specified by:
mod
in interfaceS_ValuesEntry
-
-