com.jpattern.orm.generator.wrapper.CharacterToStringWrapper Maven / Gradle / Ivy
package com.jpattern.orm.generator.wrapper;
/**
*
* @author Francesco Cina'
*
* Apr 1, 2012
*/
public class CharacterToStringWrapper implements TypeWrapper {
@Override
public Class resultSetTypeToUse() {
return String.class;
}
@Override
public Class wrapperClass() {
return Character.class;
}
@Override
public Character wrap(final String value) {
if ((value==null) || value.isEmpty()) {
return null;
}
return value.charAt(0);
}
@Override
public String unWrap(final Character value) {
if (value==null) {
return null;
}
return String.valueOf(value);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy