Package com.evolveum.midpoint.prism.impl
Class PrismReferenceDefinitionImpl
- java.lang.Object
-
- com.evolveum.midpoint.prism.impl.DefinitionImpl
-
- com.evolveum.midpoint.prism.impl.ItemDefinitionImpl<PrismReference>
-
- com.evolveum.midpoint.prism.impl.PrismReferenceDefinitionImpl
-
- All Implemented Interfaces:
Definition
,ItemDefinition<PrismReference>
,MutableDefinition
,MutableItemDefinition<PrismReference>
,MutablePrismReferenceDefinition
,PrismReferenceDefinition
,Revivable
,Visitable
,DebugDumpable
,Serializable
,Cloneable
public class PrismReferenceDefinitionImpl extends ItemDefinitionImpl<PrismReference> implements MutablePrismReferenceDefinition
Object Reference Schema Definition. 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. This class represents schema definition for object reference. SeeDefinition
for more details.- Author:
- Radovan Semancik
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.evolveum.midpoint.prism.impl.ItemDefinitionImpl
heterogeneousListItem, itemName, substitutionHead
-
Fields inherited from class com.evolveum.midpoint.prism.impl.DefinitionImpl
deprecated, deprecatedSince, displayName, displayOrder, documentation, elaborate, emphasized, experimental, help, isAbstract, isRuntimeSchema, plannedRemoval, prismContext, processing, typeName
-
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
-
Constructor Summary
Constructors Constructor Description PrismReferenceDefinitionImpl(QName elementName, QName typeName, PrismContext prismContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canBeDefinitionOf(PrismValue pvalue)
PrismReferenceDefinition
clone()
protected void
copyDefinitionData(PrismReferenceDefinitionImpl clone)
ItemDelta
createEmptyDelta(ItemPath path)
protected void
extendToString(StringBuilder sb)
<T extends ItemDefinition>
TfindItemDefinition(ItemPath path, Class<T> clazz)
QName
getCompositeObjectElementName()
String
getDebugDumpClassName()
Return a human readable name of this class suitable for logs.String
getDocClassName()
Returns human-readable name of this class suitable for documentation.QName
getTargetTypeName()
Returns valid XSD object types whose may be the targets of the reference.Class
getTypeClass()
Returns a compile-time class that is used to represent items.PrismReference
instantiate()
Create an item instance.PrismReference
instantiate(QName name)
Create an item instance.boolean
isComposite()
boolean
isValidFor(QName elementQName, Class<? extends ItemDefinition> clazz)
boolean
isValidFor(QName elementQName, Class<? extends ItemDefinition> clazz, boolean caseInsensitive)
void
setComposite(boolean isComposite)
void
setCompositeObjectElementName(QName compositeObjectElementName)
void
setTargetTypeName(QName targetTypeName)
MutablePrismReferenceDefinition
toMutable()
-
Methods inherited from class com.evolveum.midpoint.prism.impl.ItemDefinitionImpl
accept, adoptElementDefinitionFrom, canAdd, canBeDefinitionOf, canModify, canRead, copyDefinitionData, debugDumpShortToString, debugFlags, debugMultiplicity, deepClone, deepClone, equals, getItemName, getMaxOccurs, getMinOccurs, getNamespace, getSubstitutionHead, getValueEnumerationRef, hashCode, isDynamic, isHeterogeneousListItem, isIndexOnly, isInherited, isMandatory, isMultiValue, isOperational, isOptional, isSingleValue, revive, setCanAdd, setCanModify, setCanRead, setDynamic, setHeterogeneousListItem, setIndexOnly, setInherited, setItemName, setMaxOccurs, setMinOccurs, setOperational, setReadOnly, setSubstitutionHead, setValueEnumerationRef, toString
-
Methods inherited from class com.evolveum.midpoint.prism.impl.DefinitionImpl
addSchemaMigration, copyDefinitionData, debugDump, extendDumpHeader, getAnnotation, getDeprecatedSince, getDisplayName, getDisplayOrder, getDocumentation, getDocumentationPreview, getHelp, getPlannedRemoval, getPrismContext, getProcessing, getSchemaMigrations, getTypeClassIfKnown, getTypeName, isAbstract, isDeprecated, isElaborate, isEmphasized, isExperimental, isIgnored, isRuntimeSchema, setAbstract, setAnnotation, setDeprecated, setDeprecatedSince, setDisplayName, setDisplayOrder, setDocumentation, setElaborate, setEmphasized, setExperimental, setHelp, setPlannedRemoval, setProcessing, setRuntimeSchema, setTypeName
-
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.Definition
debugDump, getAnnotation, getDeprecatedSince, getDisplayName, getDisplayOrder, getDocumentation, getDocumentationPreview, getHelp, getPlannedRemoval, getPrismContext, getProcessing, getSchemaMigrations, getSchemaRegistry, getTypeClassIfKnown, getTypeName, isAbstract, isDeprecated, isElaborate, isEmphasized, isExperimental, isIgnored, isRuntimeSchema, setAnnotation
-
Methods inherited from interface com.evolveum.midpoint.prism.ItemDefinition
adoptElementDefinitionFrom, canAdd, canBeDefinitionOf, canModify, canRead, debugDumpShortToString, deepClone, deepClone, getItemName, getMaxOccurs, getMinOccurs, getNamespace, getSubstitutionHead, getValueEnumerationRef, isDynamic, isHeterogeneousListItem, isIndexOnly, isInherited, isMandatory, isMultiValue, isOperational, isOptional, isSingleValue, revive
-
Methods inherited from interface com.evolveum.midpoint.prism.MutableDefinition
addSchemaMigration, setDeprecated, setDisplayName, setDisplayOrder, setDocumentation, setEmphasized, setExperimental, setHelp, setProcessing, setRuntimeSchema, setTypeName
-
Methods inherited from interface com.evolveum.midpoint.prism.MutableItemDefinition
setCanAdd, setCanModify, setCanRead, setDeprecatedSince, setDynamic, setElaborate, setHeterogeneousListItem, setIndexOnly, setItemName, setMaxOccurs, setMinOccurs, setOperational, setPlannedRemoval, setReadOnly, setSubstitutionHead, setValueEnumerationRef
-
-
-
-
Constructor Detail
-
PrismReferenceDefinitionImpl
public PrismReferenceDefinitionImpl(QName elementName, QName typeName, PrismContext prismContext)
-
-
Method Detail
-
getTargetTypeName
public QName getTargetTypeName()
Returns valid XSD object types whose may be the targets of the reference. Corresponds to "targetType" XSD annotation. Returns empty set if not specified. Must not return null.- Specified by:
getTargetTypeName
in interfacePrismReferenceDefinition
- Returns:
- set of target type names
-
setTargetTypeName
public void setTargetTypeName(QName targetTypeName)
- Specified by:
setTargetTypeName
in interfaceMutablePrismReferenceDefinition
-
getCompositeObjectElementName
public QName getCompositeObjectElementName()
- Specified by:
getCompositeObjectElementName
in interfacePrismReferenceDefinition
-
setCompositeObjectElementName
public void setCompositeObjectElementName(QName compositeObjectElementName)
-
isComposite
public boolean isComposite()
- Specified by:
isComposite
in interfacePrismReferenceDefinition
-
setComposite
public void setComposite(boolean isComposite)
- Specified by:
setComposite
in interfaceMutablePrismReferenceDefinition
-
isValidFor
public boolean isValidFor(QName elementQName, Class<? extends ItemDefinition> clazz)
- Specified by:
isValidFor
in interfaceItemDefinition<PrismReference>
- Overrides:
isValidFor
in classItemDefinitionImpl<PrismReference>
-
isValidFor
public boolean isValidFor(@NotNull QName elementQName, @NotNull Class<? extends ItemDefinition> clazz, boolean caseInsensitive)
- Specified by:
isValidFor
in interfaceItemDefinition<PrismReference>
- Overrides:
isValidFor
in classItemDefinitionImpl<PrismReference>
-
findItemDefinition
public <T extends ItemDefinition> T findItemDefinition(@NotNull ItemPath path, @NotNull Class<T> clazz)
- Specified by:
findItemDefinition
in interfaceItemDefinition<PrismReference>
- Overrides:
findItemDefinition
in classItemDefinitionImpl<PrismReference>
-
instantiate
@NotNull public PrismReference instantiate()
Description copied from interface:ItemDefinition
Create an item instance. Definition name or default name will used as an element name for the instance. The instance will otherwise be empty.- Specified by:
instantiate
in interfaceItemDefinition<PrismReference>
- Specified by:
instantiate
in interfacePrismReferenceDefinition
- Returns:
- created item instance
-
instantiate
@NotNull public PrismReference instantiate(QName name)
Description copied from interface:ItemDefinition
Create an item instance. Definition name will use provided name. for the instance. The instance will otherwise be empty.- Specified by:
instantiate
in interfaceItemDefinition<PrismReference>
- Specified by:
instantiate
in interfacePrismReferenceDefinition
- Returns:
- created item instance
-
createEmptyDelta
public ItemDelta createEmptyDelta(ItemPath path)
- Specified by:
createEmptyDelta
in interfaceItemDefinition<PrismReference>
- Specified by:
createEmptyDelta
in interfacePrismReferenceDefinition
-
canBeDefinitionOf
public boolean canBeDefinitionOf(PrismValue pvalue)
- Specified by:
canBeDefinitionOf
in interfaceItemDefinition<PrismReference>
-
getTypeClass
public Class getTypeClass()
Description copied from interface:Definition
Returns a compile-time class that is used to represent items. E.g. returns String, Integer, sublcasses of Objectable and Containerable and so on.- Specified by:
getTypeClass
in interfaceDefinition
- Overrides:
getTypeClass
in classDefinitionImpl
-
toMutable
public MutablePrismReferenceDefinition toMutable()
- Specified by:
toMutable
in interfaceDefinition
- Specified by:
toMutable
in interfaceItemDefinition<PrismReference>
-
clone
@NotNull public PrismReferenceDefinition clone()
- Specified by:
clone
in interfaceDefinition
- Specified by:
clone
in interfaceItemDefinition<PrismReference>
- Specified by:
clone
in interfacePrismReferenceDefinition
- Specified by:
clone
in classItemDefinitionImpl<PrismReference>
-
copyDefinitionData
protected void copyDefinitionData(PrismReferenceDefinitionImpl clone)
-
getDebugDumpClassName
public String getDebugDumpClassName()
Return a human readable name of this class suitable for logs.- Specified by:
getDebugDumpClassName
in classDefinitionImpl
-
getDocClassName
public String getDocClassName()
Description copied from class:DefinitionImpl
Returns human-readable name of this class suitable for documentation. (e.g. "property")- Specified by:
getDocClassName
in classDefinitionImpl
-
extendToString
protected void extendToString(StringBuilder sb)
- Overrides:
extendToString
in classItemDefinitionImpl<PrismReference>
-
-