com.businessobjects.sdk.biar.om
Interface IObjectManager


public interface IObjectManager

The IObjectManager interface defines a scalable, thread-safe storage medium for info objects. It is used primarily for importing and exporting objects to and from the BusinessObjects Enterprise repository. It can also be used to manage very large info objects.

To create an instance of this interface, use BIARFactory.

Object Manager (OM) instances are thread-safe. As a rule, multiple threads may access an OM simultaneously without any need for synchronization.

Note: IManagedObjectIterator is not thread-safe. These iterators should not be used while the OM is being concurrently modified, either through its own interface or through another IManagedObjectIterator. This is equally true if the modification occurs in the same thread as the iterator or in any other thread. This is similar to the behavior of Java Collections iterators. Certain internal OM operations use these iterators. As such, several methods are unsafe for use when the OM is accessed by multiple threads, including IObjectManager.commit(), IObjectManager.exportToArchive(String, IExportOptions), IObjectManager.importArchive(String, IImportOptions), and IObjectManager.importFiles().

Once the OM is populated with objects, its contents can be inspected and operated on using methods such as IObjectManager.contains(int), IObjectManager.read(int), IObjectManager.update(IInfoObject), and IObjectManager.delete(int). When the contents are ready, OM provides a number of scalable alternatives to the usual commit methods of the info store, such as IObjectManager.commit(), and the IObjectManager.exportToArchive(String, IExportOptions) to export the contents to a BIAR archive.

Note: when an IObjectManager instance is no longer needed, call IObjectManager.dispose() to free all associated resources.


Method Summary
 void clear()
          Removes all objects from the OM.
 ICommitResult commit()
          Commits the objects in the OM to the repository without atomicity and using strict commit mode.
 ICommitResult commit(boolean atomic, CommitMode mode)
          Commits the objects in the OM to the repository using the specified atomicity and commit mode.
 ICommitResult commit(boolean atomic, CommitMode mode, int commitLevel)
          Commits the objects in the OM to the repository using the specified atomicity, commit mode, and commit level.
 ICommitResult commit(CommitType type)
          Commits the objects in the OM to the repository without atomicity and using strict commit mode.
 ICommitResult commit(CommitType type, boolean atomic, CommitMode mode)
          Commits the objects in the OM to the repository using the specified commit type, atomicity, and commit mode.
 ICommitResult commit(CommitType type, boolean atomic, CommitMode mode, int commitLevel)
          Commits the objects in the OM to the repository using the specified commit type, atomicity, commit mode, and commit level.
 ICommitResult commit(ICommitOptions opts)
          Commits the objects in the OM to the CMS repository using the specified options.
 java.util.Set containedCuids(java.util.Iterator cuids)
          Returns the CUIDs of all objects in the OM that match CUIDs in the specified collection.
 java.util.Set containedIds(java.util.Iterator ids)
           Returns the IDs in the OM that match the IDs in the specified collection.
 boolean contains(int id)
           Returns whether the OM contains the info object with the specified ID.
 boolean contains(java.lang.String cuid)
          Returns whether the OM contains the info object with the specified CUID.
 boolean delete(int id)
           Removes the info object with the specified ID from the OM.
 boolean delete(java.lang.String cuid)
           Removes the info object with the specified CUID from the OM.
 int deleteAllCuids(java.util.Iterator cuids)
           Removes all info objects from the OM whose CUIDs are contained in the specified collection.
 int deleteAllIds(java.util.Iterator ids)
           Removes all info objects from the OM whose IDs are contained in the specified collection.
 void dispose()
           Disposes of the OM and releases any resources held by it.
 void exportToArchive(java.lang.String biarFile, IExportOptions options)
           Exports the entire contents of the OM to a BIAR archive.
 java.util.Set getCuidSet()
           Returns the CUIDs of all the objects in the OM.
 IEnterpriseSession getEnterpriseSession()
           Returns enterprise session object
 java.util.Set getIdSet()
           Returns the IDs of all objects in the OM.
 java.util.Set getKindSet()
           Returns the kinds of all objects in the OM.
 void importArchive(java.lang.String biarFile, IImportOptions options)
           Imports the contents of a BIAR archive into the OM.
 IImport importArchiveInteractively(java.lang.String biarFile, IImportOptions options)
           Imports the contents of a BIAR archive into the OM.
 void importFiles()
           Imports the binary content of files associated with any info objects in the OM.
 void insert(IInfoObject obj)
           Inserts the specified info object into the OM.
 void insertAll(java.util.Iterator objs)
           Inserts all of the info objects in the specified collection into the OM.
 void insertAtomic(java.util.Iterator objs)
           Atomically inserts all of the info objects in the specified collection into the OM.
 ILiveToLivePipe liveImport(IEnterpriseSession srcSession, IExportOptions srcOpts, IImportOptions destOpts)
          Begins an import from a live Business Objects Enterprise system to this OM.
 IInfoObject read(int id)
           Returns the info object with the specified ID from the OM.
 IInfoObject read(java.lang.String cuid)
           Returns the info object with the specified CUID from the OM.
 IManagedObjectIterator readAll()
           Returns an iterator that contains all of the objects in the OM.
 java.util.List readAllCuids(java.util.Iterator cuids)
           Returns the info objects whose CUIDs match those in the specified collection.
 java.util.List readAllIds(java.util.Iterator ids)
           Returns the info objects whose IDs match those in the specified collection.
 IManagedObjectIterator readAllKind(java.lang.String kind)
           Returns an iterator containing all objects of the specified kind in the OM.
 IManagedObjectIterator readByCuids(java.util.Collection cuids)
           Returns an iterator of info objects whose CUIDs match those in the specified collection.
 IManagedObjectIterator readByIds(java.util.Collection ids)
           Returns an iterator of info objects whose IDs match those in the specified collection.
 int size()
           Returns the number of objects currently stored in the OM.
 ICommitResult testCommit(ICommitOptions opts)
          Performs a test commit, which returns all the errors that would occur if this OM's contents were committed to the repository using IObjectManager.commit(ICommitOptions), but does not alter repository contents.
 void update(IInfoObject obj)
           Updates an existing info object in the OM.
 void updateAll(java.util.Iterator objs)
           Updates all of the info objects contained in the specified collection.
 void updateAtomic(java.util.Iterator objs)
           Atomically updates all of the info objects in the specified collection.
 void write(IInfoObject obj)
           Writes an object to the OM.
 void writeAll(java.util.Iterator objs)
           Writes all of the specified objects to the OM.
 void writeAtomic(java.util.Iterator objs)
           Atomically writes all of the info objects in the given collection.
 

