com.evolveum.midpoint.prism
Class PrismReferenceDefinition

java.lang.Object
  extended by com.evolveum.midpoint.prism.Definition
      extended by com.evolveum.midpoint.prism.ItemDefinition
          extended by com.evolveum.midpoint.prism.PrismReferenceDefinition
All Implemented Interfaces:
DebugDumpable, Dumpable, java.io.Serializable

public class PrismReferenceDefinition
extends ItemDefinition

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. See Definition for more details.

Author:
Radovan Semancik
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.evolveum.midpoint.prism.ItemDefinition
name
 
Fields inherited from class com.evolveum.midpoint.prism.Definition
defaultName, displayName, displayOrder, help, ignored, prismContext, typeName
 
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
 
Constructor Summary
PrismReferenceDefinition(javax.xml.namespace.QName name, javax.xml.namespace.QName defaultName, javax.xml.namespace.QName typeName, PrismContext prismContext)
           
 
Method Summary
 PrismReferenceDefinition clone()
           
protected  void copyDefinitionData(PrismReferenceDefinition clone)
           
 ItemDelta createEmptyDelta(ItemPath path)
           
 javax.xml.namespace.QName getCompositeObjectElementName()
           
protected  java.lang.String getDebugDumpClassName()
          Return a human readable name of this class suitable for logs.
 javax.xml.namespace.QName getTargetTypeName()
          Returns valid XSD object types whose may be the targets of the reference.
 PrismReference instantiate()
          Create an item instance.
 PrismReference instantiate(javax.xml.namespace.QName name)
          Create an item instance.
 boolean isValidFor(javax.xml.namespace.QName elementQName, java.lang.Class<? extends ItemDefinition> clazz)
           
 void setCompositeObjectElementName(javax.xml.namespace.QName compositeObjectElementName)
           
 void setTargetTypeName(javax.xml.namespace.QName targetTypeName)
           
 
Methods inherited from class com.evolveum.midpoint.prism.ItemDefinition
copyDefinitionData, equals, extendToString, getDefaultName, getMaxOccurs, getMinOccurs, getName, getNameOrDefaultName, getNamespace, hashCode, isDynamic, isMandatory, isMultiValue, isOptional, isSingleValue, setDynamic, setMaxOccurs, setMinOccurs, setName, toString
 
Methods inherited from class com.evolveum.midpoint.prism.Definition
copyDefinitionData, debugDump, debugDump, dump, getDisplayName, getDisplayOrder, getHelp, getPrismContext, getSchemaRegistry, getTypeClass, getTypeName, isIgnored, setDisplayName, setDisplayOrder, setHelp, setIgnored, setTypeName
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PrismReferenceDefinition

public PrismReferenceDefinition(javax.xml.namespace.QName name,
                                javax.xml.namespace.QName defaultName,
                                javax.xml.namespace.QName typeName,
                                PrismContext prismContext)
Method Detail

getTargetTypeName

public javax.xml.namespace.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.

Returns:
set of target type names

setTargetTypeName

public void setTargetTypeName(javax.xml.namespace.QName targetTypeName)

getCompositeObjectElementName

public javax.xml.namespace.QName getCompositeObjectElementName()

setCompositeObjectElementName

public void setCompositeObjectElementName(javax.xml.namespace.QName compositeObjectElementName)

isValidFor

public boolean isValidFor(javax.xml.namespace.QName elementQName,
                          java.lang.Class<? extends ItemDefinition> clazz)
Overrides:
isValidFor in class ItemDefinition

instantiate

public PrismReference instantiate()
Description copied from class: 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 class ItemDefinition
Returns:
created item instance

instantiate

public PrismReference instantiate(javax.xml.namespace.QName name)
Description copied from class: ItemDefinition
Create an item instance. Definition name will use provided name. for the instance. The instance will otherwise be empty.

Specified by:
instantiate in class ItemDefinition
Returns:
created item instance

createEmptyDelta

public ItemDelta createEmptyDelta(ItemPath path)
Specified by:
createEmptyDelta in class ItemDefinition

clone

public PrismReferenceDefinition clone()
Specified by:
clone in class ItemDefinition

copyDefinitionData

protected void copyDefinitionData(PrismReferenceDefinition clone)

getDebugDumpClassName

protected java.lang.String getDebugDumpClassName()
Return a human readable name of this class suitable for logs.

Specified by:
getDebugDumpClassName in class Definition


Copyright © 2012 evolveum. All Rights Reserved.