Search in sources :

Example 26 with TdView

use of org.talend.cwm.relational.TdView in project tdq-studio-se by Talend.

the class DBViewFolderRepNode method getChildrenCount.

/*
     * ADD gdbu 2011-7-25 bug : 23220
     * 
     * children count : only read from the file
     */
private int getChildrenCount() {
    List<TdView> tables = new ArrayList<TdView>();
    IRepositoryViewObject object = this.getParent().getObject();
    if (object instanceof MetadataCatalogRepositoryObject) {
        catalog = ((MetadataCatalogRepositoryObject) object).getCatalog();
        tables = PackageHelper.getViews(catalog);
    } else {
        schema = ((MetadataSchemaRepositoryObject) object).getSchema();
        tables = PackageHelper.getViews(schema);
    }
    return tables.size();
}
Also used : TdView(org.talend.cwm.relational.TdView) ArrayList(java.util.ArrayList) IRepositoryViewObject(org.talend.core.model.repository.IRepositoryViewObject) MetadataCatalogRepositoryObject(org.talend.core.repository.model.repositoryObject.MetadataCatalogRepositoryObject)

Aggregations

TdView (org.talend.cwm.relational.TdView)26 TdTable (org.talend.cwm.relational.TdTable)15 ArrayList (java.util.ArrayList)9 IRepositoryViewObject (org.talend.core.model.repository.IRepositoryViewObject)9 TdColumn (org.talend.cwm.relational.TdColumn)8 IRepositoryNode (org.talend.repository.model.IRepositoryNode)7 RepositoryNode (org.talend.repository.model.RepositoryNode)7 Catalog (orgomg.cwm.resource.relational.Catalog)7 Test (org.junit.Test)5 TdViewRepositoryObject (org.talend.core.repository.model.repositoryObject.TdViewRepositoryObject)5 Schema (orgomg.cwm.resource.relational.Schema)5 Connection (org.talend.core.model.metadata.builder.connection.Connection)4 MetadataColumn (org.talend.core.model.metadata.builder.connection.MetadataColumn)4 DQRepositoryNode (org.talend.dq.nodes.DQRepositoryNode)4 Package (orgomg.cwm.objectmodel.core.Package)4 EObject (org.eclipse.emf.ecore.EObject)3 MetadataCatalogRepositoryObject (org.talend.core.repository.model.repositoryObject.MetadataCatalogRepositoryObject)3 MetadataColumnRepositoryObject (org.talend.core.repository.model.repositoryObject.MetadataColumnRepositoryObject)3 TdTableRepositoryObject (org.talend.core.repository.model.repositoryObject.TdTableRepositoryObject)3 DBViewRepNode (org.talend.dq.nodes.DBViewRepNode)3