Tuesday, December 17, 2013

Java : OnBeforeInsert

  protected void onBeforeInsert()
  {
    super.onBeforeInsert();
    setCREATED_ON(new Date());
    setCREATED_BY(BSF.getUser().substring(BSF.getUser().indexOf("=") + 1, BSF.getUser().indexOf(",")) + "[" + BSF.getOrganization().substring(BSF.getOrganization().indexOf("=") + 1, BSF.getOrganization().indexOf(",")) + "]");
  }

  protected void onBeforeUpdate()
  {
    super.onBeforeUpdate();
    setLAST_MODIFIED_ON(new Date());
    setLAST_MODIFIED_BY(BSF.getUser().substring(BSF.getUser().indexOf("=") + 1, BSF.getUser().indexOf(",")) + "[" + BSF.getOrganization().substring(BSF.getOrganization().indexOf("=") + 1, BSF.getOrganization().indexOf(",")) + "]");
  }

No comments:

Post a Comment