@SuppressWarnings("unchecked")
public static <T> T get(Record record, Field<?> field) {
if (field instanceof TableField<?,?>) return (T) field.get(record);
Name[] parts = field.getQualifiedName().parts();
Record current = record;
for (int i = 1; i < parts.length; i++) {
Name part = parts[i];
Field<?> currentField = current.field(part);
if (currentField instanceof UDTPathField<?,?,?> udtPath) {
current = current.get(udtPath, UDTRecord.class);
} else {
return (T) current.get(currentField);
}
}
throw new IllegalStateException();
}
if (UDTRecord.class.isAssignableFrom(uType)) {
for (Converter<?, ?> converter : converters) {
if (converter.toType().equals(tType) && UDTRecord.class.isAssignableFrom(converter.fromType())) {
return converter.inverse();
}
}
}
--
You received this message because you are subscribed to a topic in the Google Groups "jOOQ User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jooq-user/H1WB-i8q-cI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jooq-user+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/jooq-user/e65ab2db-b895-48e9-8e1c-c7363ae12a5an%40googlegroups.com.
You received this message because you are subscribed to the Google Groups "jOOQ User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/jooq-user/CAJ0wWSiNSA9HG%3DmcvC_fD9h%3DNXMRx%3DEAKnk-to2MZYB5pU781w%40mail.gmail.com.