org.apache.metamodel.schema.Table.getName()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(7.5k)|赞(0)|评价(0)|浏览(263)

本文整理了Java中org.apache.metamodel.schema.Table.getName()方法的一些代码示例,展示了Table.getName()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.getName()方法的具体详情如下:
包路径:org.apache.metamodel.schema.Table
类名称:Table
方法名:getName

Table.getName介绍

[英]Gets the name of this Table
[中]获取此表的名称

代码示例

代码示例来源:origin: datacleaner/DataCleaner

  1. @Override
  2. protected String getBannerTitle() {
  3. return "Save " + _table.getName() + "\nas Excel spreadsheet file";
  4. }
  5. };

代码示例来源:origin: org.eobjects.analyzerbeans/AnalyzerBeans-core

  1. @Override
  2. public TableMetadata getTableMetadata(Table table) {
  3. if (table == null) {
  4. return null;
  5. }
  6. final String tableName = table.getName();
  7. return getTableMetadataByName(tableName);
  8. }

代码示例来源:origin: datacleaner/DataCleaner

  1. @Override
  2. public String toString() {
  3. return getTable().getName();
  4. }
  5. }

代码示例来源:origin: datacleaner/DataCleaner

  1. private static String getTablePostFix(final Table table) {
  2. final String postFix;
  3. final Schema schema = table.getSchema();
  4. if (schema == null) {
  5. postFix = "." + table.getName();
  6. } else {
  7. postFix = "." + schema.getName() + "." + table.getName();
  8. }
  9. return postFix;
  10. }

代码示例来源:origin: org.apache.metamodel/MetaModel-core

  1. @Override
  2. public final List<String> getTableNames() {
  3. return getTables().stream()
  4. .map(table -> table.getName())
  5. .collect(Collectors.toList());
  6. }

代码示例来源:origin: org.eobjects.datacleaner/DataCleaner-monitor-services

  1. private Map<String, Object> createTableMap(Table table) {
  2. final Map<String, Object> map = new HashMap<>();
  3. map.put("name", table.getName());
  4. map.put("columns", createColumnList(table));
  5. return map;
  6. }

代码示例来源:origin: datacleaner/DataCleaner

  1. @Override
  2. public void rowProcessingProgress(final AnalysisJob job, final RowProcessingMetrics metrics, final int currentRow) {
  3. final Table table = metrics.getTable();
  4. final ProgressCounter progressCounter = rowCounts.get(table);
  5. if (progressCounter != null) {
  6. final boolean significant = progressCounter.setIfSignificantToUser(currentRow);
  7. if (significant) {
  8. System.out.println(currentRow + " rows processed from table: " + table.getName());
  9. }
  10. }
  11. }
  12. }

代码示例来源:origin: datacleaner/DataCleaner

  1. @Override
  2. protected Void doInBackground() throws Exception {
  3. final Schema schema = (Schema) _schemaNode.getUserObject();
  4. final List<Table> tables = schema.getTables();
  5. for (final Table table : tables) {
  6. final String name = table.getName();
  7. logger.debug("Publishing table name: {}", name);
  8. publish(table);
  9. }
  10. return null;
  11. }

代码示例来源:origin: org.apache.metamodel/MetaModel-json

  1. @Override
  2. protected DataSet materializeMainSchemaTable(Table table, List<Column> columns, int maxRows) {
  3. final DocumentConverter documentConverter = _schemaBuilder.getDocumentConverter(table);
  4. final List<SelectItem> selectItems = columns.stream().map(SelectItem::new).collect(Collectors.toList());
  5. final DataSetHeader header = new CachingDataSetHeader(selectItems);
  6. final DocumentSource documentSource = getDocumentSourceForTable(table.getName());
  7. DataSet dataSet = new DocumentSourceDataSet(header, documentSource, documentConverter);
  8. if (maxRows > 0) {
  9. dataSet = new MaxRowsDataSet(dataSet, maxRows);
  10. }
  11. return dataSet;
  12. }

代码示例来源:origin: org.apache.metamodel/MetaModel-jdbc

  1. private void loadRelations(Table table, DatabaseMetaData metaData) {
  2. Schema schema = table.getSchema();
  3. try (ResultSet rs = metaData.getImportedKeys(getCatalogName(schema), getJdbcSchemaName(schema), table
  4. .getName())) {
  5. loadRelations(rs, schema);
  6. } catch (SQLException e) {
  7. throw JdbcUtils.wrapException(e, "retrieve imported keys for " + table.getName(), JdbcActionType.METADATA);
  8. }
  9. }

