com.evolveum.midpoint.schema.processor
Class MidPointObject<T extends ObjectType>

java.lang.Object
  extended by com.evolveum.midpoint.schema.processor.Item
      extended by com.evolveum.midpoint.schema.processor.PropertyContainer
          extended by com.evolveum.midpoint.schema.processor.MidPointObject<T>
All Implemented Interfaces:
DebugDumpable, Dumpable, java.io.Serializable

public class MidPointObject<T extends ObjectType>
extends PropertyContainer

Common supertype for all identity objects. Defines basic properties that each object must have to live in our system (identifier, name). Objects consists of identifier and name (see definition below) and a set of properties represented as XML elements in the object's body. The attributes are represented as first-level XML elements (tags) of the object XML representation and may be also contained in other tags (e.g. extension, attributes). The QName (namespace and local name) of the element holding the property is considered to be a property name. This class is named MidPointObject instead of Object to avoid confusion with java.lang.Object.

Author:
Radovan Semancik
See Also:
Serialized Form

Field Summary
protected  T objectType
           
protected  java.lang.String oid
           
 
Fields inherited from class com.evolveum.midpoint.schema.processor.Item
definition, element, name, parentPath
 
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
 
Constructor Summary
MidPointObject(javax.xml.namespace.QName name, ObjectDefinition definition, java.lang.Object element, PropertyPath parentPath)
           
 
Method Summary
protected  java.lang.String additionalDumpDescription()
           
 MidPointObject<T> clone()
           
 ObjectDelta<T> compareTo(MidPointObject<T> other)
           
protected  void copyValues(MidPointObject<T> clone)
           
 boolean equals(java.lang.Object obj)
          Note: hashcode and equals compare the objects in the "java way".
 boolean equivalent(java.lang.Object obj)
          this method ignores some part of the object during comparison (e.g.
protected  java.lang.String getDebugDumpClassName()
          Return a human readable name of this class suitable for logs.
 ObjectDefinition<T> getDefinition()
          Returns applicable property container definition.
 java.lang.Class<T> getJaxbClass()
           
 T getObjectType()
           
 java.lang.String getOid()
          Returns Object ID (OID).
 T getOrParseObjectType()
           
 PropertyPath getPath()
           
 int hashCode()
          Note: hashcode and equals compare the objects in the "java way".
 org.w3c.dom.Node serializeToDom()
           
 void setObjectType(T objectType)
           
 void setOid(java.lang.String oid)
           
 
Methods inherited from class com.evolveum.midpoint.schema.processor.PropertyContainer
add, addAll, addAllReplaceExisting, addReplaceExisting, applyModification, applyModifications, copyValues, createProperty, createPropertyContainer, debugDump, dump, findItem, findItem, findOrCreateProperty, findOrCreateProperty, findOrCreatePropertyContainer, findOrCreatePropertyContainer, findProperty, findProperty, findProperty, findProperty, findPropertyContainer, findPropertyContainer, getItems, getProperties, getPropertyNames, isEmpty, serializePropertiesToJaxb, serializeToDom, setDefinition, toString
 
Methods inherited from class com.evolveum.midpoint.schema.processor.Item
copyValues, debugDump, getDisplayName, getElement, getHelp, getName, getParentPath, setDefinition, setElement, setName, setParentPath
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

oid

protected java.lang.String oid

objectType

protected T extends ObjectType objectType
Constructor Detail

MidPointObject

public MidPointObject(javax.xml.namespace.QName name,
                      ObjectDefinition definition,
                      java.lang.Object element,
                      PropertyPath parentPath)
Method Detail

getOid

public java.lang.String getOid()
Returns Object ID (OID). May return null if the object does not have an OID.

Returns:
Object ID (OID)

setOid

public void setOid(java.lang.String oid)

getDefinition

public ObjectDefinition<T> getDefinition()
Description copied from class: PropertyContainer
Returns applicable property container definition.

May return null if no definition is applicable or the definition is not know.

Overrides:
getDefinition in class PropertyContainer
Returns:
applicable property container definition

getPath

public PropertyPath getPath()
Overrides:
getPath in class Item

getJaxbClass

public java.lang.Class<T> getJaxbClass()

getObjectType

public T getObjectType()

setObjectType

public void setObjectType(T objectType)

getOrParseObjectType

public T getOrParseObjectType()
                                          throws SchemaException
Throws:
SchemaException

clone

public MidPointObject<T> clone()
Overrides:
clone in class PropertyContainer

copyValues

protected void copyValues(MidPointObject<T> clone)

compareTo

public ObjectDelta<T> compareTo(MidPointObject<T> other)

hashCode

public int hashCode()
Note: hashcode and equals compare the objects in the "java way". That means the objects must be almost preciselly equal to match (e.g. including source demarcation in values and other "annotations"). For a method that compares the "meaningful" parts of the objects see equivalent().

Overrides:
hashCode in class PropertyContainer

equals

public boolean equals(java.lang.Object obj)
Note: hashcode and equals compare the objects in the "java way". That means the objects must be almost preciselly equal to match (e.g. including source demarcation in values and other "annotations"). For a method that compares the "meaningful" parts of the objects see equivalent().

Overrides:
equals in class PropertyContainer

equivalent

public boolean equivalent(java.lang.Object obj)
this method ignores some part of the object during comparison (e.g. source demarkation in values) These methods compare the "meaningful" parts of the objects.


getDebugDumpClassName

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

Overrides:
getDebugDumpClassName in class PropertyContainer

additionalDumpDescription

protected java.lang.String additionalDumpDescription()
Overrides:
additionalDumpDescription in class PropertyContainer

serializeToDom

public org.w3c.dom.Node serializeToDom()
                                throws SchemaException
Throws:
SchemaException


Copyright © 2012 evolveum. All Rights Reserved.