Package com.evolveum.midpoint.prism.impl
Class PrismReferenceValueImpl
java.lang.Object
com.evolveum.midpoint.prism.AbstractFreezable
com.evolveum.midpoint.prism.impl.PrismValueImpl
com.evolveum.midpoint.prism.impl.PrismReferenceValueImpl
- All Implemented Interfaces:
- Freezable,- ItemDefinitionTransformer.TransformableValue,- MidpointOriginMetadata,- PathVisitable,- PrismContextSensitive,- PrismReferenceValue,- PrismValue,- Revivable,- Visitable,- DebugDumpable,- ShortDumpable,- Serializable
- Author:
- Radovan Semancik
- See Also:
- 
Field SummaryFields inherited from class com.evolveum.midpoint.prism.impl.PrismValueImpldefaultEquivalenceStrategyFields inherited from interface com.evolveum.midpoint.util.DebugDumpableINDENT_STRING
- 
Constructor SummaryConstructorsConstructorDescriptionPrismReferenceValueImpl(String oid, OriginType type, Objectable source) PrismReferenceValueImpl(String oid, QName targetType) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidvoidapplyDefinition(ItemDefinition definition, boolean force) voidapplyDefinition(PrismReferenceDefinition definition, boolean force) static @NotNull List<Referencable>asReferencables(@NotNull Collection<PrismReferenceValue> values) static @NotNull List<PrismReferenceValue>asReferenceValues(@NotNull Collection<? extends Referencable> referencables) voidcheckConsistenceInternal(Itemable rootItem, boolean requireDefinitions, boolean prohibitRaw, ConsistencyCheckScope scope) clone()Literal clone.cloneComplex(CloneStrategy strategy) Complex clone with different cloning strategies.static booleancontainsOid(Collection<PrismReferenceValue> values, @NotNull String oid) protected voidcopyValues(CloneStrategy strategy, PrismReferenceValueImpl clone) Show the content of the object intended for diagnostics by system administrator.debugDump(int indent) debugDump(int indent, boolean expandObject) booleanequals(PrismReferenceValue other, @NotNull ParameterizedEquivalenceStrategy strategy) booleanequals(PrismValue other, @NotNull ParameterizedEquivalenceStrategy strategy) <IV extends PrismValue,ID extends ItemDefinition<?>> 
 PartiallyResolvedItem<IV,ID> findPartial(ItemPath path) <I extends Item<?,?>> 
 IfindReferencedItem(ItemPath path, Class<I> type) Returns object that this reference points to.getOid()OID of the object that this reference refers to (reference target).Class<?>@NotNull ReferencableReturns the statically-typed "real value".Returns cached name of the target object.Returns XSD type of the object that this reference refers to.getTargetTypeCompileTimeClass(PrismContext prismContext) inthashCode(@NotNull ParameterizedEquivalenceStrategy strategy) booleanisEmpty()booleanisRaw()voidrecompute(PrismContext prismContext) voidrevive(PrismContext prismContext) TODO: Is revive necessary if prism context is static? TODO document (if it's found to be necessary)voidsetDescription(String description) voidsetFilter(SearchFilterType filter) voidsetObject(PrismObject object) voidvoidsetReferentialIntegrity(ReferentialIntegrityType referentialIntegrity) voidsetRelation(QName relation) voidsetResolutionTime(EvaluationTimeType resolutionTime) voidsetTargetName(PolyString name) voidsetTargetName(PolyStringType name) voidsetTargetType(QName targetType) voidsetTargetType(QName targetType, boolean allowEmptyNamespace) voidShow the content of the object intended for diagnostics.Returns a version of this value that is canonical, that means it has the minimal form.toString()voidtransformDefinition(ComplexTypeDefinition parentDef, ItemDefinition<?> itemDef, ItemDefinitionTransformer transformation) Methods inherited from class com.evolveum.midpoint.prism.impl.PrismValueImplaccept, appendOriginDump, applyDefinition, clearParent, copyValues, diff, diffMatchingRepresentation, diffMatchingRepresentation, equals, equals, getAllItems, getAllValues, getOriginObject, getOriginType, getParent, getParentContainerValue, getPath, getPathComponent, getPrismContext, getRootValue, getTypeName, getUserData, getUserData, getValueMetadata, hashCode, hashCode, hasValueMetadata, isTransient, normalize, performFreeze, recompute, representsSameValue, setOriginObject, setOriginType, setParent, setPrismContext, setTransient, setUserData, setValueMetadata, setValueMetadata, setValueMetadataMethods 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.DebugDumpabledebugDumpLazily, debugDumpLazilyMethods inherited from interface com.evolveum.midpoint.prism.FreezablecheckImmutable, checkMutable, freeze, isImmutableMethods inherited from interface com.evolveum.midpoint.prism.metadata.MidpointOriginMetadatagetOriginObject, getOriginType, setOriginObject, setOriginTypeMethods inherited from interface com.evolveum.midpoint.prism.PrismContextSensitivegetPrismContextMethods inherited from interface com.evolveum.midpoint.prism.PrismReferenceValuedetermineTargetTypeName, getEffectiveResolutionTimeMethods inherited from interface com.evolveum.midpoint.prism.PrismValueaccept, applyDefinition, clearParent, cloneIfImmutable, diff, equals, getAllItems, getAllValues, getNearestValueOfType, getParent, getParentContainerValue, getPath, getRealValueIfExists, getRealValueOrRawType, getRootObjectable, getRootValue, getTypeName, getUserData, getUserData, getValueMetadata, getValueMetadataAsContainer, hashCode, hasRealClass, hasValueMetadata, isObjectable, isOfType, isTransient, normalize, recompute, representsSameValue, setParent, setPrismContext, setTransient, setUserData, setValueMetadata, setValueMetadata, setValueMetadata, valueMetadataMethods inherited from interface com.evolveum.midpoint.util.ShortDumpableshortDump, shortDumpLazily
- 
Constructor Details- 
PrismReferenceValueImplpublic PrismReferenceValueImpl()
- 
PrismReferenceValueImpl
- 
PrismReferenceValueImpl
- 
PrismReferenceValueImpl
 
- 
- 
Method Details- 
getOidOID of the object that this reference refers to (reference target). May return null, but the reference is in that case incomplete and unusable.- Specified by:
- getOidin interface- PrismReferenceValue
- Returns:
- the target oid
 
- 
setOid- Specified by:
- setOidin interface- PrismReferenceValue
 
- 
getObjectReturns object that this reference points to. The object is supposed to be used for caching and optimizations. Only oid and type of the object really matters for the reference. The object is transient. It will NOT be serialized. Therefore the client must expect that the object can disappear when serialization boundary is crossed. The client must expect that the object is null.- Specified by:
- getObjectin interface- PrismReferenceValue
 
- 
setObject- Specified by:
- setObjectin interface- PrismReferenceValue
 
- 
getTargetTypeReturns XSD type of the object that this reference refers to. It may be used in XPath expressions and similar filters. May return null if the type name is not set.- Specified by:
- getTargetTypein interface- PrismReferenceValue
- Returns:
- the target type name
 
- 
setTargetType- Specified by:
- setTargetTypein interface- PrismReferenceValue
 
- 
setTargetType- Specified by:
- setTargetTypein interface- PrismReferenceValue
- Parameters:
- allowEmptyNamespace- This is an ugly hack. See comment in DOMUtil.validateNonEmptyQName.
 
- 
getTargetNameReturns cached name of the target object. This is a ephemeral value. It is usually not stored. It may be computed at object retrieval time or it may not be present at all. This is NOT an authoritative information. Setting it or changing it will not influence the reference meaning. OID is the only authoritative linking mechanism.- Specified by:
- getTargetNamein interface- PrismReferenceValue
- Returns:
- cached name of the target object.
 
- 
setTargetName- Specified by:
- setTargetNamein interface- PrismReferenceValue
 
- 
setTargetName- Specified by:
- setTargetNamein interface- PrismReferenceValue
 
- 
getTargetTypeCompileTimeClass- Specified by:
- getTargetTypeCompileTimeClassin interface- PrismReferenceValue
 
- 
getTargetTypeCompileTimeClass- Specified by:
- getTargetTypeCompileTimeClassin interface- PrismReferenceValue
 
- 
getRelation- Specified by:
- getRelationin interface- PrismReferenceValue
 
- 
setRelation- Specified by:
- setRelationin interface- PrismReferenceValue
 
- 
relation- Specified by:
- relationin interface- PrismReferenceValue
 
- 
getDescription- Specified by:
- getDescriptionin interface- PrismReferenceValue
 
- 
setDescription- Specified by:
- setDescriptionin interface- PrismReferenceValue
 
- 
getFilter- Specified by:
- getFilterin interface- PrismReferenceValue
 
- 
setFilter- Specified by:
- setFilterin interface- PrismReferenceValue
 
- 
getResolutionTime- Specified by:
- getResolutionTimein interface- PrismReferenceValue
 
- 
setResolutionTime- Specified by:
- setResolutionTimein interface- PrismReferenceValue
 
- 
getReferentialIntegrity- Specified by:
- getReferentialIntegrityin interface- PrismReferenceValue
 
- 
setReferentialIntegrity- Specified by:
- setReferentialIntegrityin interface- PrismReferenceValue
 
- 
getDefinition- Specified by:
- getDefinitionin interface- PrismReferenceValue
- Overrides:
- getDefinitionin class- PrismValueImpl
 
- 
isRawpublic boolean isRaw()- Specified by:
- isRawin interface- PrismValue
 
- 
find- Specified by:
- findin interface- PrismValue
 
- 
findPartialpublic <IV extends PrismValue,ID extends ItemDefinition<?>> PartiallyResolvedItem<IV,ID> findPartial(ItemPath path) - Specified by:
- findPartialin interface- PrismReferenceValue
 
- 
applyDefinition- Specified by:
- applyDefinitionin interface- PrismReferenceValue
- Specified by:
- applyDefinitionin interface- PrismValue
- Overrides:
- applyDefinitionin class- PrismValueImpl
- Throws:
- SchemaException
 
- 
applyDefinitionpublic void applyDefinition(PrismReferenceDefinition definition, boolean force) throws SchemaException - Specified by:
- applyDefinitionin interface- PrismReferenceValue
- Throws:
- SchemaException
 
- 
recompute- Specified by:
- recomputein interface- PrismValue
- Specified by:
- recomputein class- PrismValueImpl
 
- 
checkConsistenceInternalpublic void checkConsistenceInternal(Itemable rootItem, boolean requireDefinitions, boolean prohibitRaw, ConsistencyCheckScope scope) - Specified by:
- checkConsistenceInternalin interface- PrismValue
- Specified by:
- checkConsistenceInternalin class- PrismValueImpl
 
- 
isEmptypublic boolean isEmpty()- Specified by:
- isEmptyin interface- PrismValue
 
- 
toCanonicalReturns a version of this value that is canonical, that means it has the minimal form. E.g. it will have only OID and no object.- Specified by:
- toCanonicalin interface- PrismReferenceValue
 
- 
equalspublic boolean equals(PrismValue other, @NotNull @NotNull ParameterizedEquivalenceStrategy strategy) - Specified by:
- equalsin interface- PrismValue
- Overrides:
- equalsin class- PrismValueImpl
 
- 
equalspublic boolean equals(PrismReferenceValue other, @NotNull @NotNull ParameterizedEquivalenceStrategy strategy) 
- 
hashCode- Specified by:
- hashCodein interface- PrismValue
- Overrides:
- hashCodein class- PrismValueImpl
 
- 
toString
- 
asReferencable- Specified by:
- asReferencablein interface- PrismReferenceValue
 
- 
asReferencables@NotNull public static @NotNull List<Referencable> asReferencables(@NotNull @NotNull Collection<PrismReferenceValue> values) 
- 
asReferenceValues@NotNull public static @NotNull List<PrismReferenceValue> asReferenceValues(@NotNull @NotNull Collection<? extends Referencable> referencables) 
- 
debugDumpDescription 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 interface- DebugDumpable
- Returns:
- content of the object intended for diagnostics by system administrator.
 
- 
debugDump- Specified by:
- debugDumpin interface- DebugDumpable
 
- 
debugDump- Specified by:
- debugDumpin interface- PrismReferenceValue
 
- 
cloneDescription copied from class:PrismValueImplLiteral clone.- Specified by:
- clonein interface- PrismReferenceValue
- Specified by:
- clonein interface- PrismValue
- Specified by:
- clonein class- PrismValueImpl
 
- 
createImmutableClone- Specified by:
- createImmutableClonein interface- PrismReferenceValue
- Specified by:
- createImmutableClonein interface- PrismValue
- Overrides:
- createImmutableClonein class- PrismValueImpl
 
- 
cloneComplexDescription copied from class:PrismValueImplComplex clone with different cloning strategies.- Specified by:
- cloneComplexin interface- PrismReferenceValue
- Specified by:
- cloneComplexin interface- PrismValue
- Specified by:
- cloneComplexin class- PrismValueImpl
- See Also:
 
- 
copyValues
- 
toHumanReadableString- Specified by:
- toHumanReadableStringin interface- PrismValue
- Specified by:
- toHumanReadableStringin class- PrismValueImpl
 
- 
getRealClass- Specified by:
- getRealClassin interface- PrismReferenceValue
- Specified by:
- getRealClassin interface- PrismValue
- Specified by:
- getRealClassin class- PrismValueImpl
 
- 
getRealValueDescription 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 interface- PrismReferenceValue
- Specified by:
- getRealValuein interface- PrismValue
- Specified by:
- getRealValuein class- PrismValueImpl
 
- 
containsOidpublic static boolean containsOid(Collection<PrismReferenceValue> values, @NotNull @NotNull String oid) 
- 
reviveDescription copied from interface:RevivableTODO: Is revive necessary if prism context is static? TODO document (if it's found to be necessary)- Specified by:
- revivein interface- Revivable
- Overrides:
- revivein class- PrismValueImpl
 
- 
shortDumpDescription copied from interface:ShortDumpableShow the content of the object intended for diagnostics. This method is supposed to append a compact, human-readable output in a single line. Unlike toString() method, there is no requirement to identify the actual class or type of the object. It is assumed that the class/type will be obvious from the context in which the output is used.- Specified by:
- shortDumpin interface- ShortDumpable
- Parameters:
- sb- StringBuilder to which to a compact one-line content of the object intended for diagnostics by system administrator should be appended.
 
- 
accept- Specified by:
- acceptin interface- PrismValue
- Specified by:
- acceptin interface- Visitable
- Overrides:
- acceptin class- PrismValueImpl
 
- 
transformDefinitionpublic void transformDefinition(ComplexTypeDefinition parentDef, ItemDefinition<?> itemDef, ItemDefinitionTransformer transformation) - Specified by:
- transformDefinitionin interface- ItemDefinitionTransformer.TransformableValue
 
- 
findReferencedItem- Specified by:
- findReferencedItemin interface- PrismReferenceValue
 
 
-