Пример #1
0
 public long updateTPersonBorrower(TPersonBorrower tPersonBorrower, TJobBorrower tJobBorrower) {
   long result = tPersonBorrowerDao.update(tPersonBorrower);
   if (result <= 0) {
     throw new ZeroSQLException();
   }
   TJobBorrower tJobBorrowerModel =
       tJobBorrowerDao.getTJobBorrowerByPersonId(tPersonBorrower.getId());
   tJobBorrower.setId(tJobBorrowerModel.getId());
   result = tJobBorrowerDao.update(tJobBorrower);
   if (result <= 0) {
     throw new ZeroSQLException();
   }
   return result;
 }
Пример #2
0
 public long addTPersonBorrower(TPersonBorrower tPersonBorrower, TJobBorrower tJobBorrower) {
   long result = tPersonBorrowerDao.insert(tPersonBorrower);
   if (result <= 0) {
     throw new ZeroSQLException();
   }
   tJobBorrower.setPersonBorrowerId(tPersonBorrower.getId());
   result = tJobBorrowerDao.insert(tJobBorrower);
   if (result <= 0) {
     throw new ZeroSQLException();
   }
   return result;
 }