Package com.evolveum.midpoint.prism
Interface PrismReferenceValue
- All Superinterfaces:
DebugDumpable
,Freezable
,MidpointOriginMetadata
,PathVisitable
,PrismValue
,Revivable
,SchemaLookup.Aware
,Serializable
,ShortDumpable
,Visitable
- All Known Implementing Classes:
com.evolveum.midpoint.prism.impl.PrismReferenceValueImpl
,ShadowReferenceAttributeValue
- Author:
- Radovan Semancik
-
Field Summary
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
Method Summary
Modifier and TypeMethodDescriptionapplyDefinition
(PrismReferenceDefinition definition, boolean force) clone()
Literal clone.cloneComplex
(CloneStrategy strategy) Complex clone with different cloning strategies.debugDump
(int indent, boolean expandObject) default @Nullable QName
Determines the type name from the value or from its definition (if known).<IV extends PrismValue,
ID extends ItemDefinition<?>>
PartiallyResolvedItem<IV,ID> findPartial
(ItemPath path) <I extends Item<?,
?>>
IfindReferencedItem
(ItemPath path, Class<I> type) default @NotNull EvaluationTimeType
<O extends Objectable>
PrismObject<O>Returns object that this reference points to.default Objectable
getOid()
OID of the object that this reference refers to (reference target).Class<?>
@Nullable Referencable
Returns the statically-typed "real value".Returns cached name of the target object.Returns XSD type of the object that this reference refers to.void
setDescription
(String description) void
setFilter
(SearchFilterType filter) void
setObject
(PrismObject<?> object) void
void
setReferentialIntegrity
(ReferentialIntegrityType referentialIntegrity) void
setRelation
(QName relation) void
setResolutionTime
(EvaluationTimeType resolutionTime) void
setTargetName
(PolyString name) void
setTargetName
(PolyStringType name) void
setTargetType
(QName targetType) void
setTargetType
(QName targetType, boolean allowEmptyNamespace) Returns a version of this value that is canonical, that means it has the minimal form.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.PrismValue
accept, accept, applyDefinition, applyDefinition, applyDefinitionLegacy, applyDefinitionLegacy, checkConsistenceInternal, clearParent, cloneIfImmutable, deleteValueMetadata, diff, equals, equals, find, getAllItems, getAllValues, getNearestValueOfType, getParent, getParentContainerValue, getPath, getRealValueIfExists, getRealValueOrRawType, getRootObjectable, getRootValue, getSchemaContext, getTypeName, getUserData, getUserData, getValueMetadata, getValueMetadataAsContainer, getValueMetadataIfExists, hashCode, hashCode, hasRealClass, hasValueMetadata, isEmpty, isObjectable, isOfType, isRaw, isTransient, normalize, recompute, recompute, representsSameValue, schemaLookup, setParent, setTransient, setUserData, setValueMetadata, setValueMetadata, setValueMetadata, toHumanReadableString
Methods inherited from interface com.evolveum.midpoint.util.ShortDumpable
shortDump, shortDump, shortDumpLazily
-
Method Details
-
getOid
String getOid()OID of the object that this reference refers to (reference target). May return null, but the reference is in that case incomplete and unusable.- Returns:
- the target oid
-
setOid
-
getObject
Returns 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. -
getObjectable
-
setObject
-
getTargetType
QName getTargetType()Returns 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.- Returns:
- the target type name
-
setTargetType
-
setTargetType
- Parameters:
allowEmptyNamespace
- This is an ugly hack. See comment in DOMUtil.validateNonEmptyQName.
-
determineTargetTypeName
Determines the type name from the value or from its definition (if known). -
getTargetName
PolyString getTargetName()Returns cached name of the target object. This is a ephemeral value. 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.- Returns:
- cached name of the target object.
-
setTargetName
-
setTargetName
-
getTargetTypeCompileTimeClass
Class<Objectable> getTargetTypeCompileTimeClass() -
getRelation
QName getRelation() -
setRelation
-
relation
-
getDescription
String getDescription() -
setDescription
-
getFilter
SearchFilterType getFilter() -
setFilter
-
getResolutionTime
EvaluationTimeType getResolutionTime() -
getEffectiveResolutionTime
-
setResolutionTime
-
getReferentialIntegrity
ReferentialIntegrityType getReferentialIntegrity() -
setReferentialIntegrity
-
getDefinition
PrismReferenceDefinition getDefinition() -
findPartial
<IV extends PrismValue,ID extends ItemDefinition<?>> PartiallyResolvedItem<IV,ID> findPartial(ItemPath path) -
applyDefinition
PrismReferenceValue applyDefinition(PrismReferenceDefinition definition, boolean force) throws SchemaException - Throws:
SchemaException
-
toCanonical
PrismReferenceValue toCanonical()Returns 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. -
asReferencable
Referencable asReferencable() -
debugDump
-
clone
PrismReferenceValue clone()Description copied from interface:PrismValue
Literal clone.- Specified by:
clone
in interfacePrismValue
-
createImmutableClone
PrismReferenceValue createImmutableClone()- Specified by:
createImmutableClone
in interfacePrismValue
-
cloneComplex
Description copied from interface:PrismValue
Complex clone with different cloning strategies.- Specified by:
cloneComplex
in interfacePrismValue
- See Also:
-
getRealClass
Class<?> getRealClass()- Specified by:
getRealClass
in interfacePrismValue
-
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 interfacePrismValue
-
findReferencedItem
-