Mercurial > dive4elements > river
view flys-artifacts/src/main/java/de/intevation/flys/artifacts/datacage/templating/TypeConverter.java @ 1046:0a5eff5511b1
Fixed flys/issue262: Unified user and system datacage template
flys-artifacts/trunk@2508 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Fri, 19 Aug 2011 09:48:13 +0000 |
parents | b81626b10cb7 |
children |
line wrap: on
line source
package de.intevation.flys.artifacts.datacage.templating; public class TypeConverter { private TypeConverter() { } public static Object convert(Object object, String type) { if (type == null) { return object; } if ("Integer".equals(type)) { return Integer.valueOf(object.toString()); } if ("Double".equals(type)) { return Double.valueOf(object.toString()); } if ("String".equals(type)) { return object.toString(); } // TODO: Add more types return object; } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :