Mercurial > dive4elements > river
view flys-backend/src/main/java/de/intevation/hibernate/MapResultTransformer.java @ 4329:c9dcce9448f2
Added a new control 'show legend' to the map's toolbar. This control opens a window that displays the legends of all activated layers.
Currently, the row in that window has a fixed size of 400x150. The size is fixed, because there are problems with SmartGWT to build
panels with auto height/width :-/
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Tue, 30 Oct 2012 12:16:26 +0100 |
parents | 3d3e40d9d6d7 |
children | 18619c1e7c2a |
line wrap: on
line source
package de.intevation.hibernate; import java.util.HashMap; import java.util.Map; import org.hibernate.transform.BasicTransformerAdapter; public class MapResultTransformer extends BasicTransformerAdapter { public static final MapResultTransformer INSTANCE = new MapResultTransformer(); public MapResultTransformer() { } @Override public Object transformTuple(Object [] tuple, String [] aliases) { Map<String, Object> map = new HashMap<String, Object>(); for (int i = 0; i < tuple.length; ++i) { map.put(aliases[i], tuple[i]); } return map; } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :