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,PrismPropertyValue<T>,PrismValue,PrismVisitable,Revivable,SchemaLookup.Aware,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
defaultEquivalenceStrategyFields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING -
Constructor Summary
ConstructorsConstructorDescriptionPrismPropertyValueImpl(T value) PrismPropertyValueImpl(T value, OriginType type, Objectable source) PrismPropertyValueImpl(T value, OriginType type, Objectable source, @Nullable ExpressionWrapper expression) -
Method Summary
Modifier and TypeMethodDescriptionapplyDefinition(@NotNull ItemDefinition<?> definition, boolean force) Definition application MAY change the value (currently only for container values).voidcheckConsistenceInternal(Itemable rootItem, boolean requireDefinitions, boolean prohibitRaw, ConsistencyCheckScope scope) clone()Literal clone.cloneComplex(@NotNull CloneStrategy strategy) Complex clone with different cloning strategies.protected voidcopyValues(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) booleanequals(PrismPropertyValue<?> other0, @NotNull ParameterizedEquivalenceStrategy strategy, @Nullable MatchingRule<T> matchingRule) booleanequals(PrismValue other, @NotNull ParameterizedEquivalenceStrategy strategy) <IV extends PrismValue,ID extends ItemDefinition<?>>
PartiallyResolvedItem<IV,ID> findPartial(ItemPath path) @Nullable ExpressionWrapperClass<?>Returns the statically-typed "real value".@Nullable Object@Nullable ObjectgetValue()inthashCode(@NotNull ParameterizedEquivalenceStrategy strategy) booleanisEmpty()booleanisRaw()voidvoidrecompute(PrismContext prismContext) voidrevive(PrismContext prismContext) TODO: Is revive necessary if prism context is static? TODO document (if it's found to be necessary)voidsetExpression(@Nullable ExpressionWrapper expression) voidsetRawElement(XNode rawElement) voidjakarta.xml.bind.JAXBElement<T>Returns JAXBElement corresponding to the this value.toString()voidtransformDefinition(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, getRootValue, getTypeName, getUserData, getUserData, getValueMetadata, getValueMetadataIfExists, hashCode, hashCode, hasValueMetadata, isTransient, normalize, recompute, representsSameValue, schemaLookup, setOriginObject, setOriginType, setParent, setTransient, setUserData, setValueMetadata, setValueMetadata, setValueMetadataMethods inherited from class com.evolveum.midpoint.prism.AbstractFreezable
freeze, freeze, freezeAll, freezeNullableList, isImmutable, isMutableMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDumpLazily, debugDumpLazilyMethods inherited from interface com.evolveum.midpoint.prism.Freezable
checkImmutable, checkMutable, freeze, isImmutableMethods inherited from interface com.evolveum.midpoint.prism.metadata.MidpointOriginMetadata
getOriginObject, getOriginType, setOriginObject, setOriginTypeMethods inherited from interface com.evolveum.midpoint.prism.PrismPropertyValue
equals, getRealValueRequired, hashCodeMethods inherited from interface com.evolveum.midpoint.prism.PrismValue
accept, accept, acceptVisitor, applyDefinition, applyDefinitionLegacy, applyDefinitionLegacy, clearParent, cloneIfImmutable, createImmutableClone, deleteValueMetadata, diff, equals, getAllItems, getAllValues, getNearestValueOfType, getParent, getParentContainerValue, getPath, getRootObjectable, getRootValue, getTypeName, getUserData, getUserData, getValueMetadata, getValueMetadataAsContainer, getValueMetadataIfExists, hashCode, hasRealClass, hasValueMetadata, isObjectable, isOfType, isTransient, normalize, recompute, representsSameValue, schemaLookup, setParent, setTransient, setUserData, setValueMetadata, setValueMetadata, setValueMetadata
-
Constructor Details
-
PrismPropertyValueImpl
-
PrismPropertyValueImpl
-
PrismPropertyValueImpl
public PrismPropertyValueImpl(T value, OriginType type, Objectable source, @Nullable @Nullable ExpressionWrapper expression)
-
-
Method Details
-
setValue
- Specified by:
setValuein interfacePrismPropertyValue<T>
-
getValue
- Specified by:
getValuein interfacePrismPropertyValue<T>
-
getRawElement
- Specified by:
getRawElementin interfacePrismPropertyValue<T>
-
setRawElement
- Specified by:
setRawElementin interfacePrismPropertyValue<T>
-
isRaw
public boolean isRaw()- Specified by:
isRawin interfacePrismValue
-
getExpression
- Specified by:
getExpressionin interfacePrismPropertyValue<T>
-
setExpression
- Specified by:
setExpressionin interfacePrismPropertyValue<T>
-
applyDefinition
public PrismValue applyDefinition(@NotNull @NotNull ItemDefinition<?> definition, boolean force) throws SchemaException Description copied from interface:PrismValueDefinition application MAY change the value (currently only for container values). The caller must deal with that.- Specified by:
applyDefinitionin interfacePrismValue- Throws:
SchemaException
-
revive
Description copied from interface:RevivableTODO: Is revive necessary if prism context is static? TODO document (if it's found to be necessary)- Specified by:
revivein interfaceRevivable- Overrides:
revivein classPrismValueImpl
-
recompute
- Specified by:
recomputein interfacePrismValue- Specified by:
recomputein classPrismValueImpl
-
find
- 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
Description copied from class:PrismValueImplLiteral clone.- Specified by:
clonein interfacePrismPropertyValue<T>- Specified by:
clonein interfacePrismValue- Specified by:
clonein classPrismValueImpl
-
cloneComplex
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:
-
copyValues
-
equals
public boolean equals(PrismValue other, @NotNull @NotNull ParameterizedEquivalenceStrategy strategy) - Specified by:
equalsin interfacePrismValue- Overrides:
equalsin classPrismValueImpl
-
equals
public boolean equals(PrismPropertyValue<?> other0, @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
- Specified by:
hashCodein interfacePrismValue- Overrides:
hashCodein classPrismValueImpl
-
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
- Specified by:
debugDumpin interfaceDebugDumpable
-
debugDump
- Specified by:
debugDumpin interfacePrismPropertyValue<T>
-
toString
-
toHumanReadableString
- Specified by:
toHumanReadableStringin interfacePrismValue- Specified by:
toHumanReadableStringin 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:
toJaxbElementin interfacePrismPropertyValue<T>- Returns:
- Created JAXBElement.
-
getRealClass
- Specified by:
getRealClassin interfacePrismPropertyValue<T>- Specified by:
getRealClassin interfacePrismValue- Specified by:
getRealClassin classPrismValueImpl
-
getRealValue
Description copied from interface:PrismValueReturns 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:
getRealValuein interfacePrismPropertyValue<T>- Specified by:
getRealValuein interfacePrismValue- Specified by:
getRealValuein classPrismValueImpl
-
performFreeze
public void performFreeze()- Overrides:
performFreezein classPrismValueImpl
-
getRealValueOrRawType
- Specified by:
getRealValueOrRawTypein interfacePrismValue
-
getRealValueIfExists
- Specified by:
getRealValueIfExistsin interfacePrismValue
-
transformDefinition
public void transformDefinition(ComplexTypeDefinition parentDef, ItemDefinition<?> itemDef, ItemDefinitionTransformer transformation) - Specified by:
transformDefinitionin interfaceItemDefinitionTransformer.TransformableValue
-
getSchemaContext
- Specified by:
getSchemaContextin interfacePrismValue- Overrides:
getSchemaContextin classPrismValueImpl
-