Package com.evolveum.midpoint.prism.impl
Class PrismPropertyValueImpl<T>
- java.lang.Object
-
- com.evolveum.midpoint.prism.impl.PrismValueImpl
-
- com.evolveum.midpoint.prism.impl.PrismPropertyValueImpl<T>
-
- All Implemented Interfaces:
PathVisitable
,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, immutable, 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 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, ParameterizedEquivalenceStrategy strategy, MatchingRule<T> matchingRule)
boolean
equals(PrismValue other, ParameterizedEquivalenceStrategy strategy)
boolean
equals(Object obj)
Object
find(ItemPath path)
<IV extends PrismValue,ID extends ItemDefinition>
PartiallyResolvedItem<IV,ID>findPartial(ItemPath path)
ExpressionWrapper
getExpression()
XNodeImpl
getRawElement()
Class<?>
getRealClass()
<T> T
getRealValue()
T
getValue()
int
hashCode(ParameterizedEquivalenceStrategy strategy)
boolean
isEmpty()
boolean
isRaw()
void
recompute(PrismContext prismContext)
void
revive(PrismContext prismContext)
void
setExpression(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()
-
Methods inherited from class com.evolveum.midpoint.prism.impl.PrismValueImpl
accept, accept, appendOriginDump, checkMutability, clearParent, copyValues, diff, diff, diffMatchingRepresentation, equals, equals, getAllValues, getDefinition, getEqualsHashCodeStrategy, getOriginObject, getOriginType, getParent, getParentContainerValue, getPath, getPathComponent, getPrismContext, getRootValue, getTypeName, getUserData, getUserData, hashCode, hashCode, isImmutable, normalize, recompute, representsSameValue, setImmutable, setOriginObject, setOriginType, setParent, setPrismContext, setUserData
-
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.PrismPropertyValue
hashCode
-
Methods inherited from interface com.evolveum.midpoint.prism.PrismValue
accept, accept, clearParent, diff, diff, equals, equals, getAllValues, getOriginObject, getOriginType, getParent, getParentContainerValue, getPath, getPrismContext, getRootValue, getTypeName, getUserData, getUserData, hashCode, isImmutable, normalize, recompute, representsSameValue, setImmutable, setOriginObject, setOriginType, setParent, setPrismContext, setUserData
-
-
-
-
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 interfacePrismPropertyValue<T>
- Specified by:
isRaw
in interfacePrismValue
-
getExpression
@Nullable public ExpressionWrapper getExpression()
- Specified by:
getExpression
in interfacePrismPropertyValue<T>
-
setExpression
public void setExpression(@Nullable ExpressionWrapper expression)
- Specified by:
setExpression
in interfacePrismPropertyValue<T>
-
applyDefinition
public void applyDefinition(ItemDefinition definition) throws SchemaException
- Specified by:
applyDefinition
in interfacePrismPropertyValue<T>
- 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 interfacePrismPropertyValue<T>
- Specified by:
applyDefinition
in interfacePrismValue
- Overrides:
applyDefinition
in classPrismValueImpl
- Throws:
SchemaException
-
revive
public void revive(PrismContext prismContext) throws SchemaException
- Specified by:
revive
in interfacePrismPropertyValue<T>
- Specified by:
revive
in interfacePrismValue
- Specified by:
revive
in interfaceRevivable
- Overrides:
revive
in classPrismValueImpl
- Throws:
SchemaException
-
recompute
public void recompute(PrismContext prismContext)
- Specified by:
recompute
in interfacePrismPropertyValue<T>
- Specified by:
recompute
in interfacePrismValue
- Specified by:
recompute
in classPrismValueImpl
-
find
public Object find(ItemPath path)
- Specified by:
find
in interfacePrismPropertyValue<T>
- 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 interfacePrismPropertyValue<T>
- Specified by:
checkConsistenceInternal
in interfacePrismValue
- Specified by:
checkConsistenceInternal
in classPrismValueImpl
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfacePrismPropertyValue<T>
- 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 ParameterizedEquivalenceStrategy strategy)
- Specified by:
equals
in interfacePrismValue
- Overrides:
equals
in classPrismValueImpl
-
equals
public boolean equals(PrismPropertyValue<?> other, ParameterizedEquivalenceStrategy strategy, MatchingRule<T> matchingRule)
- Specified by:
equals
in interfacePrismPropertyValue<T>
-
equals
public boolean equals(Object obj)
- Specified by:
equals
in interfacePrismPropertyValue<T>
- Overrides:
equals
in classPrismValueImpl
-
hashCode
public int hashCode(@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
- Specified by:
debugDump
in interfacePrismPropertyValue<T>
- Returns:
- content of the object intended for diagnostics by system administrator.
-
debugDump
public String debugDump(int indent)
- Specified by:
debugDump
in interfaceDebugDumpable
- Specified by:
debugDump
in interfacePrismPropertyValue<T>
-
debugDump
public String debugDump(int indent, boolean detailedDump)
- Specified by:
debugDump
in interfacePrismPropertyValue<T>
-
toString
public String toString()
- Specified by:
toString
in interfacePrismPropertyValue<T>
- Overrides:
toString
in classObject
-
toHumanReadableString
public String toHumanReadableString()
- Specified by:
toHumanReadableString
in interfacePrismPropertyValue<T>
- 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> T getRealValue()
- Specified by:
getRealValue
in interfacePrismPropertyValue<T>
- Specified by:
getRealValue
in interfacePrismValue
- Specified by:
getRealValue
in classPrismValueImpl
-
-