Exemple #1
0
 /**
  * @see
  *     org.kuali.kra.bo.KraPersistableBusinessObjectBase#beforeUpdate(org.apache.ojb.broker.PersistenceBroker)
  */
 @Override
 protected void preUpdate() {
   super.preUpdate();
   if (this.getVersionNumber() == null) {
     this.setVersionNumber(new Long(0));
   }
 }
Exemple #2
0
 @Override
 protected void preRemove() {
   super.preRemove();
   // if we have a file and its linked to other versions make sure its not deleted with this
   // version.
   if (getFileId() != null) {
     Map<String, Object> values = new HashMap<String, Object>();
     values.put("fileId", getFileId());
     List<AwardAttachment> otherAttachmentVersions =
         (List<AwardAttachment>)
             KraServiceLocator.getService(BusinessObjectService.class)
                 .findMatching(AwardAttachment.class, values);
     if (otherAttachmentVersions.size() > 1) {
       setFile(null);
       setFileId(null);
     }
   }
 }
Exemple #3
0
 /**
  * This sets the update time stamp only if it hasn't already been set.
  *
  * @see org.kuali.kra.bo.KraPersistableBusinessObjectBase#setUpdateTimestamp(java.sql.Timestamp)
  */
 @Override
 public void setUpdateTimestamp(Timestamp updateTimestamp) {
   if (getUpdateTimestamp() == null) {
     super.setUpdateTimestamp(updateTimestamp);
   }
 }