Package com.evolveum.midpoint.prism.impl
Class PrismValueImpl
- java.lang.Object
- 
- com.evolveum.midpoint.prism.AbstractFreezable
- 
- com.evolveum.midpoint.prism.impl.PrismValueImpl
 
 
- 
- All Implemented Interfaces:
- Freezable,- MidpointOriginMetadata,- PathVisitable,- PrismContextSensitive,- PrismValue,- Revivable,- Visitable,- DebugDumpable,- Serializable
 - Direct Known Subclasses:
- PrismContainerValueImpl,- PrismPropertyValueImpl,- PrismReferenceValueImpl
 
 public abstract class PrismValueImpl extends AbstractFreezable implements PrismValue - Author:
- semancik
- See Also:
- Serialized Form
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected EquivalenceStrategydefaultEquivalenceStrategyprotected PrismContextprismContext- 
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpableINDENT_STRING
 
- 
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaccept(Visitor visitor)voidaccept(Visitor visitor, ItemPath path, boolean recursive)protected voidappendOriginDump(StringBuilder builder)voidapplyDefinition(ItemDefinition definition)voidapplyDefinition(ItemDefinition definition, boolean force)abstract voidcheckConsistenceInternal(Itemable rootItem, boolean requireDefinitions, boolean prohibitRaw, ConsistencyCheckScope scope)voidclearParent()Used when we are removing the value from the previous parent.abstract PrismValueclone()Literal clone.abstract PrismValuecloneComplex(CloneStrategy strategy)Complex clone with different cloning strategies.protected voidcopyValues(CloneStrategy strategy, PrismValueImpl clone)PrismValuecreateImmutableClone()Collection<? extends ItemDelta>diff(PrismValue otherValue)Assumes matching representations.Collection<? extends ItemDelta>diff(PrismValue otherValue, ParameterizedEquivalenceStrategy strategy)Assumes matching representations.voiddiffMatchingRepresentation(PrismValue otherValue, Collection<? extends ItemDelta> deltas, ParameterizedEquivalenceStrategy strategy)booleanequals(PrismValue otherValue, @NotNull EquivalenceStrategy equivalenceStrategy)booleanequals(PrismValue other, @NotNull ParameterizedEquivalenceStrategy strategy)booleanequals(PrismValue thisValue, PrismValue otherValue)booleanequals(Object other)@NotNull Collection<PrismValue>getAllValues(ItemPath path)protected ItemDefinitiongetDefinition()protected EquivalenceStrategygetEqualsHashCodeStrategy()ObjectablegetOriginObject()OriginTypegetOriginType()ItemablegetParent()PrismContainerValue<?>getParentContainerValue()@NotNull ItemPathgetPath()protected ObjectgetPathComponent()PrismContextgetPrismContext()abstract @Nullable Class<?>getRealClass()abstract <T> TgetRealValue()PrismValuegetRootValue()QNamegetTypeName()Map<String,Object>getUserData()ObjectgetUserData(@NotNull String key)inthashCode()inthashCode(@NotNull EquivalenceStrategy equivalenceStrategy)inthashCode(@NotNull ParameterizedEquivalenceStrategy equivalenceStrategy)voidnormalize()voidrecompute()Recompute the value or otherwise "initialize" it before adding it to a prism tree.abstract voidrecompute(PrismContext prismContext)booleanrepresentsSameValue(PrismValue other, boolean lax)Returns true if this and other value represent the same value.voidrevive(PrismContext prismContext)voidsetOriginObject(Objectable source)voidsetOriginType(OriginType type)voidsetParent(Itemable parent)voidsetPrismContext(PrismContext prismContext)voidsetUserData(@NotNull String key, Object value)abstract StringtoHumanReadableString()- 
Methods inherited from class com.evolveum.midpoint.prism.AbstractFreezablefreeze, isImmutable, isMutable, performFreeze
 - 
Methods inherited from class java.lang.Objectfinalize, getClass, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface com.evolveum.midpoint.util.DebugDumpabledebugDump, debugDump, debugDumpLazily, debugDumpLazily
 - 
