@Test public void testGetMapFromTuplesAndAliases() { String[] aliases = new String[] { "foo", "bar" }; Object[] tuple = new Object[] { 3, 8 }; Map<String, Object> map = sut.getMapFromTuplesAndAliases(tuple, aliases); assertEquals(3, map.get("foo")); assertEquals(8, map.get("bar")); }
protected Map<String, Object> getMapFromTuplesAndAliases(final Object[] tuple, final String[] aliases) { Map<String, Object> result = new HashMap<String, Object>(tuple.length); for (int i = 0; i < tuple.length; i++) { result.put(aliases[i], tuple[i]); } return result; }
ProjectionToModelViewTransformer implements ResultTransformer { protected Map<String, Object> getMapFromTuplesAndAliases(final Object[] tuple, final String[] aliases) { Map<String, Object> result = new HashMap<String, Object>(tuple.length); for (int i = 0; i < tuple.length; i++) { result.put(aliases[i], tuple[i]); } return result; } }
ProjectionToModelViewTransformer implements ResultTransformer { protected Map<String, Object> getMapFromTuplesAndAliases(final Object[] tuple, final String[] aliases) { Map<String, Object> result = new HashMap<String, Object>(tuple.length); for (int i = 0; i < tuple.length; i++) { result.put(aliases[i], tuple[i]); } return result; } ProjectionToModelViewTransformer(final Map<Class< ? >, Class< ? >> theModelToViewMap,
            final ReflectiveInstantiator inReflectiveInstantiator); }
ProjectionToModelViewTransformer implements ResultTransformer { protected Map<String, Object> getMapFromTuplesAndAliases(final Object[] tuple, final String[] aliases) { Map<String, Object> result = new HashMap<String, Object>(tuple.length); for (int i = 0; i < tuple.length; i++) { result.put(aliases[i], tuple[i]); } return result; } ProjectionToModelViewTransformer(final Map<Class< ? >, Class< ? >> theModelToViewMap,
            final ReflectiveInstantiator inReflectiveInstantiator); @SuppressWarnings("unchecked") @Override List transformList(final List list); @Override Object transformTuple(final Object[] tuple, final String[] aliases); }
ProjectionToModelViewTransformer implements ResultTransformer { protected Map<String, Object> getMapFromTuplesAndAliases(final Object[] tuple, final String[] aliases) { Map<String, Object> result = new HashMap<String, Object>(tuple.length); for (int i = 0; i < tuple.length; i++) { result.put(aliases[i], tuple[i]); } return result; } ProjectionToModelViewTransformer(final Map<Class< ? >, Class< ? >> theModelToViewMap,
            final ReflectiveInstantiator inReflectiveInstantiator); @SuppressWarnings("unchecked") @Override List transformList(final List list); @Override Object transformTuple(final Object[] tuple, final String[] aliases);  }