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

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

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

Table.isMaterialized介绍

暂无

代码示例

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

/** 
 * @see org.teiid.query.metadata.QueryMetadataInterface#hasMaterialization(java.lang.Object)
 * @since 4.2
 */
public boolean hasMaterialization(final Object groupID) throws TeiidComponentException,
                         QueryMetadataException {
  Table tableRecord = (Table) groupID;
  return tableRecord.isMaterialized();
}

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

/** 
 * @see org.teiid.query.metadata.QueryMetadataInterface#hasMaterialization(java.lang.Object)
 * @since 4.2
 */
public boolean hasMaterialization(final Object groupID) throws TeiidComponentException,
                         QueryMetadataException {
  Table tableRecord = (Table) groupID;
  return tableRecord.isMaterialized();
}

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

/** 
 * @see org.teiid.query.metadata.QueryMetadataInterface#hasMaterialization(java.lang.Object)
 * @since 4.2
 */
public boolean hasMaterialization(final Object groupID) throws TeiidComponentException,
                         QueryMetadataException {
  Table tableRecord = (Table) groupID;
  return tableRecord.isMaterialized();
}

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

/** 
 * @see org.teiid.query.metadata.QueryMetadataInterface#getMaterialization(java.lang.Object)
 * @since 4.2
 */
public Object getMaterialization(final Object groupID) throws TeiidComponentException,
                        QueryMetadataException {
  Table tableRecord = (Table) groupID;
  if(tableRecord.isMaterialized()) {
    return tableRecord.getMaterializedTable();
  }
  return null;
}

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

/** 
 * @see org.teiid.query.metadata.QueryMetadataInterface#getMaterializationStage(java.lang.Object)
 * @since 4.2
 */
public Object getMaterializationStage(final Object groupID) throws TeiidComponentException,
                           QueryMetadataException {
  Table tableRecord = (Table) groupID;
  if(tableRecord.isMaterialized()) {
    return tableRecord.getMaterializedStageTable();
  }
  return null;
}

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

/** 
 * @see org.teiid.query.metadata.QueryMetadataInterface#getMaterialization(java.lang.Object)
 * @since 4.2
 */
public Object getMaterialization(final Object groupID) throws TeiidComponentException,
                        QueryMetadataException {
  Table tableRecord = (Table) groupID;
  if(tableRecord.isMaterialized()) {
    return tableRecord.getMaterializedTable();
  }
  return null;
}

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

/** 
 * @see org.teiid.query.metadata.QueryMetadataInterface#getMaterializationStage(java.lang.Object)
 * @since 4.2
 */
public Object getMaterializationStage(final Object groupID) throws TeiidComponentException,
                           QueryMetadataException {
  Table tableRecord = (Table) groupID;
  if(tableRecord.isMaterialized()) {
    return tableRecord.getMaterializedStageTable();
  }
  return null;
}

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

/** 
 * @see org.teiid.query.metadata.QueryMetadataInterface#getMaterialization(java.lang.Object)
 * @since 4.2
 */
public Object getMaterialization(final Object groupID) throws TeiidComponentException,
                        QueryMetadataException {
  Table tableRecord = (Table) groupID;
  if(tableRecord.isMaterialized()) {
    return tableRecord.getMaterializedTable();
  }
  return null;
}

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

@Override
  protected boolean isValid(Table s, VDBMetaData vdb,
      List<Object> rowBuffer, Criteria condition, CommandContext cc)
      throws TeiidProcessingException, TeiidComponentException {
    if (s == null || !s.isMaterialized()) {
      return false;
    }
    return super.isValid(s, vdb, rowBuffer, condition, cc);
  }
}, columns) {

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

/** 
 * @see org.teiid.query.metadata.QueryMetadataInterface#getMaterializationStage(java.lang.Object)
 * @since 4.2
 */
public Object getMaterializationStage(final Object groupID) throws TeiidComponentException,
                           QueryMetadataException {
  Table tableRecord = (Table) groupID;
  if(tableRecord.isMaterialized()) {
    return tableRecord.getMaterializedStageTable();
  }
  return null;
}

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

@Override
  protected boolean isValid(Table s, VDBMetaData vdb,
      List<Object> rowBuffer, Criteria condition, CommandContext cc)
      throws TeiidProcessingException, TeiidComponentException {
    if (s == null || !s.isMaterialized()) {
      return false;
    }
    return super.isValid(s, vdb, rowBuffer, condition, cc);
  }
}, columns) {

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

@Override
  protected boolean isValid(Table s, VDBMetaData vdb,
      List<Object> rowBuffer, Criteria condition, CommandContext cc)
      throws TeiidProcessingException, TeiidComponentException {
    if (s == null || !s.isMaterialized()) {
      return false;
    }
    return super.isValid(s, vdb, rowBuffer, condition, cc);
  }
}, columns) {

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

@Override
  public void fillRow(List<Object> row, Table table,
      VDBMetaData v, TransformationMetadata metadata,
      CommandContext cc, SimpleIterator<Table> iter) {
    row.add(v.getName());
    row.add(table.getParent().getName());
    row.add(table.getName());
    row.add(table.getTableType().toString());
    row.add(table.getNameInSource());
    row.add(table.isPhysical());
    row.add(table.supportsUpdate());
    row.add(table.getUUID());
    row.add(table.getCardinality());
    row.add(table.getAnnotation());
    row.add(table.isSystem());
    row.add(table.isMaterialized());
    row.add(table.getParent().getUUID());
  }
});

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

