Package com.gcrm.domain

Examples of com.gcrm.domain.Call


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

                Call call = new Call();
                try {
                    String id = row.get(getText("entity.id.label"));
                    if (!CommonUtil.isNullOrEmpty(id)) {
                        call.setId(Integer.parseInt(id));
                        UserUtil.permissionCheck("update_call");
                    } else {
                        UserUtil.permissionCheck("create_call");
                    }
                    call.setSubject(CommonUtil.fromNullToEmpty(row
                            .get(getText("entity.subject.label"))));
                    String directionID = row
                            .get(getText("call.direction_id.label"));
                    if (CommonUtil.isNullOrEmpty(directionID)) {
                        call.setDirection(null);
                    } else {
                        CallDirection callDirection = callDirectionService
                                .getEntityById(CallDirection.class,
                                        Integer.parseInt(directionID));
                        call.setDirection(callDirection);
                    }
                    String statusID = row
                            .get(getText("entity.status_id.label"));
                    if (CommonUtil.isNullOrEmpty(statusID)) {
                        call.setStatus(null);
                    } else {
                        CallStatus status = callStatusService.getEntityById(
                                CallStatus.class, Integer.parseInt(statusID));
                        call.setStatus(status);
                    }
                    SimpleDateFormat dateFormat = new SimpleDateFormat(
                            Constant.DATE_TIME_FORMAT);
                    String startDateS = row
                            .get(getText("entity.start_date.label"));
                    if (startDateS != null) {
                        Date startDate = dateFormat.parse(startDateS);
                        call.setStart_date(startDate);
                    } else {
                        call.setStart_date(null);
                    }
                    String reminderWayEmail = row
                            .get(getText("entity.reminder_email.label"));
                    if (CommonUtil.isNullOrEmpty(reminderWayEmail)) {
                        call.setReminder_email(false);
                    } else {
                        call.setReminder_email(Boolean
                                .parseBoolean(reminderWayEmail));
                    }
                    String reminderOptionEmailID = row
                            .get(getText("entity.reminder_option_email_id.label"));
                    if (CommonUtil.isNullOrEmpty(reminderOptionEmailID)) {
                        call.setReminder_option_email(null);
                    } else {
                        ReminderOption reminderOption = reminderOptionService
                                .getEntityById(ReminderOption.class,
                                        Integer.parseInt(reminderOptionEmailID));
                        call.setReminder_option_email(reminderOption);
                    }
                    call.setNotes(CommonUtil.fromNullToEmpty(row
                            .get(getText("entity.notes.label"))));
                    String assignedToID = row
                            .get(getText("entity.assigned_to_id.label"));
                    if (CommonUtil.isNullOrEmpty(assignedToID)) {
                        call.setAssigned_to(null);
                    } else {
                        User assignedTo = userService.getEntityById(User.class,
                                Integer.parseInt(assignedToID));
                        call.setAssigned_to(assignedTo);
                    }
                    baseService.makePersistent(call);
                    successfulNum++;
                } catch (Exception e) {
                    failedNum++;
                    failedMsg.put(call.getSubject(), e.getMessage());
                }

            }

            this.setFailedMsg(failedMsg);
View Full Code Here


     */
    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())) {
            meeting = meetingService.getEntityById(Meeting.class,
                    Integer.valueOf(this.getRelationValue()));
            leads = meeting.getLeads();
        }
View Full Code Here

     */
    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()));
View Full Code Here

     *
     * @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())) {
            meeting = meetingService.getEntityById(Meeting.class,
                    Integer.valueOf(this.getRelationValue()));
            users = meeting.getUsers();
        }
View Full Code Here

     *
     * @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())) {
            meeting = meetingService.getEntityById(Meeting.class,
                    Integer.valueOf(this.getRelationValue()));
            users = meeting.getUsers();
        }
View Full Code Here

TOP

Related Classes of com.gcrm.domain.Call

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.