public void setDiscriminator(String columnName, Integer columnIndex, Class javaClass, String jdbcType,
String nullValue, Object typeHandlerImpl) {
TypeHandler handler;
if (typeHandlerImpl != null) {
if (typeHandlerImpl instanceof TypeHandlerCallback) {
handler = new CustomTypeHandler((TypeHandlerCallback) typeHandlerImpl);
} else if (typeHandlerImpl instanceof TypeHandler) {
handler = (TypeHandler) typeHandlerImpl;
} else {
throw new RuntimeException(
"The class '' is not a valid implementation of TypeHandler or TypeHandlerCallback");