Exemplo n.º 1
0
 /**
  * Remove (delete) a CompanyBDO object whose CompanyDO refers to the DO held by this BDO.
  *
  * @param r CompanyBDO to be deleted.
  * @param tran The transaction to be used for the commit. If null, a new transaction is created.
  * @exception DatabaseManagerException if could not create a transaction
  * @exception java.sql.SQLException if any SQL errors occur.
  * @exception DataObjectException If object is not found in the database.
  */
 public void removeCompanyBDO(jobmatch.data.CompanyBDO rbdo, DBTransaction tran)
     throws SQLException, DatabaseManagerException, DataObjectException, RefAssertionException,
         DBRowUpdateException, QueryException {
   IndustryDO rdo = rbdo.getIndustry();
   String rdoHandle = rdo.getHandle();
   String mydoHandle = DO.getHandle();
   if (null == rdoHandle || null == mydoHandle || (!rdoHandle.equals(mydoHandle))) {
     throw new DataObjectException(
         "Object " + rdo + " does not refer to object " + DO + ", cannot be removed this way.");
   }
   rbdo.delete(tran);
 }