Method Detail

clear

void clear()
           throws OMException
Removes all objects from the OM.

Throws:
OMException - if the operation fails.

commit

ICommitResult commit(ICommitOptions opts)
                     throws OMException
Commits the objects in the OM to the CMS repository using the specified options.

Parameters:
opts - the commit options.
Returns:
the result of the commit.
Throws:
OMException - if this operation fails.

commit

ICommitResult commit()
                     throws OMException
Commits the objects in the OM to the repository without atomicity and using strict commit mode. This is the same as calling IObjectManager.commit(boolean, CommitMode) with false and CommitMode.STRICT for the first and second arguments respectively.

Returns:
the result of the commit.
Throws:
OMException - if the commit fails.
See Also:
IObjectManager.commit(boolean, CommitMode), CommitMode

commit

ICommitResult commit(CommitType type)
                     throws OMException
Commits the objects in the OM to the repository without atomicity and using strict commit mode. This is the same as calling IObjectManager.commit(), except that it allows the commit type to be specified.

Parameters:
type - the type of the commit.
Returns:
the result of the commit.
Throws:
OMException - if the commit suffers a catastrophic failure.
See Also:
CommitType

commit

ICommitResult commit(boolean atomic,
                     CommitMode mode)
                     throws OMException
Commits the objects in the OM to the repository using the specified atomicity and commit mode. The objects will be committed with whatever commit level they are already configured for. This is semantically identical to calling IInfoStore.commit(IInfoObjects, boolean, CommitMode), but the process is carried out in such a way that memory consumption does not grow in the size of the OM. IObjectManager.commit(boolean, CommitMode, int) performs the same operation but uses a specified commit level for every object of the commit.

