com.sun.mdm.index.objects
Class ObjectNode

java.lang.Object
  extended bycom.sun.mdm.index.objects.ObjectNode
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable
Direct Known Subclasses:
AssumedMatchSummary, AuditDataObject, EnterpriseObject, MergeObject, PotentialDuplicate, PotentialDuplicateSummary, SBROverWrite, SystemObject, TransactionObject

public class ObjectNode
extends java.lang.Object
implements java.io.Externalizable

The ObjectNode class performs the following functions:

See Also:
Serialized Form

Field Summary
 java.util.Map indexMap
           
protected  java.util.HashMap mChildrenHashMap
          map of child objects |key |value | |type|ArrayList|
protected  java.util.ArrayList mChildTags
          list of child object tags
protected  java.util.HashMap mFields
          list of fields
protected  ObjectNode mParent
          the parent object
protected  java.lang.String mParentTag
          parent object tag
protected  boolean mPartOfIndex
           
protected  int mPosition
           
protected  java.lang.String mTag
          object tag
static int mVersion
           
(package private) static long serialVersionUID
           
 
Constructor Summary
ObjectNode()
          Creates a new instance of the ObjectNode class.
ObjectNode(java.lang.String tag, java.util.ArrayList names, java.util.ArrayList types)
          Creates a new instance of the ObjectNode class by its object tag, field names, and field types.
ObjectNode(java.lang.String tag, java.util.ArrayList names, java.util.ArrayList types, java.util.ArrayList values)
          Creates a new instance of the ObjectNode class by its object tag, field names, field types, and field values.
 
Method Summary
protected  void add(java.util.ArrayList targetArrayList, ObjectNode child)
           
 void addChild(ObjectNode child)
          Adds a new child object to the object node.
 void addChildHard(ObjectNode child)
          adds a new child to the ObjectNode without checking on duplicates
 void addChildNoFlagSet(ObjectNode child)
          adds a new child to the ObjectNode, and not to set flags
 void addChildren(java.util.ArrayList children)
          adds a list of children objects
 void addChildToTypeArrayList(ObjectNode child)
           
protected  void clearChildrenForType(java.util.ArrayList targetChildren)
           
 void clearField(java.lang.String name)
          Sets a field to null and the modifies the "changed" flag to true.
 ObjectNode copy()
          ObjectNode deep copy
protected  void createChildIndex(ObjectNode child, boolean overrideFlag)
           
 void deleteChild(ObjectNode node)
          Marks a child object for deletion.
 void deleteChild(java.lang.String type, java.lang.String objectId)
          Marks a child object for deletion, identifying the child object by its object tag and object ID.
 void deleteChild(java.lang.String type, SuperKey key)
          Marks a child object for deletion, identifying the child object by its object tag and key field settings.
 boolean equals(java.lang.Object node)
          checks if itself equals to input Object.
 boolean equals(ObjectNode node)
          checks if itself equals to input ObjectNode
 java.util.ArrayList getAllChildrenFromHashMap()
           
 ObjectNode getChild(java.lang.String type, int pos)
          Retrieves a child ObjectNode by its object tag and its index position.
 ObjectNode getChild(java.lang.String type, ObjectKey key)
          Retrieves a child ObjectNode by its object tag and its unique objecy key value.
 ObjectNode getChild(java.lang.String type, ObjectKey key, boolean removed)
          Retrieves a child ObjectNode by its object tag, its unique object key value, and whether the ObjectNode is flagged for removal.
 ObjectNode getChild(java.lang.String type, java.lang.String id)
          Retrieves a child ObjectNode by its object tag and its unique identification code assigned by the master index.
 ObjectKey getChildKey(java.lang.String type)
          Retrieves the unique key field setting for the child object identified by the specified object tag.
 java.util.ArrayList getChildrenForType(java.lang.String type, boolean create)
           
 SuperKey getChildSuperKey(java.lang.String type)
          Retrieves the unique object key setting for the child object identified by the specified object tag.
 ObjectField getField(java.lang.String fieldname)
          Retrieves an ObjectField object by its field name.
protected  java.util.ArrayList getFieldTypes()
          Retrieves a list of the types of fields in the object node.
 boolean getFlag(java.lang.String name, int mask)
          Checks whether a field's bit mask is enabled or disabled.
 java.lang.String getObjectId()
           
 ObjectNode getParent()
          Retrieves the parent object node.
 java.lang.String getParentTag()
          gets parent object tag
 java.lang.Object getValue(java.lang.String name)
          Retrieves the value of a field given the field's name.
 ObjectField getValueObject(java.lang.String name)
          Retrieves a field object (ObjectField) given the field's name.
 boolean hasFieldReadAccess(java.lang.String name)
          Checks whether the given field has read access.
 boolean hasFieldUpdateAccess(java.lang.String name)
          Checks whether the given field has update access.
 int hashCode()
          hash code
 boolean hasObjectAddAccess()
          Checks whether the object has add access.
 boolean hasObjectDeleteAccess()
          Checks whether the object has delete access.
 boolean hasObjectReadAccess()
          Checks whether the object has read access.
 boolean hasObjectUpdateAccess()
          Checks whether the object has update access.
 boolean isAdded()
          Checks whether the object node has been added to the object.
 boolean isChanged(java.lang.String name)
          Checks whether the value of a field changed in the current transaction.
 boolean isKeyChanged()
          Checks whether key fields in the object node have changed.
