/* * (non-Javadoc) * * @see org.talend.cwm.builders.AbstractTableBuilder#createTable() */ @Override protected TdView createTable() { TdView view = RelationalFactory.eINSTANCE.createTdView(); view.setTableType(ExtractMetaDataFromDataBase.ETableTypes.TABLETYPE_VIEW.getName()); view.setLabel(view.getName()); return view; }
/** * DOC klliu Comment method "createTableRepositoryNode". * * @param tables */ private void createViewRepositoryNode(List<TdView> views, List<IRepositoryNode> node) { if (views != null) { for (TdView view : views) { // create view object TdViewRepositoryObject metadataView = new TdViewRepositoryObject(viewObject, view); metadataView.setTableName(view.getName()); metadataView.setLabel(view.getName()); metadataView.setId(view.getName()); // create a node for ui DBViewRepNode viewNode = new DBViewRepNode(metadataView, this, ENodeType.TDQ_REPOSITORY_ELEMENT); viewNode.setProperties(EProperties.LABEL, ERepositoryObjectType.METADATA_CON_TABLE); viewNode.setProperties(EProperties.CONTENT_TYPE, ERepositoryObjectType.METADATA_CON_VIEW); metadataView.setRepositoryNode(viewNode); node.add(viewNode); } } }