if (entity instanceof EntityImpl) { Date createDatetime = ((EntityImpl)entity).getCreateDatetime();  if (createDatetime == null) { setPropertyState (state, propertyNames, "createDatetime", new Date()); setPropertyState (state, propertyNames, "createDbAccount", this.dbAccount); }  setPropertyState (state, propertyNames, "modifyDbAccount", this.dbAccount);  return true; } else {
  public boolean onSave   (Object				entity,    Serializable 	id,     Object[] 			state,     String[] 			propertyNames,     Type[] 				types)  throws CallbackException  {    if (entity instanceof EntityImpl)    {      Date createDatetime = ((EntityImpl)entity).getCreateDatetime();            if (createDatetime == null)      {        setPropertyState        	(state, propertyNames, "createDatetime", new Date());        setPropertyState        	(state, propertyNames, "createDbAccount", this.dbAccount);      }            setPropertyState      	(state, propertyNames, "modifyDbAccount", this.dbAccount);            return true;    }    else    {      return false;    }  }