int year = Integer.parseInt(string.substring(0, 4)); int month = Integer.parseInt(string.substring(4, 6)); int day = Integer.parseInt(string.substring(6, 8));
int year = Integer.parseInt(string.substring(0, 4)); int month = Integer.parseInt(string.substring(5, 7)); int day = Integer.parseInt(string.substring(8, 10));
    public Object sqlToJava(Object object) {    	if (object != null && object instanceof String) {    		final String string = (String) object;			int year = Integer.parseInt(string.substring(0, 4));			int month = Integer.parseInt(string.substring(4, 6));			int day = Integer.parseInt(string.substring(6, 8));			return new YearMonthDay(year, month, day);        }        return object;    }