Parameters:
atomic - the atomicity of the commit. If atomic is true then any error during the commit will result in the entire commit being rolled back. If false the commit will continue until all objects have been tried.
mode - the commit mode. If CommitMode.STRICT then any dangling relationship edges will be treated as errors, otherwise they will only raise warnings and will not prevent the host object from being committed.
Returns:
the result of the commit.
Throws:
OMException - if the commit suffers a catastrophic failure.
See Also:
CommitMode

commit

ICommitResult commit(CommitType type,
                     boolean atomic,
                     CommitMode mode)
                     throws OMException
Commits the objects in the OM to the repository using the specified commit type, atomicity, and commit mode. This is analogous to calling IObjectManager.commit(boolean, CommitMode), but the type argument allows the commit semantics to be slightly altered.

Parameters:
type - the type of the commit.
atomic - the atomicity of the commit. If atomic is true then any error during the commit will result in the entire commit being rolled back. If false the commit will continue until all objects have been tried.
mode - the commit mode. If CommitMode.STRICT then any dangling relationship edges will be treated as errors, otherwise they will only raise warnings and will not prevent the host object from being committed.
Returns:
the result of the commit.
Throws:
OMException - if the commit suffers a catastrophic failure.
See Also:
CommitMode, CommitType

commit

ICommitResult commit(boolean atomic,
                     CommitMode mode,
                     int commitLevel)
                     throws OMException
Commits the objects in the OM to the repository using the specified atomicity, commit mode, and commit level. This is identical to IObjectManager.commit(boolean, CommitMode), except that the specified commit level will be applied to each info object before it is committed.

Parameters:
atomic - the commit atomicity.
mode - the commit mode.
commitLevel - the commit level to apply to each object.
Returns:
the result of the commit.
Throws:
OMException - if the commit suffers a catastrophic failure.
See Also:
IInfoObject.CommitLevel, CommitMode

commit

ICommitResult commit(CommitType type,
                     boolean atomic,
                     CommitMode mode,
                     int commitLevel)
                     throws OMException
Commits the objects in the OM to the repository using the specified commit type, atomicity, commit mode, and commit level. This is analogous to calling IObjectManager.commit(boolean, CommitMode, int), but the type argument allows the commit semantics to be slightly altered.

Parameters:
type - the type of the commit.
atomic - the commit atomicity.
mode - the commit mode.
commitLevel - the commit level to apply to each object.
Returns:
the result of the commit.
Throws:
OMException - if the commit suffers a catastrophic failure.
See Also:
IInfoObject.CommitLevel, CommitMode, CommitType

contains

boolean contains(int id)
                 throws OMException

Returns whether the OM contains the info object with the specified ID.

Parameters:
id - the ID of the info object
Returns:
true if an info object with the specified ID is found, false otherwise.
Throws:
OMException - if the operation fails.
See Also:
IObjectManager.contains(String), IObjectManager.containedCuids(Iterator), IObjectManager.containedIds(Iterator)

contains

boolean contains(java.lang.String cuid)
                 throws OMException
Returns whether the OM contains the info object with the specified CUID.

Parameters:
cuid - the CUID of the info object
Returns:
true if an info object with the specified CUID is found, false otherwise.
Throws:
OMException - if the operation fails.
See Also:
IObjectManager.contains(int), IObjectManager.containedCuids(Iterator), IObjectManager.containedIds(Iterator)

containedCuids

java.util.Set containedCuids(java.util.Iterator cuids)
                             throws OMException
Returns the CUIDs of all objects in the OM that match CUIDs in the specified collection. To obtain the CUIDs of all the objects in the OM, use IObjectManager.getCuidSet().

Parameters:
cuids - an iterator over a collection of CUIDs
Returns:
a Set containing the intersection of the specified collection of CUIDs and the set of CUIDs of all objects in the OM.
Throws:
OMException - if the operation fails.
See Also:
IObjectManager.contains(int), IObjectManager.contains(String), IObjectManager.containedIds(Iterator)

containedIds

java.util.Set containedIds(java.util.Iterator ids)
                           throws OMException

