All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----org.xmlmiddleware.xmldbms.DBMSDelete
DBMSDelete deletes data from the database according to particular XMLDBMSMap, FilterSet, and Actions objects. The XMLDBMSMap and FilterSet objects define the hierarchy of rows that DBMSDelete processes. The Actions object defines whether DBMSDelete deletes or ignores these rows. (It may be helpful to think of DBMSDelete as being almost identical to DBMSToDOM, except that DBMSDelete deletes rows instead of retrieving them.)
For example, the following code deletes sales order number 123 and related records.
// Create the XMLDBMSMap object with a user-defined function. map = createMap("orders.map");
// Create an Actions object with a user-defined function. actions = createActions(map, "deleteorders.ftr");
// Create the FilterSet object with a user-defined function. filterSet = createFilterSet(map, "ordersbynumber.ftr");
// Create a new DBMSDelete object that uses the Xerces parser. dbmsDelete = new DBMSDelete(new ParserUtilsXerces());
// Create a data source and data handler for our database, then // bundle these into a TransferInfo object. ds = new JDBC1DataSource("sun.jdbc.odbc.JdbcOdbcDriver", "jdbc:odbc:xmldbms"); handler = new GenericHandler(ds, null, null); ti = new TransferInfo(map, null, handler);
// Build the parameters hashtable. params = new Hashtable(); params.put("$Number", "123");
// Call deleteDocument to delete the data. dbmsDelete.deleteDocument(ti, filterSet, params, actions);
public DBMSDelete()
public void setCommitMode(int commitMode)
If the commit mode is not set, COMMIT_AFTERSTATEMENT is used by default.
public int getCommitMode()
public void deleteDocument(TransferInfo transferInfo, FilterSet filterSet, Hashtable params, int action) throws SQLException, XMLMiddlewareException
The filter set must contain at least one root filter.
public void deleteDocument(TransferInfo transferInfo, FilterSet filterSet, Hashtable params, Actions actions) throws SQLException, XMLMiddlewareException
The filter set must contain at least one root filter.
All Packages Class Hierarchy This Package Previous Next Index