Package com.evolveum.midpoint.prism.impl
Class PrismReferenceImpl
java.lang.Object
com.evolveum.midpoint.prism.AbstractFreezable
com.evolveum.midpoint.prism.impl.ItemImpl<PrismReferenceValue,PrismReferenceDefinition>
 
com.evolveum.midpoint.prism.impl.PrismReferenceImpl
- All Implemented Interfaces:
- Freezable,- Item<PrismReferenceValue,,- PrismReferenceDefinition> - Itemable,- ItemDefinitionTransformer.TransformableItem,- ParentVisitable,- PathVisitable,- PrismContextSensitive,- PrismReference,- Revivable,- Visitable,- DebugDumpable,- Serializable
public class PrismReferenceImpl
extends ItemImpl<PrismReferenceValue,PrismReferenceDefinition>
implements PrismReference 
Object Reference is a property that describes reference to an object. It is
 used to represent association between objects. For example reference from
 User object to Account objects that belong to the user. The reference is a
 simple uni-directional link using an OID as an identifier.
 This type should be used for all object references so the implementations can
 detect them and automatically resolve them.
- Author:
- semancik
- See Also:
- 
Field SummaryFields inherited from class com.evolveum.midpoint.prism.impl.ItemImpldefinition, elementName, incomplete, parent, valuesFields inherited from interface com.evolveum.midpoint.util.DebugDumpableINDENT_STRING
- 
Constructor SummaryConstructorsConstructorDescriptionPrismReferenceImpl(QName name) PrismReferenceImpl(QName name, PrismReferenceDefinition definition, PrismContext prismContext) 
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidclone()Literal clone.cloneComplex(CloneStrategy strategy) Complex clone with different cloning strategies.protected voidcopyValues(CloneStrategy strategy, PrismReferenceImpl clone) Creates specific subclass of ItemDelta appropriate for type of item that this definition represents (e.g.createDelta(ItemPath path) debugDump(int indent) Returns object (Item or PrismValue) pointed to by the given path.<IV extends PrismValue,ID extends ItemDefinition<?>> 
 PartiallyResolvedItem<IV,ID> findPartial(ItemPath path) <I extends Item<?,?>> 
 IfindReferencedItem(ItemPath path, Class<I> type) Tries to find referenced path (path starting with object derefence) in-memory.findValueByOid(String oid) @NotNull Collection<PrismValue>getAllValues(ItemPath path) Returns all values corresponding to the provided path.protected StringReturn a human readable name of this class suitable for logs.getOid()Returns the "real value" (content) of this item: - value contained in PrismPropertyValue - Referencable in PrismReferenceValue - Containerable in PrismContainerValue - Objectable in PrismObjectValue Note that the real value can contain operational items.@NotNull Collection<Referencable>Returns (potentially empty) collection of "real values".@NotNull PrismReferenceValuegetValue()Returns the value, if there is only one.booleanmerge(PrismReferenceValue value) toString()Methods inherited from class com.evolveum.midpoint.prism.impl.ItemImplaccept, accept, acceptParentVisitor, add, addAll, addForced, addIgnoringEquivalents, addInternal, addInternalExecution, addRespectingMetadataAndCloning, appendDebugDumpSuffix, applyDefinition, applyDefinition, assertDefinitions, assertDefinitions, assertDefinitions, checkConsistence, checkConsistence, checkConsistence, checkConsistence, checkConsistence, checkConsistenceInternal, clear, copyValues, diff, equals, equals, equals, fixupDelta, getAllItems, getDefinition, getElementName, getHighestId, getParent, getPath, getPathComponent, getPrismContext, getPrismContextLocal, getRealValue, getRealValuesArray, getUserData, getUserData, getValues, hashCode, hashCode, hashCode, isIncomplete, merge, normalize, performFreeze, propagateDeepCloneDefinition, recomputeAllValues, remove, remove, removeAll, removeRespectingMetadata, replace, replaceAll, revive, setDefinition, setElementName, setIncomplete, setParent, setPrismContext, setUserData, transformDefinition, valueRemovedMethods inherited from class com.evolveum.midpoint.prism.AbstractFreezablefreeze, freeze, freezeAll, freezeNullableList, isImmutable, isMutableMethods inherited from class java.lang.Objectfinalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.evolveum.midpoint.util.DebugDumpabledebugDump, debugDumpLazily, debugDumpLazilyMethods inherited from interface com.evolveum.midpoint.prism.FreezablecheckImmutable, checkMutable, freeze, isImmutableMethods inherited from interface com.evolveum.midpoint.prism.ItemacceptParentVisitor, add, add, addAll, addAll, addIgnoringEquivalents, addRespectingMetadataAndCloning, applyDefinition, applyDefinition, assertDefinitions, assertDefinitions, assertDefinitions, checkConsistence, checkConsistence, checkConsistence, checkConsistence, checkConsistence, checkConsistenceInternal, clear, contains, contains, copy, diff, diff, equals, equals, equals, filterValues, filterYields, findValue, findValue, getAllItems, getAnyValue, getAnyValue, getClonedValues, getDefinition, getDisplayName, getElementName, getHelp, getHighestId, getParent, getPath, getPrismContextLocal, getRealValue, getRealValuesArray, getRealValuesOrRawTypes, getUserData, getUserData, getValues, hasAnyValue, hasCompleteDefinition, hashCode, hashCode, hashCode, hasNoValues, hasRaw, isEmpty, isIncomplete, isOperational, isRaw, isSingleValue, isSingleValueByDefinition, merge, normalize, recomputeAllValues, remove, remove, removeAll, removeIf, removeRespectingMetadata, replace, replaceAll, setDefinition, setElementName, setIncomplete, setParent, setPrismContext, setUserData, size, valuesStreamMethods inherited from interface com.evolveum.midpoint.prism.PathVisitableacceptMethods inherited from interface com.evolveum.midpoint.prism.PrismContextSensitivegetPrismContext
- 
Constructor Details- 
PrismReferenceImpl
- 
PrismReferenceImplpublic PrismReferenceImpl(QName name, PrismReferenceDefinition definition, PrismContext prismContext) 
 
- 
- 
Method Details- 
getValueDescription copied from interface:ItemReturns the value, if there is only one. Throws exception if there are more values. If there is no value, this method either: - returns null (for properties) - throws an exception (for items that can hold multiple values) - creates an empty value (for containers and references). TODO think again whether getOrCreateValue would not be better- Specified by:
- getValuein interface- Item<PrismReferenceValue,- PrismReferenceDefinition> 
- Overrides:
- getValuein class- ItemImpl<PrismReferenceValue,- PrismReferenceDefinition> 
 
- 
getRealValueDescription copied from interface:ItemReturns the "real value" (content) of this item: - value contained in PrismPropertyValue - Referencable in PrismReferenceValue - Containerable in PrismContainerValue - Objectable in PrismObjectValue Note that the real value can contain operational items. It can also contain container IDs (although they are not considered to be part of the real value). It does not contain information about item element name nor other metadata like origin, definition, etc. (Although e.g. Containerable can be converted back into PrismContainerValue that can be used to retrieve this information.)- Specified by:
- getRealValuein interface- Item<PrismReferenceValue,- PrismReferenceDefinition> 
- Specified by:
- getRealValuein interface- PrismReference
- Overrides:
- getRealValuein class- ItemImpl<PrismReferenceValue,- PrismReferenceDefinition> 
 
- 
getRealValuesDescription copied from interface:ItemReturns (potentially empty) collection of "real values".- Specified by:
- getRealValuesin interface- Item<PrismReferenceValue,- PrismReferenceDefinition> 
- Specified by:
- getRealValuesin interface- PrismReference
 
- 
merge- Specified by:
- mergein interface- PrismReference
 
- 
getOid- Specified by:
- getOidin interface- PrismReference
 
- 
getTargetName- Specified by:
- getTargetNamein interface- PrismReference
 
- 
findValueByOid- Specified by:
- findValueByOidin interface- PrismReference
 
- 
findDescription copied from interface:ItemReturns object (Item or PrismValue) pointed to by the given path.- Specified by:
- findin interface- Item<PrismReferenceValue,- PrismReferenceDefinition> 
 
- 
findPartialpublic <IV extends PrismValue,ID extends ItemDefinition<?>> PartiallyResolvedItem<IV,ID> findPartial(ItemPath path) - Specified by:
- findPartialin interface- Item<PrismReferenceValue,- PrismReferenceDefinition> 
- Specified by:
- findPartialin interface- PrismReference
 
- 
createDeltaDescription copied from interface:ItemCreates specific subclass of ItemDelta appropriate for type of item that this definition represents (e.g. PropertyDelta, ContainerDelta, ...)- Specified by:
- createDeltain interface- Item<PrismReferenceValue,- PrismReferenceDefinition> 
- Specified by:
- createDeltain interface- PrismReference
 
- 
createDelta- Specified by:
- createDeltain interface- Item<PrismReferenceValue,- PrismReferenceDefinition> 
- Specified by:
- createDeltain interface- PrismReference
 
- 
checkDefinition- Specified by:
- checkDefinitionin class- ItemImpl<PrismReferenceValue,- PrismReferenceDefinition> 
 
- 
cloneDescription copied from interface:ItemLiteral clone.- Specified by:
- clonein interface- Item<PrismReferenceValue,- PrismReferenceDefinition> 
- Specified by:
- clonein interface- PrismReference
- Specified by:
- clonein class- ItemImpl<PrismReferenceValue,- PrismReferenceDefinition> 
 
- 
createImmutableClone- Specified by:
- createImmutableClonein interface- Item<PrismReferenceValue,- PrismReferenceDefinition> 
- Specified by:
- createImmutableClonein interface- PrismReference
- Overrides:
- createImmutableClonein class- ItemImpl<PrismReferenceValue,- PrismReferenceDefinition> 
 
- 
cloneComplexDescription copied from interface:ItemComplex clone with different cloning strategies.- Specified by:
- cloneComplexin interface- Item<PrismReferenceValue,- PrismReferenceDefinition> 
- Specified by:
- cloneComplexin interface- PrismReference
- See Also:
 
- 
copyValues
- 
toString- Specified by:
- toStringin interface- PrismReference
- Overrides:
- toStringin class- ItemImpl<PrismReferenceValue,- PrismReferenceDefinition> 
 
- 
debugDump- Specified by:
- debugDumpin interface- DebugDumpable
- Specified by:
- debugDumpin interface- PrismReference
- Overrides:
- debugDumpin class- ItemImpl<PrismReferenceValue,- PrismReferenceDefinition> 
 
- 
getDebugDumpClassNameReturn a human readable name of this class suitable for logs.- Overrides:
- getDebugDumpClassNamein class- ItemImpl<PrismReferenceValue,- PrismReferenceDefinition> 
 
- 
findReferencedItemDescription copied from interface:PrismReferenceTries to find referenced path (path starting with object derefence) in-memory. This works only for single-value references, whose value also contains embedded object. The search is performed on embedded object.- Specified by:
- findReferencedItemin interface- PrismReference
 
- 
getAllValuesDescription copied from interface:ItemReturns all values corresponding to the provided path. The path may contain ambiguous segments (e.g. `assignment/targetRef` when there are more assignments). Limitations: . The path can contain only name segments and the "identifier" (`#`) segment - at least for now. No ID segments. . There are no guarantees about duplicate values. They may or may not be present in the returned collections. . The caller should not modify the returned collection in any way. Note to implementors: Please take care about the performance of this method.- Specified by:
- getAllValuesin interface- Item<PrismReferenceValue,- PrismReferenceDefinition> 
- Overrides:
- getAllValuesin class- ItemImpl<PrismReferenceValue,- PrismReferenceDefinition> 
 
 
-