Home > Contents > Index >
Expanded TOC | Accordion TOC | Annotated TOC | Index
ICS.StartBatchContext
Fetches the
BatchContextobject to queue CatalogManager and TreeManager commands.Syntax
public java.lang.Object StartBatchContext()Description
The
StartBatchContextmethod fetches the BatchContext object to queue CatalogManager and TreeManager commands.The following table lists the CatalogManager and TreeManager commands that accept a
BatchContextobject:
CatalogManager Commands TreeManager Commandsaddrowaddchildaddrowsaddchildrenreplacerowdeletechildreplacerowsdeletechildrendeleterowdeleterows
Returns
Returns the
BatchContextobject.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.