ilog.cpl.datasource
Interface IlpMutableDataSource

All Superinterfaces:
IlpDataSource
All Known Implementing Classes:
IlpDefaultDataSource, IltDefaultDataSource

public interface IlpMutableDataSource
extends IlpDataSource

Interface of data source with write access.

Since:
JTGO 3.0

Method Summary
 void addObject(IlpObject ilpObject)
          Adds an object to the data source.
 void addObjects(List objects)
          Adds a set of objects to the data source.
 void clear()
          Clears the data source.
 IlpObject removeObject(Object idOrIlpObject, boolean childrenToo)
          Removes an object from the data source.
 List removeObjects(List idsOrIlpObjects, boolean childrenToo)
          Removes a list of objects from the data source.
 List removeObjects(List idsOrIlpObjects, List childrenTooList)
          Removes a list of objects from the data source.
 void setChildren(Object idOrIlpObject, List childrenIdsOrIlpObjects)
          Declares an object as having children.
 void setLink(Object idOrIlpObject, Object fromIdOrIlpObject, Object toIdOrIlpObject)
          Declares an object as being a link.
 void setParent(Object idOrIlpObject, Object parentIdOrIlpObject)
          Declares an object as being the child of another.
 
Methods inherited from interface ilog.cpl.datasource.IlpDataSource
addDataSourceListener, getChildInterface, getContainerInterface, getContext, getLinkExtremityInterface, getLinkInterface, getObject, getObjects, removeDataSourceListener
 

Method Detail

addObject

void addObject(IlpObject ilpObject)
Adds an object to the data source.

Parameters:
ilpObject - The object to be added to the data source.

addObjects

void addObjects(List objects)
Adds a set of objects to the data source.

Parameters:
objects - The set of objects to be added to the data source.

removeObject

IlpObject removeObject(Object idOrIlpObject,
                       boolean childrenToo)
Removes an object from the data source.

Parameters:
idOrIlpObject - The identifier of the object or the object itself to be removed. data source.
childrenToo - If true, the child objects, if there are any, are also removed from the data source content.
Returns:
The removed object or null, if the data source does not contain an object corresponding to the identifier.

removeObjects

List removeObjects(List idsOrIlpObjects,
                   boolean childrenToo)
Removes a list of objects from the data source.

Parameters:
idsOrIlpObjects - A list containing the objects to be removed from the data source as identifiers or IlpObject instances.
childrenToo - If true, the child objects, if there are any, are also removed from the data source content.
Returns:
The list of removed objects.

removeObjects

List removeObjects(List idsOrIlpObjects,
                   List childrenTooList)
Removes a list of objects from the data source. This method is designed for internal use by the IlpSAXDataHandler.

Parameters:
idsOrIlpObjects - A list containing the objects to be removed from the data source as identifiers or IlpObject instances.
childrenTooList - The list of Booleans with the same size as the identifiers list. If an element is true, the children of the objects, if any, are also removed from the data source.
Returns:
The list of removed objects.

clear

void clear()
Clears the data source. All IlpObject instances are removed from the data source.


setLink

void setLink(Object idOrIlpObject,
             Object fromIdOrIlpObject,
             Object toIdOrIlpObject)
Declares an object as being a link.

As the parameters of this method can be either identifiers or IlpObject instances, the IlpAbstractDataSource.getIdentifier(Object) method can be used to retrieve the identifier in both cases.

Parameters:
idOrIlpObject - The identifier of the link object or the object itself.
fromIdOrIlpObject - The identifier of the "from" end of the link, or the "from" object itself.
toIdOrIlpObject - The identifier of the "to" end of the link, or the "to" object itself.

setParent

void setParent(Object idOrIlpObject,
               Object parentIdOrIlpObject)
Declares an object as being the child of another.

As the parameters of this method can be either identifiers or IlpObject instances, the IlpAbstractDataSource.getIdentifier(Object) method can be used to retrieve the identifier in both cases.

Parameters:
idOrIlpObject - The identifier of the child object, or the child object itself.
parentIdOrIlpObject - The identifier of the parent object, or the parent object itself.

setChildren

void setChildren(Object idOrIlpObject,
                 List childrenIdsOrIlpObjects)
Declares an object as having children.

As the parameters of this method can be or can contain either identifiers or IlpObject instances, the IlpAbstractDataSource.getIdentifier(Object) method can be used to retrieve the identifier in both cases.

Parameters:
idOrIlpObject - The identifier of the object, or the object itself, that has children.
childrenIdsOrIlpObjects - A list containing the children as identifiers or IlpObject instances.


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