コード例 #1
0
  /** {@inheritDoc} */
  @Override
  @Transactional
  public void delete(Book book) {
    if (book == null) {
      if (log.isDebugEnabled()) {
        log.debug("Skipping deletion for null model!");
      }

      return;
    }

    // remove the reference from the associated account
    if (book.getAccount() != null) {
      book.getAccount().removeBook(book);
    }

    super.delete(book);
  }
コード例 #2
0
 /** {@inheritDoc} */
 @Override
 public Book getNewWithDefaults() {
   Book result = getNew();
   result.initDefaultValues();
   return result;
 }