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

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

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

Table.getProperties介绍

暂无

代码示例

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

  1. private static void setTableOptions(Table table) {
  2. Map<String, String> props = table.getProperties();
  3. setCommonProperties(table, props);
  4. String value = props.remove(DDLConstants.MATERIALIZED);
  5. if (value != null) {
  6. table.setMaterialized(isTrue(value));
  7. }
  8. value = props.remove(DDLConstants.MATERIALIZED_TABLE);
  9. if (value != null) {
  10. Table mattable = new Table();
  11. mattable.setName(value);
  12. table.setMaterializedTable(mattable);
  13. }
  14. value = props.remove(DDLConstants.UPDATABLE);
  15. if (value != null) {
  16. table.setSupportsUpdate(isTrue(value));
  17. }
  18. value = props.remove(DDLConstants.CARDINALITY);
  19. if (value != null) {
  20. table.setCardinality(Long.valueOf(value));
  21. }
  22. }

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

  1. private static void setTableOptions(Table table) {
  2. Map<String, String> props = table.getProperties();
  3. setCommonProperties(table, props);
  4. String value = props.remove(DDLConstants.MATERIALIZED);
  5. if (value != null) {
  6. table.setMaterialized(isTrue(value));
  7. }
  8. value = props.remove(DDLConstants.MATERIALIZED_TABLE);
  9. if (value != null) {
  10. Table mattable = new Table();
  11. mattable.setName(value);
  12. table.setMaterializedTable(mattable);
  13. }
  14. value = props.remove(DDLConstants.UPDATABLE);
  15. if (value != null) {
  16. table.setSupportsUpdate(isTrue(value));
  17. }
  18. value = props.remove(DDLConstants.CARDINALITY);
  19. if (value != null) {
  20. table.setCardinality(Long.valueOf(value));
  21. }
  22. }

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

  1. private static void setTableOptions(Table table) {
  2. Map<String, String> props = table.getProperties();
  3. setCommonProperties(table, props);
  4. String value = props.remove(DDLConstants.MATERIALIZED);
  5. if (value != null) {
  6. table.setMaterialized(isTrue(value));
  7. }
  8. value = props.remove(DDLConstants.MATERIALIZED_TABLE);
  9. if (value != null) {
  10. Table mattable = new Table();
  11. mattable.setName(value);
  12. table.setMaterializedTable(mattable);
  13. }
  14. value = props.remove(DDLConstants.UPDATABLE);
  15. if (value != null) {
  16. table.setSupportsUpdate(isTrue(value));
  17. }
  18. value = props.remove(DDLConstants.CARDINALITY);
  19. if (value != null) {
  20. table.setCardinality(Long.valueOf(value));
  21. }
  22. }

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

  1. private String buildTableOptions(Table table) {
  2. StringBuilder options = new StringBuilder();
  3. addCommonOptions(options, table);
  4. if (table.isMaterialized()) {
  5. addOption(options, MATERIALIZED, table.isMaterialized());
  6. if (table.getMaterializedTable() != null) {
  7. addOption(options, MATERIALIZED_TABLE, table.getMaterializedTable().getName());
  8. }
  9. }
  10. if (table.supportsUpdate()) {
  11. addOption(options, UPDATABLE, table.supportsUpdate());
  12. }
  13. if (table.getCardinality() != -1) {
  14. if (table.getCardinality() != table.getCardinalityAsFloat()) {
  15. addOption(options, CARDINALITY, (long)table.getCardinalityAsFloat());
  16. } else {
  17. addOption(options, CARDINALITY, table.getCardinality());
  18. }
  19. }
  20. if (!table.getProperties().isEmpty()) {
  21. for (String key:table.getProperties().keySet()) {
  22. addOption(options, key, table.getProperty(key, false));
  23. }
  24. }
  25. return options.toString();
  26. }

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

  1. private String buildTableOptions(Table table) {
  2. StringBuilder options = new StringBuilder();
  3. addCommonOptions(options, table);
  4. if (table.isMaterialized()) {
  5. addOption(options, MATERIALIZED, table.isMaterialized());
  6. if (table.getMaterializedTable() != null) {
  7. addOption(options, MATERIALIZED_TABLE, table.getMaterializedTable().getName());
  8. }
  9. }
  10. if (table.supportsUpdate()) {
  11. addOption(options, UPDATABLE, table.supportsUpdate());
  12. }
  13. if (table.getCardinality() != -1) {
  14. if (table.getCardinality() != table.getCardinalityAsFloat()) {
  15. addOption(options, CARDINALITY, (long)table.getCardinalityAsFloat());
  16. } else {
  17. addOption(options, CARDINALITY, table.getCardinality());
  18. }
  19. }
  20. if (!table.getProperties().isEmpty()) {
  21. for (String key:table.getProperties().keySet()) {
  22. addOption(options, key, table.getProperty(key, false));
  23. }
  24. }
  25. return options.toString();
  26. }

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

  1. private String buildTableOptions(Table table) {
  2. StringBuilder options = new StringBuilder();
  3. addCommonOptions(options, table);
  4. if (table.isMaterialized()) {
  5. addOption(options, MATERIALIZED, table.isMaterialized());
  6. if (table.getMaterializedTable() != null) {
  7. addOption(options, MATERIALIZED_TABLE, table.getMaterializedTable().getName());
  8. }
  9. }
  10. if (table.supportsUpdate()) {
  11. addOption(options, UPDATABLE, table.supportsUpdate());
  12. }
  13. if (table.getCardinality() != -1) {
  14. if (table.getCardinality() != table.getCardinalityAsFloat()) {
  15. addOption(options, CARDINALITY, (long)table.getCardinalityAsFloat());
  16. } else {
  17. addOption(options, CARDINALITY, table.getCardinality());
  18. }
  19. }
  20. if (!table.getProperties().isEmpty()) {
  21. for (String key:table.getProperties().keySet()) {
  22. addOption(options, key, table.getProperty(key, false));
  23. }
  24. }
  25. return options.toString();
  26. }

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

  1. for (String property:table.getProperties().keySet()) {
  2. addTerm(normalizeTermName(property), new String[] {"EntityType"}, csdlSchema);
  3. addStringAnnotation(entityType, csdlSchema.getAlias()+"."+normalizeTermName(property), table.getProperties().get(property));

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

  1. assertEquals(12, table.getCardinality());
  2. assertTrue(table.supportsUpdate());
  3. assertEquals("BAR", table.getProperties().get("FOO"));
  4. assertEquals("Test Table", table.getAnnotation());

相关文章