Package com.evolveum.midpoint.prism.impl
Class PrismPropertyValueImpl<T>
- java.lang.Object
-
- com.evolveum.midpoint.prism.AbstractFreezable
-
- com.evolveum.midpoint.prism.impl.PrismValueImpl
-
- com.evolveum.midpoint.prism.impl.PrismPropertyValueImpl<T>
-
- All Implemented Interfaces:
Freezable,MidpointOriginMetadata,PathVisitable,PrismContextSensitive,PrismPropertyValue<T>,PrismValue,Revivable,Visitable,DebugDumpable,Serializable
public class PrismPropertyValueImpl<T> extends PrismValueImpl implements DebugDumpable, Serializable, PrismPropertyValue<T>
- Author:
- lazyman
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.evolveum.midpoint.prism.impl.PrismValueImpl
defaultEquivalenceStrategy, prismContext
-
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
-
Constructor Summary
Constructors Constructor Description PrismPropertyValueImpl(T value)PrismPropertyValueImpl(T value, OriginType type, Objectable source)PrismPropertyValueImpl(T value, PrismContext prismContext)PrismPropertyValueImpl(T value, PrismContext prismContext, OriginType type, Objectable source, ExpressionWrapper expression)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapplyDefinition(ItemDefinition definition)voidapplyDefinition(ItemDefinition definition, boolean force)voidcheckConsistenceInternal(Itemable rootItem, boolean requireDefinitions, boolean prohibitRaw, ConsistencyCheckScope scope)PrismPropertyValue<T>clone()Literal clone.PrismPropertyValue<T>cloneComplex(CloneStrategy strategy)Complex clone with different cloning strategies.protected voidcopyValues(CloneStrategy strategy, PrismPropertyValueImpl<T> clone)StringdebugDump()Show the content of the object intended for diagnostics by system administrator.StringdebugDump(int indent)StringdebugDump(int indent, boolean detailedDump)booleanequals(PrismPropertyValue<?> other, @NotNull ParameterizedEquivalenceStrategy strategy, @Nullable MatchingRule<T> matchingRule)booleanequals(PrismValue other, @NotNull ParameterizedEquivalenceStrategy strategy)Objectfind(ItemPath path)<IV extends PrismValue,ID extends ItemDefinition>
PartiallyResolvedItem<IV,ID>findPartial(ItemPath path)@Nullable ExpressionWrappergetExpression()XNodeImplgetRawElement()Class<?>getRealClass()TgetRealValue()@Nullable ObjectgetRealValueOrRawType(PrismContext prismContext)TgetValue()inthashCode(@NotNull ParameterizedEquivalenceStrategy strategy)booleanisEmpty()booleanisRaw()voidperformFreeze()voidrecompute(PrismContext prismContext)voidrevive(PrismContext prismContext)voidsetExpression(@Nullable ExpressionWrapper expression)voidsetRawElement(XNode rawElement)voidsetValue(T value)StringtoHumanReadableString()JAXBElement<T>toJaxbElement()Returns JAXBElement corresponding to the this value.StringtoString()-
Methods inherited from class com.evolveum.midpoint.prism.impl.PrismValueImpl
accept, accept, appendOriginDump, clearParent, copyValues, createImmutableClone, diff, diffMatchingRepresentation, equals, equals, getAllValues, getDefinition, getOriginObject, getOriginType, getParent, getParentContainerValue, getPath, getPathComponent, getPrismContext, getRootValue, getTypeName, getUserData, getUserData, getValueMetadata, hashCode, hashCode, hasValueMetadata, isTransient, normalize, recompute, representsSameValue, setOriginObject, setOriginType, setParent, setPrismContext, setTransient, setUserData, setValueMetadata, setValueMetadata, setValueMetadata
-
Methods inherited from class com.evolveum.midpoint.prism.AbstractFreezable
freeze, isImmutable, isMutable
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDumpLazily, debugDumpLazily
-
Methods inherited from interface com.evolveum.midpoint.prism.Freezable
checkImmutable, checkMutable, freeze, isImmutable
-
Methods inherited from interface com.evolveum.midpoint.prism.metadata.MidpointOriginMetadata
getOriginObject, getOriginType, setOriginObject, setOriginType
-
Methods inherited from interface com.evolveum.midpoint.prism.PrismContextSensitive
getPrismContext
-
Methods inherited from interface com.evolveum.midpoint.prism.PrismPropertyValue
equals, hashCode
-
Methods inherited from interface com.evolveum.midpoint.prism.PrismValue
accept, accept, clearParent, createImmutableClone, diff, equals, getAllValues, getParent, getParentContainerValue, getPath, getRootValue, getTypeName, getUserData, getUserData, getValueMetadata, getValueMetadataAsContainer, hashCode, hasRealClass, hasValueMetadata, isTransient, normalize, recompute, representsSameValue, setParent, setPrismContext, setTransient, setUserData, setValueMetadata, setValueMetadata, setValueMetadata, valueMetadata
-
-
-
-
Constructor Detail
-
PrismPropertyValueImpl
public PrismPropertyValueImpl(T value)
-
PrismPropertyValueImpl
public PrismPropertyValueImpl(T value, PrismContext prismContext)
-
PrismPropertyValueImpl
public PrismPropertyValueImpl(T value, OriginType type, Objectable source)
-
PrismPropertyValueImpl
public PrismPropertyValueImpl(T value, PrismContext prismContext, OriginType type, Objectable source, ExpressionWrapper expression)
-
-
Method Detail
-
setValue
public void setValue(T value)
- Specified by:
setValuein interfacePrismPropertyValue<T>
-
getValue
public T getValue()
- Specified by:
getValuein interfacePrismPropertyValue<T>
-
getRawElement
public XNodeImpl getRawElement()
- Specified by:
getRawElementin interfacePrismPropertyValue<T>
-
setRawElement
public void setRawElement(XNode rawElement)
- Specified by:
setRawElementin interfacePrismPropertyValue<T>
-
isRaw
public boolean isRaw()
- Specified by:
isRawin interfacePrismValue
-
getExpression
@Nullable public @Nullable ExpressionWrapper getExpression()
- Specified by:
getExpressionin interfacePrismPropertyValue<T>
-
setExpression
public void setExpression(@Nullable @Nullable ExpressionWrapper expression)- Specified by:
setExpressionin interfacePrismPropertyValue<T>
-
applyDefinition
public void applyDefinition(ItemDefinition definition) throws SchemaException
- Specified by:
applyDefinitionin interfacePrismValue- Overrides:
applyDefinitionin classPrismValueImpl- Throws:
SchemaException
-
applyDefinition
public void applyDefinition(ItemDefinition definition, boolean force) throws SchemaException
- Specified by:
applyDefinitionin interfacePrismValue- Overrides:
applyDefinitionin classPrismValueImpl- Throws:
SchemaException
-
revive
public void revive(PrismContext prismContext) throws SchemaException
- Specified by:
revivein interfaceRevivable- Overrides:
revivein classPrismValueImpl- Throws:
SchemaException
-
recompute
public void recompute(PrismContext prismContext)
- Specified by:
recomputein interfacePrismValue- Specified by:
recomputein classPrismValueImpl
-
find
public Object find(ItemPath path)
- Specified by:
findin interfacePrismValue
-
findPartial
public <IV extends PrismValue,ID extends ItemDefinition> PartiallyResolvedItem<IV,ID> findPartial(ItemPath path)
- Specified by:
findPartialin interfacePrismPropertyValue<T>
-
checkConsistenceInternal
public void checkConsistenceInternal(Itemable rootItem, boolean requireDefinitions, boolean prohibitRaw, ConsistencyCheckScope scope)
- Specified by:
checkConsistenceInternalin interfacePrismValue- Specified by:
checkConsistenceInternalin classPrismValueImpl
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfacePrismValue
-
clone
public PrismPropertyValue<T> clone()
Description copied from class:PrismValueImplLiteral clone.- Specified by:
clonein interfacePrismPropertyValue<T>- Specified by:
clonein interfacePrismValue- Specified by:
clonein classPrismValueImpl
-
cloneComplex
public PrismPropertyValue<T> cloneComplex(CloneStrategy strategy)
Description copied from class:PrismValueImplComplex clone with different cloning strategies.- Specified by:
cloneComplexin interfacePrismPropertyValue<T>- Specified by:
cloneComplexin interfacePrismValue- Specified by:
cloneComplexin classPrismValueImpl- See Also:
CloneStrategy
-
copyValues
protected void copyValues(CloneStrategy strategy, PrismPropertyValueImpl<T> clone)
-
equals
public boolean equals(PrismValue other, @NotNull @NotNull ParameterizedEquivalenceStrategy strategy)
- Specified by:
equalsin interfacePrismValue- Overrides:
equalsin classPrismValueImpl
-
equals
public boolean equals(PrismPropertyValue<?> other, @NotNull @NotNull ParameterizedEquivalenceStrategy strategy, @Nullable @Nullable MatchingRule<T> matchingRule)
- Specified by:
equalsin interfacePrismPropertyValue<T>- Returns:
- true if values are equivalent under given strategy and (if present) also under matching rule. Some of the strategy requirements (e.g. literal DOM comparison) can be skipped if matching rule is used.
-
hashCode
public int hashCode(@NotNull @NotNull ParameterizedEquivalenceStrategy strategy)- Specified by:
hashCodein interfacePrismValue- Overrides:
hashCodein classPrismValueImpl
-
debugDump
public String debugDump()
Description copied from interface:DebugDumpableShow the content of the object intended for diagnostics by system administrator. The out put should be suitable to use in system logs at "debug" level. It may be multi-line, but in that case it should be well indented and quite terse. As it is intended to be used by system administrator, it should not use any developer terms such as class names, exceptions or stack traces.- Specified by:
debugDumpin interfaceDebugDumpable- Returns:
- content of the object intended for diagnostics by system administrator.
-
debugDump
public String debugDump(int indent)
- Specified by:
debugDumpin interfaceDebugDumpable
-
debugDump
public String debugDump(int indent, boolean detailedDump)
- Specified by:
debugDumpin interfacePrismPropertyValue<T>
-
toHumanReadableString
public String toHumanReadableString()
- Specified by:
toHumanReadableStringin interfacePrismValue- Specified by:
toHumanReadableStringin classPrismValueImpl
-
toJaxbElement
public JAXBElement<T> toJaxbElement()
Returns JAXBElement corresponding to the this value. Name of the element is the name of parent property; its value is the real value of the property.- Specified by:
toJaxbElementin interfacePrismPropertyValue<T>- Returns:
- Created JAXBElement.
-
getRealClass
public Class<?> getRealClass()
- Specified by:
getRealClassin interfacePrismPropertyValue<T>- Specified by:
getRealClassin interfacePrismValue- Specified by:
getRealClassin classPrismValueImpl
-
getRealValue
@Nullable public T getRealValue()
- Specified by:
getRealValuein interfacePrismPropertyValue<T>- Specified by:
getRealValuein interfacePrismValue- Specified by:
getRealValuein classPrismValueImpl
-
performFreeze
public void performFreeze()
- Overrides:
performFreezein classPrismValueImpl
-
getRealValueOrRawType
@Nullable public @Nullable Object getRealValueOrRawType(PrismContext prismContext)
- Specified by:
getRealValueOrRawTypein interfacePrismValue
-
-