本文整理了Java中org.teiid.metadata.Table.getMaterializedTable()
方法的一些代码示例,展示了Table.getMaterializedTable()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.getMaterializedTable()
方法的具体详情如下:
包路径:org.teiid.metadata.Table
类名称:Table
方法名:getMaterializedTable
暂无
代码示例来源: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.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: 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.teiid/teiid-runtime
@Override
public void process(Table table) {
if (table.getMaterializedTable() == null) {
return;
}
String remove = table.getProperty(MaterializationMetadataRepository.ON_VDB_DROP_SCRIPT, false);
if (remove != null) {
try {
executeQuery(vdb, remove);
} catch (SQLException e) {
LogManager.logWarning(LogConstants.CTX_MATVIEWS, e, e.getMessage());
}
}
}
});
代码示例来源:origin: teiid/teiid
Integer cardinaltity = null;
Boolean valid = null;
if (table.getMaterializedTable() == null) {
GlobalTableStore globalStore = cc.getGlobalTableStore();
matTableName = RelationalPlanner.MAT_PREFIX+table.getFullName().toUpperCase();
Table t = table.getMaterializedTable();
matTableName = t.getName();
targetSchema = t.getParent().getName();
代码示例来源:origin: org.teiid/teiid-engine
Integer cardinaltity = null;
Boolean valid = null;
if (table.getMaterializedTable() == null) {
GlobalTableStore globalStore = cc.getGlobalTableStore();
matTableName = RelationalPlanner.MAT_PREFIX+table.getFullName().toUpperCase();
Table t = table.getMaterializedTable();
matTableName = t.getName();
targetSchema = t.getParent().getName();
代码示例来源: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.teiid/teiid-runtime
@Override
public void process(final Table table) {
if (table.getMaterializedTable() == null) {
createInternalMaterializationJobs(cvdb, vdb, table);
return;
代码示例来源: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: 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
Integer cardinaltity = null;
Boolean valid = null;
if (table.getMaterializedTable() == null) {
GlobalTableStore globalStore = cc.getGlobalTableStore();
matTableName = RelationalPlanner.MAT_PREFIX+table.getFullName().toUpperCase();
Table t = table.getMaterializedTable();
matTableName = t.getName();
targetSchema = t.getParent().getName();
代码示例来源: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: 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-olingo
if (table.getMaterializedTable() != null) {
addStringAnnotation(entityType, "teiid.MATERIALIZED_TABLE", table.getMaterializedTable().getFullName());
代码示例来源:origin: org.teiid/teiid-runtime
Schema schema = store.getSchema(model.getName());
for (Table t:schema.getTables().values()) {
if (t.isVirtual() && t.isMaterialized() && t.getMaterializedTable() != null) {
String allow = t.getProperty(MaterializationMetadataRepository.ALLOW_MATVIEW_MANAGEMENT, false);
if (allow == null || !Boolean.valueOf(allow)) {
代码示例来源:origin: teiid/teiid
@Test
public void testExternalMaterializationValidate() throws Exception {
String ddl = "CREATE FOREIGN TABLE G1(e1 integer, e2 varchar);"
+ STATUS;
String ddl2 = "CREATE VIEW G2 OPTIONS (MATERIALIZED 'true', MATERIALIZED_TABLE 'pm1.G1', \"teiid_rel:MATVIEW_STATUS_TABLE\" 'pm1.status', \"teiid_rel:MATVIEW_LOAD_SCRIPT\" 'begin end') AS SELECT * FROM pm1.G1";
buildModel("pm1", true, this.vdb, this.store, ddl);
buildModel("vm1", false, this.vdb, this.store, ddl2);
buildTransformationMetadata();
ValidatorReport report = new ValidatorReport();
report = new MetadataValidator().validate(this.vdb, this.store);
assertFalse(printError(report), report.hasItems());
assertNotNull("pm1.G1", store.getSchema("vm1").getTable("G2").getMaterializedTable());
assertEquals("G1", store.getSchema("vm1").getTable("G2").getMaterializedTable().getName());
}
代码示例来源:origin: org.teiid/teiid-metadata
tableRecord.setMaterializedTable((Table)getByType(MetadataConstants.RECORD_TYPE.TABLE).get(tableRecord.getMaterializedTable().getUUID()));
代码示例来源:origin: teiid/teiid
tableRecord.setMaterializedTable((Table)getByType(MetadataConstants.RECORD_TYPE.TABLE).get(tableRecord.getMaterializedTable().getUUID()));
代码示例来源:origin: org.jboss.teiid/teiid-engine
if (t.isVirtual() && t.isMaterialized() && t.getMaterializedTable() == null) {
List<KeyRecord> fbis = t.getFunctionBasedIndexes();
List<GroupSymbol> groups = Arrays.asList(symbol);
内容来源于网络,如有侵权,请联系作者删除!