Home > Contents > Index >
ICS.CommitBatchedCommands
Commits CatalogManager and TreeManager commands queued to the batch context.
Syntax
public boolean CommitBatchedCommands(Object oBatchContext)Parameters
oBatchContext
- The Batch Context object.
Description
The CommitBatchedCommands method commits CatalogManager and TreeManager commands queued to the batch context. The follwing table lists the CatalogManager and TreeManager commands that accept a Batch Context object:
CatalogManager Commands TreeManager Commandsaddrow
addchild
addrows
addchildren
replacerow
deletechild
replacerows
deletechildren
deleterow
deleterows
Returns
Returns
true
for success andfalse
for failure.Example
The following code creates a transaction consisting of two operations:
// Start a batch Object batchObject = ics.StartBatchContext(); // do a CatalogManager operation FTValList inList = new FTValList(); inList.setValString("ftcmd", "addrow"); inList.setValString("tablename", "TestTable"); inList.setValString("id","100"); // Make sure that you pass the batchObject to CatalogManager boolean retVal1 = ics.CatalogManager(inList, batchObject); // do another CatalogManager operation inList = new FTValList(); inList.setValString("ftcmd", "deleterow"); inList.setValString("tablename", "TestTable"); inList.setValString("id","101"); // Again make sure that you pass the SAME batchObject boolean retVal2 = ics.CatalogManager(inList, batchObject); // if both the operations were a success, commit all the changes // otherwise, roll all of them back if ( retVal1 && retVal2) ics.CommitBatchedCommands(batchObject); else ics.RollbackBatchedCommands(batchObject);See Also
RollbackBatchedCommands , StreamEvalBytes
Home > Contents > Index > ![]()
Oracle JAVA Reference
Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.