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;
}
Aggregations