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:
-
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
ConstructorDescriptionPrismPropertyValueImpl
(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
Modifier and TypeMethodDescriptionvoid
applyDefinition
(ItemDefinition definition) void
applyDefinition
(ItemDefinition definition, boolean force) void
checkConsistenceInternal
(Itemable rootItem, boolean requireDefinitions, boolean prohibitRaw, ConsistencyCheckScope scope) clone()
Literal clone.cloneComplex
(CloneStrategy strategy) Complex clone with different cloning strategies.protected void
copyValues
(CloneStrategy strategy, PrismPropertyValueImpl<T> clone) Show the content of the object intended for diagnostics by system administrator.debugDump
(int indent) debugDump
(int indent, boolean detailedDump) boolean
equals
(PrismPropertyValue<?> other0, @NotNull ParameterizedEquivalenceStrategy strategy, @Nullable MatchingRule<T> matchingRule) boolean
equals
(PrismValue other, @NotNull ParameterizedEquivalenceStrategy strategy) <IV extends PrismValue,
ID extends ItemDefinition<?>>
PartiallyResolvedItem<IV,ID> findPartial
(ItemPath path) @Nullable ExpressionWrapper
Class<?>
Returns the statically-typed "real value".@Nullable Object
@Nullable Object
getRealValueOrRawType
(PrismContext prismContext) getValue()
int
hashCode
(@NotNull ParameterizedEquivalenceStrategy strategy) boolean
isEmpty()
boolean
isRaw()
void
void
recompute
(PrismContext prismContext) void
revive
(PrismContext prismContext) TODO: Is revive necessary if prism context is static?void
setExpression
(@Nullable ExpressionWrapper expression) void
setRawElement
(XNode rawElement) void
jakarta.xml.bind.JAXBElement<T>
Returns JAXBElement corresponding to the this value.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, getAllItems, 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, cloneIfImmutable, createImmutableClone, diff, equals, getAllItems, getAllValues, getNearestValueOfType, getParent, getParentContainerValue, getPath, getRootObjectable, getRootValue, getTypeName, getUserData, getUserData, getValueMetadata, getValueMetadataAsContainer, hashCode, hasRealClass, hasValueMetadata, isObjectable, isOfType, isTransient, normalize, recompute, representsSameValue, setParent, setPrismContext, setTransient, setUserData, setValueMetadata, setValueMetadata, setValueMetadata, valueMetadata
-
Constructor Details
-
PrismPropertyValueImpl
-
PrismPropertyValueImpl
-
PrismPropertyValueImpl
-
PrismPropertyValueImpl
public PrismPropertyValueImpl(T value, PrismContext prismContext, OriginType type, Objectable source, ExpressionWrapper expression)
-
-
Method Details
-
setValue
- Specified by:
setValue
in interfacePrismPropertyValue<T>
-
getValue
- Specified by:
getValue
in interfacePrismPropertyValue<T>
-
getRawElement
- Specified by:
getRawElement
in interfacePrismPropertyValue<T>
-
setRawElement
- Specified by:
setRawElement
in interfacePrismPropertyValue<T>
-
isRaw
public boolean isRaw()- Specified by:
isRaw
in interfacePrismValue
-
getExpression
- Specified by:
getExpression
in interfacePrismPropertyValue<T>
-
setExpression
- Specified by:
setExpression
in interfacePrismPropertyValue<T>
-
applyDefinition
- Specified by:
applyDefinition
in interfacePrismValue
- Overrides:
applyDefinition
in classPrismValueImpl
- Throws:
SchemaException
-
applyDefinition
- Specified by:
applyDefinition
in interfacePrismValue
- Overrides:
applyDefinition
in classPrismValueImpl
- Throws:
SchemaException
-
revive
Description copied from interface:Revivable
TODO: Is revive necessary if prism context is static? TODO document (if it's found to be necessary)- Specified by:
revive
in interfaceRevivable
- Overrides:
revive
in classPrismValueImpl
-
recompute
- Specified by:
recompute
in interfacePrismValue
- Specified by:
recompute
in classPrismValueImpl
-
find
- 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
Description copied from class:PrismValueImpl
Literal clone.- Specified by:
clone
in interfacePrismPropertyValue<T>
- Specified by:
clone
in interfacePrismValue
- Specified by:
clone
in classPrismValueImpl
-
cloneComplex
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:
-
copyValues
-
equals
public boolean equals(PrismValue other, @NotNull @NotNull ParameterizedEquivalenceStrategy strategy) - Specified by:
equals
in interfacePrismValue
- Overrides:
equals
in classPrismValueImpl
-
equals
public boolean equals(PrismPropertyValue<?> other0, @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
- Specified by:
hashCode
in interfacePrismValue
- Overrides:
hashCode
in classPrismValueImpl
-
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
- Specified by:
debugDump
in interfaceDebugDumpable
-
debugDump
- Specified by:
debugDump
in interfacePrismPropertyValue<T>
-
toString
-
toHumanReadableString
- Specified by:
toHumanReadableString
in interfacePrismValue
- Specified by:
toHumanReadableString
in classPrismValueImpl
-
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
- Specified by:
getRealClass
in interfacePrismPropertyValue<T>
- Specified by:
getRealClass
in interfacePrismValue
- Specified by:
getRealClass
in classPrismValueImpl
-
getRealValue
Description copied from interface:PrismValue
Returns the statically-typed "real value". TODO specify when exactly the returned value can be null. TODO decide for containers: they throw an exception if the value is not statically typed.- 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
- Specified by:
getRealValueOrRawType
in interfacePrismValue
-
getRealValueIfExists
- Specified by:
getRealValueIfExists
in interfacePrismValue
-
transformDefinition
public void transformDefinition(ComplexTypeDefinition parentDef, ItemDefinition<?> itemDef, ItemDefinitionTransformer transformation) - Specified by:
transformDefinition
in interfaceItemDefinitionTransformer.TransformableValue
-