Package com.gcrm.domain

Examples of com.gcrm.domain.OptionBase


        // Constructs the JSON data
        String json = "{\"total\": " + totalRecords + ",\"rows\": [";
        int size = optons.size();
        for (int i = 0; i < size; i++) {
            OptionBase instance = optons.get(i);
            Integer id = instance.getId();
            String value = instance.getValue();
            String label_en_US = instance.getLabel_en_US();
            String label_zh_CN = instance.getLabel_zh_CN();
            int sequence = instance.getSequence();

            json += "{\"id\":\"" + id + "\",\"entity.id\":\"" + id
                    + "\",\"entity.value\":\"" + value
                    + "\",\"entity.label_en_US\":\""
                    + CommonUtil.fromNullToEmpty(label_en_US)
View Full Code Here


     * Saves the entity.
     *
     * @return the SUCCESS result
     */
    public String save() throws Exception {
        OptionBase optionBase = this.getEntity();
        if (optionBase.getId() == null) {
            UserUtil.permissionCheck("create_system");
        } else {
            UserUtil.permissionCheck("update_system");
        }
        T instance = this.getEntityClass().newInstance();
        instance.setId(optionBase.getId());
        instance.setValue(optionBase.getValue());
        instance.setLabel_en_US(optionBase.getLabel_en_US());
        instance.setLabel_zh_CN(optionBase.getLabel_zh_CN());
        instance.setSequence(optionBase.getSequence());
        getBaseService().makePersistent(instance);
        OptionService.optionMap.remove(this.getEntityClass().getSimpleName());
        return SUCCESS;
    }
View Full Code Here

TOP

Related Classes of com.gcrm.domain.OptionBase

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.