Package com.centraview.contact.helper

Examples of com.centraview.contact.helper.MethodOfContactVO


        this.setIndividualVO(individualVO);
      }

      // Methods Of Contact
      if (CVUtility.updateFieldPermitted(entityRights, "contactmethod")) {
        MethodOfContactVO workingVO = null;
        HashMap currentMocVOs = new HashMap();
        Vector mocVector = this.getMOC();
        for (int i = 0; i < mocVector.size(); i++) {
          MethodOfContactVO current = (MethodOfContactVO) mocVector.get(i);
          currentMocVOs.put(new Integer(current.getMocID()), current);
        }
        int formMocId1 = (dynaForm.get("mocId1") == null || dynaForm.get("mocId1").equals("")) ? -1 : Integer.parseInt((String)dynaForm.get("mocId1"));
        int formMocId2 = (dynaForm.get("mocId2") == null || dynaForm.get("mocId2").equals("")) ? -1 : Integer.parseInt((String)dynaForm.get("mocId2"));
        int formMocId3 = (dynaForm.get("mocId3") == null || dynaForm.get("mocId3").equals("")) ? -1 : Integer.parseInt((String)dynaForm.get("mocId3"));
        int formMocId4 = (dynaForm.get("emailId") == null || dynaForm.get("emailId").equals("")) ? -1 : Integer.parseInt((String)dynaForm.get("emailId"));
View Full Code Here


      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();
View Full Code Here

      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();
View Full Code Here

    return avo;
  }   // end getAddress() method

  public MethodOfContactVO getMOC(int mocId)
  {
    MethodOfContactVO mvo = null;

    try
    {
      InitialContext ic = CVUtility.getInitialContext();
      ContactHelperLocalHome home = (ContactHelperLocalHome)ic.lookup("local/ContactHelper");
View Full Code Here

      // Getting MethodOfContactVO List from Individual Object
      Collection mocList = individualDetail.getMOC();
      Iterator it = mocList.iterator();
      int counter = 0;
      MethodOfContactVO mocVO = null;
      while (it.hasNext()) {
        mocVO = (MethodOfContactVO)it.next();
        // Count all the Mobile and Phone type MOCs that were manually added.
        // If there were none, try to inheirit copies of them from the parent
        // entity.
        if (mocVO.getIsPrimary().equals("YES")) {
          counter++;
        }

        // We are passing the Extra boolean value to the method. if the boolean
        // value is false then we wil not update the individual table
        remote.addMOC(mocVO, individualID, 2, userID, false); // Hardcoded for
                                                              // Individual
                                                              // ContactType
      }

      // if counter < 1 then there were no phone or mobile numbers entered for
      // this individual. So we should try and suck down copies of the Entities.
      if (counter < 1) {
        Collection col = remote.getAllMOCForContact(userID, individualDetail.getEntityID(), 1);
        if (col != null) {
          Iterator mocIter = col.iterator();
          while (mocIter.hasNext()) {
            mocVO = (MethodOfContactVO)mocIter.next();
            // we ussed to only copy "Main" and "Fax" types, but per Alan's
            // request this has been changed. Please see bug #88. I have
            // changed this to copy ALL MOC's.
            if (mocVO.getIsPrimary().equals("YES")) {
              remote.addMOC(mocVO, individualID, 2, userID, false);   // false means don't update the modified timestamp of individual record
            }
          }
        }
      }
View Full Code Here

            remote.updateAddress(this.indVo.getPrimaryAddress(), indVo.getContactID(), indVo.getModifiedBy(), false);
          }
        }
        Iterator mi = this.indVo.getMOC().iterator();
        while (mi.hasNext()) {
          MethodOfContactVO mocObj = (MethodOfContactVO)mi.next();
          int mocID = mocObj.getMocID();
          if (mocObj.isAdded()) {
            //We are passing the Extra boolean value to the method. if the
            // boolean value is false then we wil not update the individual
            // table
            remote.addMOC(mocObj, indVo.getContactID(), cntType, indVo.getModifiedBy(), false);
          } else if (mocObj.isUpdated()) {
            // We are passing the Extra boolean value to the method. if the
            // boolean value is false then we wil not update the individual
            // table
            remote.updateMOC(mocObj, indVo.getContactID(), indVo.getModifiedBy(), false);
          } else if (mocObj.isDelete()) {
            // We are passing the Extra boolean value to the method. if the
            // boolean value is false then we wil not update the individual
            // table
            remote.deleteMOC(mocID, indVo.getContactID(), indVo.getModifiedBy(), false);
          }
View Full Code Here

        Collection mocVOs = this.envo.getMOC();
        if (mocVOs != null) {
          Iterator mi = this.envo.getMOC().iterator();
          while (mi.hasNext()) {
            MethodOfContactVO mocObj = (MethodOfContactVO)mi.next();
            int mocID = mocObj.getMocID();
            if (mocObj.isAdded()) {
              // The boolean value false tells the ContactHelperEJB to NOT
              // update the 'entity.Modified' field, since we are already
              // updating that record at this time.
              remote.addMOC(mocObj, entId, cntType, modBy, false);
            } else if (mocObj.isUpdated()) {
              remote.updateMOC(mocObj, entId, modBy, false); // don't update
            } else if (mocObj.isDelete()) {
              remote.deleteMOC(mocID, entId, modBy, false); // don't update
            }
          }
        } // end if (mocVOs != null)
View Full Code Here

        }

        // All Method od Contact is to deleted.
        Iterator mi = this.indVo.getMOC().iterator();
        while (mi.hasNext()) {
          MethodOfContactVO mocVO = (MethodOfContactVO)mi.next();
          // We are passing the Extra boolean value to the method. if the
          // boolean value is false then we wil not update the individual table
          remote.deleteMOC(mocVO.getMocID(), this.indVo.getContactID(), this.operationIndividualId, false);
        }
        //ALLSQL.put("contact.deleteindividual", "delete from individual where
        // individualID = ? ");

        //Delete Custom Field
