Package com.gcrm.domain

Examples of com.gcrm.domain.User


                    String assignedToID = row
                            .get(getText("entity.assigned_to_id.label"));
                    if (CommonUtil.isNullOrEmpty(assignedToID)) {
                        campaign.setAssigned_to(null);
                    } else {
                        User assignedTo = userService.getEntityById(User.class,
                                Integer.parseInt(assignedToID));
                        campaign.setAssigned_to(assignedTo);
                    }
                    baseService.makePersistent(campaign);
                    successfulNum++;
View Full Code Here


                jasperPrint);
    }

    @SuppressWarnings({ "rawtypes" })
    private void setList() {
        User loginUser = UserUtil.getLoginUser();
        int scope = loginUser.getScope_account();
        StringBuilder hqlBuilder = new StringBuilder(
                "select lead_source,count(opportunity.id) from Opportunity opportunity join opportunity.lead_source lead_source group by lead_source.id");

        if (scope == Role.OWNER_OR_DISABLED) {
            hqlBuilder.append(" where owner = ").append(loginUser.getId());
        }
        List result = baseService.findVOByHQL(hqlBuilder.toString());
        Iterator it = result.iterator();
        ActionContext context = ActionContext.getContext();
        Map<String, Object> session = context.getSession();
View Full Code Here

                jasperPrint);
    }

    @SuppressWarnings({ "rawtypes" })
    private void setList() {
        User loginUser = UserUtil.getLoginUser();
        int scope = loginUser.getScope_account();
        StringBuilder hqlBuilder = new StringBuilder(
                "select lead_source,count(lead.id) from Lead lead join lead.lead_source lead_source group by lead_source.id");

        if (scope == Role.OWNER_OR_DISABLED) {
            hqlBuilder.append(" where owner = ").append(loginUser.getId());
        }
        List result = baseService.findVOByHQL(hqlBuilder.toString());
        Iterator it = result.iterator();
        ActionContext context = ActionContext.getContext();
        Map<String, Object> session = context.getSession();
View Full Code Here

     * Sets report content
     *
     */
    @SuppressWarnings("rawtypes")
    private void setList() {
        User loginUser = UserUtil.getLoginUser();
        int scope = loginUser.getScope_account();
        StringBuilder hqlBuilder = new StringBuilder(
                "select first_name,last_name,title,email,primary_street,primary_city,primary_state,primary_postal_code from Contact");

        if (scope == Role.OWNER_OR_DISABLED) {
            hqlBuilder.append(" where owner = ").append(loginUser.getId());
        }
        hqlBuilder.append(" order by created_on desc");
        List result = baseService.findVOByHQL(hqlBuilder.toString());
        Iterator it = result.iterator();
        list = new ArrayList<ContactVO>();
View Full Code Here

     * Sets report content
     *
     */
    @SuppressWarnings("rawtypes")
    private void setList() {
        User loginUser = UserUtil.getLoginUser();
        int scope = loginUser.getScope_account();
        StringBuilder hqlBuilder = new StringBuilder(
                "select account.name, account.office_phone, account.email, account.bill_street, account.bill_city, account.bill_state, account.assigned_to from Account account");
        if (scope == Role.OWNER_OR_DISABLED) {
            hqlBuilder.append(" where account.owner = ").append(
                    loginUser.getId());
        }
        hqlBuilder.append(" order by account.created_on desc");
        List result = baseService.findVOByHQL(hqlBuilder.toString());
        Iterator it = result.iterator();

        list = new ArrayList<AccountVO>();

        String name = null;
        String officePhone = null;
        String email = null;
        String billStreet = null;
        String billCity = null;
        String billState = null;
        String assignToName = "";
        User assignedTo = null;
        while (it.hasNext()) {
            Object[] row = (Object[]) it.next();
            AccountVO accountVO = new AccountVO();
            name = (String) row[0];
            officePhone = (String) row[1];
            email = (String) row[2];
            billStreet = (String) row[3];
            billCity = (String) row[4];
            billState = (String) row[5];
            assignedTo = (User) row[6];
            accountVO.setName(CommonUtil.fromNullToEmpty(name));
            accountVO.setOffice_phone(CommonUtil.fromNullToEmpty(officePhone));
            accountVO.setEmail(CommonUtil.fromNullToEmpty(email));
            accountVO.setBill_street(CommonUtil.fromNullToEmpty(billStreet));
            accountVO.setBill_city(CommonUtil.fromNullToEmpty(billCity));
            accountVO.setBill_state(CommonUtil.fromNullToEmpty(billState));
            assignToName = "";
            if (assignedTo != null) {
                assignToName = CommonUtil.fromNullToEmpty(assignedTo.getName());
            }
            accountVO.setAssigned_to(assignToName);
            list.add(accountVO);
        }
        map = new HashMap<String, Object>();
View Full Code Here

                jasperPrint);
    }

    @SuppressWarnings({ "rawtypes" })
    private void setList() {
        User loginUser = UserUtil.getLoginUser();
        int scope = loginUser.getScope_account();
        StringBuilder hqlBuilder = new StringBuilder(
                "select sales_stage,count(opportunity.id) from Opportunity opportunity join opportunity.sales_stage sales_stage group by sales_stage.id");

        if (scope == Role.OWNER_OR_DISABLED) {
            hqlBuilder.append(" where owner = ").append(loginUser.getId());
        }
        List result = baseService.findVOByHQL(hqlBuilder.toString());
        Iterator it = result.iterator();
        ActionContext context = ActionContext.getContext();
        Map<String, Object> session = context.getSession();
View Full Code Here

     * Sets report content
     *
     */
    @SuppressWarnings({ "rawtypes" })
    private void setList() {
        User loginUser = UserUtil.getLoginUser();
        int scope = loginUser.getScope_account();
        StringBuilder hqlBuilder = new StringBuilder(
                "select industry,count(account.id) from Account account join account.industry industry group by industry.id");

        if (scope == Role.OWNER_OR_DISABLED) {
            hqlBuilder.append(" where owner = ").append(loginUser.getId());
        }
        List result = baseService.findVOByHQL(hqlBuilder.toString());
        Iterator it = result.iterator();
        ActionContext context = ActionContext.getContext();
        Map<String, Object> session = context.getSession();
View Full Code Here

                jasperPrint);
    }

    @SuppressWarnings({ "rawtypes" })
    private void setList() {
        User loginUser = UserUtil.getLoginUser();
        int scope = loginUser.getScope_account();
        StringBuilder hqlBuilder = new StringBuilder(
                "select status,count(lead.id) from Lead lead join lead.status status group by status.id");

        if (scope == Role.OWNER_OR_DISABLED) {
            hqlBuilder.append(" where owner = ").append(loginUser.getId());
        }
        List result = baseService.findVOByHQL(hqlBuilder.toString());
        Iterator it = result.iterator();
        ActionContext context = ActionContext.getContext();
        Map<String, Object> session = context.getSession();
View Full Code Here

        if (originalDocument != null) {
            ActionContext context = ActionContext.getContext();
            Map<String, Object> session = context.getSession();
            String entityName = Document.class.getSimpleName();
            Integer recordID = document.getId();
            User loginUser = (User) session
                    .get(AuthenticationSuccessListener.LOGIN_USER);
            changeLogs = new ArrayList<ChangeLog>();

            String oldName = CommonUtil.fromNullToEmpty(originalDocument
                    .getName());
            String newName = CommonUtil.fromNullToEmpty(document.getName());
            createChangeLog(changeLogs, entityName, recordID,
                    "entity.name.label", oldName, newName, loginUser);

            String oldFileName = CommonUtil.fromNullToEmpty(originalDocument
                    .getFileName());
            String newFileName = CommonUtil.fromNullToEmpty(document
                    .getFileName());

            createChangeLog(changeLogs, entityName, recordID,
                    "document.file.label", oldFileName, newFileName, loginUser);

            String oldRevision = String.valueOf(originalDocument.getRevision());
            String newRevision = String.valueOf(document.getRevision());
            createChangeLog(changeLogs, entityName, recordID,
                    "document.revision.label", oldRevision, newRevision,
                    loginUser);

            SimpleDateFormat dateFormat = new SimpleDateFormat(
                    Constant.DATE_EDIT_FORMAT);
            String oldPublishDateValue = "";
            Date oldPublishDate = originalDocument.getPublish_date();
            if (oldPublishDate != null) {
                oldPublishDateValue = dateFormat.format(oldPublishDate);
            }
            String newPublishDateValue = "";
            Date newPublishDate = document.getPublish_date();
            if (newPublishDate != null) {
                newPublishDateValue = dateFormat.format(newPublishDate);
            }
            createChangeLog(changeLogs, entityName, recordID,
                    "document.publish_date.label", oldPublishDateValue,
                    newPublishDateValue, loginUser);

            String oldExpirationDateValue = "";
            Date oldExpirationDate = originalDocument.getExpiration_date();
            if (oldExpirationDate != null) {
                oldExpirationDateValue = dateFormat.format(oldExpirationDate);
            }
            String newExpirationDateValue = "";
            Date newExpirationDate = document.getExpiration_date();
            if (newExpirationDate != null) {
                newExpirationDateValue = dateFormat.format(newExpirationDate);
            }
            createChangeLog(changeLogs, entityName, recordID,
                    "document.expiration_date.label", oldExpirationDateValue,
                    newExpirationDateValue, loginUser);

            String oldCategory = getOptionValue(originalDocument.getCategory());
            String newCategory = getOptionValue(document.getCategory());
            createChangeLog(changeLogs, entityName, recordID,
                    "document.category.label", oldCategory, newCategory,
                    loginUser);

            String oldSubCategory = getOptionValue(originalDocument
                    .getSub_category());
            String newSubCategory = getOptionValue(document.getSub_category());
            createChangeLog(changeLogs, entityName, recordID,
                    "document.sub_category.label", oldSubCategory,
                    newSubCategory, loginUser);

            String oldRelatedDocumentName = "";
            Document oldRelatedDocument = originalDocument
                    .getRelated_document();
            if (oldRelatedDocument != null) {
                oldRelatedDocumentName = CommonUtil
                        .fromNullToEmpty(oldRelatedDocument.getName());
            }
            String newRelatedDocumentName = "";
            Document newRelatedDocument = document.getRelated_document();
            if (newRelatedDocument != null) {
                newRelatedDocumentName = CommonUtil
                        .fromNullToEmpty(newRelatedDocument.getName());
            }
            createChangeLog(changeLogs, entityName, recordID,
                    "document.related_document.label", oldRelatedDocumentName,
                    newRelatedDocumentName, loginUser);

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

            String oldAssignedToName = "";
            User oldAssignedTo = originalDocument.getAssigned_to();
            if (oldAssignedTo != null) {
                oldAssignedToName = oldAssignedTo.getName();
            }
            String newAssignedToName = "";
            User newAssignedTo = document.getAssigned_to();
            if (newAssignedTo != null) {
                newAssignedToName = newAssignedTo.getName();
            }
            createChangeLog(changeLogs, entityName, recordID,
                    "entity.assigned_to.label",
                    CommonUtil.fromNullToEmpty(oldAssignedToName),
                    CommonUtil.fromNullToEmpty(newAssignedToName), loginUser);
View Full Code Here

            DocumentSubCategory subCategory = document.getSub_category();
            if (subCategory != null) {
                subCategoryID = subCategory.getId();
            }

            User assignedTo = document.getAssigned_to();
            if (assignedTo != null) {
                this.setAssignedToID(assignedTo.getId());
                this.setAssignedToText(assignedTo.getName());
            }
            Document relatedDocument = document.getRelated_document();
            if (relatedDocument != null) {
                relatedDocumentID = relatedDocument.getId();
                relatedDocumentText = relatedDocument.getName();
View Full Code Here

TOP

Related Classes of com.gcrm.domain.User

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.