ilog.cpl.datasource
Class DataSourceObjectEvent

java.lang.Object
  extended by java.util.EventObject
      extended by ilog.util.IlEventObject
          extended by ilog.cpl.datasource.DataSourceObjectEvent
All Implemented Interfaces:
Serializable

public class DataSourceObjectEvent
extends IlEventObject

Data source object event. This kind of event occurs on one object from a data source. These events are structure changed or attribute value changed events.

Since:
JTGO 3.0
See Also:
Serialized Form

Nested Class Summary
static class DataSourceObjectEvent.Type
          Event types.
 
Field Summary
static Object OLD_VALUE_UNAVAILABLE
          This value should be used as attribute value when it is not possible to compute or retrieve the old value of an attribute during an attribute value change event.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
DataSourceObjectEvent(IlpDataSource dataSource, IlpObject object, Class structuralInterface)
          Constructor for structure changed events.
DataSourceObjectEvent(IlpDataSource dataSource, IlpObject object, IlpAttribute attribute)
          Constructor for attribute changed events.
DataSourceObjectEvent(IlpDataSource dataSource, IlpObject object, IlpAttribute attribute, Object newv, Object oldv)
          Constructor for attribute changed events.
 
Method Summary
 IlpAttribute getAttribute()
          Returns the attribute.
 Object getNewValue()
          Returns the value of the attribute after the modification signaled by this event.
 IlpObject getObject()
          Returns the IlpObject that has been modified.
 Object getOldValue()
          Returns the value of the attribute before the modification signaled by this event.
 Class getStructuralInterface()
          Returns the structural interface.
 boolean hasOldValue()
          Checks that the old value of the attribute is available.
 
Methods inherited from class ilog.util.IlEventObject
getType
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

OLD_VALUE_UNAVAILABLE

public static final Object OLD_VALUE_UNAVAILABLE
This value should be used as attribute value when it is not possible to compute or retrieve the old value of an attribute during an attribute value change event.

Since:
JTGO 4.0
Constructor Detail

DataSourceObjectEvent

public DataSourceObjectEvent(IlpDataSource dataSource,
                             IlpObject object,
                             Class structuralInterface)
Constructor for structure changed events.

Parameters:
dataSource - Datasource where the object has been modified
object - Business object that was modified
structuralInterface - Structural interface

DataSourceObjectEvent

public DataSourceObjectEvent(IlpDataSource dataSource,
                             IlpObject object,
                             IlpAttribute attribute)
Constructor for attribute changed events.

Parameters:
dataSource - Datasource where the event occurred
object - Business object whose attribute value has changed
attribute - Business attribute that has changed

DataSourceObjectEvent

public DataSourceObjectEvent(IlpDataSource dataSource,
                             IlpObject object,
                             IlpAttribute attribute,
                             Object newv,
                             Object oldv)
Constructor for attribute changed events.

Parameters:
dataSource - Datasource where the event occurred
object - Business object
attribute - Business attribute that has changed
newv - New attribute value
oldv - Old attribute value
Since:
JTGO 4.0
Method Detail

getObject

public IlpObject getObject()
Returns the IlpObject that has been modified.


getStructuralInterface

public Class getStructuralInterface()
Returns the structural interface. This is relevant only for object structure changed events.


getAttribute

public IlpAttribute getAttribute()
Returns the attribute. This is relevant only for object attribute changed events.


getNewValue

public Object getNewValue()
Returns the value of the attribute after the modification signaled by this event.

Returns:
The new value of the attribute.
Since:
JTGO 4.0

getOldValue

public Object getOldValue()
Returns the value of the attribute before the modification signaled by this event.

In some cases the old value can be unavailable. Use hasOldValue() to check the availability of the old value.

Returns:
The value of the attribute before the modification signaled by this event.
Since:
JTGO 4.0

hasOldValue

public boolean hasOldValue()
Checks that the old value of the attribute is available. Use this method prior to call getOldValue().

Returns:
true when the old value of the attribute is available.
Since:
JTGO 4.0


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.   . All Rights Reserved.