Package org.jallinone.accounting.accountingmotives.java

Examples of org.jallinone.accounting.accountingmotives.java.AccountingMotiveVO


   */
  public VOListResponse insertAccountingMotives(ArrayList rows,String serverLanguageId,String username,String defCompanyCodeSys01SYS03,ArrayList customizedFields) throws Throwable {
    Connection conn = null;
    try {
      if (this.conn==null) conn = getConn(); else conn = this.conn;
      AccountingMotiveVO vo = null;
      Response res = null;

      Map attribute2dbField = new HashMap();
      attribute2dbField.put("accountingMotiveCodeACC03","ACCOUNTING_MOTIVE_CODE");
      attribute2dbField.put("progressiveSys10ACC03","PROGRESSIVE_SYS10");
      attribute2dbField.put("enabledACC03","ENABLED");
      attribute2dbField.put("canDelACC03","CAN_DEL");
      BigDecimal progressiveSYS10 = null;

      for(int i=0;i<rows.size();i++) {
        vo = (AccountingMotiveVO)rows.get(i);
        vo.setEnabledACC03("Y");

        // insert record in SYS10...
        progressiveSYS10 = TranslationUtils.insertTranslations(vo.getDescriptionSYS10(),username,conn);
        vo.setProgressiveSys10ACC03(progressiveSYS10);

         // insert into ACC03...
        res = CustomizeQueryUtil.insertTable(
            conn,
            new UserSessionParameters(username),
View Full Code Here


   */
  public VOListResponse updateAccountingMotives(ArrayList oldVOs,ArrayList newVOs,String serverLanguageId,String username,ArrayList customizedFields) throws Throwable {
    Connection conn = null;
    try {
      if (this.conn==null) conn = getConn(); else conn = this.conn;
      AccountingMotiveVO oldVO = null;
      AccountingMotiveVO newVO = null;
      Response res = null;

      for(int i=0;i<oldVOs.size();i++) {
        oldVO = (AccountingMotiveVO)oldVOs.get(i);
        newVO = (AccountingMotiveVO)newVOs.get(i);

        // update SYS10 table...
        TranslationUtils.updateTranslation(oldVO.getDescriptionSYS10(),newVO.getDescriptionSYS10(),newVO.getProgressiveSys10ACC03(),serverLanguageId,username,conn);

        HashSet pkAttrs = new HashSet();
        pkAttrs.add("accountingMotiveCodeACC03");

        HashMap attribute2dbField = new HashMap();
View Full Code Here

  public VOResponse deleteAccountingMotives(ArrayList list,String serverLanguageId,String username) throws Throwable {
    PreparedStatement pstmt = null;
    Connection conn = null;
    try {
      if (this.conn==null) conn = getConn(); else conn = this.conn;
      AccountingMotiveVO vo = null;
      for(int i=0;i<list.size();i++) {
        // logically delete the record in ACC03...
        vo = (AccountingMotiveVO)list.get(i);
        pstmt = conn.prepareCall("update ACC03_ACCOUNTING_MOTIVES set ENABLED='N',LAST_UPDATE_USER=?,LAST_UPDATE_DATE=?  where ACCOUNTING_MOTIVE_CODE='"+vo.getAccountingMotiveCodeACC03()+"'");
        pstmt.setString(1,username);
        pstmt.setTimestamp(2,new java.sql.Timestamp(System.currentTimeMillis()));
        pstmt.execute();
        pstmt.close();
      }
View Full Code Here

TOP

Related Classes of org.jallinone.accounting.accountingmotives.java.AccountingMotiveVO

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.