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

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

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

Table.isVirtual介绍

暂无

代码示例

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

public boolean isPhysical() {
  return !isVirtual();
}

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

public boolean isVirtualGroup(final Object groupID) throws TeiidComponentException, QueryMetadataException {
  if (groupID instanceof Table) {
    return ((Table) groupID).isVirtual();
  }
  if (groupID instanceof Procedure) {
    return ((Procedure) groupID).isVirtual();
  }
  throw createInvalidRecordTypeException(groupID);
}

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

public boolean isVirtualGroup(final Object groupID) throws TeiidComponentException, QueryMetadataException {
  if (groupID instanceof Table) {
    return ((Table) groupID).isVirtual();
  }
  if (groupID instanceof Procedure) {
    return ((Procedure) groupID).isVirtual();
  }
  throw createInvalidRecordTypeException(groupID);
}

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

public boolean isVirtualGroup(final Object groupID) throws TeiidComponentException, QueryMetadataException {
  if (groupID instanceof Table) {
    return ((Table) groupID).isVirtual();
  }
  if (groupID instanceof Procedure) {
    return ((Procedure) groupID).isVirtual();
  }
  throw createInvalidRecordTypeException(groupID);
}

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

public QueryNode getVirtualPlan(final Object groupID) throws TeiidComponentException, QueryMetadataException {
  Table tableRecord = (Table) groupID;
  if (!tableRecord.isVirtual()) {
     throw new QueryMetadataException(QueryPlugin.Event.TEIID30359, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30359, tableRecord.getFullName(), "Query")); //$NON-NLS-1$
  }
  LiveTableQueryNode queryNode = new LiveTableQueryNode(tableRecord);
  return queryNode;
}

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

public QueryNode getVirtualPlan(final Object groupID) throws TeiidComponentException, QueryMetadataException {
  Table tableRecord = (Table) groupID;
  if (!tableRecord.isVirtual()) {
     throw new QueryMetadataException(QueryPlugin.Event.TEIID30359, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30359, tableRecord.getFullName(), "Query")); //$NON-NLS-1$
  }
  LiveTableQueryNode queryNode = new LiveTableQueryNode(tableRecord);
  return queryNode;
}

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

public String getInsertPlan(final Object groupID) throws TeiidComponentException, QueryMetadataException {
  Table tableRecordImpl = (Table)groupID;
  if (!tableRecordImpl.isVirtual()) {
     throw new QueryMetadataException(QueryPlugin.Event.TEIID30359, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30359, tableRecordImpl.getFullName(), "Insert")); //$NON-NLS-1$
  }
  return tableRecordImpl.isInsertPlanEnabled()?tableRecordImpl.getInsertPlan():null;
}

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

public String getInsertPlan(final Object groupID) throws TeiidComponentException, QueryMetadataException {
  Table tableRecordImpl = (Table)groupID;
  if (!tableRecordImpl.isVirtual()) {
     throw new QueryMetadataException(QueryPlugin.Event.TEIID30359, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30359, tableRecordImpl.getFullName(), "Insert")); //$NON-NLS-1$
  }
  return tableRecordImpl.isInsertPlanEnabled()?tableRecordImpl.getInsertPlan():null;
}

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

public String getDeletePlan(final Object groupID) throws TeiidComponentException, QueryMetadataException {
  Table tableRecordImpl = (Table)groupID;
  if (!tableRecordImpl.isVirtual()) {
    throw new QueryMetadataException(QueryPlugin.Event.TEIID30359, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30359, tableRecordImpl.getFullName(), "Delete")); //$NON-NLS-1$
  }
  return tableRecordImpl.isDeletePlanEnabled()?tableRecordImpl.getDeletePlan():null;
}

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

public String getUpdatePlan(final Object groupID) throws TeiidComponentException, QueryMetadataException {
  Table tableRecordImpl = (Table)groupID;
  if (!tableRecordImpl.isVirtual()) {
    throw new QueryMetadataException(QueryPlugin.Event.TEIID30359, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30359, tableRecordImpl.getFullName(), "Update")); //$NON-NLS-1$
  }
  return tableRecordImpl.isUpdatePlanEnabled()?tableRecordImpl.getUpdatePlan():null;
}

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

public String getInsertPlan(final Object groupID) throws TeiidComponentException, QueryMetadataException {
  Table tableRecordImpl = (Table)groupID;
  if (!tableRecordImpl.isVirtual()) {
     throw new QueryMetadataException(QueryPlugin.Event.TEIID30359, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30359, tableRecordImpl.getFullName(), "Insert")); //$NON-NLS-1$
  }
  return tableRecordImpl.isInsertPlanEnabled()?tableRecordImpl.getInsertPlan():null;
}

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

