com.sun.grid.jgdi.event

## Class ChangedObjectEvent

- java.lang.Object
- - com.sun.grid.jgdi.event.Event
  - - com.sun.grid.jgdi.event.ChangedObjectEvent

- All Implemented Interfaces:
    java.io.Serializable
  Direct Known Subclasses:
    AddEvent, DelEvent, ModEvent

      public abstract class ChangedObjectEvent
      extends Event
      implements java.io.Serializable

  Base class of all events which signalizes a changes of objects in the Sun [tm] Grid Engine.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ChangedObjectEvent(EventType eventType, long timestamp, int eventId, java.lang.Class objectType)` Creates a new instance of ChangedObjectEvent

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `getChangedObject()` Get the new version of the changed object which has been changed by this event
    `java.lang.Class` | `getObjectType()` Get the type of the changed objects
    `void` | `setChangedObject(java.lang.Object changedObj)` Set the new version of the changed object
    `abstract void` | `setPKInfo(int numKey1, int numKey2, java.lang.String strKey1, java.lang.String strKey2)` Set the primary key information of the changed object into the event.
    `java.lang.String` | `toString()`

    - ### Methods inherited from class com.sun.grid.jgdi.event.Event

      `getEventId, getTimestamp, getType`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### ChangedObjectEvent

          public ChangedObjectEvent(EventType eventType,
                                    long timestamp,
                                    int eventId,
                                    java.lang.Class objectType)

      Creates a new instance of ChangedObjectEvent
      Parameters:
        `eventType` - type of event
        `timestamp` - timestamp when the event occured
        `eventId` - id of the event
        `objectType` - type of the changed objects

  - ### Method Detail

    - #### getObjectType

          public java.lang.Class getObjectType()

      Get the type of the changed objects
      Returns:
        type of the changed objects

    - #### setChangedObject

          public void setChangedObject(java.lang.Object changedObj)

      Set the new version of the changed object
      Parameters:
        `changedObj` - the changed object
      Throws:
        `java.lang.IllegalArgumentException` - if `changedObj` is `null`
        `java.lang.IllegalArgumentException` - if the class object type for the event is not assignable from the class of `changedObj`
      See Also:
        `getObjectType()`

    - #### getChangedObject

          public java.lang.Object getChangedObject()

      Get the new version of the changed object which has been changed by this event
      Returns:
        list of changed objects

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `Event`

    - #### setPKInfo

          public abstract void setPKInfo(int numKey1,
                                         int numKey2,
                                         java.lang.String strKey1,
                                         java.lang.String strKey2)

      Set the primary key information of the changed object into the event.

      This method is called from the the native part of jgdi to fill the primary key information into a del event

      Parameters:
        `numKey1` - first numerical primary key of the deleted object
        `numKey2` - second numerical primary key of the deleted object
        `strKey1` - first string primary key of the deleted object
        `strKey2` - second string primary key of the deleted object

Copyright © 2007 Sun Microsystems, Inc. All rights reserved.