Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.mdm.index.query
Class ObjectNodeAssembler

    java.lang.Object
      com.sun.mdm.index.query.ObjectNodeAssembler

All Implemented Interfaces:
  ResultObjectAssembler

public class ObjectNodeAssembler
extends java.lang.Object
implements ResultObjectAssembler

The ObjectNodeAssembler class creates an object node (class ObjectNode) hierarchy. This is a generic object node assembler and can be used to create any kind of ObjectNode structure.

Constructor Summary
`ObjectNodeAssembler()` Creates a new instance of the ObjectNodeAssembler class.

Method Summary
`java.lang.Object` | `createObjectAttributes(java.lang.Object rootObject, java.lang.Object parent, java.lang.String objectName, AttributesData attrsData)` Creates an object containing the attributes of the object nodes in the hierarchy (other than the root object).
`java.lang.Object` | `createRoot(java.lang.String objectName, AttributesData attrsData)` Creates the root object for each object.
`void` | `init()` Initializes the resources to be used by ObjectNodeAssembler.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ObjectNodeAssembler

    public ObjectNodeAssembler()

  Creates a new instance of the ObjectNodeAssembler class.

  Parameters:
    None.
  Throws:
    None.

Method Detail

### createObjectAttributes

    public java.lang.Object createObjectAttributes(java.lang.Object rootObject,
                                                   java.lang.Object parent,
                                                   java.lang.String objectName,
                                                   AttributesData attrsData)
                                            throws VOAException

  Creates an object containing the attributes of the object nodes in the hierarchy (other than the root object). The assembler engine calls this method for each object that will be created and that has a new identity. This method may create a new object, and sets the attribute values for the new object to those in the input AttributesData object. createObjectAttributes also binds the new attributes object to the input parent object. For example, if Parent.FirstName and Parent.Address.City are retrieved in a query, createObjectAttributes is called for each Address object retrieved. The parent object is the Person object, to which the new attributes object is bound.

  Specified by:
    `createObjectAttributes` in interface `ResultObjectAssembler`
  Parameters:
    `rootObject` - The root object created previously by the createRoot method.
    `parent` - The parent object for the new object to be created (this may be the same as the root object).
    `objectName` - The name of the object to be created, as defined in the Object Definition configuration file of the Master Index Project.
    `attrsData` - The attribute data associated with the object.
  Returns:
    `Object` - An object containing the attributes.
  Throws:
    `VOAException` - Thrown if an error occurs while creating the object attributes.

### createRoot

    public java.lang.Object createRoot(java.lang.String objectName,
                                       AttributesData attrsData)
                                throws VOAException

  Creates the root object for each object. The assembler engine calls this method for each root object to be created. The root object is an ObjectNode object. Inside createRoot(), you can create initialization data structures that can later be used by the createObjectAttributes method.

  Specified by:
    `createRoot` in interface `ResultObjectAssembler`
  Parameters:
    `objectName` - The name of the root object to be created.
    `attrsData` - The attribute data associated with the root object.
  Returns:
    `Object` - A new root object (class ObjectNode).
  Throws:
    `VOAException` - Thrown if an error occurs while creating the root object.

### init

    public void init()

  Initializes the resources to be used by ObjectNodeAssembler. Call this method only once before starting the assembly process.

  Parameters:
    None.
  Returns:
    `void` - None.
  Throws:
    None.

  Specified by:
    `init` in interface `ResultObjectAssembler`

Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Sun Microsystems, Inc.