Returns the IDs in the OM that match the IDs in the specified collection.

To obtain a complete set of the IDs of all objects contained in the OM, use IObjectManager.getIdSet().

Parameters:
ids - an iterator over the collection of IDs.
Returns:
a set containing the intersection of the specified IDs and the IDs of all objects in the OM.
Throws:
OMException - if the operation fails.
See Also:
IObjectManager.contains(int), IObjectManager.contains(String), IObjectManager.containedCuids(Iterator)

delete

boolean delete(int id)
               throws OMException

Removes the info object with the specified ID from the OM.

Parameters:
id - the ID of the object to be removed.
Returns:
true if an object was removed from the OM as a result of this operation.
Throws:
OMException - if the operation fails.
See Also:
IObjectManager.delete(String), IObjectManager.deleteAllCuids(Iterator), IObjectManager.deleteAllIds(Iterator)

delete

boolean delete(java.lang.String cuid)
               throws OMException

Removes the info object with the specified CUID from the OM.

Parameters:
cuid - the CUID of the object to be removed.
Returns:
true if an object was removed from the OM as a result of this operation.
Throws:
OMException - if the operation fails.
See Also:
IObjectManager.delete(int), IObjectManager.deleteAllCuids(Iterator), IObjectManager.deleteAllIds(Iterator)

deleteAllCuids

int deleteAllCuids(java.util.Iterator cuids)
                   throws OMException

Removes all info objects from the OM whose CUIDs are contained in the specified collection. To remove all objects from the OM, use IObjectManager.clear().

Parameters:
cuids - an iterator containing the CUIDs of the objects to be removed.
Returns:
the number of info objects that were removed as a result of this operation.
Throws:
OMException - if the operation fails.
See Also:
IObjectManager.delete(int), IObjectManager.delete(String), IObjectManager.deleteAllIds(Iterator)

deleteAllIds

int deleteAllIds(java.util.Iterator ids)
                 throws OMException

Removes all info objects from the OM whose IDs are contained in the specified collection. To remoave all objects from the OM, use IObjectManager.clear().

Parameters:
ids - an iterator containing the IDs of the objects to be removed.
Returns:
the number of info objects that were removed as a result of this operation.
Throws:
OMException - if the operation fails.
See Also:
IObjectManager.delete(int), IObjectManager.delete(String), IObjectManager.deleteAllCuids(Iterator)

dispose

void dispose()
             throws OMException

Disposes of the OM and releases any resources held by it.

Note: this does not automatically close any currently open IManagedObjectIterator instances that may be open. These should be closed before disposing of the OM. Otherwise, some resources may not be released.

Throws:
OMException
See Also:
IManagedObjectIterator.close()

exportToArchive

void exportToArchive(java.lang.String biarFile,
                     IExportOptions options)
                     throws BIARException

Exports the entire contents of the OM to a BIAR archive. Use the Archive class to obtain meta-information about the resultant archive.

If you do not need to use OM to temporarily cache info objects before the export, then it is recommend that you use BIAROutput to export info objects instead.

Parameters:
options - a set of options to control the parameters of export.
Throws:
BIARException - if the operation fails.
OMException - if the operation fails due to an exception while iterating over the objects in the OM.
See Also:
BIARFactory.createImportOptions()

getCuidSet

java.util.Set getCuidSet()
                         throws OMException

Returns the CUIDs of all the objects in the OM. This is generally much more efficient than iterating over the entire OM.

Returns:
a set containing the CUIDs of all objects in the OM.
Throws:
OMException - if the operation fails.
See Also:
IObjectManager.getIdSet()

getIdSet

java.util.Set getIdSet()
                       throws OMException

Returns the IDs of all objects in the OM. This is generally much more efficient than iterating over the entire OM.

Returns:
a set containing the IDs of all objects in the OM.
Throws:
OMException - if the operation fails.
See Also:
IObjectManager.getCuidSet()

getKindSet

java.util.Set getKindSet()
                         throws OMException

Returns the kinds of all objects in the OM. This is generally much more efficient than iterating over the entire OM.

Returns:
a set containing the kinds of all objects in the OM.
Throws:
OMException - if the operation fails.

