use of org.jooq.QualifiedRecord in project jOOQ by jOOQ.
the class DefaultBinding method typeMap.
@SuppressWarnings("unchecked")
static final Map<String, Class<?>> typeMap(Class<?> type, Scope scope, Map<String, Class<?>> result) {
try {
if (QualifiedRecord.class.isAssignableFrom(type)) {
Class<QualifiedRecord<?>> t = (Class<QualifiedRecord<?>>) type;
result.put(getMappedUDTName(scope, t), t);
QualifiedRecord<?> r = t.getDeclaredConstructor().newInstance();
for (Field<?> field : r.getQualifier().fields()) typeMap(field.getType(), scope, result);
}
} catch (Exception e) {
throw new MappingException("Error while collecting type map", e);
}
return result;
}
Aggregations