com.cometway.om
Interface IObjectManager

All Known Implementing Classes:
FileObjectManager, JDBCObjectManager, ObjectManager

public interface IObjectManager

This is the generic interface for an Object Manager.


Field Summary
static java.lang.String LIST_SUPPORTED_TYPES
          This object can be passed to the listObjects method to return a Vector containing the full class names of ObjectTypes which are supported by the createObject method.
static java.lang.String LIST_TYPES
          This object can be passed to the listObjects method to return a Vector containing the ObjectTypes which currently exist in the object manager.
 
Method Summary
 boolean changeObjectID(ObjectID oldID, ObjectID newID)
          This method changes an object's ObjectID.
 ObjectID createObject(ObjectType type)
          Creates a new object in the object manager of the specified object type.
 java.lang.Object getObject(ObjectID id)
          Retrieves the object corresponding to an object ID.
 java.util.Vector listObjects(java.lang.Object objectQuery)
          Returns a Vector of objects designated by the objectQuery parameter.
 boolean removeObject(ObjectID id)
          Deletes the object corresponding to an object ID from the object manager.
 

Field Detail

LIST_TYPES

static final java.lang.String LIST_TYPES
This object can be passed to the listObjects method to return a Vector containing the ObjectTypes which currently exist in the object manager.

See Also:
Constant Field Values

LIST_SUPPORTED_TYPES

static final java.lang.String LIST_SUPPORTED_TYPES
This object can be passed to the listObjects method to return a Vector containing the full class names of ObjectTypes which are supported by the createObject method.

See Also:
Constant Field Values
Method Detail

createObject

ObjectID createObject(ObjectType type)
Creates a new object in the object manager of the specified object type.

Note: Currently, only the PropsType is supported.

Parameters:
type - a reference to an ObjectType representing the type of object to create.
Returns:
a reference to a valid ObjectID if successful; null otherwise.

getObject

java.lang.Object getObject(ObjectID id)
Retrieves the object corresponding to an object ID.

Parameters:
id - a reference to an ObjectID representing a valid object in the object manager.
Returns:
a reference to an Object if one was found; null otherwise.

listObjects

java.util.Vector listObjects(java.lang.Object objectQuery)
Returns a Vector of objects designated by the objectQuery parameter. Valid objects for this parameter are:
IObjectManager.LIST_TYPES Lists object types that already exist.
IObjectManager.LIST_SUPPORTED_TYPES Lists objects which can be passed to createObject.
ObjectType Lists all existing objects of the same ObjectType.
PropsQuery Lists Props based on data from the PropsQuery object.
Note: Some object managers may support additional values for access to non-standard features.

Parameters:
objectQuery - any valid object from the list above.
Returns:
a Vector containing Objects based on the query; null if the query wasn't recognized.

removeObject

boolean removeObject(ObjectID id)
Deletes the object corresponding to an object ID from the object manager.

Parameters:
id - a reference to an ObjectID representing a valid object in the object manager.
Returns:
true if the object was successfully deleted; false otherwise.

changeObjectID

boolean changeObjectID(ObjectID oldID,
                       ObjectID newID)
This method changes an object's ObjectID.