Examples of findByPrimaryKey()


Examples of com.centraview.contact.individual.IndividualLocalHome.findByPrimaryKey()

    IndividualVO iv = null;
    try
    {
      InitialContext ic = CVUtility.getInitialContext();
      IndividualLocalHome home = (IndividualLocalHome)ic.lookup("local/Individual");
      IndividualLocal remote =  home.findByPrimaryKey(new IndividualPK(indId,this.dataSource));
      // the ejbLoad will take care of setting the dataSource on a findByPrimaryKey.
      iv = remote.getIndividualVOWithBasicReferences();
      CommonHelperLocalHome chhome= (CommonHelperLocalHome)ic.lookup("local/CommonHelper");
      CommonHelperLocal commonhelper= chhome.create();
      // we need to explicitly set the dataSource on a stateless session bean.
View Full Code Here

Examples of com.centraview.contact.individual.IndividualLocalHome.findByPrimaryKey()

      throw new AuthorizationFailedException("[ContactFacadeEJB] updateIndividual() - canPerformRecordOperation() failed for individualID = " + individualID);
    }
    try {
      InitialContext ic = CVUtility.getInitialContext();
      IndividualLocalHome home = (IndividualLocalHome)ic.lookup("local/Individual");
      IndividualLocal remote = home.findByPrimaryKey(new IndividualPK(individualDet.getContactID(), this.dataSource));
      ctx.getUserTransaction().begin();
      remote.setIndividualVO(individualDet);
      ctx.getUserTransaction().commit();
      HashMap historyInfo = new HashMap();
      historyInfo.put("recordID", new Integer(individualDet.getContactID()));
View Full Code Here

Examples of com.centraview.contact.individual.IndividualLocalHome.findByPrimaryKey()

      throw new AuthorizationFailedException("Individual - deleteIndividual");
    }
    try{
      InitialContext ic = CVUtility.getInitialContext();
      IndividualLocalHome home = (IndividualLocalHome)ic.lookup("local/Individual");
      IndividualLocal remote =  home.findByPrimaryKey(new IndividualPK(individualId,this.dataSource));

      IndividualVO indVO = remote.getIndividualVOWithBasicReferences();

      HashMap hmDetails=new HashMap();
      hmDetails.put("title",indVO.getFirstName() + " " + indVO.getLastName());
View Full Code Here

Examples of com.centraview.contact.individual.IndividualLocalHome.findByPrimaryKey()

    HashMap hm=new HashMap();
    try
    {
      InitialContext ic = CVUtility.getInitialContext();
      IndividualLocalHome home = (IndividualLocalHome)ic.lookup("local/Individual");
      IndividualLocal remote =  home.findByPrimaryKey(new IndividualPK(indId,this.dataSource));
      hm = remote.getCustomerIndividualVOWithBasicReferences();
    }catch(Exception e){
      System.out.println("Failed in the ContactFacadewhile getting Individual ");
      //e.printStackTrace();
    }
View Full Code Here

Examples of com.centraview.contact.individual.IndividualLocalHome.findByPrimaryKey()

        {
          HashMap individualList = (HashMap)iter.next();
          if (individualList != null)
          {
            int individualId = ((Number)individualList.get("EntityID")).intValue();
            IndividualLocal remote =  home.findByPrimaryKey(new IndividualPK(individualId,this.dataSource));
            ctx.getUserTransaction().begin();
            remote.remove();
            ctx.getUserTransaction().commit();
          }
        }
View Full Code Here

Examples of com.centraview.contact.individual.IndividualLocalHome.findByPrimaryKey()

        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

Examples of com.centraview.contact.individual.IndividualLocalHome.findByPrimaryKey()

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

Examples of com.centraview.contact.individual.IndividualLocalHome.findByPrimaryKey()

      {
        // 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.");
        }
View Full Code Here

Examples of com.centraview.contact.individual.IndividualLocalHome.findByPrimaryKey()

          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.
View Full Code Here

Examples of com.centraview.contact.individual.IndividualLocalHome.findByPrimaryKey()

        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);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.