代码示例来源:origin: org.apache.metamodel/MetaModel-sugarcrm

  1. @Override
  2. protected Number executeCountQuery(Table table, List<FilterItem> whereItems, boolean functionApproximationAllowed) {
  3. if (whereItems.isEmpty()) {
  4. final String session = _sessionId.get();
  5. final String moduleName = table.getName();
  6. final GetEntriesCountResult entriesCount = _service.getEntriesCount(session, moduleName, "", 0);
  7. final int resultCount = entriesCount.getResultCount();
  8. return resultCount;
  9. }
  10. return super.executeCountQuery(table, whereItems, functionApproximationAllowed);
  11. }

代码示例来源:origin: org.apache.metamodel/MetaModel-cassandra

  1. @Override
  2. protected Number executeCountQuery(Table table, List<FilterItem> whereItems, boolean functionApproximationAllowed) {
  3. if (!whereItems.isEmpty()) {
  4. // not supported - will have to be done by counting client-side
  5. logger.debug(
  6. "Not able to execute count query natively - resorting to query post-processing, which may be expensive");
  7. return null;
  8. }
  9. final Statement statement = QueryBuilder.select().countAll().from(keySpaceName, table.getName());
  10. final Row response = cassandraCluster.connect().execute(statement).one();
  11. return response.getLong(0);
  12. }

代码示例来源:origin: apache/metamodel

  1. private void loadRelations(Table table, DatabaseMetaData metaData) {
  2. Schema schema = table.getSchema();
  3. try (ResultSet rs = metaData.getImportedKeys(getCatalogName(schema), getJdbcSchemaName(schema), table
  4. .getName())) {
  5. loadRelations(rs, schema);
  6. } catch (SQLException e) {
  7. throw JdbcUtils.wrapException(e, "retrieve imported keys for " + table.getName(), JdbcActionType.METADATA);
  8. }
  9. }

代码示例来源:origin: apache/metamodel

  1. @Override
  2. public void execute() throws MetaModelException {
  3. final String tableName = getTable().getName();
  4. final DeleteTableResult result = _dataContext.getDynamoDb().deleteTable(tableName);
  5. logger.debug("Dropped table {} in request ID: {}", tableName, result.getSdkResponseMetadata().getRequestId());
  6. }

代码示例来源:origin: org.apache.metamodel/MetaModel-mongodb-mongo2

  1. @Override
  2. public void execute() throws MetaModelException {
  3. Table table = getTable();
  4. _updateCallback.removeCollection(table.getName());
  5. MutableSchema schema = (MutableSchema) table.getSchema();
  6. schema.removeTable(table);
  7. }

代码示例来源:origin: apache/metamodel

  1. @Override
  2. public void execute() throws MetaModelException {
  3. final Table table = getTable();
  4. _updateCallback.removeSheet(table.getName());
  5. final MutableSchema schema = (MutableSchema) table.getSchema();
  6. schema.removeTable(table);
  7. }

代码示例来源:origin: datacleaner/DataCleaner

  1. @Override
  2. public void rowProcessingSuccess(final AnalysisJob job, final RowProcessingMetrics metrics) {
  3. logger.info("rowProcessingSuccess: {}", job.getDatastore().getName());
  4. _progressInformationPanel.updateProgressFinished(metrics.getTable());
  5. _progressInformationPanel.addUserLog(
  6. "Processing of " + metrics.getTable().getName() + " is successful. Generating results...");
  7. }

代码示例来源:origin: apache/metamodel

  1. @Override
  2. public void execute() throws MetaModelException {
  3. final MongoCollection<Document> collection = _updateCallback.getCollection(getTable().getName());
  4. final MongoDbDataContext dataContext = _updateCallback.getDataContext();
  5. final Document query = dataContext.createMongoDbQuery(getTable(), getWhereItems(), whereItem -> {
  6. throw new UnsupportedOperationException("Unable to handle WHERE item in DELETE: " + whereItem.toSql());
  7. });
  8. DeleteResult result = collection.deleteMany(query);
  9. logger.info("Remove returned result: {}", result);
  10. }

代码示例来源:origin: org.apache.metamodel/MetaModel-hbase

  1. @Override
  2. public void execute() {
  3. // Remove from the datastore
  4. final Table table = getTable();
  5. ((HBaseDataContext) _updateCallback.getDataContext()).getHBaseClient().dropTable(table.getName());
  6. // Remove from schema
  7. ((MutableSchema) table.getSchema()).removeTable(table);
  8. }
  9. }

代码示例来源:origin: org.apache.metamodel/MetaModel-mongodb-mongo2

  1. @Override
  2. public void execute() throws MetaModelException {
  3. final DBCollection collection = _updateCallback.getCollection(getTable().getName());
  4. final MongoDbDataContext dataContext = _updateCallback.getDataContext();
  5. final BasicDBObject query = dataContext.createMongoDbQuery(getTable(), getWhereItems());
  6. WriteConcern writeConcern = _updateCallback.getWriteConcernAdvisor().adviceDeleteQuery(collection, query);
  7. final WriteResult writeResult = collection.remove(query, writeConcern);
  8. logger.info("Remove returned result: {}", writeResult);
  9. }

相关文章