Package com.centraview.contact.individual

Examples of com.centraview.contact.individual.IndividualLocal


      } // end if (envo.getCreatedBy() != 0)

      IndividualLocalHome ih = (IndividualLocalHome)ic.lookup("local/Individual");

      try {
        IndividualLocal il = ih.findByPrimaryContact(cntId, this.dataSource);
        IndividualVO iv = il.getIndividualVOBasic();
        this.envo.setIndividualVO(iv);
      }catch(FinderException e){
        IndividualVO iv = new IndividualVO();
        iv.setEntityID(this.envo.getContactID());
        this.envo.setIndividualVO(iv);
      }

      if (this.envo.getAccManager() != 0) {
        try {
          IndividualLocal ilAccMang = ih.findByPrimaryKey(new IndividualPK(envo.getAccManager(), this.dataSource));
          IndividualVO indAccMang =   ilAccMang.getIndividualVOBasic();
          this.envo.setAcctMgrName(indAccMang.getFirstName()+" "+indAccMang.getLastName());
        }catch(Exception e){
          logger.error("[getEntityVOWithBasicReferences] Exception thrown.", e);
          this.envo.setAcctMgrName("");
        }
View Full Code Here


      IndividualLocalHome homeIndividual = (IndividualLocalHome)ic.lookup("local/Individual");

      while (iter.hasNext())
      {
        HashMap customField = (HashMap) iter.next();
        IndividualLocal il = homeIndividual.findByPrimaryKey( new IndividualPK(Integer.parseInt(customField.get("id").toString()),this.dataSource));
        il.remove();
      }

      //Delete Custom Field
      dl.setSql("contact.deletecustomfieldscalar");
      dl.setString(1,"Entity");
View Full Code Here

      {
        // the primary contact was changed. so ...
        try
        {
          // set the old guy to not be the primary contact
          IndividualLocal oldIndividualEntityBean = ih.findByPrimaryKey(new IndividualPK(oldIndividualVO.getContactID(), this.dataSource));
          oldIndividualVO.setIsPrimaryContact("NO");
          oldIndividualEntityBean.setIndividualVO(oldIndividualVO);
        } catch (FinderException fe) {
          logger.info("[changePrimaryContact] old primary contact: "+oldIndividualVO.getContactID()+", not found.");
        }
        // set the the new one to be the primary contact
        IndividualLocal newIndividualEntityBean = ih.findByPrimaryKey(new IndividualPK(newIndividualVO.getContactID(), this.dataSource));
        newIndividualVO.setIsPrimaryContact("YES");
        newIndividualEntityBean.setIndividualVO(newIndividualVO);
      } else {
        // The selected primary contact is the same as the previous primary contact, just
        // need to set it as primary.
        IndividualLocal individualEntityBean = ih.findByPrimaryKey(new IndividualPK(newIndividualVO.getContactID(), this.dataSource));
        newIndividualVO.setIsPrimaryContact("YES");
        individualEntityBean.setIndividualVO(newIndividualVO);
      }
    } catch(Exception e) {
      logger.error("[changePrimaryContact] Exception thrown.", e);
    }
  }   // end changePrimaryContact() method
View Full Code Here

TOP

Related Classes of com.centraview.contact.individual.IndividualLocal

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.