本文整理了Java中org.teiid.metadata.Procedure.isVirtual()
方法的一些代码示例,展示了Procedure.isVirtual()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Procedure.isVirtual()
方法的具体详情如下:
包路径:org.teiid.metadata.Procedure
类名称:Procedure
方法名:isVirtual
暂无
代码示例来源:origin: teiid/teiid
public Type getType() {
if (isFunction()) {
if (isVirtual()) {
return Type.UDF;
}
return Type.Function;
}
if (isVirtual()) {
return Type.StoredQuery;
}
return Type.StoredProc;
}
代码示例来源: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: 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: teiid/teiid
public void setProcedureDefinition(final String procedureName, final String definition) {
if (!assertInEditMode(Mode.SCHEMA)) {
return;
}
Procedure procedure = (Procedure)getSchemaRecord(procedureName, ResourceType.PROCEDURE);
assertGrant(Grant.Permission.Privilege.ALTER, Database.ResourceType.PROCEDURE, procedure);
if (!procedure.isVirtual()) {
throw new org.teiid.metadata.MetadataException(QueryPlugin.Event.TEIID31238,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31238, procedure.getFullName()));
}
procedure.setQueryPlan(definition);
}
代码示例来源:origin: org.teiid/teiid-engine
private void listPhysicalTables(Collection<AbstractMetadataRecord> records, TableFilter tableFilter) {
for (AbstractMetadataRecord record : records) {
if (record instanceof Table) {
Table table = (Table)record;
if (table.isPhysical()) {
tableFilter.accept(table);
} else {
listPhysicalTables(table.getIncomingObjects(), tableFilter);
}
} else if (record instanceof Procedure) {
Procedure proc = (Procedure)record;
if (proc.isVirtual()) {
listPhysicalTables(proc.getIncomingObjects(), tableFilter);
}
}
}
}
代码示例来源:origin: teiid/teiid
private void listPhysicalTables(Collection<AbstractMetadataRecord> records, TableFilter tableFilter) {
for (AbstractMetadataRecord record : records) {
if (record instanceof Table) {
Table table = (Table)record;
if (table.isPhysical()) {
tableFilter.accept(table);
} else {
listPhysicalTables(table.getIncomingObjects(), tableFilter);
}
} else if (record instanceof Procedure) {
Procedure proc = (Procedure)record;
if (proc.isVirtual()) {
listPhysicalTables(proc.getIncomingObjects(), tableFilter);
}
}
}
}
代码示例来源:origin: org.teiid/teiid-engine
public void setProcedureDefinition(final String procedureName, final String definition) {
if (!assertInEditMode(Mode.SCHEMA)) {
return;
}
Procedure procedure = (Procedure)getSchemaRecord(procedureName, ResourceType.PROCEDURE);
assertGrant(Grant.Permission.Privilege.ALTER, Database.ResourceType.PROCEDURE, procedure);
if (!procedure.isVirtual()) {
throw new org.teiid.metadata.MetadataException(QueryPlugin.Event.TEIID31238,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31238, procedure.getFullName()));
}
procedure.setQueryPlan(definition);
}
代码示例来源:origin: org.jboss.teiid/teiid-engine
private void listPhysicalTables(Collection<AbstractMetadataRecord> records, TableFilter tableFilter) {
for (AbstractMetadataRecord record : records) {
if (record instanceof Table) {
Table table = (Table)record;
if (table.isPhysical()) {
tableFilter.accept(table);
} else {
listPhysicalTables(table.getIncomingObjects(), tableFilter);
}
} else if (record instanceof Procedure) {
Procedure proc = (Procedure)record;
if (proc.isVirtual()) {
listPhysicalTables(proc.getIncomingObjects(), tableFilter);
}
}
}
}
代码示例来源:origin: org.teiid/teiid-runtime
@Override
public void loadMetadata(MetadataFactory factory,
ExecutionFactory<Object, Object> executionFactory, Object connectionFactory)
throws TranslatorException {
Schema s = factory.getSchema();
for (Table t : s.getTables().values()) {
if (!t.isPhysical()) {
continue;
}
Column c = t.getColumnByName(multiSourceColumnName);
if (c == null) {
c = factory.addColumn(multiSourceColumnName, DataTypeManager.DefaultDataTypes.STRING, t);
MultiSourceMetadataWrapper.setMultiSourceElementMetadata(c);
}
}
outer: for (Procedure p : s.getProcedures().values()) {
if (p.isVirtual()) {
continue;
}
for (ProcedureParameter pp : p.getParameters()) {
if (multiSourceColumnName.equalsIgnoreCase(pp.getName())) {
continue outer;
}
}
ProcedureParameter pp = factory.addProcedureParameter(multiSourceColumnName, DataTypeManager.DefaultDataTypes.STRING, Type.In, p);
pp.setNullType(NullType.Nullable);
}
}
代码示例来源:origin: org.teiid/teiid-engine
public void procedureDropped(String procedureName, Boolean virtual) {
if (!assertInEditMode(Mode.SCHEMA)) {
return;
}
Procedure procedure = (Procedure)getSchemaRecord(procedureName, ResourceType.PROCEDURE);
if (virtual != null && virtual^procedure.isVirtual()) {
throw new org.teiid.metadata.MetadataException(QueryPlugin.Event.TEIID31273,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31273, procedure.getFullName()));
}
assertGrant(Grant.Permission.Privilege.DROP, Database.ResourceType.PROCEDURE,
procedure);
Schema s = procedure.getParent();
s.removeProcedure(procedureName);
}
代码示例来源:origin: teiid/teiid
public void procedureDropped(String procedureName, Boolean virtual) {
if (!assertInEditMode(Mode.SCHEMA)) {
return;
}
Procedure procedure = (Procedure)getSchemaRecord(procedureName, ResourceType.PROCEDURE);
if (virtual != null && virtual^procedure.isVirtual()) {
throw new org.teiid.metadata.MetadataException(QueryPlugin.Event.TEIID31273,
QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31273, procedure.getFullName()));
}
assertGrant(Grant.Permission.Privilege.DROP, Database.ResourceType.PROCEDURE,
procedure);
Schema s = procedure.getParent();
s.removeProcedure(procedureName);
}
代码示例来源:origin: org.teiid/teiid-metadata
FunctionMethod function = new FunctionMethod(procedureRecord.getName(), procedureRecord.getAnnotation(), model.getName(), procedureRecord.isVirtual()?PushDown.CAN_PUSHDOWN:PushDown.MUST_PUSHDOWN,
null, null, args, outputParam, false, Determinism.DETERMINISTIC);
function.setUUID(procedureRecord.getUUID());
if(procedureRecord.isVirtual()) {
TransformationRecordImpl transformRecord = (TransformationRecordImpl)getRecordByType(procedureRecord.getUUID(), MetadataConstants.RECORD_TYPE.PROC_TRANSFORM, false);
if(transformRecord != null) {
代码示例来源:origin: teiid/teiid
if(procRecord.isVirtual()) {
QueryNode queryNode = new LiveQueryNode(procRecord);
procInfo.setQueryPlan(queryNode);
代码示例来源:origin: org.teiid/teiid-engine
public static FunctionMethod createFunctionMethod(Procedure proc) {
FunctionMethod method = new FunctionMethod();
method.setName(proc.getName());
method.setPushdown(proc.isVirtual()?FunctionMethod.PushDown.CAN_PUSHDOWN:FunctionMethod.PushDown.MUST_PUSHDOWN);
代码示例来源:origin: org.jboss.teiid/teiid-engine
if (procedure.isVirtual()) {
append(VIRTUAL);
if (procedure.isVirtual()) {
append(NEWLINE).append(SQLConstants.Reserved.AS).append(NEWLINE);
String plan = procedure.getQueryPlan();
代码示例来源:origin: teiid/teiid
private void visit(Procedure procedure) {
append(CREATE).append(SPACE);
if (procedure.isVirtual()) {
append(VIRTUAL);
if (procedure.isVirtual()) {
append(NEWLINE).append(SQLConstants.Reserved.AS).append(NEWLINE);
String plan = procedure.getQueryPlan();
代码示例来源:origin: teiid/teiid
assertNotNull(proc);
assertFalse(proc.isVirtual());
assertFalse(proc.isFunction());
代码示例来源:origin: org.teiid/teiid-engine
private void visit(Procedure procedure) {
append(CREATE).append(SPACE);
if (procedure.isVirtual()) {
append(VIRTUAL);
if (procedure.isVirtual()) {
append(NEWLINE).append(SQLConstants.Reserved.AS).append(NEWLINE);
String plan = procedure.getQueryPlan();
代码示例来源:origin: teiid/teiid
assertNotNull(proc);
assertTrue(proc.isVirtual());
assertFalse(proc.isFunction());
内容来源于网络,如有侵权,请联系作者删除!