org.teiid.metadata.Table.setAnnotation()方法的使用及代码示例

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

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

Table.setAnnotation介绍

暂无

代码示例

代码示例来源:origin: org.teiid.connectors/translator-odata

String name = annotation.getName();
if (name.equalsIgnoreCase("label")) { //$NON-NLS-1$
  t.setAnnotation((String)annotation.getValue());

代码示例来源:origin: org.teiid.connectors/translator-jdbc

/**
 * 
 * @param metadataFactory
 * @param tableCatalog
 * @param tableSchema
 * @param tableName
 * @param remarks
 * @param fullName
 * @return
 */
protected Table addTable(MetadataFactory metadataFactory,
    String tableCatalog, String tableSchema, String tableName,
    String remarks, String fullName) {
  Table table = metadataFactory.addTable(useFullSchemaName?fullName:tableName);
  table.setNameInSource(getFullyQualifiedName(tableCatalog, tableSchema, tableName, true));
  //create a fqn for the table
  FullyQualifiedName fqn = new FullyQualifiedName();
  if (tableCatalog != null && !tableCatalog.isEmpty()) {
    fqn.append(getCatalogTerm(), tableCatalog);
  }
  if (tableSchema != null && !tableSchema.isEmpty()) {
    fqn.append(getSchemaTerm(), tableSchema);
  }
  fqn.append(getTableTerm(), tableName); 
  table.setProperty(FQN, fqn.toString());
  table.setSupportsUpdate(true);
  table.setAnnotation(remarks);
  return table;
}

相关文章

微信公众号

最新文章

更多