protected  boolean isKeyIndexable()
           
 boolean isKeyType(java.lang.String name)
          Checks whether the given field is a unique key field.
 boolean isKeyValid(ObjectKey key)
          Checks whether the given key object is valid.
 boolean isNew()
           
 boolean isNull(java.lang.String name)
          Checks whether the given field contains a null value.
 boolean isNullable(java.lang.String name)
          Checks whether the value of the given field can be null.
protected  boolean isRegularKeyIndexable()
           
 boolean isRemoved()
          Checks whether an object node is marked for deletion.
 boolean isSearched(java.lang.String name)
          Checks whether a field is used for searches.
 boolean isUpdated()
          Checks whether an object node has been updated during a transaction.
 boolean isVisible(java.lang.String name)
          Checks whether a field is visible on the Enterprise Data Manager (EDM).
protected  ObjectKey obtainKey()
          gets Object Key setting
protected  SuperKey obtainSuperKey()
          gets Object Key setting
 java.util.ArrayList pGetChildren()
          Retrieves a list of all child nodes in the object node.
 java.util.ArrayList pGetChildren(java.lang.String type)
          Retrieves a list of all child nodes of the specified child type.
 java.util.ArrayList pGetChildTags()
          Retrieves a list of the names of the different types of child objects defined in the object node.
 java.util.ArrayList pGetFieldNames()
          Retrieves a list of all field names in the object node.
 ObjectField[] pGetFields()
          Retrieves an array list of all ObjectField objects in the object node.
 java.util.ArrayList pGetFieldUpdateLogs()
          Retrieves a list of transaction log entries for the object node.
 java.util.ArrayList pGetFieldValues()
          Retrieves a list of field values for the fields defined in the object node.
 java.lang.String pGetFlagString()
          returns String for objectnode without printing out field details
 ObjectKey pGetKey()
          Retrieves the unique object key setting for the object node.
 SuperKey pGetSuperKey()
          Retrieves the unique key field setting for the object node.
 java.lang.String pGetTag()
          Retrieves the tag of the ObjectNode object.
 java.lang.String pGetType()
          Retrieves the tag of the ObjectNode object.
 int pGetType(java.lang.String name)
          Retrieves a field's data type given the field's name.
 void readExternal(java.io.ObjectInput in)
           
protected  void recalculateIndex()
           
 void removeChild(ObjectNode node)
          Removes a child object from the ObjectNode
 void removeChild(java.lang.String type, ObjectKey objKey)
          removes a child object from the ObjectNode by child's object tag and key setting
protected  void removeChildForType(java.util.ArrayList targetChildren, ObjectNode child)
           