importArchive

void importArchive(java.lang.String biarFile,
                   IImportOptions options)
                   throws BIARException

Imports the contents of a BIAR archive into the OM. Before importing, any info objects currently in the OM are removed.

The import options can be used to specify that this is a "two-step import". If this option is set, the import operation only imports the info object properties from the archive; the actual binary content of any associated files is not extracted. To import the associated files from the archive, call IObjectManager.importFiles() before they are committed or transfered from the OM.

Parameters:
biarFile - file name of the archive to import.
options - a set of options to control the parameters of import.
Throws:
BIARException - if the operation fails.
OMException - if the operation fails due to an exception condition in the OM.
See Also:
IObjectManager.importFiles(), IImportOptions.setTwoStepImport(boolean), BIARFactory.createImportOptions()

importArchiveInteractively

IImport importArchiveInteractively(java.lang.String biarFile,
                                   IImportOptions options)
                                   throws BIARException

Imports the contents of a BIAR archive into the OM. The semantics are identical to IObjectManager.importArchive(String, IImportOptions), except that an IImport is returned so that the import can be interacted with.

Parameters:
biarFile - file name of the archive to import.
options - a set of options to control the parameters of import.
Returns:
Throws:
BIARException - if the operation fails.
OMException - if the operation fails due to an exception condition in the OM.

liveImport

ILiveToLivePipe liveImport(IEnterpriseSession srcSession,
                           IExportOptions srcOpts,
                           IImportOptions destOpts)
                           throws BIARException
Begins an import from a live Business Objects Enterprise system to this OM. A ILiveToLivePipe represents the in-progress transfer. A live-to-live import also entails an export from the source system and therefore requires a set of export options to be specified.

Parameters:
srcSession - a valid session obtained from the live source system.
srcOpts - a set of options to control the parameters of export.
destOpts - a set of options to control the parameters of import.
Returns:
a ILiveToLivePipe object representing the in-progress transfer.
Throws:
BIARException - if the operations fails.
See Also:
IObjectManager.importArchive(String, IImportOptions), IObjectManager.importFiles()

importFiles

void importFiles()
                 throws BIARException

Imports the binary content of files associated with any info objects in the OM. This is only necessary if the "two-step import" option was specified when importing the archive.

Throws:
BIARException
See Also:
IObjectManager.importArchive(String, IImportOptions), IImportOptions.setTwoStepImport(boolean)

insert

void insert(IInfoObject obj)
            throws OMException

Inserts the specified info object into the OM.

Parameters:
obj - the object to insert.
Throws:
OMException - if the operation fails. In particular, the operation will fail if the obj has the same CUID or ID as another object already contained in the OM.
See Also:
IObjectManager.insertAll(Iterator), IObjectManager.insertAtomic(Iterator)

insertAll

void insertAll(java.util.Iterator objs)
               throws OMException

Inserts all of the info objects in the specified collection into the OM. This has the same effect as performing multiple inserts, but is generally more efficient, and will appear as a single atomic operation to other threads. To ensure that the inserts will atomically succeed or fail, use IObjectManager.insertAtomic(Iterator).

Parameters:
objs - an iterator over the collection of objects to insert.
Throws:
OMException - if the operation fails. In particular, the operation will fail if any object has the same CUID or ID as another object already contained in the OM or present in the collection of inserts.
See Also:
IObjectManager.insert(IInfoObject)

insertAtomic

void insertAtomic(java.util.Iterator objs)
                  throws OMException

Atomically inserts all of the info objects in the specified collection into the OM. This has the same effect as calling IObjectManager.insertAll(Iterator), except that if any one insert fails, then all inserts fail.

Parameters:
objs - an iterator over the collection of objects to insert.
Throws:
OMException - if the operation fails. In particular, the operation will fail if any object has the same CUID or ID as another object already contained in the OM or present in the collection of inserts.
See Also:
IObjectManager.insert(IInfoObject)

read

IInfoObject read(int id)
                 throws OMException

Returns the info object with the specified ID from the OM.

