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

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

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

Table.setPrimaryKey介绍

暂无

代码示例

代码示例来源:origin: teiid/teiid

  1. /**
  2. * Adds a primary key to the given table. The column names should be in key order.
  3. * @param name
  4. * @param columnNames
  5. * @param table
  6. * @return
  7. * @throws MetadataException
  8. */
  9. public KeyRecord addPrimaryKey(String name, List<String> columnNames, Table table) {
  10. KeyRecord primaryKey = new KeyRecord(KeyRecord.Type.Primary);
  11. primaryKey.setParent(table);
  12. primaryKey.setColumns(new ArrayList<Column>(columnNames.size()));
  13. primaryKey.setName(name);
  14. setUUID(primaryKey);
  15. assignColumns(columnNames, table, primaryKey);
  16. table.setPrimaryKey(primaryKey);
  17. return primaryKey;
  18. }

代码示例来源:origin: teiid/teiid

  1. KeyRecord pk = new KeyRecord(KeyRecord.Type.Primary);
  2. pk.setUUID(id);
  3. table.setPrimaryKey(pk);

代码示例来源:origin: org.teiid/teiid-metadata

  1. KeyRecord pk = new KeyRecord(KeyRecord.Type.Primary);
  2. pk.setUUID(id);
  3. table.setPrimaryKey(pk);

代码示例来源:origin: teiid/teiid

  1. group.setPrimaryKey(key);
  2. break;
  3. case Index:

代码示例来源:origin: teiid/teiid

  1. loadColumnSetRecords(primaryKey, uuidColumnMap);
  2. primaryKey.setParent(tableRecord);
  3. tableRecord.setPrimaryKey(primaryKey);

代码示例来源:origin: org.teiid/teiid-metadata

  1. loadColumnSetRecords(primaryKey, uuidColumnMap);
  2. primaryKey.setParent(tableRecord);
  3. tableRecord.setPrimaryKey(primaryKey);

相关文章