Examples of OpportunityLocalHome


Examples of com.centraview.sale.opportunity.OpportunityLocalHome

                  logger.error("[Exception] ActivityHelperEJB.getActivityLink: ", e);
                }
                break;
              case ActivityVO.ACTIVITY_LINK_OPPORTUNITY : // Opportunity - from module table
                try {
                  OpportunityLocalHome home = (OpportunityLocalHome)ic.lookup("local/Opportunity");
                  OpportunityLocal local = home.create();
                  local.setDataSource(this.dataSource);
                  String opportunityName = local.getOpportunityName(linkId);
                  app.setRelatedFieldID(linkId);
                  app.setRelatedFieldValue(opportunityName);
                  app.setRelatedTypeID(ActivityVO.ACTIVITY_LINK_OPPORTUNITY);
                  app.setRelatedTypeValue("Opportunity");
                } catch (Exception e) {
                  logger.error("[Exception] ActivityHelperEJB.getActivityLink: ", e);
                }
                break;
              case ActivityVO.ACTIVITY_LINK_PROJECT : // Projects - from module table
                try {
                  ProjectLocalHome home = (ProjectLocalHome)ic.lookup("local/Project");
                  ProjectLocal remote = (ProjectLocal)home.create();
                  remote.setDataSource(this.dataSource);
                  String projectTitle = remote.getProjectName(linkId);
                  app.setRelatedFieldID(linkId);
                  app.setRelatedFieldValue(projectTitle);
                  app.setRelatedTypeID(ActivityVO.ACTIVITY_LINK_PROJECT);
View Full Code Here

Examples of com.centraview.sale.opportunity.OpportunityLocalHome

      // Update the Opportunity to reflect any changes.
      if ((oldIncludeFlag != newIncludeFlag) || newIncludeFlag) {
        // get EJB to Opportunity
        int opportunityID = Integer.parseInt(proposalForm.getOpportunityid());
        InitialContext ic = CVUtility.getInitialContext();
        OpportunityLocalHome home = (OpportunityLocalHome)ic.lookup("local/Opportunity");
        OpportunityLocal local = home.create();
        local.setDataSource(this.dataSource);
        float opportunityTotal = local.updateTotalAmount(opportunityID);
        local.updateForcastAmount(opportunityTotal, opportunityID);
        // do the update
      }
View Full Code Here

Examples of com.centraview.sale.opportunity.OpportunityLocalHome

          switch (recordType)
          {
            case 30: // Opportunity - from module table
              try
              {
                OpportunityLocalHome home = (OpportunityLocalHome)ic.lookup("local/Opportunity");
                OpportunityLocal local = home.create();
                local.setDataSource(this.dataSource);
                String opportunityName = local.getOpportunityName(linkId);
                flvo.setRelatedFieldID(linkId);
                flvo.setRelatedFieldValue(opportunityName);
                flvo.setRelatedTypeID(30);
                flvo.setRelatedTypeValue("Opportunity");
              } catch (Exception e) {
                logger.error("[getFileLink] Exception thrown.", e);
                //do nothing
              }
              break;
            case 31: // Proposal - from module table
              try
              {
                ProposalHome home = (ProposalHome)ic.lookup("local/Proposal");
                ProposalLocal remote =  home.create();
                remote.setDataSource(this.dataSource);
                String proposalTitle = remote.getProposalName(linkId);
                flvo.setRelatedFieldID(linkId);
                flvo.setRelatedFieldValue(proposalTitle);
                flvo.setRelatedTypeID(31);
                flvo.setRelatedTypeValue("Project");
              } catch (Exception e) {
                logger.error("[getFileLink] Exception thrown.", e);
              } //end of catch block (Exception)
              break;

            case 36: // Projects - from module table
              try
              {
                ProjectLocalHome home = (ProjectLocalHome)ic.lookup("local/Project");
                ProjectLocal remote = home.create();
                remote.setDataSource(this.dataSource);
                String projectTitle = remote.getProjectName(linkId);
                flvo.setRelatedFieldID(linkId);
                flvo.setRelatedFieldValue(projectTitle);
                flvo.setRelatedTypeID(36);
                flvo.setRelatedTypeValue("Project");
              } catch (Exception e) {
                logger.error("[getFileLink] Exception thrown.", e);
              } //end of catch block (Exception)
              break;
            case 39: // Ticket - from module table
              try
              {
                TicketLocalHome home = (TicketLocalHome)ic.lookup("local/Ticket");
                TicketLocal remote = home.create();
                remote.setDataSource(this.dataSource);
                String ticketSubject = remote.getTicketName(linkId);
                flvo.setRelatedFieldID(linkId);
                flvo.setRelatedFieldValue(ticketSubject);
                flvo.setRelatedTypeID(39);
View Full Code Here

Examples of com.centraview.sale.opportunity.OpportunityLocalHome

    int result = 0;
    try {

      // System.out.println("deleteOpportunity---1");
      InitialContext ic = CVUtility.getInitialContext();
      OpportunityLocalHome home = (OpportunityLocalHome)ic.lookup("local/Opportunity");
      OpportunityLocal local = home.create();
      local.setDataSource(this.dataSource);
      result = local.deleteOpportunity(userid, elementid);
    } catch (CreateException ce) {
      throw new EJBException(ce);
    } catch (NamingException re) {
View Full Code Here

Examples of com.centraview.sale.opportunity.OpportunityLocalHome

    int rowID = 0;

    try {
      InitialContext ic = CVUtility.getInitialContext();
      OpportunityLocalHome home = (OpportunityLocalHome)ic.lookup("local/Opportunity");
      OpportunityLocal remote = home.create();
      remote.setDataSource(this.dataSource);
      ctx.getUserTransaction().begin();
      rowID = remote.addOpportunity(userId, oVO);
      ctx.getUserTransaction().commit();
    } catch (Exception e) {
View Full Code Here

Examples of com.centraview.sale.opportunity.OpportunityLocalHome

        ModuleFieldRightMatrix.UPDATE_RIGHT, this.dataSource))
      throw new AuthorizationFailedException("Opportunities - updateOpportunity");

    try {
      InitialContext ic = CVUtility.getInitialContext();
      OpportunityLocalHome home = (OpportunityLocalHome)ic.lookup("local/Opportunity");
      OpportunityLocal remote = home.create();
      remote.setDataSource(this.dataSource);
      ctx.getUserTransaction().begin();
      remote.updateOpportunity(userId, oVO);
      ctx.getUserTransaction().commit();
View Full Code Here

Examples of com.centraview.sale.opportunity.OpportunityLocalHome

  public HashMap getOpportunityRelatedInfo(int userId, int opportunityId)
  {
    HashMap opportunityRelatedInfo = new HashMap();
    try {
      InitialContext ic = CVUtility.getInitialContext();
      OpportunityLocalHome home = (OpportunityLocalHome)ic.lookup("local/Opportunity");
      OpportunityLocal remote = home.create();
      remote.setDataSource(this.dataSource);
      opportunityRelatedInfo = remote.getOpportunityRelatedInfo(userId, opportunityId);
    } catch (Exception e) {
      System.out.println("Failed in SaleFacade geting Opportunity Related Info");
      e.printStackTrace();
View Full Code Here

Examples of com.centraview.sale.opportunity.OpportunityLocalHome

  public String getOpportunityID(int activityId)
  {
    String opportunityID = "0";
    try {
      InitialContext ic = CVUtility.getInitialContext();
      OpportunityLocalHome home = (OpportunityLocalHome)ic.lookup("local/Opportunity");
      OpportunityLocal remote = home.create();
      remote.setDataSource(this.dataSource);
      opportunityID = remote.getOpportunityID(activityId);
    } catch (Exception e) {
      System.out.println("Failed in SaleFacade geting Opportunity ID when we pass ActivityID ");
      e.printStackTrace();
View Full Code Here

Examples of com.centraview.sale.opportunity.OpportunityLocalHome

      throw new AuthorizationFailedException("Opportunities - getOpportunity");

    OpportunityVO oVO = null;
    try {
      InitialContext ic = CVUtility.getInitialContext();
      OpportunityLocalHome home = (OpportunityLocalHome)ic.lookup("local/Opportunity");
      OpportunityLocal remote = home.create();
      remote.setDataSource(this.dataSource);
      oVO = remote.getOpportunity(userId, opportunityId);

    } catch (Exception e) {
      System.out.println("Failed in SaleFacade geting Opportunity");
View Full Code Here

Examples of com.centraview.sale.opportunity.OpportunityLocalHome

  public String getOpportunityName(int OpportunityID)
  {
    String opportunityName = "";
    try {
      InitialContext ic = CVUtility.getInitialContext();
      OpportunityLocalHome home = (OpportunityLocalHome)ic.lookup("local/Opportunity");
      OpportunityLocal local = home.create();
      local.setDataSource(this.dataSource);
      opportunityName = local.getOpportunityName(OpportunityID);
    } catch (Exception exe) {
      exe.printStackTrace();
    }
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.