|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.evolveum.midpoint.prism.delta.ItemDelta<PrismPropertyValue<T>>
com.evolveum.midpoint.prism.delta.PropertyDelta<T>
public class PropertyDelta<T>
Relative difference (delta) of a property values.
This class describes what values are to be added, removed or replaced in the property. The delta can be either add+delete or replace, but not both. It either describes what values to add and delete from the property (add+delete) or what is the new set of values (replace). Add+delete deltas can be merged without a loss. There are ideal for multi-value properties. If replace deltas are merged, only the last value will be present. These are better suited for single-value properties.
ObjectDelta
,
Serialized FormField Summary |
---|
Fields inherited from class com.evolveum.midpoint.prism.delta.ItemDelta |
---|
definition, name, parentPath, valuesToAdd, valuesToDelete, valuesToReplace |
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable |
---|
INDENT_STRING |
Constructor Summary | |
---|---|
PropertyDelta(ItemPath propertyPath,
PrismPropertyDefinition propertyDefinition)
|
|
PropertyDelta(ItemPath parentPath,
QName name,
PrismPropertyDefinition propertyDefinition)
|
|
PropertyDelta(PrismPropertyDefinition propertyDefinition)
|
|
PropertyDelta(QName name,
PrismPropertyDefinition propertyDefinition)
|
Method Summary | ||
---|---|---|
void |
applyDefinition(ItemDefinition definition)
|
|
void |
applyTo(Item item)
Apply this delta (path) to a property. |
|
PropertyDelta<T> |
clone()
|
|
protected void |
copyValues(PropertyDelta<T> clone)
|
|
static
|
createDelta(ItemPath propertyPath,
Class<O> compileTimeClass,
PrismContext prismContext)
|
|
static
|
createDelta(ItemPath propertyPath,
PrismObjectDefinition<O> objectDefinition)
|
|
static
|
createDelta(QName propertyName,
Class<O> compileTimeClass,
PrismContext prismContext)
|
|
static
|
createDelta(QName propertyName,
PrismObjectDefinition<O> objectDefinition)
|
|
static
|
createModificationAddProperty(ItemPath propertyPath,
PrismPropertyDefinition propertyDefinition,
T... propertyValues)
|
|
static
|
createModificationDeleteProperty(ItemPath propertyPath,
PrismPropertyDefinition propertyDefinition,
T... propertyValues)
|
|
static
|
createModificationReplaceProperty(ItemPath propertyPath,
PrismObjectDefinition<?> objectDefinition,
T... propertyValues)
Convenience method for quick creation of object deltas that replace a single object property. |
|
static
|
createModificationReplaceProperty(ItemPath propertyPath,
PrismPropertyDefinition propertyDefinition,
T... propertyValues)
|
|
static
|
createModificationReplaceProperty(QName propertyName,
PrismObjectDefinition<?> objectDefinition,
T... propertyValues)
|
|
static Collection<? extends ItemDelta> |
createModificationReplacePropertyCollection(QName propertyName,
PrismObjectDefinition<?> objectDefinition,
Object... propertyValues)
Convenience method for quick creation of object deltas that replace a single object property. |
|
static
|
createReplaceDelta(PrismContainerDefinition<O> containerDefinition,
QName propertyName,
Object... realValues)
|
|
static
|
createReplaceDeltaOrEmptyDelta(PrismObjectDefinition<O> objectDefinition,
QName propertyName,
Object realValue)
|
|
static
|
createReplaceEmptyDelta(PrismObjectDefinition<O> objectDefinition,
QName propertyName)
Create delta that deletes all values of the specified property. |
|
static PropertyDelta |
findPropertyDelta(Collection<? extends ItemDelta> modifications,
ItemPath propertyPath)
|
|
static PropertyDelta |
findPropertyDelta(Collection<? extends ItemDelta> modifications,
QName propertyName)
|
|
T |
getAnyRealValue()
|
|
Class<PrismProperty> |
getItemClass()
|
|
PrismProperty<T> |
getPropertyNew()
Returns the "new" state of the property - the state that would be after the delta is applied. |
|
PrismProperty<T> |
getPropertyNew(PrismProperty<T> propertyOld)
Returns the "new" state of the property - the state that would be after the delta is applied. |
|
|
getValues(Class<T> type)
Returns all values regardless of whether they are added or removed or replaced. |
|
|
instantiateEmptyProperty()
|
|
boolean |
isRealValueToAdd(PrismPropertyValue<?> value)
|
|
boolean |
isRealValueToDelete(PrismPropertyValue<?> value)
|
|
PropertyDelta<T> |
narrow(PrismObject<? extends Objectable> object)
Filters out all delta values that are meaningless to apply. |
|
void |
setDefinition(ItemDefinition definition)
|
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PropertyDelta(PrismPropertyDefinition propertyDefinition)
public PropertyDelta(QName name, PrismPropertyDefinition propertyDefinition)
public PropertyDelta(ItemPath parentPath, QName name, PrismPropertyDefinition propertyDefinition)
public PropertyDelta(ItemPath propertyPath, PrismPropertyDefinition propertyDefinition)
Method Detail |
---|
public void setDefinition(ItemDefinition definition)
setDefinition
in class ItemDelta<PrismPropertyValue<T>>
public void applyDefinition(ItemDefinition definition) throws SchemaException
applyDefinition
in class ItemDelta<PrismPropertyValue<T>>
SchemaException
public Class<PrismProperty> getItemClass()
getItemClass
in class ItemDelta<PrismPropertyValue<T>>
public <T> Collection<PrismPropertyValue<T>> getValues(Class<T> type)
public T getAnyRealValue()
public <P extends PrismProperty> P instantiateEmptyProperty()
public void applyTo(Item item) throws SchemaException
ItemDelta
applyTo
in class ItemDelta<PrismPropertyValue<T>>
SchemaException
public PropertyDelta<T> clone()
clone
in class ItemDelta<PrismPropertyValue<T>>
protected void copyValues(PropertyDelta<T> clone)
public static <O extends Objectable> PropertyDelta createReplaceDelta(PrismContainerDefinition<O> containerDefinition, QName propertyName, Object... realValues)
public static <O extends Objectable> PropertyDelta createReplaceEmptyDelta(PrismObjectDefinition<O> objectDefinition, QName propertyName)
public static <O extends Objectable> PropertyDelta<?> createReplaceDeltaOrEmptyDelta(PrismObjectDefinition<O> objectDefinition, QName propertyName, Object realValue)
public boolean isRealValueToAdd(PrismPropertyValue<?> value)
public boolean isRealValueToDelete(PrismPropertyValue<?> value)
public PrismProperty<T> getPropertyNew() throws SchemaException
SchemaException
public PrismProperty<T> getPropertyNew(PrismProperty<T> propertyOld) throws SchemaException
SchemaException
public PropertyDelta<T> narrow(PrismObject<? extends Objectable> object)
ItemDelta
narrow
in class ItemDelta<PrismPropertyValue<T>>
public static <O extends Objectable,T> PropertyDelta<T> createDelta(QName propertyName, PrismObjectDefinition<O> objectDefinition)
public static <O extends Objectable,T> PropertyDelta<T> createDelta(ItemPath propertyPath, PrismObjectDefinition<O> objectDefinition)
public static <O extends Objectable,T> PropertyDelta<T> createDelta(QName propertyName, Class<O> compileTimeClass, PrismContext prismContext)
public static <O extends Objectable,T> PropertyDelta<T> createDelta(ItemPath propertyPath, Class<O> compileTimeClass, PrismContext prismContext)
public static <T> PropertyDelta<T> createModificationReplaceProperty(QName propertyName, PrismObjectDefinition<?> objectDefinition, T... propertyValues)
public static <T> PropertyDelta<T> createModificationReplaceProperty(ItemPath propertyPath, PrismObjectDefinition<?> objectDefinition, T... propertyValues)
public static <T> PropertyDelta<T> createModificationReplaceProperty(ItemPath propertyPath, PrismPropertyDefinition propertyDefinition, T... propertyValues)
public static <T> PropertyDelta<T> createModificationAddProperty(ItemPath propertyPath, PrismPropertyDefinition propertyDefinition, T... propertyValues)
public static <T> PropertyDelta<T> createModificationDeleteProperty(ItemPath propertyPath, PrismPropertyDefinition propertyDefinition, T... propertyValues)
public static Collection<? extends ItemDelta> createModificationReplacePropertyCollection(QName propertyName, PrismObjectDefinition<?> objectDefinition, Object... propertyValues)
public static PropertyDelta findPropertyDelta(Collection<? extends ItemDelta> modifications, ItemPath propertyPath)
public static PropertyDelta findPropertyDelta(Collection<? extends ItemDelta> modifications, QName propertyName)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |