@Test public void testFindAllTopics() throws Exception { SearchResult result = moneta.findAllTopics(); Assert.assertTrue(result != null); Assert.assertTrue(result.getResultData().length == 1); Assert.assertTrue(result.getResultData()[0].getValues() != null); Assert.assertTrue(result.getResultData()[0].getValues().length == 5); }
public SearchResult findAllTopics() { SearchResult result = new SearchResult(); List<Record> recordList = new ArrayList<Record>(); Record record = null; List<Value> valueList = null; for (Topic topic: MonetaEnvironment.getConfiguration().getTopicList()) { record = new Record(); recordList.add(record); valueList = new ArrayList<Value>(); valueList.add(new Value("Topic", topic.getTopicName())); valueList.add(new Value("Catalog", topic.getCatalogName())); valueList.add(new Value("Schema", topic.getSchemaName())); valueList.add(new Value("TableName", topic.getTableName())); valueList.add(new Value("DataSource", topic.getDataSourceName())); record.setValues(valueList.toArray(new Value[0])); } result.setResultData(recordList.toArray(new Record[0])); return result; }
Moneta { public SearchResult findAllTopics() { SearchResult result = new SearchResult(); List<Record> recordList = new ArrayList<Record>(); Record record = null; List<Value> valueList = null; for (Topic topic: MonetaEnvironment.getConfiguration().getTopicList()) { record = new Record(); recordList.add(record); valueList = new ArrayList<Value>(); valueList.add(new Value("Topic", topic.getTopicName())); valueList.add(new Value("Catalog", topic.getCatalogName())); valueList.add(new Value("Schema", topic.getSchemaName())); valueList.add(new Value("TableName", topic.getTableName())); valueList.add(new Value("DataSource", topic.getDataSourceName())); record.setValues(valueList.toArray(new Value[0])); } result.setResultData(recordList.toArray(new Record[0])); return result; } }
Moneta { public SearchResult findAllTopics() { SearchResult result = new SearchResult(); List<Record> recordList = new ArrayList<Record>(); Record record = null; List<Value> valueList = null; for (Topic topic: MonetaEnvironment.getConfiguration().getTopicList()) { record = new Record(); recordList.add(record); valueList = new ArrayList<Value>(); valueList.add(new Value("Topic", topic.getTopicName())); valueList.add(new Value("Catalog", topic.getCatalogName())); valueList.add(new Value("Schema", topic.getSchemaName())); valueList.add(new Value("TableName", topic.getTableName())); valueList.add(new Value("DataSource", topic.getDataSourceName())); record.setValues(valueList.toArray(new Value[0])); } result.setResultData(recordList.toArray(new Record[0])); return result; }  }
Moneta { public SearchResult findAllTopics() { SearchResult result = new SearchResult(); List<Record> recordList = new ArrayList<Record>(); Record record = null; List<Value> valueList = null; for (Topic topic: MonetaEnvironment.getConfiguration().getTopicList()) { record = new Record(); recordList.add(record); valueList = new ArrayList<Value>(); valueList.add(new Value("Topic", topic.getTopicName())); valueList.add(new Value("Catalog", topic.getCatalogName())); valueList.add(new Value("Schema", topic.getSchemaName())); valueList.add(new Value("TableName", topic.getTableName())); valueList.add(new Value("DataSource", topic.getDataSourceName())); record.setValues(valueList.toArray(new Value[0])); } result.setResultData(recordList.toArray(new Record[0])); return result; }  SearchResult find(SearchRequest request); SearchResult findAllTopics(); }
Moneta { public SearchResult findAllTopics() { SearchResult result = new SearchResult(); List<Record> recordList = new ArrayList<Record>(); Record record = null; List<Value> valueList = null; for (Topic topic: MonetaEnvironment.getConfiguration().getTopicList()) { record = new Record(); recordList.add(record); valueList = new ArrayList<Value>(); valueList.add(new Value("Topic", topic.getTopicName())); valueList.add(new Value("Catalog", topic.getCatalogName())); valueList.add(new Value("Schema", topic.getSchemaName())); valueList.add(new Value("TableName", topic.getTableName())); valueList.add(new Value("DataSource", topic.getDataSourceName())); record.setValues(valueList.toArray(new Value[0])); } result.setResultData(recordList.toArray(new Record[0])); return result; }  SearchResult find(SearchRequest request); SearchResult findAllTopics();  }