Same as default: persisted, updated, removed.

  | @Override
  | public String persist() {
  | 
  |   if (Strings.isNull(getInstance().getId()) && !this.isManaged()) {
  |     
  |     KeyGenerator keyGen = (KeyGenerator) 
Component.getInstance(KeyGenerator.class, true);
  |     getInstance().setId(keyGen.getKey(Constant.Database.KeySuffix.ADMIN));
  |     
  |     getInstance().setLastUpdateDate((new 
CurrentDatetime()).getCurrentDatetime());
  |     getInstance().setInsertDate((new 
CurrentDatetime()).getCurrentDatetime());
  |   }
  |   
  |   //setCreatedMessage(null);
  |   String returnStatus = super.persist();
  |   
  |   if ("persisted".equals(returnStatus)) {
  |     
//FacesMessages.instance().addFromResourceBundle(FacesMessage.SEVERITY_INFO, 
"au.edu.tisc.RecordInserted", " organisation user " + 
getInstance().getUsername());
  | 
  |     try {
  |       ((ActivityLogger) Component.getInstance(ActivityLogger.class, 
true)).logOrgUserAuthenticated(
  |           ActivityLogger.Code.RECORD_CREATED, 
  |           String.format(ActivityLogger.Code.Desc.RECORD_CREATED, 
getInstance().getClass().getName() + "#" + getInstance().getId())); 
  |     } catch (ActivityLoggerException e) {
  |       //skip
  |     }
  |   }
  |   return returnStatus;
  | }
  | 
  | 
  | 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4098888#4098888

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4098888
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to