Hello!

I have the following method, which delivers a map as return value.
-----
-----
        public Map<Long, String> getTopLevelCategories() {
                HibernateDAOFactory factory = null;
                try {
                        factory = new HibernateDAOFactory();
                        factory.beginTransaction();
                        Collection<DOCategory> topLevelCategories =
factory.getDAOCategory().loadTopLevelCategories();
                        Map<Long, String> topLevelCategoriesMap = new 
HashMap<Long, String>();
                        for (DOCategory category : topLevelCategories) {
                                topLevelCategoriesMap.put(category.getId(), 
category.getName());
                        }
                        factory.commitTransaction();
                        return topLevelCategoriesMap;
                } catch (HibernateException e) {
                        factory.rollback();
                        e.printStackTrace();
                        return null;
                } finally {
                        if (factory != null) {
                                factory.closeSession();
                        }
                }
        }
-----
-----

How is it possible to work with this return value in FLEX?

Thank you
regards
markus

Reply via email to