public static <T extends ColumnSet> boolean fillColumnSets(Catalog catalog, Schema schema, Collection<T> output,
            final int tClassifierId) {
        // --- precondition
        if (catalog == null && schema == null) {
            return false;
        }
        RelationalSwitch<T> relationalSwitch = new RelationalSwitch<T>() {
            @Override
            protected T doSwitch(int classifierID, EObject theEObject) {
                if (theEObject.eClass().getClassifierID() != tClassifierId) {
                    return null;
                } else {
                    return super.doSwitch(classifierID, theEObject);
                }
            }
            @Override
            public T caseColumnSet(ColumnSet object) {
                return castObject(object);
            }
            @Override
            public T caseTable(Table object) {
                return castObject(object);
            }
            @Override
            public T caseTdTable(TdTable object) {
                return castObject(object);
            }
            @Override
            public T caseTdView(TdView object) {
                return castObject(object);
            }
            @Override
            public T caseView(View object) {
                return castObject(object);
            }
            @SuppressWarnings("unchecked")
            private T castObject(Object object) {
                return (T) object;
            }
        };
        EList<ModelElement> elements = (schema != null) ? schema.getOwnedElement() : catalog.getOwnedElement();
        if (elements.isEmpty()) {
            // no element found
            return false;
        }
        for (EObject elt : elements) {
            T columnSet = relationalSwitch.doSwitch(elt);
            if (columnSet != null) {
                output.add(columnSet);
            }
        }
        return true;
    }
public static <T extends ColumnSet> boolean fillColumnSets(Catalog catalog, Schema schema, Collection<T> output,
            final int tClassifierId) {
       
        if (catalog == null && schema == null) {
            return false;
        }
        RelationalSwitch<T> relationalSwitch = new RelationalSwitch<T>() {
            @Override
            protected T doSwitch(int classifierID, EObject theEObject) {
                if (theEObject.eClass().getClassifierID() != tClassifierId) {
                    return null;
                } else {
                    return super.doSwitch(classifierID, theEObject);
                }
            }
            @Override
            public T caseColumnSet(ColumnSet object) {
                return castObject(object);
            }
            @Override
            public T caseTable(Table object) {
                return castObject(object);
            }
            @Override
            public T caseTdTable(TdTable object) {
                return castObject(object);
            }
            @Override
            public T caseTdView(TdView object) {
                return castObject(object);
            }
            @Override
            public T caseView(View object) {
                return castObject(object);
            }
            @SuppressWarnings("unchecked")
            private T castObject(Object object) {
                return (T) object;
            }
        };
        EList<ModelElement> elements = (schema != null) ? schema.getOwnedElement() : catalog.getOwnedElement();
        if (elements.isEmpty()) {
           
            return false;
        }
        for (EObject elt : elements) {
            T columnSet = relationalSwitch.doSwitch(elt);
            if (columnSet != null) {
                output.add(columnSet);
            }
        }
        return true;
    }
public static <t extends columnset> boolean fillcolumnsets(catalog catalog, schema schema, collection<t> output, final int tclassifierid) { if (catalog == null && schema == null) { return false; } relationalswitch<t> relationalswitch = new relationalswitch<t>() { @override protected t doswitch(int classifierid, eobject theeobject) { if (theeobject.eclass().getclassifierid() != tclassifierid) { return null; } else { return super.doswitch(classifierid, theeobject); } } @override public t casecolumnset(columnset object) { return castobject(object); } @override public t casetable(table object) { return castobject(object); } @override public t casetdtable(tdtable object) { return castobject(object); } @override public t casetdview(tdview object) { return castobject(object); } @override public t caseview(view object) { return castobject(object); } @suppresswarnings("unchecked") private t castobject(object object) { return (t) object; } }; elist<modelelement> elements = (schema != null) ? schema.getownedelement() : catalog.getownedelement(); if (elements.isempty()) { return false; } for (eobject elt : elements) { t columnset = relationalswitch.doswitch(elt); if (columnset != null) { output.add(columnset); } } return true; }