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

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

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

Table.setSupportsUpdate介绍

暂无

代码示例

代码示例来源:origin: org.teiid.connectors/translator-odata4

  1. private Table buildTable(MetadataFactory mf, String name) {
  2. Table table = mf.addTable(name);
  3. table.setSupportsUpdate(true);
  4. return table;
  5. }

代码示例来源:origin: org.teiid.connectors/translator-odata

  1. protected Table buildTable(MetadataFactory mf, EdmEntitySet entitySet) {
  2. Table table = mf.addTable(entitySet.getName());
  3. table.setSupportsUpdate(true);
  4. return table;
  5. }

代码示例来源:origin: org.teiid.connectors/translator-salesforce

  1. private void getColumnsAndRelationships(List<String> names)
  2. throws TranslatorException {
  3. DescribeSObjectResult objectMetadatas[] = connection.getObjectMetaData(names.toArray(new String[names.size()]));
  4. for (DescribeSObjectResult objectMetadata : objectMetadatas) {
  5. getRelationships(objectMetadata);
  6. Table table = this.tableMap.get(objectMetadata.getName());
  7. boolean hasUpdateableColumn = addColumns(objectMetadata, table);
  8. // Some SF objects return true for isUpdateable() but have no updateable columns.
  9. if(objectMetadata.isDeletable() || (hasUpdateableColumn && (objectMetadata.isUpdateable() || objectMetadata.isCreateable()))) {
  10. table.setSupportsUpdate(true);
  11. }
  12. }
  13. names.clear();
  14. }

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

  1. private static void removeTableOption(String key, Table table) {
  2. if (table.getProperty(key, false) != null) {
  3. table.setProperty(key, null);
  4. }
  5. removeCommonProperty(key, table);
  6. if (key.equals(DDLConstants.MATERIALIZED)) {
  7. table.setMaterialized(false);
  8. }
  9. if (key.equals(DDLConstants.MATERIALIZED_TABLE)) {
  10. table.setMaterializedTable(null);
  11. }
  12. if (key.equals(DDLConstants.UPDATABLE)) {
  13. table.setSupportsUpdate(false);
  14. }
  15. if (key.equals(DDLConstants.CARDINALITY)) {
  16. table.setCardinality(-1);
  17. }
  18. }

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

  1. private static void removeTableOption(String key, Table table) {
  2. if (table.getProperty(key, false) != null) {
  3. table.setProperty(key, null);
  4. }
  5. removeCommonProperty(key, table);
  6. if (key.equals(DDLConstants.MATERIALIZED)) {
  7. table.setMaterialized(false);
  8. }
  9. if (key.equals(DDLConstants.MATERIALIZED_TABLE)) {
  10. table.setMaterializedTable(null);
  11. }
  12. if (key.equals(DDLConstants.UPDATABLE)) {
  13. table.setSupportsUpdate(false);
  14. }
  15. if (key.equals(DDLConstants.CARDINALITY)) {
  16. table.setCardinality(-1);
  17. }
  18. }

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

  1. private static void removeTableOption(String key, Table table) {
  2. if (table.getProperty(key, false) != null) {
  3. table.setProperty(key, null);
  4. }
  5. removeCommonProperty(key, table);
  6. if (key.equals(DDLConstants.MATERIALIZED)) {
  7. table.setMaterialized(false);
  8. }
  9. if (key.equals(DDLConstants.MATERIALIZED_TABLE)) {
  10. table.setMaterializedTable(null);
  11. }
  12. if (key.equals(DDLConstants.UPDATABLE)) {
  13. table.setSupportsUpdate(false);
  14. }
  15. if (key.equals(DDLConstants.CARDINALITY)) {
  16. table.setCardinality(-1);
  17. }
  18. }

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

  1. private Table createView(String name) {
  2. Table t = addTable(name);
  3. t.setSystem(true);
  4. t.setSupportsUpdate(false);
  5. t.setVirtual(true);
  6. t.setTableType(Type.Table);
  7. return t;
  8. }

