Package com.gcrm.domain

Examples of com.gcrm.domain.Opportunity


     * @return the SUCCESS result
     */
    public String unselect() throws ServiceException {
        Account account = null;
        Contact contact = null;
        Opportunity opportunity = null;
        CaseInstance caseInstance = null;
        Set<Document> documents = null;
        if ("Account".equals(this.getRelationKey())) {
            account = accountService.getEntityById(Account.class,
                    Integer.valueOf(this.getRelationValue()));
            documents = account.getDocuments();
        } else if ("Contact".equals(this.getRelationKey())) {
            contact = contactService.getEntityById(Contact.class,
                    Integer.valueOf(this.getRelationValue()));
            documents = contact.getDocuments();
        } else if ("Opportunity".equals(this.getRelationKey())) {
            opportunity = opportunityService.getEntityById(Opportunity.class,
                    Integer.valueOf(this.getRelationValue()));
            documents = opportunity.getDocuments();
        } else if ("CaseInstance".equals(this.getRelationKey())) {
            caseInstance = caseService.getEntityById(CaseInstance.class,
                    Integer.valueOf(this.getRelationValue()));
            documents = caseInstance.getDocuments();
        }
View Full Code Here


     * Selects the entities
     *
     * @return the SUCCESS result
     */
    public String select() throws ServiceException {
        Opportunity opportunity = null;
        TargetList targetList = null;
        Call call = null;
        Meeting meeting = null;
        Document document = null;
        CaseInstance caseInstance = null;
        Set<Contact> contacts = null;

        if ("Opportunity".equals(this.getRelationKey())) {
            opportunity = opportunityService.getEntityById(Opportunity.class,
                    Integer.valueOf(this.getRelationValue()));
            contacts = opportunity.getContacts();
        } else if ("TargetList".equals(this.getRelationKey())) {
            targetList = targetListService.getEntityById(TargetList.class,
                    Integer.valueOf(this.getRelationValue()));
            contacts = targetList.getContacts();
        } else if ("Call".equals(this.getRelationKey())) {
View Full Code Here

     * Unselects the entities
     *
     * @return the SUCCESS result
     */
    public String unselect() throws ServiceException {
        Opportunity opportunity = null;
        TargetList targetList = null;
        Call call = null;
        Meeting meeting = null;
        Document document = null;
        CaseInstance caseInstance = null;
        Set<Contact> contacts = null;
        if ("Opportunity".equals(this.getRelationKey())) {
            opportunity = opportunityService.getEntityById(Opportunity.class,
                    Integer.valueOf(this.getRelationValue()));
            contacts = opportunity.getContacts();
        } else if ("TargetList".equals(this.getRelationKey())) {
            targetList = targetListService.getEntityById(TargetList.class,
                    Integer.valueOf(this.getRelationValue()));
            contacts = targetList.getContacts();
        } else if ("Call".equals(this.getRelationKey())) {
View Full Code Here

                    .getEntityById(Campaign.class, campaignID);
        }
        lead.setCampaign(campaign);

        if ("Opportunity".equals(this.getRelationKey())) {
            Opportunity opportunity = opportunityService
                    .getEntityById(Opportunity.class,
                            Integer.valueOf(this.getRelationValue()));
            Set<Opportunity> opportunities = lead.getOpportunities();
            if (opportunities == null) {
                opportunities = new HashSet<Opportunity>();
View Full Code Here

     *
     * @return the SUCCESS result
     */
    public String select() throws ServiceException {
        Contact contact = null;
        Opportunity opportunity = null;
        TargetList targetList = null;
        Call call = null;
        Meeting meeting = null;
        Set<Lead> leads = null;

        if ("Contact".equals(this.getRelationKey())) {
            contact = contactService.getEntityById(Contact.class,
                    Integer.valueOf(this.getRelationValue()));
            leads = contact.getLeads();
        } else if ("Opportunity".equals(this.getRelationKey())) {
            opportunity = opportunityService.getEntityById(Opportunity.class,
                    Integer.valueOf(this.getRelationValue()));
            leads = opportunity.getLeads();
        } else if ("TargetList".equals(this.getRelationKey())) {
            targetList = targetListService.getEntityById(TargetList.class,
                    Integer.valueOf(this.getRelationValue()));
            leads = targetList.getLeads();
        } else if ("Call".equals(this.getRelationKey())) {
View Full Code Here

     *
     * @return the SUCCESS result
     */
    public String unselect() throws ServiceException {
        Contact contact = null;
        Opportunity opportunity = null;
        TargetList targetList = null;
        Call call = null;
        Meeting meeting = null;
        Set<Lead> leads = null;
        if ("Contact".equals(this.getRelationKey())) {
            contact = contactService.getEntityById(Contact.class,
                    Integer.valueOf(this.getRelationValue()));
            leads = contact.getLeads();
        } else if ("Opportunity".equals(this.getRelationKey())) {
            opportunity = opportunityService.getEntityById(Opportunity.class,
                    Integer.valueOf(this.getRelationValue()));
            leads = opportunity.getLeads();
        } else if ("TargetList".equals(this.getRelationKey())) {
            targetList = targetListService.getEntityById(TargetList.class,
                    Integer.valueOf(this.getRelationValue()));
            leads = targetList.getLeads();
        } else if ("Call".equals(this.getRelationKey())) {
View Full Code Here

            contact.setAssigned_to(lead.getAssigned_to());
            contact.setOwner(lead.getOwner());
            this.getContactService().makePersistent(contact);
        }
        if (opportunityCheck) {
            Opportunity opportunity = new Opportunity();
            String firstName = CommonUtil.fromNullToEmpty(lead.getFirst_name());
            String lastName = CommonUtil.fromNullToEmpty(lead.getLast_name());
            opportunity.setName(firstName + " " + lastName);
            opportunity.setCampaign(lead.getCampaign());
            opportunity.setAssigned_to(lead.getAssigned_to());
            opportunity.setOwner(lead.getOwner());
            this.getOpportunityService().makePersistent(opportunity);
        }
        LeadStatus status = this.getLeadStatusService().findByValue(
                LeadStatus.class.getSimpleName(), "Converted");
        lead.setStatus(status);
View Full Code Here

TOP

Related Classes of com.gcrm.domain.Opportunity

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.