Parameters:
id - the ID of the object.
Returns:
the info object from the OM with ID specified, or null if it does not exist.
Throws:
OMException - if this operation fails.
See Also:
IObjectManager.read(String), IObjectManager.readAll(), IObjectManager.readAllCuids(Iterator), IObjectManager.readAllIds(Iterator), IObjectManager.readAllKind(String)

read

IInfoObject read(java.lang.String cuid)
                 throws OMException

Returns the info object with the specified CUID from the OM.

Parameters:
cuid - the ID of the object.
Returns:
the info object from the OM with CUID specified, or null if it does not exist.
Throws:
OMException - if this operation fails.
See Also:
IObjectManager.read(int), IObjectManager.readAll(), IObjectManager.readAllCuids(Iterator), IObjectManager.readAllIds(Iterator), IObjectManager.readAllKind(String)

readAll

IManagedObjectIterator readAll()
                               throws OMException

Returns an iterator that contains all of the objects in the OM. It traverses the objects in the following order:

  1. In reverse order of the import operation in which they were added to the OM (objects in the last import are traversed first).
  2. In hierarchical order (parent objects are traversed before their children within the same import operation).
  3. In import order (the order in which they were added to the OM).

Returns:
an ordered iterator over all objects contained in the OM.
Throws:
OMException - if the operation fails.
See Also:
IObjectManager.read(int), IObjectManager.read(String), IObjectManager.readAllCuids(Iterator), IObjectManager.readAllIds(Iterator), IObjectManager.readAllKind(String)

readAllCuids

java.util.List readAllCuids(java.util.Iterator cuids)
                            throws OMException

Returns the info objects whose CUIDs match those in the specified collection. Method is thread safe.

Parameters:
cuids - an iterator over the CUIDs of the objects.
Returns:
a list containing all matching objects in the OM.
Throws:
OMException - if this operation fails.
See Also:
IObjectManager.read(int), IObjectManager.read(String), IObjectManager.readAll(), IObjectManager.readAllIds(Iterator), IObjectManager.readAllKind(String), IObjectManager.readByCuids(Collection), IObjectManager.readByIds(Collection)

readAllIds

java.util.List readAllIds(java.util.Iterator ids)
                          throws OMException

Returns the info objects whose IDs match those in the specified collection. Method is thread safe.

Parameters:
ids - an iterator over the IDs of the objects.
Returns:
a list containing all matching objects in the OM.
Throws:
OMException - if this operation fails.
See Also:
IObjectManager.read(int), IObjectManager.read(String), IObjectManager.readAll(), IObjectManager.readAllCuids(Iterator), IObjectManager.readAllKind(String), IObjectManager.readByCuids(Collection), IObjectManager.readByIds(Collection)

readAllKind

IManagedObjectIterator readAllKind(java.lang.String kind)
                                   throws OMException

Returns an iterator containing all objects of the specified kind in the OM. It traverses the objects in the following order:

  1. In reverse order of the import operation in which they were added to the OM (objects in the last import are traversed first).
  2. In hierarchical order (parent objects are traversed before their children within the same import operation).
  3. In import order (the order in which they were added to the OM).

Parameters:
kind - the kind of info object to read.
Returns:
an iterator over all the objects of the specified kind contained in the OM.
Throws:
OMException - if the operation fails.
See Also:
IObjectManager.read(int), IObjectManager.read(String), IObjectManager.readAllCuids(Iterator), IObjectManager.readAllIds(Iterator), IObjectManager.readByCuids(Collection), IObjectManager.readByIds(Collection), IInfoObject.getKind()

readByCuids

IManagedObjectIterator readByCuids(java.util.Collection cuids)
                                   throws OMException

Returns an iterator of info objects whose CUIDs match those in the specified collection.

Parameters:
cuids - an iterator over the CUIDs of the objects.
Returns:
an iterator containing all matching objects in the OM.
Throws:
OMException - if this operation fails.
See Also:
IObjectManager.read(int), IObjectManager.read(String), IObjectManager.readAll(), IObjectManager.readAllCuids(Iterator), IObjectManager.readAllIds(Iterator), IObjectManager.readAllKind(String), IObjectManager.readByIds(Collection)

readByIds

IManagedObjectIterator readByIds(java.util.Collection ids)
                                 throws OMException