代码示例来源: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: 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.connectors/translator-odata

  1. t.setSupportsUpdate(creatable && updatable && deletable);
  2. if (!topable || !pageable) {

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

  1. public static Table createUpdatableVirtualGroup(String name, Schema model, QueryNode plan, String updatePlan) {
  2. Table table = createVirtualGroup(name, model, plan);
  3. table.setUpdatePlan(updatePlan);
  4. table.setSupportsUpdate(true);
  5. return table;
  6. }

代码示例来源:origin: org.teiid.connectors/translator-jpa

  1. private Table addEntity(MetadataFactory mf, Metamodel model, EntityType<?> entity) throws TranslatorException {
  2. Table table = mf.getSchema().getTable(entity.getName());
  3. if (table == null) {
  4. table = mf.addTable(entity.getName());
  5. table.setSupportsUpdate(true);
  6. table.setProperty(ENTITYCLASS, entity.getJavaType().getCanonicalName());
  7. addPrimaryKey(mf, model, entity, table);
  8. addSingularAttributes(mf, model, entity, table, Collections.EMPTY_LIST);
  9. }
  10. return table;
  11. }

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

  1. /**
  2. * Create a physical group with default settings.
  3. * @param name Name of physical group, must match model name
  4. * @param model Associated model
  5. * @return FakeMetadataObject Metadata object for group
  6. */
  7. public static Table createPhysicalGroup(String name, Schema model, boolean fullyQualify) {
  8. Table table = new Table();
  9. table.setName(name);
  10. model.addTable(table);
  11. table.setSupportsUpdate(true);
  12. table.setNameInSource((fullyQualify || name.lastIndexOf(".") == -1)? name : name.substring(name.lastIndexOf(".") + 1)); //$NON-NLS-1$ //$NON-NLS-2$
  13. table.setTableType(org.teiid.metadata.Table.Type.Table);
  14. return table;
  15. }

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

  1. table.setVirtual(getBooleanValue(supportFlags[0]));
  2. table.setSystem(getBooleanValue(supportFlags[1]));
  3. table.setSupportsUpdate(getBooleanValue(supportFlags[2]));
  4. if(includeMaterializationFlag(indexVersion)) {
  5. table.setMaterialized(getBooleanValue(supportFlags[3]));

代码示例来源:origin: org.teiid.connectors/translator-jdbc

  1. /**
  2. *
  3. * @param metadataFactory
  4. * @param tableCatalog
  5. * @param tableSchema
  6. * @param tableName
  7. * @param remarks
  8. * @param fullName
  9. * @return
  10. */
  11. protected Table addTable(MetadataFactory metadataFactory,
  12. String tableCatalog, String tableSchema, String tableName,
  13. String remarks, String fullName) {
  14. Table table = metadataFactory.addTable(useFullSchemaName?fullName:tableName);
  15. table.setNameInSource(getFullyQualifiedName(tableCatalog, tableSchema, tableName, true));
  16. //create a fqn for the table
  17. FullyQualifiedName fqn = new FullyQualifiedName();
  18. if (tableCatalog != null && !tableCatalog.isEmpty()) {
  19. fqn.append(getCatalogTerm(), tableCatalog);
  20. }
  21. if (tableSchema != null && !tableSchema.isEmpty()) {
  22. fqn.append(getSchemaTerm(), tableSchema);
  23. }
  24. fqn.append(getTableTerm(), tableName);
  25. table.setProperty(FQN, fqn.toString());
  26. table.setSupportsUpdate(true);
  27. table.setAnnotation(remarks);
  28. return table;
  29. }

代码示例来源:origin: org.teiid.connectors/translator-google

  1. /**
  2. * Adds new table to metadata.
  3. *
  4. * @param spreadsheet Name of the spreadsheet
  5. * @param worksheet Name of the worksheet
  6. * @throws TranslatorException
  7. */
  8. private void addTable(MetadataFactory mf, Worksheet worksheet) {
  9. if (worksheet.getColumnCount() == 0){
  10. return;
  11. }
  12. Table table = mf.addTable(worksheet.getName());
  13. table.setProperty(FQN, new FullyQualifiedName("worksheet", worksheet.getName()).toString()); //$NON-NLS-1$
  14. table.setNameInSource(worksheet.getName());
  15. if (worksheet.isHeaderEnabled()) {
  16. table.setSupportsUpdate(true);
  17. }
  18. addColumnsToTable(mf, table, worksheet);
  19. }

代码示例来源:origin: org.teiid.connectors/translator-simpledb

  1. for (String domain : domains) {
  2. Table table = metadataFactory.addTable(domain);
  3. table.setSupportsUpdate(true);

代码示例来源:origin: org.teiid.connectors/translator-mongodb

  1. if (table == null) {
  2. table = metadataFactory.addTable(tableName);
  3. table.setSupportsUpdate(true);
  4. if (parent != null) {
  5. FullyQualifiedName rn = new FullyQualifiedName("embedded", tableName); //$NON-NLS-1$

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

  1. group3Obj.setSupportsUpdate(false);
  2. RealMetadataFactory.createElement("e0", group3Obj, DataTypeManager.DefaultDataTypes.INTEGER); //$NON-NLS-1$
  3. RealMetadataFactory.createElement("e1", group3Obj, DataTypeManager.DefaultDataTypes.STRING); //$NON-NLS-1$

相关文章