本文整理了Java中org.teiid.metadata.Table.setPrimaryKey()
方法的一些代码示例,展示了Table.setPrimaryKey()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.setPrimaryKey()
方法的具体详情如下:
包路径:org.teiid.metadata.Table
类名称:Table
方法名:setPrimaryKey
暂无
代码示例来源:origin: teiid/teiid
/**
* Adds a primary key to the given table. The column names should be in key order.
* @param name
* @param columnNames
* @param table
* @return
* @throws MetadataException
*/
public KeyRecord addPrimaryKey(String name, List<String> columnNames, Table table) {
KeyRecord primaryKey = new KeyRecord(KeyRecord.Type.Primary);
primaryKey.setParent(table);
primaryKey.setColumns(new ArrayList<Column>(columnNames.size()));
primaryKey.setName(name);
setUUID(primaryKey);
assignColumns(columnNames, table, primaryKey);
table.setPrimaryKey(primaryKey);
return primaryKey;
}
代码示例来源:origin: teiid/teiid
KeyRecord pk = new KeyRecord(KeyRecord.Type.Primary);
pk.setUUID(id);
table.setPrimaryKey(pk);
代码示例来源:origin: org.teiid/teiid-metadata
KeyRecord pk = new KeyRecord(KeyRecord.Type.Primary);
pk.setUUID(id);
table.setPrimaryKey(pk);
代码示例来源:origin: teiid/teiid
group.setPrimaryKey(key);
break;
case Index:
代码示例来源:origin: teiid/teiid
loadColumnSetRecords(primaryKey, uuidColumnMap);
primaryKey.setParent(tableRecord);
tableRecord.setPrimaryKey(primaryKey);
代码示例来源:origin: org.teiid/teiid-metadata
loadColumnSetRecords(primaryKey, uuidColumnMap);
primaryKey.setParent(tableRecord);
tableRecord.setPrimaryKey(primaryKey);
内容来源于网络,如有侵权,请联系作者删除!