Esempio n. 1
0
 /**
  * Get the single CompanyBDO object holding a CompanyDO object that refers to the DO held by this
  * BDO.
  *
  * @return CompanyBDO object.
  * @exception DataObjectException If the object is not found in the database.
  * @exception NonUniqueQueryException If more than one CompanyBDO object was found.
  */
 public jobmatch.data.CompanyBDO getCompanyBDO()
     throws DataObjectException, NonUniqueQueryException, QueryException {
   jobmatch.data.CompanyQuery q = new jobmatch.data.CompanyQuery();
   q.setQueryIndustry(DO);
   q.requireUniqueInstance();
   return q.getNextBDO();
 }
Esempio n. 2
0
 /**
  * Get array of CompanyDO objects that refer to the DO held by this BDO.
  *
  * @return array of CompanyDO objects.
  * @exception DataObjectException If the object is not found in the database.
  */
 public jobmatch.data.CompanyDO[] getCompanyDOArray() throws DataObjectException, QueryException {
   jobmatch.data.CompanyDO[] ret = null;
   try {
     jobmatch.data.CompanyQuery q = new jobmatch.data.CompanyQuery();
     q.setQueryIndustry(DO);
     ret = q.getDOArray();
   } catch (NonUniqueQueryException e) {
     throw new DataObjectException("INTERNAL ERROR: unexpected NonUniqueQueryException");
   } finally {
     if (null == ret) ret = new jobmatch.data.CompanyDO[0];
   }
   return ret;
 }
Esempio n. 3
0
 /**
  * From the many-to-many relationship expressed by CompanyDO, remove (delete) the AdressDO object
  * that indirectly refers to the DO held by this BDO.
  *
  * @param b The AdressBDO to remove from the CompanyDO mapping for this BDO.
  * @exception DataObjectException If the object is not found in the database.
  */
 public void unmapAdress_via_CompanyBDO(jobmatch.data.AdressBDO b, DBTransaction tran)
     throws DataObjectException, DatabaseManagerException, RefAssertionException, SQLException,
         DBRowUpdateException, QueryException {
   jobmatch.data.CompanyQuery q = new jobmatch.data.CompanyQuery();
   q.setQueryIndustry(DO);
   q.setQueryAdress(b.getDO());
   q.requireUniqueInstance();
   jobmatch.data.CompanyBDO m = null;
   try {
     m = q.getNextBDO();
   } catch (NonUniqueQueryException e) {
     throw new DataObjectException(
         "Multiple mappings for " + DO + " and " + b.getDO() + " in jobmatch.data.Company table.");
   }
   m.delete(tran);
 }