Package com.centraview.contact.individual

Examples of com.centraview.contact.individual.IndividualVO


              remote.deleteMOC(mocID, entId, modBy, false); // don't update
            }
          }
        } // end if (mocVOs != null)

        IndividualVO newInd = this.envo.getIndividualVO();
     
        if (newInd != null) {
          if (newInd.getContactID() == 0) {
            // if the ID is zero there wasn't a primary contact for this entity, so create one.
            IndividualLocalHome ih = (IndividualLocalHome)ic.lookup("local/Individual");
            newInd.setEntityID(entId);
            ih.create(newInd, modBy, this.dataSource);
          } else {
            // otherwise the changePrimaryContact method does a bunch of stuff.
            this.changePrimaryContact();
          }
View Full Code Here


    // if yes, then update with isPrimary = "YES"
    // if no, then inser new with IsPrimary = True
    try
    {
      InitialContext ic = CVUtility.getInitialContext();
      IndividualVO newIndividualVO = this.envo.getIndividualVO();
      IndividualVO oldIndividualVO = this.oldEntityVO.getIndividualVO();

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

      if (newIndividualVO.getContactID() != oldIndividualVO.getContactID())
      {
        // 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);
View Full Code Here

TOP

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

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.