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

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

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

Table.isMaterialized介绍

暂无

代码示例

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

  1. /**
  2. * @see org.teiid.query.metadata.QueryMetadataInterface#hasMaterialization(java.lang.Object)
  3. * @since 4.2
  4. */
  5. public boolean hasMaterialization(final Object groupID) throws TeiidComponentException,
  6. QueryMetadataException {
  7. Table tableRecord = (Table) groupID;
  8. return tableRecord.isMaterialized();
  9. }

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

  1. /**
  2. * @see org.teiid.query.metadata.QueryMetadataInterface#hasMaterialization(java.lang.Object)
  3. * @since 4.2
  4. */
  5. public boolean hasMaterialization(final Object groupID) throws TeiidComponentException,
  6. QueryMetadataException {
  7. Table tableRecord = (Table) groupID;
  8. return tableRecord.isMaterialized();
  9. }

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

  1. /**
  2. * @see org.teiid.query.metadata.QueryMetadataInterface#hasMaterialization(java.lang.Object)
  3. * @since 4.2
  4. */
  5. public boolean hasMaterialization(final Object groupID) throws TeiidComponentException,
  6. QueryMetadataException {
  7. Table tableRecord = (Table) groupID;
  8. return tableRecord.isMaterialized();
  9. }

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

  1. /**
  2. * @see org.teiid.query.metadata.QueryMetadataInterface#getMaterialization(java.lang.Object)
  3. * @since 4.2
  4. */
  5. public Object getMaterialization(final Object groupID) throws TeiidComponentException,
  6. QueryMetadataException {
  7. Table tableRecord = (Table) groupID;
  8. if(tableRecord.isMaterialized()) {
  9. return tableRecord.getMaterializedTable();
  10. }
  11. return null;
  12. }

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

  1. /**
  2. * @see org.teiid.query.metadata.QueryMetadataInterface#getMaterializationStage(java.lang.Object)
  3. * @since 4.2
  4. */
  5. public Object getMaterializationStage(final Object groupID) throws TeiidComponentException,
  6. QueryMetadataException {
  7. Table tableRecord = (Table) groupID;
  8. if(tableRecord.isMaterialized()) {
  9. return tableRecord.getMaterializedStageTable();
  10. }
  11. return null;
  12. }

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

  1. /**
  2. * @see org.teiid.query.metadata.QueryMetadataInterface#getMaterialization(java.lang.Object)
  3. * @since 4.2
  4. */
  5. public Object getMaterialization(final Object groupID) throws TeiidComponentException,
  6. QueryMetadataException {
  7. Table tableRecord = (Table) groupID;
  8. if(tableRecord.isMaterialized()) {
  9. return tableRecord.getMaterializedTable();
  10. }
  11. return null;
  12. }

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

  1. /**
  2. * @see org.teiid.query.metadata.QueryMetadataInterface#getMaterializationStage(java.lang.Object)
  3. * @since 4.2
  4. */
  5. public Object getMaterializationStage(final Object groupID) throws TeiidComponentException,
  6. QueryMetadataException {
  7. Table tableRecord = (Table) groupID;
  8. if(tableRecord.isMaterialized()) {
  9. return tableRecord.getMaterializedStageTable();
  10. }
  11. return null;
  12. }

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

  1. /**
  2. * @see org.teiid.query.metadata.QueryMetadataInterface#getMaterialization(java.lang.Object)
  3. * @since 4.2
  4. */
  5. public Object getMaterialization(final Object groupID) throws TeiidComponentException,
  6. QueryMetadataException {
  7. Table tableRecord = (Table) groupID;
  8. if(tableRecord.isMaterialized()) {
  9. return tableRecord.getMaterializedTable();
  10. }
  11. return null;
  12. }

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

  1. @Override
  2. protected boolean isValid(Table s, VDBMetaData vdb,
  3. List<Object> rowBuffer, Criteria condition, CommandContext cc)
  4. throws TeiidProcessingException, TeiidComponentException {
  5. if (s == null || !s.isMaterialized()) {
  6. return false;
  7. }
  8. return super.isValid(s, vdb, rowBuffer, condition, cc);
  9. }
  10. }, columns) {

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

  1. /**
  2. * @see org.teiid.query.metadata.QueryMetadataInterface#getMaterializationStage(java.lang.Object)
  3. * @since 4.2
  4. */
  5. public Object getMaterializationStage(final Object groupID) throws TeiidComponentException,
  6. QueryMetadataException {
  7. Table tableRecord = (Table) groupID;
  8. if(tableRecord.isMaterialized()) {
  9. return tableRecord.getMaterializedStageTable();
  10. }
  11. return null;
  12. }

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

  1. @Override
  2. protected boolean isValid(Table s, VDBMetaData vdb,
  3. List<Object> rowBuffer, Criteria condition, CommandContext cc)
  4. throws TeiidProcessingException, TeiidComponentException {
  5. if (s == null || !s.isMaterialized()) {
  6. return false;
  7. }
  8. return super.isValid(s, vdb, rowBuffer, condition, cc);
  9. }
  10. }, columns) {

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

  1. @Override
  2. protected boolean isValid(Table s, VDBMetaData vdb,
  3. List<Object> rowBuffer, Criteria condition, CommandContext cc)
  4. throws TeiidProcessingException, TeiidComponentException {
  5. if (s == null || !s.isMaterialized()) {
  6. return false;
  7. }
  8. return super.isValid(s, vdb, rowBuffer, condition, cc);
  9. }
  10. }, columns) {

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

  1. @Override
  2. public void fillRow(List<Object> row, Table table,
  3. VDBMetaData v, TransformationMetadata metadata,
  4. CommandContext cc, SimpleIterator<Table> iter) {
  5. row.add(v.getName());
  6. row.add(table.getParent().getName());
  7. row.add(table.getName());
  8. row.add(table.getTableType().toString());
  9. row.add(table.getNameInSource());
  10. row.add(table.isPhysical());
  11. row.add(table.supportsUpdate());
  12. row.add(table.getUUID());
  13. row.add(table.getCardinality());
  14. row.add(table.getAnnotation());
  15. row.add(table.isSystem());
  16. row.add(table.isMaterialized());
  17. row.add(table.getParent().getUUID());
  18. }
  19. });

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

  1. @Override
  2. public void fillRow(List<Object> row, Table table,
  3. VDBMetaData v, TransformationMetadata metadata,
  4. CommandContext cc, SimpleIterator<Table> iter) {
  5. row.add(v.getName());
  6. row.add(table.getParent().getName());
  7. row.add(table.getName());
  8. row.add(table.getTableType().toString());
  9. row.add(table.getNameInSource());
  10. row.add(table.isPhysical());
  11. row.add(table.supportsUpdate());
  12. row.add(table.getUUID());
  13. row.add(table.getCardinality());
  14. row.add(table.getAnnotation());
  15. row.add(table.isSystem());
  16. row.add(table.isMaterialized());
  17. row.add(table.getParent().getUUID());
  18. }
  19. });

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

  1. @Override
  2. public void fillRow(List<Object> row, Table table,
  3. VDBMetaData v, TransformationMetadata metadata,
  4. CommandContext cc, SimpleIterator<Table> iter) {
  5. row.add(v.getName());
  6. row.add(table.getParent().getName());
  7. row.add(table.getName());
  8. row.add(table.getTableType().toString());
  9. row.add(table.getNameInSource());
  10. row.add(table.isPhysical());
  11. row.add(table.supportsUpdate());
  12. row.add(table.getUUID());
  13. row.add(table.getCardinality());
  14. row.add(table.getAnnotation());
  15. row.add(table.isSystem());
  16. row.add(table.isMaterialized());
  17. row.add(table.getParent().getUUID());
  18. }
  19. });

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

  1. private void doMaterializationActions(VDBMetaData vdb, MaterializationAction action) {
  2. TransformationMetadata metadata = vdb.getAttachment(TransformationMetadata.class);
  3. if (metadata == null) {
  4. return;
  5. }
  6. Set<String> imports = vdb.getImportedModels();
  7. MetadataStore store = metadata.getMetadataStore();
  8. // schedule materialization loads and do the start actions
  9. for (Schema schema : store.getSchemaList()) {
  10. if (imports.contains(schema.getName())) {
  11. continue;
  12. }
  13. for (Table table:schema.getTables().values()) {
  14. // find external matview table
  15. if (!table.isVirtual() || !table.isMaterialized()
  16. || !Boolean.valueOf(table.getProperty(MaterializationMetadataRepository.ALLOW_MATVIEW_MANAGEMENT, false))) {
  17. continue;
  18. }
  19. action.process(table);
  20. }
  21. }
  22. }

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

  1. @Override
  2. public void loadMetadata(MetadataFactory factory, ExecutionFactory executionFactory, Object connectionFactory) throws TranslatorException {
  3. for (Table table:factory.getSchema().getTables().values()){
  4. if (table.isMaterialized()) {
  5. // external materialization
  6. if (table.getMaterializedTable() != null) {
  7. String manage = table.getProperty(ALLOW_MATVIEW_MANAGEMENT, false);
  8. if (!Boolean.valueOf(manage)) {
  9. continue;
  10. }
  11. fixScript(ON_VDB_START_SCRIPT, table);
  12. fixScript(ON_VDB_DROP_SCRIPT, table);
  13. fixScript(MATVIEW_BEFORE_LOAD_SCRIPT, table);
  14. fixScript(MATVIEW_AFTER_LOAD_SCRIPT, table);
  15. fixScript(MATVIEW_LOAD_SCRIPT, table);
  16. }
  17. else {
  18. // internal materialization
  19. }
  20. }
  21. }
  22. }

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

  1. @Override
  2. public void loadMetadata(MetadataFactory factory, ExecutionFactory executionFactory, Object connectionFactory) throws TranslatorException {
  3. for (Table table:factory.getSchema().getTables().values()){
  4. if (table.isMaterialized()) {
  5. // external materialization
  6. if (table.getMaterializedTable() != null) {
  7. String manage = table.getProperty(ALLOW_MATVIEW_MANAGEMENT, false);
  8. if (!Boolean.valueOf(manage)) {
  9. continue;
  10. }
  11. fixScript(ON_VDB_START_SCRIPT, table);
  12. fixScript(ON_VDB_DROP_SCRIPT, table);
  13. fixScript(MATVIEW_BEFORE_LOAD_SCRIPT, table);
  14. fixScript(MATVIEW_AFTER_LOAD_SCRIPT, table);
  15. fixScript(MATVIEW_LOAD_SCRIPT, table);
  16. }
  17. else {
  18. // internal materialization
  19. }
  20. }
  21. }
  22. }

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

  1. @Override
  2. public void loadMetadata(MetadataFactory factory, ExecutionFactory executionFactory, Object connectionFactory) throws TranslatorException {
  3. for (Table table:factory.getSchema().getTables().values()){
  4. if (table.isMaterialized()) {
  5. // external materialization
  6. if (table.getMaterializedTable() != null) {
  7. String manage = table.getProperty(ALLOW_MATVIEW_MANAGEMENT, false);
  8. if (!Boolean.valueOf(manage)) {
  9. continue;
  10. }
  11. fixScript(ON_VDB_START_SCRIPT, table);
  12. fixScript(ON_VDB_DROP_SCRIPT, table);
  13. fixScript(MATVIEW_BEFORE_LOAD_SCRIPT, table);
  14. fixScript(MATVIEW_AFTER_LOAD_SCRIPT, table);
  15. fixScript(MATVIEW_LOAD_SCRIPT, table);
  16. }
  17. else {
  18. // internal materialization
  19. }
  20. }
  21. }
  22. }

代码示例来源: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. }

相关文章