Package com.gcrm.domain

Examples of com.gcrm.domain.Contact


            expect_close_date = dateFormat.parse(expectCloseDate);
        }
        opportunity.setExpect_close_date(expect_close_date);

        if ("Contact".equals(this.getRelationKey())) {
            Contact contact = contactService.getEntityById(Contact.class,
                    Integer.valueOf(this.getRelationValue()));
            Set<Contact> contacts = opportunity.getContacts();
            if (contacts == null) {
                contacts = new HashSet<Contact>();
            }
View Full Code Here


        String assignedTo = null;
        while (tasks.hasNext()) {
            Task instance = tasks.next();
            int id = instance.getId();
            String subject = instance.getSubject();
            Contact contact = instance.getContact();
            if (contact != null) {
                contactName = contact.getFirst_name() + " "
                        + contact.getLast_name();
            } else {
                contactName = "";
            }
            String relatedObject = CommonUtil.fromNullToEmpty(instance
                    .getRelated_object());
View Full Code Here

                    String contactID = row
                            .get(getText("entity.contact_id.label"));
                    if (CommonUtil.isNullOrEmpty(contactID)) {
                        task.setContact(null);
                    } else {
                        Contact contact = contactService.getEntityById(
                                Contact.class, Integer.parseInt(contactID));
                        task.setContact(contact);
                    }
                    String priorityID = row
                            .get(getText("entity.priority_id.label"));
View Full Code Here

     * Selects the entities
     *
     * @return the SUCCESS result
     */
    public String select() throws ServiceException {
        Contact contact = null;
        Document document = null;
        Set<Opportunity> opportunities = null;
        if ("Contact".equals(this.getRelationKey())) {
            contact = contactService.getEntityById(Contact.class,
                    Integer.valueOf(this.getRelationValue()));
            opportunities = contact.getOpportunities();
        } else if ("Document".equals(this.getRelationKey())) {
            document = documentService.getEntityById(Document.class,
                    Integer.valueOf(this.getRelationValue()));
            opportunities = document.getOpportunities();
        }
View Full Code Here

     * Unselects the entities
     *
     * @return the SUCCESS result
     */
    public String unselect() throws ServiceException {
        Contact contact = null;
        Document document = null;
        Set<Opportunity> opportunities = null;
        if ("Contact".equals(this.getRelationKey())) {
            contact = contactService.getEntityById(Contact.class,
                    Integer.valueOf(this.getRelationValue()));
            opportunities = contact.getOpportunities();
        } else if ("Document".equals(this.getRelationKey())) {
            document = documentService.getEntityById(Document.class,
                    Integer.valueOf(this.getRelationValue()));
            opportunities = document.getOpportunities();
        }
View Full Code Here

            if (documents == null) {
                documents = new HashSet<Document>();
            }
            documents.add(document);
        } else if ("Contact".equals(this.getRelationKey())) {
            Contact contact = contactService.getEntityById(Contact.class,
                    Integer.valueOf(this.getRelationValue()));
            Set<Contact> contacts = caseInstance.getContacts();
            if (contacts == null) {
                contacts = new HashSet<Contact>();
            }
View Full Code Here

     *
     */
    public InputStream getInputStream() throws Exception {
        byte[] fileBytes = null;
        if (this.getId() != null) {
            Contact contact = baseService.getEntityById(Contact.class,
                    this.getId());
            Attachment attachment = contact.getAttachment();
            if (attachment != null) {
                fileBytes = attachment.getContent();
            }
        }
        InputStream in = new ByteArrayInputStream(fileBytes);
View Full Code Here

            String newNotes = CommonUtil.fromNullToEmpty(contact.getNotes());
            createChangeLog(changeLogs, entityName, recordID,
                    "entity.notes.label", oldNotes, newNotes, loginUser);

            String oldReportToName = "";
            Contact oldReportTo = originalContact.getReport_to();
            if (oldReportTo != null) {
                oldReportToName = CommonUtil.fromNullToEmpty(oldReportTo
                        .getName());
            }
            String newReportToName = "";
            Contact newReportTo = contact.getReport_to();
            if (newReportTo != null) {
                newReportToName = CommonUtil.fromNullToEmpty(newReportTo
                        .getName());
            }
            createChangeLog(changeLogs, entityName, recordID,
                    "contact.report_to.label", oldReportToName,
                    newReportToName, loginUser);
View Full Code Here

     * Saves the entity.
     *
     * @return the SUCCESS result
     */
    public String save() throws Exception {
        Contact originalContact = saveEntity();
        final Collection<ChangeLog> changeLogs = changeLog(originalContact,
                contact);
        contact = getBaseService().makePersistent(contact);
        this.setId(contact.getId());
        this.setSaveFlag("true");
View Full Code Here

            if (account != null) {
                accountID = account.getId();
                accountText = account.getName();
            }

            Contact report_to = contact.getReport_to();
            if (report_to != null) {
                reportToID = report_to.getId();
                reportToText = report_to.getName();
            }

            LeadSource leadSource = contact.getLeadSource();
            if (leadSource != null) {
                leadSourceID = leadSource.getId();
View Full Code Here

TOP

Related Classes of com.gcrm.domain.Contact

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.