Search in sources :

Example 1 with UDTRecord

use of org.jooq.UDTRecord in project jOOQ by jOOQ.

the class DefaultBinding method typeMap.

@SuppressWarnings("unchecked")
static final Map<String, Class<?>> typeMap(Class<?> type, Configuration configuration, Map<String, Class<?>> result) {
    try {
        if (UDTRecord.class.isAssignableFrom(type)) {
            Class<UDTRecord<?>> t = (Class<UDTRecord<?>>) type;
            result.put(getMappedUDTName(configuration, t), t);
            UDTRecord<?> r = t.newInstance();
            for (Field<?> field : r.getUDT().fields()) typeMap(field.getType(), configuration, result);
        }
    } catch (Exception e) {
        throw new MappingException("Error while collecting type map", e);
    }
    return result;
}
Also used : UDTRecord(org.jooq.UDTRecord) DataTypeException(org.jooq.exception.DataTypeException) SQLDialectNotSupportedException(org.jooq.exception.SQLDialectNotSupportedException) MappingException(org.jooq.exception.MappingException) SQLException(java.sql.SQLException) MappingException(org.jooq.exception.MappingException)

Aggregations

SQLException (java.sql.SQLException)1 UDTRecord (org.jooq.UDTRecord)1 DataTypeException (org.jooq.exception.DataTypeException)1 MappingException (org.jooq.exception.MappingException)1 SQLDialectNotSupportedException (org.jooq.exception.SQLDialectNotSupportedException)1