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
,ItemDefinitionTransformer.TransformableValue
,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
-
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 void
applyDefinition(ItemDefinition definition)
void
applyDefinition(ItemDefinition definition, boolean force)
void
checkConsistenceInternal(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 void
copyValues(CloneStrategy strategy, PrismPropertyValueImpl<T> clone)
String
debugDump()
Show the content of the object intended for diagnostics by system administrator.String
debugDump(int indent)
String
debugDump(int indent, boolean detailedDump)
boolean
equals(PrismPropertyValue<?> other, @NotNull ParameterizedEquivalenceStrategy strategy, @Nullable MatchingRule<T> matchingRule)
boolean
equals(PrismValue other, @NotNull ParameterizedEquivalenceStrategy strategy)
Object
find(ItemPath path)
<IV extends PrismValue,ID extends ItemDefinition>
PartiallyResolvedItem<IV,ID>findPartial(ItemPath path)
@Nullable ExpressionWrapper
getExpression()
XNodeImpl
getRawElement()
Class<?>
getRealClass()
T
getRealValue()
@Nullable Object
getRealValueOrRawType(PrismContext prismContext)
T
getValue()
int
hashCode(@NotNull ParameterizedEquivalenceStrategy strategy)
boolean
isEmpty()
boolean
isRaw()
void
performFreeze()
void
recompute(PrismContext prismContext)
void
revive(PrismContext prismContext)
void
setExpression(@Nullable ExpressionWrapper expression)
void
setRawElement(XNode rawElement)
void
setValue(T value)
String
toHumanReadableString()
javax.xml.bind.JAXBElement<T>
toJaxbElement()
Returns JAXBElement corresponding to the this value.String
toString()
void
transformDefinition(ComplexTypeDefinition parentDef, ItemDefinition<?> itemDef, ItemDefinitionTransformer transformation)
-
Methods inherited from class com.evolveum.midpoint.prism.impl.PrismValueImpl
accept, accept, appendOriginDump, clearParent, copyValues, createImmutableClone, diff, diffMatchingRepresentation, 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, freeze, freezeAll, freezeNullableList, 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:
setValue
in interfacePrismPropertyValue<T>
-
getValue
public T getValue()
- Specified by:
getValue
in interfacePrismPropertyValue<T>
-
getRawElement
public XNodeImpl getRawElement()
- Specified by:
getRawElement
in interfacePrismPropertyValue<T>
-
setRawElement
public void setRawElement(XNode rawElement)
- Specified by:
setRawElement
in interfacePrismPropertyValue<T>
-
isRaw
public boolean isRaw()
- Specified by:
isRaw
in interfacePrismValue
-
getExpression
@Nullable public @Nullable ExpressionWrapper getExpression()
- Specified by:
getExpression
in interfacePrismPropertyValue<T>
-
setExpression
public void setExpression(@Nullable @Nullable ExpressionWrapper expression)
- Specified by:
setExpression
in interfacePrismPropertyValue<T>
-
applyDefinition
public void applyDefinition(ItemDefinition definition) throws SchemaException
- Specified by:
applyDefinition
in interfacePrismValue
- Overrides:
applyDefinition
in classPrismValueImpl
- Throws:
SchemaException
-
applyDefinition
public void applyDefinition(ItemDefinition definition, boolean force) throws SchemaException
- Specified by:
applyDefinition
in interfacePrismValue
- Overrides:
applyDefinition
in classPrismValueImpl
- Throws:
SchemaException
-
revive
public void revive(PrismContext prismContext) throws SchemaException
- Specified by:
revive
in interfaceRevivable
- Overrides:
revive
in classPrismValueImpl
- Throws:
SchemaException
-
recompute
public void recompute(PrismContext prismContext)
- Specified by:
recompute
in interfacePrismValue
- Specified by:
recompute
in classPrismValueImpl
-
find
public Object find(ItemPath path)
- Specified by:
find
in interfacePrismValue
-
findPartial
public <IV extends PrismValue,ID extends ItemDefinition> PartiallyResolvedItem<IV,ID> findPartial(ItemPath path)
- Specified by:
findPartial
in interfacePrismPropertyValue<T>
-
checkConsistenceInternal
public void checkConsistenceInternal(Itemable rootItem, boolean requireDefinitions, boolean prohibitRaw, ConsistencyCheckScope scope)
- Specified by:
checkConsistenceInternal
in interfacePrismValue
- Specified by:
checkConsistenceInternal
in classPrismValueImpl
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfacePrismValue
-
clone
public PrismPropertyValue<T> clone()
Description copied from class:PrismValueImpl
Literal clone.- Specified by:
clone
in interfacePrismPropertyValue<T>
- Specified by:
clone
in interfacePrismValue
- Specified by:
clone
in classPrismValueImpl
-
cloneComplex
public PrismPropertyValue<T> cloneComplex(CloneStrategy strategy)
Description copied from class:PrismValueImpl
Complex clone with different cloning strategies.- Specified by:
cloneComplex
in interfacePrismPropertyValue<T>
- Specified by:
cloneComplex
in interfacePrismValue
- Specified by:
cloneComplex
in 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:
equals
in interfacePrismValue
- Overrides:
equals
in classPrismValueImpl
-
equals
public boolean equals(PrismPropertyValue<?> other, @NotNull @NotNull ParameterizedEquivalenceStrategy strategy, @Nullable @Nullable MatchingRule<T> matchingRule)
- Specified by:
equals
in 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:
hashCode
in interfacePrismValue
- Overrides:
hashCode
in classPrismValueImpl
-
debugDump
public String debugDump()
Description copied from interface:DebugDumpable
Show 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:
debugDump
in interfaceDebugDumpable
- Returns:
- content of the object intended for diagnostics by system administrator.
-
debugDump
public String debugDump(int indent)
- Specified by:
debugDump
in interfaceDebugDumpable
-
debugDump
public String debugDump(int indent, boolean detailedDump)
- Specified by:
debugDump
in interfacePrismPropertyValue<T>
-
toHumanReadableString
public String toHumanReadableString()
- Specified by:
toHumanReadableString
in interfacePrismValue
- Specified by:
toHumanReadableString
in classPrismValueImpl
-
toJaxbElement
public javax.xml.bind.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:
toJaxbElement
in interfacePrismPropertyValue<T>
- Returns:
- Created JAXBElement.
-
getRealClass
public Class<?> getRealClass()
- Specified by:
getRealClass
in interfacePrismPropertyValue<T>
- Specified by:
getRealClass
in interfacePrismValue
- Specified by:
getRealClass
in classPrismValueImpl
-
getRealValue
@Nullable public T getRealValue()
- Specified by:
getRealValue
in interfacePrismPropertyValue<T>
- Specified by:
getRealValue
in interfacePrismValue
- Specified by:
getRealValue
in classPrismValueImpl
-
performFreeze
public void performFreeze()
- Overrides:
performFreeze
in classPrismValueImpl
-
getRealValueOrRawType
@Nullable public @Nullable Object getRealValueOrRawType(PrismContext prismContext)
- Specified by:
getRealValueOrRawType
in interfacePrismValue
-
transformDefinition
public void transformDefinition(ComplexTypeDefinition parentDef, ItemDefinition<?> itemDef, ItemDefinitionTransformer transformation)
- Specified by:
transformDefinition
in interfaceItemDefinitionTransformer.TransformableValue
-
-