Examples of TargetList


Examples of com.gcrm.domain.TargetList

     * @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())) {
            call = callService.getEntityById(Call.class,
                    Integer.valueOf(this.getRelationValue()));
            leads = call.getLeads();
        } else if ("Meeting".equals(this.getRelationKey())) {
View Full Code Here

Examples of com.gcrm.domain.TargetList

     * @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())) {
            call = callService.getEntityById(Call.class,
                    Integer.valueOf(this.getRelationValue()));
        } else if ("Meeting".equals(this.getRelationKey())) {
            meeting = meetingService.getEntityById(Meeting.class,
View Full Code Here

Examples of com.gcrm.domain.TargetList

        jsonBuilder
                .append(getJsonHeader(totalRecords, searchCondition, isList));

        String assignedTo = null;
        while (targetLists.hasNext()) {
            TargetList instance = targetLists.next();
            int id = instance.getId();
            String name = CommonUtil.fromNullToEmpty(instance.getName());
            User user = instance.getAssigned_to();
            if (user != null) {
                assignedTo = user.getName();
            } else {
                assignedTo = "";
            }

            if (isList) {
                User createdBy = instance.getCreated_by();
                String createdByName = "";
                if (createdBy != null) {
                    createdByName = CommonUtil.fromNullToEmpty(createdBy
                            .getName());
                }
                User updatedBy = instance.getUpdated_by();
                String updatedByName = "";
                if (updatedBy != null) {
                    updatedByName = CommonUtil.fromNullToEmpty(updatedBy
                            .getName());
                }
                SimpleDateFormat dateFormat = new SimpleDateFormat(
                        Constant.DATE_TIME_FORMAT);
                Date createdOn = instance.getCreated_on();
                String createdOnName = "";
                if (createdOn != null) {
                    createdOnName = dateFormat.format(createdOn);
                }
                Date updatedOn = instance.getUpdated_on();
                String updatedOnName = "";
                if (updatedOn != null) {
                    updatedOnName = dateFormat.format(updatedOn);
                }
View Full Code Here

Examples of com.gcrm.domain.TargetList

        UserUtil.permissionCheck("create_targetList");
        if (this.getSeleteIDs() != null) {
            String[] ids = seleteIDs.split(",");
            for (int i = 0; i < ids.length; i++) {
                String copyid = ids[i];
                TargetList oriRecord = baseService.getEntityById(
                        TargetList.class, Integer.valueOf(copyid));
                TargetList targetListRecord = oriRecord.clone();
                targetListRecord.setId(null);
                this.getbaseService().makePersistent(targetListRecord);
            }
        }
        return SUCCESS;
    }
View Full Code Here

Examples of com.gcrm.domain.TargetList

            writer.writeHeader(header);
            if (!isTemplate) {
                String[] ids = seleteIDs.split(",");
                for (int i = 0; i < ids.length; i++) {
                    String id = ids[i];
                    TargetList targetList = baseService.getEntityById(
                            TargetList.class, Integer.parseInt(id));
                    final HashMap<String, ? super Object> data1 = new HashMap<String, Object>();
                    data1.put(header[0], targetList.getId());
                    data1.put(header[1],
                            CommonUtil.fromNullToEmpty(targetList.getName()));
                    data1.put(header[2],
                            CommonUtil.fromNullToEmpty(targetList.getNotes()));
                    if (targetList.getAssigned_to() != null) {
                        data1.put(header[3], targetList.getAssigned_to()
                                .getId());
                        data1.put(header[4], targetList.getAssigned_to()
                                .getName());
                    } else {
                        data1.put(header[3], "");
                        data1.put(header[4], "");
                    }
View Full Code Here

Examples of com.gcrm.domain.TargetList

                Map<String, String> row = new HashMap<String, String>();
                for (int i = 0; i < line.size(); i++) {
                    row.put(header[i], line.get(i));
                }

                TargetList targetList = new TargetList();
                try {
                    String id = row.get(getText("entity.id.label"));
                    if (!CommonUtil.isNullOrEmpty(id)) {
                        targetList.setId(Integer.parseInt(id));
                    }
                    targetList.setName(CommonUtil.fromNullToEmpty(row
                            .get(getText("entity.name.label"))));
                    targetList.setNotes(CommonUtil.fromNullToEmpty(row
                            .get(getText("entity.notes.label"))));
                    String assignedToID = row
                            .get(getText("entity.assigned_to_id.label"));
                    if (CommonUtil.isNullOrEmpty(assignedToID)) {
                        targetList.setAssigned_to(null);
                    } else {
                        User assignedTo = userService.getEntityById(User.class,
                                Integer.parseInt(assignedToID));
                        targetList.setAssigned_to(assignedTo);
                    }
                    baseService.makePersistent(targetList);
                    successfulNum++;
                } catch (Exception e) {
                    failedNum++;
                    String Name = CommonUtil.fromNullToEmpty(targetList
                            .getName());
                    failedMsg.put(Name, e.getMessage());
                }

            }
View Full Code Here

Examples of com.gcrm.domain.TargetList

            owner = userService.getEntityById(User.class, this.getOwnerID());
        }
        target.setOwner(owner);

        if ("TargetList".equals(this.getRelationKey())) {
            TargetList targetList = targetListService.getEntityById(
                    TargetList.class, Integer.valueOf(this.getRelationValue()));
            Set<TargetList> targetLists = target.getTargetLists();
            if (targetLists == null) {
                targetLists = new HashSet<TargetList>();
            }
View Full Code Here

Examples of com.gcrm.domain.TargetList

     * Selects the entities
     *
     * @return the SUCCESS result
     */
    public String select() throws ServiceException {
        TargetList targetList = null;
        Call call = null;
        Meeting meeting = null;
        Set<User> users = null;

        if ("TargetList".equals(this.getRelationKey())) {
            targetList = targetListService.getEntityById(TargetList.class,
                    Integer.valueOf(this.getRelationValue()));
            users = targetList.getUsers();
        } else if ("Call".equals(this.getRelationKey())) {
            call = callService.getEntityById(Call.class,
                    Integer.valueOf(this.getRelationValue()));
            users = call.getUsers();
        } else if ("Meeting".equals(this.getRelationKey())) {
View Full Code Here

Examples of com.gcrm.domain.TargetList

     * Unselects the entities
     *
     * @return the SUCCESS result
     */
    public String unselect() throws ServiceException {
        TargetList targetList = null;
        Call call = null;
        Meeting meeting = null;
        Set<User> users = null;

        if ("TargetList".equals(this.getRelationKey())) {
            targetList = targetListService.getEntityById(TargetList.class,
                    Integer.valueOf(this.getRelationValue()));
            users = targetList.getUsers();
        } else if ("Call".equals(this.getRelationKey())) {
            call = callService.getEntityById(Call.class,
                    Integer.valueOf(this.getRelationValue()));
            users = call.getUsers();
        } else if ("Meeting".equals(this.getRelationKey())) {
View Full Code Here

Examples of com.gcrm.domain.TargetList

     * Selects the entities
     *
     * @return the SUCCESS result
     */
    public String select() throws ServiceException {
        TargetList targetList = null;
        Set<Target> targets = null;

        if ("TargetList".equals(this.getRelationKey())) {
            targetList = targetListService.getEntityById(TargetList.class,
                    Integer.valueOf(this.getRelationValue()));
            targets = targetList.getTargets();
        }

        if (this.getSeleteIDs() != null) {
            String[] ids = seleteIDs.split(",");
            for (int i = 0; i < ids.length; i++) {
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.