Returns an iterator of info objects whose IDs match those in the specified collection.

Parameters:
ids - an iterator over the IDs of the objects.
Returns:
an iterator containing all matching objects in the OM.
Throws:
OMException - if this operation fails.
See Also:
IObjectManager.read(int), IObjectManager.read(String), IObjectManager.readAll(), IObjectManager.readAllCuids(Iterator), IObjectManager.readAllIds(Iterator), IObjectManager.readAllKind(String), IObjectManager.readByCuids(Collection)

size

int size()
         throws OMException

Returns the number of objects currently stored in the OM. This can be an expensive operation in terms of performance.

Returns:
the number of objects stored in the OM.
Throws:
OMException - if this operation fails.

testCommit

ICommitResult testCommit(ICommitOptions opts)
                         throws OMException
Performs a test commit, which returns all the errors that would occur if this OM's contents were committed to the repository using IObjectManager.commit(ICommitOptions), but does not alter repository contents.

Parameters:
opts - the commit options.
Returns:
commit results as though the OM were committed to the repository.
Throws:
OMException - if this operation fails.

update

void update(IInfoObject obj)
            throws OMException

Updates an existing info object in the OM. To determine which object to update in the OM, the SI_ID property of the object is compared to the SI_ID of the objects in the OM.

Parameters:
obj - the updated object.
Throws:
OMException - if this operation fails. In particular, it will fail if the OM does not contain an object whose SI_ID matches that of the object in obj.
See Also:
IObjectManager.updateAll(Iterator), IObjectManager.updateAtomic(Iterator)

updateAll

void updateAll(java.util.Iterator objs)
               throws OMException

Updates all of the info objects contained in the specified collection. This has the same effect as peforming multiple updates, but is generally more efficient, and will appear as a single atomic operation to other threads. To ensure that the updates will atomically succeed or fail, use IObjectManager.updateAtomic(Iterator).

Parameters:
objs - an iterator over the collection of objects to update.
Throws:
OMException - if this operation fails. In particular, it will fail if any of the objects in objs does not have matching IDs with some existing object in the OM.
See Also:
IObjectManager.update(IInfoObject)

updateAtomic

void updateAtomic(java.util.Iterator objs)
                  throws OMException

Atomically updates all of the info objects in the specified collection. This has the same effect as calling IObjectManager.updateAll(Iterator), except that if any one update fails, then all updates fail.

Parameters:
objs - an iterator over the collection of objects to update.
Throws:
OMException - if the operation fails. In particular, it will fail if any of IDs of the objects in objs do not match any of the IDs of the object in the OM.
See Also:
IObjectManager.update(IInfoObject)

write

void write(IInfoObject obj)
           throws OMException

Writes an object to the OM. The write operation either inserts or updates the object as required. This is more expensive than either IObjectManager.write(IInfoObject) or IObjectManager.update(IInfoObject) but is more flexible.

Parameters:
obj - the object to write.
Throws:
OMException - if this operation fails.
See Also:
IObjectManager.writeAll(Iterator), IObjectManager.writeAtomic(Iterator)

writeAll

void writeAll(java.util.Iterator objs)
              throws OMException

Writes all of the specified objects to the OM. This has the same effect as performing multiple writes, but is generally more efficient, and will appear as a single atomic operation to other threads. To ensure that the entire operation atomically succeeds or fails, use IObjectManager.writeAtomic(Iterator).

Parameters:
objs - an iterator over the collection of objects to write.
Throws:
OMException - if this operation fails.
See Also:
IObjectManager.write(IInfoObject)

writeAtomic

void writeAtomic(java.util.Iterator objs)
                 throws OMException

Atomically writes all of the info objects in the given collection. This has the same effect as calling IObjectManager.writeAll(Iterator), except that if any one write fails, then all writes fail.

Parameters:
objs - an iterator over the collection of objects to write.
Throws:
OMException - if this operation fails.
See Also:
IObjectManager.write(IInfoObject)

getEnterpriseSession

IEnterpriseSession getEnterpriseSession()

Returns enterprise session object

Returns:
the enterprise session object
Throws:
OMException
See Also:
#IEnterpriseSession