org.sql2o.converters.ShortConverter Maven / Gradle / Ivy
package org.sql2o.converters;
/**
* Used by sql2o to convert a value from the database into a {@link Short}.
*/
public class ShortConverter extends NumberConverter {
public ShortConverter(boolean primitive) {
super(primitive);
}
@Override
protected Short convertNumberValue(Number val) {
return val.shortValue();
}
@Override
protected Short convertStringValue(String val) {
return Short.parseShort(val);
}
@Override
protected String getTypeDescription() {
return Short.class.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy