本文整理了Java中org.teiid.metadata.Table.setNameInSource()
方法的一些代码示例,展示了Table.setNameInSource()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.setNameInSource()
方法的具体详情如下:
包路径:org.teiid.metadata.Table
类名称:Table
方法名:setNameInSource
暂无
代码示例来源:origin: teiid/teiid
/**
* Create a physical group with default settings.
* @param name Name of physical group, must match model name
* @param model Associated model
* @return FakeMetadataObject Metadata object for group
*/
public static Table createPhysicalGroup(String name, Schema model, boolean fullyQualify) {
Table table = new Table();
table.setName(name);
model.addTable(table);
table.setSupportsUpdate(true);
table.setNameInSource((fullyQualify || name.lastIndexOf(".") == -1)? name : name.substring(name.lastIndexOf(".") + 1)); //$NON-NLS-1$ //$NON-NLS-2$
table.setTableType(org.teiid.metadata.Table.Type.Table);
return table;
}
代码示例来源:origin: org.teiid.connectors/translator-salesforce
private void addTable(DescribeGlobalSObjectResult objectMetadata) {
String name = objectMetadata.getName();
if (normalizeNames) {
name = NameUtil.normalizeName(name);
}
if (!allowedToAdd(name)) {
return;
}
Table table = metadataFactory.addTable(name);
FullyQualifiedName fqn = new FullyQualifiedName("sobject", objectMetadata.getName()); //$NON-NLS-1$
table.setProperty(FQN, fqn.toString());
table.setNameInSource(objectMetadata.getName());
tableMap.put(objectMetadata.getName(), table);
table.setProperty(TABLE_CUSTOM, String.valueOf(objectMetadata.isCustom()));
table.setProperty(TABLE_SUPPORTS_CREATE, String.valueOf(objectMetadata.isCreateable()));
table.setProperty(TABLE_SUPPORTS_DELETE, String.valueOf(objectMetadata.isDeletable()));
table.setProperty(TABLE_SUPPORTS_MERGE, String.valueOf(objectMetadata.isMergeable()));
table.setProperty(TABLE_SUPPORTS_QUERY, String.valueOf(objectMetadata.isQueryable()));
table.setProperty(TABLE_SUPPORTS_REPLICATE, String.valueOf(objectMetadata.isReplicateable()));
table.setProperty(TABLE_SUPPORTS_RETRIEVE, String.valueOf(objectMetadata.isRetrieveable()));
table.setProperty(TABLE_SUPPORTS_SEARCH, String.valueOf(objectMetadata.isSearchable()));
}
代码示例来源:origin: org.teiid.connectors/translator-excel
table.setNameInSource(sheet.getSheetName());
table.setProperty(ExcelMetadataProcessor.FILE, originalName);
代码示例来源:origin: org.teiid.connectors/translator-odata4
private Table addNavigationAsTable(MetadataFactory mf, XMLMetadata metadata, Table fromTable,
CsdlNavigationProperty property) throws TranslatorException {
String name = join(fromTable.getName(), NAME_SEPARATOR, property.getName());
Table toTable = addTable(mf, name, property.getType(),
property.isCollection()?ODataType.NAVIGATION_COLLECTION:ODataType.NAVIGATION,
metadata);
toTable.setNameInSource(property.getName());
KeyRecord pk = fromTable.getPrimaryKey();
List<String> columnNames = new ArrayList<String>();
for (Column c : pk.getColumns()) {
String columnName = join(fromTable.getName(), NAME_SEPARATOR, c.getName());
Column column = mf.addColumn(columnName, c.getRuntimeType(), toTable);
column.setProperty(PSEUDO, String.valueOf(Boolean.TRUE));
columnNames.add(columnName);
}
mf.addForeignKey("FK0", columnNames, getColumnNames(pk.getColumns()), fromTable.getFullName(), toTable);
return toTable;
}
代码示例来源: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;
}
代码示例来源:origin: org.teiid.connectors/translator-google
/**
* Adds new table to metadata.
*
* @param spreadsheet Name of the spreadsheet
* @param worksheet Name of the worksheet
* @throws TranslatorException
*/
private void addTable(MetadataFactory mf, Worksheet worksheet) {
if (worksheet.getColumnCount() == 0){
return;
}
Table table = mf.addTable(worksheet.getName());
table.setProperty(FQN, new FullyQualifiedName("worksheet", worksheet.getName()).toString()); //$NON-NLS-1$
table.setNameInSource(worksheet.getName());
if (worksheet.isHeaderEnabled()) {
table.setSupportsUpdate(true);
}
addColumnsToTable(mf, table, worksheet);
}
代码示例来源:origin: org.teiid.connectors/translator-odata4
toTable.setNameInSource(binding.getTarget());
代码示例来源:origin: org.teiid.connectors/translator-odata4
childTable.setNameInSource(parentTable.getNameInSource()+"/"+parentProperty.getName());
} else {
childTable.setNameInSource(parentProperty.getName());
内容来源于网络,如有侵权,请联系作者删除!