protected  void removeChildIndex(ObjectNode child)
           
 void removeChildren()
          Removes all child objects from the ObjectNode
 void removeChildren(java.lang.String type)
          Removes all child objects of one type from the ObjectNode
 void reset()
          resets all control flags on the ObjectNode
 void resetAll()
          resets all control flags on the ObjectNode, including child(ren)
 void setAddFlag(boolean flag)
          Sets the value of the add flag, indicating whether the ObjectNode object is newly added.
 void setChanged(java.lang.String name, boolean flag)
          Sets the value of the field change flag, indicating whether the specified fields was changed in the ObjectNode object.
 void setFieldReadAccess(java.lang.String name, boolean flag)
          Sets the value of a field's read access flag.
 void setFieldUpdateAccess(java.lang.String name, boolean flag)
          Sets the value of a field's update access flag.
 void setFieldUpdateLogs(java.util.ArrayList logs)
          Sets a list of transaction log entries.
 void setFlag(java.lang.String name, int mask, boolean flag)
          Sets a field's bit bit mask, which indicates whether to update, add, or remove a field.
 void setKey(ObjectKey key)
          Sets the object node's key field value.
 void setKeyChangeFlag(boolean flag)
          Sets the value of the key change flag, indicating whether key fields were changed in the ObjectNode object.
 void setKeyType(java.lang.String name, boolean flag)
          Specifies whether a field is a key type field or not.
 void setNull(java.lang.String name, boolean flag)
          Specifies whether a field is holding a null value.
 void setNullable(java.lang.String name, boolean flag)
          Specifies whether a field can contain a null value.
 void setObjectAddAccess(boolean flag)
          Sets the value of the add access flag for the object node, indicating whether the object has add access.
 void setObjectDeleteAccess(boolean flag)
          Sets the value of the delete access flag for the object node, indicating whether the object has delete access.
 void setObjectReadAccess(boolean flag)
          Sets the value of the read access flag for the object node, indicating whether the object has read access.
 void setObjectUpdateAccess(boolean flag)
          Sets the value of the update access flag for the object node, indicating whether the object has update access.
 void setParent(ObjectNode parent)
          Sets the parent object in an object node.
 void setRemoveFlag(boolean flag)
          Specifies whether the object node is marked for deletion.
 void setSearched(java.lang.String name, boolean flag)
          Specifies whether the given field is used for searches.
 void setUpdateFlag(boolean flag)
          Specifies whether the given object node was updated.
 void setValue(java.lang.String name, java.lang.Object value)
          Sets the value of a field, using the field name to identify the field.
 void setVisible(java.lang.String name, boolean flag)
          sets if a field is visible
 ObjectNode structCopy()
          ObjectNode structural copy
 java.lang.String toString()
          toString
 void unChange()
          Resets the changes made to an object, returning the object to its previous status.
 void update(ObjectNode node, boolean addNewChild, boolean delMissingChild)
          updates the ObjectNode by input object copies all the fields of input objectNode to this ObjectNode, including nulls except the Id fields.
 void updateChild(ObjectNode child)
          update a child to the ObjectNode.
 void updateIfChanged(ObjectNode node, boolean addNewChild, boolean delMissingChild)
          updates the ObjectNode by input object
 void updateIfNotEqual(ObjectNode node, boolean addNewChild, boolean delMissingChild)
           
 void updateIfNotNull(ObjectNode node, boolean addNewChild, boolean delMissingChild)
          updates the ObjectNode by input object
 void updateIfNotNull(ObjectNode node, boolean addNewChild, boolean delMissingChild, boolean copyFlags)
          updates the ObjectNode by input object
 void writeExternal(java.io.ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

indexMap

public java.util.Map indexMap

mChildrenHashMap

protected java.util.HashMap mChildrenHashMap
map of child objects |key |value | |type|ArrayList|


mChildTags

protected java.util.ArrayList mChildTags
list of child object tags


mFields

protected java.util.HashMap mFields
list of fields


mParent

protected ObjectNode mParent
the parent object


mParentTag

protected java.lang.String mParentTag
parent object tag


mPartOfIndex

protected boolean mPartOfIndex

mPosition

protected int mPosition

mTag

protected java.lang.String mTag
object tag


mVersion

public static int mVersion

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

ObjectNode

public ObjectNode()
Creates a new instance of the ObjectNode class.

Parameters:
None.
Throws:
None.


ObjectNode

public ObjectNode(java.lang.String tag,
                  java.util.ArrayList names,
                  java.util.ArrayList types)
           throws ObjectException
Creates a new instance of the ObjectNode class by its object tag, field names, and field types.

Parameters:
tag - A string containing the object tag.
names - A list of names of the fields contained in the object node.
types - A list of the types of fields contained in the object node.
Throws:
ObjectException - Thrown if an error occurs while creating the instance.

ObjectNode

public ObjectNode(java.lang.String tag,
                  java.util.ArrayList names,
                  java.util.ArrayList types,
                  java.util.ArrayList values)
           throws ObjectException
Creates a new instance of the ObjectNode class by its object tag, field names, field types, and field values.

Parameters:
tag - A string containing the object tag.
names - A list of names of the fields contained in the object node.
types - A list of the types of fields contained in the object node.
values - A list of the values of the fields contained in the object node.
Throws:
ObjectException - Thrown if an error occurs while creating the instance.
Method Detail

add

protected void add(java.util.ArrayList targetArrayList,
                   ObjectNode child)
            throws ObjectException
Throws:
ObjectException

addChild

public void addChild(ObjectNode child)
              throws ObjectException
Adds a new child object to the object node. This method checks for duplicates before adding the new object and throws an exception if a duplicate object is found. addChild sets the ADD flag for the child object to true and sets the REMOVE flag to false only if no matching child objects are found.

Parameters:
child - The child object to add.
Returns:
void - None.
Throws:
ObjectException - Thrown if an error occurs while adding the child object.

addChildHard

public void addChildHard(ObjectNode child)
                  throws ObjectException
adds a new child to the ObjectNode without checking on duplicates

Parameters:
child - The feature to be added to the Child attribute
Throws:
ObjectException - ObjectException

addChildNoFlagSet

public void addChildNoFlagSet(ObjectNode child)
                       throws ObjectException
adds a new child to the ObjectNode, and not to set flags

Parameters:
child - The feature to be added to the Child attribute
Throws:
ObjectException - ObjectException

addChildren

public void addChildren(java.util.ArrayList children)
                 throws ObjectException
adds a list of children objects

Parameters:
children - ArrayList of ObjectNode(s)
Throws:
ObjectException - ObjectException

addChildToTypeArrayList

public void addChildToTypeArrayList(ObjectNode child)

clearChildrenForType

protected void clearChildrenForType(java.util.ArrayList targetChildren)
                             throws ObjectException
Throws:
ObjectException

clearField

public void clearField(java.lang.String name)
                throws ObjectException
Sets a field to null and the modifies the "changed" flag to true.

Parameters:
name - The name of the field being modified.
Returns:
void - None.
Throws:
ObjectException - Thrown if an error occurs while setting the field value or modifying the flag.

copy

public ObjectNode copy()
                throws ObjectException
ObjectNode deep copy

Returns:
ObjectNode a copy of itself
Throws:
ObjectException - ObjectException

createChildIndex

protected void createChildIndex(ObjectNode child,
                                boolean overrideFlag)
                         throws ObjectException
Throws:
ObjectException

deleteChild

public void deleteChild(ObjectNode node)
                 throws ObjectException
Marks a child object for deletion.

Parameters:
node - An ObjectNode object containing the child object to delete.
Returns:
void - None.
Throws:
ObjectException - Thrown if an error occurs while marking the object for deletion.

deleteChild

public void deleteChild(java.lang.String type,
                        java.lang.String objectId)
                 throws ObjectException
Marks a child object for deletion, identifying the child object by its object tag and object ID.

Parameters:
type - The type of child object to mark for deletion.
objectId - The object ID of the child object.
Returns:
void - None.
Throws:
ObjectException - Thrown if an error occurs while marking the object for deletion.

deleteChild

public void deleteChild(java.lang.String type,
                        SuperKey key)
                 throws ObjectException
Marks a child object for deletion, identifying the child object by its object tag and key field settings.

Parameters:
type - The type of child object to mark for deletion.
key - The key field of the child object.
Returns:
void - None.
Throws:
ObjectException - Thrown if an error occurs while marking the object for deletion.

equals

public boolean equals(java.lang.Object node)
checks if itself equals to input Object.

Parameters:
node - Object
Returns:
boolean

equals

public boolean equals(ObjectNode node)
               throws ObjectException
checks if itself equals to input ObjectNode

Parameters:
node - ObjectNode
Returns:
boolean
Throws:
ObjectException - ObjectException

getAllChildrenFromHashMap

public java.util.ArrayList getAllChildrenFromHashMap()

getChild

public ObjectNode getChild(java.lang.String type,
                           int pos)
Retrieves a child ObjectNode by its object tag and its index position.

Parameters:
type - A string containing the object tag.
pos - The index position of the child object.
Returns:
ObjectNode A child object of the specified type in the specified index position.
Throws:
ObjectException - Thrown if an error occurs while retrieving the child object.

getChild

public ObjectNode getChild(java.lang.String type,
                           ObjectKey key)
                    throws ObjectException
Retrieves a child ObjectNode by its object tag and its unique objecy key value.

Parameters:
type - A string containing the object tag.
key - The value of the unique key field.
Returns:
ObjectNode A child object of the specified type with the specified unique key field.
Throws:
ObjectException - Thrown if an error occurs while retrieving the child object.

getChild

public ObjectNode getChild(java.lang.String type,
                           ObjectKey key,
                           boolean removed)
                    throws ObjectException
Retrieves a child ObjectNode by its object tag, its unique object key value, and whether the ObjectNode is flagged for removal.

Parameters:
type - A string containing the object tag.
key - The value of the unique key field.
removed - A Boolean value indicating whether the object is flagged for removal.
Returns:
ObjectNode A child object of the specified type with the specified unique key field and removal flag.
Throws:
ObjectException - Thrown if an error occurs while retrieving the child object.

getChild

public ObjectNode getChild(java.lang.String type,
                           java.lang.String id)
                    throws ObjectException
Retrieves a child ObjectNode by its object tag and its unique identification code assigned by the master index.

Parameters:
type - A string containing the object tag.
id - The child object's unique identification code as assigned by the master index.
Returns:
ObjectNode A child object of the specified type with the specified ID.
Throws:
ObjectException - Thrown if an error occurs while retrieving the child object.

getChildKey

public ObjectKey getChildKey(java.lang.String type)
                      throws ObjectException
Retrieves the unique key field setting for the child object identified by the specified object tag.

Parameters:
type - A string containing the object tag.
Returns:
ObjectKey The setting of the unique key field for the specified child object.
Throws:
ObjectException - Thrown if an error occurs while retrieving the key setting.

getChildrenForType

public java.util.ArrayList getChildrenForType(java.lang.String type,
                                              boolean create)

getChildSuperKey

public SuperKey getChildSuperKey(java.lang.String type)
                          throws ObjectException
Retrieves the unique object key setting for the child object identified by the specified object tag. If there is no unique key field for the object, this method retrieves the unique ID for the object as assigned by the master index.

Parameters:
type - A string containing the object tag.
Returns:
SuperKey The setting of the unique key field or, if no unique key field exists, the unique master index ID of the specified child object.
Throws:
ObjectException - Thrown if an error occurs while retrieving the key setting.

getField

public ObjectField getField(java.lang.String fieldname)
                     throws ObjectException
Retrieves an ObjectField object by its field name.

Parameters:
fieldname - The name of the field whose ObjectField object you want to retrieve.
Returns:
ObjectField The field object corresponding to the given field name.
Throws:
ObjectException - Thrown if an error occurs while retrieving the ObjectField object.

getFieldTypes

protected java.util.ArrayList getFieldTypes()
Retrieves a list of the types of fields in the object node.

Parameters:
None.

Returns:
ArrayList A list of field types.
Throws:
None.

getFlag

public boolean getFlag(java.lang.String name,
                       int mask)
                throws ObjectException
Checks whether a field's bit mask is enabled or disabled.

Parameters:
name - The name of the field to check.
mask - The bit mask of the field.
Returns:
boolean An indicator of whether the bit mask is enabled or disabled. True indicates the bit mask is enabled; false indicates it is disabled.
Throws:
ObjectException - Thrown if an error occurs while checking the bit mask status.

getObjectId

public java.lang.String getObjectId()
                             throws ObjectException
Throws:
ObjectException

getParent

public ObjectNode getParent()
Retrieves the parent object node.

Parameters:
None.

Returns:
ObjectNode The parent object node of the given object.
Throws:
None.

getParentTag

public java.lang.String getParentTag()
gets parent object tag

Returns:
String parent's object tag

getValue

public java.lang.Object getValue(java.lang.String name)
                          throws ObjectException
Retrieves the value of a field given the field's name.

Parameters:
name - The name of the field to retrieve.
Returns:
Object The value of the given field.
Throws:
ObjectException - Thrown if an error occurs while retrieving the field value.

getValueObject

public ObjectField getValueObject(java.lang.String name)
                           throws ObjectException
Retrieves a field object (ObjectField) given the field's name.

Parameters:
name - The name of the field.
Returns:
ObjectField A field object with the given field name.
Throws:
ObjectException - Thrown if an error occurs while retrieving the field object.

hasFieldReadAccess

public boolean hasFieldReadAccess(java.lang.String name)
                           throws ObjectException
Checks whether the given field has read access.

Parameters:
name - The name of the field.
Returns:
boolean An indicator of whether the field has read access. True indicates the field has read access; false indicates it does not.
Throws:
ObjectException - Thrown if an error occurs while retrieving the read access status of the field.

hasFieldUpdateAccess

public boolean hasFieldUpdateAccess(java.lang.String name)
                             throws ObjectException
Checks whether the given field has update access.

Parameters:
name - The name of the field.
Returns:
boolean An indicator of whether the field has update access. True indicates the field has update access; false indicates it does not.
Throws:
ObjectException - Thrown if an error occurs while retrieving the update access status of the field.

hashCode

public int hashCode()
hash code

Returns:
int hash code

hasObjectAddAccess

public boolean hasObjectAddAccess()
Checks whether the object has add access.

Parameters:
None.

Returns:
boolean An indicator of whether the object has add access. True indicates the object has add access; false indicates it does not.
Throws:
None.

hasObjectDeleteAccess

public boolean hasObjectDeleteAccess()
Checks whether the object has delete access.

Parameters:
None.

Returns:
boolean An indicator of whether the object has delete access. True indicates the object has delete access; false indicates it does not.
Throws:
None.

hasObjectReadAccess

public boolean hasObjectReadAccess()
Checks whether the object has read access.

Parameters:
None.

Returns:
boolean An indicator of whether the object has read access. True indicates the object has read access; false indicates it does not.
Throws:
None.

hasObjectUpdateAccess

public boolean hasObjectUpdateAccess()
Checks whether the object has update access.

Parameters:
None.

Returns:
boolean An indicator of whether the object has update access. True indicates the object has update access; false indicates it does not.
Throws:
None.

isAdded

public boolean isAdded()
Checks whether the object node has been added to the object.

Parameters:
None.

Returns:
boolean An indicator of whether the object node is new. True indicates the node is new; false indicates it is not new.
Throws:
None.

isChanged

public boolean isChanged(java.lang.String name)
                  throws ObjectException
Checks whether the value of a field changed in the current transaction.

Parameters:
name - The name of the field.
Returns:
boolean An indicator of whether the field value changed. True indicates the field value changed; false indicates it did not change.
Throws:
ObjectException - Thrown if an error occurs while checking whether the value of the field changed.

isKeyChanged

public boolean isKeyChanged()
Checks whether key fields in the object node have changed.

Parameters:
None.

Returns:
boolean An indicator of whether key fields in the object node have changed. True indicates key fields have changed; false indicates they have not changed.
Throws:
None.

isKeyIndexable

protected boolean isKeyIndexable()
                          throws ObjectException
Throws:
ObjectException

isKeyType

public boolean isKeyType(java.lang.String name)
                  throws ObjectException
Checks whether the given field is a unique key field.

Parameters:
name - The name of the field.
Returns:
boolean An indicator of whether the field is a unique key field. True indicates the field is a unique key field; false indicates it is not.
Throws:
ObjectException - Thrown if an error occurs while retrieving the unique key access status of the field.

isKeyValid

public boolean isKeyValid(ObjectKey key)
Checks whether the given key object is valid.

Parameters:
key - The object key (ObjectKey) to check.
Returns:
boolean An indicator of whether the key is valid. True indicates the key is valid; false indicates it is not.
Throws:
ObjectException - Thrown if an error occurs while checking the key.

isNew

public boolean isNew()

isNull

public boolean isNull(java.lang.String name)
               throws ObjectException
Checks whether the given field contains a null value.

Parameters:
name - The name of the field to check.
Returns:
boolean An indicator of whether the field value is null. True indicates the value of the field is null; false indicates it is not.
Throws:
ObjectException - Thrown if an error occurs while checking the value of the field.

isNullable

public boolean isNullable(java.lang.String name)
                   throws ObjectException
Checks whether the value of the given field can be null.

Parameters:
name - The name of the field.
Returns:
boolean An indicator of whether the value of field can be null. True indicates the field value can be null; false indicates it cannot.
Throws:
ObjectException - Thrown if an error occurs while checking the field.

isRegularKeyIndexable

protected boolean isRegularKeyIndexable()
                                 throws ObjectException
Throws:
ObjectException

isRemoved

public boolean isRemoved()
Checks whether an object node is marked for deletion.

Parameters:
None.

Returns:
boolean An indicator of whether the field is marked for deletion. True indicates the field is marked for deletion; false indicates it is not.
Throws:
ObjectException - Thrown if an error occurs while retrieving the status of the field.

isSearched

public boolean isSearched(java.lang.String name)
                   throws ObjectException
Checks whether a field is used for searches.

Parameters:
name - The name of the field to check.
Returns:
boolean An indicator of whether the field is used for searches. True indicates the field is used; false indicates it is not.
Throws:
ObjectException - Thrown if an error occurs while checking the field.

isUpdated

public boolean isUpdated()
Checks whether an object node has been updated during a transaction.

Parameters:
None.

Returns:
boolean An indicator of whether the object node was updated. True indicates the object was updated; false indicates it was not.
Throws:
ObjectException - Thrown if an error occurs while checking the object.

isVisible

public boolean isVisible(java.lang.String name)
                  throws ObjectException
Checks whether a field is visible on the Enterprise Data Manager (EDM).

Parameters:
name - The name of the field to check.
Returns:
boolean An indicator of whether the field is visible on the EDM. True indicates the field is visible; false indicates it is not.
Throws:
ObjectException - Thrown if an error occurs while checking the field.

obtainKey

protected ObjectKey obtainKey()
                       throws ObjectException
gets Object Key setting

Returns:
ObjectKey object key
Throws:
ObjectException - object exception

obtainSuperKey

protected SuperKey obtainSuperKey()
                           throws ObjectException
gets Object Key setting

Returns:
ObjectKey object key
Throws:
ObjectException - object exception

pGetChildren

public java.util.ArrayList pGetChildren()
Retrieves a list of all child nodes in the object node.

Parameters:
None.

Returns:
ArrayList A list of child object nodes.
Throws:
None.

pGetChildren

public java.util.ArrayList pGetChildren(java.lang.String type)
Retrieves a list of all child nodes of the specified child type.

Parameters:
type - A string containing an object tag.
Returns:
ArrayList A list of child object nodes.
Throws:
None.

pGetChildTags

public java.util.ArrayList pGetChildTags()
Retrieves a list of the names of the different types of child objects defined in the object node.

Parameters:
None.

Returns:
ArrayList A list of child object tags.
Throws:
None.

pGetFieldNames

public java.util.ArrayList pGetFieldNames()
Retrieves a list of all field names in the object node.

Parameters:
None.

Returns:
ArrayList A list of field names.
Throws:
None.

pGetFields

public ObjectField[] pGetFields()
Retrieves an array list of all ObjectField objects in the object node.

Parameters:
None.

Returns:
ObjectField[] A list of field objects.
Throws:
None.

pGetFieldUpdateLogs

public java.util.ArrayList pGetFieldUpdateLogs()
Retrieves a list of transaction log entries for the object node.

Parameters:
None.

Returns:
ArrayList A list of transaction log entries.
Throws:
None.

pGetFieldValues

public java.util.ArrayList pGetFieldValues()
Retrieves a list of field values for the fields defined in the object node.

Parameters:
None.

Returns:
ArrayList A list of transaction log entries.
Throws:
None.

pGetFlagString

public java.lang.String pGetFlagString()
returns String for objectnode without printing out field details

Returns:
String non-flag string

pGetKey

public ObjectKey pGetKey()
                  throws ObjectException
Retrieves the unique object key setting for the object node. This includes a list of field names, field types, and field values.

Parameters:
None.

Returns:
ObjectKey The names, types, and values of the object's unique key fields.
Throws:
ObjectException - Thrown if an error occurs while retrieving the key setting.

pGetSuperKey

public SuperKey pGetSuperKey()
                      throws ObjectException
Retrieves the unique key field setting for the object node. This includes a list field names, field types, and field values. If there are no unique key fields defined for the given object, the object ID is returned.

Parameters:
None.

Returns:
ObjectKey The names, types, and values of the object's unique key fields.
Throws:
ObjectException - Thrown if an error occurs while retrieving the key setting.

pGetTag

public java.lang.String pGetTag()
Retrieves the tag of the ObjectNode object.

Parameters:
None.

Returns:
String The object tag for the given object.
Throws:
None.

pGetType

public java.lang.String pGetType()
Retrieves the tag of the ObjectNode object.

Parameters:
None.

Returns:
String The object tag for the given object.
Throws:
None.

pGetType

public int pGetType(java.lang.String name)
             throws ObjectException
Retrieves a field's data type given the field's name.

Parameters:
name - The name of the field to check.
Returns:
int An integer representing the field type.
Throws:
ObjectException - Thrown if an error occurs while retrieving the field type.

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException

recalculateIndex

protected void recalculateIndex()
                         throws ObjectException
Throws:
ObjectException

removeChild

public void removeChild(ObjectNode node)
Removes a child object from the ObjectNode

Parameters:
node - ObjectNode child object

removeChild

public void removeChild(java.lang.String type,
                        ObjectKey objKey)
                 throws ObjectException
removes a child object from the ObjectNode by child's object tag and key setting

Parameters:
type - object tag
Throws:
ObjectException - ObjectException

removeChildForType

protected void removeChildForType(java.util.ArrayList targetChildren,
                                  ObjectNode child)
                           throws ObjectException
Throws:
ObjectException

removeChildIndex

protected void removeChildIndex(ObjectNode child)
                         throws ObjectException
Throws:
ObjectException

removeChildren

public void removeChildren()
Removes all child objects from the ObjectNode


removeChildren

public void removeChildren(java.lang.String type)
Removes all child objects of one type from the ObjectNode

Parameters:
type - object type

reset

public void reset()
resets all control flags on the ObjectNode


resetAll

public void resetAll()
resets all control flags on the ObjectNode, including child(ren)


setAddFlag

public void setAddFlag(boolean flag)
Sets the value of the add flag, indicating whether the ObjectNode object is newly added.

Parameters:
flag - A Boolean flag indicating whether the object node is newly added. True indicates the object node is newly added; false indicates it is not.
Returns:
void - None.
Throws:
None.

setChanged

public void setChanged(java.lang.String name,
                       boolean flag)
                throws ObjectException
Sets the value of the field change flag, indicating whether the specified fields was changed in the ObjectNode object.

Parameters:
name - The name of the field whose change flag is being set.
flag - A Boolean flag indicating whether the field was updated in the object node. True indicates the field was updated; false indicates it was not.
Returns:
void - None.
Throws:
ObjectException - Thrown if an error occurs while setting the flag.

setFieldReadAccess

public void setFieldReadAccess(java.lang.String name,
                               boolean flag)
                        throws ObjectException
Sets the value of a field's read access flag.

Parameters:
name - The name of the field whose flag is being set.
flag - A boolean flag indicating whether the field has read access. True indicates the field has read access; false indicates it does not.
Returns:
void - None.
Throws:
ObjectException - Thrown if an error occurs while setting the read access flag.

setFieldUpdateAccess

public void setFieldUpdateAccess(java.lang.String name,
                                 boolean flag)
                          throws ObjectException
Sets the value of a field's update access flag.

Parameters:
name - The name of the field whose flag is being set.
flag - A boolean flag indicating whether the field has update access. True indicates the field has update access; false indicates it does not.
Returns:
void - None.
Throws:
ObjectException - Thrown if an error occurs while setting the update access flag.

setFieldUpdateLogs

public void setFieldUpdateLogs(java.util.ArrayList logs)
Sets a list of transaction log entries.

Parameters:
logs - An array list of transaction log entries.
Returns:
void - None.
Throws:
None.

setFlag

public void setFlag(java.lang.String name,
                    int mask,
                    boolean flag)
             throws ObjectException
Sets a field's bit bit mask, which indicates whether to update, add, or remove a field. No bit mask indicates that no action is taken against a field.

Parameters:
name - The name of the field whose bit mask is being set.
mask - The bit mask indicator for the field.
flag - A boolean flag that indicates...
Returns:
void - None.
Throws:
ObjectException - Thrown if an error occurs while setting the flag. sets a field's bit mask
ObjectException - ObjectException mKeyChangeMask=8 mUpdateMask=1 mRemoveMask=2 mAddMask=4 mObjectReadAccessMask=1 mObjectUpdateAccessMask=2 mObjectDeleteAccessMask=4 mObjectAddAccessMask=8

setKey

public void setKey(ObjectKey key)
            throws ObjectException
Sets the object node's key field value.

Parameters:
key - The value to set in the key field.
Returns:
void - None.
Throws:
ObjectException - Thrown if an error occurs while setting the flag.

setKeyChangeFlag

public void setKeyChangeFlag(boolean flag)
Sets the value of the key change flag, indicating whether key fields were changed in the ObjectNode object.

Parameters:
flag - A Boolean flag indicating whether key fields were updated in the object node. True indicates key fields were updated; false indicates they were not.
Returns:
void - None.
Throws:
None.

setKeyType

public void setKeyType(java.lang.String name,
                       boolean flag)
                throws ObjectException
Specifies whether a field is a key type field or not.

Parameters:
name - The name of the field whose key type flag is being set
flag - A boolean flag indicating whether the field is a key type field. True indicates the field is a key type field; false indicates it is not.
Returns:
void - None.
Throws:
ObjectException - Thrown if an error occurs while setting the key type.

setNull

public void setNull(java.lang.String name,
                    boolean flag)
             throws ObjectException
Specifies whether a field is holding a null value.

Parameters:
name - The name of the field whose value is being set.
flag - A boolean flag indicating whether the field is holding a null value. True indicates the field is holding a null value; false indicates it is not.
Returns:
void - None.
Throws:
ObjectException - Thrown if an error occurs while setting the null value indicator.

setNullable

public void setNullable(java.lang.String name,
                        boolean flag)
                 throws ObjectException
Specifies whether a field can contain a null value.

Parameters:
name - The name of the field whose null flag is being set.
flag - A boolean flag indicating whether the field can contain a null value. True indicates the field can be null; false indicates it cannot.
Returns:
void - None.
Throws:
ObjectException - Thrown if an error occurs while setting the null flag.

setObjectAddAccess

public void setObjectAddAccess(boolean flag)
Sets the value of the add access flag for the object node, indicating whether the object has add access.

Parameters:
flag - A Boolean flag indicating whether the object node has add access. True indicates the object node has add access; false indicates it does not.
Returns:
void - None.
Throws:
None.

setObjectDeleteAccess

public void setObjectDeleteAccess(boolean flag)
Sets the value of the delete access flag for the object node, indicating whether the object has delete access.

Parameters:
flag - A Boolean flag indicating whether the object node has delete access. True indicates the object node has delete access; false indicates it does not.
Returns:
void - None.
Throws:
None.

setObjectReadAccess

public void setObjectReadAccess(boolean flag)
Sets the value of the read access flag for the object node, indicating whether the object has read access.

Parameters:
flag - A Boolean flag indicating whether the object node has read access. True indicates the object node has read access; false indicates it does not.
Returns:
void - None.
Throws:
None.

setObjectUpdateAccess

public void setObjectUpdateAccess(boolean flag)
Sets the value of the update access flag for the object node, indicating whether the object has update access.

Parameters:
flag - A Boolean flag indicating whether the object node has update access. True indicates the object node has update access; false indicates it does not.
Returns:
void - None.
Throws:
None.

setParent

public void setParent(ObjectNode parent)
Sets the parent object in an object node.

Parameters:
parent - The name of the parent object.
Returns:
void - None.
Throws:
None.

setRemoveFlag

public void setRemoveFlag(boolean flag)
Specifies whether the object node is marked for deletion.

Parameters:
flag - A boolean indicator of whether to mark the object node for deletion. True indicates the object node is marked for deletion; false indicates it is not.
Returns:
void - None.
Throws:
None.

setSearched

public void setSearched(java.lang.String name,
                        boolean flag)
                 throws ObjectException
Specifies whether the given field is used for searches.

Parameters:
name - The name of the field whose search flag is being set.
flag - A boolean indicator of whether the field is used for searches. True indicates the field is used for searches; false indicates it is not.
Returns:
void - None.
Throws:
ObjectException - Thrown if an error occurs while setting the search flag.

setUpdateFlag

public void setUpdateFlag(boolean flag)
Specifies whether the given object node was updated.

Parameters:
flag - A boolean indicator of whether the object node was updated. True indicates the object node was updated; false indicates it was not.
Returns:
void - None.
Throws:
None.

setValue

public void setValue(java.lang.String name,
                     java.lang.Object value)
              throws ObjectException
Sets the value of a field, using the field name to identify the field.

Parameters:
name - The name of the field whose value is being set.
value - The new value for the given field.
Returns:
void - None.
Throws:
ObjectException - Thrown if an error occurs while changing the value of the field.

setVisible

public void setVisible(java.lang.String name,
                       boolean flag)
                throws ObjectException
sets if a field is visible

Parameters:
name - field name
flag - boolean flag
Throws:
ObjectException - ObjectException

structCopy

public ObjectNode structCopy()
                      throws ObjectException
ObjectNode structural copy

Returns:
ObjectNode a copy of itself
Throws:
ObjectException - ObjectException

toString

public java.lang.String toString()
toString

Returns:
String

unChange

public void unChange()
              throws ObjectException
Resets the changes made to an object, returning the object to its previous status.

Parameters:
None.
Returns:
void - None.

Throws:
ObjectException - Thrown if an error occurs while reversing the changes to the object.

update

public void update(ObjectNode node,
                   boolean addNewChild,
                   boolean delMissingChild)
            throws ObjectException
updates the ObjectNode by input object copies all the fields of input objectNode to this ObjectNode, including nulls except the Id fields. Currently used by SurvivorCalculator

Parameters:
node - ObjectNode
addNewChild - add-new-child flag
delMissingChild - delete-missing-child flag
Throws:
ObjectException - ObjectException

updateChild

public void updateChild(ObjectNode child)
                 throws ObjectException
update a child to the ObjectNode. if the child exists in its parent an update is executed, or an insert is executed

Parameters:
child - The feature to be added to the Child attribute
Throws:
ObjectException - ObjectException

updateIfChanged

public void updateIfChanged(ObjectNode node,
                            boolean addNewChild,
                            boolean delMissingChild)
                     throws ObjectException
updates the ObjectNode by input object

Parameters:
node - ObjectNode
addNewChild - add-new-child flag
delMissingChild - delete-missing-child flag
Throws:
ObjectException - ObjectException

updateIfNotEqual

public void updateIfNotEqual(ObjectNode node,
                             boolean addNewChild,
                             boolean delMissingChild)
                      throws ObjectException
Throws:
ObjectException

updateIfNotNull

public void updateIfNotNull(ObjectNode node,
                            boolean addNewChild,
                            boolean delMissingChild)
                     throws ObjectException
updates the ObjectNode by input object

Parameters:
node - ObjectNode
addNewChild - add-new-child flag
delMissingChild - delete-missing-child flag
Throws:
ObjectException - ObjectException

updateIfNotNull

public void updateIfNotNull(ObjectNode node,
                            boolean addNewChild,
                            boolean delMissingChild,
                            boolean copyFlags)
                     throws ObjectException
updates the ObjectNode by input object

Parameters:
node - ObjectNode
addNewChild - add-new-child flag
delMissingChild - delete-missing-child flag
copyFlags - if set to true, will copy the flags: isRemoved, isAdded, isUpdated
Throws:
ObjectException - ObjectException

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException


Sun Microsystems, Inc.