Methods inherited from interface com.evolveum.midpoint.prism.FreezablecheckImmutable, checkMutable, freeze, isImmutable
 - 
Methods inherited from interface com.evolveum.midpoint.prism.PrismValuefind, getRealValueOrRawType, hasRealClass, isEmpty, isRaw
 
- 
 
- 
- 
- 
Field Detail- 
defaultEquivalenceStrategyprotected EquivalenceStrategy defaultEquivalenceStrategy 
 - 
prismContextprotected transient PrismContext prismContext 
 
- 
 - 
Method Detail- 
setPrismContextpublic void setPrismContext(PrismContext prismContext) - Specified by:
- setPrismContextin interface- PrismValue
 
 - 
setOriginObjectpublic void setOriginObject(Objectable source) - Specified by:
- setOriginObjectin interface- MidpointOriginMetadata
 
 - 
setOriginTypepublic void setOriginType(OriginType type) - Specified by:
- setOriginTypein interface- MidpointOriginMetadata
 
 - 
getOriginTypepublic OriginType getOriginType() - Specified by:
- getOriginTypein interface- MidpointOriginMetadata
 
 - 
getOriginObjectpublic Objectable getOriginObject() - Specified by:
- getOriginObjectin interface- MidpointOriginMetadata
 
 - 
getUserDatapublic Map<String,Object> getUserData() - Specified by:
- getUserDatain interface- PrismValue
 
 - 
getUserDatapublic Object getUserData(@NotNull @NotNull String key) - Specified by:
- getUserDatain interface- PrismValue
 
 - 
setUserDatapublic void setUserData(@NotNull @NotNull String key, Object value)- Specified by:
- setUserDatain interface- PrismValue
 
 - 
getParentpublic Itemable getParent() - Specified by:
- getParentin interface- PrismValue
 
 - 
setParentpublic void setParent(Itemable parent) - Specified by:
- setParentin interface- PrismValue
 
 - 
getPath@NotNull public @NotNull ItemPath getPath() - Specified by:
- getPathin interface- PrismValue
 
 - 
getPathComponentprotected Object getPathComponent() 
 - 
clearParentpublic void clearParent() Used when we are removing the value from the previous parent. Or when we know that the previous parent will be discarded and we want to avoid unnecessary cloning.- Specified by:
- clearParentin interface- PrismValue
 
 - 
getPrismContextpublic PrismContext getPrismContext() - Specified by:
- getPrismContextin interface- PrismContextSensitive
 
 - 
getDefinitionprotected ItemDefinition getDefinition() 
 - 
applyDefinitionpublic void applyDefinition(ItemDefinition definition) throws SchemaException - Specified by:
- applyDefinitionin interface- PrismValue
- Throws:
- SchemaException
 
 - 
applyDefinitionpublic void applyDefinition(ItemDefinition definition, boolean force) throws SchemaException - Specified by:
- applyDefinitionin interface- PrismValue
- Throws:
- SchemaException
 
 - 
revivepublic void revive(PrismContext prismContext) throws SchemaException - Specified by:
- revivein interface- Revivable
- Throws:
- SchemaException
 
 - 
recomputepublic void recompute() Recompute the value or otherwise "initialize" it before adding it to a prism tree. This may as well do nothing if no recomputing or initialization is needed.- Specified by:
- recomputein interface- PrismValue
 
 - 
recomputepublic abstract void recompute(PrismContext prismContext) - Specified by:
- recomputein interface- PrismValue
 
 - 
acceptpublic void accept(Visitor visitor) - Specified by:
- acceptin interface- PrismValue
- Specified by:
- acceptin interface- Visitable
 
 - 
acceptpublic void accept(Visitor visitor, ItemPath path, boolean recursive) - Specified by:
- acceptin interface- PathVisitable
- Specified by:
- acceptin interface- PrismValue
 
 - 
checkConsistenceInternalpublic abstract void checkConsistenceInternal(Itemable rootItem, boolean requireDefinitions, boolean prohibitRaw, ConsistencyCheckScope scope) - Specified by:
- checkConsistenceInternalin interface- PrismValue
 
 - 