@Override
  public void fillRow(List<Object> row, Table table,
      VDBMetaData v, TransformationMetadata metadata,
      CommandContext cc, SimpleIterator<Table> iter) {
    row.add(v.getName());
    row.add(table.getParent().getName());
    row.add(table.getName());
    row.add(table.getTableType().toString());
    row.add(table.getNameInSource());
    row.add(table.isPhysical());
    row.add(table.supportsUpdate());
    row.add(table.getUUID());
    row.add(table.getCardinality());
    row.add(table.getAnnotation());
    row.add(table.isSystem());
    row.add(table.isMaterialized());
    row.add(table.getParent().getUUID());
  }
});

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

@Override
  public void fillRow(List<Object> row, Table table,
      VDBMetaData v, TransformationMetadata metadata,
      CommandContext cc, SimpleIterator<Table> iter) {
    row.add(v.getName());
    row.add(table.getParent().getName());
    row.add(table.getName());
    row.add(table.getTableType().toString());
    row.add(table.getNameInSource());
    row.add(table.isPhysical());
    row.add(table.supportsUpdate());
    row.add(table.getUUID());
    row.add(table.getCardinality());
    row.add(table.getAnnotation());
    row.add(table.isSystem());
    row.add(table.isMaterialized());
    row.add(table.getParent().getUUID());
  }
});

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

private void doMaterializationActions(VDBMetaData vdb, MaterializationAction action) {
  TransformationMetadata metadata = vdb.getAttachment(TransformationMetadata.class);
  if (metadata == null) {
    return;
  }
  
  Set<String> imports = vdb.getImportedModels();
  MetadataStore store = metadata.getMetadataStore();
  // schedule materialization loads and do the start actions
  for (Schema schema : store.getSchemaList()) {
    if (imports.contains(schema.getName())) {
      continue;
    }
    for (Table table:schema.getTables().values()) {
      // find external matview table
      if (!table.isVirtual() || !table.isMaterialized() 
          || !Boolean.valueOf(table.getProperty(MaterializationMetadataRepository.ALLOW_MATVIEW_MANAGEMENT, false))) {
        continue;
      }
      action.process(table);
    }
  }
}

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

@Override
public void loadMetadata(MetadataFactory factory, ExecutionFactory executionFactory, Object connectionFactory) throws TranslatorException {
  for (Table table:factory.getSchema().getTables().values()){
    if (table.isMaterialized()) {
      // external materialization
      if (table.getMaterializedTable() != null) {
        String manage = table.getProperty(ALLOW_MATVIEW_MANAGEMENT, false); 
        if (!Boolean.valueOf(manage)) {
          continue;
        }
        fixScript(ON_VDB_START_SCRIPT, table);
        fixScript(ON_VDB_DROP_SCRIPT, table);
        fixScript(MATVIEW_BEFORE_LOAD_SCRIPT, table);        
        fixScript(MATVIEW_AFTER_LOAD_SCRIPT, table);
        fixScript(MATVIEW_LOAD_SCRIPT, table);
      }
      else {
        // internal materialization
      }
    }
  }
}

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

@Override
public void loadMetadata(MetadataFactory factory, ExecutionFactory executionFactory, Object connectionFactory) throws TranslatorException {
  for (Table table:factory.getSchema().getTables().values()){
    if (table.isMaterialized()) {
      // external materialization
      if (table.getMaterializedTable() != null) {
        String manage = table.getProperty(ALLOW_MATVIEW_MANAGEMENT, false); 
        if (!Boolean.valueOf(manage)) {
          continue;
        }
        fixScript(ON_VDB_START_SCRIPT, table);
        fixScript(ON_VDB_DROP_SCRIPT, table);
        fixScript(MATVIEW_BEFORE_LOAD_SCRIPT, table);        
        fixScript(MATVIEW_AFTER_LOAD_SCRIPT, table);
        fixScript(MATVIEW_LOAD_SCRIPT, table);
      }
      else {
        // internal materialization
      }
    }
  }
}

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

@Override
public void loadMetadata(MetadataFactory factory, ExecutionFactory executionFactory, Object connectionFactory) throws TranslatorException {
  for (Table table:factory.getSchema().getTables().values()){
    if (table.isMaterialized()) {
      // external materialization
      if (table.getMaterializedTable() != null) {
        String manage = table.getProperty(ALLOW_MATVIEW_MANAGEMENT, false); 
        if (!Boolean.valueOf(manage)) {
          continue;
        }
        fixScript(ON_VDB_START_SCRIPT, table);
        fixScript(ON_VDB_DROP_SCRIPT, table);
        fixScript(MATVIEW_BEFORE_LOAD_SCRIPT, table);        
        fixScript(MATVIEW_AFTER_LOAD_SCRIPT, table);
        fixScript(MATVIEW_LOAD_SCRIPT, table);
      }
      else {
        // internal materialization
      }
    }
  }
}

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

相关文章

微信公众号

最新文章

更多