View Full Code Here

      // All Method of Contact is to deleted.
      Iterator mi = this.envo.getMOC().iterator();
      while (mi.hasNext())
      {
        MethodOfContactVO mocVO = (MethodOfContactVO)mi.next();
        // The boolean value false tells the ContactHelperEJB to NOT
        // update the 'entity.Modified' field, since we are already
        // updating that record at this time.
        remote.deleteMOC(mocVO.getMocID(), this.envo.getContactID(), 1, false);
      }


      dl.setSqlQuery("SELECT IndividualID AS id FROM individual WHERE individual.Entity = ?");
      dl.setInt(1,this.envo.getContactID());
View Full Code Here

        Integer addressId = (dynaForm.get("addressId") == null) ? new Integer(-1) : (Integer)dynaForm.get("addressId");
        primaryAddress.setAddressID(addressId.intValue());
        this.setPrimaryAddress(primaryAddress);
      }
      if (CVUtility.updateFieldPermitted(individualFieldRights, "contactmethod")) {
        MethodOfContactVO workingVO = null;
        HashMap currentMocVOs = new HashMap();
        Vector mocVector = this.getMOC();
        for (int i = 0; i < mocVector.size(); i++) {
          MethodOfContactVO current = (MethodOfContactVO)mocVector.get(i);
          currentMocVOs.put(new Integer(current.getMocID()), current);
        }
        int formMocId1 = (dynaForm.get("mocId1") == null || dynaForm.get("mocId1").equals("")) ? -1 : Integer.parseInt((String)dynaForm.get("mocId1"));
        int formMocId2 = (dynaForm.get("mocId2") == null || dynaForm.get("mocId2").equals("")) ? -1 : Integer.parseInt((String)dynaForm.get("mocId2"));
        int formMocId3 = (dynaForm.get("mocId3") == null || dynaForm.get("mocId3").equals("")) ? -1 : Integer.parseInt((String)dynaForm.get("mocId3"));
        int formMocId4 = (dynaForm.get("emailId") == null || dynaForm.get("emailId").equals("")) ? -1 : Integer.parseInt((String)dynaForm.get("emailId"));
View Full Code Here

TOP

Related Classes of com.centraview.contact.helper.MethodOfContactVO

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.