All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.jpattern.orm.generator.wrapper.CharacterToStringWrapper Maven / Gradle / Ivy

There is a newer version: 3.5.1
Show newest version
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