Search in sources :

Example 1 with DBDAttributeBindingType

use of org.jkiss.dbeaver.model.data.DBDAttributeBindingType in project dbeaver by serge-rider.

the class ComplexTypeAttributeTransformer method createNestedTypeBindings.

static void createNestedTypeBindings(DBCSession session, DBDAttributeBinding attribute, List<Object[]> rows, DBSEntity dataType) throws DBException {
    List<DBDAttributeBinding> nestedBindings = new ArrayList<>();
    for (DBSEntityAttribute nestedAttr : CommonUtils.safeCollection(dataType.getAttributes(session.getProgressMonitor()))) {
        DBDAttributeBindingType nestedBinding = new DBDAttributeBindingType(attribute, nestedAttr);
        nestedBinding.lateBinding(session, rows);
        nestedBindings.add(nestedBinding);
    }
    if (!nestedBindings.isEmpty()) {
        attribute.setNestedBindings(nestedBindings);
    }
}
Also used : DBSEntityAttribute(org.jkiss.dbeaver.model.struct.DBSEntityAttribute) ArrayList(java.util.ArrayList) DBDAttributeBindingType(org.jkiss.dbeaver.model.data.DBDAttributeBindingType) DBDAttributeBinding(org.jkiss.dbeaver.model.data.DBDAttributeBinding)

Aggregations

ArrayList (java.util.ArrayList)1 DBDAttributeBinding (org.jkiss.dbeaver.model.data.DBDAttributeBinding)1 DBDAttributeBindingType (org.jkiss.dbeaver.model.data.DBDAttributeBindingType)1 DBSEntityAttribute (org.jkiss.dbeaver.model.struct.DBSEntityAttribute)1