Package com.centraview.cvattic

Examples of com.centraview.cvattic.CvAtticLocal


    int transID = 0;
    try
    {
      InitialContext ctx = CVUtility.getInitialContext();
      CvAtticLocalHome home = (CvAtticLocalHome)ctx.lookup("local/CvAttic");
      CvAtticLocal remote = home.create();
      remote.setDataSource(this.dataSource);
      transID = remote.getAtticTransactionID(indvID, dumpType, hm);
    }catch (Exception e){
      System.out.println("Error in sendToAttic(int) Method of Projects " + e);
      e.printStackTrace();
    }
    return transID;
View Full Code Here


  {
    try
    {
      InitialContext ctx = CVUtility.getInitialContext();
      CvAtticLocalHome home = (CvAtticLocalHome)ctx.lookup("local/CvAttic");
      CvAtticLocal remote = home.create();
      remote.setDataSource(this.dataSource);
      remote.dumpData(indvID, transactionID, recordType, primaryMembers);
    }catch (Exception e){
      System.out.println("Error in sendToAttic Method of Projects " + e);
      e.printStackTrace();
    }
  }
View Full Code Here

  private void sendToAttic(int userID, int transactionID, String recordType, HashMap primaryMembers)
  {
    try {
      InitialContext ctx = CVUtility.getInitialContext();
      CvAtticLocalHome home = (CvAtticLocalHome)ctx.lookup("local/CvAttic");
      CvAtticLocal remote = home.create();
      remote.setDataSource(this.dataSource);
      remote.dumpData(userID, transactionID, recordType, primaryMembers);
    } catch (Exception e) {
      logger.error("[sendToAttic] Exception thrown.", e);
    }
  }
View Full Code Here

    try {

      InitialContext ctx = CVUtility.getInitialContext();
      CvAtticLocalHome home = (CvAtticLocalHome)ctx.lookup("local/CvAttic");

      CvAtticLocal remote = home.create();
      remote.setDataSource(this.dataSource);

      transID = remote.getAtticTransactionID(userID, dumpType, hm);
    } catch (Exception e) {
      logger.error("[getAtticTransactionID] Exception thrown.", e);
    }
    return transID;
  }
View Full Code Here

  {
    try {
      InitialContext ctx = CVUtility.getInitialContext();
      CvAtticLocalHome home = (CvAtticLocalHome) ctx.lookup("local/CvAttic");

      CvAtticLocal remote = home.create();
      remote.setDataSource(this.dataSource);

      int transID = remote.getAtticTransactionID(userID, dumpType, hmDetails);

      if (transID > 0) {
        remote.dumpData(userID, transID, recordType, primaryMembers);
      }
    } catch (Exception e) {
      logger.error("[sendToAttic]: Exception", e);
    }
  } // end sendToAttic(int,String,HashMap,HashMap,String) method
View Full Code Here

      hmDetails.put("recordtype",new Integer(1));

      InitialContext ctxl=CVUtility.getInitialContext();
      CvAtticLocalHome cahome=(CvAtticLocalHome)ctxl.lookup("local/CvAttic");

      CvAtticLocal caremote =cahome.create();
      caremote.setDataSource(this.dataSource);

      int transactionID=caremote.getAtticTransactionID(individualID,Constants.CV_GARBAGE,hmDetails);

      HashMap hmentity=new HashMap();
      hmentity.put("EntityID",(new Integer(ev.getContactID())).toString());
      caremote.dumpData(individualID,transactionID,"entity",hmentity);

      AddressVO adv = ev.getPrimaryAddress();

      if (adv != null)
      {
        HashMap hmaddr=new HashMap();
        hmaddr.put("AddressID",(new Integer(adv.getAddressID())).toString());
        caremote.dumpData(individualID,transactionID,"address",hmaddr);
      }

      Vector vec = ev.getCustomField();

      if (vec != null)
      {
        Iterator it = vec.iterator();
        while (it.hasNext())
        {
          CustomFieldVO cfv = (CustomFieldVO)it.next();
          String cftablename = "customfieldscalar";
          if (cfv.getFieldType() == CustomFieldVO.MULTIPLE)
          {
            cftablename = "customfieldmultiple";
          }

          HashMap hmcfv=new HashMap();
          hmcfv.put("CustomFieldID", (new Integer(cfv.getFieldID())).toString());
          caremote.dumpData(individualID, transactionID, cftablename, hmcfv);
        }
      }

      Vector mocvec = ev.getMOC();
      if (mocvec != null)
      {
        Iterator it = mocvec.iterator();
        while (it.hasNext())
        {
          MethodOfContactVO mocv = (MethodOfContactVO)it.next();

          HashMap hmmocr=new HashMap();
          hmmocr.put("MOCID",(new Integer(mocv.getMocID())).toString());
          hmmocr.put("ContactType",(new Integer(1)).toString());
          hmmocr.put("ContactID",(new Integer(entityId)).toString());
          caremote.dumpData(individualID,transactionID,"mocrelate",hmmocr);

          HashMap hmmoc=new HashMap();
          hmmoc.put("methodofcontact",(new Integer(mocv.getMocID())).toString());
          caremote.dumpData(individualID,transactionID,"methodofcontact",hmmoc);
        }
      }

      ctx.getUserTransaction().begin();
      remote.remove();
