diff --git a/api/src/main/java/org/teiid/translator/BaseDelegatingExecutionFactory.java b/api/src/main/java/org/teiid/translator/BaseDelegatingExecutionFactory.java index 2ec7b37454..946da2d744 100644 --- a/api/src/main/java/org/teiid/translator/BaseDelegatingExecutionFactory.java +++ b/api/src/main/java/org/teiid/translator/BaseDelegatingExecutionFactory.java @@ -446,12 +446,12 @@ public boolean supportsArrayType() { return delegate.supportsArrayType(); } @Override - public String getNativeQueryProcedureName() { - return delegate.getNativeQueryProcedureName(); - } - - public boolean supportsNativeQueries() { - return delegate.supportsNativeQueries(); + public String getDirectQueryProcedureName() { + return delegate.getDirectQueryProcedureName(); + } + @Override + public boolean supportsDirectQueryProcedure() { + return delegate.supportsDirectQueryProcedure(); } @Override public ProcedureExecution createDirectExecution(List arguments, diff --git a/api/src/main/java/org/teiid/translator/ExecutionFactory.java b/api/src/main/java/org/teiid/translator/ExecutionFactory.java index 2c2d4ba1fc..a7410bcf25 100644 --- a/api/src/main/java/org/teiid/translator/ExecutionFactory.java +++ b/api/src/main/java/org/teiid/translator/ExecutionFactory.java @@ -296,7 +296,7 @@ public Execution createExecution(Command command, ExecutionContext executionCont //to explicitly set this proc as direct. //the other approach would be to addd a native system stored procedure, but that would require //special security semantics, whereas this proc can be secured on a schema basis - if (supportsNativeQueries() && obj.getMetadataObject().getName().equals(getNativeQueryProcedureName())) { + if (supportsDirectQueryProcedure() && obj.getMetadataObject().getName().equals(getDirectQueryProcedureName())) { List arguments = obj.getArguments(); return createDirectExecution(arguments, command, executionContext, metadata, connection); } @@ -1102,31 +1102,70 @@ public boolean supportsArrayType() { } /** - * True, if this translator supports execution of source specific commands unaltered through 'native' procedure. + * True, if this translator supports execution of source specific commands unaltered through a direct procedure. + * @deprecated + * @see #supportsDirectQueryProcedure() * @return */ - @TranslatorProperty(display="Supports Native Queries", description="True, if this translator supports execution of source specific commands unaltered through a 'native' procedure", advanced=true) - public boolean supportsNativeQueries() { + @TranslatorProperty(display="Supports direct query procedure", description="True, if this translator supports execution of source specific commands unaltered through a direct procedure", advanced=true) + final public boolean supportsNativeQueries() { return this.supportsNativeQueries; } - public void setSupportsNativeQueries(boolean state) { + /** + * @deprecated + * @see #setSupportsDirectQueryProcedure(boolean) + */ + final public void setSupportsNativeQueries(boolean state) { + this.supportsNativeQueries = state; + } + + /** + * True, if this translator supports execution of source specific commands unaltered through a direct procedure. + * @return + */ + @TranslatorProperty(display="Supports direct query procedure", description="True, if this translator supports execution of source specific commands unaltered through a direct procedure", advanced=true) + public boolean supportsDirectQueryProcedure() { + return this.supportsNativeQueries; + } + + public void setSupportsDirectQueryProcedure(boolean state) { this.supportsNativeQueries = state; } /** - * Defines the name of the procedure that need to be treated as "native" query processing procedure. This metadata or signature + * Defines the name of the direct processing procedure. This metadata or signature + * of the procedure is defined automatically. + * @deprecated + * @see #getDirectQueryProcedureName() + * @return + */ + @TranslatorProperty(display="Name of the direct query procedure", description="The name of the direct query procedure", advanced=true) + final public String getNativeQueryProcedureName() { + return this.nativeProcedureName; + } + + /** + * @deprecated + * @see #setDirectQueryProcedureName(String) + */ + final public void setNativeQueryProcedureName(String name) { + this.nativeProcedureName = name; + } + + /** + * Defines the name of the direct processing procedure. This metadata or signature * of the procedure is defined automatically. * @return */ - @TranslatorProperty(display="Name of the native query", description="The name of the direct query procedure", advanced=true) - public String getNativeQueryProcedureName() { + @TranslatorProperty(display="Name of the direct query procedure", description="The name of the direct query procedure", advanced=true) + public String getDirectQueryProcedureName() { return this.nativeProcedureName; } - public void setNativeQueryProcedureName(String name) { + public void setDirectQueryProcedureName(String name) { this.nativeProcedureName = name; - } + } /** * @return true if only correlated subqueries are supported. diff --git a/api/src/test/java/org/teiid/translator/TestBaseDelegatingExecutionFactory.java b/api/src/test/java/org/teiid/translator/TestBaseDelegatingExecutionFactory.java index 9a24ad5eb5..f5782740c5 100644 --- a/api/src/test/java/org/teiid/translator/TestBaseDelegatingExecutionFactory.java +++ b/api/src/test/java/org/teiid/translator/TestBaseDelegatingExecutionFactory.java @@ -38,7 +38,7 @@ public class TestBaseDelegatingExecutionFactory { Method[] methods = ExecutionFactory.class.getDeclaredMethods(); Method[] proxyMethods = BaseDelegatingExecutionFactory.class.getDeclaredMethods(); //excluding the setter methods the counts should be equal - assertEquals(methods.length - 14, proxyMethods.length); + assertEquals(methods.length - 18, proxyMethods.length); } @Test public void testExecution() throws TranslatorException { diff --git a/build/kits/jboss-as7/docs/teiid/teiid-releasenotes.html b/build/kits/jboss-as7/docs/teiid/teiid-releasenotes.html index f4be7db079..842c094cb4 100644 --- a/build/kits/jboss-as7/docs/teiid/teiid-releasenotes.html +++ b/build/kits/jboss-as7/docs/teiid/teiid-releasenotes.html @@ -45,6 +45,7 @@

Compatibility Issues

from 8.5