Package com.evolveum.midpoint.prism.impl
Class PrismObjectValueImpl<O extends Objectable>
- java.lang.Object
-
- com.evolveum.midpoint.prism.AbstractFreezable
-
- com.evolveum.midpoint.prism.impl.PrismValueImpl
-
- com.evolveum.midpoint.prism.impl.PrismContainerValueImpl<O>
-
- com.evolveum.midpoint.prism.impl.PrismObjectValueImpl<O>
-
- All Implemented Interfaces:
Freezable
,ItemDefinitionTransformer.TransformableValue
,MidpointOriginMetadata
,ParentVisitable
,PathVisitable
,PrismContainerValue<O>
,PrismContextSensitive
,PrismObjectValue<O>
,PrismValue
,Revivable
,Visitable
,DebugDumpable
,Serializable
public class PrismObjectValueImpl<O extends Objectable> extends PrismContainerValueImpl<O> implements PrismObjectValue<O>
Extension of PrismContainerValue that holds object-specific data (OID and version). It was created to make methods returning/accepting ItemValue universally usable; not losing OID/version data when object values are passed via such interfaces. This value is to be held by PrismObject. And such object should hold exactly one PrismObjectValue.- Author:
- mederly
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.evolveum.midpoint.prism.PrismContainerValue
PrismContainerValue.RemovedItemDefinitionException
-
-
Field Summary
Fields Modifier and Type Field Description protected String
oid
protected String
version
-
Fields inherited from class com.evolveum.midpoint.prism.impl.PrismContainerValueImpl
complexTypeDefinition, DIFFERENT_ITEMS_EXCEPTION, items, unqualifiedItemNames
-
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 PrismObjectValueImpl()
PrismObjectValueImpl(PrismContext prismContext)
PrismObjectValueImpl(O objectable)
PrismObjectValueImpl(O objectable, PrismContext prismContext)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description O
asObjectable()
static <T extends Objectable>
TasObjectable(PrismObject<T> object)
PrismObject<O>
asPrismObject()
PrismContainer<O>
asSingleValuedContainer(@NotNull QName itemName)
Returns a single-valued container (with a single-valued definition) holding just this value.PrismObjectValueImpl<O>
clone()
Literal clone.PrismObjectValueImpl<O>
cloneComplex(CloneStrategy strategy)
Complex clone with different cloning strategies.protected void
debugDumpIdentifiers(StringBuilder sb)
protected void
detailedDebugDumpStart(StringBuilder sb)
boolean
equals(PrismValue other, @NotNull ParameterizedEquivalenceStrategy strategy)
boolean
equivalent(PrismContainerValue<?> other)
PrismContainer<?>
getExtension()
Object
getIdentifier()
Returns the value of identifier corresponding to the '#' path: container id or object oid.PolyString
getName()
String
getOid()
String
getVersion()
int
hashCode(@NotNull ParameterizedEquivalenceStrategy strategy)
void
setOid(String oid)
void
setVersion(String version)
String
toHumanReadableString()
String
toString()
-
Methods inherited from class com.evolveum.midpoint.prism.impl.PrismContainerValueImpl
accept, accept, acceptParentVisitor, add, add, addAll, addAllReplaceExisting, addRawElement, addReplaceExisting, applyDefinition, applyDefinition, asContainerable, asContainerable, asContainerable, asContainerables, asContainerables, asPrismContainerValues, assertDefinitions, assertDefinitions, canRepresent, checkConsistenceInternal, clear, contains, contains, containsItem, containsRealValue, copyValues, createDetachedSubItem, createImmutableClone, createProperty, createProperty, debugDump, deleteRawElement, diffMatchingRepresentation, find, findContainer, findItem, findItem, findOrCreateContainer, findOrCreateItem, findOrCreateItem, findOrCreateItem, findOrCreateProperty, findOrCreateProperty, findOrCreateReference, findPartial, findProperty, findProperty, findReference, findReferenceByCompositeObjectElementName, getAllValues, getCompileTimeClass, getComplexTypeDefinition, getContainer, getDefinition, getId, getItemNames, getItems, getItems, getParent, getPath, getPathComponent, getPrismContext, getPrismContextLocal, getProperties, getPropertyRealValue, getRealClass, getRealValue, getRootValue, getTypeName, getValue, hasCompleteDefinition, hasNoItems, isEmpty, isIdOnly, isRaw, keepPaths, merge, mergeContent, normalize, performFreeze, recompute, remove, removeAll, removeContainer, removeItems, removeOperationalItems, removePaths, removeProperty, removeRawElement, removeReference, replace, representsSameValue, revive, setId, setOriginTypeRecursive, setPropertyRealValue, size, subtract, toPcvList, transformDefinition
-
Methods inherited from class com.evolveum.midpoint.prism.impl.PrismValueImpl
appendOriginDump, applyDefinition, clearParent, copyValues, diff, diffMatchingRepresentation, equals, equals, getOriginObject, getOriginType, getParentContainerValue, getUserData, getUserData, getValueMetadata, hashCode, hashCode, hasValueMetadata, isTransient, recompute, 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
debugDump, debugDump, 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.PrismContainerValue
accept, accept, acceptParentVisitor, add, add, addAll, addAllReplaceExisting, addRawElement, addReplaceExisting, applyDefinition, applyDefinition, asContainerable, asContainerable, assertDefinitions, assertDefinitions, canRepresent, clear, contains, contains, containsItem, createDetachedSubItem, createImmutableClone, createProperty, createProperty, deleteRawElement, findContainer, findItem, findItem, findItem, findOrCreateContainer, findOrCreateItem, findOrCreateItem, findOrCreateItem, findOrCreateProperty, findOrCreateProperty, findOrCreateReference, findPartial, findProperty, findProperty, findReference, findReferenceByCompositeObjectElementName, getCompileTimeClass, getComplexTypeDefinition, getContainer, getDefinition, getId, getItemNames, getItemRealValue, getItems, getParent, getPrismContextLocal, getProperties, getPropertyRealValue, getRootValue, getValue, hasCompleteDefinition, hasNoItems, isIdOnly, keepPaths, merge, mergeContent, recompute, remove, removeAll, removeContainer, removeItems, removeOperationalItems, removePaths, removeProperty, removeRawElement, removeReference, replace, setId, setOriginTypeRecursive, setPropertyRealValue, size, subtract
-
Methods inherited from interface com.evolveum.midpoint.prism.PrismContextSensitive
getPrismContext
-
Methods inherited from interface com.evolveum.midpoint.prism.PrismObjectValue
equals, hashCode
-
Methods inherited from interface com.evolveum.midpoint.prism.PrismValue
applyDefinition, checkConsistenceInternal, clearParent, diff, equals, find, getAllValues, getParentContainerValue, getPath, getRealClass, getRealValue, getRealValueOrRawType, getTypeName, getUserData, getUserData, getValueMetadata, getValueMetadataAsContainer, hashCode, hasRealClass, hasValueMetadata, isEmpty, isRaw, isTransient, normalize, recompute, representsSameValue, setParent, setPrismContext, setTransient, setUserData, setValueMetadata, setValueMetadata, setValueMetadata, valueMetadata
-
-
-
-
Constructor Detail
-
PrismObjectValueImpl
public PrismObjectValueImpl()
-
PrismObjectValueImpl
public PrismObjectValueImpl(PrismContext prismContext)
-
PrismObjectValueImpl
public PrismObjectValueImpl(O objectable)
-
PrismObjectValueImpl
public PrismObjectValueImpl(O objectable, PrismContext prismContext)
-
-
Method Detail
-
getOid
public String getOid()
- Specified by:
getOid
in interfacePrismObjectValue<O extends Objectable>
-
setOid
public void setOid(String oid)
- Specified by:
setOid
in interfacePrismObjectValue<O extends Objectable>
-
getVersion
public String getVersion()
- Specified by:
getVersion
in interfacePrismObjectValue<O extends Objectable>
-
setVersion
public void setVersion(String version)
- Specified by:
setVersion
in interfacePrismObjectValue<O extends Objectable>
-
asObjectable
public O asObjectable()
- Specified by:
asObjectable
in interfacePrismObjectValue<O extends Objectable>
-
asPrismObject
public PrismObject<O> asPrismObject()
- Specified by:
asPrismObject
in interfacePrismObjectValue<O extends Objectable>
-
getName
public PolyString getName()
- Specified by:
getName
in interfacePrismObjectValue<O extends Objectable>
-
getExtension
public PrismContainer<?> getExtension()
- Specified by:
getExtension
in interfacePrismObjectValue<O extends Objectable>
-
clone
public PrismObjectValueImpl<O> clone()
Description copied from class:PrismValueImpl
Literal clone.- Specified by:
clone
in interfacePrismContainerValue<O extends Objectable>
- Specified by:
clone
in interfacePrismObjectValue<O extends Objectable>
- Specified by:
clone
in interfacePrismValue
- Overrides:
clone
in classPrismContainerValueImpl<O extends Objectable>
-
cloneComplex
public PrismObjectValueImpl<O> cloneComplex(CloneStrategy strategy)
Description copied from class:PrismValueImpl
Complex clone with different cloning strategies.- Specified by:
cloneComplex
in interfacePrismContainerValue<O extends Objectable>
- Specified by:
cloneComplex
in interfacePrismObjectValue<O extends Objectable>
- Specified by:
cloneComplex
in interfacePrismValue
- Overrides:
cloneComplex
in classPrismContainerValueImpl<O extends Objectable>
- See Also:
CloneStrategy
-
hashCode
public int hashCode(@NotNull @NotNull ParameterizedEquivalenceStrategy strategy)
- Specified by:
hashCode
in interfacePrismValue
- Overrides:
hashCode
in classPrismContainerValueImpl<O extends Objectable>
-
equivalent
public boolean equivalent(PrismContainerValue<?> other)
- Specified by:
equivalent
in interfacePrismContainerValue<O extends Objectable>
- Specified by:
equivalent
in interfacePrismObjectValue<O extends Objectable>
- Overrides:
equivalent
in classPrismContainerValueImpl<O extends Objectable>
-
equals
public boolean equals(PrismValue other, @NotNull @NotNull ParameterizedEquivalenceStrategy strategy)
- Specified by:
equals
in interfacePrismValue
- Overrides:
equals
in classPrismContainerValueImpl<O extends Objectable>
-
toString
public String toString()
- Specified by:
toString
in interfacePrismObjectValue<O extends Objectable>
- Overrides:
toString
in classPrismContainerValueImpl<O extends Objectable>
-
detailedDebugDumpStart
protected void detailedDebugDumpStart(StringBuilder sb)
- Overrides:
detailedDebugDumpStart
in classPrismContainerValueImpl<O extends Objectable>
-
debugDumpIdentifiers
protected void debugDumpIdentifiers(StringBuilder sb)
- Overrides:
debugDumpIdentifiers
in classPrismContainerValueImpl<O extends Objectable>
-
toHumanReadableString
public String toHumanReadableString()
- Specified by:
toHumanReadableString
in interfacePrismObjectValue<O extends Objectable>
- Specified by:
toHumanReadableString
in interfacePrismValue
- Overrides:
toHumanReadableString
in classPrismContainerValueImpl<O extends Objectable>
-
asSingleValuedContainer
public PrismContainer<O> asSingleValuedContainer(@NotNull @NotNull QName itemName)
Description copied from class:PrismContainerValueImpl
Returns a single-valued container (with a single-valued definition) holding just this value.- Specified by:
asSingleValuedContainer
in interfacePrismContainerValue<O extends Objectable>
- Specified by:
asSingleValuedContainer
in interfacePrismObjectValue<O extends Objectable>
- Overrides:
asSingleValuedContainer
in classPrismContainerValueImpl<O extends Objectable>
- Parameters:
itemName
- Item name for newly-created container.
-
asObjectable
public static <T extends Objectable> T asObjectable(PrismObject<T> object)
-
getIdentifier
public Object getIdentifier()
Description copied from class:PrismContainerValueImpl
Returns the value of identifier corresponding to the '#' path: container id or object oid.- Overrides:
getIdentifier
in classPrismContainerValueImpl<O extends Objectable>
-
-