representsSameValuepublic boolean representsSameValue(PrismValue other, boolean lax) Description copied from interface:PrismValueReturns true if this and other value represent the same value. E.g. if they have the same IDs, OIDs or it is otherwise know that they "belong together" without a deep examination of the values.- Specified by:
- representsSameValuein interface- PrismValue
- lax- If we can reasonably assume that the two values belong together even if they don't have the same ID, e.g. if they both belong to single-valued parent items. This is useful e.g. when comparing multi-valued containers. But can cause problems when we want to be sure we are removing the correct value.
 
 - 
normalizepublic void normalize() - Specified by:
- normalizein interface- PrismValue
 
 - 
clonepublic abstract PrismValue clone() Literal clone.- Specified by:
- clonein interface- PrismValue
- Overrides:
- clonein class- Object
 
 - 
createImmutableClonepublic PrismValue createImmutableClone() - Specified by:
- createImmutableClonein interface- PrismValue
 
 - 
cloneComplexpublic abstract PrismValue cloneComplex(CloneStrategy strategy) Complex clone with different cloning strategies.- Specified by:
- cloneComplexin interface- PrismValue
- See Also:
- CloneStrategy
 
 - 
copyValuesprotected void copyValues(CloneStrategy strategy, PrismValueImpl clone) 
 - 
getEqualsHashCodeStrategyprotected EquivalenceStrategy getEqualsHashCodeStrategy() 
 - 
hashCodepublic int hashCode(@NotNull @NotNull ParameterizedEquivalenceStrategy equivalenceStrategy)- Specified by:
- hashCodein interface- PrismValue
 
 - 
hashCodepublic int hashCode(@NotNull @NotNull EquivalenceStrategy equivalenceStrategy)- Specified by:
- hashCodein interface- PrismValue
 
 - 
equalspublic boolean equals(PrismValue otherValue, @NotNull @NotNull EquivalenceStrategy equivalenceStrategy) - Specified by:
- equalsin interface- PrismValue
 
 - 
equalspublic boolean equals(PrismValue other, @NotNull @NotNull ParameterizedEquivalenceStrategy strategy) - Specified by:
- equalsin interface- PrismValue
 
 - 
equalspublic boolean equals(PrismValue thisValue, PrismValue otherValue) - Specified by:
- equalsin interface- PrismValue
 
 - 
diffpublic Collection<? extends ItemDelta> diff(PrismValue otherValue) Assumes matching representations. I.e. it assumes that both this and otherValue represent the same instance of item. E.g. the container with the same ID.- Specified by:
- diffin interface- PrismValue
 
 - 
diffpublic Collection<? extends ItemDelta> diff(PrismValue otherValue, ParameterizedEquivalenceStrategy strategy) Assumes matching representations. I.e. it assumes that both this and otherValue represent the same instance of item. E.g. the container with the same ID.- Specified by:
- diffin interface- PrismValue
 
 - 
diffMatchingRepresentationpublic void diffMatchingRepresentation(PrismValue otherValue, Collection<? extends ItemDelta> deltas, ParameterizedEquivalenceStrategy strategy) 
 - 
appendOriginDumpprotected void appendOriginDump(StringBuilder builder) 
 - 
toHumanReadableStringpublic abstract String toHumanReadableString() - Specified by:
- toHumanReadableStringin interface- PrismValue
 
 - 
getRealClass@Nullable public abstract @Nullable Class<?> getRealClass() - Specified by:
- getRealClassin interface- PrismValue
 
 - 
getRealValue@Nullable public abstract <T> T getRealValue() - Specified by:
- getRealValuein interface- PrismValue
 
 - 
getRootValuepublic PrismValue getRootValue() - Specified by:
- getRootValuein interface- PrismValue
 
 - 
getParentContainerValuepublic PrismContainerValue<?> getParentContainerValue() - Specified by:
- getParentContainerValuein interface- PrismValue
 
 - 
getTypeNamepublic QName getTypeName() - Specified by:
- getTypeNamein interface- PrismValue
 
 - 
getAllValues@NotNull public @NotNull Collection<PrismValue> getAllValues(ItemPath path) - Specified by:
- getAllValuesin interface- PrismValue
 
 
- 
 
-