本文整理了Java中org.teiid.metadata.Table.getProperties()
方法的一些代码示例,展示了Table.getProperties()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.getProperties()
方法的具体详情如下:
包路径:org.teiid.metadata.Table
类名称:Table
方法名:getProperties
暂无
代码示例来源:origin: org.jboss.teiid/teiid-engine
private static void setTableOptions(Table table) {
Map<String, String> props = table.getProperties();
setCommonProperties(table, props);
String value = props.remove(DDLConstants.MATERIALIZED);
if (value != null) {
table.setMaterialized(isTrue(value));
}
value = props.remove(DDLConstants.MATERIALIZED_TABLE);
if (value != null) {
Table mattable = new Table();
mattable.setName(value);
table.setMaterializedTable(mattable);
}
value = props.remove(DDLConstants.UPDATABLE);
if (value != null) {
table.setSupportsUpdate(isTrue(value));
}
value = props.remove(DDLConstants.CARDINALITY);
if (value != null) {
table.setCardinality(Long.valueOf(value));
}
}
代码示例来源:origin: org.teiid/teiid-engine
private static void setTableOptions(Table table) {
Map<String, String> props = table.getProperties();
setCommonProperties(table, props);
String value = props.remove(DDLConstants.MATERIALIZED);
if (value != null) {
table.setMaterialized(isTrue(value));
}
value = props.remove(DDLConstants.MATERIALIZED_TABLE);
if (value != null) {
Table mattable = new Table();
mattable.setName(value);
table.setMaterializedTable(mattable);
}
value = props.remove(DDLConstants.UPDATABLE);
if (value != null) {
table.setSupportsUpdate(isTrue(value));
}
value = props.remove(DDLConstants.CARDINALITY);
if (value != null) {
table.setCardinality(Long.valueOf(value));
}
}
代码示例来源:origin: teiid/teiid
private static void setTableOptions(Table table) {
Map<String, String> props = table.getProperties();
setCommonProperties(table, props);
String value = props.remove(DDLConstants.MATERIALIZED);
if (value != null) {
table.setMaterialized(isTrue(value));
}
value = props.remove(DDLConstants.MATERIALIZED_TABLE);
if (value != null) {
Table mattable = new Table();
mattable.setName(value);
table.setMaterializedTable(mattable);
}
value = props.remove(DDLConstants.UPDATABLE);
if (value != null) {
table.setSupportsUpdate(isTrue(value));
}
value = props.remove(DDLConstants.CARDINALITY);
if (value != null) {
table.setCardinality(Long.valueOf(value));
}
}
代码示例来源:origin: teiid/teiid
private String buildTableOptions(Table table) {
StringBuilder options = new StringBuilder();
addCommonOptions(options, table);
if (table.isMaterialized()) {
addOption(options, MATERIALIZED, table.isMaterialized());
if (table.getMaterializedTable() != null) {
addOption(options, MATERIALIZED_TABLE, table.getMaterializedTable().getName());
}
}
if (table.supportsUpdate()) {
addOption(options, UPDATABLE, table.supportsUpdate());
}
if (table.getCardinality() != -1) {
if (table.getCardinality() != table.getCardinalityAsFloat()) {
addOption(options, CARDINALITY, (long)table.getCardinalityAsFloat());
} else {
addOption(options, CARDINALITY, table.getCardinality());
}
}
if (!table.getProperties().isEmpty()) {
for (String key:table.getProperties().keySet()) {
addOption(options, key, table.getProperty(key, false));
}
}
return options.toString();
}
代码示例来源:origin: org.jboss.teiid/teiid-engine
private String buildTableOptions(Table table) {
StringBuilder options = new StringBuilder();
addCommonOptions(options, table);
if (table.isMaterialized()) {
addOption(options, MATERIALIZED, table.isMaterialized());
if (table.getMaterializedTable() != null) {
addOption(options, MATERIALIZED_TABLE, table.getMaterializedTable().getName());
}
}
if (table.supportsUpdate()) {
addOption(options, UPDATABLE, table.supportsUpdate());
}
if (table.getCardinality() != -1) {
if (table.getCardinality() != table.getCardinalityAsFloat()) {
addOption(options, CARDINALITY, (long)table.getCardinalityAsFloat());
} else {
addOption(options, CARDINALITY, table.getCardinality());
}
}
if (!table.getProperties().isEmpty()) {
for (String key:table.getProperties().keySet()) {
addOption(options, key, table.getProperty(key, false));
}
}
return options.toString();
}
代码示例来源:origin: org.teiid/teiid-engine
private String buildTableOptions(Table table) {
StringBuilder options = new StringBuilder();
addCommonOptions(options, table);
if (table.isMaterialized()) {
addOption(options, MATERIALIZED, table.isMaterialized());
if (table.getMaterializedTable() != null) {
addOption(options, MATERIALIZED_TABLE, table.getMaterializedTable().getName());
}
}
if (table.supportsUpdate()) {
addOption(options, UPDATABLE, table.supportsUpdate());
}
if (table.getCardinality() != -1) {
if (table.getCardinality() != table.getCardinalityAsFloat()) {
addOption(options, CARDINALITY, (long)table.getCardinalityAsFloat());
} else {
addOption(options, CARDINALITY, table.getCardinality());
}
}
if (!table.getProperties().isEmpty()) {
for (String key:table.getProperties().keySet()) {
addOption(options, key, table.getProperty(key, false));
}
}
return options.toString();
}
代码示例来源:origin: org.teiid/teiid-olingo
for (String property:table.getProperties().keySet()) {
addTerm(normalizeTermName(property), new String[] {"EntityType"}, csdlSchema);
addStringAnnotation(entityType, csdlSchema.getAlias()+"."+normalizeTermName(property), table.getProperties().get(property));
代码示例来源:origin: teiid/teiid
assertEquals(12, table.getCardinality());
assertTrue(table.supportsUpdate());
assertEquals("BAR", table.getProperties().get("FOO"));
assertEquals("Test Table", table.getAnnotation());
内容来源于网络,如有侵权,请联系作者删除!