Package org.opencustomer.db.dao.system

Examples of org.opencustomer.db.dao.system.ConfigurationDAO


        Iterator<ConfigurationVO> configurations = ((List<ConfigurationVO>)panel.getAttribute("configurations")).iterator();
       
        try {
            HibernateContext.beginTransaction();
           
            ConfigurationDAO dao = new ConfigurationDAO();
            while(configurations.hasNext()) {
                ConfigurationVO configuration = configurations.next();
               
                if (configuration.getId() == null) {
                    if(configuration.getValue() != null) {
                        if (log.isDebugEnabled())
                            log.debug("create configuration");

                        dao.insert(configuration, user);
                    }
                } else {
                    if(configuration.getValue() != null) {
                        if (log.isDebugEnabled())
                            log.debug("save configuration (ID:" + configuration.getId() + ")");
                       
                        dao.update(configuration, user);
                    } else {
                        if (log.isDebugEnabled())
                            log.debug("delete configuration (ID:" + configuration.getId() + ")");
                       
                        dao.delete(configuration);
                        configurations.remove();
                    }
                }
            }
           
View Full Code Here


    }
   
    @Override
    public void loadEntity(ActionMessages errors, LoadForm form, Hashtable<String, Object> attributes, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
        try {
            List<ConfigurationVO> configurations = new ConfigurationDAO().getForSystem();
           
            attributes.put("configurations", configurations);
        } catch (HibernateException e) {
            errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("default.error.noEntityAccess"));
View Full Code Here

   
    @Override
    public void refresh() {
        getConfigurations().clear();
       
        List<ConfigurationVO> systemConfigurations = new ConfigurationDAO().getForSystem();
        for(ConfigurationVO vo : systemConfigurations) {
            addConfiguration(vo);
        }
    }
View Full Code Here

   
    @Override
    public void refresh() {
        getConfigurations().clear();
       
        List<ConfigurationVO> userConfigurations = new ConfigurationDAO().getForUser(user);
        for(ConfigurationVO vo : userConfigurations) {
            addConfiguration(vo);
        }
    }
View Full Code Here

TOP

Related Classes of org.opencustomer.db.dao.system.ConfigurationDAO

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.