if ( hibernateType == null ) {
throw new IllegalArgumentException(
"Could not convert java type [" + javaType.getName() + "] to Hibernate type"
);
}
int[] sqlTypeCodes = hibernateType.sqlTypes( factory );
if ( sqlTypeCodes.length != 1 ) {
throw new IllegalArgumentException(
"Invalid Hibernate Type [" + hibernateType.getName() +
"] for cast : more than one column spanned"
);