public static void fillCache() {

        SessionFactory sessionFactory = RobeHibernateBundle.getInstance().getSessionFactory();
        ManagedSessionContext.bind(sessionFactory.openSession());
        SystemParameterDao dao = new SystemParameterDao(sessionFactory);

        List<SystemParameter> parameters = dao.findAllStrict();

        for (SystemParameter parameter : parameters) {
            cache.put(parameter.getKey(), parameter.getValue());
            dao.detach(parameter);// TODO
        }

    }
public static void fillCache() {

        SessionFactory sessionFactory = RobeHibernateBundle.getInstance().getSessionFactory();
        ManagedSessionContext.bind(sessionFactory.openSession());
        SystemParameterDao dao = new SystemParameterDao(sessionFactory);

        List<SystemParameter> parameters = dao.findAllStrict();

        for (SystemParameter parameter : parameters) {
            cache.put(parameter.getKey(), parameter.getValue());
            dao.detach(parameter);
        }

    }
public static void fillCache ( ) { SessionFactory sessionFactory = RobeHibernateBundle . getInstance ( ) . getSessionFactory ( ) ; ManagedSessionContext . bind ( sessionFactory . openSession ( ) ) ; SystemParameterDao dao = new SystemParameterDao ( sessionFactory ) ; List < SystemParameter > parameters = dao . findAllStrict ( ) ; for ( SystemParameter parameter : parameters ) { cache . put ( parameter . getKey ( ) , parameter . getValue ( ) ) ; dao . detach ( parameter ) ; // TODO } }
TODO this method should be refactoring.
TODO this method should be refactoring .