Home > Contents > Index >
Expanded TOC | Accordion TOC | Annotated TOC | Index
ICS.StartBatchContext
Fetches the
BatchContext
object to queue CatalogManager and TreeManager commands.Syntax
public java.lang.Object StartBatchContext()Description
The
StartBatchContext
method fetches the BatchContext object to queue CatalogManager and TreeManager commands.The following table lists the CatalogManager and TreeManager commands that accept a
BatchContext
object:
CatalogManager Commands TreeManager Commandsaddrow
addchild
addrows
addchildren
replacerow
deletechild
replacerows
deletechildren
deleterow
deleterows
Returns
Returns the
BatchContext
object.Example
// Start a batch Object batchObject = ics.StartBatchContext(); // Perform 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 retVal1 = 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
CommitBatchedCommands , RollbackBatchedCommands
Home > Contents > Index > ![]()
Oracle JAVA Reference
Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.