Package com.centraview.contact.individual

Examples of com.centraview.contact.individual.IndividualPK


    {
      InitialContext ic = new InitialContext();
      IndividualLocalHome home = (IndividualLocalHome)
        ic.lookup("local/Individual");
      IndividualLocal remote =  home.findByPrimaryKey(
        new IndividualPK(individualID, this.dataSource));
      individualVO = remote.getIndividualVOWithBasicReferences();
    } //end of try block
    catch (Exception e)
    {
      //Give empty information
View Full Code Here


      InitialContext ic = CVUtility.getInitialContext();
      IndividualLocalHome home = (IndividualLocalHome)ic.lookup("local/Individual");
      IndividualLocal remote;
      try
      {
        remote = home.findByPrimaryKey(new IndividualPK(this.owner, dataSource));
        this.setOwnerVO(remote.getIndividualVOBasic());
      } catch (FinderException e) {
        logger.debug("[fillAuditDetails] FinderException finding owner ID: "+this.owner);
      } catch (Exception e) {
        logger.error("[fillAuditDetails] Exception thrown.", e);
      }

      try
      {
        remote = home.findByPrimaryKey(new IndividualPK(this.createdBy, dataSource));
        this.setCreatedByVO(remote.getIndividualVOBasic());
      } catch (FinderException e) {
        logger.debug("[fillAuditDetails] FinderException finding creator ID: "+this.createdBy);
      } catch (Exception e) {
        logger.error("[fillAuditDetails] Exception thrown.", e);
      }

      try
      {
        remote = home.findByPrimaryKey(new IndividualPK(this.modifiedBy, dataSource));
        this.setModifiedByVO(remote.getIndividualVOBasic());
      } catch (FinderException e) {
        logger.debug("[fillAuditDetails] FinderException finding ModifiedBy ID: "+this.modifiedBy);
      } catch (Exception e) {
        logger.error("[fillAuditDetails] Exception thrown.", e);
View Full Code Here

        if (hm.get("IndividualID") != null) {
          int intIdTemp = ((Long) hm.get("IndividualID")).intValue();
          try {
            InitialContext ic = CVUtility.getInitialContext();
            IndividualLocalHome home = (IndividualLocalHome) ic.lookup("local/Individual");
            IndividualLocal remote = home.findByPrimaryKey(new IndividualPK(intIdTemp, this.dataSource));
            iv = remote.getIndividualVOWithBasicReferences();
          } catch (Exception e) {
            System.out.println("[Exception][UserEJB.getCustomerUserFull] Exception Thrown: " + e);
            e.printStackTrace();
          }
View Full Code Here

      //for Author
      if (flvo.getAuthorId() > 0) {
        try {
          //InitialContext ic = CVUtility.getInitialContext();
          IndividualLocalHome home = (IndividualLocalHome)ic.lookup("local/Individual");
          IndividualLocal remote = home.findByPrimaryKey(new IndividualPK(flvo.getAuthorId(), this.dataSource));
          flvo.setAuthorVO(remote.getIndividualVOBasic());
        } catch (Exception e) {
          // do nothing if not found
        }
      }

      //for RelateEntity
      if (flvo.getRelateEntity() > 0) {
        try {
          EntityLocalHome home = (EntityLocalHome)ic.lookup("local/Entity");
          EntityLocal remote = home.findByPrimaryKey(new EntityPK(flvo.getRelateEntity(), this.dataSource));
          flvo.setRelateEntityVO(remote.getEntityVOBasic());
        } catch (Exception e) {
          // do nothing if not found
        }
      }

      //for RelateIndividual
      if (flvo.getRelateIndividual() > 0) {
        try {
          IndividualLocalHome home = (IndividualLocalHome)ic.lookup("local/Individual");
          IndividualLocal remote = home.findByPrimaryKey(new IndividualPK(flvo.getRelateIndividual(), this.dataSource));
          flvo.setRelateIndividualVO(remote.getIndividualVOBasic());
        } catch (Exception e) {
          // do nothing if not found
        }
      }
View Full Code Here

    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

      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

      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

    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

        {
          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

        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

TOP

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

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.