View Full Code Here

      hmDetails.put("recordtype",new Integer(2));

      InitialContext ctxl=CVUtility.getInitialContext();
      CvAtticLocalHome cahome=(CvAtticLocalHome)ctxl.lookup("local/CvAttic");

      CvAtticLocal caremote =cahome.create();
      caremote.setDataSource(this.dataSource);

      int transactionID=caremote.getAtticTransactionID(indID,Constants.CV_GARBAGE,hmDetails);

      HashMap hmind=new HashMap();
      hmind.put("IndividualID",(new Integer(indVO.getContactID())).toString());
      caremote.dumpData(indID,transactionID,"individual",hmind);

      AddressVO adv = indVO.getPrimaryAddress();
      if (adv != null)
      {
        HashMap hmaddr=new HashMap();
        hmaddr.put("AddressID",(new Integer(adv.getAddressID())).toString());
        caremote.dumpData(indID,transactionID,"address",hmaddr);

        HashMap addressRelateHashMap = new HashMap();
        addressRelateHashMap.put("Address",(new Integer(adv.getAddressID())).toString());
        caremote.dumpData(indID,transactionID,"addressrelate", addressRelateHashMap);
      }

      Vector mocvec = indVO.getMOC();
      if (mocvec != null)
      {
        Iterator it = mocvec.iterator();
        while (it.hasNext())
        {
          MethodOfContactVO mocv = (MethodOfContactVO)it.next();

          HashMap hmmocr=new HashMap();
          hmmocr.put("MOCID",(new Integer(mocv.getMocID())).toString());
          hmmocr.put("ContactType",(new Integer(2)).toString());
          hmmocr.put("ContactID",(new Integer(individualId)).toString());
          caremote.dumpData(indID, transactionID, "mocrelate", hmmocr);

          HashMap hmmoc=new HashMap();
          hmmoc.put("MOCID",(new Integer(mocv.getMocID())).toString());
          hmmoc.put("MOCType", Integer.toString(mocv.getMocType()));
          caremote.dumpData(indID, transactionID, "methodofcontact", hmmoc);
        }
      }

      Vector vec = indVO.getCustomField();
      if (vec != null)
      {
        Iterator it = vec.iterator();
        while (it.hasNext())
        {
          CustomFieldVO cfv = (CustomFieldVO)it.next();
          String cftablename = "customfieldscalar";
          if (cfv.getFieldType() == CustomFieldVO.MULTIPLE)
          {
            cftablename = "customfieldmultiple";
          }

          HashMap hmcfv=new HashMap();
          hmcfv.put("CustomFieldID",(new Integer(cfv.getFieldID())).toString());
          caremote.dumpData(indID,transactionID,cftablename,hmcfv);
        }
      }
      remote.setOperationIndividualId(individualId);

      ctx.getUserTransaction().begin();
View Full Code Here

TOP

Related Classes of com.centraview.cvattic.CvAtticLocal

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.