public String getDeletePlan(final Object groupID) throws TeiidComponentException, QueryMetadataException {
  Table tableRecordImpl = (Table)groupID;
  if (!tableRecordImpl.isVirtual()) {
    throw new QueryMetadataException(QueryPlugin.Event.TEIID30359, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30359, tableRecordImpl.getFullName(), "Delete")); //$NON-NLS-1$
  }
  return tableRecordImpl.isDeletePlanEnabled()?tableRecordImpl.getDeletePlan():null;
}

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

public String getUpdatePlan(final Object groupID) throws TeiidComponentException, QueryMetadataException {
  Table tableRecordImpl = (Table)groupID;
  if (!tableRecordImpl.isVirtual()) {
    throw new QueryMetadataException(QueryPlugin.Event.TEIID30359, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30359, tableRecordImpl.getFullName(), "Update")); //$NON-NLS-1$
  }
  return tableRecordImpl.isUpdatePlanEnabled()?tableRecordImpl.getUpdatePlan():null;
}

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

public String getDeletePlan(final Object groupID) throws TeiidComponentException, QueryMetadataException {
  Table tableRecordImpl = (Table)groupID;
  if (!tableRecordImpl.isVirtual()) {
    throw new QueryMetadataException(QueryPlugin.Event.TEIID30359, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30359, tableRecordImpl.getFullName(), "Delete")); //$NON-NLS-1$
  }
  return tableRecordImpl.isDeletePlanEnabled()?tableRecordImpl.getDeletePlan():null;
}

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

public String getUpdatePlan(final Object groupID) throws TeiidComponentException, QueryMetadataException {
  Table tableRecordImpl = (Table)groupID;
  if (!tableRecordImpl.isVirtual()) {
    throw new QueryMetadataException(QueryPlugin.Event.TEIID30359, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30359, tableRecordImpl.getFullName(), "Update")); //$NON-NLS-1$
  }
  return tableRecordImpl.isUpdatePlanEnabled()?tableRecordImpl.getUpdatePlan():null;
}

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

public void setViewDefinition(final String tableName, final String definition) {
  if (!assertInEditMode(Mode.SCHEMA)) {
    return;
  }
  Table table = (Table)getSchemaRecord(tableName, ResourceType.TABLE);
  if (!table.isVirtual()) {
    throw new org.teiid.metadata.MetadataException(QueryPlugin.Event.TEIID31238,
        QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31238, table.getFullName()));
  }
  assertGrant(Grant.Permission.Privilege.ALTER, Database.ResourceType.TABLE, table);
  table.setSelectTransformation(definition);
}

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

public void setViewDefinition(final String tableName, final String definition) {
  if (!assertInEditMode(Mode.SCHEMA)) {
    return;
  }
  Table table = (Table)getSchemaRecord(tableName, ResourceType.TABLE);
  if (!table.isVirtual()) {
    throw new org.teiid.metadata.MetadataException(QueryPlugin.Event.TEIID31238,
        QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31238, table.getFullName()));
  }
  assertGrant(Grant.Permission.Privilege.ALTER, Database.ResourceType.TABLE, table);
  table.setSelectTransformation(definition);
}

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

@Test public void testSchemaLoad() throws Exception {
  TransformationMetadata tm = VDBMetadataFactory.getVDBMetadata(UnitTestUtil.getTestDataPath() + "/Test.vdb");
  
  //ensure that datatypes are set
  Table t = tm.getGroupID("Northwind.Northwind.dbo.Employees");
  assertFalse(t.isVirtual());
}

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

public void tableCreated(Table table) {
  if (!assertInEditMode(Mode.SCHEMA)) {
    return;
  }
  assertGrant(Grant.Permission.Privilege.CREATE, Database.ResourceType.TABLE, table);
  
  Schema s = getCurrentSchema();
  setUUID(s.getUUID(), table);
  
  if (table.isVirtual() && table.getSelectTransformation() == null && table.getTableType() != Type.TemporaryTable) {
    throw new org.teiid.metadata.MetadataException(QueryPlugin.Event.TEIID31272,
        QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31272, table.getFullName()));
  }
  
  s.addTable(table);
}

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

public void tableCreated(Table table) {
  if (!assertInEditMode(Mode.SCHEMA)) {
    return;
  }
  assertGrant(Grant.Permission.Privilege.CREATE, Database.ResourceType.TABLE, table);
  
  Schema s = getCurrentSchema();
  setUUID(s.getUUID(), table);
  
  if (table.isVirtual() && table.getSelectTransformation() == null && table.getTableType() != Type.TemporaryTable) {
    throw new org.teiid.metadata.MetadataException(QueryPlugin.Event.TEIID31272,
        QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31272, table.getFullName()));
  }
  
  s.addTable(table);
}

相关文章

微信公众号

最新文章

更多