com.talk2object.plum.repository.meta.IdentifierConverter Maven / Gradle / Ivy
package com.talk2object.plum.repository.meta;
import java.io.Serializable;
public class IdentifierConverter {
public static Serializable fromString(String value, Class type) {
if (type == Integer.class)
return Integer.valueOf(value);
else if (type == Long.class)
return Long.valueOf(value);
else if (type == String.class)
return value;
else throw new RuntimeException("not supported class:"+type.getCanonicalName());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy