[teiid-commits] teiid SVN: r2122 - in trunk: build/kits/jboss-container/deploy/teiid/connectors and 50 other directories.

teiid-commits at lists.jboss.org teiid-commits at lists.jboss.org
Thu May 13 09:40:43 EDT 2010


Author: rareddy
Date: 2010-05-13 09:40:34 -0400 (Thu, 13 May 2010)
New Revision: 2122

Added:
   trunk/connectors/salesforce-api/src/main/resources/partner_v17.wsdl
   trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/SimpleJDBCExecutionFactory.java
   trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/access/AccessExecutionFactory.java
   trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/db2/DB2ExecutionFactory.java
   trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/derby/DerbyExecutionFactory.java
   trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/h2/H2ExecutionFactory.java
   trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/hsql/HsqlExecutionFactory.java
   trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/informix/InformixExecutionFactory.java
   trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/mm/MetaMatrixExecutionFactory.java
   trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/mysql/MySQL5ExecutionFactory.java
   trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/mysql/MySQLExecutionFactory.java
   trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/oracle/OracleExecutionFactory.java
   trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/postgresql/PostgreSQLExecutionFactory.java
   trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/sqlserver/SQLServerExecutionFactory.java
   trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/sybase/SybaseExecutionFactory.java
   trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/teiid/TeiidExecutionFactory.java
   trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/teradata/TeradataExecutionFactory.java
Removed:
   trunk/build/kits/jboss-container/deploy/teiid/connectors/text-translator.xml
   trunk/connector-api/src/main/java/org/teiid/translator/BasicConnectorCapabilities.java
   trunk/connector-api/src/main/java/org/teiid/translator/BasicExecution.java
   trunk/connector-api/src/main/java/org/teiid/translator/BasicExecutionFactory.java
   trunk/connector-api/src/test/java/org/teiid/connector/TestBasicExecutionFactory.java
   trunk/connectors/salesforce-api/src/main/resources/partner_v15.wsdl
   trunk/connectors/sandbox/translator-yahoo/src/main/java/org/teiid/resource/
   trunk/connectors/sandbox/translator-yahoo/src/main/java/org/teiid/translator/yahoo/YahooCapabilities.java
   trunk/connectors/sandbox/translator-yahoo/src/test/java/org/teiid/resource/
   trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCCapabilities.java
   trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/SimpleCapabilities.java
   trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/Translator.java
   trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/access/AccessCapabilities.java
   trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/access/AccessSQLTranslator.java
   trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/db2/DB2Capabilities.java
   trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/db2/DB2SQLTranslator.java
   trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/derby/DerbyCapabilities.java
   trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/derby/DerbySQLTranslator.java
   trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/h2/H2Capabilities.java
   trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/h2/H2Translator.java
   trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/hsql/HsqlCapabilities.java
   trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/hsql/HsqlTranslator.java
   trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/informix/InformixCapabilities.java
   trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/informix/InformixSQLTranslator.java
   trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/mm/MMCapabilities.java
   trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/mysql/MySQL5Capabilities.java
   trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/mysql/MySQL5Translator.java
   trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/mysql/MySQLCapabilities.java
   trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/mysql/MySQLTranslator.java
   trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/oracle/OracleCapabilities.java
   trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/oracle/OracleSQLTranslator.java
   trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/oracle/SequeLinkOracleCapabilities.java
   trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/postgresql/PostgreSQLCapabilities.java
   trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/postgresql/PostgreSQLTranslator.java
   trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/sqlserver/SQLServerCapabilities.java
   trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/sqlserver/SQLServerSQLTranslator.java
   trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/sybase/SybaseCapabilities.java
   trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/sybase/SybaseSQLTranslator.java
   trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/teiid/TeiidCapabilities.java
   trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/teradata/TeradataCapabilities.java
   trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/TestJDBCExecutionFactory.java
   trunk/connectors/translator-ldap/src/main/java/org/teiid/translator/ldap/LDAPConnectorCapabilities.java
   trunk/connectors/translator-loopback/src/main/java/org/teiid/translator/loopback/LoopbackCapabilities.java
   trunk/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/SalesforceCapabilities.java
   trunk/connectors/translator-text/src/main/java/org/teiid/translator/text/TextCapabilities.java
   trunk/engine/src/main/java/com/
   trunk/engine/src/test/java/com/
Modified:
   trunk/
   trunk/build/kits/jboss-container/deploy/teiid/connectors/jdbc-translator.xml
   trunk/build/kits/jboss-container/deploy/teiid/connectors/ldap-translator.xml
   trunk/build/kits/jboss-container/deploy/teiid/connectors/loopback-translator.xml
   trunk/build/kits/jboss-container/deploy/teiid/connectors/salesforce-translator.xml
   trunk/connector-api/src/main/java/org/teiid/translator/ExecutionFactory.java
   trunk/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/SforceService.java
   trunk/connectors/sandbox/translator-yahoo/src/main/java/org/teiid/translator/yahoo/YahooExecution.java
   trunk/connectors/sandbox/translator-yahoo/src/main/java/org/teiid/translator/yahoo/YahooExecutionFactory.java
   trunk/connectors/sandbox/translator-yahoo/src/main/resources/META-INF/jboss-beans.xml
   trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCBaseExecution.java
   trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCExecutionFactory.java
   trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCProcedureExecution.java
   trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCQueryExecution.java
   trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCUpdateExecution.java
   trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/SQLConversionVisitor.java
   trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/TranslatedCommand.java
   trunk/connectors/translator-jdbc/src/main/resources/META-INF/jboss-beans.xml
   trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/FakeMetadataFactory.java
   trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/TestExtractFunctionModifier.java
   trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/TestJDBCProcedureExecution.java
   trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/TestJDBCUpdateExecution.java
   trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/TestLocateFunctionModifier.java
   trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/TestModFunctionModifier.java
   trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/TestSQLConversionVisitor.java
   trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/TranslationHelper.java
   trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/access/TestAccessSQLTranslator.java
   trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/db2/TestDB2ConvertModifier.java
   trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/db2/TestDB2SqlTranslator.java
   trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/derby/TestDerbyCapabilities.java
   trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/derby/TestDerbySQLTranslator.java
   trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/h2/TestH2Translator.java
   trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/mysql/TestMySQL5Translator.java
   trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/mysql/TestMySQLTranslator.java
   trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/oracle/TestDayWeekQuarterFunctionModifier.java
   trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/oracle/TestLeftOrRightFunctionModifier.java
   trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/oracle/TestMonthOrDayNameFunctionModifier.java
   trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/oracle/TestOracleConvertModifier.java
   trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/oracle/TestOracleTranslator.java
   trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/oracle/TestSubstringFunctionModifier.java
   trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/postgresql/TestPostgreSQLTranslator.java
   trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/sqlserver/TestSqlServerConversionVisitor.java
   trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/sybase/TestSybaseConvertModifier.java
   trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/sybase/TestSybaseSQLConversionVisitor.java
   trunk/connectors/translator-ldap/src/main/java/org/teiid/translator/ldap/LDAPExecutionFactory.java
   trunk/connectors/translator-ldap/src/main/java/org/teiid/translator/ldap/LDAPSyncQueryExecution.java
   trunk/connectors/translator-ldap/src/main/java/org/teiid/translator/ldap/LDAPUpdateExecution.java
   trunk/connectors/translator-ldap/src/main/resources/META-INF/jboss-beans.xml
   trunk/connectors/translator-loopback/src/main/java/org/teiid/translator/loopback/LoopbackExecution.java
   trunk/connectors/translator-loopback/src/main/java/org/teiid/translator/loopback/LoopbackExecutionFactory.java
   trunk/connectors/translator-loopback/src/main/resources/META-INF/jboss-beans.xml
   trunk/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/SalesForceExecutionFactory.java
   trunk/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/execution/AbstractUpdateExecution.java
   trunk/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/execution/QueryExecutionImpl.java
   trunk/connectors/translator-salesforce/src/main/resources/META-INF/jboss-beans.xml
   trunk/connectors/translator-text/src/main/java/org/teiid/translator/text/TextExecutionFactory.java
   trunk/connectors/translator-text/src/main/java/org/teiid/translator/text/TextSynchExecution.java
   trunk/connectors/translator-text/src/main/resources/META-INF/jboss-beans.xml
   trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorManager.java
   trunk/engine/src/test/java/org/teiid/dqp/internal/datamgr/impl/FakeConnector.java
   trunk/engine/src/test/java/org/teiid/dqp/internal/datamgr/impl/FakeProcedureExecution.java
   trunk/runtime/src/test/java/org/teiid/deployers/TestTranslatorDeployer.java
   trunk/test-integration/common/src/test/java/org/teiid/connector/metadata/runtime/MockConnector.java
   trunk/test-integration/common/src/test/java/org/teiid/dqp/internal/process/TestTPCR.java
Log:
TEIID-1089: Merging the ExecutionFactory and Capabilities concept toghether. 


Property changes on: trunk
___________________________________________________________________
Name: svn:ignore
   - .classpath

.settings

target

.project

   + .classpath

.settings

target

.project

build.xml


Modified: trunk/build/kits/jboss-container/deploy/teiid/connectors/jdbc-translator.xml
===================================================================
--- trunk/build/kits/jboss-container/deploy/teiid/connectors/jdbc-translator.xml	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/build/kits/jboss-container/deploy/teiid/connectors/jdbc-translator.xml	2010-05-13 13:40:34 UTC (rev 2122)
@@ -2,72 +2,67 @@
 <translator-factory>
     <translator>
         <name>access</name>
-        <execution-factory-class>org.teiid.resource.adapter.jdbc.JDBCExecutionFactory</execution-factory-class>
-        <translator-property name="ExtensionTranslationClassName" value="org.teiid.translator.jdbc.access.AccessSQLTranslator" />
+        <execution-factory-class>org.teiid.translator.jdbc.access.AccessExecutionFactory</execution-factory-class>
         <xa-capable>true</xa-capable>
     </translator>
 
     <translator>
         <name>db2</name>
-        <execution-factory-class>org.teiid.resource.adapter.jdbc.JDBCExecutionFactory</execution-factory-class>
-        <translator-property name="ExtensionTranslationClassName" value="org.teiid.translator.jdbc.db2.DB2SQLTranslator" />
+        <execution-factory-class>org.teiid.translator.jdbc.db2.DB2ExecutionFactory</execution-factory-class>
         <xa-capable>true</xa-capable>
     </translator>
 
     <translator>
         <name>derby</name>
-        <execution-factory-class>org.teiid.resource.adapter.jdbc.JDBCExecutionFactory</execution-factory-class>
-        <translator-property name="ExtensionTranslationClassName" value="org.teiid.translator.jdbc.derby.DerbySQLTranslator" />
+        <execution-factory-class>org.teiid.translator.jdbc.derby.DerbyExecutionFactory</execution-factory-class>
         <xa-capable>true</xa-capable>
     </translator>
 
     <translator>
         <name>h2</name>
-        <execution-factory-class>org.teiid.resource.adapter.jdbc.JDBCExecutionFactory</execution-factory-class>
-        <translator-property name="ExtensionTranslationClassName" value="org.teiid.translator.jdbc.h2.H2Translator" />
+        <execution-factory-class>org.teiid.translator.jdbc.h2.H2ExecutionFactory</execution-factory-class>
         <xa-capable>true</xa-capable>
     </translator>
 
     <translator>
         <name>hsql</name>
-        <execution-factory-class>org.teiid.resource.adapter.jdbc.JDBCExecutionFactory</execution-factory-class>
-        <translator-property name="ExtensionTranslationClassName" value="org.teiid.translator.jdbc.hsql.HsqlTranslator" />
+        <execution-factory-class>org.teiid.translator.jdbc.hsql.HsqlExecutionFactory</execution-factory-class>
         <xa-capable>true</xa-capable>
     </translator>
 
-
     <translator>
         <name>mysql</name>
-        <execution-factory-class>org.teiid.resource.adapter.jdbc.JDBCExecutionFactory</execution-factory-class>
-        <translator-property name="ExtensionTranslationClassName" value="org.teiid.translator.jdbc.mysql.MySQLTranslator" />
+        <execution-factory-class>org.teiid.translator.jdbc.mysql.MySQLExecutionFactory</execution-factory-class>
         <xa-capable>true</xa-capable>
     </translator>
+    
+    <translator>
+        <name>mysql5</name>
+        <execution-factory-class>org.teiid.translator.jdbc.mysql.MySQL5ExecutionFactory</execution-factory-class>
+        <xa-capable>true</xa-capable>
+    </translator>    
 
     <translator>
         <name>oracle</name>
-        <execution-factory-class>org.teiid.resource.adapter.jdbc.JDBCExecutionFactory</execution-factory-class>
-        <translator-property name="ExtensionTranslationClassName" value="org.teiid.translator.jdbc.oracle.OracleSQLTranslator" />
+        <execution-factory-class>org.teiid.translator.jdbc.oracle.OracleExecutionFactory</execution-factory-class>
         <xa-capable>true</xa-capable>
     </translator>
 
     <translator>
         <name>postgresql</name>
-        <execution-factory-class>org.teiid.resource.adapter.jdbc.JDBCExecutionFactory</execution-factory-class>
-        <translator-property name="ExtensionTranslationClassName" value="org.teiid.translator.jdbc.postgresql.PostgreSQLTranslator" />
+        <execution-factory-class>org.teiid.translator.jdbc.postgresql.PostgreSQLExecutionFactory</execution-factory-class>
         <xa-capable>true</xa-capable>
     </translator>
 
     <translator>
         <name>sqlserver</name>
-        <execution-factory-class>org.teiid.resource.adapter.jdbc.JDBCExecutionFactory</execution-factory-class>
-        <translator-property name="ExtensionTranslationClassName" value="org.teiid.translator.jdbc.sqlserver.SQLServerSQLTranslator" />
+        <execution-factory-class>org.teiid.translator.jdbc.sqlserver.SQLServerExecutionFactory</execution-factory-class>
         <xa-capable>true</xa-capable>
     </translator>
 
     <translator>
         <name>sybase</name>
-        <execution-factory-class>org.teiid.resource.adapter.jdbc.JDBCExecutionFactory</execution-factory-class>
-        <translator-property name="ExtensionTranslationClassName" value="org.teiid.translator.jdbc.sybase.SybaseSQLTranslator" />
+        <execution-factory-class>org.teiid.translator.jdbc.sybase.SybaseExecutionFactory</execution-factory-class>
         <xa-capable>true</xa-capable>
     </translator>
 </translator-factory>
\ No newline at end of file

Modified: trunk/build/kits/jboss-container/deploy/teiid/connectors/ldap-translator.xml
===================================================================
--- trunk/build/kits/jboss-container/deploy/teiid/connectors/ldap-translator.xml	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/build/kits/jboss-container/deploy/teiid/connectors/ldap-translator.xml	2010-05-13 13:40:34 UTC (rev 2122)
@@ -2,7 +2,7 @@
 <translator-factory>
     <translator>
         <name>ldap</name>
-        <execution-factory-class>org.teiid.resource.adapter.ldap.LDAPExecutionFactory</execution-factory-class>
+        <execution-factory-class>org.teiid.translator.ldap.LDAPExecutionFactory</execution-factory-class>
         <translator-property name="SearchDefaultBaseDN" value="" />
         <translator-property name="SearchDefaultScope" value="SUBTREE_SCOPE" />
         <translator-property name="RestrictToObjectClass" value="false" />

Modified: trunk/build/kits/jboss-container/deploy/teiid/connectors/loopback-translator.xml
===================================================================
--- trunk/build/kits/jboss-container/deploy/teiid/connectors/loopback-translator.xml	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/build/kits/jboss-container/deploy/teiid/connectors/loopback-translator.xml	2010-05-13 13:40:34 UTC (rev 2122)
@@ -2,6 +2,6 @@
 <translator-factory>
     <translator>
         <name>loopback</name>
-        <execution-factory-class>org.teiid.resource.adapter.loopback.LoopbackExecutionFactory</execution-factory-class>
+        <execution-factory-class>org.teiid.translator.loopback.LoopbackExecutionFactory</execution-factory-class>
     </translator>
 </translator-factory>
\ No newline at end of file

Modified: trunk/build/kits/jboss-container/deploy/teiid/connectors/salesforce-translator.xml
===================================================================
--- trunk/build/kits/jboss-container/deploy/teiid/connectors/salesforce-translator.xml	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/build/kits/jboss-container/deploy/teiid/connectors/salesforce-translator.xml	2010-05-13 13:40:34 UTC (rev 2122)
@@ -2,6 +2,6 @@
 <translator-factory>
     <translator>
         <name>salesforce</name>
-        <execution-factory-class>org.teiid.resource.adapter.salesforce.SalesForceExecutionFactory</execution-factory-class>
+        <execution-factory-class>org.teiid.translator.salesforce.SalesForceExecutionFactory</execution-factory-class>
     </translator>
 </translator-factory>
\ No newline at end of file

Deleted: trunk/build/kits/jboss-container/deploy/teiid/connectors/text-translator.xml
===================================================================
--- trunk/build/kits/jboss-container/deploy/teiid/connectors/text-translator.xml	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/build/kits/jboss-container/deploy/teiid/connectors/text-translator.xml	2010-05-13 13:40:34 UTC (rev 2122)
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<translator-factory>
-    <translator>
-        <name>text</name>
-        <execution-factory-class>org.teiid.resource.adapter.text.TextExecutionFactory</execution-factory-class>
-    </translator>
-</translator-factory>
\ No newline at end of file

Deleted: trunk/connector-api/src/main/java/org/teiid/translator/BasicConnectorCapabilities.java
===================================================================
--- trunk/connector-api/src/main/java/org/teiid/translator/BasicConnectorCapabilities.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connector-api/src/main/java/org/teiid/translator/BasicConnectorCapabilities.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -1,379 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership.  Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- * 
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- * 
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package org.teiid.translator;
-
-import java.util.List;
-
-
-
-/**
- * This class is a base implementation of the ConnectorCapabilities interface.
- * It is implemented to return false for all capabilities.  Subclass this base
- * class and override any methods necessary to specify capabilities the
- * connector actually supports.  
- */
-public class BasicConnectorCapabilities implements ConnectorCapabilities {
-    
-    /**
-     * Construct the basic capabilities class.
-     */
-    public BasicConnectorCapabilities() {
-    }
-
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsSelectDistinct()
-     */
-    public boolean supportsSelectDistinct() {
-        return false;
-    }
-
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsAliasedGroup()
-     */
-    public boolean supportsAliasedGroup() {
-        return false;
-    }
-
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsSelfJoins()
-     */
-    public boolean supportsSelfJoins() {
-        return false;
-    }
-
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsOuterJoins()
-     */
-    public boolean supportsOuterJoins() {
-        return false;
-    }
-
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsFullOuterJoins()
-     */
-    public boolean supportsFullOuterJoins() {
-        return false;
-    }
-
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsBetweenCriteria()
-     */
-    public boolean supportsBetweenCriteria() {
-        return false;
-    }
-
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsCompareCriteriaEquals()
-     */
-    public boolean supportsCompareCriteriaEquals() {
-        return false;
-    }
-
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsLikeCriteria()
-     */
-    public boolean supportsLikeCriteria() {
-        return false;
-    }
-
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsLikeCriteriaEscapeCharacter()
-     */
-    public boolean supportsLikeCriteriaEscapeCharacter() {
-        return false;
-    }
-
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsInCriteria()
-     */
-    public boolean supportsInCriteria() {
-        return false;
-    }
-
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsInCriteriaSubquery()
-     */
-    public boolean supportsInCriteriaSubquery() {
-        return false;
-    }
-
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsIsNullCriteria()
-     */
-    public boolean supportsIsNullCriteria() {
-        return false;
-    }
-
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsOrCriteria()
-     */
-    public boolean supportsOrCriteria() {
-        return false;
-    }
-
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsNotCriteria()
-     */
-    public boolean supportsNotCriteria() {
-        return false;
-    }
-
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsExistsCriteria()
-     */
-    public boolean supportsExistsCriteria() {
-        return false;
-    }
-
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsQuantifiedCompareCriteriaSome()
-     */
-    public boolean supportsQuantifiedCompareCriteriaSome() {
-        return false;
-    }
-
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsQuantifiedCompareCriteriaAll()
-     */
-    public boolean supportsQuantifiedCompareCriteriaAll() {
-        return false;
-    }
-
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsOrderBy()
-     */
-    public boolean supportsOrderBy() {
-        return false;
-    }
-
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsAggregatesSum()
-     */
-    public boolean supportsAggregatesSum() {
-        return false;
-    }
-
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsAggregatesAvg()
-     */
-    public boolean supportsAggregatesAvg() {
-        return false;
-    }
-
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsAggregatesMin()
-     */
-    public boolean supportsAggregatesMin() {
-        return false;
-    }
-
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsAggregatesMax()
-     */
-    public boolean supportsAggregatesMax() {
-        return false;
-    }
-
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsAggregatesCount()
-     */
-    public boolean supportsAggregatesCount() {
-        return false;
-    }
-
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsAggregatesCountStar()
-     */
-    public boolean supportsAggregatesCountStar() {
-        return false;
-    }
-
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsAggregatesDistinct()
-     */
-    public boolean supportsAggregatesDistinct() {
-        return false;
-    }
-
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsScalarSubqueries()
-     */
-    public boolean supportsScalarSubqueries() {
-        return false;
-    }
-
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsCorrelatedSubqueries()
-     */
-    public boolean supportsCorrelatedSubqueries() {
-        return false;
-    }
-
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsCaseExpressions()
-     */
-    public boolean supportsCaseExpressions() {
-        return false;
-    }
-
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsSearchedCaseExpressions()
-     */
-    public boolean supportsSearchedCaseExpressions() {
-        return false;
-    }
-
-    /**
-     * Return null to indicate no functions are supported.
-     * @return null 
-     * @see org.teiid.translator.ConnectorCapabilities#getSupportedFunctions()
-     */
-    public List<String> getSupportedFunctions() {
-        return null;
-    }
-
-    public boolean supportsInlineViews() {
-        return false;
-    }
-    
-    /** 
-     * @see org.teiid.translator.ConnectorCapabilities#supportsUnions()
-     * @since 4.2
-     */
-    public boolean supportsUnions() {
-        return false;
-    }
-
-    /** 
-     * @see org.teiid.translator.ConnectorCapabilities#getMaxInCriteriaSize()
-     * @since 4.2
-     */
-    public int getMaxInCriteriaSize() {
-        return -1;
-    }
-    
-    /** 
-     * @see org.teiid.translator.ConnectorCapabilities#supportsFunctionsInGroupBy()
-     * @since 5.0
-     */
-    public boolean supportsFunctionsInGroupBy() {
-        return false;
-    }
-
-    public boolean supportsRowLimit() {
-        return false;
-    }
-
-    public boolean supportsRowOffset() {
-        return false;
-    }
-
-    /** 
-     * @see org.teiid.translator.ConnectorCapabilities#getMaxFromGroups()
-     */
-    public int getMaxFromGroups() {
-        return -1; //-1 indicates no max
-    }
-
-    /** 
-     * @see org.teiid.translator.ConnectorCapabilities#supportsExcept()
-     */
-    public boolean supportsExcept() {
-        return false;
-    }
-
-    /** 
-     * @see org.teiid.translator.ConnectorCapabilities#supportsIntersect()
-     */
-    public boolean supportsIntersect() {
-        return false;
-    }
-
-    /** 
-     * @see org.teiid.translator.ConnectorCapabilities#supportsSetQueryOrderBy()
-     */
-    public boolean supportsSetQueryOrderBy() {
-        return false;
-    }    
-    
-    @Override
-    public boolean useAnsiJoin() {
-    	return false;
-    }
-
-    @Override
-    public boolean requiresCriteria() {
-    	return false;
-    }
-
-	@Override
-	public boolean supportsBatchedUpdates() {
-		return false;
-	}
-
-	@Override
-	public boolean supportsGroupBy() {
-		return false;
-	}
-
-	@Override
-	public boolean supportsHaving() {
-		return false;
-	}
-
-	@Override
-	public boolean supportsInnerJoins() {
-		return false;
-	}
-
-	@Override
-	public boolean supportsSelectExpression() {
-		return false;
-	}
-	
-	@Override
-	public SupportedJoinCriteria getSupportedJoinCriteria() {
-		return SupportedJoinCriteria.ANY;
-	}
-	
-	@Override
-	public boolean supportsCompareCriteriaOrdered() {
-		return false;
-	}
-
-	@Override
-	public boolean supportsInsertWithQueryExpression() {
-		return false;
-	}
-	
-	@Override
-	public boolean supportsBulkUpdate() {
-		return false;
-	}
-	
-	@Override
-	public boolean supportsOrderByUnrelated() {
-		return false;
-	}
-	
-}

Deleted: trunk/connector-api/src/main/java/org/teiid/translator/BasicExecution.java
===================================================================
--- trunk/connector-api/src/main/java/org/teiid/translator/BasicExecution.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connector-api/src/main/java/org/teiid/translator/BasicExecution.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -1,28 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership.  Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- * 
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- * 
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package org.teiid.translator;
-
-
-public abstract class BasicExecution implements Execution {
-	
-}

Deleted: trunk/connector-api/src/main/java/org/teiid/translator/BasicExecutionFactory.java
===================================================================
--- trunk/connector-api/src/main/java/org/teiid/translator/BasicExecutionFactory.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connector-api/src/main/java/org/teiid/translator/BasicExecutionFactory.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -1,209 +0,0 @@
-package org.teiid.translator;
-
-import java.io.IOException;
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.Method;
-import java.lang.reflect.Proxy;
-import java.util.Collection;
-import java.util.Properties;
-
-import org.teiid.core.TeiidException;
-import org.teiid.core.util.ReflectionHelper;
-import org.teiid.core.util.StringUtil;
-import org.teiid.language.Call;
-import org.teiid.language.Command;
-import org.teiid.language.LanguageFactory;
-import org.teiid.language.QueryExpression;
-import org.teiid.metadata.RuntimeMetadata;
-import org.teiid.resource.spi.BasicManagedConnectionFactory;
-
-
-public class BasicExecutionFactory implements ExecutionFactory {
-
-	protected ConnectorCapabilities capabilities;
-	private static final TypeFacility TYPE_FACILITY = new TypeFacility();
-	
-	private String capabilitiesClass;
-	private boolean immutable = false;
-	private boolean exceptionOnMaxRows = false;
-	private int maxResultRows = -1;
-	private boolean xaCapable;
-	private String overrideCapabilitiesFile;
-	private boolean sourceRequired = true;
-
-	@Override
-	public void start() throws ConnectorException {
-	}	
-	
-    public Class<? extends ConnectorCapabilities> getDefaultCapabilities() {
-    	return BasicConnectorCapabilities.class;
-    }	
-    
-    @Override
-    public ConnectorCapabilities getCapabilities() throws ConnectorException {
-    	if (capabilities == null) {
-			// create Capabilities
-    		capabilities = BasicManagedConnectionFactory.getInstance(ConnectorCapabilities.class, getCapabilitiesClass(), null, getDefaultCapabilities());
-    	}
-    	
-		// capabilities overload
-    	Properties props = getOverrideCapabilities();
-		if (this.capabilities != null && props != null) {
-			this.capabilities = (ConnectorCapabilities) Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(), new Class[] {ConnectorCapabilities.class}, new CapabilitesOverloader(this.capabilities, props));
-		}
-    	return capabilities;
-	}    
-    
-	@Override
-	public Execution createExecution(Command command, ExecutionContext executionContext, RuntimeMetadata metadata, Object connectionFactory) throws ConnectorException {
-		if (command instanceof QueryExpression) {
-			return createResultSetExecution((QueryExpression)command, executionContext, metadata, connectionFactory);
-		}
-		if (command instanceof Call) {
-			return createProcedureExecution((Call)command, executionContext, metadata, connectionFactory);
-		}
-		return createUpdateExecution(command, executionContext, metadata, connectionFactory);
-	}
-
-	public ResultSetExecution createResultSetExecution(QueryExpression command, ExecutionContext executionContext, RuntimeMetadata metadata, Object connection) throws ConnectorException {
-		throw new ConnectorException("Unsupported Execution"); //$NON-NLS-1$
-	}
-
-	public ProcedureExecution createProcedureExecution(Call command, ExecutionContext executionContext, RuntimeMetadata metadata, Object connection) throws ConnectorException {
-		throw new ConnectorException("Unsupported Execution");//$NON-NLS-1$
-	}
-
-	public UpdateExecution createUpdateExecution(Command command, ExecutionContext executionContext, RuntimeMetadata metadata, Object connection) throws ConnectorException {
-		throw new ConnectorException("Unsupported Execution");//$NON-NLS-1$
-	}    
-	
-	// derived
-	private Properties overrideCapabilities;
-	
-	
-	@Override
-	public LanguageFactory getLanguageFactory() {
-		return LanguageFactory.INSTANCE;
-	}
-
-	@Override
-	public TypeFacility getTypeFacility() {
-		return TYPE_FACILITY;
-	}
-
-	@Override
-	public Properties getOverrideCapabilities() throws ConnectorException {
-		if (this.overrideCapabilities == null && getOverrideCapabilitiesFile() != null) {
-			try {
-				this.overrideCapabilities = new Properties();
-				this.overrideCapabilities.loadFromXML(this.getClass().getResourceAsStream(getOverrideCapabilitiesFile()));
-			} catch (IOException e) {
-				throw new ConnectorException(e);
-			}
-		}
-		return this.overrideCapabilities;
-	}
-
-    public static <T> T getInstance(Class<T> expectedType, String className, Collection ctorObjs, Class defaultClass) throws ConnectorException {
-    	try {
-	    	if (className == null) {
-	    		if (defaultClass == null) {
-	    			throw new ConnectorException("Neither class name or default class specified to create an instance"); //$NON-NLS-1$
-	    		}
-	    		return expectedType.cast(defaultClass.newInstance());
-	    	}
-	    	return expectedType.cast(ReflectionHelper.create(className, ctorObjs, Thread.currentThread().getContextClassLoader()));
-		} catch (TeiidException e) {
-			throw new ConnectorException(e);
-		} catch (IllegalAccessException e) {
-			throw new ConnectorException(e);
-		} catch(InstantiationException e) {
-			throw new ConnectorException(e);
-		}    	
-    }	
-	/**
-	 * Overloads the connector capabilities with one defined in the connector binding properties
-	 */
-    static final class CapabilitesOverloader implements InvocationHandler {
-    	ConnectorCapabilities caps; 
-    	Properties properties;
-    	
-    	CapabilitesOverloader(ConnectorCapabilities caps, Properties properties){
-    		this.caps = caps;
-    		this.properties = properties;
-    	}
-    	
-		@Override
-		public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
-			String value = this.properties.getProperty(method.getName());
-			if (value == null || value.trim().length() == 0 || (args != null && args.length != 0)) {
-				return method.invoke(this.caps, args);
-			}
-			return StringUtil.valueOf(value, method.getReturnType());
-		}
-	}
-    
-    @Override
-	public String getCapabilitiesClass() {
-		return capabilitiesClass;
-	}
-
-	public void setCapabilitiesClass(String arg0) {
-		this.capabilitiesClass = arg0;
-	}
-
-	@Override
-	public boolean isImmutable() {
-		return immutable;
-	}
-	
-	public void setImmutable(boolean arg0) {
-		this.immutable = arg0;
-	}	
-
-	@Override
-	public boolean isExceptionOnMaxRows() {
-		return exceptionOnMaxRows;
-	}
-	
-	public void setExceptionOnMaxRows(boolean arg0) {
-		this.exceptionOnMaxRows = arg0;
-	}
-
-	@Override
-	public int getMaxResultRows() {
-		return maxResultRows;
-	}
-
-	public void setMaxResultRows(int arg0) {
-		this.maxResultRows = arg0;
-	}
-
-	@Override
-	public boolean isXaCapable() {
-		return xaCapable;
-	}
-
-	public void setXaCapable(boolean arg0) {
-		this.xaCapable = arg0;
-	}
-
-	@Override
-	public String getOverrideCapabilitiesFile() throws ConnectorException {
-		return this.overrideCapabilitiesFile;
-	}
-	
-	
-	public void setOverrideCapabilitiesFile(String overrideCapabilitiesFile) {
-		this.overrideCapabilitiesFile = overrideCapabilitiesFile;
-	}
-
-	@Override
-	public boolean isSourceRequired() {
-		return sourceRequired;
-	}	
-	
-	public void setSourceRequired(boolean value) {
-		this.sourceRequired = value;
-	}
-}

Modified: trunk/connector-api/src/main/java/org/teiid/translator/ExecutionFactory.java
===================================================================
--- trunk/connector-api/src/main/java/org/teiid/translator/ExecutionFactory.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connector-api/src/main/java/org/teiid/translator/ExecutionFactory.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -22,105 +22,122 @@
 
 package org.teiid.translator;
 
-import java.util.Properties;
+import java.util.List;
 
+import org.teiid.language.Call;
 import org.teiid.language.Command;
 import org.teiid.language.LanguageFactory;
+import org.teiid.language.QueryExpression;
 import org.teiid.metadata.RuntimeMetadata;
 
 
 
 /**
- * <p>The primary entry point for a Connector.  This interface should be implemented
- * by the connector writer.</p>
+ * <p>The primary entry point for a Translator.  This class should be extended by the custom translator writer.</p>
  * 
- * <p>The JCA Container will instantiate the implementation of this class. Once the class has been 
- * instantiated, the {@link #start()} method will be called
- * with all necessary connector properties. </p>  
+ * The deployer instantiates this class through reflection. So it is important to have no-arg constructor. Once constructed
+ * the "start" method is called. This class represents the basic capabilities of the translator.
  */
-public interface ExecutionFactory {
+public class ExecutionFactory implements ConnectorCapabilities{
 
+	public static final int DEFAULT_MAX_FROM_GROUPS = -1;
+
+	private static final TypeFacility TYPE_FACILITY = new TypeFacility();
+	
+	private boolean immutable = false;
+	private boolean exceptionOnMaxRows = false;
+	private int maxResultRows = DEFAULT_MAX_FROM_GROUPS;
+	private boolean xaCapable;
+	private boolean sourceRequired = true;
+	
 	/**
 	 * Initialize the connector with supplied configuration
 	 */
-	void start() throws ConnectorException;
+	public void start() throws ConnectorException {
+	}
 	    
 	/**
-	 * Capabilities Class Name
-	 * @return
-	 */
-	@TranslatorProperty(name="capabilities-class", display="Connector Capabilities",description="The class to use to provide the Connector Capabilities")
-	public String getCapabilitiesClass();
-	
-	/**
 	 * Defines if the Connector is read-only connector 
 	 * @return
 	 */
 	@TranslatorProperty(name="immutable", display="Is Immutable",description="Is Immutable, True if the source never changes.",advanced=true, defaultValue="false")
-	public boolean isImmutable();
+	public boolean isImmutable() {
+		return immutable;
+	}
 	
+	public void setImmutable(boolean arg0) {
+		this.immutable = arg0;
+	}	
+	
 	/**
 	 * Throw exception if there are more rows in the result set than specified in the MaxResultRows setting.
 	 * @return
 	 */
 	@TranslatorProperty(name="exception-on-max-rows", display="Exception on Exceeding Max Rows",description="Indicates if an Exception should be thrown if the specified value for Maximum Result Rows is exceeded; else no exception and no more than the maximum will be returned",advanced=true, defaultValue="true")
-	public boolean isExceptionOnMaxRows();
+	public boolean isExceptionOnMaxRows() {
+		return exceptionOnMaxRows;
+	}
+	
+	public void setExceptionOnMaxRows(boolean arg0) {
+		this.exceptionOnMaxRows = arg0;
+	}
 
 	/**
 	 * Maximum result set rows to fetch
 	 * @return
 	 */
 	@TranslatorProperty(name="max-result-rows", display="Maximum Result Rows", description="Maximum Result Rows allowed", advanced=true, defaultValue="-1")
-	public int getMaxResultRows();
+	public int getMaxResultRows() {
+		return maxResultRows;
+	}
+
+	public void setMaxResultRows(int arg0) {
+		this.maxResultRows = arg0;
+	}
 	
 	/**
 	 * Shows the XA transaction capability of the Connector.
 	 * @return
 	 */
 	@TranslatorProperty(name="xa-capable", display="Is XA Capable", description="True, if this connector supports XA Transactions", defaultValue="false")
-	public boolean isXaCapable();
+	public boolean isXaCapable() {
+		return xaCapable;
+	}
+
+	public void setXaCapable(boolean arg0) {
+		this.xaCapable = arg0;
+	}
 	    
     /**
-     * Get the Override capabilities for the connector
-     * @return
-     */
-    @TranslatorProperty(name="override-capabilities-file", display="Override capabilities file", description="Property file that defines the override capability properties")
-    String getOverrideCapabilitiesFile() throws ConnectorException;
-    
-    /**
      * Flag that indicates if a underlying source connection required for this execution factory to work 
      * @return
      */
-    @TranslatorProperty(name="source-required", display="Source Connection Required", description="Flag that indicates, a source required for the translator to work", readOnly= true)
-    boolean isSourceRequired();    
+	public boolean isSourceRequired() {
+		return sourceRequired;
+	}	
+	
+	public void setSourceRequired(boolean value) {
+		this.sourceRequired = value;
+	}    
     
     /**
      * Obtain a reference to the default LanguageFactory that can be used to construct
      * new language interface objects.  This is typically needed when modifying the language
      * objects passed to the connector or for testing when objects need to be created. 
      */
-    LanguageFactory getLanguageFactory();
+    public LanguageFactory getLanguageFactory()  {
+		return LanguageFactory.INSTANCE;
+	}
     
     /**
      * Obtain a reference to the type facility, which can be used to perform many type 
      * conversions supplied by the Connector API.
      */
-    TypeFacility getTypeFacility();
+    public TypeFacility getTypeFacility() {
+		return TYPE_FACILITY;
+	}
     
     /**
-     * Get the Override capabilities for the connector
-     * @return
-     */    
-    Properties getOverrideCapabilities() throws ConnectorException;     
-    
-    /**
-     * Get the capabilities of this connector.  The capabilities affect what kinds of 
-     * queries (and other commands) will be sent to the connector.
-     * @return ConnectorCapabilities
-     */
-    ConnectorCapabilities getCapabilities() throws ConnectorException;
-    
-    /**
      * Create an execution object for the specified command  
      * @param command the command
      * @param executionContext Provides information about the context that this command is
@@ -129,5 +146,285 @@
      * @param connection connection factory object to the data source
      * @return An execution object that can use to execute the command
      */
-    Execution createExecution(Command command, ExecutionContext executionContext, RuntimeMetadata metadata, Object connectionFactory) throws ConnectorException;    
+	public Execution createExecution(Command command, ExecutionContext executionContext, RuntimeMetadata metadata, Object connectionFactory) throws ConnectorException {
+		if (command instanceof QueryExpression) {
+			return createResultSetExecution((QueryExpression)command, executionContext, metadata, connectionFactory);
+		}
+		if (command instanceof Call) {
+			return createProcedureExecution((Call)command, executionContext, metadata, connectionFactory);
+		}
+		return createUpdateExecution(command, executionContext, metadata, connectionFactory);
+	}
+
+	public ResultSetExecution createResultSetExecution(QueryExpression command, ExecutionContext executionContext, RuntimeMetadata metadata, Object connection) throws ConnectorException {
+		throw new ConnectorException("Unsupported Execution"); //$NON-NLS-1$
+	}
+
+	public ProcedureExecution createProcedureExecution(Call command, ExecutionContext executionContext, RuntimeMetadata metadata, Object connection) throws ConnectorException {
+		throw new ConnectorException("Unsupported Execution");//$NON-NLS-1$
+	}
+
+	public UpdateExecution createUpdateExecution(Command command, ExecutionContext executionContext, RuntimeMetadata metadata, Object connection) throws ConnectorException {
+		throw new ConnectorException("Unsupported Execution");//$NON-NLS-1$
+	}   
+	
+	@Override
+    public boolean supportsSelectDistinct() {
+        return false;
+    }
+
+    @Override
+    public boolean supportsAliasedGroup() {
+        return false;
+    }
+
+    @Override
+    public boolean supportsSelfJoins() {
+        return false;
+    }
+
+    @Override
+    public boolean supportsOuterJoins() {
+        return false;
+    }
+
+    @Override
+    public boolean supportsFullOuterJoins() {
+        return false;
+    }
+
+    @Override
+    public boolean supportsBetweenCriteria() {
+        return false;
+    }
+
+    @Override
+    public boolean supportsCompareCriteriaEquals() {
+        return false;
+    }
+
+    @Override
+    public boolean supportsLikeCriteria() {
+        return false;
+    }
+
+    @Override
+    public boolean supportsLikeCriteriaEscapeCharacter() {
+        return false;
+    }
+
+    @Override
+    public boolean supportsInCriteria() {
+        return false;
+    }
+
+    @Override
+    public boolean supportsInCriteriaSubquery() {
+        return false;
+    }
+
+    @Override
+    public boolean supportsIsNullCriteria() {
+        return false;
+    }
+
+    @Override
+    public boolean supportsOrCriteria() {
+        return false;
+    }
+
+    @Override
+    public boolean supportsNotCriteria() {
+        return false;
+    }
+
+    @Override
+    public boolean supportsExistsCriteria() {
+        return false;
+    }
+
+    @Override
+    public boolean supportsQuantifiedCompareCriteriaSome() {
+        return false;
+    }
+
+    @Override
+    public boolean supportsQuantifiedCompareCriteriaAll() {
+        return false;
+    }
+
+    @Override
+    public boolean supportsOrderBy() {
+        return false;
+    }
+
+    @Override
+    public boolean supportsAggregatesSum() {
+        return false;
+    }
+
+    @Override
+    public boolean supportsAggregatesAvg() {
+        return false;
+    }
+
+    @Override
+    public boolean supportsAggregatesMin() {
+        return false;
+    }
+
+    @Override
+    public boolean supportsAggregatesMax() {
+        return false;
+    }
+
+    @Override
+    public boolean supportsAggregatesCount() {
+        return false;
+    }
+
+    @Override
+    public boolean supportsAggregatesCountStar() {
+        return false;
+    }
+
+    @Override
+    public boolean supportsAggregatesDistinct() {
+        return false;
+    }
+
+    @Override
+    public boolean supportsScalarSubqueries() {
+        return false;
+    }
+
+    @Override
+    public boolean supportsCorrelatedSubqueries() {
+        return false;
+    }
+
+    @Override
+    public boolean supportsCaseExpressions() {
+        return false;
+    }
+
+    @Override
+    public boolean supportsSearchedCaseExpressions() {
+        return false;
+    }
+
+    @Override
+    public List<String> getSupportedFunctions() {
+        return null;
+    }
+
+    public boolean supportsInlineViews() {
+        return false;
+    }
+    
+    @Override
+    public boolean supportsUnions() {
+        return false;
+    }
+
+    @Override
+    public int getMaxInCriteriaSize() {
+        return DEFAULT_MAX_FROM_GROUPS;
+    }
+    
+    @Override
+    public boolean supportsFunctionsInGroupBy() {
+        return false;
+    }
+    
+    @Override
+    public boolean supportsRowLimit() {
+        return false;
+    }
+
+    @Override
+    public boolean supportsRowOffset() {
+        return false;
+    }
+
+    @Override
+    public int getMaxFromGroups() {
+        return DEFAULT_MAX_FROM_GROUPS; //-1 indicates no max
+    }
+
+    @Override
+    public boolean supportsExcept() {
+        return false;
+    }
+
+    @Override
+    public boolean supportsIntersect() {
+        return false;
+    }
+
+    @Override
+    public boolean supportsSetQueryOrderBy() {
+        return false;
+    }    
+    
+    @Override
+    public boolean useAnsiJoin() {
+    	return false;
+    }
+
+    @Override
+    public boolean requiresCriteria() {
+    	return false;
+    }
+
+	@Override
+	public boolean supportsBatchedUpdates() {
+		return false;
+	}
+
+	@Override
+	public boolean supportsGroupBy() {
+		return false;
+	}
+
+	@Override
+	public boolean supportsHaving() {
+		return false;
+	}
+
+	@Override
+	public boolean supportsInnerJoins() {
+		return false;
+	}
+
+	@Override
+	public boolean supportsSelectExpression() {
+		return false;
+	}
+	
+	@Override
+	public SupportedJoinCriteria getSupportedJoinCriteria() {
+		return SupportedJoinCriteria.ANY;
+	}
+	
+	@Override
+	public boolean supportsCompareCriteriaOrdered() {
+		return false;
+	}
+
+	@Override
+	public boolean supportsInsertWithQueryExpression() {
+		return false;
+	}
+	
+	@Override
+	public boolean supportsBulkUpdate() {
+		return false;
+	}
+	
+	@Override
+	public boolean supportsOrderByUnrelated() {
+		return false;
+	}	
+	
 }

Deleted: trunk/connector-api/src/test/java/org/teiid/connector/TestBasicExecutionFactory.java
===================================================================
--- trunk/connector-api/src/test/java/org/teiid/connector/TestBasicExecutionFactory.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connector-api/src/test/java/org/teiid/connector/TestBasicExecutionFactory.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -1,61 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership.  Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- * 
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- * 
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-package org.teiid.connector;
-
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-import java.util.Properties;
-
-import org.junit.Test;
-import org.teiid.translator.BasicExecutionFactory;
-import org.teiid.translator.ConnectorCapabilities;
-import org.teiid.translator.ExecutionFactory;
-
-
-public class TestBasicExecutionFactory {
-
-    @Test public void testConnectorCapabilitiesOverride() throws Exception {
-
-    	ExecutionFactory c = new BasicExecutionFactory();
-    	//Mockito.stub(c.getCapabilities()).toReturn(new BasicConnectorCapabilities());
-    	
-    	ConnectorCapabilities caps = c.getCapabilities();
-    	assertFalse(caps.supportsExistsCriteria());
-    	assertFalse(caps.supportsExcept());
-
-    	
-    	c = new BasicExecutionFactory() {
-    		@Override
-    		public Properties getOverrideCapabilities() {
-    	    	Properties props = new Properties();
-    	    	props.setProperty("supportsExistsCriteria", "true"); //$NON-NLS-1$ //$NON-NLS-2$
-    	    	props.setProperty("supportsExcept", "true"); //$NON-NLS-1$ //$NON-NLS-2$
-    	    	return props;
-    		}
-    	};
-    	
-    	caps = c.getCapabilities();
-    	assertTrue(caps.supportsExistsCriteria());
-    	assertTrue(caps.supportsExcept());
-    }
-}

Modified: trunk/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/SforceService.java
===================================================================
--- trunk/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/SforceService.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/salesforce-api/src/main/java/com/sforce/soap/partner/SforceService.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -5,13 +5,13 @@
 
 package com.sforce.soap.partner;
 
-import java.net.MalformedURLException;
 import java.net.URL;
+
 import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
 import javax.xml.ws.WebEndpoint;
 import javax.xml.ws.WebServiceClient;
 import javax.xml.ws.WebServiceFeature;
-import javax.xml.ws.Service;
 
 /**
  * This class was generated by Apache CXF 2.2.5
@@ -21,22 +21,18 @@
  */
 
 
- at WebServiceClient(name = "SforceService", 
-                  wsdlLocation = "file:/NotBackedUp/jdoyle/tools/JBoss-WS.3.3.2/jbossws-cxf-bin-dist/deploy/bin/partner_17.wsdl",
-                  targetNamespace = "urn:partner.soap.sforce.com") 
+ at WebServiceClient(name = "SforceService", wsdlLocation = SforceService.PARTNER_WSDL,targetNamespace = "urn:partner.soap.sforce.com") 
 public class SforceService extends Service {
 
-    public final static URL WSDL_LOCATION;
-    public final static QName SERVICE = new QName("urn:partner.soap.sforce.com", "SforceService");
-    public final static QName Soap = new QName("urn:partner.soap.sforce.com", "Soap");
+    private static final String PARTNER_WSDL = "partner_17.wsdl"; //$NON-NLS-1$
+	public final static URL WSDL_LOCATION;
+    public final static QName SERVICE = new QName("urn:partner.soap.sforce.com", "SforceService"); //$NON-NLS-1$ //$NON-NLS-2$
+    public final static QName Soap = new QName("urn:partner.soap.sforce.com", "Soap");//$NON-NLS-1$ //$NON-NLS-2$
     static {
-        URL url = null;
-        try {
-            url = new URL("file:/NotBackedUp/jdoyle/tools/JBoss-WS.3.3.2/jbossws-cxf-bin-dist/deploy/bin/partner_17.wsdl");
-        } catch (MalformedURLException e) {
-            System.err.println("Can not initialize the default wsdl from file:/NotBackedUp/jdoyle/tools/JBoss-WS.3.3.2/jbossws-cxf-bin-dist/deploy/bin/partner_17.wsdl");
-            // e.printStackTrace();
-        }
+        URL url = SforceService.class.getClassLoader().getResource(PARTNER_WSDL); 
+    	if (url == null) {
+    		System.err.println("Can not find the default wsdl for salesforce"); //$NON-NLS-1$
+    	}
         WSDL_LOCATION = url;
     }
 

Deleted: trunk/connectors/salesforce-api/src/main/resources/partner_v15.wsdl
===================================================================
--- trunk/connectors/salesforce-api/src/main/resources/partner_v15.wsdl	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/salesforce-api/src/main/resources/partner_v15.wsdl	2010-05-13 13:40:34 UTC (rev 2122)
@@ -1,2852 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-
-<!--
-Salesforce.com Partner Web Services API Version 15.0
-Generated on 2009-04-15 20:55:33 +0000.
-
-Copyright 1999-2009 salesforce.com, inc.
-All Rights Reserved
--->
-
-<definitions targetNamespace="urn:partner.soap.sforce.com"
-             xmlns="http://schemas.xmlsoap.org/wsdl/"
-             xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
-             xmlns:xsd="http://www.w3.org/2001/XMLSchema"
-             xmlns:fns="urn:fault.partner.soap.sforce.com"
-             xmlns:tns="urn:partner.soap.sforce.com"
-             xmlns:ens="urn:sobject.partner.soap.sforce.com">
-    <types>
-
-        <schema elementFormDefault="qualified" xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:sobject.partner.soap.sforce.com">
-
-            <import namespace="urn:partner.soap.sforce.com"/>
-
-
-            <!-- Dynamic sObject -->
-            <complexType name="sObject">
-                <sequence>
-                    <element name="type"               type="xsd:string"/>
-                    <element name="fieldsToNull"       type="xsd:string" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
-                    <element name="Id"                 type="tns:ID" nillable="true" />
-                    <any namespace="##targetNamespace" minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
-                </sequence>
-            </complexType>
-
-        </schema>
-
-        <schema elementFormDefault="qualified" xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:partner.soap.sforce.com">
-
-            <import namespace="urn:sobject.partner.soap.sforce.com"/>
-
-            <!-- Our simple ID Type -->
-            <simpleType name="ID">
-                <restriction base="xsd:string">
-                    <length value="18"/>
-                    <pattern value='[a-zA-Z0-9]{18}'/>
-                </restriction>
-            </simpleType>
-
-            <simpleType name="QueryLocator">
-                <restriction base="xsd:string"/>
-            </simpleType>
-
-            <!-- Shared Result Types -->
-            <complexType name="QueryResult">
-                <sequence>
-                    <element name="done"         type="xsd:boolean"/>
-                    <element name="queryLocator" type="tns:QueryLocator" nillable="true"/>
-                    <element name="records"      type="ens:sObject" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
-                    <element name="size"         type="xsd:int"/>
-                </sequence>
-            </complexType>
-
-
-
-            <!-- Search Result -->
-            <complexType name="SearchResult">
-                <sequence>
-                    <element name="searchRecords"  minOccurs="0" maxOccurs="unbounded" type="tns:SearchRecord"/>
-                    <element name="sforceReserved" minOccurs="0" maxOccurs="1" type="xsd:string"/>
-                </sequence>
-            </complexType>
-
-            <complexType name="SearchRecord">
-                <sequence>
-                    <element name="record" type="ens:sObject"/>
-                </sequence>
-            </complexType>
-
-            <!-- GetUpdated Result -->
-            <complexType name="GetUpdatedResult">
-                <sequence>
-                    <element name="ids" minOccurs="0" maxOccurs="unbounded" type="tns:ID"/>
-                    <element name="latestDateCovered" type="xsd:dateTime"/>
-                    <element name="sforceReserved" minOccurs="0" maxOccurs="1" type="xsd:string"/>
-                </sequence>
-            </complexType>
-
-            <!-- GetDeleted Result -->
-            <complexType name="GetDeletedResult">
-                <sequence>
-                    <element name="deletedRecords" minOccurs="0" maxOccurs="unbounded" type="tns:DeletedRecord"/>
-                    <element name="earliestDateAvailable" type="xsd:dateTime"/>
-                    <element name="latestDateCovered" type="xsd:dateTime"/>
-                    <element name="sforceReserved" minOccurs="0" maxOccurs="1" type="xsd:string"/>
-                </sequence>
-            </complexType>
-
-            <complexType name="DeletedRecord">
-                <sequence>
-                    <element name="deletedDate" type="xsd:dateTime"/>
-                    <element name="id"          type="tns:ID"/>
-                </sequence>
-            </complexType>
-
-
-            <complexType name="GetServerTimestampResult">
-                <sequence>
-                    <element name="timestamp" type="xsd:dateTime"/>
-                </sequence>
-            </complexType>
-
-
-            <!-- InvalidateSessions Result -->
-            <complexType name="InvalidateSessionsResult">
-                <sequence>
-                    <element name="errors"  type="tns:Error" minOccurs="0" maxOccurs="unbounded"/>
-                    <element name="success"   type="xsd:boolean"/>
-                </sequence>
-            </complexType>
-
-            <complexType name="SetPasswordResult">
-            </complexType>
-
-            <complexType name="ResetPasswordResult">
-                <sequence>
-                    <element name="password" type="xsd:string"/>
-                </sequence>
-            </complexType>
-
-            <complexType name="GetUserInfoResult">
-                <sequence>
-                    <element name="accessibilityMode"          type="xsd:boolean"/>
-                    <element name="currencySymbol"             type="xsd:string" nillable="true"/>
-                    <element name="orgDefaultCurrencyIsoCode"  type="xsd:string" nillable="true"/>
-                    <element name="orgHasPersonAccounts"       type="xsd:boolean"/>
-                    <element name="organizationId"             type="tns:ID"/>
-                    <element name="organizationMultiCurrency"  type="xsd:boolean"/>
-                    <element name="organizationName"           type="xsd:string"/>
-                    <element name="profileId"                  type="tns:ID"/>
-                    <element name="roleId"                     type="tns:ID" nillable="true"/>
-                    <element name="userDefaultCurrencyIsoCode" type="xsd:string" nillable="true"/>
-                    <element name="userEmail"                  type="xsd:string"/>
-                    <element name="userFullName"               type="xsd:string"/>
-                    <element name="userId"                     type="tns:ID"/>
-                    <element name="userLanguage"               type="xsd:string"/>
-                    <element name="userLocale"                 type="xsd:string"/>
-                    <element name="userName"                   type="xsd:string"/>
-                    <element name="userTimeZone"               type="xsd:string"/>
-                    <element name="userType"                   type="xsd:string"/>
-                    <element name="userUiSkin"                 type="xsd:string"/>
-                </sequence>
-            </complexType>
-
-            <complexType name="LoginResult">
-                <sequence>
-                    <element name="metadataServerUrl" type="xsd:string" nillable="true"/>
-                    <element name="passwordExpired"   type="xsd:boolean" />
-                    <element name="sandbox"      type="xsd:boolean"/>
-                    <element name="serverUrl"         type="xsd:string" nillable="true"/>
-                    <element name="sessionId"         type="xsd:string" nillable="true"/>
-
-                    <element name="userId"           type="tns:ID" nillable="true"/>
-                    <element name="userInfo"         type="tns:GetUserInfoResult" minOccurs="0"/>
-                </sequence>
-            </complexType>
-
-            <simpleType name="StatusCode">
-                <restriction base="xsd:string">
-                    <enumeration value="ALREADY_IN_PROCESS"/>
-                    <enumeration value="ASSIGNEE_TYPE_REQUIRED"/>
-                    <enumeration value="BAD_CUSTOM_ENTITY_PARENT_DOMAIN"/>
-                    <enumeration value="BCC_NOT_ALLOWED_IF_BCC_COMPLIANCE_ENABLED"/>
-                    <enumeration value="CANNOT_CASCADE_PRODUCT_ACTIVE"/>
-                    <enumeration value="CANNOT_CHANGE_FIELD_TYPE_OF_APEX_REFERENCED_FIELD"/>
-                    <enumeration value="CANNOT_CREATE_ANOTHER_MANAGED_PACKAGE"/>
-                    <enumeration value="CANNOT_DEACTIVATE_DIVISION"/>
-                    <enumeration value="CANNOT_DELETE_LAST_DATED_CONVERSION_RATE"/>
-                    <enumeration value="CANNOT_DELETE_MANAGED_OBJECT"/>
-                    <enumeration value="CANNOT_DISABLE_LAST_ADMIN"/>
-                    <enumeration value="CANNOT_ENABLE_IP_RESTRICT_REQUESTS"/>
-                    <enumeration value="CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY"/>
-                    <enumeration value="CANNOT_MODIFY_MANAGED_OBJECT"/>
-                    <enumeration value="CANNOT_RENAME_APEX_REFERENCED_FIELD"/>
-                    <enumeration value="CANNOT_RENAME_APEX_REFERENCED_OBJECT"/>
-                    <enumeration value="CANNOT_REPARENT_RECORD"/>
-                    <enumeration value="CANNOT_UPDATE_CONVERTED_LEAD"/>
-                    <enumeration value="CANT_DISABLE_CORP_CURRENCY"/>
-                    <enumeration value="CANT_UNSET_CORP_CURRENCY"/>
-                    <enumeration value="CHILD_SHARE_FAILS_PARENT"/>
-                    <enumeration value="CIRCULAR_DEPENDENCY"/>
-                    <enumeration value="CUSTOM_CLOB_FIELD_LIMIT_EXCEEDED"/>
-                    <enumeration value="CUSTOM_ENTITY_OR_FIELD_LIMIT"/>
-                    <enumeration value="CUSTOM_FIELD_INDEX_LIMIT_EXCEEDED"/>
-                    <enumeration value="CUSTOM_INDEX_EXISTS"/>
-                    <enumeration value="CUSTOM_LINK_LIMIT_EXCEEDED"/>
-                    <enumeration value="CUSTOM_TAB_LIMIT_EXCEEDED"/>
-                    <enumeration value="DELETE_FAILED"/>
-                    <enumeration value="DELETE_REQUIRED_ON_CASCADE"/>
-                    <enumeration value="DEPENDENCY_EXISTS"/>
-                    <enumeration value="DUPLICATE_CASE_SOLUTION"/>
-                    <enumeration value="DUPLICATE_COMM_NICKNAME"/>
-                    <enumeration value="DUPLICATE_CUSTOM_ENTITY_DEFINITION"/>
-                    <enumeration value="DUPLICATE_CUSTOM_TAB_MOTIF"/>
-                    <enumeration value="DUPLICATE_DEVELOPER_NAME"/>
-                    <enumeration value="DUPLICATE_EXTERNAL_ID"/>
-                    <enumeration value="DUPLICATE_MASTER_LABEL"/>
-                    <enumeration value="DUPLICATE_USERNAME"/>
-                    <enumeration value="DUPLICATE_VALUE"/>
-                    <enumeration value="EMAIL_NOT_PROCESSED_DUE_TO_PRIOR_ERROR"/>
-                    <enumeration value="EMPTY_SCONTROL_FILE_NAME"/>
-                    <enumeration value="ENTITY_FAILED_IFLASTMODIFIED_ON_UPDATE"/>
-                    <enumeration value="ENTITY_IS_ARCHIVED"/>
-                    <enumeration value="ENTITY_IS_DELETED"/>
-                    <enumeration value="ENTITY_IS_LOCKED"/>
-                    <enumeration value="ERROR_IN_MAILER"/>
-                    <enumeration value="FAILED_ACTIVATION"/>
-                    <enumeration value="FIELD_CUSTOM_VALIDATION_EXCEPTION"/>
-                    <enumeration value="FIELD_INTEGRITY_EXCEPTION"/>
-                    <enumeration value="HTML_FILE_UPLOAD_NOT_ALLOWED"/>
-                    <enumeration value="IMAGE_TOO_LARGE"/>
-                    <enumeration value="INACTIVE_OWNER_OR_USER"/>
-                    <enumeration value="INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY"/>
-                    <enumeration value="INSUFFICIENT_ACCESS_OR_READONLY"/>
-                    <enumeration value="INVALID_ACCESS_LEVEL"/>
-                    <enumeration value="INVALID_ARGUMENT_TYPE"/>
-                    <enumeration value="INVALID_ASSIGNEE_TYPE"/>
-                    <enumeration value="INVALID_ASSIGNMENT_RULE"/>
-                    <enumeration value="INVALID_BATCH_OPERATION"/>
-                    <enumeration value="INVALID_CREDIT_CARD_INFO"/>
-                    <enumeration value="INVALID_CROSS_REFERENCE_KEY"/>
-                    <enumeration value="INVALID_CROSS_REFERENCE_TYPE_FOR_FIELD"/>
-                    <enumeration value="INVALID_CURRENCY_CONV_RATE"/>
-                    <enumeration value="INVALID_CURRENCY_CORP_RATE"/>
-                    <enumeration value="INVALID_CURRENCY_ISO"/>
-                    <enumeration value="INVALID_EMAIL_ADDRESS"/>
-                    <enumeration value="INVALID_EMPTY_KEY_OWNER"/>
-                    <enumeration value="INVALID_FIELD"/>
-                    <enumeration value="INVALID_FIELD_FOR_INSERT_UPDATE"/>
-                    <enumeration value="INVALID_FIELD_WHEN_USING_TEMPLATE"/>
-                    <enumeration value="INVALID_FILTER_ACTION"/>
-                    <enumeration value="INVALID_GOOGLE_DOCS_URL"/>
-                    <enumeration value="INVALID_ID_FIELD"/>
-                    <enumeration value="INVALID_INET_ADDRESS"/>
-                    <enumeration value="INVALID_LINEITEM_CLONE_STATE"/>
-                    <enumeration value="INVALID_MASTER_OR_TRANSLATED_SOLUTION"/>
-                    <enumeration value="INVALID_OPERATION"/>
-                    <enumeration value="INVALID_OPERATOR"/>
-                    <enumeration value="INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST"/>
-                    <enumeration value="INVALID_PARTNER_NETWORK_STATUS"/>
-                    <enumeration value="INVALID_PERSON_ACCOUNT_OPERATION"/>
-                    <enumeration value="INVALID_SAVE_AS_ACTIVITY_FLAG"/>
-                    <enumeration value="INVALID_SESSION_ID"/>
-                    <enumeration value="INVALID_SETUP_OWNER"/>
-                    <enumeration value="INVALID_STATUS"/>
-                    <enumeration value="INVALID_TYPE"/>
-                    <enumeration value="INVALID_TYPE_FOR_OPERATION"/>
-                    <enumeration value="INVALID_TYPE_ON_FIELD_IN_RECORD"/>
-                    <enumeration value="IP_RANGE_LIMIT_EXCEEDED"/>
-                    <enumeration value="LICENSE_LIMIT_EXCEEDED"/>
-                    <enumeration value="LIMIT_EXCEEDED"/>
-                    <enumeration value="MALFORMED_ID"/>
-                    <enumeration value="MANAGER_NOT_DEFINED"/>
-                    <enumeration value="MASSMAIL_RETRY_LIMIT_EXCEEDED"/>
-                    <enumeration value="MASS_MAIL_LIMIT_EXCEEDED"/>
-                    <enumeration value="MAXIMUM_CCEMAILS_EXCEEDED"/>
-                    <enumeration value="MAXIMUM_DASHBOARD_COMPONENTS_EXCEEDED"/>
-                    <enumeration value="MAXIMUM_HIERARCHY_LEVELS_REACHED"/>
-                    <enumeration value="MAXIMUM_SIZE_OF_ATTACHMENT"/>
-                    <enumeration value="MAXIMUM_SIZE_OF_DOCUMENT"/>
-                    <enumeration value="MAX_ACTIONS_PER_RULE_EXCEEDED"/>
-                    <enumeration value="MAX_ACTIVE_RULES_EXCEEDED"/>
-                    <enumeration value="MAX_APPROVAL_STEPS_EXCEEDED"/>
-                    <enumeration value="MAX_FORMULAS_PER_RULE_EXCEEDED"/>
-                    <enumeration value="MAX_RULES_EXCEEDED"/>
-                    <enumeration value="MAX_RULE_ENTRIES_EXCEEDED"/>
-                    <enumeration value="MAX_TASK_DESCRIPTION_EXCEEEDED"/>
-                    <enumeration value="MAX_TM_RULES_EXCEEDED"/>
-                    <enumeration value="MAX_TM_RULE_ITEMS_EXCEEDED"/>
-                    <enumeration value="MERGE_FAILED"/>
-                    <enumeration value="MISSING_ARGUMENT"/>
-                    <enumeration value="MIXED_DML_OPERATION"/>
-                    <enumeration value="NONUNIQUE_SHIPPING_ADDRESS"/>
-                    <enumeration value="NO_APPLICABLE_PROCESS"/>
-                    <enumeration value="NO_ATTACHMENT_PERMISSION"/>
-                    <enumeration value="NO_MASS_MAIL_PERMISSION"/>
-                    <enumeration value="NUMBER_OUTSIDE_VALID_RANGE"/>
-                    <enumeration value="NUM_HISTORY_FIELDS_BY_SOBJECT_EXCEEDED"/>
-                    <enumeration value="OPTED_OUT_OF_MASS_MAIL"/>
-                    <enumeration value="PACKAGE_LICENSE_REQUIRED"/>
-                    <enumeration value="PORTAL_USER_ALREADY_EXISTS_FOR_CONTACT"/>
-                    <enumeration value="PRIVATE_CONTACT_ON_ASSET"/>
-                    <enumeration value="RECORD_IN_USE_BY_WORKFLOW"/>
-                    <enumeration value="REQUEST_RUNNING_TOO_LONG"/>
-                    <enumeration value="REQUIRED_FIELD_MISSING"/>
-                    <enumeration value="SELF_REFERENCE_FROM_TRIGGER"/>
-                    <enumeration value="SHARE_NEEDED_FOR_CHILD_OWNER"/>
-                    <enumeration value="STANDARD_PRICE_NOT_DEFINED"/>
-                    <enumeration value="STORAGE_LIMIT_EXCEEDED"/>
-                    <enumeration value="STRING_TOO_LONG"/>
-                    <enumeration value="TABSET_LIMIT_EXCEEDED"/>
-                    <enumeration value="TEMPLATE_NOT_ACTIVE"/>
-                    <enumeration value="TERRITORY_REALIGN_IN_PROGRESS"/>
-                    <enumeration value="TEXT_DATA_OUTSIDE_SUPPORTED_CHARSET"/>
-                    <enumeration value="TOO_MANY_APEX_REQUESTS"/>
-                    <enumeration value="TOO_MANY_ENUM_VALUE"/>
-                    <enumeration value="TRANSFER_REQUIRES_READ"/>
-                    <enumeration value="UNABLE_TO_LOCK_ROW"/>
-                    <enumeration value="UNAVAILABLE_RECORDTYPE_EXCEPTION"/>
-                    <enumeration value="UNDELETE_FAILED"/>
-                    <enumeration value="UNKNOWN_EXCEPTION"/>
-                    <enumeration value="UNSPECIFIED_EMAIL_ADDRESS"/>
-                    <enumeration value="UNSUPPORTED_APEX_TRIGGER_OPERATON"/>
-                    <enumeration value="WEBLINK_SIZE_LIMIT_EXCEEDED"/>
-                    <enumeration value="WRONG_CONTROLLER_TYPE"/>
-                </restriction>
-            </simpleType>
-
-
-            <complexType name="Error">
-                <sequence>
-                    <element name="fields"     type="xsd:string" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
-                    <element name="message"    type="xsd:string"/>
-                    <element name="statusCode" type="tns:StatusCode"/>
-                </sequence>
-            </complexType>
-
-            <complexType name="SendEmailError">
-                <sequence>
-                    <element name="fields"     type="xsd:string" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
-                    <element name="message"    type="xsd:string"/>
-                    <element name="statusCode" type="tns:StatusCode"/>
-                    <element name="targetObjectId"     type="tns:ID"  nillable="true"/>
-                </sequence>
-            </complexType>
-
-            <complexType name="SaveResult">
-                <sequence>
-                    <element name="errors"    type="tns:Error" minOccurs="0" maxOccurs="unbounded"/>
-                    <element name="id"        type="tns:ID" nillable="true"/>
-                    <element name="success"   type="xsd:boolean"/>
-                </sequence>
-            </complexType>
-
-            <complexType name="UpsertResult">
-                <sequence>
-                    <element name="created"  type="xsd:boolean"/>
-                    <element name="errors"    type="tns:Error" minOccurs="0" maxOccurs="unbounded"/>
-                    <element name="id"       type="tns:ID" nillable="true"/>
-                    <element name="success"   type="xsd:boolean"/>
-                </sequence>
-            </complexType>
-
-            <complexType name="MergeRequest">
-                <sequence>
-                    <element name="masterRecord" type="ens:sObject"/>
-                    <element name="recordToMergeIds" type="tns:ID" minOccurs="1" maxOccurs="unbounded"/>
-                </sequence>
-            </complexType>
-
-            <complexType name="MergeResult">
-                <sequence>
-                    <element name="errors"    type="tns:Error" minOccurs="0" maxOccurs="unbounded"/>
-                    <element name="id"        type="tns:ID" nillable="true"/>
-                    <element name="mergedRecordIds" type="tns:ID" minOccurs="0" maxOccurs="unbounded"/>
-                    <element name="success"   type="xsd:boolean"/>
-                    <element name="updatedRelatedIds" type="tns:ID" minOccurs="0" maxOccurs="unbounded"/>
-                </sequence>
-            </complexType>
-
-            <complexType name="ProcessRequest">
-                <sequence>
-                    <element name="comments"       type="xsd:string" nillable="true"/>
-                    <element name="nextApproverIds" type="tns:ID" minOccurs="0" maxOccurs="unbounded" nillable="true"/>
-                </sequence>
-            </complexType>
-
-            <complexType name="ProcessSubmitRequest">
-                <complexContent>
-                    <extension base="tns:ProcessRequest">
-                        <sequence>
-                            <element name="objectId"     type="tns:ID"/>
-                        </sequence>
-                    </extension>
-                </complexContent>
-            </complexType>
-
-            <complexType name="ProcessWorkitemRequest">
-                <complexContent>
-                    <extension base="tns:ProcessRequest">
-                        <sequence>
-                            <element name="action"         type="xsd:string"/>
-                            <element name="workitemId"     type="tns:ID"/>
-                        </sequence>
-                    </extension>
-                </complexContent>
-            </complexType>
-
-            <complexType name="ProcessResult">
-                <sequence>
-                    <element name="actorIds"        type="tns:ID" nillable="false" minOccurs="0" maxOccurs="unbounded"/>
-                    <element name="entityId"        type="tns:ID" nillable="true"/>
-                    <element name="errors"          type="tns:Error" minOccurs="0" maxOccurs="unbounded"/>
-                    <element name="instanceId"      type="tns:ID" nillable="true"/>
-                    <element name="instanceStatus"  type="xsd:string" nillable="true"/>
-                    <element name="newWorkitemIds"  type="tns:ID" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
-                    <element name="success"         type="xsd:boolean"/>
-                </sequence>
-            </complexType>
-
-            <complexType name="DeleteResult">
-                <sequence>
-                    <element name="errors"    type="tns:Error" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
-                    <element name="id"        type="tns:ID" nillable="true"/>
-                    <element name="success"   type="xsd:boolean"/>
-                </sequence>
-            </complexType>
-
-            <complexType name="UndeleteResult">
-                <sequence>
-                    <element name="errors"    type="tns:Error" minOccurs="0" maxOccurs="unbounded"/>
-                    <element name="id"        type="tns:ID" nillable="true"/>
-                    <element name="success"   type="xsd:boolean"/>
-                </sequence>
-            </complexType>
-
-            <complexType name="EmptyRecycleBinResult">
-                <sequence>
-                    <element name="errors"    type="tns:Error" minOccurs="0" maxOccurs="unbounded"/>
-                    <element name="id"        type="tns:ID" nillable="true"/>
-                    <element name="success"   type="xsd:boolean"/>
-                </sequence>
-            </complexType>
-
-            <complexType name="LeadConvert">
-                <sequence>
-                    <element name="accountId"              type="tns:ID" nillable="true"/>
-                    <element name="contactId"              type="tns:ID" nillable="true"/>
-                    <element name="convertedStatus"        type="xsd:string"/>
-                    <element name="doNotCreateOpportunity" type="xsd:boolean"/>
-                    <element name="leadId"                 type="tns:ID"/>
-                    <element name="opportunityName"        type="xsd:string" nillable="true"/>
-                    <element name="overwriteLeadSource"    type="xsd:boolean"/>
-                    <element name="ownerId"                type="tns:ID"     nillable="true"/>
-                    <element name="sendNotificationEmail"  type="xsd:boolean"/>
-                </sequence>
-            </complexType>
-
-            <complexType name="LeadConvertResult">
-                <sequence>
-                    <element name="accountId"     type="tns:ID" nillable="true"/>
-                    <element name="contactId"     type="tns:ID" nillable="true"/>
-                    <element name="errors"        type="tns:Error" minOccurs="0" maxOccurs="unbounded"/>
-                    <element name="leadId"        type="tns:ID" nillable="true"/>
-                    <element name="opportunityId" type="tns:ID" nillable="true"/>
-                    <element name="success"       type="xsd:boolean"/>
-                </sequence>
-            </complexType>
-
-            <complexType name="DescribeSObjectResult">
-                <sequence>
-                    <element name="activateable"        type="xsd:boolean"/>
-                    <element name="childRelationships"  type="tns:ChildRelationship" minOccurs="0" maxOccurs="unbounded"/>
-                    <element name="createable"          type="xsd:boolean"/>
-                    <element name="custom"              type="xsd:boolean"/>
-                    <element name="deletable"           type="xsd:boolean"/>
-                    <element name="fields"              type="tns:Field" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
-                    <element name="keyPrefix"           type="xsd:string" nillable="true"/>
-                    <element name="label"               type="xsd:string"/>
-                    <element name="labelPlural"         type="xsd:string"/>
-                    <element name="layoutable"          type="xsd:boolean"/>
-                    <element name="mergeable"           type="xsd:boolean"/>
-                    <element name="name"                type="xsd:string"/>
-                    <element name="queryable"           type="xsd:boolean"/>
-                    <element name="recordTypeInfos"     type="tns:RecordTypeInfo" minOccurs="0" maxOccurs="unbounded"/>
-                    <element name="replicateable"       type="xsd:boolean"/>
-                    <element name="retrieveable"        type="xsd:boolean"/>
-                    <element name="searchable"          type="xsd:boolean" />
-                    <element name="triggerable"         type="xsd:boolean" minOccurs="0"/>
-                    <element name="undeletable"         type="xsd:boolean"/>
-                    <element name="updateable"          type="xsd:boolean"/>
-                    <element name="urlDetail"           type="xsd:string" nillable="true"/>
-                    <element name="urlEdit"             type="xsd:string" nillable="true"/>
-                    <element name="urlNew"              type="xsd:string" nillable="true"/>
-                </sequence>
-            </complexType>
-
-            <complexType name="ChildRelationship">
-                <sequence>
-                    <element name="cascadeDelete"    type="xsd:boolean"/>
-                    <element name="childSObject"     type="xsd:string"/>
-                    <element name="field"            type="xsd:string"/>
-                    <element name="relationshipName" type="xsd:string" minOccurs="0"/>
-                </sequence>
-            </complexType>
-
-            <complexType name="DescribeGlobalResult">
-                <sequence>
-                    <element name="encoding"       type="xsd:string" nillable="true"/>
-                    <element name="maxBatchSize"   type="xsd:int"/>
-                    <element name="types"          type="xsd:string" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
-                </sequence>
-            </complexType>
-
-            <simpleType name="fieldType">
-                <restriction base="xsd:string">
-                    <enumeration value="string"/>
-                    <enumeration value="picklist"/>
-                    <enumeration value="multipicklist"/>
-                    <enumeration value="combobox"/>
-                    <enumeration value="reference"/>
-                    <enumeration value="base64"/>
-                    <enumeration value="boolean"/>
-                    <enumeration value="currency"/>
-                    <enumeration value="textarea"/>
-                    <enumeration value="int"/>
-                    <enumeration value="double"/>
-                    <enumeration value="percent"/>
-                    <enumeration value="phone"/>
-                    <enumeration value="id"/>
-                    <enumeration value="date"/>
-                    <enumeration value="datetime"/>
-                    <enumeration value="time"/>
-                    <enumeration value="url"/>
-                    <enumeration value="email"/>
-                    <enumeration value="encryptedstring"/>
-                    <enumeration value="anyType"/> <!-- can be string, picklist, reference, boolean, currency, int, double, percent, id, date, datetime, url, email -->
-                </restriction>
-            </simpleType>
-
-            <simpleType name="soapType">
-                <restriction base="xsd:string">
-                    <enumeration value="tns:ID"/>
-                    <enumeration value="xsd:base64Binary"/>
-                    <enumeration value="xsd:boolean"/>
-                    <enumeration value="xsd:double"/>
-                    <enumeration value="xsd:int"/>
-                    <enumeration value="xsd:string"/>
-                    <enumeration value="xsd:date"/>
-                    <enumeration value="xsd:dateTime"/>
-                    <enumeration value="xsd:time"/>
-                    <enumeration value="xsd:anyType"/> <!-- can be id, booolean, double, int, string, date, dateTime -->
-                </restriction>
-            </simpleType>
-
-            <complexType name="Field">
-                <sequence>
-                    <element name="autoNumber"         type="xsd:boolean"/>
-                    <element name="byteLength"         type="xsd:int"/>
-                    <element name="calculated"         type="xsd:boolean"/>
-                    <element name="calculatedFormula"  type="xsd:string" minOccurs="0"/>
-                    <element name="caseSensitive"      type="xsd:boolean"/>
-                    <element name="controllerName"     type="xsd:string" minOccurs="0"/>
-                    <element name="createable"         type="xsd:boolean"/>
-                    <element name="custom"             type="xsd:boolean"/>
-                    <element name="defaultValueFormula" type="xsd:string" minOccurs="0"/>
-                    <element name="defaultedOnCreate"  type="xsd:boolean"/>
-                    <element name="dependentPicklist"  type="xsd:boolean" minOccurs="0"/>
-                    <element name="digits"             type="xsd:int"/>
-                    <element name="externalId"         type="xsd:boolean" minOccurs="0"/>
-                    <element name="filterable"         type="xsd:boolean"/>
-                    <element name="htmlFormatted"      type="xsd:boolean" minOccurs="0"/>
-                    <element name="idLookup"           type="xsd:boolean"/>
-                    <element name="inlineHelpText"     type="xsd:string" minOccurs="0"/>
-                    <element name="label"              type="xsd:string"/>
-                    <element name="length"             type="xsd:int"/>
-                    <element name="name"               type="xsd:string"/>
-                    <element name="nameField"          type="xsd:boolean"/>
-                    <element name="namePointing"       type="xsd:boolean" minOccurs="0"/>
-                    <element name="nillable"           type="xsd:boolean"/>
-                    <element name="picklistValues"     type="tns:PicklistEntry" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
-                    <element name="precision"          type="xsd:int"/>
-                    <element name="referenceTo"        type="xsd:string" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
-                    <element name="relationshipName"   type="xsd:string" minOccurs="0"/>
-                    <element name="relationshipOrder"  type="xsd:int" minOccurs="0"/>
-                    <element name="restrictedPicklist" type="xsd:boolean"/>
-                    <element name="scale"              type="xsd:int"/>
-                    <element name="soapType"           type="tns:soapType"/>
-                    <element name="sortable"           type="xsd:boolean" minOccurs="0"/>
-                    <element name="type"               type="tns:fieldType"/>
-                    <element name="unique"             type="xsd:boolean"/>
-                    <element name="updateable"         type="xsd:boolean"/>
-                    <element name="writeRequiresMasterRead" type="xsd:boolean" minOccurs="0"/>
-                </sequence>
-            </complexType>
-
-            <complexType name="PicklistEntry">
-                <sequence>
-                    <element name="active"       type="xsd:boolean"/>
-                    <element name="defaultValue" type="xsd:boolean"/>
-                    <element name="label"        type="xsd:string" nillable="true"/>
-                    <element name="validFor"     type="xsd:base64Binary" minOccurs="0"/>
-                    <element name="value"        type="xsd:string"/>
-                </sequence>
-            </complexType>
-
-            <complexType name="DescribeSoftphoneLayoutResult">
-                <sequence>
-                    <element name="callTypes" type="tns:DescribeSoftphoneLayoutCallType" maxOccurs="unbounded"/>
-                    <element name="id" type="tns:ID"/>
-                    <element name="name" type="xsd:string"/>
-                </sequence>
-            </complexType>
-
-            <complexType name="DescribeSoftphoneLayoutCallType">
-                <sequence>
-                    <element name="infoFields" type="tns:DescribeSoftphoneLayoutInfoField" maxOccurs="unbounded"/>
-                    <element name="name" type="xsd:string"/>
-                    <element name="sections" type="tns:DescribeSoftphoneLayoutSection" minOccurs="0" maxOccurs="unbounded"/>
-                </sequence>
-            </complexType>
-
-            <complexType name="DescribeSoftphoneLayoutInfoField">
-                <sequence>
-                    <element name="name" type="xsd:string"/>
-                </sequence>
-            </complexType>
-
-            <complexType name="DescribeSoftphoneLayoutSection">
-                <sequence>
-                    <element name="entityApiName" type="xsd:string"/>
-                    <element name="items" type="tns:DescribeSoftphoneLayoutItem" maxOccurs="unbounded"/>
-                </sequence>
-            </complexType>
-
-            <complexType name="DescribeSoftphoneLayoutItem">
-                <sequence>
-                    <element name="itemApiName" type="xsd:string"/>
-                </sequence>
-            </complexType>
-
-            <complexType name="DescribeLayoutResult">
-                <sequence>
-                    <element name="layouts"            type="tns:DescribeLayout" maxOccurs="unbounded"/>
-                    <element name="recordTypeMappings" type="tns:RecordTypeMapping" minOccurs="0" maxOccurs="unbounded"/>
-                    <element name="recordTypeSelectorRequired" type="xsd:boolean" />
-                </sequence>
-            </complexType>
-
-            <complexType name="DescribeLayout">
-                <sequence>
-                    <element name="buttonLayoutSection"  type="tns:DescribeLayoutButtonSection" minOccurs="0"/>
-                    <element name="detailLayoutSections" type="tns:DescribeLayoutSection" minOccurs="0" maxOccurs="unbounded"/>
-                    <element name="editLayoutSections"   type="tns:DescribeLayoutSection" minOccurs="0" maxOccurs="unbounded"/>
-                    <element name="id"                   type="tns:ID"/>
-
-
-                    <element name="relatedLists"                type="tns:RelatedList" minOccurs="0" maxOccurs="unbounded"/>
-                </sequence>
-            </complexType>
-
-            <complexType name="DescribeLayoutSection">
-                <sequence>
-                    <element name="columns"                 type="xsd:int"/>
-                    <element name="heading"                 type="xsd:string"/>
-                    <element name="layoutRows"              type="tns:DescribeLayoutRow" maxOccurs="unbounded"/>
-                    <element name="rows"                    type="xsd:int"/>
-                    <element name="useCollapsibleSection"   type="xsd:boolean"/>
-                    <element name="useHeading"              type="xsd:boolean"/>
-                </sequence>
-            </complexType>
-
-            <complexType name="DescribeLayoutButtonSection">
-                <sequence>
-                    <element name="detailButtons"         type="tns:DescribeLayoutButton" maxOccurs="unbounded"/>
-                </sequence>
-            </complexType>
-
-            <complexType name="DescribeLayoutRow">
-                <sequence>
-                    <element name="layoutItems"      type="tns:DescribeLayoutItem" maxOccurs="unbounded"/>
-                    <element name="numItems"         type="xsd:int"/>
-                </sequence>
-            </complexType>
-
-            <complexType name="DescribeLayoutItem">
-                <sequence>
-                    <element name="editable"         type="xsd:boolean"/>
-                    <element name="label"            type="xsd:string" nillable="true"/>
-                    <element name="layoutComponents" type="tns:DescribeLayoutComponent" minOccurs="0" maxOccurs="unbounded"/>
-                    <element name="placeholder"      type="xsd:boolean"/>
-                    <element name="required"         type="xsd:boolean"/>
-                </sequence>
-            </complexType>
-
-            <complexType name="DescribeLayoutButton">
-                <sequence>
-                    <element name="custom"           type="xsd:boolean"/>
-                    <element name="label"            type="xsd:string" nillable="true"/>
-                    <element name="name"             type="xsd:string" nillable="true"/>
-                </sequence>
-            </complexType>
-
-            <complexType name="DescribeLayoutComponent">
-                <sequence>
-                    <element name="displayLines"      type="xsd:int"/>
-                    <element name="tabOrder"          type="xsd:int"/>
-                    <element name="type"              type="tns:layoutComponentType"/>
-                    <element name="value"             type="xsd:string"/>
-                </sequence>
-            </complexType>
-
-            <simpleType name="layoutComponentType">
-                <restriction base="xsd:string">
-                    <enumeration value="Field"/>
-                    <enumeration value="Separator"/>
-                    <enumeration value="SControl"/>
-                    <enumeration value="EmptySpace"/>
-                </restriction>
-            </simpleType>
-
-            <complexType name="RecordTypeInfo">
-                <sequence>
-                    <element name="available"                 type="xsd:boolean"/>
-                    <element name="defaultRecordTypeMapping"  type="xsd:boolean"/>
-                    <element name="name"                      type="xsd:string"/>
-                    <element name="recordTypeId"              type="tns:ID" nillable="true"/>
-                </sequence>
-            </complexType>
-
-            <complexType name="RecordTypeMapping">
-                <sequence>
-                    <element name="available"                 type="xsd:boolean"/>
-                    <element name="defaultRecordTypeMapping"  type="xsd:boolean"/>
-                    <element name="layoutId"                  type="tns:ID"/>
-                    <element name="name"                      type="xsd:string"/>
-                    <element name="picklistsForRecordType"    type="tns:PicklistForRecordType" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
-                    <element name="recordTypeId"              type="tns:ID" nillable="true"/>
-                </sequence>
-            </complexType>
-
-            <complexType name="PicklistForRecordType">
-                <sequence>
-                    <element name="picklistName"      type="xsd:string"/>
-                    <element name="picklistValues"    type="tns:PicklistEntry" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
-                </sequence>
-            </complexType>
-
-            <complexType name="RelatedList">
-                <sequence>
-                    <element name="columns"         type="tns:RelatedListColumn" maxOccurs="unbounded"/>
-                    <element name="custom"          type="xsd:boolean"/>
-                    <element name="field"           type="xsd:string" nillable="true"/>
-                    <element name="label"           type="xsd:string"/>
-                    <element name="limitRows"       type="xsd:int"/>
-                    <element name="name"            type="xsd:string"/>
-                    <element name="sobject"         type="xsd:string" nillable="true"/>
-                    <element name="sort"            type="tns:RelatedListSort" minOccurs="0" maxOccurs="unbounded"/>
-                </sequence>
-            </complexType>
-
-            <complexType name="RelatedListColumn">
-                <sequence>
-                    <element name="field"           type="xsd:string" nillable="true"/>
-                    <element name="format"          type="xsd:string" nillable="true"/>
-                    <element name="label"           type="xsd:string"/>
-                    <element name="name"            type="xsd:string"/>
-                </sequence>
-            </complexType>
-
-            <complexType name="RelatedListSort">
-                <sequence>
-                    <element name="ascending"       type="xsd:boolean"/>
-                    <element name="column"          type="xsd:string"/>
-                </sequence>
-            </complexType>
-
-
-
-            <complexType name="EmailFileAttachment">
-                <sequence>
-                    <element name="body"                nillable="true" minOccurs="0" type="xsd:base64Binary"/>
-                    <element name="fileName"            type="xsd:string" />
-                </sequence>
-            </complexType>
-            <simpleType name="EmailPriority">
-                <restriction base="xsd:string">
-                    <enumeration value="Highest"/>
-                    <enumeration value="High"/>
-                    <enumeration value="Normal"/>
-                    <enumeration value="Low"/>
-                    <enumeration value="Lowest"/>
-                </restriction>
-            </simpleType>
-
-            <complexType name="Email">
-                <sequence>
-                    <element name="bccSender"         type="xsd:boolean" nillable="true"/>
-                    <element name="emailPriority"      type="tns:EmailPriority" nillable="true"/>
-                    <element name="replyTo"            type="xsd:string" nillable="true"/>
-                    <element name="saveAsActivity"     type="xsd:boolean" nillable="true"/>
-                    <element name="senderDisplayName"  type="xsd:string" nillable="true"/>
-                    <element name="subject"            type="xsd:string" nillable="true"/>
-                    <element name="useSignature"       type="xsd:boolean" nillable="true"/>
-                </sequence>
-            </complexType>
-
-            <complexType name="MassEmailMessage">
-                <complexContent>
-                    <extension base="tns:Email">
-                        <sequence>
-                            <element name="description"  type="xsd:string" nillable="true"/>
-                            <element name="targetObjectIds"     minOccurs="0" maxOccurs="250" type="tns:ID" />
-                            <element name="templateId"          type="tns:ID"/>
-                            <element name="whatIds"             minOccurs="0" maxOccurs="250" type="tns:ID" />
-                        </sequence>
-                    </extension>
-                </complexContent>
-            </complexType>
-
-            <complexType name="SingleEmailMessage">
-                <complexContent>
-                    <extension base="tns:Email">
-                        <sequence>
-                            <element name="bccAddresses"        minOccurs="0" maxOccurs="5" type="xsd:string" nillable="true"/>
-                            <element name="ccAddresses"         minOccurs="0" maxOccurs="5" type="xsd:string" nillable="true"/>
-                            <element name="charset"             type="xsd:string" nillable="true"/>
-                            <element name="documentAttachments" minOccurs="0" maxOccurs="unbounded" type="tns:ID" />
-                            <element name="htmlBody"       type="xsd:string" nillable="true"/>
-                            <element name="fileAttachments"     minOccurs="0" maxOccurs="unbounded" type="tns:EmailFileAttachment"/>
-                            <element name="plainTextBody"       type="xsd:string" nillable="true"/>
-                            <element name="targetObjectId"      type="tns:ID" nillable="true"/>
-                            <element name="templateId"          type="tns:ID" nillable="true"/>
-                            <element name="toAddresses"         minOccurs="0" maxOccurs="10" type="xsd:string" nillable="true"/>
-                            <element name="whatId"              type="tns:ID" nillable="true"/>
-                        </sequence>
-                    </extension>
-                </complexContent>
-            </complexType>
-
-            <complexType name="SendEmailResult">
-                <sequence>
-                    <element name="errors"              minOccurs="0" maxOccurs="unbounded" type="tns:SendEmailError" />
-                    <element name="success"             type="xsd:boolean" />
-                </sequence>
-            </complexType>
-
-
-
-            <complexType name="DescribeTabSetResult">
-                <sequence>
-                    <element name="label"           type="xsd:string" />
-                    <element name="logoUrl"         type="xsd:string" />
-                    <element name="namespace"       type="xsd:string" minOccurs="0"/>
-                    <element name="selected"        type="xsd:boolean" />
-                    <element name="tabs"            type="tns:DescribeTab" minOccurs="0" maxOccurs="unbounded"/>
-                </sequence>
-            </complexType>
-
-            <complexType name="DescribeTab">
-                <sequence>
-                    <element name="custom"           type="xsd:boolean" />
-                    <element name="iconUrl"          type="xsd:string" />
-                    <element name="label"            type="xsd:string" />
-                    <element name="miniIconUrl"      type="xsd:string" />
-                    <element name="sobjectName"      type="xsd:string" nillable="true" />
-                    <element name="url"              type="xsd:string" />
-                </sequence>
-            </complexType>
-
-
-
-
-
-            <!-- Login Message Types -->
-            <element name="login">
-                <complexType>
-                    <sequence>
-                        <element name="username" type="xsd:string"/>
-                        <element name="password" type="xsd:string"/>
-                    </sequence>
-                </complexType>
-            </element>
-            <element name="loginResponse">
-                <complexType>
-                    <sequence>
-                        <element name="result" type="tns:LoginResult"/>
-                    </sequence>
-                </complexType>
-            </element>
-
-            <!-- Describe Message Types -->
-            <element name="describeSObject">
-                <complexType>
-                    <sequence>
-                        <element name="sObjectType" type="xsd:string"/>
-                    </sequence>
-                </complexType>
-            </element>
-            <element name="describeSObjectResponse">
-                <complexType>
-                    <sequence>
-                        <element name="result" type="tns:DescribeSObjectResult" nillable="true"/>
-                    </sequence>
-                </complexType>
-            </element>
-
-            <!-- DescibeSObjects Message Types -->
-            <element name="describeSObjects">
-                <complexType>
-                    <sequence>
-                        <element name="sObjectType" type="xsd:string" minOccurs='0' maxOccurs='100' />
-                    </sequence>
-                </complexType>
-            </element>
-            <element name="describeSObjectsResponse">
-                <complexType>
-                    <sequence>
-                        <element name="result" type="tns:DescribeSObjectResult" nillable="true" minOccurs='0' maxOccurs='100'/>
-                    </sequence>
-                </complexType>
-            </element>
-
-            <!-- Describe Global Message Types -->
-            <element name="describeGlobal">
-                <complexType>
-                    <sequence/>
-                </complexType>
-            </element>
-            <element name="describeGlobalResponse">
-                <complexType>
-                    <sequence>
-                        <element name="result" type="tns:DescribeGlobalResult"/>
-                    </sequence>
-                </complexType>
-            </element>
-
-            <element name="describeLayout">
-                <complexType>
-                    <sequence>
-                        <element name="sObjectType" type="xsd:string"/>
-                        <element name="recordTypeIds" type="tns:ID" minOccurs="0" maxOccurs="unbounded"/>
-                    </sequence>
-                </complexType>
-            </element>
-            <element name="describeLayoutResponse">
-                <complexType>
-                    <sequence>
-                        <element name="result" type="tns:DescribeLayoutResult" nillable="true"/>
-                    </sequence>
-                </complexType>
-            </element>
-
-            <element name="describeSoftphoneLayout">
-                <complexType>
-                    <sequence/>
-                </complexType>
-            </element>
-            <element name="describeSoftphoneLayoutResponse">
-                <complexType>
-                    <sequence>
-                        <element name="result" type="tns:DescribeSoftphoneLayoutResult" nillable="true"/>
-                    </sequence>
-                </complexType>
-            </element>
-
-
-            <element name="describeTabs">
-                <complexType>
-                    <sequence/>
-                </complexType>
-            </element>
-            <element name="describeTabsResponse">
-                <complexType>
-                    <sequence>
-                        <element name="result" type="tns:DescribeTabSetResult" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
-                    </sequence>
-                </complexType>
-            </element>
-
-            <!-- Create Message Types -->
-            <element name="create">
-                <complexType>
-                    <sequence>
-                        <element name="sObjects" type="ens:sObject" minOccurs="0" maxOccurs="unbounded"/>
-                    </sequence>
-                </complexType>
-            </element>
-            <element name="createResponse">
-                <complexType>
-                    <sequence>
-                        <element name="result" type="tns:SaveResult" minOccurs="0" maxOccurs="unbounded"/>
-                    </sequence>
-                </complexType>
-            </element>
-
-
-
-            <!-- Send Email Types -->
-            <element name="sendEmail">
-                <complexType>
-                    <sequence>
-                        <element name="messages" type="tns:Email" minOccurs="0" maxOccurs="10"/>
-                    </sequence>
-                </complexType>
-            </element>
-            <element name="sendEmailResponse">
-                <complexType>
-                    <sequence>
-                        <element name="result" minOccurs="0" maxOccurs="10" type="tns:SendEmailResult"/>
-                    </sequence>
-                </complexType>
-            </element>
-
-
-            <!-- Update Message Types -->
-            <element name="update">
-                <complexType>
-                    <sequence>
-                        <element name="sObjects" type="ens:sObject" minOccurs="0" maxOccurs="unbounded"/>
-                    </sequence>
-                </complexType>
-            </element>
-            <element name="updateResponse">
-                <complexType>
-                    <sequence>
-                        <element name="result" type="tns:SaveResult" minOccurs="0" maxOccurs="unbounded"/>
-                    </sequence>
-                </complexType>
-            </element>
-
-            <!-- Upsert Message Types -->
-            <element name="upsert">
-                <complexType>
-                    <sequence>
-                        <element name="externalIDFieldName" type="xsd:string"/>
-                        <element name="sObjects" type="ens:sObject" minOccurs="0" maxOccurs="unbounded"/>
-                    </sequence>
-                </complexType>
-            </element>
-            <element name="upsertResponse">
-                <complexType>
-                    <sequence>
-                        <element name="result" type="tns:UpsertResult" minOccurs="0" maxOccurs="unbounded"/>
-                    </sequence>
-                </complexType>
-            </element>
-
-            <!-- Merge Message Types -->
-            <element name="merge">
-                <complexType>
-                    <sequence>
-                        <element name="request" type="tns:MergeRequest" minOccurs="0" maxOccurs="unbounded"/>
-                    </sequence>
-                </complexType>
-            </element>
-            <element name="mergeResponse">
-                <complexType>
-                    <sequence>
-                        <element name="result" type="tns:MergeResult" minOccurs="0" maxOccurs="unbounded"/>
-                    </sequence>
-                </complexType>
-            </element>
-
-            <!-- Delete Message Types -->
-            <element name="delete">
-                <complexType>
-                    <sequence>
-                        <element name="ids" type="tns:ID" minOccurs="0" maxOccurs="unbounded"/>
-                    </sequence>
-                </complexType>
-            </element>
-            <element name="deleteResponse">
-                <complexType>
-                    <sequence>
-                        <element name="result" type="tns:DeleteResult" minOccurs="0" maxOccurs="unbounded"/>
-                    </sequence>
-                </complexType>
-            </element>
-
-            <!-- Undelete Message Types -->
-            <element name="undelete">
-                <complexType>
-                    <sequence>
-                        <element name="ids" type="tns:ID" minOccurs="1" maxOccurs="unbounded"/>
-                    </sequence>
-                </complexType>
-            </element>
-            <element name="undeleteResponse">
-                <complexType>
-                    <sequence>
-                        <element name="result" type="tns:UndeleteResult" minOccurs="1" maxOccurs="unbounded"/>
-                    </sequence>
-                </complexType>
-            </element>
-
-            <!-- EmptyRecycleBin Message Types -->
-            <element name="emptyRecycleBin">
-                <complexType>
-                    <sequence>
-                        <element name="ids" type="tns:ID" minOccurs="1" maxOccurs="unbounded"/>
-                    </sequence>
-                </complexType>
-            </element>
-            <element name="emptyRecycleBinResponse">
-                <complexType>
-                    <sequence>
-                        <element name="result" type="tns:EmptyRecycleBinResult" minOccurs="1" maxOccurs="unbounded"/>
-                    </sequence>
-                </complexType>
-            </element>
-
-            <!-- Process Message Types -->
-            <element name="process">
-                <complexType>
-                    <sequence>
-                        <element name="actions" type="tns:ProcessRequest" minOccurs="0" maxOccurs="unbounded"/>
-                    </sequence>
-                </complexType>
-            </element>
-            <element name="processResponse">
-                <complexType>
-                    <sequence>
-                        <element name="result" type="tns:ProcessResult" minOccurs="0" maxOccurs="unbounded"/>
-                    </sequence>
-                </complexType>
-            </element>
-
-            <!-- Retrieve (ID List) Message Types -->
-            <element name="retrieve">
-                <complexType>
-                    <sequence>
-                        <element name="fieldList"   type="xsd:string"/>
-                        <element name="sObjectType" type="xsd:string"/>
-                        <element name="ids"         type="tns:ID" minOccurs="0" maxOccurs="unbounded"/>
-                    </sequence>
-                </complexType>
-            </element>
-            <element name="retrieveResponse">
-                <complexType>
-                    <sequence>
-                        <element name="result" type="ens:sObject" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
-                    </sequence>
-                </complexType>
-            </element>
-
-            <!-- Convert Lead Message Types -->
-            <element name="convertLead">
-                <complexType>
-                    <sequence>
-                        <element name="leadConverts" type="tns:LeadConvert" minOccurs="0" maxOccurs="unbounded"/>
-                    </sequence>
-                </complexType>
-            </element>
-            <element name="convertLeadResponse">
-                <complexType>
-                    <sequence>
-                        <element name="result" type="tns:LeadConvertResult" minOccurs="0" maxOccurs="unbounded"/>
-                    </sequence>
-                </complexType>
-            </element>
-
-            <!-- Get Updated Message Types -->
-            <element name="getUpdated">
-                <complexType>
-                    <sequence>
-                        <element name="sObjectType" type="xsd:string"/>
-                        <element name="startDate" type="xsd:dateTime"/>
-                        <element name="endDate" type="xsd:dateTime"/>
-                    </sequence>
-                </complexType>
-            </element>
-            <element name="getUpdatedResponse">
-                <complexType>
-                    <sequence>
-                        <element name="result" type="tns:GetUpdatedResult"/>
-                    </sequence>
-                </complexType>
-            </element>
-
-            <!-- Get Deleted Message Types -->
-            <element name="getDeleted">
-                <complexType>
-                    <sequence>
-                        <element name="sObjectType" type="xsd:string"/>
-                        <element name="startDate" type="xsd:dateTime"/>
-                        <element name="endDate" type="xsd:dateTime"/>
-                    </sequence>
-                </complexType>
-            </element>
-            <element name="getDeletedResponse">
-                <complexType>
-                    <sequence>
-                        <element name="result" type="tns:GetDeletedResult"/>
-                    </sequence>
-                </complexType>
-            </element>
-
-
-            <!-- Logout current session -->
-            <element name="logout">
-                <complexType>
-                </complexType>
-            </element>
-
-            <element name="logoutResponse">
-                <complexType>
-                </complexType>
-            </element>
-
-            <!-- Invalidate a list of session ids -->
-            <element name="invalidateSessions">
-                <complexType>
-                    <sequence>
-                        <element name="sessionIds" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
-                    </sequence>
-                </complexType>
-            </element>
-
-            <element name="invalidateSessionsResponse">
-                <complexType>
-                    <sequence>
-                        <element name="result" type="tns:InvalidateSessionsResult" minOccurs="0" maxOccurs="unbounded"/>
-                    </sequence>
-                </complexType>
-            </element>
-
-            <!-- Create Query -->
-            <element name="query">
-                <complexType>
-                    <sequence>
-                        <element name="queryString" type="xsd:string"/>
-                    </sequence>
-                </complexType>
-            </element>
-            <element name="queryResponse">
-                <complexType>
-                    <sequence>
-                        <element name="result" type="tns:QueryResult"/>
-                    </sequence>
-                </complexType>
-            </element>
-
-            <!-- Create Query All -->
-            <element name="queryAll">
-                <complexType>
-                    <sequence>
-                        <element name="queryString" type="xsd:string"/>
-                    </sequence>
-                </complexType>
-            </element>
-            <element name="queryAllResponse">
-                <complexType>
-                    <sequence>
-                        <element name="result" type="tns:QueryResult"/>
-                    </sequence>
-                </complexType>
-            </element>
-
-            <!-- Next Batch of sObjects from a query -->
-            <element name="queryMore">
-                <complexType>
-                    <sequence>
-                        <element name="queryLocator" type="tns:QueryLocator"/>
-                    </sequence>
-                </complexType>
-            </element>
-            <element name="queryMoreResponse">
-                <complexType>
-                    <sequence>
-                        <element name="result" type="tns:QueryResult"/>
-                    </sequence>
-                </complexType>
-            </element>
-
-
-
-            <!-- Create Search -->
-            <element name="search">
-                <complexType>
-                    <sequence>
-                        <element name="searchString" type="xsd:string"/>
-                    </sequence>
-                </complexType>
-            </element>
-            <element name="searchResponse">
-                <complexType>
-                    <sequence>
-                        <element name="result" type="tns:SearchResult"/>
-                    </sequence>
-                </complexType>
-            </element>
-
-
-
-            <element name="getServerTimestamp">
-                <complexType>
-                    <sequence/>
-                </complexType>
-            </element>
-            <element name="getServerTimestampResponse">
-                <complexType>
-                    <sequence>
-                        <element name="result" type="tns:GetServerTimestampResult"/>
-                    </sequence>
-                </complexType>
-            </element>
-
-            <element name="setPassword">
-                <complexType>
-                    <sequence>
-                        <element name="userId" type="tns:ID"/>
-                        <element name="password" type="xsd:string"/>
-                    </sequence>
-                </complexType>
-            </element>
-            <element name="setPasswordResponse">
-                <complexType>
-                    <sequence>
-                        <element name="result" type="tns:SetPasswordResult"/>
-                    </sequence>
-                </complexType>
-            </element>
-
-            <element name="resetPassword">
-                <complexType>
-                    <sequence>
-                        <element name="userId" type="tns:ID"/>
-                    </sequence>
-                </complexType>
-            </element>
-            <element name="resetPasswordResponse">
-                <complexType>
-                    <sequence>
-                        <element name="result" type="tns:ResetPasswordResult"/>
-                    </sequence>
-                </complexType>
-            </element>
-
-            <element name="getUserInfo">
-                <complexType>
-                    <sequence/>
-                </complexType>
-            </element>
-            <element name="getUserInfoResponse">
-                <complexType>
-                    <sequence>
-                        <element name="result" type="tns:GetUserInfoResult"/>
-                    </sequence>
-                </complexType>
-            </element>
-
-
-
-            <!-- Header Elements -->
-            <element name="SessionHeader">
-                <complexType>
-                    <sequence>
-                        <element name="sessionId" type="xsd:string"/>
-                    </sequence>
-                </complexType>
-            </element>
-
-            <element name="LoginScopeHeader">
-                <complexType>
-                    <sequence>
-                        <element name="organizationId" type="tns:ID"/>
-                        <element name="portalId" type="tns:ID" minOccurs="0"/>
-                    </sequence>
-                </complexType>
-            </element>
-
-
-            <element name="CallOptions">
-                <complexType>
-                    <sequence>
-                        <element name="client"            type="xsd:string" nillable="true"/>
-                        <element name="defaultNamespace"  type="xsd:string" nillable="true"/>
-
-                    </sequence>
-                </complexType>
-            </element>
-
-
-            <element name="QueryOptions">
-                <complexType>
-                    <sequence>
-                        <element name="batchSize"       type="xsd:int" minOccurs="0"/>
-
-                    </sequence>
-                </complexType>
-            </element>
-
-
-            <simpleType name="DebugLevel">
-                <restriction base="xsd:string">
-                    <enumeration value="None"/>
-                    <enumeration value="DebugOnly"/>
-                    <enumeration value="Db"/>
-                </restriction>
-            </simpleType>
-            <element name="DebuggingHeader">
-                <complexType>
-                    <sequence>
-                        <element name="debugLevel" type="tns:DebugLevel"/>
-                    </sequence>
-                </complexType>
-            </element>
-            <element name="DebuggingInfo">
-                <complexType>
-                    <sequence>
-                        <element name="debugLog" type="xsd:string"/>
-                    </sequence>
-                </complexType>
-            </element>
-
-            <element name="AllowFieldTruncationHeader">
-                <complexType>
-                    <sequence>
-                        <element name="allowFieldTruncation" type="xsd:boolean" />
-                    </sequence>
-                </complexType>
-            </element>
-        
-            <!-- ideally this could of just been elem name="..." type="xsd:boolean"
-                 but is required to be nested within a complexType for .NET 1.1 compatibility -->
-            <element name="MruHeader">
-                <complexType>
-                    <sequence>
-                        <element name="updateMru" type="xsd:boolean" />
-                    </sequence>
-                </complexType>
-            </element>
-
-            <element name="EmailHeader">
-                <complexType>
-                    <sequence>
-                        <element name="triggerAutoResponseEmail"    type="xsd:boolean"/>
-                        <element name="triggerOtherEmail"           type="xsd:boolean"/>
-                        <element name="triggerUserEmail"            type="xsd:boolean"/>
-                    </sequence>
-                </complexType>
-            </element>
-
-            <element name="AssignmentRuleHeader">
-                <complexType>
-                    <sequence>
-                        <element name="assignmentRuleId"    type="tns:ID"  nillable="true" />
-                        <element name="useDefaultRule"      type="xsd:boolean" nillable="true" />
-                    </sequence>
-                </complexType>
-            </element>
-
-            <element name="UserTerritoryDeleteHeader">
-                <complexType>
-                    <sequence>
-                        <element name="transferToUserId" type="tns:ID" nillable="true"/>
-                    </sequence>
-                </complexType>
-            </element>
-
-
-
-            <element name="LocaleOptions">
-                <complexType>
-                    <sequence>
-                        <element name="language"  type="xsd:string" minOccurs="0"/>
-                    </sequence>
-                </complexType>
-            </element>
-        </schema>
-
-        <schema elementFormDefault="qualified" xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:fault.partner.soap.sforce.com" xmlns:fns="urn:fault.partner.soap.sforce.com">
-
-            <simpleType name="ExceptionCode">
-                <restriction base="xsd:string">
-                    <enumeration value="API_CURRENTLY_DISABLED"/>
-                    <enumeration value="API_DISABLED_FOR_ORG"/>
-                    <enumeration value="CANT_ADD_STANDADRD_PORTAL_USER_TO_TERRITORY"/>
-                    <enumeration value="CANT_ADD_STANDARD_PORTAL_USER_TO_TERRITORY"/>
-                    <enumeration value="CIRCULAR_OBJECT_GRAPH"/>
-                    <enumeration value="CLIENT_NOT_ACCESSIBLE_FOR_USER"/>
-                    <enumeration value="CLIENT_REQUIRE_UPDATE_FOR_USER"/>
-                    <enumeration value="CUSTOM_METADATA_LIMIT_EXCEEDED"/>
-                    <enumeration value="DUPLICATE_VALUE"/>
-                    <enumeration value="EMAIL_BATCH_SIZE_LIMIT_EXCEEDED"/>
-                    <enumeration value="EMAIL_TO_CASE_INVALID_ROUTING"/>
-                    <enumeration value="EMAIL_TO_CASE_LIMIT_EXCEEDED"/>
-                    <enumeration value="EMAIL_TO_CASE_NOT_ENABLED"/>
-                    <enumeration value="EXCEEDED_ID_LIMIT"/>
-                    <enumeration value="EXCEEDED_LEAD_CONVERT_LIMIT"/>
-                    <enumeration value="EXCEEDED_MAX_SIZE_REQUEST"/>
-                    <enumeration value="EXCEEDED_MAX_TYPES_LIMIT"/>
-                    <enumeration value="EXCEEDED_QUOTA"/>
-                    <enumeration value="FUNCTIONALITY_NOT_ENABLED"/>
-                    <enumeration value="INACTIVE_OWNER_OR_USER"/>
-                    <enumeration value="INACTIVE_PORTAL"/>
-                    <enumeration value="INSUFFICIENT_ACCESS"/>
-                    <enumeration value="INVALID_ASSIGNMENT_RULE"/>
-                    <enumeration value="INVALID_BATCH_SIZE"/>
-                    <enumeration value="INVALID_CLIENT"/>
-                    <enumeration value="INVALID_CROSS_REFERENCE_KEY"/>
-                    <enumeration value="INVALID_FIELD"/>
-                    <enumeration value="INVALID_FILTER_LANGUAGE"/>
-                    <enumeration value="INVALID_FILTER_VALUE"/>
-                    <enumeration value="INVALID_ID_FIELD"/>
-                    <enumeration value="INVALID_LOCALE_LANGUAGE"/>
-                    <enumeration value="INVALID_LOCATOR"/>
-                    <enumeration value="INVALID_LOGIN"/>
-                    <enumeration value="INVALID_NEW_PASSWORD"/>
-                    <enumeration value="INVALID_OPERATION"/>
-                    <enumeration value="INVALID_OPERATION_WITH_EXPIRED_PASSWORD"/>
-                    <enumeration value="INVALID_QUERY_FILTER_OPERATOR"/>
-                    <enumeration value="INVALID_QUERY_LOCATOR"/>
-                    <enumeration value="INVALID_QUERY_SCOPE"/>
-                    <enumeration value="INVALID_REPLICATION_DATE"/>
-                    <enumeration value="INVALID_SEARCH"/>
-                    <enumeration value="INVALID_SEARCH_SCOPE"/>
-                    <enumeration value="INVALID_SESSION_ID"/>
-                    <enumeration value="INVALID_SOAP_HEADER"/>
-                    <enumeration value="INVALID_SSO_GATEWAY_URL"/>
-                    <enumeration value="INVALID_TYPE"/>
-                    <enumeration value="INVALID_TYPE_FOR_OPERATION"/>
-                    <enumeration value="LIMIT_EXCEEDED"/>
-                    <enumeration value="LOGIN_CHALLENGE_ISSUED"/>
-                    <enumeration value="LOGIN_CHALLENGE_PENDING"/>
-                    <enumeration value="LOGIN_DURING_RESTRICTED_DOMAIN"/>
-                    <enumeration value="LOGIN_DURING_RESTRICTED_TIME"/>
-                    <enumeration value="LOGIN_MUST_USE_SECURITY_TOKEN"/>
-                    <enumeration value="MALFORMED_ID"/>
-                    <enumeration value="MALFORMED_QUERY"/>
-                    <enumeration value="MALFORMED_SEARCH"/>
-                    <enumeration value="MISSING_ARGUMENT"/>
-                    <enumeration value="NOT_MODIFIED"/>
-                    <enumeration value="NO_SOFTPHONE_LAYOUT"/>
-                    <enumeration value="NUMBER_OUTSIDE_VALID_RANGE"/>
-                    <enumeration value="OPERATION_TOO_LARGE"/>
-                    <enumeration value="ORG_LOCKED"/>
-                    <enumeration value="ORG_NOT_OWNED_BY_INSTANCE"/>
-                    <enumeration value="PASSWORD_LOCKOUT"/>
-                    <enumeration value="PORTAL_NO_ACCESS"/>
-                    <enumeration value="QUERY_TIMEOUT"/>
-                    <enumeration value="QUERY_TOO_COMPLICATED"/>
-                    <enumeration value="REQUEST_LIMIT_EXCEEDED"/>
-                    <enumeration value="REQUEST_RUNNING_TOO_LONG"/>
-                    <enumeration value="SERVER_UNAVAILABLE"/>
-                    <enumeration value="SSO_SERVICE_DOWN"/>
-                    <enumeration value="TOO_MANY_APEX_REQUESTS"/>
-                    <enumeration value="TRIAL_EXPIRED"/>
-                    <enumeration value="UNKNOWN_EXCEPTION"/>
-                    <enumeration value="UNSUPPORTED_API_VERSION"/>
-                    <enumeration value="UNSUPPORTED_CLIENT"/>
-                </restriction>
-            </simpleType>
-            <!-- For convenience these QNames are returned in the standard soap faultcode element -->
-            <simpleType name="FaultCode">
-                <restriction base="xsd:QName">
-                    <enumeration value="fns:API_CURRENTLY_DISABLED"/>
-                    <enumeration value="fns:API_DISABLED_FOR_ORG"/>
-                    <enumeration value="fns:CANT_ADD_STANDADRD_PORTAL_USER_TO_TERRITORY"/>
-                    <enumeration value="fns:CANT_ADD_STANDARD_PORTAL_USER_TO_TERRITORY"/>
-                    <enumeration value="fns:CIRCULAR_OBJECT_GRAPH"/>
-                    <enumeration value="fns:CLIENT_NOT_ACCESSIBLE_FOR_USER"/>
-                    <enumeration value="fns:CLIENT_REQUIRE_UPDATE_FOR_USER"/>
-                    <enumeration value="fns:CUSTOM_METADATA_LIMIT_EXCEEDED"/>
-                    <enumeration value="fns:DUPLICATE_VALUE"/>
-                    <enumeration value="fns:EMAIL_BATCH_SIZE_LIMIT_EXCEEDED"/>
-                    <enumeration value="fns:EMAIL_TO_CASE_INVALID_ROUTING"/>
-                    <enumeration value="fns:EMAIL_TO_CASE_LIMIT_EXCEEDED"/>
-                    <enumeration value="fns:EMAIL_TO_CASE_NOT_ENABLED"/>
-                    <enumeration value="fns:EXCEEDED_ID_LIMIT"/>
-                    <enumeration value="fns:EXCEEDED_LEAD_CONVERT_LIMIT"/>
-                    <enumeration value="fns:EXCEEDED_MAX_SIZE_REQUEST"/>
-                    <enumeration value="fns:EXCEEDED_MAX_TYPES_LIMIT"/>
-                    <enumeration value="fns:EXCEEDED_QUOTA"/>
-                    <enumeration value="fns:FUNCTIONALITY_NOT_ENABLED"/>
-                    <enumeration value="fns:INACTIVE_OWNER_OR_USER"/>
-                    <enumeration value="fns:INACTIVE_PORTAL"/>
-                    <enumeration value="fns:INSUFFICIENT_ACCESS"/>
-                    <enumeration value="fns:INVALID_ASSIGNMENT_RULE"/>
-                    <enumeration value="fns:INVALID_BATCH_SIZE"/>
-                    <enumeration value="fns:INVALID_CLIENT"/>
-                    <enumeration value="fns:INVALID_CROSS_REFERENCE_KEY"/>
-                    <enumeration value="fns:INVALID_FIELD"/>
-                    <enumeration value="fns:INVALID_FILTER_LANGUAGE"/>
-                    <enumeration value="fns:INVALID_FILTER_VALUE"/>
-                    <enumeration value="fns:INVALID_ID_FIELD"/>
-                    <enumeration value="fns:INVALID_LOCALE_LANGUAGE"/>
-                    <enumeration value="fns:INVALID_LOCATOR"/>
-                    <enumeration value="fns:INVALID_LOGIN"/>
-                    <enumeration value="fns:INVALID_NEW_PASSWORD"/>
-                    <enumeration value="fns:INVALID_OPERATION"/>
-                    <enumeration value="fns:INVALID_OPERATION_WITH_EXPIRED_PASSWORD"/>
-                    <enumeration value="fns:INVALID_QUERY_FILTER_OPERATOR"/>
-                    <enumeration value="fns:INVALID_QUERY_LOCATOR"/>
-                    <enumeration value="fns:INVALID_QUERY_SCOPE"/>
-                    <enumeration value="fns:INVALID_REPLICATION_DATE"/>
-                    <enumeration value="fns:INVALID_SEARCH"/>
-                    <enumeration value="fns:INVALID_SEARCH_SCOPE"/>
-                    <enumeration value="fns:INVALID_SESSION_ID"/>
-                    <enumeration value="fns:INVALID_SOAP_HEADER"/>
-                    <enumeration value="fns:INVALID_SSO_GATEWAY_URL"/>
-                    <enumeration value="fns:INVALID_TYPE"/>
-                    <enumeration value="fns:INVALID_TYPE_FOR_OPERATION"/>
-                    <enumeration value="fns:LIMIT_EXCEEDED"/>
-                    <enumeration value="fns:LOGIN_CHALLENGE_ISSUED"/>
-                    <enumeration value="fns:LOGIN_CHALLENGE_PENDING"/>
-                    <enumeration value="fns:LOGIN_DURING_RESTRICTED_DOMAIN"/>
-                    <enumeration value="fns:LOGIN_DURING_RESTRICTED_TIME"/>
-                    <enumeration value="fns:LOGIN_MUST_USE_SECURITY_TOKEN"/>
-                    <enumeration value="fns:MALFORMED_ID"/>
-                    <enumeration value="fns:MALFORMED_QUERY"/>
-                    <enumeration value="fns:MALFORMED_SEARCH"/>
-                    <enumeration value="fns:MISSING_ARGUMENT"/>
-                    <enumeration value="fns:NOT_MODIFIED"/>
-                    <enumeration value="fns:NO_SOFTPHONE_LAYOUT"/>
-                    <enumeration value="fns:NUMBER_OUTSIDE_VALID_RANGE"/>
-                    <enumeration value="fns:OPERATION_TOO_LARGE"/>
-                    <enumeration value="fns:ORG_LOCKED"/>
-                    <enumeration value="fns:ORG_NOT_OWNED_BY_INSTANCE"/>
-                    <enumeration value="fns:PASSWORD_LOCKOUT"/>
-                    <enumeration value="fns:PORTAL_NO_ACCESS"/>
-                    <enumeration value="fns:QUERY_TIMEOUT"/>
-                    <enumeration value="fns:QUERY_TOO_COMPLICATED"/>
-                    <enumeration value="fns:REQUEST_LIMIT_EXCEEDED"/>
-                    <enumeration value="fns:REQUEST_RUNNING_TOO_LONG"/>
-                    <enumeration value="fns:SERVER_UNAVAILABLE"/>
-                    <enumeration value="fns:SSO_SERVICE_DOWN"/>
-                    <enumeration value="fns:TOO_MANY_APEX_REQUESTS"/>
-                    <enumeration value="fns:TRIAL_EXPIRED"/>
-                    <enumeration value="fns:UNKNOWN_EXCEPTION"/>
-                    <enumeration value="fns:UNSUPPORTED_API_VERSION"/>
-                    <enumeration value="fns:UNSUPPORTED_CLIENT"/>
-                </restriction>
-            </simpleType>
-
-
-            <!-- Fault -->
-            <complexType name="ApiFault">
-                <sequence>
-                    <element name="exceptionCode"    type="fns:ExceptionCode"/>
-                    <element name="exceptionMessage" type="xsd:string"/>
-
-                </sequence>
-            </complexType>
-
-            <element name="fault" type="fns:ApiFault" />
-
-            <complexType name="ApiQueryFault">
-                <complexContent>
-                    <extension base="fns:ApiFault">
-                        <sequence>
-                        <element name="row" type="xsd:int"/>
-                        <element name="column" type="xsd:int"/>
-                        </sequence>
-                    </extension>
-                </complexContent>
-            </complexType>
-
-            <complexType name="LoginFault">
-                <complexContent>
-                    <extension base="fns:ApiFault"/>
-                </complexContent>
-            </complexType>
-            <element name="LoginFault" type="fns:LoginFault"/>
-
-            <complexType name="InvalidQueryLocatorFault">
-                <complexContent>
-                    <extension base="fns:ApiFault"/>
-                </complexContent>
-            </complexType>
-            <element name="InvalidQueryLocatorFault" type="fns:InvalidQueryLocatorFault"/>
-
-            <complexType name="InvalidNewPasswordFault">
-                <complexContent>
-                    <extension base="fns:ApiFault"/>
-                </complexContent>
-            </complexType>
-            <element name="InvalidNewPasswordFault" type="fns:InvalidNewPasswordFault"/>
-
-            <complexType name="InvalidIdFault">
-                <complexContent>
-                    <extension base="fns:ApiFault"/>
-                </complexContent>
-            </complexType>
-            <element name="InvalidIdFault" type="fns:InvalidIdFault"/>
-
-            <complexType name="UnexpectedErrorFault">
-                <complexContent>
-                    <extension base="fns:ApiFault"/>
-                </complexContent>
-            </complexType>
-            <element name="UnexpectedErrorFault" type="fns:UnexpectedErrorFault"/>
-
-            <complexType name="InvalidFieldFault">
-                <complexContent>
-                    <extension base="fns:ApiQueryFault"/>
-                </complexContent>
-            </complexType>
-            <element name="InvalidFieldFault" type="fns:InvalidFieldFault"/>
-
-            <complexType name="InvalidSObjectFault">
-                <complexContent>
-                    <extension base="fns:ApiQueryFault"/>
-                </complexContent>
-            </complexType>
-            <element name="InvalidSObjectFault" type="fns:InvalidSObjectFault"/>
-
-            <complexType name="MalformedQueryFault">
-                <complexContent>
-                    <extension base="fns:ApiQueryFault"/>
-                </complexContent>
-            </complexType>
-            <element name="MalformedQueryFault" type="fns:MalformedQueryFault"/>
-
-            <complexType name="MalformedSearchFault">
-                <complexContent>
-                    <extension base="fns:ApiQueryFault"/>
-                </complexContent>
-            </complexType>
-            <element name="MalformedSearchFault" type="fns:MalformedSearchFault"/>
-
-
-        </schema>
-    </types>
-
-    <!-- Header Message -->
-    <message name="Header">
-        <part element="tns:LoginScopeHeader"             name="LoginScopeHeader"/>
-        <part element="tns:SessionHeader"                name="SessionHeader"/>
-
-        <part element="tns:CallOptions"                  name="CallOptions"/>
-
-        <part element="tns:QueryOptions"                 name="QueryOptions"/>
-        <part element="tns:AssignmentRuleHeader"         name="AssignmentRuleHeader"/>
-        <part element="tns:AllowFieldTruncationHeader"   name="AllowFieldTruncationHeader"/>
-        <part element="tns:MruHeader"                    name="MruHeader"/>
-        <part element="tns:EmailHeader"                  name="EmailHeader"/>
-
-        <part element="tns:UserTerritoryDeleteHeader"    name="UserTerritoryDeleteHeader"/>
-
-        <part element="tns:DebuggingHeader"              name="DebuggingHeader"/>
-        <part element="tns:DebuggingInfo"                name="DebuggingInfo"/>
-        <part element="tns:LocaleOptions"                name="LocaleOptions"/>
-    </message>
-
-    <!-- Fault Messages -->
-
-    <message name="ApiFault">
-        <part name="fault" element="fns:fault"/>
-    </message>
-
-    <message name="LoginFault">
-        <part name="fault" element="fns:LoginFault"/>
-    </message>
-    <message name="InvalidQueryLocatorFault">
-        <part name="fault" element="fns:InvalidQueryLocatorFault"/>
-    </message>
-    <message name="InvalidNewPasswordFault">
-        <part name="fault" element="fns:InvalidNewPasswordFault"/>
-    </message>
-    <message name="InvalidIdFault">
-        <part name="fault" element="fns:InvalidIdFault"/>
-    </message>
-    <message name="UnexpectedErrorFault">
-        <part name="fault" element="fns:UnexpectedErrorFault"/>
-    </message>
-    <message name="InvalidFieldFault">
-        <part name="fault" element="fns:InvalidFieldFault"/>
-    </message>
-    <message name="InvalidSObjectFault">
-        <part name="fault" element="fns:InvalidSObjectFault"/>
-    </message>
-    <message name="MalformedQueryFault">
-        <part name="fault" element="fns:MalformedQueryFault"/>
-    </message>
-    <message name="MalformedSearchFault">
-        <part name="fault" element="fns:MalformedSearchFault"/>
-    </message>
-
-
-    <!-- Method Messages -->
-    <message name="loginRequest">
-        <part element="tns:login" name="parameters"/>
-    </message>
-    <message name="loginResponse">
-        <part element="tns:loginResponse" name="parameters"/>
-    </message>
-
-    <message name="describeSObjectRequest">
-        <part element="tns:describeSObject" name="parameters"/>
-    </message>
-    <message name="describeSObjectResponse">
-        <part element="tns:describeSObjectResponse" name="parameters"/>
-    </message>
-
-    <message name="describeSObjectsRequest">
-        <part element="tns:describeSObjects" name="parameters"/>
-    </message>
-    <message name="describeSObjectsResponse">
-        <part element="tns:describeSObjectsResponse" name="parameters"/>
-    </message>
-
-    <message name="describeGlobalRequest">
-        <part element="tns:describeGlobal" name="parameters"/>
-    </message>
-    <message name="describeGlobalResponse">
-        <part element="tns:describeGlobalResponse" name="parameters"/>
-    </message>
-
-    <message name="describeLayoutRequest">
-        <part element="tns:describeLayout" name="parameters"/>
-    </message>
-    <message name="describeLayoutResponse">
-        <part element="tns:describeLayoutResponse" name="parameters"/>
-    </message>
-
-    <message name="describeSoftphoneLayoutRequest">
-        <part element="tns:describeSoftphoneLayout" name="parameters"/>
-    </message>
-    <message name="describeSoftphoneLayoutResponse">
-        <part element="tns:describeSoftphoneLayoutResponse" name="parameters"/>
-    </message>
-
-    <message name="describeTabsRequest">
-        <part element="tns:describeTabs" name="parameters"/>
-    </message>
-    <message name="describeTabsResponse">
-        <part element="tns:describeTabsResponse" name="parameters"/>
-    </message>
-
-    <message name="createRequest">
-        <part element="tns:create" name="parameters"/>
-    </message>
-    <message name="createResponse">
-        <part element="tns:createResponse" name="parameters"/>
-    </message>
-
-    <message name="updateRequest">
-        <part element="tns:update" name="parameters"/>
-    </message>
-    <message name="updateResponse">
-        <part element="tns:updateResponse" name="parameters"/>
-    </message>
-
-    <message name="upsertRequest">
-        <part element="tns:upsert" name="parameters"/>
-    </message>
-    <message name="upsertResponse">
-        <part element="tns:upsertResponse" name="parameters"/>
-    </message>
-
-    <message name="mergeRequest">
-        <part element="tns:merge" name="parameters"/>
-    </message>
-    <message name="mergeResponse">
-        <part element="tns:mergeResponse" name="parameters"/>
-    </message>
-
-    <message name="deleteRequest">
-        <part element="tns:delete" name="parameters"/>
-    </message>
-    <message name="deleteResponse">
-        <part element="tns:deleteResponse" name="parameters"/>
-    </message>
-
-    <message name="undeleteRequest">
-        <part element="tns:undelete" name="parameters"/>
-    </message>
-    <message name="undeleteResponse">
-        <part element="tns:undeleteResponse" name="parameters"/>
-    </message>
-
-    <message name="emptyRecycleBinRequest">
-        <part element="tns:emptyRecycleBin" name="parameters"/>
-    </message>
-    <message name="emptyRecycleBinResponse">
-        <part element="tns:emptyRecycleBinResponse" name="parameters"/>
-    </message>
-
-    <message name="retrieveRequest">
-        <part element="tns:retrieve" name="parameters"/>
-    </message>
-    <message name="retrieveResponse">
-        <part element="tns:retrieveResponse" name="parameters"/>
-    </message>
-
-    <message name="processRequest">
-        <part element="tns:process" name="parameters"/>
-    </message>
-    <message name="processResponse">
-        <part element="tns:processResponse" name="parameters"/>
-    </message>
-
-    <message name="convertLeadRequest">
-        <part element="tns:convertLead" name="parameters"/>
-    </message>
-    <message name="convertLeadResponse">
-        <part element="tns:convertLeadResponse" name="parameters"/>
-    </message>
-
-    <message name="logoutRequest">
-        <part element="tns:logout" name="parameters"/>
-    </message>
-    <message name="logoutResponse">
-        <part element="tns:logoutResponse" name="parameters"/>
-    </message>
-
-    <message name="invalidateSessionsRequest">
-        <part element="tns:invalidateSessions" name="parameters"/>
-    </message>
-    <message name="invalidateSessionsResponse">
-        <part element="tns:invalidateSessionsResponse" name="parameters"/>
-    </message>
-
-    <message name="getDeletedRequest">
-        <part element="tns:getDeleted" name="parameters"/>
-    </message>
-    <message name="getDeletedResponse">
-        <part element="tns:getDeletedResponse" name="parameters"/>
-    </message>
-
-    <message name="getUpdatedRequest">
-        <part element="tns:getUpdated" name="parameters"/>
-    </message>
-    <message name="getUpdatedResponse">
-        <part element="tns:getUpdatedResponse" name="parameters"/>
-    </message>
-
-    <message name="queryRequest">
-        <part element="tns:query" name="parameters"/>
-    </message>
-    <message name="queryResponse">
-        <part element="tns:queryResponse" name="parameters"/>
-    </message>
-
-    <message name="queryAllRequest">
-        <part element="tns:queryAll" name="parameters"/>
-    </message>
-    <message name="queryAllResponse">
-        <part element="tns:queryAllResponse" name="parameters"/>
-    </message>
-
-    <message name="queryMoreRequest">
-        <part element="tns:queryMore" name="parameters"/>
-    </message>
-    <message name="queryMoreResponse">
-        <part element="tns:queryMoreResponse" name="parameters"/>
-    </message>
-
-    <message name="searchRequest">
-        <part element="tns:search" name="parameters"/>
-    </message>
-    <message name="searchResponse">
-        <part element="tns:searchResponse" name="parameters"/>
-    </message>
-
-    <message name="getServerTimestampRequest">
-        <part element="tns:getServerTimestamp" name="parameters"/>
-    </message>
-    <message name="getServerTimestampResponse">
-        <part element="tns:getServerTimestampResponse" name="parameters"/>
-    </message>
-
-    <message name="setPasswordRequest">
-        <part element="tns:setPassword" name="parameters"/>
-    </message>
-    <message name="setPasswordResponse">
-        <part element="tns:setPasswordResponse" name="parameters"/>
-    </message>
-
-    <message name="resetPasswordRequest">
-        <part element="tns:resetPassword" name="parameters"/>
-    </message>
-    <message name="resetPasswordResponse">
-        <part element="tns:resetPasswordResponse" name="parameters"/>
-    </message>
-
-    <message name="getUserInfoRequest">
-        <part element="tns:getUserInfo" name="parameters"/>
-    </message>
-    <message name="getUserInfoResponse">
-        <part element="tns:getUserInfoResponse" name="parameters"/>
-    </message>
-
-    <message name="sendEmailRequest">
-        <part element="tns:sendEmail" name="parameters"/>
-    </message>
-    <message name="sendEmailResponse">
-        <part element="tns:sendEmailResponse" name="parameters"/>
-    </message>
-
-
-
-    <!-- Soap PortType -->
-    <portType name="Soap">
-        <operation name="login">
-            <documentation>Login to the Salesforce.com SOAP Api</documentation>
-            <input  message="tns:loginRequest"/>
-            <output message="tns:loginResponse"/>
-            <fault  message="tns:LoginFault" name="LoginFault"/>
-            <fault  message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
-            <fault  message="tns:InvalidIdFault" name="InvalidIdFault"/>
-        </operation>
-
-        <operation name="describeSObject">
-            <documentation>Describe an sObject</documentation>
-            <input  message="tns:describeSObjectRequest"/>
-            <output message="tns:describeSObjectResponse"/>
-            <fault  message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
-            <fault  message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
-        </operation>
-
-        <operation name="describeSObjects">
-            <documentation>Describe a number sObjects</documentation>
-            <input  message="tns:describeSObjectsRequest"/>
-            <output message="tns:describeSObjectsResponse"/>
-            <fault  message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
-            <fault  message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
-        </operation>
-
-        <operation name="describeGlobal">
-            <documentation>Describe the Global state</documentation>
-            <input  message="tns:describeGlobalRequest"/>
-            <output message="tns:describeGlobalResponse"/>
-            <fault  message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
-        </operation>
-
-        <operation name="describeLayout">
-            <documentation>Describe the layout of an sObject</documentation>
-            <input  message="tns:describeLayoutRequest"/>
-            <output message="tns:describeLayoutResponse"/>
-            <fault  message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
-            <fault  message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
-            <fault  message="tns:InvalidIdFault" name="InvalidIdFault"/>
-        </operation>
-
-        <operation name="describeSoftphoneLayout">
-            <documentation>Describe the layout of the SoftPhone</documentation>
-            <input  message="tns:describeSoftphoneLayoutRequest"/>
-            <output message="tns:describeSoftphoneLayoutResponse"/>
-            <fault  message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
-        </operation>
-
-        <operation name="describeTabs">
-            <documentation>Describe the tabs that appear on a users page</documentation>
-            <input  message="tns:describeTabsRequest"/>
-            <output message="tns:describeTabsResponse"/>
-            <fault  message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
-        </operation>
-
-        <operation name="create">
-            <documentation>Create a set of new sObjects</documentation>
-            <input  message="tns:createRequest"/>
-            <output message="tns:createResponse"/>
-            <fault  message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
-            <fault  message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
-            <fault  message="tns:InvalidIdFault" name="InvalidIdFault"/>
-            <fault  message="tns:InvalidFieldFault" name="InvalidFieldFault"/>
-        </operation>
-
-        <operation name="update">
-            <documentation>Update a set of sObjects</documentation>
-            <input  message="tns:updateRequest"/>
-            <output message="tns:updateResponse"/>
-            <fault  message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
-            <fault  message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
-            <fault  message="tns:InvalidIdFault" name="InvalidIdFault"/>
-            <fault  message="tns:InvalidFieldFault" name="InvalidFieldFault"/>
-        </operation>
-
-        <operation name="upsert">
-            <documentation>Update or insert a set of sObjects based on object id</documentation>
-            <input  message="tns:upsertRequest"/>
-            <output message="tns:upsertResponse"/>
-            <fault  message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
-            <fault  message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
-            <fault  message="tns:InvalidIdFault" name="InvalidIdFault"/>
-            <fault  message="tns:InvalidFieldFault" name="InvalidFieldFault"/>
-        </operation>
-
-        <operation name="merge">
-            <documentation>Merge and update a set of sObjects based on object id</documentation>
-            <input  message="tns:mergeRequest"/>
-            <output message="tns:mergeResponse"/>
-            <fault  message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
-            <fault  message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
-            <fault  message="tns:InvalidIdFault" name="InvalidIdFault"/>
-            <fault  message="tns:InvalidFieldFault" name="InvalidFieldFault"/>
-        </operation>
-
-        <operation name="delete">
-            <documentation>Delete a set of sObjects</documentation>
-            <input  message="tns:deleteRequest"/>
-            <output message="tns:deleteResponse"/>
-            <fault  message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
-        </operation>
-
-        <operation name="undelete">
-            <documentation>Undelete a set of sObjects</documentation>
-            <input  message="tns:undeleteRequest"/>
-            <output message="tns:undeleteResponse"/>
-            <fault  message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
-        </operation>
-
-        <operation name="emptyRecycleBin">
-            <documentation>Empty a set of sObjects from the recycle bin</documentation>
-            <input  message="tns:emptyRecycleBinRequest"/>
-            <output message="tns:emptyRecycleBinResponse"/>
-            <fault  message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
-        </operation>
-
-        <operation name="retrieve">
-            <documentation>Get a set of sObjects</documentation>
-            <input  message="tns:retrieveRequest"/>
-            <output message="tns:retrieveResponse"/>
-            <fault  message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
-            <fault  message="tns:InvalidFieldFault" name="InvalidFieldFault"/>
-            <fault  message="tns:MalformedQueryFault" name="MalformedQueryFault"/>
-            <fault  message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
-            <fault  message="tns:InvalidIdFault" name="InvalidIdFault"/>
-        </operation>
-
-        <operation name="process">
-            <documentation>Submit an entity to a workflow process or process a workitem</documentation>
-            <input  message="tns:processRequest"/>
-            <output message="tns:processResponse"/>
-            <fault  message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
-            <fault  message="tns:InvalidIdFault" name="InvalidIdFault"/>
-        </operation>
-
-        <operation name="convertLead">
-            <documentation>convert a set of leads</documentation>
-            <input  message="tns:convertLeadRequest"/>
-            <output message="tns:convertLeadResponse"/>
-            <fault  message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
-        </operation>
-
-        <operation name="logout">
-            <documentation>Logout the current user, invalidating the current session.</documentation>
-            <input  message="tns:logoutRequest"/>
-            <output message="tns:logoutResponse"/>
-            <fault  message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
-        </operation>
-
-        <operation name="invalidateSessions">
-            <documentation>Logs out and invalidates session ids</documentation>
-            <input  message="tns:invalidateSessionsRequest"/>
-            <output message="tns:invalidateSessionsResponse"/>
-            <fault  message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
-        </operation>
-
-        <operation name="getDeleted">
-            <documentation>Get the IDs for deleted sObjects</documentation>
-            <input  message="tns:getDeletedRequest"/>
-            <output message="tns:getDeletedResponse"/>
-            <fault  message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
-            <fault  message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
-        </operation>
-
-        <operation name="getUpdated">
-            <documentation>Get the IDs for updated sObjects</documentation>
-            <input  message="tns:getUpdatedRequest"/>
-            <output message="tns:getUpdatedResponse"/>
-            <fault  message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
-            <fault  message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
-        </operation>
-
-        <operation name="query">
-            <documentation>Create a Query Cursor</documentation>
-            <input  message="tns:queryRequest"/>
-            <output message="tns:queryResponse"/>
-            <fault  message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
-            <fault  message="tns:InvalidFieldFault" name="InvalidFieldFault"/>
-            <fault  message="tns:MalformedQueryFault" name="MalformedQueryFault"/>
-            <fault  message="tns:InvalidIdFault" name="InvalidIdFault"/>
-            <fault  message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
-            <fault  message="tns:InvalidQueryLocatorFault" name="InvalidQueryLocatorFault"/>
-        </operation>
-
-        <operation name="queryAll">
-            <documentation>Create a Query Cursor, including deleted sObjects</documentation>
-            <input  message="tns:queryAllRequest"/>
-            <output message="tns:queryAllResponse"/>
-            <fault  message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
-            <fault  message="tns:InvalidFieldFault" name="InvalidFieldFault"/>
-            <fault  message="tns:MalformedQueryFault" name="MalformedQueryFault"/>
-            <fault  message="tns:InvalidIdFault" name="InvalidIdFault"/>
-            <fault  message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
-            <fault  message="tns:InvalidQueryLocatorFault" name="InvalidQueryLocatorFault"/>
-        </operation>
-
-        <operation name="queryMore">
-            <documentation>Gets the next batch of sObjects from a query</documentation>
-            <input  message="tns:queryMoreRequest"/>
-            <output message="tns:queryMoreResponse"/>
-            <fault  message="tns:InvalidQueryLocatorFault" name="InvalidQueryLocatorFault"/>
-            <fault  message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
-            <fault  message="tns:InvalidFieldFault" name="InvalidFieldFault"/>
-        </operation>
-
-        <operation name="search">
-            <documentation>Search for sObjects</documentation>
-            <input  message="tns:searchRequest"/>
-            <output message="tns:searchResponse"/>
-            <fault  message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
-            <fault  message="tns:InvalidFieldFault" name="InvalidFieldFault"/>
-            <fault  message="tns:MalformedSearchFault" name="MalformedSearchFault"/>
-            <fault  message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
-        </operation>
-
-        <operation name="getServerTimestamp">
-            <documentation>Gets server timestamp</documentation>
-            <input  message="tns:getServerTimestampRequest"/>
-            <output message="tns:getServerTimestampResponse"/>
-            <fault  message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
-        </operation>
-
-        <operation name="setPassword">
-            <documentation>Set a user's password</documentation>
-            <input  message="tns:setPasswordRequest"/>
-            <output message="tns:setPasswordResponse"/>
-            <fault  message="tns:InvalidIdFault" name="InvalidIdFault"/>
-            <fault  message="tns:InvalidNewPasswordFault" name="InvalidNewPasswordFault"/>
-            <fault  message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
-        </operation>
-
-        <operation name="resetPassword">
-            <documentation>Reset a user's password</documentation>
-            <input  message="tns:resetPasswordRequest"/>
-            <output message="tns:resetPasswordResponse"/>
-            <fault  message="tns:InvalidIdFault" name="InvalidIdFault"/>
-            <fault  message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
-        </operation>
-
-        <operation name="getUserInfo">
-            <documentation>Returns standard information relevant to the current user</documentation>
-            <input  message="tns:getUserInfoRequest"/>
-            <output message="tns:getUserInfoResponse"/>
-            <fault  message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
-        </operation>
-
-        <operation name="sendEmail">
-            <documentation>Send outbound email</documentation>
-            <input  message="tns:sendEmailRequest"/>
-            <output message="tns:sendEmailResponse"/>
-            <fault  message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
-        </operation>
-
-    </portType>
-
-    <!-- Soap Binding -->
-    <binding name="SoapBinding" type="tns:Soap">
-        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
-        <operation name="login">
-            <soap:operation soapAction=""/>
-            <input>
-                <soap:header use="literal" message="tns:Header" part="LoginScopeHeader"/>
-                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
-                <soap:body parts="parameters" use="literal"/>
-            </input>
-            <output>
-                <soap:body use="literal"/>
-            </output>
-            <fault name="LoginFault">
-                <soap:fault name="LoginFault" use="literal"/>
-            </fault>
-            <fault name="UnexpectedErrorFault">
-                <soap:fault name="UnexpectedErrorFault" use="literal"/>
-            </fault>
-            <fault name="InvalidIdFault">
-                <soap:fault name="InvalidIdFault" use="literal"/>
-            </fault>
-        </operation>
-        <operation name="describeSObject">
-            <soap:operation soapAction=""/>
-            <input>
-                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
-                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
-                <soap:header use="literal" message="tns:Header" part="LocaleOptions"/>
-                <soap:body parts="parameters" use="literal"/>
-            </input>
-            <output>
-                <soap:body use="literal"/>
-            </output>
-            <fault name="InvalidSObjectFault">
-                <soap:fault name="InvalidSObjectFault" use="literal"/>
-            </fault>
-            <fault name="UnexpectedErrorFault">
-                <soap:fault name="UnexpectedErrorFault" use="literal"/>
-            </fault>
-        </operation>
-        <operation name="describeSObjects">
-            <soap:operation soapAction=""/>
-            <input>
-                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
-                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
-                <soap:header use="literal" message="tns:Header" part="LocaleOptions"/>
-                <soap:body parts="parameters" use="literal"/>
-            </input>
-            <output>
-                <soap:body use="literal"/>
-            </output>
-            <fault name="InvalidSObjectFault">
-                <soap:fault name="InvalidSObjectFault" use="literal"/>
-            </fault>
-            <fault name="UnexpectedErrorFault">
-                <soap:fault name="UnexpectedErrorFault" use="literal"/>
-            </fault>
-        </operation>
-        <operation name="describeGlobal">
-            <soap:operation soapAction=""/>
-            <input>
-                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
-                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
-                <soap:body parts="parameters" use="literal"/>
-            </input>
-            <output>
-                <soap:body use="literal"/>
-            </output>
-            <fault name="UnexpectedErrorFault">
-                <soap:fault name="UnexpectedErrorFault" use="literal"/>
-            </fault>
-        </operation>
-        <operation name="describeLayout">
-            <soap:operation soapAction=""/>
-            <input>
-                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
-                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
-                <soap:body parts="parameters" use="literal"/>
-            </input>
-            <output>
-                <soap:body use="literal"/>
-            </output>
-            <fault name="InvalidSObjectFault">
-                <soap:fault name="InvalidSObjectFault" use="literal"/>
-            </fault>
-            <fault name="UnexpectedErrorFault">
-                <soap:fault name="UnexpectedErrorFault" use="literal"/>
-            </fault>
-            <fault name="InvalidIdFault">
-                <soap:fault name="InvalidIdFault" use="literal"/>
-            </fault>
-        </operation>
-        <operation name="describeSoftphoneLayout">
-            <soap:operation soapAction=""/>
-            <input>
-                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
-                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
-                <soap:body parts="parameters" use="literal"/>
-            </input>
-            <output>
-                <soap:body use="literal"/>
-            </output>
-            <fault name="UnexpectedErrorFault">
-                <soap:fault name="UnexpectedErrorFault" use="literal"/>
-            </fault>
-        </operation>
-        <operation name="describeTabs">
-            <soap:operation soapAction=""/>
-            <input>
-                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
-                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
-                <soap:body parts="parameters" use="literal"/>
-            </input>
-            <output>
-                <soap:body use="literal"/>
-            </output>
-            <fault name="UnexpectedErrorFault">
-                <soap:fault name="UnexpectedErrorFault" use="literal"/>
-            </fault>
-        </operation>
-        <operation name="create">
-            <soap:operation soapAction=""/>
-            <input>
-                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
-                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
-                <soap:header use="literal" message="tns:Header" part="AssignmentRuleHeader"/>
-                <soap:header use="literal" message="tns:Header" part="MruHeader"/>
-                <soap:header use="literal" message="tns:Header" part="AllowFieldTruncationHeader"/>
-                <soap:header use="literal" message="tns:Header" part="DebuggingHeader"/>
-                <soap:header use="literal" message="tns:Header" part="EmailHeader"/>
-                <soap:body parts="parameters" use="literal"/>
-            </input>
-            <output>
-                <soap:header use="literal" message="tns:Header" part="DebuggingInfo"/>
-                <soap:body use="literal"/>
-            </output>
-            <fault name="InvalidSObjectFault">
-                <soap:fault name="InvalidSObjectFault" use="literal"/>
-            </fault>
-            <fault name="UnexpectedErrorFault">
-                <soap:fault name="UnexpectedErrorFault" use="literal"/>
-            </fault>
-            <fault name="InvalidIdFault">
-                <soap:fault name="InvalidIdFault" use="literal"/>
-            </fault>
-            <fault name="InvalidFieldFault">
-                <soap:fault name="InvalidFieldFault" use="literal"/>
-            </fault>
-        </operation>
-        <operation name="update">
-            <soap:operation soapAction=""/>
-            <input>
-                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
-                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
-                <soap:header use="literal" message="tns:Header" part="AssignmentRuleHeader"/>
-                <soap:header use="literal" message="tns:Header" part="MruHeader"/>
-                <soap:header use="literal" message="tns:Header" part="AllowFieldTruncationHeader"/>
-                <soap:header use="literal" message="tns:Header" part="DebuggingHeader"/>
-                <soap:header use="literal" message="tns:Header" part="EmailHeader"/>
-                <soap:body parts="parameters" use="literal"/>
-            </input>
-            <output>
-                <soap:header use="literal" message="tns:Header" part="DebuggingInfo"/>
-                <soap:body use="literal"/>
-            </output>
-            <fault name="InvalidSObjectFault">
-                <soap:fault name="InvalidSObjectFault" use="literal"/>
-            </fault>
-            <fault name="UnexpectedErrorFault">
-                <soap:fault name="UnexpectedErrorFault" use="literal"/>
-            </fault>
-            <fault name="InvalidIdFault">
-                <soap:fault name="InvalidIdFault" use="literal"/>
-            </fault>
-            <fault name="InvalidFieldFault">
-                <soap:fault name="InvalidFieldFault" use="literal"/>
-            </fault>
-        </operation>
-        <operation name="upsert">
-            <soap:operation soapAction=""/>
-            <input>
-                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
-                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
-                <soap:header use="literal" message="tns:Header" part="AssignmentRuleHeader"/>
-                <soap:header use="literal" message="tns:Header" part="MruHeader"/>
-                <soap:header use="literal" message="tns:Header" part="AllowFieldTruncationHeader"/>
-                <soap:header use="literal" message="tns:Header" part="DebuggingHeader"/>
-                <soap:header use="literal" message="tns:Header" part="EmailHeader"/>
-                <soap:body parts="parameters" use="literal"/>
-            </input>
-            <output>
-                <soap:header use="literal" message="tns:Header" part="DebuggingInfo"/>
-                <soap:body use="literal"/>
-            </output>
-            <fault name="InvalidSObjectFault">
-                <soap:fault name="InvalidSObjectFault" use="literal"/>
-            </fault>
-            <fault name="UnexpectedErrorFault">
-                <soap:fault name="UnexpectedErrorFault" use="literal"/>
-            </fault>
-            <fault name="InvalidIdFault">
-                <soap:fault name="InvalidIdFault" use="literal"/>
-            </fault>
-            <fault name="InvalidFieldFault">
-                <soap:fault name="InvalidFieldFault" use="literal"/>
-            </fault>
-        </operation>
-        <operation name="merge">
-            <soap:operation soapAction=""/>
-            <input>
-                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
-                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
-                <soap:header use="literal" message="tns:Header" part="AssignmentRuleHeader"/>
-                <soap:header use="literal" message="tns:Header" part="MruHeader"/>
-                <soap:header use="literal" message="tns:Header" part="AllowFieldTruncationHeader"/>
-                <soap:header use="literal" message="tns:Header" part="DebuggingHeader"/>
-                <soap:header use="literal" message="tns:Header" part="EmailHeader"/>
-                <soap:body parts="parameters" use="literal"/>
-            </input>
-            <output>
-                <soap:header use="literal" message="tns:Header" part="DebuggingInfo"/>
-                <soap:body use="literal"/>
-            </output>
-            <fault name="InvalidSObjectFault">
-                <soap:fault name="InvalidSObjectFault" use="literal"/>
-            </fault>
-            <fault name="UnexpectedErrorFault">
-                <soap:fault name="UnexpectedErrorFault" use="literal"/>
-            </fault>
-            <fault name="InvalidIdFault">
-                <soap:fault name="InvalidIdFault" use="literal"/>
-            </fault>
-            <fault name="InvalidFieldFault">
-                <soap:fault name="InvalidFieldFault" use="literal"/>
-            </fault>
-        </operation>
-        <operation name="delete">
-            <soap:operation soapAction=""/>
-            <input>
-                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
-                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
-                <soap:header use="literal" message="tns:Header" part="UserTerritoryDeleteHeader"/>
-                <soap:header use="literal" message="tns:Header" part="EmailHeader"/>
-                <soap:header use="literal" message="tns:Header" part="AllowFieldTruncationHeader"/>
-                <soap:header use="literal" message="tns:Header" part="DebuggingHeader"/>
-                <soap:body parts="parameters" use="literal"/>
-            </input>
-            <output>
-                <soap:header use="literal" message="tns:Header" part="DebuggingInfo"/>
-                <soap:body use="literal"/>
-            </output>
-            <fault name="UnexpectedErrorFault">
-                <soap:fault name="UnexpectedErrorFault" use="literal"/>
-            </fault>
-        </operation>
-        <operation name="undelete">
-            <soap:operation soapAction=""/>
-            <input>
-                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
-                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
-                <soap:header use="literal" message="tns:Header" part="AllowFieldTruncationHeader"/>
-                <soap:header use="literal" message="tns:Header" part="DebuggingHeader"/>
-                <soap:body parts="parameters" use="literal"/>
-            </input>
-            <output>
-                <soap:header use="literal" message="tns:Header" part="DebuggingInfo"/>
-                <soap:body use="literal"/>
-            </output>
-            <fault name="UnexpectedErrorFault">
-                <soap:fault name="UnexpectedErrorFault" use="literal"/>
-            </fault>
-        </operation>
-        <operation name="emptyRecycleBin">
-            <soap:operation soapAction=""/>
-            <input>
-                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
-                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
-                <soap:body parts="parameters" use="literal"/>
-            </input>
-            <output>
-                <soap:body use="literal"/>
-            </output>
-            <fault name="UnexpectedErrorFault">
-                <soap:fault name="UnexpectedErrorFault" use="literal"/>
-            </fault>
-        </operation>
-        <operation name="retrieve">
-            <soap:operation soapAction=""/>
-            <input>
-                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
-                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
-                <soap:header use="literal" message="tns:Header" part="QueryOptions"/>
-                <soap:header use="literal" message="tns:Header" part="MruHeader"/>
-                <soap:body parts="parameters" use="literal"/>
-            </input>
-            <output>
-                <soap:body use="literal"/>
-            </output>
-            <fault name="InvalidSObjectFault">
-                <soap:fault name="InvalidSObjectFault" use="literal"/>
-            </fault>
-            <fault name="InvalidFieldFault">
-                <soap:fault name="InvalidFieldFault" use="literal"/>
-            </fault>
-            <fault name="MalformedQueryFault">
-                <soap:fault name="MalformedQueryFault" use="literal"/>
-            </fault>
-            <fault name="UnexpectedErrorFault">
-                <soap:fault name="UnexpectedErrorFault" use="literal"/>
-            </fault>
-            <fault name="InvalidIdFault">
-                <soap:fault name="InvalidIdFault" use="literal"/>
-            </fault>
-        </operation>
-        <operation name="process">
-            <soap:operation soapAction=""/>
-            <input>
-                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
-                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
-                <soap:header use="literal" message="tns:Header" part="AllowFieldTruncationHeader"/>
-                <soap:header use="literal" message="tns:Header" part="DebuggingHeader"/>
-                <soap:body parts="parameters" use="literal"/>
-            </input>
-            <output>
-                <soap:header use="literal" message="tns:Header" part="DebuggingInfo"/>
-                <soap:body use="literal"/>
-            </output>
-            <fault name="UnexpectedErrorFault">
-                <soap:fault name="UnexpectedErrorFault" use="literal"/>
-            </fault>
-            <fault name="InvalidIdFault">
-                <soap:fault name="InvalidIdFault" use="literal"/>
-            </fault>
-        </operation>
-        <operation name="convertLead">
-            <soap:operation soapAction=""/>
-            <input>
-                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
-                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
-                <soap:header use="literal" message="tns:Header" part="AllowFieldTruncationHeader"/>
-                <soap:header use="literal" message="tns:Header" part="DebuggingHeader"/>
-                <soap:body parts="parameters" use="literal"/>
-            </input>
-            <output>
-                <soap:header use="literal" message="tns:Header" part="DebuggingInfo"/>
-                <soap:body use="literal"/>
-            </output>
-            <fault name="UnexpectedErrorFault">
-                <soap:fault name="UnexpectedErrorFault" use="literal"/>
-            </fault>
-        </operation>
-        <operation name="logout">
-            <soap:operation soapAction=""/>
-            <input>
-                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
-                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
-                <soap:body parts="parameters" use="literal"/>
-            </input>
-            <output>
-                <soap:body use="literal"/>
-            </output>
-            <fault name="UnexpectedErrorFault">
-                <soap:fault name="UnexpectedErrorFault" use="literal"/>
-            </fault>
-        </operation>
-        <operation name="invalidateSessions">
-            <soap:operation soapAction=""/>
-            <input>
-                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
-                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
-                <soap:body parts="parameters" use="literal"/>
-            </input>
-            <output>
-                <soap:body use="literal"/>
-            </output>
-            <fault name="UnexpectedErrorFault">
-                <soap:fault name="UnexpectedErrorFault" use="literal"/>
-            </fault>
-        </operation>
-        <operation name="getDeleted">
-            <soap:operation soapAction=""/>
-            <input>
-                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
-                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
-                <soap:body parts="parameters" use="literal"/>
-            </input>
-            <output>
-                <soap:body use="literal"/>
-            </output>
-            <fault name="InvalidSObjectFault">
-                <soap:fault name="InvalidSObjectFault" use="literal"/>
-            </fault>
-            <fault name="UnexpectedErrorFault">
-                <soap:fault name="UnexpectedErrorFault" use="literal"/>
-            </fault>
-        </operation>
-        <operation name="getUpdated">
-            <soap:operation soapAction=""/>
-            <input>
-                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
-                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
-                <soap:body parts="parameters" use="literal"/>
-            </input>
-            <output>
-                <soap:body use="literal"/>
-            </output>
-            <fault name="InvalidSObjectFault">
-                <soap:fault name="InvalidSObjectFault" use="literal"/>
-            </fault>
-            <fault name="UnexpectedErrorFault">
-                <soap:fault name="UnexpectedErrorFault" use="literal"/>
-            </fault>
-        </operation>
-        <operation name="query">
-            <soap:operation soapAction=""/>
-            <input>
-                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
-                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
-                <soap:header use="literal" message="tns:Header" part="QueryOptions"/>
-                <soap:header use="literal" message="tns:Header" part="MruHeader"/>
-                <soap:body parts="parameters" use="literal"/>
-            </input>
-            <output>
-                <soap:body use="literal"/>
-            </output>
-            <fault name="InvalidSObjectFault">
-                <soap:fault name="InvalidSObjectFault" use="literal"/>
-            </fault>
-            <fault name="InvalidFieldFault">
-                <soap:fault name="InvalidFieldFault" use="literal"/>
-            </fault>
-            <fault name="MalformedQueryFault">
-                <soap:fault name="MalformedQueryFault" use="literal"/>
-            </fault>
-            <fault name="InvalidIdFault">
-                <soap:fault name="InvalidIdFault" use="literal"/>
-            </fault>
-            <fault name="UnexpectedErrorFault">
-                <soap:fault name="UnexpectedErrorFault" use="literal"/>
-            </fault>
-            <fault name="InvalidQueryLocatorFault">
-                <soap:fault name="InvalidQueryLocatorFault" use="literal"/>
-            </fault>
-        </operation>
-        <operation name="queryAll">
-            <soap:operation soapAction=""/>
-            <input>
-                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
-                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
-                <soap:header use="literal" message="tns:Header" part="QueryOptions"/>
-                <soap:body parts="parameters" use="literal"/>
-            </input>
-            <output>
-                <soap:body use="literal"/>
-            </output>
-            <fault name="InvalidSObjectFault">
-                <soap:fault name="InvalidSObjectFault" use="literal"/>
-            </fault>
-            <fault name="InvalidFieldFault">
-                <soap:fault name="InvalidFieldFault" use="literal"/>
-            </fault>
-            <fault name="MalformedQueryFault">
-                <soap:fault name="MalformedQueryFault" use="literal"/>
-            </fault>
-            <fault name="InvalidIdFault">
-                <soap:fault name="InvalidIdFault" use="literal"/>
-            </fault>
-            <fault name="UnexpectedErrorFault">
-                <soap:fault name="UnexpectedErrorFault" use="literal"/>
-            </fault>
-            <fault name="InvalidQueryLocatorFault">
-                <soap:fault name="InvalidQueryLocatorFault" use="literal"/>
-            </fault>
-        </operation>
-        <operation name="queryMore">
-            <soap:operation soapAction=""/>
-            <input>
-                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
-                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
-                <soap:header use="literal" message="tns:Header" part="QueryOptions"/>
-                <soap:body parts="parameters" use="literal"/>
-            </input>
-            <output>
-                <soap:body use="literal"/>
-            </output>
-            <fault name="InvalidQueryLocatorFault">
-                <soap:fault name="InvalidQueryLocatorFault" use="literal"/>
-            </fault>
-            <fault name="UnexpectedErrorFault">
-                <soap:fault name="UnexpectedErrorFault" use="literal"/>
-            </fault>
-            <fault name="InvalidFieldFault">
-                <soap:fault name="InvalidFieldFault" use="literal"/>
-            </fault>
-        </operation>
-        <operation name="search">
-            <soap:operation soapAction=""/>
-            <input>
-                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
-                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
-                <soap:body parts="parameters" use="literal"/>
-            </input>
-            <output>
-                <soap:body use="literal"/>
-            </output>
-            <fault name="InvalidSObjectFault">
-                <soap:fault name="InvalidSObjectFault" use="literal"/>
-            </fault>
-            <fault name="InvalidFieldFault">
-                <soap:fault name="InvalidFieldFault" use="literal"/>
-            </fault>
-            <fault name="MalformedSearchFault">
-                <soap:fault name="MalformedSearchFault" use="literal"/>
-            </fault>
-            <fault name="UnexpectedErrorFault">
-                <soap:fault name="UnexpectedErrorFault" use="literal"/>
-            </fault>
-        </operation>
-        <operation name="getServerTimestamp">
-            <soap:operation soapAction=""/>
-            <input>
-                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
-                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
-                <soap:body parts="parameters" use="literal"/>
-            </input>
-            <output>
-                <soap:body use="literal"/>
-            </output>
-            <fault name="UnexpectedErrorFault">
-                <soap:fault name="UnexpectedErrorFault" use="literal"/>
-            </fault>
-        </operation>
-        <operation name="setPassword">
-            <soap:operation soapAction=""/>
-            <input>
-                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
-                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
-                <soap:body parts="parameters" use="literal"/>
-            </input>
-            <output>
-                <soap:body use="literal"/>
-            </output>
-            <fault name="InvalidIdFault">
-                <soap:fault name="InvalidIdFault" use="literal"/>
-            </fault>
-            <fault name="InvalidNewPasswordFault">
-                <soap:fault name="InvalidNewPasswordFault" use="literal"/>
-            </fault>
-            <fault name="UnexpectedErrorFault">
-                <soap:fault name="UnexpectedErrorFault" use="literal"/>
-            </fault>
-        </operation>
-        <operation name="resetPassword">
-            <soap:operation soapAction=""/>
-            <input>
-                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
-                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
-                <soap:header use="literal" message="tns:Header" part="EmailHeader"/>
-                <soap:body parts="parameters" use="literal"/>
-            </input>
-            <output>
-                <soap:body use="literal"/>
-            </output>
-            <fault name="InvalidIdFault">
-                <soap:fault name="InvalidIdFault" use="literal"/>
-            </fault>
-            <fault name="UnexpectedErrorFault">
-                <soap:fault name="UnexpectedErrorFault" use="literal"/>
-            </fault>
-        </operation>
-        <operation name="getUserInfo">
-            <soap:operation soapAction=""/>
-            <input>
-                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
-                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
-                <soap:body parts="parameters" use="literal"/>
-            </input>
-            <output>
-                <soap:body use="literal"/>
-            </output>
-            <fault name="UnexpectedErrorFault">
-                <soap:fault name="UnexpectedErrorFault" use="literal"/>
-            </fault>
-        </operation>
-        <operation name="sendEmail">
-            <soap:operation soapAction=""/>
-            <input>
-                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
-                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
-                <soap:body parts="parameters" use="literal"/>
-            </input>
-            <output>
-                <soap:body use="literal"/>
-            </output>
-            <fault name="UnexpectedErrorFault">
-                <soap:fault name="UnexpectedErrorFault" use="literal"/>
-            </fault>
-        </operation>
-
-    </binding>
-
-    <!-- Soap Service Endpoint -->
-    <service name="SforceService">
-        <documentation>Sforce SOAP API</documentation>
-        <port binding="tns:SoapBinding" name="Soap">
-            <soap:address location="https://www.salesforce.com/services/Soap/u/15.0"/>
-        </port>
-    </service>
-</definitions>
-

Added: trunk/connectors/salesforce-api/src/main/resources/partner_v17.wsdl
===================================================================
--- trunk/connectors/salesforce-api/src/main/resources/partner_v17.wsdl	                        (rev 0)
+++ trunk/connectors/salesforce-api/src/main/resources/partner_v17.wsdl	2010-05-13 13:40:34 UTC (rev 2122)
@@ -0,0 +1,2930 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Salesforce.com Partner Web Services API Version 17.0
+Generated on 2010-02-11 17:24:10 +0000.
+
+Copyright 1999-2010 salesforce.com, inc.
+All Rights Reserved
+-->
+<definitions targetNamespace="urn:partner.soap.sforce.com" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:fns="urn:fault.partner.soap.sforce.com" xmlns:tns="urn:partner.soap.sforce.com" xmlns:ens="urn:sobject.partner.soap.sforce.com">
+    <types>
+
+        <schema elementFormDefault="qualified" xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:sobject.partner.soap.sforce.com">
+
+            <import namespace="urn:partner.soap.sforce.com"/>
+
+
+            <!-- Dynamic sObject -->
+            <complexType name="sObject">
+                <sequence>
+                    <element name="type" type="xsd:string"/>
+                    <element name="fieldsToNull" type="xsd:string" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
+                    <element name="Id" type="tns:ID" nillable="true"/>
+                    <any namespace="##targetNamespace" minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
+                </sequence>
+            </complexType>
+
+        </schema>
+
+        <schema elementFormDefault="qualified" xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:partner.soap.sforce.com">
+
+            <import namespace="urn:sobject.partner.soap.sforce.com"/>
+
+            <!-- Our simple ID Type -->
+            <simpleType name="ID">
+                <restriction base="xsd:string">
+                    <length value="18"/>
+                    <pattern value="[a-zA-Z0-9]{18}"/>
+                </restriction>
+            </simpleType>
+
+            <simpleType name="QueryLocator">
+                <restriction base="xsd:string"/>
+            </simpleType>
+
+            <!-- Shared Result Types -->
+            <complexType name="QueryResult">
+                <sequence>
+                    <element name="done" type="xsd:boolean"/>
+                    <element name="queryLocator" type="tns:QueryLocator" nillable="true"/>
+                    <element name="records" type="ens:sObject" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
+                    <element name="size" type="xsd:int"/>
+                </sequence>
+            </complexType>
+
+
+
+            <!-- Search Result -->
+            <complexType name="SearchResult">
+                <sequence>
+                    <element name="searchRecords" minOccurs="0" maxOccurs="unbounded" type="tns:SearchRecord"/>
+                    <element name="sforceReserved" minOccurs="0" maxOccurs="1" type="xsd:string"/>
+                </sequence>
+            </complexType>
+
+            <complexType name="SearchRecord">
+                <sequence>
+                    <element name="record" type="ens:sObject"/>
+                </sequence>
+            </complexType>
+
+            <!-- GetUpdated Result -->
+            <complexType name="GetUpdatedResult">
+                <sequence>
+                    <element name="ids" minOccurs="0" maxOccurs="unbounded" type="tns:ID"/>
+                    <element name="latestDateCovered" type="xsd:dateTime"/>
+                    <element name="sforceReserved" minOccurs="0" maxOccurs="1" type="xsd:string"/>
+                </sequence>
+            </complexType>
+
+            <!-- GetDeleted Result -->
+            <complexType name="GetDeletedResult">
+                <sequence>
+                    <element name="deletedRecords" minOccurs="0" maxOccurs="unbounded" type="tns:DeletedRecord"/>
+                    <element name="earliestDateAvailable" type="xsd:dateTime"/>
+                    <element name="latestDateCovered" type="xsd:dateTime"/>
+                    <element name="sforceReserved" minOccurs="0" maxOccurs="1" type="xsd:string"/>
+                </sequence>
+            </complexType>
+
+            <complexType name="DeletedRecord">
+                <sequence>
+                    <element name="deletedDate" type="xsd:dateTime"/>
+                    <element name="id" type="tns:ID"/>
+                </sequence>
+            </complexType>
+
+
+            <complexType name="GetServerTimestampResult">
+                <sequence>
+                    <element name="timestamp" type="xsd:dateTime"/>
+                </sequence>
+            </complexType>
+
+
+            <!-- InvalidateSessions Result -->
+            <complexType name="InvalidateSessionsResult">
+                <sequence>
+                    <element name="errors" type="tns:Error" minOccurs="0" maxOccurs="unbounded"/>
+                    <element name="success" type="xsd:boolean"/>
+                </sequence>
+            </complexType>
+
+            <complexType name="SetPasswordResult">
+            </complexType>
+
+            <complexType name="ResetPasswordResult">
+                <sequence>
+                    <element name="password" type="xsd:string"/>
+                </sequence>
+            </complexType>
+
+            <complexType name="GetUserInfoResult">
+                <sequence>
+                    <element name="accessibilityMode" type="xsd:boolean"/>
+                    <element name="currencySymbol" type="xsd:string" nillable="true"/>
+                    <element name="orgDefaultCurrencyIsoCode" type="xsd:string" nillable="true"/>
+                    <element name="orgDisallowHtmlAttachments" type="xsd:boolean"/>
+                    <element name="orgHasPersonAccounts" type="xsd:boolean"/>
+                    <element name="organizationId" type="tns:ID"/>
+                    <element name="organizationMultiCurrency" type="xsd:boolean"/>
+                    <element name="organizationName" type="xsd:string"/>
+                    <element name="profileId" type="tns:ID"/>
+                    <element name="roleId" type="tns:ID" nillable="true"/>
+                    <element name="userDefaultCurrencyIsoCode" type="xsd:string" nillable="true"/>
+                    <element name="userEmail" type="xsd:string"/>
+                    <element name="userFullName" type="xsd:string"/>
+                    <element name="userId" type="tns:ID"/>
+                    <element name="userLanguage" type="xsd:string"/>
+                    <element name="userLocale" type="xsd:string"/>
+                    <element name="userName" type="xsd:string"/>
+                    <element name="userTimeZone" type="xsd:string"/>
+                    <element name="userType" type="xsd:string"/>
+                    <element name="userUiSkin" type="xsd:string"/>
+                </sequence>
+            </complexType>
+
+            <complexType name="LoginResult">
+                <sequence>
+                    <element name="metadataServerUrl" type="xsd:string" nillable="true"/>
+                    <element name="passwordExpired" type="xsd:boolean"/>
+                    <element name="sandbox" type="xsd:boolean"/>
+                    <element name="serverUrl" type="xsd:string" nillable="true"/>
+                    <element name="sessionId" type="xsd:string" nillable="true"/>
+
+                    <element name="userId" type="tns:ID" nillable="true"/>
+                    <element name="userInfo" type="tns:GetUserInfoResult" minOccurs="0"/>
+                </sequence>
+            </complexType>
+
+            <simpleType name="StatusCode">
+                <restriction base="xsd:string">
+                    <enumeration value="ALREADY_IN_PROCESS"/>
+                    <enumeration value="ASSIGNEE_TYPE_REQUIRED"/>
+                    <enumeration value="BAD_CUSTOM_ENTITY_PARENT_DOMAIN"/>
+                    <enumeration value="BCC_NOT_ALLOWED_IF_BCC_COMPLIANCE_ENABLED"/>
+                    <enumeration value="CANNOT_CASCADE_PRODUCT_ACTIVE"/>
+                    <enumeration value="CANNOT_CHANGE_FIELD_TYPE_OF_APEX_REFERENCED_FIELD"/>
+                    <enumeration value="CANNOT_CREATE_ANOTHER_MANAGED_PACKAGE"/>
+                    <enumeration value="CANNOT_DEACTIVATE_DIVISION"/>
+                    <enumeration value="CANNOT_DELETE_LAST_DATED_CONVERSION_RATE"/>
+                    <enumeration value="CANNOT_DELETE_MANAGED_OBJECT"/>
+                    <enumeration value="CANNOT_DISABLE_LAST_ADMIN"/>
+                    <enumeration value="CANNOT_ENABLE_IP_RESTRICT_REQUESTS"/>
+                    <enumeration value="CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY"/>
+                    <enumeration value="CANNOT_MODIFY_MANAGED_OBJECT"/>
+                    <enumeration value="CANNOT_RENAME_APEX_REFERENCED_FIELD"/>
+                    <enumeration value="CANNOT_RENAME_APEX_REFERENCED_OBJECT"/>
+                    <enumeration value="CANNOT_REPARENT_RECORD"/>
+                    <enumeration value="CANNOT_UPDATE_CONVERTED_LEAD"/>
+                    <enumeration value="CANT_DISABLE_CORP_CURRENCY"/>
+                    <enumeration value="CANT_UNSET_CORP_CURRENCY"/>
+                    <enumeration value="CHILD_SHARE_FAILS_PARENT"/>
+                    <enumeration value="CIRCULAR_DEPENDENCY"/>
+                    <enumeration value="COMMUNITY_NOT_ACCESSIBLE"/>
+                    <enumeration value="CUSTOM_CLOB_FIELD_LIMIT_EXCEEDED"/>
+                    <enumeration value="CUSTOM_ENTITY_OR_FIELD_LIMIT"/>
+                    <enumeration value="CUSTOM_FIELD_INDEX_LIMIT_EXCEEDED"/>
+                    <enumeration value="CUSTOM_INDEX_EXISTS"/>
+                    <enumeration value="CUSTOM_LINK_LIMIT_EXCEEDED"/>
+                    <enumeration value="CUSTOM_TAB_LIMIT_EXCEEDED"/>
+                    <enumeration value="DELETE_FAILED"/>
+                    <enumeration value="DELETE_REQUIRED_ON_CASCADE"/>
+                    <enumeration value="DEPENDENCY_EXISTS"/>
+                    <enumeration value="DUPLICATE_CASE_SOLUTION"/>
+                    <enumeration value="DUPLICATE_COMM_NICKNAME"/>
+                    <enumeration value="DUPLICATE_CUSTOM_ENTITY_DEFINITION"/>
+                    <enumeration value="DUPLICATE_CUSTOM_TAB_MOTIF"/>
+                    <enumeration value="DUPLICATE_DEVELOPER_NAME"/>
+                    <enumeration value="DUPLICATE_EXTERNAL_ID"/>
+                    <enumeration value="DUPLICATE_MASTER_LABEL"/>
+                    <enumeration value="DUPLICATE_SENDER_DISPLAY_NAME"/>
+                    <enumeration value="DUPLICATE_USERNAME"/>
+                    <enumeration value="DUPLICATE_VALUE"/>
+                    <enumeration value="EMAIL_NOT_PROCESSED_DUE_TO_PRIOR_ERROR"/>
+                    <enumeration value="EMPTY_SCONTROL_FILE_NAME"/>
+                    <enumeration value="ENTITY_FAILED_IFLASTMODIFIED_ON_UPDATE"/>
+                    <enumeration value="ENTITY_IS_ARCHIVED"/>
+                    <enumeration value="ENTITY_IS_DELETED"/>
+                    <enumeration value="ENTITY_IS_LOCKED"/>
+                    <enumeration value="ERROR_IN_MAILER"/>
+                    <enumeration value="FAILED_ACTIVATION"/>
+                    <enumeration value="FIELD_CUSTOM_VALIDATION_EXCEPTION"/>
+                    <enumeration value="FIELD_INTEGRITY_EXCEPTION"/>
+                    <enumeration value="FILTERED_LOOKUP_LIMIT_EXCEEDED"/>
+                    <enumeration value="HTML_FILE_UPLOAD_NOT_ALLOWED"/>
+                    <enumeration value="IMAGE_TOO_LARGE"/>
+                    <enumeration value="INACTIVE_OWNER_OR_USER"/>
+                    <enumeration value="INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY"/>
+                    <enumeration value="INSUFFICIENT_ACCESS_OR_READONLY"/>
+                    <enumeration value="INVALID_ACCESS_LEVEL"/>
+                    <enumeration value="INVALID_ARGUMENT_TYPE"/>
+                    <enumeration value="INVALID_ASSIGNEE_TYPE"/>
+                    <enumeration value="INVALID_ASSIGNMENT_RULE"/>
+                    <enumeration value="INVALID_BATCH_OPERATION"/>
+                    <enumeration value="INVALID_CONTENT_TYPE"/>
+                    <enumeration value="INVALID_CREDIT_CARD_INFO"/>
+                    <enumeration value="INVALID_CROSS_REFERENCE_KEY"/>
+                    <enumeration value="INVALID_CROSS_REFERENCE_TYPE_FOR_FIELD"/>
+                    <enumeration value="INVALID_CURRENCY_CONV_RATE"/>
+                    <enumeration value="INVALID_CURRENCY_CORP_RATE"/>
+                    <enumeration value="INVALID_CURRENCY_ISO"/>
+                    <enumeration value="INVALID_EMAIL_ADDRESS"/>
+                    <enumeration value="INVALID_EMPTY_KEY_OWNER"/>
+                    <enumeration value="INVALID_FIELD"/>
+                    <enumeration value="INVALID_FIELD_FOR_INSERT_UPDATE"/>
+                    <enumeration value="INVALID_FIELD_WHEN_USING_TEMPLATE"/>
+                    <enumeration value="INVALID_FILTER_ACTION"/>
+                    <enumeration value="INVALID_GOOGLE_DOCS_URL"/>
+                    <enumeration value="INVALID_ID_FIELD"/>
+                    <enumeration value="INVALID_INET_ADDRESS"/>
+                    <enumeration value="INVALID_LINEITEM_CLONE_STATE"/>
+                    <enumeration value="INVALID_MASTER_OR_TRANSLATED_SOLUTION"/>
+                    <enumeration value="INVALID_MESSAGE_ID_REFERENCE"/>
+                    <enumeration value="INVALID_OPERATION"/>
+                    <enumeration value="INVALID_OPERATOR"/>
+                    <enumeration value="INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST"/>
+                    <enumeration value="INVALID_PARTNER_NETWORK_STATUS"/>
+                    <enumeration value="INVALID_PERSON_ACCOUNT_OPERATION"/>
+                    <enumeration value="INVALID_SAVE_AS_ACTIVITY_FLAG"/>
+                    <enumeration value="INVALID_SESSION_ID"/>
+                    <enumeration value="INVALID_SETUP_OWNER"/>
+                    <enumeration value="INVALID_STATUS"/>
+                    <enumeration value="INVALID_TYPE"/>
+                    <enumeration value="INVALID_TYPE_FOR_OPERATION"/>
+                    <enumeration value="INVALID_TYPE_ON_FIELD_IN_RECORD"/>
+                    <enumeration value="IP_RANGE_LIMIT_EXCEEDED"/>
+                    <enumeration value="LICENSE_LIMIT_EXCEEDED"/>
+                    <enumeration value="LIGHT_PORTAL_USER_EXCEPTION"/>
+                    <enumeration value="LIMIT_EXCEEDED"/>
+                    <enumeration value="MALFORMED_ID"/>
+                    <enumeration value="MANAGER_NOT_DEFINED"/>
+                    <enumeration value="MASSMAIL_RETRY_LIMIT_EXCEEDED"/>
+                    <enumeration value="MASS_MAIL_LIMIT_EXCEEDED"/>
+                    <enumeration value="MAXIMUM_CCEMAILS_EXCEEDED"/>
+                    <enumeration value="MAXIMUM_DASHBOARD_COMPONENTS_EXCEEDED"/>
+                    <enumeration value="MAXIMUM_HIERARCHY_LEVELS_REACHED"/>
+                    <enumeration value="MAXIMUM_SIZE_OF_ATTACHMENT"/>
+                    <enumeration value="MAXIMUM_SIZE_OF_DOCUMENT"/>
+                    <enumeration value="MAX_ACTIONS_PER_RULE_EXCEEDED"/>
+                    <enumeration value="MAX_ACTIVE_RULES_EXCEEDED"/>
+                    <enumeration value="MAX_APPROVAL_STEPS_EXCEEDED"/>
+                    <enumeration value="MAX_FORMULAS_PER_RULE_EXCEEDED"/>
+                    <enumeration value="MAX_RULES_EXCEEDED"/>
+                    <enumeration value="MAX_RULE_ENTRIES_EXCEEDED"/>
+                    <enumeration value="MAX_TASK_DESCRIPTION_EXCEEEDED"/>
+                    <enumeration value="MAX_TM_RULES_EXCEEDED"/>
+                    <enumeration value="MAX_TM_RULE_ITEMS_EXCEEDED"/>
+                    <enumeration value="MERGE_FAILED"/>
+                    <enumeration value="MISSING_ARGUMENT"/>
+                    <enumeration value="MIXED_DML_OPERATION"/>
+                    <enumeration value="NONUNIQUE_SHIPPING_ADDRESS"/>
+                    <enumeration value="NO_APPLICABLE_PROCESS"/>
+                    <enumeration value="NO_ATTACHMENT_PERMISSION"/>
+                    <enumeration value="NO_INACTIVE_DIVISION_MEMBERS"/>
+                    <enumeration value="NO_MASS_MAIL_PERMISSION"/>
+                    <enumeration value="NUMBER_OUTSIDE_VALID_RANGE"/>
+                    <enumeration value="NUM_HISTORY_FIELDS_BY_SOBJECT_EXCEEDED"/>
+                    <enumeration value="OPTED_OUT_OF_MASS_MAIL"/>
+                    <enumeration value="PACKAGE_LICENSE_REQUIRED"/>
+                    <enumeration value="PORTAL_USER_ALREADY_EXISTS_FOR_CONTACT"/>
+                    <enumeration value="PRIVATE_CONTACT_ON_ASSET"/>
+                    <enumeration value="RECORD_IN_USE_BY_WORKFLOW"/>
+                    <enumeration value="REQUEST_RUNNING_TOO_LONG"/>
+                    <enumeration value="REQUIRED_FIELD_MISSING"/>
+                    <enumeration value="SELF_REFERENCE_FROM_TRIGGER"/>
+                    <enumeration value="SHARE_NEEDED_FOR_CHILD_OWNER"/>
+                    <enumeration value="STANDARD_PRICE_NOT_DEFINED"/>
+                    <enumeration value="STORAGE_LIMIT_EXCEEDED"/>
+                    <enumeration value="STRING_TOO_LONG"/>
+                    <enumeration value="TABSET_LIMIT_EXCEEDED"/>
+                    <enumeration value="TEMPLATE_NOT_ACTIVE"/>
+                    <enumeration value="TERRITORY_REALIGN_IN_PROGRESS"/>
+                    <enumeration value="TEXT_DATA_OUTSIDE_SUPPORTED_CHARSET"/>
+                    <enumeration value="TOO_MANY_APEX_REQUESTS"/>
+                    <enumeration value="TOO_MANY_ENUM_VALUE"/>
+                    <enumeration value="TRANSFER_REQUIRES_READ"/>
+                    <enumeration value="UNABLE_TO_LOCK_ROW"/>
+                    <enumeration value="UNAVAILABLE_RECORDTYPE_EXCEPTION"/>
+                    <enumeration value="UNDELETE_FAILED"/>
+                    <enumeration value="UNKNOWN_EXCEPTION"/>
+                    <enumeration value="UNSPECIFIED_EMAIL_ADDRESS"/>
+                    <enumeration value="UNSUPPORTED_APEX_TRIGGER_OPERATON"/>
+                    <enumeration value="UNVERIFIED_SENDER_ADDRESS"/>
+                    <enumeration value="WEBLINK_SIZE_LIMIT_EXCEEDED"/>
+                    <enumeration value="WRONG_CONTROLLER_TYPE"/>
+                </restriction>
+            </simpleType>
+
+
+            <complexType name="Error">
+                <sequence>
+                    <element name="fields" type="xsd:string" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
+                    <element name="message" type="xsd:string"/>
+                    <element name="statusCode" type="tns:StatusCode"/>
+                </sequence>
+            </complexType>
+
+            <complexType name="SendEmailError">
+                <sequence>
+                    <element name="fields" type="xsd:string" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
+                    <element name="message" type="xsd:string"/>
+                    <element name="statusCode" type="tns:StatusCode"/>
+                    <element name="targetObjectId" type="tns:ID" nillable="true"/>
+                </sequence>
+            </complexType>
+
+            <complexType name="SaveResult">
+                <sequence>
+                    <element name="errors" type="tns:Error" minOccurs="0" maxOccurs="unbounded"/>
+                    <element name="id" type="tns:ID" nillable="true"/>
+                    <element name="success" type="xsd:boolean"/>
+                </sequence>
+            </complexType>
+
+            <complexType name="UpsertResult">
+                <sequence>
+                    <element name="created" type="xsd:boolean"/>
+                    <element name="errors" type="tns:Error" minOccurs="0" maxOccurs="unbounded"/>
+                    <element name="id" type="tns:ID" nillable="true"/>
+                    <element name="success" type="xsd:boolean"/>
+                </sequence>
+            </complexType>
+
+            <complexType name="MergeRequest">
+                <sequence>
+                    <element name="masterRecord" type="ens:sObject"/>
+                    <element name="recordToMergeIds" type="tns:ID" minOccurs="1" maxOccurs="unbounded"/>
+                </sequence>
+            </complexType>
+
+            <complexType name="MergeResult">
+                <sequence>
+                    <element name="errors" type="tns:Error" minOccurs="0" maxOccurs="unbounded"/>
+                    <element name="id" type="tns:ID" nillable="true"/>
+                    <element name="mergedRecordIds" type="tns:ID" minOccurs="0" maxOccurs="unbounded"/>
+                    <element name="success" type="xsd:boolean"/>
+                    <element name="updatedRelatedIds" type="tns:ID" minOccurs="0" maxOccurs="unbounded"/>
+                </sequence>
+            </complexType>
+
+            <complexType name="ProcessRequest">
+                <sequence>
+                    <element name="comments" type="xsd:string" nillable="true"/>
+                    <element name="nextApproverIds" type="tns:ID" minOccurs="0" maxOccurs="unbounded" nillable="true"/>
+                </sequence>
+            </complexType>
+
+            <complexType name="ProcessSubmitRequest">
+                <complexContent>
+                    <extension base="tns:ProcessRequest">
+                        <sequence>
+                            <element name="objectId" type="tns:ID"/>
+                        </sequence>
+                    </extension>
+                </complexContent>
+            </complexType>
+
+            <complexType name="ProcessWorkitemRequest">
+                <complexContent>
+                    <extension base="tns:ProcessRequest">
+                        <sequence>
+                            <element name="action" type="xsd:string"/>
+                            <element name="workitemId" type="tns:ID"/>
+                        </sequence>
+                    </extension>
+                </complexContent>
+            </complexType>
+
+
+
+            <complexType name="ProcessResult">
+                <sequence>
+                    <element name="actorIds" type="tns:ID" nillable="false" minOccurs="0" maxOccurs="unbounded"/>
+                    <element name="entityId" type="tns:ID" nillable="true"/>
+                    <element name="errors" type="tns:Error" minOccurs="0" maxOccurs="unbounded"/>
+                    <element name="instanceId" type="tns:ID" nillable="true"/>
+                    <element name="instanceStatus" type="xsd:string" nillable="true"/>
+                    <element name="newWorkitemIds" type="tns:ID" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
+                    <element name="success" type="xsd:boolean"/>
+                </sequence>
+            </complexType>
+
+
+
+
+
+            <complexType name="DeleteResult">
+                <sequence>
+                    <element name="errors" type="tns:Error" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
+                    <element name="id" type="tns:ID" nillable="true"/>
+                    <element name="success" type="xsd:boolean"/>
+                </sequence>
+            </complexType>
+
+            <complexType name="UndeleteResult">
+                <sequence>
+                    <element name="errors" type="tns:Error" minOccurs="0" maxOccurs="unbounded"/>
+                    <element name="id" type="tns:ID" nillable="true"/>
+                    <element name="success" type="xsd:boolean"/>
+                </sequence>
+            </complexType>
+
+            <complexType name="EmptyRecycleBinResult">
+                <sequence>
+                    <element name="errors" type="tns:Error" minOccurs="0" maxOccurs="unbounded"/>
+                    <element name="id" type="tns:ID" nillable="true"/>
+                    <element name="success" type="xsd:boolean"/>
+                </sequence>
+            </complexType>
+
+            <complexType name="LeadConvert">
+                <sequence>
+                    <element name="accountId" type="tns:ID" nillable="true"/>
+                    <element name="contactId" type="tns:ID" nillable="true"/>
+                    <element name="convertedStatus" type="xsd:string"/>
+                    <element name="doNotCreateOpportunity" type="xsd:boolean"/>
+                    <element name="leadId" type="tns:ID"/>
+                    <element name="opportunityName" type="xsd:string" nillable="true"/>
+                    <element name="overwriteLeadSource" type="xsd:boolean"/>
+                    <element name="ownerId" type="tns:ID" nillable="true"/>
+                    <element name="sendNotificationEmail" type="xsd:boolean"/>
+                </sequence>
+            </complexType>
+
+            <complexType name="LeadConvertResult">
+                <sequence>
+                    <element name="accountId" type="tns:ID" nillable="true"/>
+                    <element name="contactId" type="tns:ID" nillable="true"/>
+                    <element name="errors" type="tns:Error" minOccurs="0" maxOccurs="unbounded"/>
+                    <element name="leadId" type="tns:ID" nillable="true"/>
+                    <element name="opportunityId" type="tns:ID" nillable="true"/>
+                    <element name="success" type="xsd:boolean"/>
+                </sequence>
+            </complexType>
+
+            <complexType name="DescribeSObjectResult">
+                <sequence>
+                    <element name="activateable" type="xsd:boolean"/>
+                    <element name="childRelationships" type="tns:ChildRelationship" minOccurs="0" maxOccurs="unbounded"/>
+                    <element name="createable" type="xsd:boolean"/>
+                    <element name="custom" type="xsd:boolean"/>
+                    <element name="customSetting" type="xsd:boolean"/>
+                    <element name="deletable" type="xsd:boolean"/>
+                    <element name="deprecatedAndHidden" type="xsd:boolean"/>
+                    <element name="fields" type="tns:Field" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
+                    <element name="keyPrefix" type="xsd:string" nillable="true"/>
+                    <element name="label" type="xsd:string"/>
+                    <element name="labelPlural" type="xsd:string"/>
+                    <element name="layoutable" type="xsd:boolean"/>
+                    <element name="mergeable" type="xsd:boolean"/>
+                    <element name="name" type="xsd:string"/>
+                    <element name="queryable" type="xsd:boolean"/>
+                    <element name="recordTypeInfos" type="tns:RecordTypeInfo" minOccurs="0" maxOccurs="unbounded"/>
+                    <element name="replicateable" type="xsd:boolean"/>
+                    <element name="retrieveable" type="xsd:boolean"/>
+                    <element name="searchable" type="xsd:boolean"/>
+                    <element name="triggerable" type="xsd:boolean" minOccurs="0"/>
+                    <element name="undeletable" type="xsd:boolean"/>
+                    <element name="updateable" type="xsd:boolean"/>
+                    <element name="urlDetail" type="xsd:string" nillable="true"/>
+                    <element name="urlEdit" type="xsd:string" nillable="true"/>
+                    <element name="urlNew" type="xsd:string" nillable="true"/>
+                </sequence>
+            </complexType>
+
+			<!-- this is a subset of properties for each SObject that is returned by the describeGlobal call -->
+            <complexType name="DescribeGlobalSObjectResult">
+                <sequence>
+                    <element name="activateable" type="xsd:boolean"/>
+                    <element name="createable" type="xsd:boolean"/>
+                    <element name="custom" type="xsd:boolean"/>
+                    <element name="customSetting" type="xsd:boolean"/>
+                    <element name="deletable" type="xsd:boolean"/>
+                    <element name="deprecatedAndHidden" type="xsd:boolean"/>
+                    <element name="keyPrefix" type="xsd:string" nillable="true"/>
+                    <element name="label" type="xsd:string"/>
+                    <element name="labelPlural" type="xsd:string"/>
+                    <element name="layoutable" type="xsd:boolean"/>
+					<element name="mergeable" type="xsd:boolean"/>
+                    <element name="name" type="xsd:string"/>
+                    <element name="queryable" type="xsd:boolean"/>
+                    <element name="replicateable" type="xsd:boolean"/>
+                    <element name="retrieveable" type="xsd:boolean"/>
+					<element name="searchable" type="xsd:boolean"/>
+                    <element name="triggerable" type="xsd:boolean"/>
+                    <element name="undeletable" type="xsd:boolean"/>
+                    <element name="updateable" type="xsd:boolean"/>
+                </sequence>
+            </complexType>
+
+            <complexType name="ChildRelationship">
+                <sequence>
+                    <element name="cascadeDelete" type="xsd:boolean"/>
+                    <element name="childSObject" type="xsd:string"/>
+                    <element name="deprecatedAndHidden" type="xsd:boolean"/>
+                    <element name="field" type="xsd:string"/>
+                    <element name="relationshipName" type="xsd:string" minOccurs="0"/>
+                </sequence>
+            </complexType>
+
+            <complexType name="DescribeGlobalResult">
+                <sequence>
+                    <element name="encoding" type="xsd:string" nillable="true"/>
+                    <element name="maxBatchSize" type="xsd:int"/>
+                    <element name="sobjects" type="tns:DescribeGlobalSObjectResult" minOccurs="0" maxOccurs="unbounded"/>
+                </sequence>
+            </complexType>
+
+            <simpleType name="fieldType">
+                <restriction base="xsd:string">
+                    <enumeration value="string"/>
+                    <enumeration value="picklist"/>
+                    <enumeration value="multipicklist"/>
+                    <enumeration value="combobox"/>
+                    <enumeration value="reference"/>
+                    <enumeration value="base64"/>
+                    <enumeration value="boolean"/>
+                    <enumeration value="currency"/>
+                    <enumeration value="textarea"/>
+                    <enumeration value="int"/>
+                    <enumeration value="double"/>
+                    <enumeration value="percent"/>
+                    <enumeration value="phone"/>
+                    <enumeration value="id"/>
+                    <enumeration value="date"/>
+                    <enumeration value="datetime"/>
+                    <enumeration value="time"/>
+                    <enumeration value="url"/>
+                    <enumeration value="email"/>
+                    <enumeration value="encryptedstring"/>
+                    <enumeration value="anyType"/> <!-- can be string, picklist, reference, boolean, currency, int, double, percent, id, date, datetime, url, email -->
+                </restriction>
+            </simpleType>
+
+            <simpleType name="soapType">
+                <restriction base="xsd:string">
+                    <enumeration value="tns:ID"/>
+                    <enumeration value="xsd:base64Binary"/>
+                    <enumeration value="xsd:boolean"/>
+                    <enumeration value="xsd:double"/>
+                    <enumeration value="xsd:int"/>
+                    <enumeration value="xsd:string"/>
+                    <enumeration value="xsd:date"/>
+                    <enumeration value="xsd:dateTime"/>
+                    <enumeration value="xsd:time"/>
+                    <enumeration value="xsd:anyType"/> <!-- can be id, booolean, double, int, string, date, dateTime -->
+                </restriction>
+            </simpleType>
+
+            <complexType name="Field">
+                <sequence>
+                    <element name="autoNumber" type="xsd:boolean"/>
+                    <element name="byteLength" type="xsd:int"/>
+                    <element name="calculated" type="xsd:boolean"/>
+                    <element name="calculatedFormula" type="xsd:string" minOccurs="0"/>
+                    <element name="caseSensitive" type="xsd:boolean"/>
+                    <element name="controllerName" type="xsd:string" minOccurs="0"/>
+                    <element name="createable" type="xsd:boolean"/>
+                    <element name="custom" type="xsd:boolean"/>
+                    <element name="defaultValueFormula" type="xsd:string" minOccurs="0"/>
+                    <element name="defaultedOnCreate" type="xsd:boolean"/>
+                    <element name="dependentPicklist" type="xsd:boolean" minOccurs="0"/>
+                    <element name="deprecatedAndHidden" type="xsd:boolean"/>
+                    <element name="digits" type="xsd:int"/>
+                    <element name="externalId" type="xsd:boolean" minOccurs="0"/>
+                    <element name="filterable" type="xsd:boolean"/>
+                    <element name="htmlFormatted" type="xsd:boolean" minOccurs="0"/>
+                    <element name="idLookup" type="xsd:boolean"/>
+                    <element name="inlineHelpText" type="xsd:string" minOccurs="0"/>
+                    <element name="label" type="xsd:string"/>
+                    <element name="length" type="xsd:int"/>
+                    <element name="name" type="xsd:string"/>
+                    <element name="nameField" type="xsd:boolean"/>
+                    <element name="namePointing" type="xsd:boolean" minOccurs="0"/>
+                    <element name="nillable" type="xsd:boolean"/>
+                    <element name="picklistValues" type="tns:PicklistEntry" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
+                    <element name="precision" type="xsd:int"/>
+                    <element name="referenceTo" type="xsd:string" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
+                    <element name="relationshipName" type="xsd:string" minOccurs="0"/>
+                    <element name="relationshipOrder" type="xsd:int" minOccurs="0"/>
+                    <element name="restrictedPicklist" type="xsd:boolean"/>
+                    <element name="scale" type="xsd:int"/>
+                    <element name="soapType" type="tns:soapType"/>
+                    <element name="sortable" type="xsd:boolean" minOccurs="0"/>
+                    <element name="type" type="tns:fieldType"/>
+                    <element name="unique" type="xsd:boolean"/>
+                    <element name="updateable" type="xsd:boolean"/>
+                    <element name="writeRequiresMasterRead" type="xsd:boolean" minOccurs="0"/>
+                </sequence>
+            </complexType>
+
+            <complexType name="PicklistEntry">
+                <sequence>
+                    <element name="active" type="xsd:boolean"/>
+                    <element name="defaultValue" type="xsd:boolean"/>
+                    <element name="label" type="xsd:string" nillable="true"/>
+                    <element name="validFor" type="xsd:base64Binary" minOccurs="0"/>
+                    <element name="value" type="xsd:string"/>
+                </sequence>
+            </complexType>
+
+            <complexType name="DescribeSoftphoneLayoutResult">
+                <sequence>
+                    <element name="callTypes" type="tns:DescribeSoftphoneLayoutCallType" maxOccurs="unbounded"/>
+                    <element name="id" type="tns:ID"/>
+                    <element name="name" type="xsd:string"/>
+                </sequence>
+            </complexType>
+
+            <complexType name="DescribeSoftphoneLayoutCallType">
+                <sequence>
+                    <element name="infoFields" type="tns:DescribeSoftphoneLayoutInfoField" maxOccurs="unbounded"/>
+                    <element name="name" type="xsd:string"/>
+                    <element name="sections" type="tns:DescribeSoftphoneLayoutSection" minOccurs="0" maxOccurs="unbounded"/>
+                </sequence>
+            </complexType>
+
+            <complexType name="DescribeSoftphoneLayoutInfoField">
+                <sequence>
+                    <element name="name" type="xsd:string"/>
+                </sequence>
+            </complexType>
+
+            <complexType name="DescribeSoftphoneLayoutSection">
+                <sequence>
+                    <element name="entityApiName" type="xsd:string"/>
+                    <element name="items" type="tns:DescribeSoftphoneLayoutItem" maxOccurs="unbounded"/>
+                </sequence>
+            </complexType>
+
+            <complexType name="DescribeSoftphoneLayoutItem">
+                <sequence>
+                    <element name="itemApiName" type="xsd:string"/>
+                </sequence>
+            </complexType>
+
+            <complexType name="DescribeLayoutResult">
+                <sequence>
+                    <element name="layouts" type="tns:DescribeLayout" maxOccurs="unbounded"/>
+                    <element name="recordTypeMappings" type="tns:RecordTypeMapping" minOccurs="0" maxOccurs="unbounded"/>
+                    <element name="recordTypeSelectorRequired" type="xsd:boolean"/>
+                </sequence>
+            </complexType>
+
+            <complexType name="DescribeLayout">
+                <sequence>
+                    <element name="buttonLayoutSection" type="tns:DescribeLayoutButtonSection" minOccurs="0"/>
+                    <element name="detailLayoutSections" type="tns:DescribeLayoutSection" minOccurs="0" maxOccurs="unbounded"/>
+                    <element name="editLayoutSections" type="tns:DescribeLayoutSection" minOccurs="0" maxOccurs="unbounded"/>
+                    <element name="id" type="tns:ID"/>
+
+
+                    <element name="relatedLists" type="tns:RelatedList" minOccurs="0" maxOccurs="unbounded"/>
+                </sequence>
+            </complexType>
+
+            <complexType name="DescribeLayoutSection">
+                <sequence>
+                    <element name="columns" type="xsd:int"/>
+                    <element name="heading" type="xsd:string"/>
+                    <element name="layoutRows" type="tns:DescribeLayoutRow" maxOccurs="unbounded"/>
+                    <element name="rows" type="xsd:int"/>
+                    <element name="useCollapsibleSection" type="xsd:boolean"/>
+                    <element name="useHeading" type="xsd:boolean"/>
+                </sequence>
+            </complexType>
+
+            <complexType name="DescribeLayoutButtonSection">
+                <sequence>
+                    <element name="detailButtons" type="tns:DescribeLayoutButton" maxOccurs="unbounded"/>
+                </sequence>
+            </complexType>
+
+            <complexType name="DescribeLayoutRow">
+                <sequence>
+                    <element name="layoutItems" type="tns:DescribeLayoutItem" maxOccurs="unbounded"/>
+                    <element name="numItems" type="xsd:int"/>
+                </sequence>
+            </complexType>
+
+            <complexType name="DescribeLayoutItem">
+                <sequence>
+                    <element name="editable" type="xsd:boolean"/>
+                    <element name="label" type="xsd:string" nillable="true"/>
+                    <element name="layoutComponents" type="tns:DescribeLayoutComponent" minOccurs="0" maxOccurs="unbounded"/>
+                    <element name="placeholder" type="xsd:boolean"/>
+                    <element name="required" type="xsd:boolean"/>
+                </sequence>
+            </complexType>
+
+            <complexType name="DescribeLayoutButton">
+                <sequence>
+                    <element name="custom" type="xsd:boolean"/>
+                    <element name="label" type="xsd:string" nillable="true"/>
+                    <element name="name" type="xsd:string" nillable="true"/>
+                </sequence>
+            </complexType>
+
+            <complexType name="DescribeLayoutComponent">
+                <sequence>
+                    <element name="displayLines" type="xsd:int"/>
+                    <element name="tabOrder" type="xsd:int"/>
+                    <element name="type" type="tns:layoutComponentType"/>
+                    <element name="value" type="xsd:string"/>
+                </sequence>
+            </complexType>
+
+            <simpleType name="layoutComponentType">
+                <restriction base="xsd:string">
+                    <enumeration value="Field"/>
+                    <enumeration value="Separator"/>
+                    <enumeration value="SControl"/>
+                    <enumeration value="EmptySpace"/>
+                </restriction>
+            </simpleType>
+
+            <complexType name="RecordTypeInfo">
+                <sequence>
+                    <element name="available" type="xsd:boolean"/>
+                    <element name="defaultRecordTypeMapping" type="xsd:boolean"/>
+                    <element name="name" type="xsd:string"/>
+                    <element name="recordTypeId" type="tns:ID" nillable="true"/>
+                </sequence>
+            </complexType>
+
+            <complexType name="RecordTypeMapping">
+                <sequence>
+                    <element name="available" type="xsd:boolean"/>
+                    <element name="defaultRecordTypeMapping" type="xsd:boolean"/>
+                    <element name="layoutId" type="tns:ID"/>
+                    <element name="name" type="xsd:string"/>
+                    <element name="picklistsForRecordType" type="tns:PicklistForRecordType" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
+                    <element name="recordTypeId" type="tns:ID" nillable="true"/>
+                </sequence>
+            </complexType>
+
+            <complexType name="PicklistForRecordType">
+                <sequence>
+                    <element name="picklistName" type="xsd:string"/>
+                    <element name="picklistValues" type="tns:PicklistEntry" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
+                </sequence>
+            </complexType>
+
+            <complexType name="RelatedList">
+                <sequence>
+                    <element name="columns" type="tns:RelatedListColumn" maxOccurs="unbounded"/>
+                    <element name="custom" type="xsd:boolean"/>
+                    <element name="field" type="xsd:string" nillable="true"/>
+                    <element name="label" type="xsd:string"/>
+                    <element name="limitRows" type="xsd:int"/>
+                    <element name="name" type="xsd:string"/>
+                    <element name="sobject" type="xsd:string" nillable="true"/>
+                    <element name="sort" type="tns:RelatedListSort" minOccurs="0" maxOccurs="unbounded"/>
+                </sequence>
+            </complexType>
+
+            <complexType name="RelatedListColumn">
+                <sequence>
+                    <element name="field" type="xsd:string" nillable="true"/>
+                    <element name="format" type="xsd:string" nillable="true"/>
+                    <element name="label" type="xsd:string"/>
+                    <element name="name" type="xsd:string"/>
+                </sequence>
+            </complexType>
+
+            <complexType name="RelatedListSort">
+                <sequence>
+                    <element name="ascending" type="xsd:boolean"/>
+                    <element name="column" type="xsd:string"/>
+                </sequence>
+            </complexType>
+
+
+
+            <complexType name="EmailFileAttachment">
+                <sequence>
+                    <element name="body" nillable="true" minOccurs="0" type="xsd:base64Binary"/>
+                    <element name="contentType" nillable="true" minOccurs="0" type="xsd:string"/>
+                    <element name="fileName" type="xsd:string"/>
+                    <element name="inline" type="xsd:boolean" minOccurs="0"/>
+                </sequence>
+            </complexType>
+            <simpleType name="EmailPriority">
+                <restriction base="xsd:string">
+                    <enumeration value="Highest"/>
+                    <enumeration value="High"/>
+                    <enumeration value="Normal"/>
+                    <enumeration value="Low"/>
+                    <enumeration value="Lowest"/>
+                </restriction>
+            </simpleType>
+
+            <complexType name="Email">
+                <sequence>
+                    <element name="bccSender" type="xsd:boolean" nillable="true"/>
+                    <element name="emailPriority" type="tns:EmailPriority" nillable="true"/>
+                    <element name="replyTo" type="xsd:string" nillable="true"/>
+                    <element name="saveAsActivity" type="xsd:boolean" nillable="true"/>
+                    <element name="senderDisplayName" type="xsd:string" nillable="true"/>
+                    <element name="subject" type="xsd:string" nillable="true"/>
+                    <element name="useSignature" type="xsd:boolean" nillable="true"/>
+                </sequence>
+            </complexType>
+
+            <complexType name="MassEmailMessage">
+                <complexContent>
+                    <extension base="tns:Email">
+                        <sequence>
+                            <element name="description" type="xsd:string" nillable="true"/>
+                            <element name="targetObjectIds" minOccurs="0" maxOccurs="250" type="tns:ID"/>
+                            <element name="templateId" type="tns:ID"/>
+                            <element name="whatIds" minOccurs="0" maxOccurs="250" type="tns:ID"/>
+                        </sequence>
+                    </extension>
+                </complexContent>
+            </complexType>
+
+            <complexType name="SingleEmailMessage">
+                <complexContent>
+                    <extension base="tns:Email">
+                        <sequence>
+                            <element name="bccAddresses" minOccurs="0" maxOccurs="25" type="xsd:string" nillable="true"/>
+                            <element name="ccAddresses" minOccurs="0" maxOccurs="25" type="xsd:string" nillable="true"/>
+                            <element name="charset" type="xsd:string" nillable="true"/>
+                            <element name="documentAttachments" minOccurs="0" maxOccurs="unbounded" type="tns:ID"/>
+                            <element name="htmlBody" type="xsd:string" nillable="true"/>
+                            <element name="inReplyTo" minOccurs="0" type="xsd:string" nillable="true"/>
+                            <element name="fileAttachments" minOccurs="0" maxOccurs="unbounded" type="tns:EmailFileAttachment"/>
+                            <element name="orgWideEmailAddressId" minOccurs="0" maxOccurs="1" type="tns:ID" nillable="true"/>
+                            <element name="plainTextBody" type="xsd:string" nillable="true"/>
+                            <element name="references" minOccurs="0" type="xsd:string" nillable="true"/>
+                            <element name="targetObjectId" type="tns:ID" nillable="true"/>
+                            <element name="templateId" type="tns:ID" nillable="true"/>
+                            <element name="toAddresses" minOccurs="0" maxOccurs="100" type="xsd:string" nillable="true"/>
+                            <element name="whatId" type="tns:ID" nillable="true"/>
+                        </sequence>
+                    </extension>
+                </complexContent>
+            </complexType>
+
+            <complexType name="SendEmailResult">
+                <sequence>
+                    <element name="errors" minOccurs="0" maxOccurs="unbounded" type="tns:SendEmailError"/>
+                    <element name="success" type="xsd:boolean"/>
+                </sequence>
+            </complexType>
+
+
+
+            <complexType name="DescribeTabSetResult">
+                <sequence>
+                    <element name="label" type="xsd:string"/>
+                    <element name="logoUrl" type="xsd:string"/>
+                    <element name="namespace" type="xsd:string" minOccurs="0"/>
+                    <element name="selected" type="xsd:boolean"/>
+                    <element name="tabs" type="tns:DescribeTab" minOccurs="0" maxOccurs="unbounded"/>
+                </sequence>
+            </complexType>
+
+            <complexType name="DescribeTab">
+                <sequence>
+                    <element name="custom" type="xsd:boolean"/>
+                    <element name="iconUrl" type="xsd:string"/>
+                    <element name="label" type="xsd:string"/>
+                    <element name="miniIconUrl" type="xsd:string"/>
+                    <element name="sobjectName" type="xsd:string" nillable="true"/>
+                    <element name="url" type="xsd:string"/>
+                </sequence>
+            </complexType>
+
+
+
+
+
+            <!-- Login Message Types -->
+            <element name="login">
+                <complexType>
+                    <sequence>
+                        <element name="username" type="xsd:string"/>
+                        <element name="password" type="xsd:string"/>
+                    </sequence>
+                </complexType>
+            </element>
+            <element name="loginResponse">
+                <complexType>
+                    <sequence>
+                        <element name="result" type="tns:LoginResult"/>
+                    </sequence>
+                </complexType>
+            </element>
+
+            <!-- Describe Message Types -->
+            <element name="describeSObject">
+                <complexType>
+                    <sequence>
+                        <element name="sObjectType" type="xsd:string"/>
+                    </sequence>
+                </complexType>
+            </element>
+            <element name="describeSObjectResponse">
+                <complexType>
+                    <sequence>
+                        <element name="result" type="tns:DescribeSObjectResult" nillable="true"/>
+                    </sequence>
+                </complexType>
+            </element>
+
+            <!-- DescibeSObjects Message Types -->
+            <element name="describeSObjects">
+                <complexType>
+                    <sequence>
+                        <element name="sObjectType" type="xsd:string" minOccurs="0" maxOccurs="100"/>
+                    </sequence>
+                </complexType>
+            </element>
+            <element name="describeSObjectsResponse">
+                <complexType>
+                    <sequence>
+                        <element name="result" type="tns:DescribeSObjectResult" nillable="true" minOccurs="0" maxOccurs="100"/>
+                    </sequence>
+                </complexType>
+            </element>
+
+            <!-- Describe Global Message Types -->
+            <element name="describeGlobal">
+                <complexType>
+                    <sequence/>
+                </complexType>
+            </element>
+            <element name="describeGlobalResponse">
+                <complexType>
+                    <sequence>
+                        <element name="result" type="tns:DescribeGlobalResult"/>
+                    </sequence>
+                </complexType>
+            </element>
+
+            <element name="describeLayout">
+                <complexType>
+                    <sequence>
+                        <element name="sObjectType" type="xsd:string"/>
+                        <element name="recordTypeIds" type="tns:ID" minOccurs="0" maxOccurs="unbounded"/>
+                    </sequence>
+                </complexType>
+            </element>
+            <element name="describeLayoutResponse">
+                <complexType>
+                    <sequence>
+                        <element name="result" type="tns:DescribeLayoutResult" nillable="true"/>
+                    </sequence>
+                </complexType>
+            </element>
+
+            <element name="describeSoftphoneLayout">
+                <complexType>
+                    <sequence/>
+                </complexType>
+            </element>
+            <element name="describeSoftphoneLayoutResponse">
+                <complexType>
+                    <sequence>
+                        <element name="result" type="tns:DescribeSoftphoneLayoutResult" nillable="true"/>
+                    </sequence>
+                </complexType>
+            </element>
+
+
+            <element name="describeTabs">
+                <complexType>
+                    <sequence/>
+                </complexType>
+            </element>
+            <element name="describeTabsResponse">
+                <complexType>
+                    <sequence>
+                        <element name="result" type="tns:DescribeTabSetResult" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
+                    </sequence>
+                </complexType>
+            </element>
+
+            <!-- Create Message Types -->
+            <element name="create">
+                <complexType>
+                    <sequence>
+                        <element name="sObjects" type="ens:sObject" minOccurs="0" maxOccurs="unbounded"/>
+                    </sequence>
+                </complexType>
+            </element>
+            <element name="createResponse">
+                <complexType>
+                    <sequence>
+                        <element name="result" type="tns:SaveResult" minOccurs="0" maxOccurs="unbounded"/>
+                    </sequence>
+                </complexType>
+            </element>
+
+
+
+            <!-- Send Email Types -->
+            <element name="sendEmail">
+                <complexType>
+                    <sequence>
+                        <element name="messages" type="tns:Email" minOccurs="0" maxOccurs="10"/>
+                    </sequence>
+                </complexType>
+            </element>
+            <element name="sendEmailResponse">
+                <complexType>
+                    <sequence>
+                        <element name="result" minOccurs="0" maxOccurs="10" type="tns:SendEmailResult"/>
+                    </sequence>
+                </complexType>
+            </element>
+
+
+            <!-- Update Message Types -->
+            <element name="update">
+                <complexType>
+                    <sequence>
+                        <element name="sObjects" type="ens:sObject" minOccurs="0" maxOccurs="unbounded"/>
+                    </sequence>
+                </complexType>
+            </element>
+            <element name="updateResponse">
+                <complexType>
+                    <sequence>
+                        <element name="result" type="tns:SaveResult" minOccurs="0" maxOccurs="unbounded"/>
+                    </sequence>
+                </complexType>
+            </element>
+
+            <!-- Upsert Message Types -->
+            <element name="upsert">
+                <complexType>
+                    <sequence>
+                        <element name="externalIDFieldName" type="xsd:string"/>
+                        <element name="sObjects" type="ens:sObject" minOccurs="0" maxOccurs="unbounded"/>
+                    </sequence>
+                </complexType>
+            </element>
+            <element name="upsertResponse">
+                <complexType>
+                    <sequence>
+                        <element name="result" type="tns:UpsertResult" minOccurs="0" maxOccurs="unbounded"/>
+                    </sequence>
+                </complexType>
+            </element>
+
+            <!-- Merge Message Types -->
+            <element name="merge">
+                <complexType>
+                    <sequence>
+                        <element name="request" type="tns:MergeRequest" minOccurs="0" maxOccurs="unbounded"/>
+                    </sequence>
+                </complexType>
+            </element>
+            <element name="mergeResponse">
+                <complexType>
+                    <sequence>
+                        <element name="result" type="tns:MergeResult" minOccurs="0" maxOccurs="unbounded"/>
+                    </sequence>
+                </complexType>
+            </element>
+
+            <!-- Delete Message Types -->
+            <element name="delete">
+                <complexType>
+                    <sequence>
+                        <element name="ids" type="tns:ID" minOccurs="0" maxOccurs="unbounded"/>
+                    </sequence>
+                </complexType>
+            </element>
+            <element name="deleteResponse">
+                <complexType>
+                    <sequence>
+                        <element name="result" type="tns:DeleteResult" minOccurs="0" maxOccurs="unbounded"/>
+                    </sequence>
+                </complexType>
+            </element>
+
+            <!-- Undelete Message Types -->
+            <element name="undelete">
+                <complexType>
+                    <sequence>
+                        <element name="ids" type="tns:ID" minOccurs="1" maxOccurs="unbounded"/>
+                    </sequence>
+                </complexType>
+            </element>
+            <element name="undeleteResponse">
+                <complexType>
+                    <sequence>
+                        <element name="result" type="tns:UndeleteResult" minOccurs="1" maxOccurs="unbounded"/>
+                    </sequence>
+                </complexType>
+            </element>
+
+            <!-- EmptyRecycleBin Message Types -->
+            <element name="emptyRecycleBin">
+                <complexType>
+                    <sequence>
+                        <element name="ids" type="tns:ID" minOccurs="1" maxOccurs="unbounded"/>
+                    </sequence>
+                </complexType>
+            </element>
+            <element name="emptyRecycleBinResponse">
+                <complexType>
+                    <sequence>
+                        <element name="result" type="tns:EmptyRecycleBinResult" minOccurs="1" maxOccurs="unbounded"/>
+                    </sequence>
+                </complexType>
+            </element>
+
+            <!-- Process Message Types -->
+            <element name="process">
+                <complexType>
+                    <sequence>
+                        <element name="actions" type="tns:ProcessRequest" minOccurs="0" maxOccurs="unbounded"/>
+                    </sequence>
+                </complexType>
+            </element>
+            <element name="processResponse">
+                <complexType>
+                    <sequence>
+                        <element name="result" type="tns:ProcessResult" minOccurs="0" maxOccurs="unbounded"/>
+                    </sequence>
+                </complexType>
+            </element>
+
+
+
+
+            <!-- Retrieve (ID List) Message Types -->
+            <element name="retrieve">
+                <complexType>
+                    <sequence>
+                        <element name="fieldList" type="xsd:string"/>
+                        <element name="sObjectType" type="xsd:string"/>
+                        <element name="ids" type="tns:ID" minOccurs="0" maxOccurs="unbounded"/>
+                    </sequence>
+                </complexType>
+            </element>
+            <element name="retrieveResponse">
+                <complexType>
+                    <sequence>
+                        <element name="result" type="ens:sObject" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
+                    </sequence>
+                </complexType>
+            </element>
+
+            <!-- Convert Lead Message Types -->
+            <element name="convertLead">
+                <complexType>
+                    <sequence>
+                        <element name="leadConverts" type="tns:LeadConvert" minOccurs="0" maxOccurs="unbounded"/>
+                    </sequence>
+                </complexType>
+            </element>
+            <element name="convertLeadResponse">
+                <complexType>
+                    <sequence>
+                        <element name="result" type="tns:LeadConvertResult" minOccurs="0" maxOccurs="unbounded"/>
+                    </sequence>
+                </complexType>
+            </element>
+
+            <!-- Get Updated Message Types -->
+            <element name="getUpdated">
+                <complexType>
+                    <sequence>
+                        <element name="sObjectType" type="xsd:string"/>
+                        <element name="startDate" type="xsd:dateTime"/>
+                        <element name="endDate" type="xsd:dateTime"/>
+                    </sequence>
+                </complexType>
+            </element>
+            <element name="getUpdatedResponse">
+                <complexType>
+                    <sequence>
+                        <element name="result" type="tns:GetUpdatedResult"/>
+                    </sequence>
+                </complexType>
+            </element>
+
+            <!-- Get Deleted Message Types -->
+            <element name="getDeleted">
+                <complexType>
+                    <sequence>
+                        <element name="sObjectType" type="xsd:string"/>
+                        <element name="startDate" type="xsd:dateTime"/>
+                        <element name="endDate" type="xsd:dateTime"/>
+                    </sequence>
+                </complexType>
+            </element>
+            <element name="getDeletedResponse">
+                <complexType>
+                    <sequence>
+                        <element name="result" type="tns:GetDeletedResult"/>
+                    </sequence>
+                </complexType>
+            </element>
+
+
+            <!-- Logout current session -->
+            <element name="logout">
+                <complexType>
+                </complexType>
+            </element>
+
+            <element name="logoutResponse">
+                <complexType>
+                </complexType>
+            </element>
+
+            <!-- Invalidate a list of session ids -->
+            <element name="invalidateSessions">
+                <complexType>
+                    <sequence>
+                        <element name="sessionIds" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
+                    </sequence>
+                </complexType>
+            </element>
+
+            <element name="invalidateSessionsResponse">
+                <complexType>
+                    <sequence>
+                        <element name="result" type="tns:InvalidateSessionsResult" minOccurs="0" maxOccurs="unbounded"/>
+                    </sequence>
+                </complexType>
+            </element>
+
+            <!-- Create Query -->
+            <element name="query">
+                <complexType>
+                    <sequence>
+                        <element name="queryString" type="xsd:string"/>
+                    </sequence>
+                </complexType>
+            </element>
+            <element name="queryResponse">
+                <complexType>
+                    <sequence>
+                        <element name="result" type="tns:QueryResult"/>
+                    </sequence>
+                </complexType>
+            </element>
+
+            <!-- Create Query All -->
+            <element name="queryAll">
+                <complexType>
+                    <sequence>
+                        <element name="queryString" type="xsd:string"/>
+                    </sequence>
+                </complexType>
+            </element>
+            <element name="queryAllResponse">
+                <complexType>
+                    <sequence>
+                        <element name="result" type="tns:QueryResult"/>
+                    </sequence>
+                </complexType>
+            </element>
+
+            <!-- Next Batch of sObjects from a query -->
+            <element name="queryMore">
+                <complexType>
+                    <sequence>
+                        <element name="queryLocator" type="tns:QueryLocator"/>
+                    </sequence>
+                </complexType>
+            </element>
+            <element name="queryMoreResponse">
+                <complexType>
+                    <sequence>
+                        <element name="result" type="tns:QueryResult"/>
+                    </sequence>
+                </complexType>
+            </element>
+
+
+
+            <!-- Create Search -->
+            <element name="search">
+                <complexType>
+                    <sequence>
+                        <element name="searchString" type="xsd:string"/>
+                    </sequence>
+                </complexType>
+            </element>
+            <element name="searchResponse">
+                <complexType>
+                    <sequence>
+                        <element name="result" type="tns:SearchResult"/>
+                    </sequence>
+                </complexType>
+            </element>
+
+
+
+            <element name="getServerTimestamp">
+                <complexType>
+                    <sequence/>
+                </complexType>
+            </element>
+            <element name="getServerTimestampResponse">
+                <complexType>
+                    <sequence>
+                        <element name="result" type="tns:GetServerTimestampResult"/>
+                    </sequence>
+                </complexType>
+            </element>
+
+            <element name="setPassword">
+                <complexType>
+                    <sequence>
+                        <element name="userId" type="tns:ID"/>
+                        <element name="password" type="xsd:string"/>
+                    </sequence>
+                </complexType>
+            </element>
+            <element name="setPasswordResponse">
+                <complexType>
+                    <sequence>
+                        <element name="result" type="tns:SetPasswordResult"/>
+                    </sequence>
+                </complexType>
+            </element>
+
+            <element name="resetPassword">
+                <complexType>
+                    <sequence>
+                        <element name="userId" type="tns:ID"/>
+                    </sequence>
+                </complexType>
+            </element>
+            <element name="resetPasswordResponse">
+                <complexType>
+                    <sequence>
+                        <element name="result" type="tns:ResetPasswordResult"/>
+                    </sequence>
+                </complexType>
+            </element>
+
+            <element name="getUserInfo">
+                <complexType>
+                    <sequence/>
+                </complexType>
+            </element>
+            <element name="getUserInfoResponse">
+                <complexType>
+                    <sequence>
+                        <element name="result" type="tns:GetUserInfoResult"/>
+                    </sequence>
+                </complexType>
+            </element>
+
+
+
+            <!-- Header Elements -->
+            <element name="SessionHeader">
+                <complexType>
+                    <sequence>
+                        <element name="sessionId" type="xsd:string"/>
+                    </sequence>
+                </complexType>
+            </element>
+
+            <element name="LoginScopeHeader">
+                <complexType>
+                    <sequence>
+                        <element name="organizationId" type="tns:ID"/>
+                        <element name="portalId" type="tns:ID" minOccurs="0"/>
+                    </sequence>
+                </complexType>
+            </element>
+
+
+            <element name="CallOptions">
+                <complexType>
+                    <sequence>
+                        <element name="client" type="xsd:string" nillable="true"/>
+                        <element name="defaultNamespace" type="xsd:string" nillable="true"/>
+
+                    </sequence>
+                </complexType>
+            </element>
+
+
+            <element name="QueryOptions">
+                <complexType>
+                    <sequence>
+                        <element name="batchSize" type="xsd:int" minOccurs="0"/>
+
+                    </sequence>
+                </complexType>
+            </element>
+
+
+            <simpleType name="DebugLevel">
+                <restriction base="xsd:string">
+                    <enumeration value="None"/>
+                    <enumeration value="DebugOnly"/>
+                    <enumeration value="Db"/>
+                </restriction>
+            </simpleType>
+            <element name="DebuggingHeader">
+                <complexType>
+                    <sequence>
+                        <element name="debugLevel" type="tns:DebugLevel"/>
+                    </sequence>
+                </complexType>
+            </element>
+            <element name="DebuggingInfo">
+                <complexType>
+                    <sequence>
+                        <element name="debugLog" type="xsd:string"/>
+                    </sequence>
+                </complexType>
+            </element>
+
+   <xsd:complexType name="PackageVersion">
+    <xsd:sequence>
+     <xsd:element name="majorNumber" type="xsd:int"/>
+     <xsd:element name="minorNumber" type="xsd:int"/>
+     <xsd:element name="namespace" type="xsd:string"/>
+    </xsd:sequence>
+   </xsd:complexType>
+   <xsd:element name="PackageVersionHeader">
+    <xsd:complexType>
+     <xsd:sequence>
+      <xsd:element name="packageVersions" minOccurs="0" maxOccurs="unbounded" type="tns:PackageVersion"/>
+     </xsd:sequence>
+    </xsd:complexType>
+   </xsd:element>
+
+            <element name="AllowFieldTruncationHeader">
+                <complexType>
+                    <sequence>
+                        <element name="allowFieldTruncation" type="xsd:boolean"/>
+                    </sequence>
+                </complexType>
+            </element>
+
+
+
+            <!-- ideally this could of just been elem name="..." type="xsd:boolean"
+                 but is required to be nested within a complexType for .NET 1.1 compatibility -->
+            <element name="MruHeader">
+                <complexType>
+                    <sequence>
+                        <element name="updateMru" type="xsd:boolean"/>
+                    </sequence>
+                </complexType>
+            </element>
+
+            <element name="EmailHeader">
+                <complexType>
+                    <sequence>
+                        <element name="triggerAutoResponseEmail" type="xsd:boolean"/>
+                        <element name="triggerOtherEmail" type="xsd:boolean"/>
+                        <element name="triggerUserEmail" type="xsd:boolean"/>
+                    </sequence>
+                </complexType>
+            </element>
+
+            <element name="AssignmentRuleHeader">
+                <complexType>
+                    <sequence>
+                        <element name="assignmentRuleId" type="tns:ID" nillable="true"/>
+                        <element name="useDefaultRule" type="xsd:boolean" nillable="true"/>
+                    </sequence>
+                </complexType>
+            </element>
+
+            <element name="UserTerritoryDeleteHeader">
+                <complexType>
+                    <sequence>
+                        <element name="transferToUserId" type="tns:ID" nillable="true"/>
+                    </sequence>
+                </complexType>
+            </element>
+
+
+
+            <element name="LocaleOptions">
+                <complexType>
+                    <sequence>
+                        <element name="language" type="xsd:string" minOccurs="0"/>
+                    </sequence>
+                </complexType>
+            </element>
+        </schema>
+
+        <schema elementFormDefault="qualified" xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:fault.partner.soap.sforce.com" xmlns:fns="urn:fault.partner.soap.sforce.com">
+
+            <simpleType name="ExceptionCode">
+                <restriction base="xsd:string">
+                    <enumeration value="API_CURRENTLY_DISABLED"/>
+                    <enumeration value="API_DISABLED_FOR_ORG"/>
+                    <enumeration value="CANT_ADD_STANDADRD_PORTAL_USER_TO_TERRITORY"/>
+                    <enumeration value="CANT_ADD_STANDARD_PORTAL_USER_TO_TERRITORY"/>
+                    <enumeration value="CIRCULAR_OBJECT_GRAPH"/>
+                    <enumeration value="CLIENT_NOT_ACCESSIBLE_FOR_USER"/>
+                    <enumeration value="CLIENT_REQUIRE_UPDATE_FOR_USER"/>
+                    <enumeration value="CUSTOM_METADATA_LIMIT_EXCEEDED"/>
+                    <enumeration value="DUPLICATE_VALUE"/>
+                    <enumeration value="EMAIL_BATCH_SIZE_LIMIT_EXCEEDED"/>
+                    <enumeration value="EMAIL_TO_CASE_INVALID_ROUTING"/>
+                    <enumeration value="EMAIL_TO_CASE_LIMIT_EXCEEDED"/>
+                    <enumeration value="EMAIL_TO_CASE_NOT_ENABLED"/>
+                    <enumeration value="EXCEEDED_ID_LIMIT"/>
+                    <enumeration value="EXCEEDED_LEAD_CONVERT_LIMIT"/>
+                    <enumeration value="EXCEEDED_MAX_SIZE_REQUEST"/>
+                    <enumeration value="EXCEEDED_MAX_TYPES_LIMIT"/>
+                    <enumeration value="EXCEEDED_QUOTA"/>
+                    <enumeration value="FUNCTIONALITY_NOT_ENABLED"/>
+                    <enumeration value="INACTIVE_OWNER_OR_USER"/>
+                    <enumeration value="INACTIVE_PORTAL"/>
+                    <enumeration value="INSUFFICIENT_ACCESS"/>
+                    <enumeration value="INVALID_ASSIGNMENT_RULE"/>
+                    <enumeration value="INVALID_BATCH_SIZE"/>
+                    <enumeration value="INVALID_CLIENT"/>
+                    <enumeration value="INVALID_CROSS_REFERENCE_KEY"/>
+                    <enumeration value="INVALID_FIELD"/>
+                    <enumeration value="INVALID_FILTER_LANGUAGE"/>
+                    <enumeration value="INVALID_FILTER_VALUE"/>
+                    <enumeration value="INVALID_ID_FIELD"/>
+                    <enumeration value="INVALID_LOCALE_LANGUAGE"/>
+                    <enumeration value="INVALID_LOCATOR"/>
+                    <enumeration value="INVALID_LOGIN"/>
+                    <enumeration value="INVALID_NEW_PASSWORD"/>
+                    <enumeration value="INVALID_OPERATION"/>
+                    <enumeration value="INVALID_OPERATION_WITH_EXPIRED_PASSWORD"/>
+                    <enumeration value="INVALID_QUERY_FILTER_OPERATOR"/>
+                    <enumeration value="INVALID_QUERY_LOCATOR"/>
+                    <enumeration value="INVALID_QUERY_SCOPE"/>
+                    <enumeration value="INVALID_REPLICATION_DATE"/>
+                    <enumeration value="INVALID_SEARCH"/>
+                    <enumeration value="INVALID_SEARCH_SCOPE"/>
+                    <enumeration value="INVALID_SESSION_ID"/>
+                    <enumeration value="INVALID_SOAP_HEADER"/>
+                    <enumeration value="INVALID_SSO_GATEWAY_URL"/>
+                    <enumeration value="INVALID_TYPE"/>
+                    <enumeration value="INVALID_TYPE_FOR_OPERATION"/>
+                    <enumeration value="LIMIT_EXCEEDED"/>
+                    <enumeration value="LOGIN_CHALLENGE_ISSUED"/>
+                    <enumeration value="LOGIN_CHALLENGE_PENDING"/>
+                    <enumeration value="LOGIN_DURING_RESTRICTED_DOMAIN"/>
+                    <enumeration value="LOGIN_DURING_RESTRICTED_TIME"/>
+                    <enumeration value="LOGIN_MUST_USE_SECURITY_TOKEN"/>
+                    <enumeration value="MALFORMED_ID"/>
+                    <enumeration value="MALFORMED_QUERY"/>
+                    <enumeration value="MALFORMED_SEARCH"/>
+                    <enumeration value="MISSING_ARGUMENT"/>
+                    <enumeration value="NOT_MODIFIED"/>
+                    <enumeration value="NO_SOFTPHONE_LAYOUT"/>
+                    <enumeration value="NUMBER_OUTSIDE_VALID_RANGE"/>
+                    <enumeration value="OPERATION_TOO_LARGE"/>
+                    <enumeration value="ORG_LOCKED"/>
+                    <enumeration value="ORG_NOT_OWNED_BY_INSTANCE"/>
+                    <enumeration value="PASSWORD_LOCKOUT"/>
+                    <enumeration value="PORTAL_NO_ACCESS"/>
+                    <enumeration value="QUERY_TIMEOUT"/>
+                    <enumeration value="QUERY_TOO_COMPLICATED"/>
+                    <enumeration value="REQUEST_LIMIT_EXCEEDED"/>
+                    <enumeration value="REQUEST_RUNNING_TOO_LONG"/>
+                    <enumeration value="SERVER_UNAVAILABLE"/>
+                    <enumeration value="SSO_SERVICE_DOWN"/>
+                    <enumeration value="TOO_MANY_APEX_REQUESTS"/>
+                    <enumeration value="TRIAL_EXPIRED"/>
+                    <enumeration value="UNKNOWN_EXCEPTION"/>
+                    <enumeration value="UNSUPPORTED_API_VERSION"/>
+                    <enumeration value="UNSUPPORTED_CLIENT"/>
+                </restriction>
+            </simpleType>
+            <!-- For convenience these QNames are returned in the standard soap faultcode element -->
+            <simpleType name="FaultCode">
+                <restriction base="xsd:QName">
+                    <enumeration value="fns:API_CURRENTLY_DISABLED"/>
+                    <enumeration value="fns:API_DISABLED_FOR_ORG"/>
+                    <enumeration value="fns:CANT_ADD_STANDADRD_PORTAL_USER_TO_TERRITORY"/>
+                    <enumeration value="fns:CANT_ADD_STANDARD_PORTAL_USER_TO_TERRITORY"/>
+                    <enumeration value="fns:CIRCULAR_OBJECT_GRAPH"/>
+                    <enumeration value="fns:CLIENT_NOT_ACCESSIBLE_FOR_USER"/>
+                    <enumeration value="fns:CLIENT_REQUIRE_UPDATE_FOR_USER"/>
+                    <enumeration value="fns:CUSTOM_METADATA_LIMIT_EXCEEDED"/>
+                    <enumeration value="fns:DUPLICATE_VALUE"/>
+                    <enumeration value="fns:EMAIL_BATCH_SIZE_LIMIT_EXCEEDED"/>
+                    <enumeration value="fns:EMAIL_TO_CASE_INVALID_ROUTING"/>
+                    <enumeration value="fns:EMAIL_TO_CASE_LIMIT_EXCEEDED"/>
+                    <enumeration value="fns:EMAIL_TO_CASE_NOT_ENABLED"/>
+                    <enumeration value="fns:EXCEEDED_ID_LIMIT"/>
+                    <enumeration value="fns:EXCEEDED_LEAD_CONVERT_LIMIT"/>
+                    <enumeration value="fns:EXCEEDED_MAX_SIZE_REQUEST"/>
+                    <enumeration value="fns:EXCEEDED_MAX_TYPES_LIMIT"/>
+                    <enumeration value="fns:EXCEEDED_QUOTA"/>
+                    <enumeration value="fns:FUNCTIONALITY_NOT_ENABLED"/>
+                    <enumeration value="fns:INACTIVE_OWNER_OR_USER"/>
+                    <enumeration value="fns:INACTIVE_PORTAL"/>
+                    <enumeration value="fns:INSUFFICIENT_ACCESS"/>
+                    <enumeration value="fns:INVALID_ASSIGNMENT_RULE"/>
+                    <enumeration value="fns:INVALID_BATCH_SIZE"/>
+                    <enumeration value="fns:INVALID_CLIENT"/>
+                    <enumeration value="fns:INVALID_CROSS_REFERENCE_KEY"/>
+                    <enumeration value="fns:INVALID_FIELD"/>
+                    <enumeration value="fns:INVALID_FILTER_LANGUAGE"/>
+                    <enumeration value="fns:INVALID_FILTER_VALUE"/>
+                    <enumeration value="fns:INVALID_ID_FIELD"/>
+                    <enumeration value="fns:INVALID_LOCALE_LANGUAGE"/>
+                    <enumeration value="fns:INVALID_LOCATOR"/>
+                    <enumeration value="fns:INVALID_LOGIN"/>
+                    <enumeration value="fns:INVALID_NEW_PASSWORD"/>
+                    <enumeration value="fns:INVALID_OPERATION"/>
+                    <enumeration value="fns:INVALID_OPERATION_WITH_EXPIRED_PASSWORD"/>
+                    <enumeration value="fns:INVALID_QUERY_FILTER_OPERATOR"/>
+                    <enumeration value="fns:INVALID_QUERY_LOCATOR"/>
+                    <enumeration value="fns:INVALID_QUERY_SCOPE"/>
+                    <enumeration value="fns:INVALID_REPLICATION_DATE"/>
+                    <enumeration value="fns:INVALID_SEARCH"/>
+                    <enumeration value="fns:INVALID_SEARCH_SCOPE"/>
+                    <enumeration value="fns:INVALID_SESSION_ID"/>
+                    <enumeration value="fns:INVALID_SOAP_HEADER"/>
+                    <enumeration value="fns:INVALID_SSO_GATEWAY_URL"/>
+                    <enumeration value="fns:INVALID_TYPE"/>
+                    <enumeration value="fns:INVALID_TYPE_FOR_OPERATION"/>
+                    <enumeration value="fns:LIMIT_EXCEEDED"/>
+                    <enumeration value="fns:LOGIN_CHALLENGE_ISSUED"/>
+                    <enumeration value="fns:LOGIN_CHALLENGE_PENDING"/>
+                    <enumeration value="fns:LOGIN_DURING_RESTRICTED_DOMAIN"/>
+                    <enumeration value="fns:LOGIN_DURING_RESTRICTED_TIME"/>
+                    <enumeration value="fns:LOGIN_MUST_USE_SECURITY_TOKEN"/>
+                    <enumeration value="fns:MALFORMED_ID"/>
+                    <enumeration value="fns:MALFORMED_QUERY"/>
+                    <enumeration value="fns:MALFORMED_SEARCH"/>
+                    <enumeration value="fns:MISSING_ARGUMENT"/>
+                    <enumeration value="fns:NOT_MODIFIED"/>
+                    <enumeration value="fns:NO_SOFTPHONE_LAYOUT"/>
+                    <enumeration value="fns:NUMBER_OUTSIDE_VALID_RANGE"/>
+                    <enumeration value="fns:OPERATION_TOO_LARGE"/>
+                    <enumeration value="fns:ORG_LOCKED"/>
+                    <enumeration value="fns:ORG_NOT_OWNED_BY_INSTANCE"/>
+                    <enumeration value="fns:PASSWORD_LOCKOUT"/>
+                    <enumeration value="fns:PORTAL_NO_ACCESS"/>
+                    <enumeration value="fns:QUERY_TIMEOUT"/>
+                    <enumeration value="fns:QUERY_TOO_COMPLICATED"/>
+                    <enumeration value="fns:REQUEST_LIMIT_EXCEEDED"/>
+                    <enumeration value="fns:REQUEST_RUNNING_TOO_LONG"/>
+                    <enumeration value="fns:SERVER_UNAVAILABLE"/>
+                    <enumeration value="fns:SSO_SERVICE_DOWN"/>
+                    <enumeration value="fns:TOO_MANY_APEX_REQUESTS"/>
+                    <enumeration value="fns:TRIAL_EXPIRED"/>
+                    <enumeration value="fns:UNKNOWN_EXCEPTION"/>
+                    <enumeration value="fns:UNSUPPORTED_API_VERSION"/>
+                    <enumeration value="fns:UNSUPPORTED_CLIENT"/>
+                </restriction>
+            </simpleType>
+
+
+            <!-- Fault -->
+            <complexType name="ApiFault">
+                <sequence>
+                    <element name="exceptionCode" type="fns:ExceptionCode"/>
+                    <element name="exceptionMessage" type="xsd:string"/>
+
+                </sequence>
+            </complexType>
+
+            <element name="fault" type="fns:ApiFault"/>
+
+            <complexType name="ApiQueryFault">
+                <complexContent>
+                    <extension base="fns:ApiFault">
+                        <sequence>
+                        <element name="row" type="xsd:int"/>
+                        <element name="column" type="xsd:int"/>
+                        </sequence>
+                    </extension>
+                </complexContent>
+            </complexType>
+
+            <complexType name="LoginFault">
+                <complexContent>
+                    <extension base="fns:ApiFault"/>
+                </complexContent>
+            </complexType>
+            <element name="LoginFault" type="fns:LoginFault"/>
+
+            <complexType name="InvalidQueryLocatorFault">
+                <complexContent>
+                    <extension base="fns:ApiFault"/>
+                </complexContent>
+            </complexType>
+            <element name="InvalidQueryLocatorFault" type="fns:InvalidQueryLocatorFault"/>
+
+            <complexType name="InvalidNewPasswordFault">
+                <complexContent>
+                    <extension base="fns:ApiFault"/>
+                </complexContent>
+            </complexType>
+            <element name="InvalidNewPasswordFault" type="fns:InvalidNewPasswordFault"/>
+
+            <complexType name="InvalidIdFault">
+                <complexContent>
+                    <extension base="fns:ApiFault"/>
+                </complexContent>
+            </complexType>
+            <element name="InvalidIdFault" type="fns:InvalidIdFault"/>
+
+            <complexType name="UnexpectedErrorFault">
+                <complexContent>
+                    <extension base="fns:ApiFault"/>
+                </complexContent>
+            </complexType>
+            <element name="UnexpectedErrorFault" type="fns:UnexpectedErrorFault"/>
+
+            <complexType name="InvalidFieldFault">
+                <complexContent>
+                    <extension base="fns:ApiQueryFault"/>
+                </complexContent>
+            </complexType>
+            <element name="InvalidFieldFault" type="fns:InvalidFieldFault"/>
+
+            <complexType name="InvalidSObjectFault">
+                <complexContent>
+                    <extension base="fns:ApiQueryFault"/>
+                </complexContent>
+            </complexType>
+            <element name="InvalidSObjectFault" type="fns:InvalidSObjectFault"/>
+
+            <complexType name="MalformedQueryFault">
+                <complexContent>
+                    <extension base="fns:ApiQueryFault"/>
+                </complexContent>
+            </complexType>
+            <element name="MalformedQueryFault" type="fns:MalformedQueryFault"/>
+
+            <complexType name="MalformedSearchFault">
+                <complexContent>
+                    <extension base="fns:ApiQueryFault"/>
+                </complexContent>
+            </complexType>
+            <element name="MalformedSearchFault" type="fns:MalformedSearchFault"/>
+
+
+        </schema>
+    </types>
+
+    <!-- Header Message -->
+    <message name="Header">
+        <part element="tns:LoginScopeHeader" name="LoginScopeHeader"/>
+        <part element="tns:SessionHeader" name="SessionHeader"/>
+
+        <part element="tns:CallOptions" name="CallOptions"/>
+
+        <part element="tns:QueryOptions" name="QueryOptions"/>
+        <part element="tns:AssignmentRuleHeader" name="AssignmentRuleHeader"/>
+        <part element="tns:AllowFieldTruncationHeader" name="AllowFieldTruncationHeader"/>
+
+        <part element="tns:MruHeader" name="MruHeader"/>
+        <part element="tns:EmailHeader" name="EmailHeader"/>
+
+        <part element="tns:UserTerritoryDeleteHeader" name="UserTerritoryDeleteHeader"/>
+
+        <part element="tns:DebuggingHeader" name="DebuggingHeader"/>
+        <part element="tns:PackageVersionHeader" name="PackageVersionHeader"/>
+        <part element="tns:DebuggingInfo" name="DebuggingInfo"/>
+        <part element="tns:LocaleOptions" name="LocaleOptions"/>
+    </message>
+
+    <!-- Fault Messages -->
+
+    <message name="ApiFault">
+        <part name="fault" element="fns:fault"/>
+    </message>
+
+    <message name="LoginFault">
+        <part name="fault" element="fns:LoginFault"/>
+    </message>
+    <message name="InvalidQueryLocatorFault">
+        <part name="fault" element="fns:InvalidQueryLocatorFault"/>
+    </message>
+    <message name="InvalidNewPasswordFault">
+        <part name="fault" element="fns:InvalidNewPasswordFault"/>
+    </message>
+    <message name="InvalidIdFault">
+        <part name="fault" element="fns:InvalidIdFault"/>
+    </message>
+    <message name="UnexpectedErrorFault">
+        <part name="fault" element="fns:UnexpectedErrorFault"/>
+    </message>
+    <message name="InvalidFieldFault">
+        <part name="fault" element="fns:InvalidFieldFault"/>
+    </message>
+    <message name="InvalidSObjectFault">
+        <part name="fault" element="fns:InvalidSObjectFault"/>
+    </message>
+    <message name="MalformedQueryFault">
+        <part name="fault" element="fns:MalformedQueryFault"/>
+    </message>
+    <message name="MalformedSearchFault">
+        <part name="fault" element="fns:MalformedSearchFault"/>
+    </message>
+
+
+    <!-- Method Messages -->
+    <message name="loginRequest">
+        <part element="tns:login" name="parameters"/>
+    </message>
+    <message name="loginResponse">
+        <part element="tns:loginResponse" name="parameters"/>
+    </message>
+
+    <message name="describeSObjectRequest">
+        <part element="tns:describeSObject" name="parameters"/>
+    </message>
+    <message name="describeSObjectResponse">
+        <part element="tns:describeSObjectResponse" name="parameters"/>
+    </message>
+
+    <message name="describeSObjectsRequest">
+        <part element="tns:describeSObjects" name="parameters"/>
+    </message>
+    <message name="describeSObjectsResponse">
+        <part element="tns:describeSObjectsResponse" name="parameters"/>
+    </message>
+
+    <message name="describeGlobalRequest">
+        <part element="tns:describeGlobal" name="parameters"/>
+    </message>
+    <message name="describeGlobalResponse">
+        <part element="tns:describeGlobalResponse" name="parameters"/>
+    </message>
+
+    <message name="describeLayoutRequest">
+        <part element="tns:describeLayout" name="parameters"/>
+    </message>
+    <message name="describeLayoutResponse">
+        <part element="tns:describeLayoutResponse" name="parameters"/>
+    </message>
+
+    <message name="describeSoftphoneLayoutRequest">
+        <part element="tns:describeSoftphoneLayout" name="parameters"/>
+    </message>
+    <message name="describeSoftphoneLayoutResponse">
+        <part element="tns:describeSoftphoneLayoutResponse" name="parameters"/>
+    </message>
+
+    <message name="describeTabsRequest">
+        <part element="tns:describeTabs" name="parameters"/>
+    </message>
+    <message name="describeTabsResponse">
+        <part element="tns:describeTabsResponse" name="parameters"/>
+    </message>
+
+    <message name="createRequest">
+        <part element="tns:create" name="parameters"/>
+    </message>
+    <message name="createResponse">
+        <part element="tns:createResponse" name="parameters"/>
+    </message>
+
+    <message name="updateRequest">
+        <part element="tns:update" name="parameters"/>
+    </message>
+    <message name="updateResponse">
+        <part element="tns:updateResponse" name="parameters"/>
+    </message>
+
+    <message name="upsertRequest">
+        <part element="tns:upsert" name="parameters"/>
+    </message>
+    <message name="upsertResponse">
+        <part element="tns:upsertResponse" name="parameters"/>
+    </message>
+
+    <message name="mergeRequest">
+        <part element="tns:merge" name="parameters"/>
+    </message>
+    <message name="mergeResponse">
+        <part element="tns:mergeResponse" name="parameters"/>
+    </message>
+
+    <message name="deleteRequest">
+        <part element="tns:delete" name="parameters"/>
+    </message>
+    <message name="deleteResponse">
+        <part element="tns:deleteResponse" name="parameters"/>
+    </message>
+
+    <message name="undeleteRequest">
+        <part element="tns:undelete" name="parameters"/>
+    </message>
+    <message name="undeleteResponse">
+        <part element="tns:undeleteResponse" name="parameters"/>
+    </message>
+
+    <message name="emptyRecycleBinRequest">
+        <part element="tns:emptyRecycleBin" name="parameters"/>
+    </message>
+    <message name="emptyRecycleBinResponse">
+        <part element="tns:emptyRecycleBinResponse" name="parameters"/>
+    </message>
+
+    <message name="retrieveRequest">
+        <part element="tns:retrieve" name="parameters"/>
+    </message>
+    <message name="retrieveResponse">
+        <part element="tns:retrieveResponse" name="parameters"/>
+    </message>
+
+    <message name="processRequest">
+        <part element="tns:process" name="parameters"/>
+    </message>
+    <message name="processResponse">
+        <part element="tns:processResponse" name="parameters"/>
+    </message>
+
+    <message name="convertLeadRequest">
+        <part element="tns:convertLead" name="parameters"/>
+    </message>
+    <message name="convertLeadResponse">
+        <part element="tns:convertLeadResponse" name="parameters"/>
+    </message>
+
+    <message name="logoutRequest">
+        <part element="tns:logout" name="parameters"/>
+    </message>
+    <message name="logoutResponse">
+        <part element="tns:logoutResponse" name="parameters"/>
+    </message>
+
+    <message name="invalidateSessionsRequest">
+        <part element="tns:invalidateSessions" name="parameters"/>
+    </message>
+    <message name="invalidateSessionsResponse">
+        <part element="tns:invalidateSessionsResponse" name="parameters"/>
+    </message>
+
+    <message name="getDeletedRequest">
+        <part element="tns:getDeleted" name="parameters"/>
+    </message>
+    <message name="getDeletedResponse">
+        <part element="tns:getDeletedResponse" name="parameters"/>
+    </message>
+
+    <message name="getUpdatedRequest">
+        <part element="tns:getUpdated" name="parameters"/>
+    </message>
+    <message name="getUpdatedResponse">
+        <part element="tns:getUpdatedResponse" name="parameters"/>
+    </message>
+
+    <message name="queryRequest">
+        <part element="tns:query" name="parameters"/>
+    </message>
+    <message name="queryResponse">
+        <part element="tns:queryResponse" name="parameters"/>
+    </message>
+
+    <message name="queryAllRequest">
+        <part element="tns:queryAll" name="parameters"/>
+    </message>
+    <message name="queryAllResponse">
+        <part element="tns:queryAllResponse" name="parameters"/>
+    </message>
+
+    <message name="queryMoreRequest">
+        <part element="tns:queryMore" name="parameters"/>
+    </message>
+    <message name="queryMoreResponse">
+        <part element="tns:queryMoreResponse" name="parameters"/>
+    </message>
+
+    <message name="searchRequest">
+        <part element="tns:search" name="parameters"/>
+    </message>
+    <message name="searchResponse">
+        <part element="tns:searchResponse" name="parameters"/>
+    </message>
+
+    <message name="getServerTimestampRequest">
+        <part element="tns:getServerTimestamp" name="parameters"/>
+    </message>
+    <message name="getServerTimestampResponse">
+        <part element="tns:getServerTimestampResponse" name="parameters"/>
+    </message>
+
+    <message name="setPasswordRequest">
+        <part element="tns:setPassword" name="parameters"/>
+    </message>
+    <message name="setPasswordResponse">
+        <part element="tns:setPasswordResponse" name="parameters"/>
+    </message>
+
+    <message name="resetPasswordRequest">
+        <part element="tns:resetPassword" name="parameters"/>
+    </message>
+    <message name="resetPasswordResponse">
+        <part element="tns:resetPasswordResponse" name="parameters"/>
+    </message>
+
+    <message name="getUserInfoRequest">
+        <part element="tns:getUserInfo" name="parameters"/>
+    </message>
+    <message name="getUserInfoResponse">
+        <part element="tns:getUserInfoResponse" name="parameters"/>
+    </message>
+
+    <message name="sendEmailRequest">
+        <part element="tns:sendEmail" name="parameters"/>
+    </message>
+    <message name="sendEmailResponse">
+        <part element="tns:sendEmailResponse" name="parameters"/>
+    </message>
+
+
+
+    <!-- Soap PortType -->
+    <portType name="Soap">
+        <operation name="login">
+            <documentation>Login to the Salesforce.com SOAP Api</documentation>
+            <input message="tns:loginRequest"/>
+            <output message="tns:loginResponse"/>
+            <fault message="tns:LoginFault" name="LoginFault"/>
+            <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+            <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
+        </operation>
+
+        <operation name="describeSObject">
+            <documentation>Describe an sObject</documentation>
+            <input message="tns:describeSObjectRequest"/>
+            <output message="tns:describeSObjectResponse"/>
+            <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
+            <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+        </operation>
+
+        <operation name="describeSObjects">
+            <documentation>Describe a number sObjects</documentation>
+            <input message="tns:describeSObjectsRequest"/>
+            <output message="tns:describeSObjectsResponse"/>
+            <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
+            <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+        </operation>
+
+        <operation name="describeGlobal">
+            <documentation>Describe the Global state</documentation>
+            <input message="tns:describeGlobalRequest"/>
+            <output message="tns:describeGlobalResponse"/>
+            <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+        </operation>
+
+        <operation name="describeLayout">
+            <documentation>Describe the layout of an sObject</documentation>
+            <input message="tns:describeLayoutRequest"/>
+            <output message="tns:describeLayoutResponse"/>
+            <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
+            <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+            <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
+        </operation>
+
+        <operation name="describeSoftphoneLayout">
+            <documentation>Describe the layout of the SoftPhone</documentation>
+            <input message="tns:describeSoftphoneLayoutRequest"/>
+            <output message="tns:describeSoftphoneLayoutResponse"/>
+            <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+        </operation>
+
+        <operation name="describeTabs">
+            <documentation>Describe the tabs that appear on a users page</documentation>
+            <input message="tns:describeTabsRequest"/>
+            <output message="tns:describeTabsResponse"/>
+            <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+        </operation>
+
+        <operation name="create">
+            <documentation>Create a set of new sObjects</documentation>
+            <input message="tns:createRequest"/>
+            <output message="tns:createResponse"/>
+            <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
+            <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+            <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
+            <fault message="tns:InvalidFieldFault" name="InvalidFieldFault"/>
+        </operation>
+
+        <operation name="update">
+            <documentation>Update a set of sObjects</documentation>
+            <input message="tns:updateRequest"/>
+            <output message="tns:updateResponse"/>
+            <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
+            <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+            <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
+            <fault message="tns:InvalidFieldFault" name="InvalidFieldFault"/>
+        </operation>
+
+        <operation name="upsert">
+            <documentation>Update or insert a set of sObjects based on object id</documentation>
+            <input message="tns:upsertRequest"/>
+            <output message="tns:upsertResponse"/>
+            <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
+            <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+            <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
+            <fault message="tns:InvalidFieldFault" name="InvalidFieldFault"/>
+        </operation>
+
+        <operation name="merge">
+            <documentation>Merge and update a set of sObjects based on object id</documentation>
+            <input message="tns:mergeRequest"/>
+            <output message="tns:mergeResponse"/>
+            <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
+            <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+            <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
+            <fault message="tns:InvalidFieldFault" name="InvalidFieldFault"/>
+        </operation>
+
+        <operation name="delete">
+            <documentation>Delete a set of sObjects</documentation>
+            <input message="tns:deleteRequest"/>
+            <output message="tns:deleteResponse"/>
+            <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+        </operation>
+
+        <operation name="undelete">
+            <documentation>Undelete a set of sObjects</documentation>
+            <input message="tns:undeleteRequest"/>
+            <output message="tns:undeleteResponse"/>
+            <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+        </operation>
+
+        <operation name="emptyRecycleBin">
+            <documentation>Empty a set of sObjects from the recycle bin</documentation>
+            <input message="tns:emptyRecycleBinRequest"/>
+            <output message="tns:emptyRecycleBinResponse"/>
+            <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+        </operation>
+
+        <operation name="retrieve">
+            <documentation>Get a set of sObjects</documentation>
+            <input message="tns:retrieveRequest"/>
+            <output message="tns:retrieveResponse"/>
+            <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
+            <fault message="tns:InvalidFieldFault" name="InvalidFieldFault"/>
+            <fault message="tns:MalformedQueryFault" name="MalformedQueryFault"/>
+            <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+            <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
+        </operation>
+
+        <operation name="process">
+            <documentation>Submit an entity to a workflow process or process a workitem</documentation>
+            <input message="tns:processRequest"/>
+            <output message="tns:processResponse"/>
+            <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+            <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
+        </operation>
+
+        <operation name="convertLead">
+            <documentation>convert a set of leads</documentation>
+            <input message="tns:convertLeadRequest"/>
+            <output message="tns:convertLeadResponse"/>
+            <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+        </operation>
+
+        <operation name="logout">
+            <documentation>Logout the current user, invalidating the current session.</documentation>
+            <input message="tns:logoutRequest"/>
+            <output message="tns:logoutResponse"/>
+            <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+        </operation>
+
+        <operation name="invalidateSessions">
+            <documentation>Logs out and invalidates session ids</documentation>
+            <input message="tns:invalidateSessionsRequest"/>
+            <output message="tns:invalidateSessionsResponse"/>
+            <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+        </operation>
+
+        <operation name="getDeleted">
+            <documentation>Get the IDs for deleted sObjects</documentation>
+            <input message="tns:getDeletedRequest"/>
+            <output message="tns:getDeletedResponse"/>
+            <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
+            <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+        </operation>
+
+        <operation name="getUpdated">
+            <documentation>Get the IDs for updated sObjects</documentation>
+            <input message="tns:getUpdatedRequest"/>
+            <output message="tns:getUpdatedResponse"/>
+            <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
+            <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+        </operation>
+
+        <operation name="query">
+            <documentation>Create a Query Cursor</documentation>
+            <input message="tns:queryRequest"/>
+            <output message="tns:queryResponse"/>
+            <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
+            <fault message="tns:InvalidFieldFault" name="InvalidFieldFault"/>
+            <fault message="tns:MalformedQueryFault" name="MalformedQueryFault"/>
+            <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
+            <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+            <fault message="tns:InvalidQueryLocatorFault" name="InvalidQueryLocatorFault"/>
+        </operation>
+
+        <operation name="queryAll">
+            <documentation>Create a Query Cursor, including deleted sObjects</documentation>
+            <input message="tns:queryAllRequest"/>
+            <output message="tns:queryAllResponse"/>
+            <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
+            <fault message="tns:InvalidFieldFault" name="InvalidFieldFault"/>
+            <fault message="tns:MalformedQueryFault" name="MalformedQueryFault"/>
+            <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
+            <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+            <fault message="tns:InvalidQueryLocatorFault" name="InvalidQueryLocatorFault"/>
+        </operation>
+
+        <operation name="queryMore">
+            <documentation>Gets the next batch of sObjects from a query</documentation>
+            <input message="tns:queryMoreRequest"/>
+            <output message="tns:queryMoreResponse"/>
+            <fault message="tns:InvalidQueryLocatorFault" name="InvalidQueryLocatorFault"/>
+            <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+            <fault message="tns:InvalidFieldFault" name="InvalidFieldFault"/>
+        </operation>
+
+        <operation name="search">
+            <documentation>Search for sObjects</documentation>
+            <input message="tns:searchRequest"/>
+            <output message="tns:searchResponse"/>
+            <fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
+            <fault message="tns:InvalidFieldFault" name="InvalidFieldFault"/>
+            <fault message="tns:MalformedSearchFault" name="MalformedSearchFault"/>
+            <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+        </operation>
+
+        <operation name="getServerTimestamp">
+            <documentation>Gets server timestamp</documentation>
+            <input message="tns:getServerTimestampRequest"/>
+            <output message="tns:getServerTimestampResponse"/>
+            <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+        </operation>
+
+        <operation name="setPassword">
+            <documentation>Set a user's password</documentation>
+            <input message="tns:setPasswordRequest"/>
+            <output message="tns:setPasswordResponse"/>
+            <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
+            <fault message="tns:InvalidNewPasswordFault" name="InvalidNewPasswordFault"/>
+            <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+        </operation>
+
+        <operation name="resetPassword">
+            <documentation>Reset a user's password</documentation>
+            <input message="tns:resetPasswordRequest"/>
+            <output message="tns:resetPasswordResponse"/>
+            <fault message="tns:InvalidIdFault" name="InvalidIdFault"/>
+            <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+        </operation>
+
+        <operation name="getUserInfo">
+            <documentation>Returns standard information relevant to the current user</documentation>
+            <input message="tns:getUserInfoRequest"/>
+            <output message="tns:getUserInfoResponse"/>
+            <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+        </operation>
+
+        <operation name="sendEmail">
+            <documentation>Send outbound email</documentation>
+            <input message="tns:sendEmailRequest"/>
+            <output message="tns:sendEmailResponse"/>
+            <fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
+        </operation>
+
+    </portType>
+
+    <!-- Soap Binding -->
+    <binding name="SoapBinding" type="tns:Soap">
+        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+        <operation name="login">
+            <soap:operation soapAction=""/>
+            <input>
+                <soap:header use="literal" message="tns:Header" part="LoginScopeHeader"/>
+                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+                <soap:body parts="parameters" use="literal"/>
+            </input>
+            <output>
+                <soap:body use="literal"/>
+            </output>
+            <fault name="LoginFault">
+                <soap:fault name="LoginFault" use="literal"/>
+            </fault>
+            <fault name="UnexpectedErrorFault">
+                <soap:fault name="UnexpectedErrorFault" use="literal"/>
+            </fault>
+            <fault name="InvalidIdFault">
+                <soap:fault name="InvalidIdFault" use="literal"/>
+            </fault>
+        </operation>
+        <operation name="describeSObject">
+            <soap:operation soapAction=""/>
+            <input>
+                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+                <soap:header use="literal" message="tns:Header" part="PackageVersionHeader"/>
+                <soap:header use="literal" message="tns:Header" part="LocaleOptions"/>
+                <soap:body parts="parameters" use="literal"/>
+            </input>
+            <output>
+                <soap:body use="literal"/>
+            </output>
+            <fault name="InvalidSObjectFault">
+                <soap:fault name="InvalidSObjectFault" use="literal"/>
+            </fault>
+            <fault name="UnexpectedErrorFault">
+                <soap:fault name="UnexpectedErrorFault" use="literal"/>
+            </fault>
+        </operation>
+        <operation name="describeSObjects">
+            <soap:operation soapAction=""/>
+            <input>
+                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+                <soap:header use="literal" message="tns:Header" part="PackageVersionHeader"/>
+                <soap:header use="literal" message="tns:Header" part="LocaleOptions"/>
+                <soap:body parts="parameters" use="literal"/>
+            </input>
+            <output>
+                <soap:body use="literal"/>
+            </output>
+            <fault name="InvalidSObjectFault">
+                <soap:fault name="InvalidSObjectFault" use="literal"/>
+            </fault>
+            <fault name="UnexpectedErrorFault">
+                <soap:fault name="UnexpectedErrorFault" use="literal"/>
+            </fault>
+        </operation>
+        <operation name="describeGlobal">
+            <soap:operation soapAction=""/>
+            <input>
+                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+                <soap:header use="literal" message="tns:Header" part="PackageVersionHeader"/>
+                <soap:body parts="parameters" use="literal"/>
+            </input>
+            <output>
+                <soap:body use="literal"/>
+            </output>
+            <fault name="UnexpectedErrorFault">
+                <soap:fault name="UnexpectedErrorFault" use="literal"/>
+            </fault>
+        </operation>
+        <operation name="describeLayout">
+            <soap:operation soapAction=""/>
+            <input>
+                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+                <soap:header use="literal" message="tns:Header" part="PackageVersionHeader"/>
+                <soap:body parts="parameters" use="literal"/>
+            </input>
+            <output>
+                <soap:body use="literal"/>
+            </output>
+            <fault name="InvalidSObjectFault">
+                <soap:fault name="InvalidSObjectFault" use="literal"/>
+            </fault>
+            <fault name="UnexpectedErrorFault">
+                <soap:fault name="UnexpectedErrorFault" use="literal"/>
+            </fault>
+            <fault name="InvalidIdFault">
+                <soap:fault name="InvalidIdFault" use="literal"/>
+            </fault>
+        </operation>
+        <operation name="describeSoftphoneLayout">
+            <soap:operation soapAction=""/>
+            <input>
+                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+                <soap:header use="literal" message="tns:Header" part="PackageVersionHeader"/>
+                <soap:body parts="parameters" use="literal"/>
+            </input>
+            <output>
+                <soap:body use="literal"/>
+            </output>
+            <fault name="UnexpectedErrorFault">
+                <soap:fault name="UnexpectedErrorFault" use="literal"/>
+            </fault>
+        </operation>
+        <operation name="describeTabs">
+            <soap:operation soapAction=""/>
+            <input>
+                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+                <soap:header use="literal" message="tns:Header" part="PackageVersionHeader"/>
+                <soap:body parts="parameters" use="literal"/>
+            </input>
+            <output>
+                <soap:body use="literal"/>
+            </output>
+            <fault name="UnexpectedErrorFault">
+                <soap:fault name="UnexpectedErrorFault" use="literal"/>
+            </fault>
+        </operation>
+        <operation name="create">
+            <soap:operation soapAction=""/>
+            <input>
+                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+                <soap:header use="literal" message="tns:Header" part="AssignmentRuleHeader"/>
+                <soap:header use="literal" message="tns:Header" part="MruHeader"/>
+                <soap:header use="literal" message="tns:Header" part="AllowFieldTruncationHeader"/>
+                <soap:header use="literal" message="tns:Header" part="DebuggingHeader"/>
+                <soap:header use="literal" message="tns:Header" part="PackageVersionHeader"/>
+                <soap:header use="literal" message="tns:Header" part="EmailHeader"/>
+                <soap:body parts="parameters" use="literal"/>
+            </input>
+            <output>
+                <soap:header use="literal" message="tns:Header" part="DebuggingInfo"/>
+                <soap:body use="literal"/>
+            </output>
+            <fault name="InvalidSObjectFault">
+                <soap:fault name="InvalidSObjectFault" use="literal"/>
+            </fault>
+            <fault name="UnexpectedErrorFault">
+                <soap:fault name="UnexpectedErrorFault" use="literal"/>
+            </fault>
+            <fault name="InvalidIdFault">
+                <soap:fault name="InvalidIdFault" use="literal"/>
+            </fault>
+            <fault name="InvalidFieldFault">
+                <soap:fault name="InvalidFieldFault" use="literal"/>
+            </fault>
+        </operation>
+        <operation name="update">
+            <soap:operation soapAction=""/>
+            <input>
+                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+                <soap:header use="literal" message="tns:Header" part="AssignmentRuleHeader"/>
+                <soap:header use="literal" message="tns:Header" part="MruHeader"/>
+                <soap:header use="literal" message="tns:Header" part="AllowFieldTruncationHeader"/>
+                <soap:header use="literal" message="tns:Header" part="DebuggingHeader"/>
+                <soap:header use="literal" message="tns:Header" part="PackageVersionHeader"/>
+                <soap:header use="literal" message="tns:Header" part="EmailHeader"/>
+                <soap:body parts="parameters" use="literal"/>
+            </input>
+            <output>
+                <soap:header use="literal" message="tns:Header" part="DebuggingInfo"/>
+                <soap:body use="literal"/>
+            </output>
+            <fault name="InvalidSObjectFault">
+                <soap:fault name="InvalidSObjectFault" use="literal"/>
+            </fault>
+            <fault name="UnexpectedErrorFault">
+                <soap:fault name="UnexpectedErrorFault" use="literal"/>
+            </fault>
+            <fault name="InvalidIdFault">
+                <soap:fault name="InvalidIdFault" use="literal"/>
+            </fault>
+            <fault name="InvalidFieldFault">
+                <soap:fault name="InvalidFieldFault" use="literal"/>
+            </fault>
+        </operation>
+        <operation name="upsert">
+            <soap:operation soapAction=""/>
+            <input>
+                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+                <soap:header use="literal" message="tns:Header" part="AssignmentRuleHeader"/>
+                <soap:header use="literal" message="tns:Header" part="MruHeader"/>
+                <soap:header use="literal" message="tns:Header" part="AllowFieldTruncationHeader"/>
+                <soap:header use="literal" message="tns:Header" part="DebuggingHeader"/>
+                <soap:header use="literal" message="tns:Header" part="PackageVersionHeader"/>
+                <soap:header use="literal" message="tns:Header" part="EmailHeader"/>
+                <soap:body parts="parameters" use="literal"/>
+            </input>
+            <output>
+                <soap:header use="literal" message="tns:Header" part="DebuggingInfo"/>
+                <soap:body use="literal"/>
+            </output>
+            <fault name="InvalidSObjectFault">
+                <soap:fault name="InvalidSObjectFault" use="literal"/>
+            </fault>
+            <fault name="UnexpectedErrorFault">
+                <soap:fault name="UnexpectedErrorFault" use="literal"/>
+            </fault>
+            <fault name="InvalidIdFault">
+                <soap:fault name="InvalidIdFault" use="literal"/>
+            </fault>
+            <fault name="InvalidFieldFault">
+                <soap:fault name="InvalidFieldFault" use="literal"/>
+            </fault>
+        </operation>
+        <operation name="merge">
+            <soap:operation soapAction=""/>
+            <input>
+                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+                <soap:header use="literal" message="tns:Header" part="AssignmentRuleHeader"/>
+                <soap:header use="literal" message="tns:Header" part="MruHeader"/>
+                <soap:header use="literal" message="tns:Header" part="AllowFieldTruncationHeader"/>
+                <soap:header use="literal" message="tns:Header" part="DebuggingHeader"/>
+                <soap:header use="literal" message="tns:Header" part="PackageVersionHeader"/>
+                <soap:header use="literal" message="tns:Header" part="EmailHeader"/>
+                <soap:body parts="parameters" use="literal"/>
+            </input>
+            <output>
+                <soap:header use="literal" message="tns:Header" part="DebuggingInfo"/>
+                <soap:body use="literal"/>
+            </output>
+            <fault name="InvalidSObjectFault">
+                <soap:fault name="InvalidSObjectFault" use="literal"/>
+            </fault>
+            <fault name="UnexpectedErrorFault">
+                <soap:fault name="UnexpectedErrorFault" use="literal"/>
+            </fault>
+            <fault name="InvalidIdFault">
+                <soap:fault name="InvalidIdFault" use="literal"/>
+            </fault>
+            <fault name="InvalidFieldFault">
+                <soap:fault name="InvalidFieldFault" use="literal"/>
+            </fault>
+        </operation>
+        <operation name="delete">
+            <soap:operation soapAction=""/>
+            <input>
+                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+                <soap:header use="literal" message="tns:Header" part="PackageVersionHeader"/>
+                <soap:header use="literal" message="tns:Header" part="UserTerritoryDeleteHeader"/>
+                <soap:header use="literal" message="tns:Header" part="EmailHeader"/>
+                <soap:header use="literal" message="tns:Header" part="AllowFieldTruncationHeader"/>
+                <soap:header use="literal" message="tns:Header" part="DebuggingHeader"/>
+                <soap:body parts="parameters" use="literal"/>
+            </input>
+            <output>
+                <soap:header use="literal" message="tns:Header" part="DebuggingInfo"/>
+                <soap:body use="literal"/>
+            </output>
+            <fault name="UnexpectedErrorFault">
+                <soap:fault name="UnexpectedErrorFault" use="literal"/>
+            </fault>
+        </operation>
+        <operation name="undelete">
+            <soap:operation soapAction=""/>
+            <input>
+                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+                <soap:header use="literal" message="tns:Header" part="AllowFieldTruncationHeader"/>
+                <soap:header use="literal" message="tns:Header" part="DebuggingHeader"/>
+                <soap:header use="literal" message="tns:Header" part="PackageVersionHeader"/>
+                <soap:body parts="parameters" use="literal"/>
+            </input>
+            <output>
+                <soap:header use="literal" message="tns:Header" part="DebuggingInfo"/>
+                <soap:body use="literal"/>
+            </output>
+            <fault name="UnexpectedErrorFault">
+                <soap:fault name="UnexpectedErrorFault" use="literal"/>
+            </fault>
+        </operation>
+        <operation name="emptyRecycleBin">
+            <soap:operation soapAction=""/>
+            <input>
+                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+                <soap:body parts="parameters" use="literal"/>
+            </input>
+            <output>
+                <soap:body use="literal"/>
+            </output>
+            <fault name="UnexpectedErrorFault">
+                <soap:fault name="UnexpectedErrorFault" use="literal"/>
+            </fault>
+        </operation>
+        <operation name="retrieve">
+            <soap:operation soapAction=""/>
+            <input>
+                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+                <soap:header use="literal" message="tns:Header" part="QueryOptions"/>
+                <soap:header use="literal" message="tns:Header" part="MruHeader"/>
+                <soap:header use="literal" message="tns:Header" part="PackageVersionHeader"/>
+                <soap:body parts="parameters" use="literal"/>
+            </input>
+            <output>
+                <soap:body use="literal"/>
+            </output>
+            <fault name="InvalidSObjectFault">
+                <soap:fault name="InvalidSObjectFault" use="literal"/>
+            </fault>
+            <fault name="InvalidFieldFault">
+                <soap:fault name="InvalidFieldFault" use="literal"/>
+            </fault>
+            <fault name="MalformedQueryFault">
+                <soap:fault name="MalformedQueryFault" use="literal"/>
+            </fault>
+            <fault name="UnexpectedErrorFault">
+                <soap:fault name="UnexpectedErrorFault" use="literal"/>
+            </fault>
+            <fault name="InvalidIdFault">
+                <soap:fault name="InvalidIdFault" use="literal"/>
+            </fault>
+        </operation>
+        <operation name="process">
+            <soap:operation soapAction=""/>
+            <input>
+                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+                <soap:header use="literal" message="tns:Header" part="AllowFieldTruncationHeader"/>
+                <soap:header use="literal" message="tns:Header" part="DebuggingHeader"/>
+                <soap:header use="literal" message="tns:Header" part="PackageVersionHeader"/>
+                <soap:body parts="parameters" use="literal"/>
+            </input>
+            <output>
+                <soap:header use="literal" message="tns:Header" part="DebuggingInfo"/>
+                <soap:body use="literal"/>
+            </output>
+            <fault name="UnexpectedErrorFault">
+                <soap:fault name="UnexpectedErrorFault" use="literal"/>
+            </fault>
+            <fault name="InvalidIdFault">
+                <soap:fault name="InvalidIdFault" use="literal"/>
+            </fault>
+        </operation>
+        <operation name="convertLead">
+            <soap:operation soapAction=""/>
+            <input>
+                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+                <soap:header use="literal" message="tns:Header" part="AllowFieldTruncationHeader"/>
+                <soap:header use="literal" message="tns:Header" part="DebuggingHeader"/>
+                <soap:header use="literal" message="tns:Header" part="PackageVersionHeader"/>
+                <soap:body parts="parameters" use="literal"/>
+            </input>
+            <output>
+                <soap:header use="literal" message="tns:Header" part="DebuggingInfo"/>
+                <soap:body use="literal"/>
+            </output>
+            <fault name="UnexpectedErrorFault">
+                <soap:fault name="UnexpectedErrorFault" use="literal"/>
+            </fault>
+        </operation>
+        <operation name="logout">
+            <soap:operation soapAction=""/>
+            <input>
+                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+                <soap:body parts="parameters" use="literal"/>
+            </input>
+            <output>
+                <soap:body use="literal"/>
+            </output>
+            <fault name="UnexpectedErrorFault">
+                <soap:fault name="UnexpectedErrorFault" use="literal"/>
+            </fault>
+        </operation>
+        <operation name="invalidateSessions">
+            <soap:operation soapAction=""/>
+            <input>
+                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+                <soap:body parts="parameters" use="literal"/>
+            </input>
+            <output>
+                <soap:body use="literal"/>
+            </output>
+            <fault name="UnexpectedErrorFault">
+                <soap:fault name="UnexpectedErrorFault" use="literal"/>
+            </fault>
+        </operation>
+        <operation name="getDeleted">
+            <soap:operation soapAction=""/>
+            <input>
+                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+                <soap:body parts="parameters" use="literal"/>
+            </input>
+            <output>
+                <soap:body use="literal"/>
+            </output>
+            <fault name="InvalidSObjectFault">
+                <soap:fault name="InvalidSObjectFault" use="literal"/>
+            </fault>
+            <fault name="UnexpectedErrorFault">
+                <soap:fault name="UnexpectedErrorFault" use="literal"/>
+            </fault>
+        </operation>
+        <operation name="getUpdated">
+            <soap:operation soapAction=""/>
+            <input>
+                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+                <soap:body parts="parameters" use="literal"/>
+            </input>
+            <output>
+                <soap:body use="literal"/>
+            </output>
+            <fault name="InvalidSObjectFault">
+                <soap:fault name="InvalidSObjectFault" use="literal"/>
+            </fault>
+            <fault name="UnexpectedErrorFault">
+                <soap:fault name="UnexpectedErrorFault" use="literal"/>
+            </fault>
+        </operation>
+        <operation name="query">
+            <soap:operation soapAction=""/>
+            <input>
+                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+                <soap:header use="literal" message="tns:Header" part="QueryOptions"/>
+                <soap:header use="literal" message="tns:Header" part="MruHeader"/>
+                <soap:header use="literal" message="tns:Header" part="PackageVersionHeader"/>
+                <soap:body parts="parameters" use="literal"/>
+            </input>
+            <output>
+                <soap:body use="literal"/>
+            </output>
+            <fault name="InvalidSObjectFault">
+                <soap:fault name="InvalidSObjectFault" use="literal"/>
+            </fault>
+            <fault name="InvalidFieldFault">
+                <soap:fault name="InvalidFieldFault" use="literal"/>
+            </fault>
+            <fault name="MalformedQueryFault">
+                <soap:fault name="MalformedQueryFault" use="literal"/>
+            </fault>
+            <fault name="InvalidIdFault">
+                <soap:fault name="InvalidIdFault" use="literal"/>
+            </fault>
+            <fault name="UnexpectedErrorFault">
+                <soap:fault name="UnexpectedErrorFault" use="literal"/>
+            </fault>
+            <fault name="InvalidQueryLocatorFault">
+                <soap:fault name="InvalidQueryLocatorFault" use="literal"/>
+            </fault>
+        </operation>
+        <operation name="queryAll">
+            <soap:operation soapAction=""/>
+            <input>
+                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+                <soap:header use="literal" message="tns:Header" part="QueryOptions"/>
+                <soap:body parts="parameters" use="literal"/>
+            </input>
+            <output>
+                <soap:body use="literal"/>
+            </output>
+            <fault name="InvalidSObjectFault">
+                <soap:fault name="InvalidSObjectFault" use="literal"/>
+            </fault>
+            <fault name="InvalidFieldFault">
+                <soap:fault name="InvalidFieldFault" use="literal"/>
+            </fault>
+            <fault name="MalformedQueryFault">
+                <soap:fault name="MalformedQueryFault" use="literal"/>
+            </fault>
+            <fault name="InvalidIdFault">
+                <soap:fault name="InvalidIdFault" use="literal"/>
+            </fault>
+            <fault name="UnexpectedErrorFault">
+                <soap:fault name="UnexpectedErrorFault" use="literal"/>
+            </fault>
+            <fault name="InvalidQueryLocatorFault">
+                <soap:fault name="InvalidQueryLocatorFault" use="literal"/>
+            </fault>
+        </operation>
+        <operation name="queryMore">
+            <soap:operation soapAction=""/>
+            <input>
+                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+                <soap:header use="literal" message="tns:Header" part="QueryOptions"/>
+                <soap:body parts="parameters" use="literal"/>
+            </input>
+            <output>
+                <soap:body use="literal"/>
+            </output>
+            <fault name="InvalidQueryLocatorFault">
+                <soap:fault name="InvalidQueryLocatorFault" use="literal"/>
+            </fault>
+            <fault name="UnexpectedErrorFault">
+                <soap:fault name="UnexpectedErrorFault" use="literal"/>
+            </fault>
+            <fault name="InvalidFieldFault">
+                <soap:fault name="InvalidFieldFault" use="literal"/>
+            </fault>
+        </operation>
+        <operation name="search">
+            <soap:operation soapAction=""/>
+            <input>
+                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+                <soap:header use="literal" message="tns:Header" part="PackageVersionHeader"/>
+                <soap:body parts="parameters" use="literal"/>
+            </input>
+            <output>
+                <soap:body use="literal"/>
+            </output>
+            <fault name="InvalidSObjectFault">
+                <soap:fault name="InvalidSObjectFault" use="literal"/>
+            </fault>
+            <fault name="InvalidFieldFault">
+                <soap:fault name="InvalidFieldFault" use="literal"/>
+            </fault>
+            <fault name="MalformedSearchFault">
+                <soap:fault name="MalformedSearchFault" use="literal"/>
+            </fault>
+            <fault name="UnexpectedErrorFault">
+                <soap:fault name="UnexpectedErrorFault" use="literal"/>
+            </fault>
+        </operation>
+        <operation name="getServerTimestamp">
+            <soap:operation soapAction=""/>
+            <input>
+                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+                <soap:body parts="parameters" use="literal"/>
+            </input>
+            <output>
+                <soap:body use="literal"/>
+            </output>
+            <fault name="UnexpectedErrorFault">
+                <soap:fault name="UnexpectedErrorFault" use="literal"/>
+            </fault>
+        </operation>
+        <operation name="setPassword">
+            <soap:operation soapAction=""/>
+            <input>
+                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+                <soap:body parts="parameters" use="literal"/>
+            </input>
+            <output>
+                <soap:body use="literal"/>
+            </output>
+            <fault name="InvalidIdFault">
+                <soap:fault name="InvalidIdFault" use="literal"/>
+            </fault>
+            <fault name="InvalidNewPasswordFault">
+                <soap:fault name="InvalidNewPasswordFault" use="literal"/>
+            </fault>
+            <fault name="UnexpectedErrorFault">
+                <soap:fault name="UnexpectedErrorFault" use="literal"/>
+            </fault>
+        </operation>
+        <operation name="resetPassword">
+            <soap:operation soapAction=""/>
+            <input>
+                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+                <soap:header use="literal" message="tns:Header" part="EmailHeader"/>
+                <soap:body parts="parameters" use="literal"/>
+            </input>
+            <output>
+                <soap:body use="literal"/>
+            </output>
+            <fault name="InvalidIdFault">
+                <soap:fault name="InvalidIdFault" use="literal"/>
+            </fault>
+            <fault name="UnexpectedErrorFault">
+                <soap:fault name="UnexpectedErrorFault" use="literal"/>
+            </fault>
+        </operation>
+        <operation name="getUserInfo">
+            <soap:operation soapAction=""/>
+            <input>
+                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+                <soap:body parts="parameters" use="literal"/>
+            </input>
+            <output>
+                <soap:body use="literal"/>
+            </output>
+            <fault name="UnexpectedErrorFault">
+                <soap:fault name="UnexpectedErrorFault" use="literal"/>
+            </fault>
+        </operation>
+        <operation name="sendEmail">
+            <soap:operation soapAction=""/>
+            <input>
+                <soap:header use="literal" message="tns:Header" part="SessionHeader"/>
+                <soap:header use="literal" message="tns:Header" part="CallOptions"/>
+                <soap:body parts="parameters" use="literal"/>
+            </input>
+            <output>
+                <soap:body use="literal"/>
+            </output>
+            <fault name="UnexpectedErrorFault">
+                <soap:fault name="UnexpectedErrorFault" use="literal"/>
+            </fault>
+        </operation>
+
+    </binding>
+
+    <!-- Soap Service Endpoint -->
+    <service name="SforceService">
+        <documentation>Sforce SOAP API</documentation>
+        <port binding="tns:SoapBinding" name="Soap">
+            <soap:address location="https://www.salesforce.com/services/Soap/u/17.0"/>
+        </port>
+    </service>
+</definitions>
\ No newline at end of file


Property changes on: trunk/connectors/salesforce-api/src/main/resources/partner_v17.wsdl
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Deleted: trunk/connectors/sandbox/translator-yahoo/src/main/java/org/teiid/translator/yahoo/YahooCapabilities.java
===================================================================
--- trunk/connectors/sandbox/translator-yahoo/src/main/java/org/teiid/translator/yahoo/YahooCapabilities.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/sandbox/translator-yahoo/src/main/java/org/teiid/translator/yahoo/YahooCapabilities.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -1,61 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership.  Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- * 
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- * 
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package org.teiid.translator.yahoo;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.teiid.translator.BasicConnectorCapabilities;
-
-
-/**
- * Specifies the capabilities of this connector.  The Yahoo connector
- * supports only some basic criteria capability
- */
-public class YahooCapabilities extends BasicConnectorCapabilities {
-
-    public static final int YAHOO_MAX_SET_SIZE = 100;
-    
-    /**
-     * Construct the capabilities class 
-     */
-    public YahooCapabilities() {
-    }
-
-    public List getSupportedFunctions() {
-        return Collections.EMPTY_LIST;
-    }
-
-    public boolean supportsCompareCriteriaEquals() {
-        return true;
-    }
-
-    public boolean supportsInCriteria() {
-        return true;
-    }
-
-    public int getMaxInCriteriaSize() {
-        return YAHOO_MAX_SET_SIZE;
-    }
-
-}

Modified: trunk/connectors/sandbox/translator-yahoo/src/main/java/org/teiid/translator/yahoo/YahooExecution.java
===================================================================
--- trunk/connectors/sandbox/translator-yahoo/src/main/java/org/teiid/translator/yahoo/YahooExecution.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/sandbox/translator-yahoo/src/main/java/org/teiid/translator/yahoo/YahooExecution.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -47,7 +47,6 @@
 import org.teiid.logging.LogManager;
 import org.teiid.metadata.Column;
 import org.teiid.metadata.RuntimeMetadata;
-import org.teiid.translator.BasicExecution;
 import org.teiid.translator.ConnectorException;
 import org.teiid.translator.DataNotAvailableException;
 import org.teiid.translator.ResultSetExecution;
@@ -56,7 +55,7 @@
 /**
  * Represents the execution of a command.
  */
-public class YahooExecution extends BasicExecution implements ResultSetExecution {
+public class YahooExecution implements ResultSetExecution {
 
     public static final String JAVA_PROP_HTTP_PROXY_HOST = "http.proxyHost"; //$NON-NLS-1$
     public static final String JAVA_PROP_HTTP_PROXY_PORT = "http.proxyPort"; //$NON-NLS-1$

Modified: trunk/connectors/sandbox/translator-yahoo/src/main/java/org/teiid/translator/yahoo/YahooExecutionFactory.java
===================================================================
--- trunk/connectors/sandbox/translator-yahoo/src/main/java/org/teiid/translator/yahoo/YahooExecutionFactory.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/sandbox/translator-yahoo/src/main/java/org/teiid/translator/yahoo/YahooExecutionFactory.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -22,29 +22,44 @@
 
 package org.teiid.translator.yahoo;
 
+import java.util.Collections;
+import java.util.List;
+
 import org.teiid.language.QueryExpression;
 import org.teiid.language.Select;
 import org.teiid.metadata.RuntimeMetadata;
-import org.teiid.translator.BasicExecutionFactory;
-import org.teiid.translator.ConnectorCapabilities;
 import org.teiid.translator.ConnectorException;
 import org.teiid.translator.ExecutionContext;
+import org.teiid.translator.ExecutionFactory;
 import org.teiid.translator.ResultSetExecution;
 
-public class YahooExecutionFactory extends BasicExecutionFactory {
+public class YahooExecutionFactory extends ExecutionFactory {
 
+	public static final int YAHOO_MAX_SET_SIZE = 100;
+	
     @Override
     public void start() throws ConnectorException {
     }
 
     @Override
-    public Class<? extends ConnectorCapabilities> getDefaultCapabilities() {
-    	return YahooCapabilities.class;
-    }
-    
-    @Override
     public ResultSetExecution createResultSetExecution(QueryExpression command, ExecutionContext executionContext, RuntimeMetadata metadata, Object connectionFactory)
     		throws ConnectorException {
     	return new YahooExecution((Select)command, metadata);
     }    
+    
+    public List getSupportedFunctions() {
+        return Collections.EMPTY_LIST;
+    }
+
+    public boolean supportsCompareCriteriaEquals() {
+        return true;
+    }
+
+    public boolean supportsInCriteria() {
+        return true;
+    }
+
+    public int getMaxInCriteriaSize() {
+        return YAHOO_MAX_SET_SIZE;
+    }
 }

Modified: trunk/connectors/sandbox/translator-yahoo/src/main/resources/META-INF/jboss-beans.xml
===================================================================
--- trunk/connectors/sandbox/translator-yahoo/src/main/resources/META-INF/jboss-beans.xml	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/sandbox/translator-yahoo/src/main/resources/META-INF/jboss-beans.xml	2010-05-13 13:40:34 UTC (rev 2122)
@@ -10,7 +10,7 @@
       <constructor factoryMethod="createTemplateInfo">
          <factory bean="TranslatorDeploymentTemplateInfoFactory"/>
          <parameter class="java.lang.Class">org.teiid.templates.TranslatorTemplateInfo</parameter>
-         <parameter class="java.lang.Class">org.teiid.resource.adapter.yahoo.YahooExecutionFactory</parameter>
+         <parameter class="java.lang.Class">org.teiid.translator.yahoo.YahooExecutionFactory</parameter>
          <parameter class="java.lang.String">${project.artifactId}-${project.version}</parameter>
          <parameter class="java.lang.String">${project.description}</parameter>         
       </constructor>

Modified: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCBaseExecution.java
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCBaseExecution.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCBaseExecution.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -35,14 +35,14 @@
 import org.teiid.logging.LogConstants;
 import org.teiid.logging.LogManager;
 import org.teiid.logging.MessageLevel;
-import org.teiid.translator.BasicExecution;
 import org.teiid.translator.ConnectorException;
+import org.teiid.translator.Execution;
 import org.teiid.translator.ExecutionContext;
 
 
 /**
  */
-public abstract class JDBCBaseExecution extends BasicExecution  {
+public abstract class JDBCBaseExecution implements Execution  {
 
     // ===========================================================================================================================
     // Fields
@@ -50,8 +50,8 @@
 
     // Passed to constructor
     protected Connection connection;
-    protected Translator sqlTranslator;
     protected ExecutionContext context;
+    protected JDBCExecutionFactory executionFactory;
 
     // Derived from properties
     protected boolean trimString;
@@ -65,17 +65,18 @@
     // Constructors
     // ===========================================================================================================================
 
-    protected JDBCBaseExecution(Connection connection, ExecutionContext context, JDBCExecutionFactory env, Translator translator) {
+    protected JDBCBaseExecution(Connection connection, ExecutionContext context, JDBCExecutionFactory jef) {
         this.connection = connection;
-        this.sqlTranslator = translator;
         this.context = context;
 
-        trimString = env.isTrimStrings();
-        fetchSize = (env.getFetchSize() != -1)?env.getFetchSize():context.getBatchSize();
-        maxResultRows = env.getMaxResultRows();
+        this.executionFactory = jef;
+        
+        trimString = jef.isTrimStrings();
+        fetchSize = (jef.getFetchSize() != -1)?jef.getFetchSize():context.getBatchSize();
+        maxResultRows = jef.getMaxResultRows();
       
         //if the connector work needs to throw an excpetion, set the size plus 1
-        if (maxResultRows > 0 && env.isExceptionOnMaxRows()) {
+        if (maxResultRows > 0 && jef.isExceptionOnMaxRows()) {
         	maxResultRows++;
         }
         if (maxResultRows > 0) {
@@ -97,7 +98,7 @@
 	            	value = ((List<?>)value).get(row);
 	            }
 	            Class<?> paramType = paramValue.getType();
-	            sqlTranslator.bindValue(stmt, value, paramType, i+1);
+	            this.executionFactory.bindValue(stmt, value, paramType, i+1);
 	        }
 	        if (rowCount > 1) {
             	stmt.addBatch();
@@ -110,7 +111,7 @@
     // ===========================================================================================================================
 
     protected TranslatedCommand translateCommand(Command command) throws ConnectorException {
-        TranslatedCommand translatedCommand = new TranslatedCommand(context, sqlTranslator);
+        TranslatedCommand translatedCommand = new TranslatedCommand(context, this.executionFactory);
         translatedCommand.translateCommand(command);
 
         if (translatedCommand.getSql() != null && LogManager.isMessageToBeRecorded(LogConstants.CTX_CONNECTOR, MessageLevel.DETAIL)) {
@@ -199,10 +200,6 @@
         return this.connection;
     }
     
-    public Translator getSqlTranslator() {
-		return sqlTranslator;
-	}
-    
     public void addStatementWarnings() throws SQLException {
     	SQLWarning warning = this.statement.getWarnings();
     	while (warning != null) {

Deleted: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCCapabilities.java
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCCapabilities.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCCapabilities.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -1,331 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership.  Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- * 
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- * 
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package org.teiid.translator.jdbc;
-
-import java.util.Arrays;
-import java.util.List;
-
-import org.teiid.translator.BasicConnectorCapabilities;
-
-
-/**
- */
-public class JDBCCapabilities extends BasicConnectorCapabilities {
-    
-    /**
-     * 
-     */
-    public JDBCCapabilities() {
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#getSupportedFunctions()
-     */
-    public List<String> getSupportedFunctions() {
-        return Arrays.asList(new String[] { "+", "-", "*", "/" }); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-    }
-
-    /** 
-     * @see org.teiid.translator.BasicConnectorCapabilities#getMaxInCriteriaSize()
-     * @since 4.2
-     */
-    public int getMaxInCriteriaSize() {
-        return 1000;
-    }
-    
-    @Override
-    public boolean supportsGroupBy() {
-    	return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsAggregatesAvg()
-     */
-    public boolean supportsAggregatesAvg() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsAggregatesCount()
-     */
-    public boolean supportsAggregatesCount() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsAggregatesCountStar()
-     */
-    public boolean supportsAggregatesCountStar() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsAggregatesDistinct()
-     */
-    public boolean supportsAggregatesDistinct() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsAggregatesMax()
-     */
-    public boolean supportsAggregatesMax() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsAggregatesMin()
-     */
-    public boolean supportsAggregatesMin() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsAggregatesSum()
-     */
-    public boolean supportsAggregatesSum() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsAliasedGroup()
-     */
-    public boolean supportsAliasedGroup() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsBetweenCriteria()
-     */
-    public boolean supportsBetweenCriteria() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsCaseExpressions()
-     */
-    public boolean supportsCaseExpressions() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsCompareCriteriaEquals()
-     */
-    public boolean supportsCompareCriteriaEquals() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsCorrelatedSubqueries()
-     */
-    public boolean supportsCorrelatedSubqueries() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsExistsCriteria()
-     */
-    public boolean supportsExistsCriteria() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsFullOuterJoins()
-     */
-    public boolean supportsFullOuterJoins() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsInCriteria()
-     */
-    public boolean supportsInCriteria() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsInCriteriaSubquery()
-     */
-    public boolean supportsInCriteriaSubquery() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsIsNullCriteria()
-     */
-    public boolean supportsIsNullCriteria() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsLikeCriteria()
-     */
-    public boolean supportsLikeCriteria() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsLikeCriteriaEscapeCharacter()
-     */
-    public boolean supportsLikeCriteriaEscapeCharacter() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsNotCriteria()
-     */
-    public boolean supportsNotCriteria() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsOrCriteria()
-     */
-    public boolean supportsOrCriteria() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsOrderBy()
-     */
-    public boolean supportsOrderBy() {
-        return true;
-    }
-    
-    @Override
-    public boolean supportsOrderByUnrelated() {
-    	return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsOuterJoins()
-     */
-    public boolean supportsOuterJoins() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsQuantifiedCompareCriteriaAll()
-     */
-    public boolean supportsQuantifiedCompareCriteriaAll() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsScalarSubqueries()
-     */
-    public boolean supportsScalarSubqueries() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsSearchedCaseExpressions()
-     */
-    public boolean supportsSearchedCaseExpressions() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsSelectDistinct()
-     */
-    public boolean supportsSelectDistinct() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsSelfJoins()
-     */
-    public boolean supportsSelfJoins() {
-        return true;
-    }
-
-    /** 
-     * @see org.teiid.translator.ConnectorCapabilities#supportsInlineViews()
-     */
-    public boolean supportsInlineViews() {
-        return false;
-    }       
-    
-    /** 
-     * @see org.teiid.translator.ConnectorCapabilities#supportsQuantifiedCompareCriteriaSome()
-     */
-    public boolean supportsQuantifiedCompareCriteriaSome() {
-        return true;
-    }
-    
-    /** 
-     * @see org.teiid.translator.BasicConnectorCapabilities#supportsSetQueryOrderBy()
-     */
-    @Override
-    public boolean supportsSetQueryOrderBy() {
-        return true;
-    }
-    
-    /** 
-     * @see org.teiid.translator.ConnectorCapabilities#supportsUnions()
-     */
-    public boolean supportsUnions() {
-        return true;
-    }
-    
-    @Override
-    public boolean supportsBulkUpdate() {
-    	return true;
-    }
-    
-    @Override
-    public boolean supportsBatchedUpdates() {
-    	return true;
-    }
-    
-    @Override
-    public boolean supportsCompareCriteriaOrdered() {
-    	return true;
-    }
-    
-    @Override
-    public SupportedJoinCriteria getSupportedJoinCriteria() {
-    	return SupportedJoinCriteria.ANY;
-    }
-    
-    @Override
-    public boolean supportsHaving() {
-    	return true;
-    }
-    
-    @Override
-    public boolean supportsInnerJoins() {
-    	return true;
-    }
-    
-    @Override
-    public boolean supportsSelectExpression() {
-    	return true;
-    }
-    
-    @Override
-    public boolean supportsInsertWithQueryExpression() {
-    	return true;
-    }
-
-}

Modified: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCExecutionFactory.java
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCExecutionFactory.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCExecutionFactory.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -22,73 +22,143 @@
 
 package org.teiid.translator.jdbc;
 
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.sql.CallableStatement;
 import java.sql.Connection;
+import java.sql.DatabaseMetaData;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
 import java.sql.SQLException;
+import java.sql.Time;
+import java.sql.Timestamp;
+import java.text.MessageFormat;
+import java.util.Arrays;
+import java.util.Calendar;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.TimeZone;
 
 import javax.sql.DataSource;
 
-import org.teiid.core.TeiidException;
 import org.teiid.core.util.PropertiesUtils;
-import org.teiid.core.util.ReflectionHelper;
-import org.teiid.core.util.StringUtil;
+import org.teiid.language.Argument;
 import org.teiid.language.Call;
+import org.teiid.language.ColumnReference;
 import org.teiid.language.Command;
+import org.teiid.language.Expression;
+import org.teiid.language.Function;
+import org.teiid.language.LanguageObject;
+import org.teiid.language.Limit;
+import org.teiid.language.Literal;
 import org.teiid.language.QueryExpression;
+import org.teiid.language.SetQuery;
+import org.teiid.language.Argument.Direction;
+import org.teiid.logging.LogConstants;
+import org.teiid.logging.LogManager;
 import org.teiid.metadata.MetadataFactory;
 import org.teiid.metadata.RuntimeMetadata;
-import org.teiid.translator.BasicExecutionFactory;
-import org.teiid.translator.ConnectorCapabilities;
 import org.teiid.translator.ConnectorException;
 import org.teiid.translator.ExecutionContext;
+import org.teiid.translator.ExecutionFactory;
 import org.teiid.translator.MetadataProvider;
 import org.teiid.translator.ProcedureExecution;
 import org.teiid.translator.ResultSetExecution;
+import org.teiid.translator.SourceSystemFunctions;
 import org.teiid.translator.TranslatorProperty;
+import org.teiid.translator.TypeFacility;
 import org.teiid.translator.UpdateExecution;
 
 
 /**
  * JDBC implementation of Connector interface.
  */
-public class JDBCExecutionFactory extends BasicExecutionFactory implements MetadataProvider {
+public class JDBCExecutionFactory extends ExecutionFactory implements MetadataProvider {
+
+	public static final int DEFAULT_MAX_IN_CRITERIA = 1000;
+
+	public enum NullOrder {
+		HIGH,
+		LOW,
+		FIRST,
+		LAST
+	}
 	
-    private ConnectorCapabilities capabilities;
-    private Translator sqlTranslator;
+	// Because the retrieveValue() method will be hit for every value of 
+    // every JDBC result set returned, we do lots of weird special stuff here 
+    // to improve the performance (most importantly to remove big if/else checks
+    // of every possible type.  
+    
+    private static final Map<Class<?>, Integer> TYPE_CODE_MAP = new HashMap<Class<?>, Integer>();
+    
+    private static final int INTEGER_CODE = 0;
+    private static final int LONG_CODE = 1;
+    private static final int DOUBLE_CODE = 2;
+    private static final int BIGDECIMAL_CODE = 3;
+    private static final int SHORT_CODE = 4;
+    private static final int FLOAT_CODE = 5;
+    private static final int TIME_CODE = 6;
+    private static final int DATE_CODE = 7;
+    private static final int TIMESTAMP_CODE = 8;
+    private static final int BLOB_CODE = 9;
+    private static final int CLOB_CODE = 10;
+    private static final int BOOLEAN_CODE = 11;
+    
+    static {
+        TYPE_CODE_MAP.put(TypeFacility.RUNTIME_TYPES.INTEGER, new Integer(INTEGER_CODE));
+        TYPE_CODE_MAP.put(TypeFacility.RUNTIME_TYPES.LONG, new Integer(LONG_CODE));
+        TYPE_CODE_MAP.put(TypeFacility.RUNTIME_TYPES.DOUBLE, new Integer(DOUBLE_CODE));
+        TYPE_CODE_MAP.put(TypeFacility.RUNTIME_TYPES.BIG_DECIMAL, new Integer(BIGDECIMAL_CODE));
+        TYPE_CODE_MAP.put(TypeFacility.RUNTIME_TYPES.SHORT, new Integer(SHORT_CODE));
+        TYPE_CODE_MAP.put(TypeFacility.RUNTIME_TYPES.FLOAT, new Integer(FLOAT_CODE));
+        TYPE_CODE_MAP.put(TypeFacility.RUNTIME_TYPES.TIME, new Integer(TIME_CODE));
+        TYPE_CODE_MAP.put(TypeFacility.RUNTIME_TYPES.DATE, new Integer(DATE_CODE));
+        TYPE_CODE_MAP.put(TypeFacility.RUNTIME_TYPES.TIMESTAMP, new Integer(TIMESTAMP_CODE));
+        TYPE_CODE_MAP.put(TypeFacility.RUNTIME_TYPES.BLOB, new Integer(BLOB_CODE));
+        TYPE_CODE_MAP.put(TypeFacility.RUNTIME_TYPES.CLOB, new Integer(CLOB_CODE));
+        TYPE_CODE_MAP.put(TypeFacility.RUNTIME_TYPES.BOOLEAN, new Integer(BOOLEAN_CODE));
+        TYPE_CODE_MAP.put(TypeFacility.RUNTIME_TYPES.BYTE, new Integer(SHORT_CODE));
+    }
+	
+    private static final ThreadLocal<MessageFormat> COMMENT = new ThreadLocal<MessageFormat>() {
+    	protected MessageFormat initialValue() {
+    		return new MessageFormat("/*teiid sessionid:{0}, requestid:{1}.{2}*/ "); //$NON-NLS-1$
+    	}
+    };
+    public final static TimeZone DEFAULT_TIME_ZONE = TimeZone.getDefault();
+
+    private static final ThreadLocal<Calendar> CALENDAR = new ThreadLocal<Calendar>() {
+    	@Override
+    	protected Calendar initialValue() {
+    		return Calendar.getInstance();
+    	}
+    };
+    
+    private Map<String, FunctionModifier> functionModifiers = new HashMap<String, FunctionModifier>();
+	
 	private boolean useBindVariables;
 	private String databaseTimeZone;
-	private String extensionTranslationClassName;
 	private boolean trimStrings;
 	private boolean useCommentsInSourceQuery;
 	private int fetchSize;
+	
+	boolean initialConnection = true;
     
 	@Override
 	public void start() throws ConnectorException {
 		super.start();
-        capabilities = getTranslator().getConnectorCapabilities();
+		
+        String timeZone = getDatabaseTimeZone();
+        if(timeZone != null && timeZone.trim().length() > 0) {
+        	TimeZone tz = TimeZone.getTimeZone(timeZone);
+            if(!DEFAULT_TIME_ZONE.hasSameRules(tz)) {
+        		CALENDAR.set(Calendar.getInstance(tz));
+            }
+        }  		
     }
-	
-	public Translator getTranslator() throws ConnectorException {
-		if (this.sqlTranslator == null) {
-	        try {
-	        	String className = getExtensionTranslationClassName();
-	        	if (!StringUtil.isValid(className)) {
-	        		this.sqlTranslator = new Translator();
-	        	} else { 
-	        		this.sqlTranslator = (Translator)ReflectionHelper.create(className, null, Thread.currentThread().getContextClassLoader());
-	        	}
-	            sqlTranslator.initialize(this);
-	        } catch (TeiidException e) {
-	            throw new ConnectorException(e);
-			}
-		}
-		return this.sqlTranslator;
-	}	
     
-    @Override
-	public ConnectorCapabilities getCapabilities() {
-		return capabilities;
-	}
-    
 	@TranslatorProperty(name="UseBindVariables", display="Use Bind Variables", description="Use prepared statements and bind variables",advanced=true, defaultValue="false")
 	public boolean isUseBindVariables() {
 		return this.useBindVariables;
@@ -107,29 +177,6 @@
 		this.databaseTimeZone = databaseTimeZone;
 	}
 	
-	@TranslatorProperty(name="ExtensionTranslationClassName", display="Extension SQL Translation Class", required=true, 
-			defaultValue="org.teiid.translator.jdbc.translator.Translator", 
-			allowed= {"org.teiid.translator.jdbc.translator.Translator",
-			"org.teiid.translator.jdbc.access.AccessSQLTranslator",
-			"org.teiid.translator.jdbc.db2.DB2SQLTranslator",
-			"org.teiid.translator.jdbc.derby.DerbySQLTranslator",
-			"org.teiid.translator.jdbc.h2.H2Translator",
-			"org.teiid.translator.jdbc.hsql.HsqlTranslator",
-			"org.teiid.translator.jdbc.mysql.MySQLTranslator",
-			"org.teiid.translator.jdbc.mysql.MySQL5Translator",
-			"org.teiid.translator.jdbc.oracle.OracleSQLTranslator",
-			"org.teiid.translator.jdbc.postgresql.PostgreSQLTranslator", 
-			"org.teiid.translator.jdbc.sqlserver.SqlServerSQLTranslator",
-			"org.teiid.translator.jdbc.sybase.SybaseSQLTranslator"
-			})
-	public String getExtensionTranslationClassName() {
-		return this.extensionTranslationClassName;
-	}
-
-	public void setExtensionTranslationClassName(String extensionTranslationClassName) {
-		this.extensionTranslationClassName = extensionTranslationClassName;
-	}
-	
 	@TranslatorProperty(name="TrimStrings",display="Trim string flag", description="Right Trim fixed character types returned as Strings - note that the native type must be char or nchar and the source must support the rtrim function.",advanced=true, defaultValue="false")
 	public boolean isTrimStrings() {
 		return this.trimStrings;
@@ -170,8 +217,8 @@
 			DataSource ds = (DataSource)connectionFactory;
 			Connection conn = ds.getConnection();
 	    	//TODO: This is not correct; this should be only called once for connection creation    	
-	    	getTranslator().afterConnectionCreation(conn);
-	    	return new JDBCQueryExecution(command, conn, executionContext, this, getTranslator());
+	    	afterConnectionCreation(conn);
+	    	return new JDBCQueryExecution(command, conn, executionContext, this);
     	} catch(SQLException e) {
     		throw new ConnectorException(e);
     	}
@@ -184,8 +231,8 @@
 			DataSource ds = (DataSource)connectionFactory;
 			Connection conn = ds.getConnection();
 			//TODO: This is not correct; this should be only called once for connection creation    	
-			getTranslator().afterConnectionCreation(conn);
-			return new JDBCProcedureExecution(command, conn, executionContext, this, getTranslator());
+			afterConnectionCreation(conn);
+			return new JDBCProcedureExecution(command, conn, executionContext, this);
 		} catch (SQLException e) {
 			throw new ConnectorException(e);
 		}
@@ -199,8 +246,8 @@
 			Connection conn = ds.getConnection();
 			
 			//TODO: This is not correct; this should be only called once for connection creation
-			getTranslator().afterConnectionCreation(conn);
-			return new JDBCUpdateExecution(command, conn, executionContext, this, getTranslator());
+			afterConnectionCreation(conn);
+			return new JDBCUpdateExecution(command, conn, executionContext, this);
 		} catch (SQLException e) {
 			throw new ConnectorException(e);
 		}    
@@ -226,4 +273,841 @@
 			throw new ConnectorException(e);
 		}
 	}    
+	
+	@Override
+    public List<String> getSupportedFunctions() {
+        return getDefaultSupportedFunctions();
+    }
+
+	public List<String> getDefaultSupportedFunctions(){
+		return Arrays.asList(new String[] { "+", "-", "*", "/" }); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+	}
+	
+    @Override
+    public int getMaxInCriteriaSize() {
+        return DEFAULT_MAX_IN_CRITERIA;
+    }
+    
+    @Override
+    public boolean supportsGroupBy() {
+    	return true;
+    }
+
+    @Override
+    public boolean supportsAggregatesAvg() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsAggregatesCount() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsAggregatesCountStar() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsAggregatesDistinct() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsAggregatesMax() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsAggregatesMin() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsAggregatesSum() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsAliasedGroup() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsBetweenCriteria() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsCaseExpressions() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsCompareCriteriaEquals() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsCorrelatedSubqueries() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsExistsCriteria() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsFullOuterJoins() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsInCriteria() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsInCriteriaSubquery() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsIsNullCriteria() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsLikeCriteria() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsLikeCriteriaEscapeCharacter() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsNotCriteria() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsOrCriteria() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsOrderBy() {
+        return true;
+    }
+    
+    @Override
+    public boolean supportsOrderByUnrelated() {
+    	return true;
+    }
+
+    @Override
+    public boolean supportsOuterJoins() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsQuantifiedCompareCriteriaAll() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsScalarSubqueries() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsSearchedCaseExpressions() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsSelectDistinct() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsSelfJoins() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsInlineViews() {
+        return false;
+    }       
+    
+    @Override
+    public boolean supportsQuantifiedCompareCriteriaSome() {
+        return true;
+    }
+    
+    @Override
+    public boolean supportsSetQueryOrderBy() {
+        return true;
+    }
+    
+    @Override
+    public boolean supportsUnions() {
+        return true;
+    }
+    
+    @Override
+    public boolean supportsBulkUpdate() {
+    	return true;
+    }
+    
+    @Override
+    public boolean supportsBatchedUpdates() {
+    	return true;
+    }
+    
+    @Override
+    public boolean supportsCompareCriteriaOrdered() {
+    	return true;
+    }
+    
+    @Override
+    public SupportedJoinCriteria getSupportedJoinCriteria() {
+    	return SupportedJoinCriteria.ANY;
+    }
+    
+    @Override
+    public boolean supportsHaving() {
+    	return true;
+    }
+    
+    @Override
+    public boolean supportsInnerJoins() {
+    	return true;
+    }
+    
+    @Override
+    public boolean supportsSelectExpression() {
+    	return true;
+    }
+    
+    @Override
+    public boolean supportsInsertWithQueryExpression() {
+    	return true;
+    }	
+    
+    /**
+     * Gets the database calendar.  This will be set to the time zone
+     * specified by the property {@link JDBCPropertyNames#DATABASE_TIME_ZONE}, or
+     * the local time zone if none is specified. 
+     * @return
+     */
+    public Calendar getDatabaseCalendar() {
+    	return CALENDAR.get();
+    }
+    
+    /**
+     * Return a List of translated parts ({@link LanguageObject}s and Objects), or null
+     * if to rely on the default translation.  Override with care.
+     * @param command
+     * @param context
+     * @return
+     */
+    public List<?> translate(LanguageObject obj, ExecutionContext context) {
+		List<?> parts = null;
+    	if (obj instanceof Function) {
+    		Function function = (Function)obj;
+    		if (functionModifiers != null) {
+    			FunctionModifier modifier = functionModifiers.get(function.getName().toLowerCase());
+    			if (modifier != null) {
+    				parts = modifier.translate(function);
+    			}
+    		}
+    	} else if (obj instanceof Command) {
+    		parts = translateCommand((Command)obj, context);
+    	} else if (obj instanceof Limit) {
+    		parts = translateLimit((Limit)obj, context);
+    	} else if (obj instanceof ColumnReference) {
+    		ColumnReference elem = (ColumnReference)obj;
+			if (isTrimStrings() && elem.getType() == TypeFacility.RUNTIME_TYPES.STRING && elem.getMetadataObject() != null 
+					&& ("char".equalsIgnoreCase(elem.getMetadataObject().getNativeType()) || "nchar".equalsIgnoreCase(elem.getMetadataObject().getNativeType()))) { //$NON-NLS-1$ //$NON-NLS-2$
+				return Arrays.asList(getLanguageFactory().createFunction(SourceSystemFunctions.RTRIM, new Expression[] {elem}, TypeFacility.RUNTIME_TYPES.STRING));
+			}
+    	}
+    	return parts;
+    }
+    
+    /**
+     * Return a List of translated parts ({@link LanguageObject}s and Objects), or null
+     * if to rely on the default translation. 
+     * @param command
+     * @param context
+     * @return
+     */
+    public List<?> translateCommand(Command command, ExecutionContext context) {
+    	return null;
+    }
+
+    /**
+     * Return a List of translated parts ({@link LanguageObject}s and Objects), or null
+     * if to rely on the default translation. 
+     * @param limit
+     * @param context
+     * @return
+     */
+    public List<?> translateLimit(Limit limit, ExecutionContext context) {
+    	return null;
+    }
+    
+    /**
+     * Return a map of function name in lower case to FunctionModifier.
+     * @return Map of function name to FunctionModifier.
+     */
+    public Map<String, FunctionModifier> getFunctionModifiers() {
+    	return functionModifiers;
+    }
+    
+    /**
+     * Add the {@link FunctionModifier} to the set of known modifiers.
+     * @param name
+     * @param modifier
+     */
+    public void registerFunctionModifier(String name, FunctionModifier modifier) {
+    	this.functionModifiers.put(name, modifier);
+    }
+    
+    /**
+     * Subclasses should override this method to provide a different sql translation
+     * of the literal boolean value.  By default, a boolean literal is represented as:
+     * <code>'0'</code> or <code>'1'</code>.
+     * @param booleanValue Boolean value, never null
+     * @return Translated string
+     */
+    public String translateLiteralBoolean(Boolean booleanValue) {
+        if(booleanValue.booleanValue()) {
+            return "1"; //$NON-NLS-1$
+        }
+        return "0"; //$NON-NLS-1$
+    }
+
+    /**
+     * Subclasses should override this method to provide a different sql translation
+     * of the literal date value.  By default, a date literal is represented as:
+     * <code>{d '2002-12-31'}</code>
+     * @param dateValue Date value, never null
+     * @return Translated string
+     */
+    public String translateLiteralDate(java.sql.Date dateValue) {
+        return "{d '" + formatDateValue(dateValue) + "'}"; //$NON-NLS-1$ //$NON-NLS-2$
+    }
+
+    /**
+     * Subclasses should override this method to provide a different sql translation
+     * of the literal time value.  By default, a time literal is represented as:
+     * <code>{t '23:59:59'}</code>
+     * 
+     * See {@link JDBCExecutionFactory#hasTimeType()} to represent literal times as timestamps.
+     * 
+     * @param timeValue Time value, never null
+     * @return Translated string
+     */
+    public String translateLiteralTime(Time timeValue) {
+    	if (!hasTimeType()) {
+    		return "{ts '1970-01-01 " + formatDateValue(timeValue) + "'}"; //$NON-NLS-1$ //$NON-NLS-2$
+    	}
+        return "{t '" + formatDateValue(timeValue) + "'}"; //$NON-NLS-1$ //$NON-NLS-2$
+    }
+
+    /**
+     * Subclasses should override this method to provide a different sql translation
+     * of the literal timestamp value.  By default, a timestamp literal is
+     * represented as: <code>{ts '2002-12-31 23:59:59'}</code>.
+     * 
+     * See {@link JDBCExecutionFactory#getTimestampNanoPrecision()} to control the literal 
+     * precision. 
+     * 
+     * @param timestampValue Timestamp value, never null
+     * @return Translated string
+     */
+    public String translateLiteralTimestamp(Timestamp timestampValue) {
+        return "{ts '" + formatDateValue(timestampValue) + "'}"; //$NON-NLS-1$ //$NON-NLS-2$
+    }
+    
+    /**
+     * Format the dateObject (of type date, time, or timestamp) into a string
+     * using the DatabaseTimeZone format.
+     * @param dateObject
+     * @return Formatted string
+     */
+    public String formatDateValue(java.util.Date dateObject) {
+        if (dateObject instanceof Timestamp && getTimestampNanoPrecision() < 9) {
+        	Timestamp ts = (Timestamp)dateObject;
+        	Timestamp newTs = new Timestamp(ts.getTime());
+        	if (getTimestampNanoPrecision() > 0) {
+	        	int mask = (int)Math.pow(10, 9-getTimestampNanoPrecision());
+	        	newTs.setNanos(ts.getNanos()/mask*mask);
+        	} else {
+        		newTs.setNanos(0);
+        	}
+        	dateObject = newTs;
+        }
+        return getTypeFacility().convertDate(dateObject, DEFAULT_TIME_ZONE, getDatabaseCalendar(), dateObject.getClass()).toString();        
+    }    
+    
+    /**
+     * Returns true to indicate that SQL should include a comment
+     * indicating the session and request ids.
+     */
+    public boolean addSourceComment() {
+        return isUseCommentsInSourceQuery();
+    }   
+    
+    /**
+     * Indicates whether group alias should be of the form
+     * "...FROM groupA AS X" or "...FROM groupA X".  Certain
+     * data sources (such as Oracle) may not support the first
+     * form. 
+     * @return boolean
+     */
+    public boolean useAsInGroupAlias(){
+        return true;
+    }
+    
+    /**
+     * Use PreparedStatements (or CallableStatements) as
+     * appropriate for all commands.  Bind values will be 
+     * determined by the {@link BindValueVisitor}.  {@link Literal#setBindValue(boolean)}
+     * can be used to force a literal to be a bind value.  
+     */
+    public boolean usePreparedStatements() {
+    	return isUseBindVariables();
+    }
+    
+    /**
+     * Set to true to indicate that every branch of a set query
+     * should have parenthesis, i.e. (query) union (query)
+     * @return
+     */
+    public boolean useParensForSetQueries() {
+    	return false;
+    }
+    
+    /**
+     * Return false to indicate that time support should be emulated 
+     * with timestamps.
+     * @return
+     */
+    public boolean hasTimeType() {
+    	return true;
+    }
+    
+    /**
+     * Returns the name for a given {@link SetQuery.Operation}
+     * @param operation
+     * @return
+     */
+    public String getSetOperationString(SetQuery.Operation operation) {
+    	return operation.toString();
+    }
+    
+    /**
+     * Returns the source comment for 
+     * @param context
+     * @param command
+     * @return
+     */
+    public String getSourceComment(ExecutionContext context, Command command) {
+	    if (addSourceComment() && context != null) {
+            return COMMENT.get().format(new Object[] {context.getConnectionIdentifier(), context.getRequestIdentifier(), context.getPartIdentifier()});
+	    }
+	    return ""; //$NON-NLS-1$ 
+    }
+    
+    /**
+     * Override to return a name other than the default [group.]element
+     * @param group
+     * @param element
+     * @return
+     */
+    public String replaceElementName(String group, String element) {
+    	return null;
+    }
+    
+    /**
+     * Return the precision of timestamp literals.  Defaults to 9
+     * @return
+     */
+    public int getTimestampNanoPrecision() {
+    	return 9;
+    }
+    
+    /**
+     * This is a generic implementation. Because different databases handle
+     * stored procedures differently, subclasses should override this method
+     * if necessary.
+     */
+    public ResultSet executeStoredProcedure(CallableStatement statement, TranslatedCommand command, Class<?> returnType) throws SQLException {
+        List params = command.getPreparedValues();
+        int index = 1;
+        
+        if(returnType != null){
+            registerSpecificTypeOfOutParameter(statement, returnType, index++);
+        }
+        
+        Iterator iter = params.iterator();
+        while(iter.hasNext()){
+            Argument param = (Argument)iter.next();
+                    
+            if(param.getDirection() == Direction.INOUT){
+                registerSpecificTypeOfOutParameter(statement,param.getType(), index);
+            }else if(param.getDirection() == Direction.OUT){
+                registerSpecificTypeOfOutParameter(statement,param.getType(), index++);
+            }
+                    
+            if(param.getDirection() == Direction.IN || param.getDirection() == Direction.INOUT){
+                bindValue(statement, param.getArgumentValue().getValue(), param.getType(), index++);
+            }
+        }
+        boolean resultSetNext = statement.execute();
+        
+        while (!resultSetNext) {
+            int update_count = statement.getUpdateCount();
+            if (update_count == -1) {
+                break;
+            }            
+            resultSetNext = statement.getMoreResults();
+        }
+        return statement.getResultSet();
+    }
+
+    /**
+     * For registering specific output parameter types we need to translate these into the appropriate
+     * java.sql.Types output parameters
+     * We will need to match these up with the appropriate standard sql types
+     * @param cstmt
+     * @param parameter
+     * @throws SQLException
+     */
+    protected void registerSpecificTypeOfOutParameter(CallableStatement statement, Class<?> runtimeType, int index) throws SQLException {
+        int typeToSet = TypeFacility.getSQLTypeFromRuntimeType(runtimeType);
+        
+        statement.registerOutParameter(index,typeToSet);
+    }
+    
+    /**
+     * Sets prepared statement parameter i with param.
+     * 
+     * Performs special handling to translate dates using the database time zone and to
+     * translate biginteger, float, and char to JDBC safe objects.
+     *  
+     * @param stmt
+     * @param param
+     * @param paramType
+     * @param i
+     * @param cal
+     * @throws SQLException
+     */
+    public void bindValue(PreparedStatement stmt, Object param, Class<?> paramType, int i) throws SQLException {
+        int type = TypeFacility.getSQLTypeFromRuntimeType(paramType);
+                
+        if (param == null) {
+            stmt.setNull(i, type);
+            return;
+        } 
+        //if this is a Date object, then use the database calendar
+        if (paramType.equals(TypeFacility.RUNTIME_TYPES.DATE)) {
+            stmt.setDate(i,(java.sql.Date)param, getDatabaseCalendar());
+            return;
+        } 
+        if (paramType.equals(TypeFacility.RUNTIME_TYPES.TIME)) {
+            stmt.setTime(i,(java.sql.Time)param, getDatabaseCalendar());
+            return;
+        } 
+        if (paramType.equals(TypeFacility.RUNTIME_TYPES.TIMESTAMP)) {
+            stmt.setTimestamp(i,(java.sql.Timestamp)param, getDatabaseCalendar());
+            return;
+        }
+        //convert these the following to jdbc safe values
+        if (TypeFacility.RUNTIME_TYPES.BIG_INTEGER.equals(paramType)) {
+            param = new BigDecimal((BigInteger)param);
+        } else if (TypeFacility.RUNTIME_TYPES.FLOAT.equals(paramType)) {
+            param = new Double(((Float)param).doubleValue());
+        } else if (TypeFacility.RUNTIME_TYPES.CHAR.equals(paramType)) {
+            param = ((Character)param).toString();
+        }
+        stmt.setObject(i, param, type);
+    }
+    
+	/**
+	 * Retrieve the value on the current resultset row for the given column index.
+	 * @param results
+	 * @param columnIndex
+	 * @param expectedType
+	 * @return
+	 * @throws SQLException
+	 */
+    public Object retrieveValue(ResultSet results, int columnIndex, Class<?> expectedType) throws SQLException {
+        Integer code = TYPE_CODE_MAP.get(expectedType);
+        if(code != null) {
+            // Calling the specific methods here is more likely to get uniform (and fast) results from different
+            // data sources as the driver likely knows the best and fastest way to convert from the underlying
+            // raw form of the data to the expected type.  We use a switch with codes in order without gaps
+            // as there is a special bytecode instruction that treats this case as a map such that not every value 
+            // needs to be tested, which means it is very fast.
+            switch(code.intValue()) {
+                case INTEGER_CODE:  {
+                    int value = results.getInt(columnIndex);                    
+                    if(results.wasNull()) {
+                        return null;
+                    }
+                    return Integer.valueOf(value);
+                }
+                case LONG_CODE:  {
+                    long value = results.getLong(columnIndex);                    
+                    if(results.wasNull()) {
+                        return null;
+                    } 
+                    return Long.valueOf(value);
+                }                
+                case DOUBLE_CODE:  {
+                    double value = results.getDouble(columnIndex);                    
+                    if(results.wasNull()) {
+                        return null;
+                    } 
+                    return Double.valueOf(value);
+                }                
+                case BIGDECIMAL_CODE:  {
+                    return results.getBigDecimal(columnIndex); 
+                }
+                case SHORT_CODE:  {
+                    short value = results.getShort(columnIndex);                    
+                    if(results.wasNull()) {
+                        return null;
+                    }                    
+                    return Short.valueOf(value);
+                }
+                case FLOAT_CODE:  {
+                    float value = results.getFloat(columnIndex);                    
+                    if(results.wasNull()) {
+                        return null;
+                    } 
+                    return Float.valueOf(value);
+                }
+                case TIME_CODE: {
+            		return results.getTime(columnIndex, getDatabaseCalendar());
+                }
+                case DATE_CODE: {
+            		return results.getDate(columnIndex, getDatabaseCalendar());
+                }
+                case TIMESTAMP_CODE: {
+            		return results.getTimestamp(columnIndex, getDatabaseCalendar());
+                }
+    			case BLOB_CODE: {
+    				try {
+    					return results.getBlob(columnIndex);
+    				} catch (SQLException e) {
+    					// ignore
+    				}
+    				try {
+    					return results.getBytes(columnIndex);
+    				} catch (SQLException e) {
+    					// ignore
+    				}
+    				break;
+    			}
+    			case CLOB_CODE: {
+    				try {
+    					return results.getClob(columnIndex);
+    				} catch (SQLException e) {
+    					// ignore
+    				}
+    				break;
+    			}  
+    			case BOOLEAN_CODE: {
+    				return results.getBoolean(columnIndex);
+    			}
+            }
+        }
+
+        return results.getObject(columnIndex);
+    }
+
+    /**
+     * Retrieve the value for the given parameter index
+     * @param results
+     * @param parameterIndex
+     * @param expectedType
+     * @return
+     * @throws SQLException
+     */
+    public Object retrieveValue(CallableStatement results, int parameterIndex, Class expectedType) throws SQLException{
+        Integer code = TYPE_CODE_MAP.get(expectedType);
+        if(code != null) {
+            switch(code.intValue()) {
+                case INTEGER_CODE:  {
+                    int value = results.getInt(parameterIndex);                    
+                    if(results.wasNull()) {
+                        return null;
+                    }
+                    return Integer.valueOf(value);
+                }
+                case LONG_CODE:  {
+                    long value = results.getLong(parameterIndex);                    
+                    if(results.wasNull()) {
+                        return null;
+                    } 
+                    return Long.valueOf(value);
+                }                
+                case DOUBLE_CODE:  {
+                    double value = results.getDouble(parameterIndex);                    
+                    if(results.wasNull()) {
+                        return null;
+                    } 
+                    return new Double(value);
+                }                
+                case BIGDECIMAL_CODE:  {
+                    return results.getBigDecimal(parameterIndex); 
+                }
+                case SHORT_CODE:  {
+                    short value = results.getShort(parameterIndex);                    
+                    if(results.wasNull()) {
+                        return null;
+                    }                    
+                    return Short.valueOf(value);
+                }
+                case FLOAT_CODE:  {
+                    float value = results.getFloat(parameterIndex);                    
+                    if(results.wasNull()) {
+                        return null;
+                    } 
+                    return new Float(value);
+                }
+                case TIME_CODE: {
+            		return results.getTime(parameterIndex, getDatabaseCalendar());
+                }
+                case DATE_CODE: {
+            		return results.getDate(parameterIndex, getDatabaseCalendar());
+                }
+                case TIMESTAMP_CODE: {
+            		return results.getTimestamp(parameterIndex, getDatabaseCalendar());
+                }
+    			case BLOB_CODE: {
+    				try {
+    					return results.getBlob(parameterIndex);
+    				} catch (SQLException e) {
+    					// ignore
+    				}
+    				try {
+    					return results.getBytes(parameterIndex);
+    				} catch (SQLException e) {
+    					// ignore
+    				}
+    			}
+    			case CLOB_CODE: {
+    				try {
+    					return results.getClob(parameterIndex);
+    				} catch (SQLException e) {
+    					// ignore
+    				}
+    			}
+    			case BOOLEAN_CODE: {
+    				return results.getBoolean(parameterIndex);
+    			}
+            }
+        }
+
+        // otherwise fall through and call getObject() and rely on the normal
+		// translation routines
+		return results.getObject(parameterIndex);
+    }
+       
+    /**
+     * Called exactly once for this source.
+     * @param connection
+     */
+    protected void afterInitialConnectionCreation(Connection connection) {
+        // now dig some details about this driver/database for log.
+        try {
+            StringBuffer sb = new StringBuffer();
+            DatabaseMetaData dbmd = connection.getMetaData();
+            sb.append("Commit=").append(connection.getAutoCommit()); //$NON-NLS-1$
+            sb.append(";DatabaseProductName=").append(dbmd.getDatabaseProductName()); //$NON-NLS-1$
+            sb.append(";DatabaseProductVersion=").append(dbmd.getDatabaseProductVersion()); //$NON-NLS-1$
+            sb.append(";DriverMajorVersion=").append(dbmd.getDriverMajorVersion()); //$NON-NLS-1$
+            sb.append(";DriverMajorVersion=").append(dbmd.getDriverMinorVersion()); //$NON-NLS-1$
+            sb.append(";DriverName=").append(dbmd.getDriverName()); //$NON-NLS-1$
+            sb.append(";DriverVersion=").append(dbmd.getDriverVersion()); //$NON-NLS-1$
+            sb.append(";IsolationLevel=").append(dbmd.getDefaultTransactionIsolation()); //$NON-NLS-1$
+            
+            LogManager.logInfo(LogConstants.CTX_CONNECTOR, sb.toString());
+        } catch (SQLException e) {
+            String errorStr = JDBCPlugin.Util.getString("ConnectionListener.failed_to_report_jdbc_connection_details"); //$NON-NLS-1$            
+            LogManager.logInfo(LogConstants.CTX_CONNECTOR, errorStr); 
+        }
+    }
+    
+    /**
+     * Provides a hook to call source specific logic when 
+     * a connection is created.
+     * 
+     * defect request 13979 & 13978
+     */
+    public void afterConnectionCreation(Connection connection) {
+        if (initialConnection) {
+        	synchronized (this) {
+        		if (!initialConnection) {
+        			return;
+        		}
+	            initialConnection = false;
+	            afterInitialConnectionCreation(connection);
+        	}
+        }
+    }
+    
+
+    
+    /**
+     * Create the {@link SQLConversionVisitor} that will perform translation.  Typical custom
+     * JDBC connectors will not need to create custom conversion visitors, rather implementors 
+     * should override existing {@link JDBCExecutionFactory} methods.
+     * @return
+     */
+    public SQLConversionVisitor getSQLConversionVisitor() {
+    	return new SQLConversionVisitor(this);
+    }
+    
+    /**
+     * Set to true to indicate that every branch of a join
+     * should have parenthesis.
+     * @return
+     */
+    public boolean useParensForJoins() {
+    	return false;
+    }
+    
+    /**
+     * get the default null ordering
+     * @return
+     */
+    public NullOrder getDefaultNullOrder() {
+    	return NullOrder.LOW;
+    }
+    
+    /**
+     * 
+     * @return true if nulls high|low can be specified
+     */
+    public boolean supportsExplicitNullOrdering() {
+    	return false;
+    }
+    
+    /**
+     * 
+     * @return true if the limit clause is part of the select
+     */
+    public boolean useSelectLimit() {
+    	return false;
+    }    
 }

Modified: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCProcedureExecution.java
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCProcedureExecution.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCProcedureExecution.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -47,8 +47,8 @@
      * @param props
      * @param id
      */
-	public JDBCProcedureExecution(Command command, Connection connection, ExecutionContext context, JDBCExecutionFactory env, Translator translator) {
-        super(command, connection, context, env, translator);
+	public JDBCProcedureExecution(Command command, Connection connection, ExecutionContext context, JDBCExecutionFactory env) {
+        super(command, connection, context, env);
     }
 
     @Override
@@ -64,7 +64,7 @@
         try{
             //create parameter index map
             CallableStatement cstmt = getCallableStatement(sql);
-            this.results = sqlTranslator.executeStoredProcedure(cstmt, translatedComm, procedure.getReturnType());
+            this.results = this.executionFactory.executeStoredProcedure(cstmt, translatedComm, procedure.getReturnType());
             addStatementWarnings();
         }catch(SQLException e){
             throw new ConnectorException(e, JDBCPlugin.Util.getString("JDBCQueryExecution.Error_executing_query__1", sql)); //$NON-NLS-1$
@@ -108,7 +108,7 @@
 
 	private void addParameterValue(List<Object> result, int paramIndex,
 			Class<?> type) throws SQLException {
-		Object value = sqlTranslator.retrieveValue((CallableStatement)this.statement, paramIndex, type);
+		Object value = this.executionFactory.retrieveValue((CallableStatement)this.statement, paramIndex, type);
 		result.add(value);
 	}
     

Modified: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCQueryExecution.java
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCQueryExecution.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCQueryExecution.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -57,8 +57,8 @@
     // Constructors
     // ===========================================================================================================================
 
-    public JDBCQueryExecution(Command command, Connection connection, ExecutionContext context, JDBCExecutionFactory env, Translator translator) {
-        super(connection, context, env, translator);
+    public JDBCQueryExecution(Command command, Connection connection, ExecutionContext context, JDBCExecutionFactory env) {
+        super(connection, context, env);
         this.command = command;
     }
     
@@ -96,7 +96,7 @@
 
                 for (int i = 0; i < columnDataTypes.length; i++) {
                     // Convert from 0-based to 1-based
-                    Object value = sqlTranslator.retrieveValue(results, i+1, columnDataTypes[i]);
+                    Object value = this.executionFactory.retrieveValue(results, i+1, columnDataTypes[i]);
                     vals.add(value); 
                 }
 

Modified: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCUpdateExecution.java
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCUpdateExecution.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCUpdateExecution.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -51,8 +51,8 @@
      * @param props
      * @param id
      */
-	public JDBCUpdateExecution(Command command, Connection connection, ExecutionContext context, JDBCExecutionFactory env, Translator translator) {
-        super(connection, context, env, translator);
+	public JDBCUpdateExecution(Command command, Connection connection, ExecutionContext context, JDBCExecutionFactory env) {
+        super(connection, context, env);
         this.command = command;
     }
 

Modified: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/SQLConversionVisitor.java
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/SQLConversionVisitor.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/SQLConversionVisitor.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -56,7 +56,7 @@
 import org.teiid.language.visitor.SQLStringVisitor;
 import org.teiid.translator.ExecutionContext;
 import org.teiid.translator.TypeFacility;
-import org.teiid.translator.jdbc.Translator.NullOrder;
+import org.teiid.translator.jdbc.JDBCExecutionFactory.NullOrder;
 
 
 /**
@@ -71,7 +71,7 @@
     private static double SCIENTIC_HIGH = Math.pow(10, 7);
     
     private ExecutionContext context;
-    private Translator translator;
+    private JDBCExecutionFactory executionFactory;
 
     private boolean prepared;
     
@@ -82,9 +82,9 @@
     
     private boolean replaceWithBinding = false;
     
-    public SQLConversionVisitor(Translator translator) {
-        this.translator = translator;
-        this.prepared = translator.usePreparedStatements();
+    public SQLConversionVisitor(JDBCExecutionFactory ef) {
+        this.executionFactory = ef;
+        this.prepared = executionFactory.usePreparedStatements();
     }
     
     @Override
@@ -107,7 +107,7 @@
     		} else if (trans instanceof LanguageObject) {
     			obj = (LanguageObject)trans;
     		} else {
-    			parts = translator.translate(obj, context);
+    			parts = executionFactory.translate(obj, context);
     			if (parts != null) {
     				this.translations.put(obj, parts);
     			} else {
@@ -134,8 +134,8 @@
 	@Override
 	public void visit(SortSpecification obj) {
 		super.visit(obj);
-		NullOrder nullOrder = this.translator.getDefaultNullOrder();
-		if (!this.translator.supportsExplicitNullOrdering() || nullOrder == NullOrder.LOW) {
+		NullOrder nullOrder = this.executionFactory.getDefaultNullOrder();
+		if (!this.executionFactory.supportsExplicitNullOrdering() || nullOrder == NullOrder.LOW) {
 			return;
 		}
 		if (obj.getOrdering() == Ordering.ASC) {
@@ -179,13 +179,13 @@
                     valuesbuffer.append(obj);
                 }
             } else if(type.equals(TypeFacility.RUNTIME_TYPES.BOOLEAN)) {
-                valuesbuffer.append(translator.translateLiteralBoolean((Boolean)obj));
+                valuesbuffer.append(executionFactory.translateLiteralBoolean((Boolean)obj));
             } else if(type.equals(TypeFacility.RUNTIME_TYPES.TIMESTAMP)) {
-                valuesbuffer.append(translator.translateLiteralTimestamp((Timestamp)obj));
+                valuesbuffer.append(executionFactory.translateLiteralTimestamp((Timestamp)obj));
             } else if(type.equals(TypeFacility.RUNTIME_TYPES.TIME)) {
-                valuesbuffer.append(translator.translateLiteralTime((Time)obj));
+                valuesbuffer.append(executionFactory.translateLiteralTime((Time)obj));
             } else if(type.equals(TypeFacility.RUNTIME_TYPES.DATE)) {
-                valuesbuffer.append(translator.translateLiteralDate((java.sql.Date)obj));
+                valuesbuffer.append(executionFactory.translateLiteralDate((java.sql.Date)obj));
             } else {
                 // If obj is string, toSting() will not create a new String 
                 // object, it returns it self, so new object creation. 
@@ -282,7 +282,7 @@
     }
 
     protected String getSourceComment(Command command) {
-    	return this.translator.getSourceComment(this.context, command);
+    	return this.executionFactory.getSourceComment(this.context, command);
     }
     
     /**
@@ -342,31 +342,31 @@
     
     @Override
     protected boolean useAsInGroupAlias() {
-    	return this.translator.useAsInGroupAlias();
+    	return this.executionFactory.useAsInGroupAlias();
     }
         
     @Override
     protected boolean useParensForSetQueries() {
-    	return translator.useParensForSetQueries();
+    	return executionFactory.useParensForSetQueries();
     }
     	
 	@Override
 	protected String replaceElementName(String group, String element) {
-		return translator.replaceElementName(group, element);
+		return executionFactory.replaceElementName(group, element);
 	}
 	
 	@Override
 	protected void appendSetOperation(Operation operation) {
-		buffer.append(translator.getSetOperationString(operation));
+		buffer.append(executionFactory.getSetOperationString(operation));
 	}
     
 	@Override
     protected boolean useParensForJoins() {
-    	return translator.useParensForJoins();
+    	return executionFactory.useParensForJoins();
     }
 	
 	protected boolean useSelectLimit() {
-		return translator.useSelectLimit();
+		return executionFactory.useSelectLimit();
 	}
 	
 }

Deleted: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/SimpleCapabilities.java
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/SimpleCapabilities.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/SimpleCapabilities.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -1,274 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership.  Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- * 
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- * 
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package org.teiid.translator.jdbc;
-
-import java.util.List;
-
-
-/**
- * This is a "simple" capabilities class that allows criteria but no 
- * complicated joins, subqueries, etc to be passed to the connector.
- * This capabilities class may come in handy for testing and for 
- * sources that support JDBC but don't support extended JDBC capabilities.  
- */
-public class SimpleCapabilities extends JDBCCapabilities {
-
-    public SimpleCapabilities() {
-    }
-    
-    @Override
-    public int getMaxInCriteriaSize() {
-    	return 250;
-    }
-    
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsCompareCriteriaEquals()
-     */
-    public boolean supportsCompareCriteriaEquals() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsInCriteria()
-     */
-    public boolean supportsInCriteria() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsIsNullCriteria()
-     */
-    public boolean supportsIsNullCriteria() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsLikeCriteria()
-     */
-    public boolean supportsLikeCriteria() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsNotCriteria()
-     */
-    public boolean supportsNotCriteria() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsOrCriteria()
-     */
-    public boolean supportsOrCriteria() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsSelectDistinct()
-     */
-    public boolean supportsSelectDistinct() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsAliasedGroup()
-     */
-    public boolean supportsAliasedGroup() {
-        return false;
-    }
-
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsSelfJoins()
-     */
-    public boolean supportsSelfJoins() {
-        return false;
-    }
-
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsOuterJoins()
-     */
-    public boolean supportsOuterJoins() {
-        return false;
-    }
-
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsFullOuterJoins()
-     */
-    public boolean supportsFullOuterJoins() {
-        return false;
-    }
-
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsBetweenCriteria()
-     */
-    public boolean supportsBetweenCriteria() {
-        return false;
-    }
-
-
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsLikeCriteriaEscapeCharacter()
-     */
-    public boolean supportsLikeCriteriaEscapeCharacter() {
-        return false;
-    }
-
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsInCriteriaSubquery()
-     */
-    public boolean supportsInCriteriaSubquery() {
-        return false;
-    }
-
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsExistsCriteria()
-     */
-    public boolean supportsExistsCriteria() {
-        return false;
-    }
-
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsQuantifiedCompareCriteriaSome()
-     */
-    public boolean supportsQuantifiedCompareCriteriaSome() {
-        return false;
-    }
-
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsQuantifiedCompareCriteriaAll()
-     */
-    public boolean supportsQuantifiedCompareCriteriaAll() {
-        return false;
-    }
-
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsOrderBy()
-     */
-    public boolean supportsOrderBy() {
-        return false;
-    }
-
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsAggregatesSum()
-     */
-    public boolean supportsAggregatesSum() {
-        return false;
-    }
-
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsAggregatesAvg()
-     */
-    public boolean supportsAggregatesAvg() {
-        return false;
-    }
-
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsAggregatesMin()
-     */
-    public boolean supportsAggregatesMin() {
-        return false;
-    }
-
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsAggregatesMax()
-     */
-    public boolean supportsAggregatesMax() {
-        return false;
-    }
-
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsAggregatesCount()
-     */
-    public boolean supportsAggregatesCount() {
-        return false;
-    }
-
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsAggregatesCountStar()
-     */
-    public boolean supportsAggregatesCountStar() {
-        return false;
-    }
-
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsAggregatesDistinct()
-     */
-    public boolean supportsAggregatesDistinct() {
-        return false;
-    }
-
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsScalarSubqueries()
-     */
-    public boolean supportsScalarSubqueries() {
-        return false;
-    }
-
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsCorrelatedSubqueries()
-     */
-    public boolean supportsCorrelatedSubqueries() {
-        return false;
-    }
-
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsCaseExpressions()
-     */
-    public boolean supportsCaseExpressions() {
-        return false;
-    }
-
-    /* 
-     * @see com.metamatrix.data.api.ConnectorCapabilities#supportsSearchedCaseExpressions()
-     */
-    public boolean supportsSearchedCaseExpressions() {
-        return false;
-    }
-
-    /**
-     * Return null to indicate no functions are supported.
-     * @return null 
-     * @see org.teiid.translator.ConnectorCapabilities#getSupportedFunctions()
-     */
-    public List getSupportedFunctions() {
-        return null;
-    }
-
-    public boolean supportsInlineViews() {
-        return false;
-    }       
-
-    /** 
-     * @see org.teiid.translator.ConnectorCapabilities#supportsUnions()
-     * @since 4.2
-     */
-    public boolean supportsUnions() {
-        return false;
-    }
-    
-    @Override
-    public boolean supportsInsertWithQueryExpression() {
-    	return false;
-    }
-
-}

Copied: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/SimpleJDBCExecutionFactory.java (from rev 2121, trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/SimpleCapabilities.java)
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/SimpleJDBCExecutionFactory.java	                        (rev 0)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/SimpleJDBCExecutionFactory.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -0,0 +1,205 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership.  Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ * 
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ * 
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.translator.jdbc;
+
+import java.util.List;
+
+
+/**
+ * This is a "simple" capabilities class that allows criteria but no 
+ * complicated joins, subqueries, etc to be passed to the connector.
+ * This capabilities class may come in handy for testing and for 
+ * sources that support JDBC but don't support extended JDBC capabilities.  
+ */
+public class SimpleJDBCExecutionFactory extends JDBCExecutionFactory {
+
+    @Override
+    public int getMaxInCriteriaSize() {
+    	return 250;
+    }
+    
+    @Override
+    public boolean supportsCompareCriteriaEquals() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsInCriteria() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsIsNullCriteria() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsLikeCriteria() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsNotCriteria() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsOrCriteria() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsSelectDistinct() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsAliasedGroup() {
+        return false;
+    }
+
+    @Override
+    public boolean supportsSelfJoins() {
+        return false;
+    }
+
+    @Override
+    public boolean supportsOuterJoins() {
+        return false;
+    }
+
+    @Override
+    public boolean supportsFullOuterJoins() {
+        return false;
+    }
+
+    @Override
+    public boolean supportsBetweenCriteria() {
+        return false;
+    }
+
+
+    @Override
+    public boolean supportsLikeCriteriaEscapeCharacter() {
+        return false;
+    }
+
+    @Override
+    public boolean supportsInCriteriaSubquery() {
+        return false;
+    }
+
+    @Override
+    public boolean supportsExistsCriteria() {
+        return false;
+    }
+
+    @Override
+    public boolean supportsQuantifiedCompareCriteriaSome() {
+        return false;
+    }
+
+    @Override
+    public boolean supportsQuantifiedCompareCriteriaAll() {
+        return false;
+    }
+
+    @Override
+    public boolean supportsOrderBy() {
+        return false;
+    }
+
+    @Override
+    public boolean supportsAggregatesSum() {
+        return false;
+    }
+
+    @Override
+    public boolean supportsAggregatesAvg() {
+        return false;
+    }
+
+    @Override
+    public boolean supportsAggregatesMin() {
+        return false;
+    }
+
+    @Override
+    public boolean supportsAggregatesMax() {
+        return false;
+    }
+
+    @Override
+    public boolean supportsAggregatesCount() {
+        return false;
+    }
+
+    @Override
+    public boolean supportsAggregatesCountStar() {
+        return false;
+    }
+
+    @Override
+    public boolean supportsAggregatesDistinct() {
+        return false;
+    }
+
+    @Override
+    public boolean supportsScalarSubqueries() {
+        return false;
+    }
+
+    @Override
+    public boolean supportsCorrelatedSubqueries() {
+        return false;
+    }
+
+    @Override
+    public boolean supportsCaseExpressions() {
+        return false;
+    }
+
+    @Override
+    public boolean supportsSearchedCaseExpressions() {
+        return false;
+    }
+
+    @Override
+    public List getSupportedFunctions() {
+        return null;
+    }
+
+    public boolean supportsInlineViews() {
+        return false;
+    }       
+
+    @Override
+    public boolean supportsUnions() {
+        return false;
+    }
+    
+    @Override
+    public boolean supportsInsertWithQueryExpression() {
+    	return false;
+    }
+}


Property changes on: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/SimpleJDBCExecutionFactory.java
___________________________________________________________________
Name: svn:mergeinfo
   + 

Modified: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/TranslatedCommand.java
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/TranslatedCommand.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/TranslatedCommand.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -45,15 +45,15 @@
     private boolean prepared;
     private List preparedValues;
     
-    private Translator sqlTranslator;
+    private JDBCExecutionFactory executionFactory;
     private ExecutionContext context;
     
     /**
      * Constructor, takes a SQLConversionVisitor subclass 
      * @param visitor a SQLConversionVisitor subclass 
      */
-    public TranslatedCommand(ExecutionContext context, Translator sqlTranslator){
-    	this.sqlTranslator = sqlTranslator;
+    public TranslatedCommand(ExecutionContext context, JDBCExecutionFactory executionFactory){
+    	this.executionFactory = executionFactory;
     	this.context = context;
     }
     
@@ -65,9 +65,9 @@
      * @throws ConnectorException 
      */
     public void translateCommand(Command command) throws ConnectorException {
-    	SQLConversionVisitor sqlConversionVisitor = sqlTranslator.getSQLConversionVisitor();
+    	SQLConversionVisitor sqlConversionVisitor = executionFactory.getSQLConversionVisitor();
         sqlConversionVisitor.setExecutionContext(context);
-        if (sqlTranslator.usePreparedStatements() || hasBindValue(command)) {
+        if (executionFactory.usePreparedStatements() || hasBindValue(command)) {
         	sqlConversionVisitor.setPrepared(true);
         }
         

Deleted: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/Translator.java
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/Translator.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/Translator.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -1,818 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership.  Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- * 
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- * 
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package org.teiid.translator.jdbc;
-
-import java.math.BigDecimal;
-import java.math.BigInteger;
-import java.sql.CallableStatement;
-import java.sql.Connection;
-import java.sql.DatabaseMetaData;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.sql.Time;
-import java.sql.Timestamp;
-import java.text.MessageFormat;
-import java.util.Arrays;
-import java.util.Calendar;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.TimeZone;
-
-import org.teiid.core.util.ReflectionHelper;
-import org.teiid.language.Argument;
-import org.teiid.language.ColumnReference;
-import org.teiid.language.Command;
-import org.teiid.language.Expression;
-import org.teiid.language.Function;
-import org.teiid.language.LanguageFactory;
-import org.teiid.language.LanguageObject;
-import org.teiid.language.Limit;
-import org.teiid.language.Literal;
-import org.teiid.language.SetQuery;
-import org.teiid.language.Argument.Direction;
-import org.teiid.logging.LogConstants;
-import org.teiid.logging.LogManager;
-import org.teiid.translator.ConnectorCapabilities;
-import org.teiid.translator.ConnectorException;
-import org.teiid.translator.ExecutionContext;
-import org.teiid.translator.SourceSystemFunctions;
-import org.teiid.translator.TypeFacility;
-
-
-/**
- * Base class for creating source SQL queries and retrieving results.
- * Specific databases should override as necessary.
- */
-public class Translator {
-	
-	public enum NullOrder {
-		HIGH,
-		LOW,
-		FIRST,
-		LAST
-	}
-	
-	// Because the retrieveValue() method will be hit for every value of 
-    // every JDBC result set returned, we do lots of weird special stuff here 
-    // to improve the performance (most importantly to remove big if/else checks
-    // of every possible type.  
-    
-    private static final Map<Class<?>, Integer> TYPE_CODE_MAP = new HashMap<Class<?>, Integer>();
-    
-    private static final int INTEGER_CODE = 0;
-    private static final int LONG_CODE = 1;
-    private static final int DOUBLE_CODE = 2;
-    private static final int BIGDECIMAL_CODE = 3;
-    private static final int SHORT_CODE = 4;
-    private static final int FLOAT_CODE = 5;
-    private static final int TIME_CODE = 6;
-    private static final int DATE_CODE = 7;
-    private static final int TIMESTAMP_CODE = 8;
-    private static final int BLOB_CODE = 9;
-    private static final int CLOB_CODE = 10;
-    private static final int BOOLEAN_CODE = 11;
-    
-    static {
-        TYPE_CODE_MAP.put(TypeFacility.RUNTIME_TYPES.INTEGER, new Integer(INTEGER_CODE));
-        TYPE_CODE_MAP.put(TypeFacility.RUNTIME_TYPES.LONG, new Integer(LONG_CODE));
-        TYPE_CODE_MAP.put(TypeFacility.RUNTIME_TYPES.DOUBLE, new Integer(DOUBLE_CODE));
-        TYPE_CODE_MAP.put(TypeFacility.RUNTIME_TYPES.BIG_DECIMAL, new Integer(BIGDECIMAL_CODE));
-        TYPE_CODE_MAP.put(TypeFacility.RUNTIME_TYPES.SHORT, new Integer(SHORT_CODE));
-        TYPE_CODE_MAP.put(TypeFacility.RUNTIME_TYPES.FLOAT, new Integer(FLOAT_CODE));
-        TYPE_CODE_MAP.put(TypeFacility.RUNTIME_TYPES.TIME, new Integer(TIME_CODE));
-        TYPE_CODE_MAP.put(TypeFacility.RUNTIME_TYPES.DATE, new Integer(DATE_CODE));
-        TYPE_CODE_MAP.put(TypeFacility.RUNTIME_TYPES.TIMESTAMP, new Integer(TIMESTAMP_CODE));
-        TYPE_CODE_MAP.put(TypeFacility.RUNTIME_TYPES.BLOB, new Integer(BLOB_CODE));
-        TYPE_CODE_MAP.put(TypeFacility.RUNTIME_TYPES.CLOB, new Integer(CLOB_CODE));
-        TYPE_CODE_MAP.put(TypeFacility.RUNTIME_TYPES.BOOLEAN, new Integer(BOOLEAN_CODE));
-        TYPE_CODE_MAP.put(TypeFacility.RUNTIME_TYPES.BYTE, new Integer(SHORT_CODE));
-    }
-	
-    private static final ThreadLocal<MessageFormat> COMMENT = new ThreadLocal<MessageFormat>() {
-    	protected MessageFormat initialValue() {
-    		return new MessageFormat("/*teiid sessionid:{0}, requestid:{1}.{2}*/ "); //$NON-NLS-1$
-    	}
-    };
-    public final static TimeZone DEFAULT_TIME_ZONE = TimeZone.getDefault();
-
-    private static final ThreadLocal<Calendar> CALENDAR = new ThreadLocal<Calendar>() {
-    	@Override
-    	protected Calendar initialValue() {
-    		return Calendar.getInstance();
-    	}
-    };
-
-	private Map<String, FunctionModifier> functionModifiers = new HashMap<String, FunctionModifier>();
-    private JDBCExecutionFactory environment;
-    
-    private boolean useComments;
-    private boolean usePreparedStatements;
-    
-    private TypeFacility typeFacility;
-
-    private volatile boolean initialConnection;
-    private boolean trimChar;
-    
-    /**
-     * Initialize the SQLTranslator.
-     * @param env
-     * @param metadata
-     * @throws ConnectorException
-     */
-    public void initialize(JDBCExecutionFactory env) throws ConnectorException {
-        this.environment = env;
-        this.typeFacility = env.getTypeFacility();
-
-        String timeZone = this.environment.getDatabaseTimeZone();
-        if(timeZone != null && timeZone.trim().length() > 0) {
-        	TimeZone tz = TimeZone.getTimeZone(timeZone);
-            if(!DEFAULT_TIME_ZONE.hasSameRules(tz)) {
-        		CALENDAR.set(Calendar.getInstance(tz));
-            }
-        }   
-        
-        this.useComments = this.environment.isUseCommentsInSourceQuery();
-        this.usePreparedStatements = this.environment.isUseBindVariables();
-        trimChar = this.environment.isTrimStrings();
-    }
-    
-    /**
-     * Gets the database calendar.  This will be set to the time zone
-     * specified by the property {@link JDBCPropertyNames#DATABASE_TIME_ZONE}, or
-     * the local time zone if none is specified. 
-     * @return
-     */
-    public Calendar getDatabaseCalendar() {
-    	return CALENDAR.get();
-    }
-    
-    /**
-     * Gets the {@link LanguageFactory}
-     */
-    public final LanguageFactory getLanguageFactory() {
-    	return environment.getLanguageFactory();
-    }
-
-    /**
-     * Return a List of translated parts ({@link LanguageObject}s and Objects), or null
-     * if to rely on the default translation.  Override with care.
-     * @param command
-     * @param context
-     * @return
-     */
-    public List<?> translate(LanguageObject obj, ExecutionContext context) {
-		List<?> parts = null;
-    	if (obj instanceof Function) {
-    		Function function = (Function)obj;
-    		if (functionModifiers != null) {
-    			FunctionModifier modifier = functionModifiers.get(function.getName().toLowerCase());
-    			if (modifier != null) {
-    				parts = modifier.translate(function);
-    			}
-    		}
-    	} else if (obj instanceof Command) {
-    		parts = translateCommand((Command)obj, context);
-    	} else if (obj instanceof Limit) {
-    		parts = translateLimit((Limit)obj, context);
-    	} else if (obj instanceof ColumnReference) {
-    		ColumnReference elem = (ColumnReference)obj;
-			if (trimChar && elem.getType() == TypeFacility.RUNTIME_TYPES.STRING && elem.getMetadataObject() != null 
-					&& ("char".equalsIgnoreCase(elem.getMetadataObject().getNativeType()) || "nchar".equalsIgnoreCase(elem.getMetadataObject().getNativeType()))) { //$NON-NLS-1$ //$NON-NLS-2$
-				return Arrays.asList(getLanguageFactory().createFunction(SourceSystemFunctions.RTRIM, new Expression[] {elem}, TypeFacility.RUNTIME_TYPES.STRING));
-			}
-    	}
-    	return parts;
-    }
-    
-    /**
-     * Return a List of translated parts ({@link LanguageObject}s and Objects), or null
-     * if to rely on the default translation. 
-     * @param command
-     * @param context
-     * @return
-     */
-    public List<?> translateCommand(Command command, ExecutionContext context) {
-    	return null;
-    }
-
-    /**
-     * Return a List of translated parts ({@link LanguageObject}s and Objects), or null
-     * if to rely on the default translation. 
-     * @param limit
-     * @param context
-     * @return
-     */
-    public List<?> translateLimit(Limit limit, ExecutionContext context) {
-    	return null;
-    }
-    
-    /**
-     * Return a map of function name in lower case to FunctionModifier.
-     * @return Map of function name to FunctionModifier.
-     */
-    public Map<String, FunctionModifier> getFunctionModifiers() {
-    	return functionModifiers;
-    }
-    
-    /**
-     * Add the {@link FunctionModifier} to the set of known modifiers.
-     * @param name
-     * @param modifier
-     */
-    public void registerFunctionModifier(String name, FunctionModifier modifier) {
-    	this.functionModifiers.put(name, modifier);
-    }
-    
-    /**
-     * Subclasses should override this method to provide a different sql translation
-     * of the literal boolean value.  By default, a boolean literal is represented as:
-     * <code>'0'</code> or <code>'1'</code>.
-     * @param booleanValue Boolean value, never null
-     * @return Translated string
-     */
-    public String translateLiteralBoolean(Boolean booleanValue) {
-        if(booleanValue.booleanValue()) {
-            return "1"; //$NON-NLS-1$
-        }
-        return "0"; //$NON-NLS-1$
-    }
-
-    /**
-     * Subclasses should override this method to provide a different sql translation
-     * of the literal date value.  By default, a date literal is represented as:
-     * <code>{d '2002-12-31'}</code>
-     * @param dateValue Date value, never null
-     * @return Translated string
-     */
-    public String translateLiteralDate(java.sql.Date dateValue) {
-        return "{d '" + formatDateValue(dateValue) + "'}"; //$NON-NLS-1$ //$NON-NLS-2$
-    }
-
-    /**
-     * Subclasses should override this method to provide a different sql translation
-     * of the literal time value.  By default, a time literal is represented as:
-     * <code>{t '23:59:59'}</code>
-     * 
-     * See {@link Translator#hasTimeType()} to represent literal times as timestamps.
-     * 
-     * @param timeValue Time value, never null
-     * @return Translated string
-     */
-    public String translateLiteralTime(Time timeValue) {
-    	if (!hasTimeType()) {
-    		return "{ts '1970-01-01 " + formatDateValue(timeValue) + "'}"; //$NON-NLS-1$ //$NON-NLS-2$
-    	}
-        return "{t '" + formatDateValue(timeValue) + "'}"; //$NON-NLS-1$ //$NON-NLS-2$
-    }
-
-    /**
-     * Subclasses should override this method to provide a different sql translation
-     * of the literal timestamp value.  By default, a timestamp literal is
-     * represented as: <code>{ts '2002-12-31 23:59:59'}</code>.
-     * 
-     * See {@link Translator#getTimestampNanoPrecision()} to control the literal 
-     * precision. 
-     * 
-     * @param timestampValue Timestamp value, never null
-     * @return Translated string
-     */
-    public String translateLiteralTimestamp(Timestamp timestampValue) {
-        return "{ts '" + formatDateValue(timestampValue) + "'}"; //$NON-NLS-1$ //$NON-NLS-2$
-    }
-    
-    /**
-     * Format the dateObject (of type date, time, or timestamp) into a string
-     * using the DatabaseTimeZone format.
-     * @param dateObject
-     * @return Formatted string
-     */
-    public String formatDateValue(java.util.Date dateObject) {
-        if (dateObject instanceof Timestamp && getTimestampNanoPrecision() < 9) {
-        	Timestamp ts = (Timestamp)dateObject;
-        	Timestamp newTs = new Timestamp(ts.getTime());
-        	if (getTimestampNanoPrecision() > 0) {
-	        	int mask = (int)Math.pow(10, 9-getTimestampNanoPrecision());
-	        	newTs.setNanos(ts.getNanos()/mask*mask);
-        	} else {
-        		newTs.setNanos(0);
-        	}
-        	dateObject = newTs;
-        }
-        return this.environment.getTypeFacility().convertDate(dateObject,
-				DEFAULT_TIME_ZONE, getDatabaseCalendar(), dateObject.getClass()).toString();        
-    }    
-    
-    /**
-     * Returns true to indicate that SQL should include a comment
-     * indicating the session and request ids.
-     */
-    public boolean addSourceComment() {
-        return useComments;
-    }   
-    
-    /**
-     * Indicates whether group alias should be of the form
-     * "...FROM groupA AS X" or "...FROM groupA X".  Certain
-     * data sources (such as Oracle) may not support the first
-     * form. 
-     * @return boolean
-     */
-    public boolean useAsInGroupAlias(){
-        return true;
-    }
-    
-    /**
-     * Use PreparedStatements (or CallableStatements) as
-     * appropriate for all commands.  Bind values will be 
-     * determined by the {@link BindValueVisitor}.  {@link Literal#setBindValue(boolean)}
-     * can be used to force a literal to be a bind value.  
-     */
-    public boolean usePreparedStatements() {
-    	return this.usePreparedStatements;
-    }
-    
-    /**
-     * Set to true to indicate that every branch of a set query
-     * should have parenthesis, i.e. (query) union (query)
-     * @return
-     */
-    public boolean useParensForSetQueries() {
-    	return false;
-    }
-    
-    /**
-     * Return false to indicate that time support should be emulated 
-     * with timestamps.
-     * @return
-     */
-    public boolean hasTimeType() {
-    	return true;
-    }
-    
-    /**
-     * Returns the name for a given {@link SetQuery.Operation}
-     * @param operation
-     * @return
-     */
-    public String getSetOperationString(SetQuery.Operation operation) {
-    	return operation.toString();
-    }
-    
-    /**
-     * Returns the source comment for 
-     * @param context
-     * @param command
-     * @return
-     */
-    public String getSourceComment(ExecutionContext context, Command command) {
-	    if (addSourceComment() && context != null) {
-            return COMMENT.get().format(new Object[] {context.getConnectionIdentifier(), context.getRequestIdentifier(), context.getPartIdentifier()});
-	    }
-	    return ""; //$NON-NLS-1$ 
-    }
-    
-    /**
-     * Override to return a name other than the default [group.]element
-     * @param group
-     * @param element
-     * @return
-     */
-    public String replaceElementName(String group, String element) {
-    	return null;
-    }
-    
-    /**
-     * Return the precision of timestamp literals.  Defaults to 9
-     * @return
-     */
-    public int getTimestampNanoPrecision() {
-    	return 9;
-    }
-    
-    public TypeFacility getTypeFacility() {
-    	return typeFacility;
-    }
-    
-    /**
-     * This is a generic implementation. Because different databases handle
-     * stored procedures differently, subclasses should override this method
-     * if necessary.
-     */
-    public ResultSet executeStoredProcedure(CallableStatement statement, TranslatedCommand command, Class<?> returnType) throws SQLException {
-        List params = command.getPreparedValues();
-        int index = 1;
-        
-        if(returnType != null){
-            registerSpecificTypeOfOutParameter(statement, returnType, index++);
-        }
-        
-        Iterator iter = params.iterator();
-        while(iter.hasNext()){
-            Argument param = (Argument)iter.next();
-                    
-            if(param.getDirection() == Direction.INOUT){
-                registerSpecificTypeOfOutParameter(statement,param.getType(), index);
-            }else if(param.getDirection() == Direction.OUT){
-                registerSpecificTypeOfOutParameter(statement,param.getType(), index++);
-            }
-                    
-            if(param.getDirection() == Direction.IN || param.getDirection() == Direction.INOUT){
-                bindValue(statement, param.getArgumentValue().getValue(), param.getType(), index++);
-            }
-        }
-        boolean resultSetNext = statement.execute();
-        
-        while (!resultSetNext) {
-            int update_count = statement.getUpdateCount();
-            if (update_count == -1) {
-                break;
-            }            
-            resultSetNext = statement.getMoreResults();
-        }
-        return statement.getResultSet();
-    }
-
-    /**
-     * For registering specific output parameter types we need to translate these into the appropriate
-     * java.sql.Types output parameters
-     * We will need to match these up with the appropriate standard sql types
-     * @param cstmt
-     * @param parameter
-     * @throws SQLException
-     */
-    protected void registerSpecificTypeOfOutParameter(CallableStatement statement, Class<?> runtimeType, int index) throws SQLException {
-        int typeToSet = TypeFacility.getSQLTypeFromRuntimeType(runtimeType);
-        
-        statement.registerOutParameter(index,typeToSet);
-    }
-    
-    /**
-     * Sets prepared statement parameter i with param.
-     * 
-     * Performs special handling to translate dates using the database time zone and to
-     * translate biginteger, float, and char to JDBC safe objects.
-     *  
-     * @param stmt
-     * @param param
-     * @param paramType
-     * @param i
-     * @param cal
-     * @throws SQLException
-     */
-    public void bindValue(PreparedStatement stmt, Object param, Class<?> paramType, int i) throws SQLException {
-        int type = TypeFacility.getSQLTypeFromRuntimeType(paramType);
-                
-        if (param == null) {
-            stmt.setNull(i, type);
-            return;
-        } 
-        //if this is a Date object, then use the database calendar
-        if (paramType.equals(TypeFacility.RUNTIME_TYPES.DATE)) {
-            stmt.setDate(i,(java.sql.Date)param, getDatabaseCalendar());
-            return;
-        } 
-        if (paramType.equals(TypeFacility.RUNTIME_TYPES.TIME)) {
-            stmt.setTime(i,(java.sql.Time)param, getDatabaseCalendar());
-            return;
-        } 
-        if (paramType.equals(TypeFacility.RUNTIME_TYPES.TIMESTAMP)) {
-            stmt.setTimestamp(i,(java.sql.Timestamp)param, getDatabaseCalendar());
-            return;
-        }
-        //convert these the following to jdbc safe values
-        if (TypeFacility.RUNTIME_TYPES.BIG_INTEGER.equals(paramType)) {
-            param = new BigDecimal((BigInteger)param);
-        } else if (TypeFacility.RUNTIME_TYPES.FLOAT.equals(paramType)) {
-            param = new Double(((Float)param).doubleValue());
-        } else if (TypeFacility.RUNTIME_TYPES.CHAR.equals(paramType)) {
-            param = ((Character)param).toString();
-        }
-        stmt.setObject(i, param, type);
-    }
-    
-	/**
-	 * Retrieve the value on the current resultset row for the given column index.
-	 * @param results
-	 * @param columnIndex
-	 * @param expectedType
-	 * @return
-	 * @throws SQLException
-	 */
-    public Object retrieveValue(ResultSet results, int columnIndex, Class<?> expectedType) throws SQLException {
-        Integer code = TYPE_CODE_MAP.get(expectedType);
-        if(code != null) {
-            // Calling the specific methods here is more likely to get uniform (and fast) results from different
-            // data sources as the driver likely knows the best and fastest way to convert from the underlying
-            // raw form of the data to the expected type.  We use a switch with codes in order without gaps
-            // as there is a special bytecode instruction that treats this case as a map such that not every value 
-            // needs to be tested, which means it is very fast.
-            switch(code.intValue()) {
-                case INTEGER_CODE:  {
-                    int value = results.getInt(columnIndex);                    
-                    if(results.wasNull()) {
-                        return null;
-                    }
-                    return Integer.valueOf(value);
-                }
-                case LONG_CODE:  {
-                    long value = results.getLong(columnIndex);                    
-                    if(results.wasNull()) {
-                        return null;
-                    } 
-                    return Long.valueOf(value);
-                }                
-                case DOUBLE_CODE:  {
-                    double value = results.getDouble(columnIndex);                    
-                    if(results.wasNull()) {
-                        return null;
-                    } 
-                    return Double.valueOf(value);
-                }                
-                case BIGDECIMAL_CODE:  {
-                    return results.getBigDecimal(columnIndex); 
-                }
-                case SHORT_CODE:  {
-                    short value = results.getShort(columnIndex);                    
-                    if(results.wasNull()) {
-                        return null;
-                    }                    
-                    return Short.valueOf(value);
-                }
-                case FLOAT_CODE:  {
-                    float value = results.getFloat(columnIndex);                    
-                    if(results.wasNull()) {
-                        return null;
-                    } 
-                    return Float.valueOf(value);
-                }
-                case TIME_CODE: {
-            		return results.getTime(columnIndex, getDatabaseCalendar());
-                }
-                case DATE_CODE: {
-            		return results.getDate(columnIndex, getDatabaseCalendar());
-                }
-                case TIMESTAMP_CODE: {
-            		return results.getTimestamp(columnIndex, getDatabaseCalendar());
-                }
-    			case BLOB_CODE: {
-    				try {
-    					return results.getBlob(columnIndex);
-    				} catch (SQLException e) {
-    					// ignore
-    				}
-    				try {
-    					return results.getBytes(columnIndex);
-    				} catch (SQLException e) {
-    					// ignore
-    				}
-    				break;
-    			}
-    			case CLOB_CODE: {
-    				try {
-    					return results.getClob(columnIndex);
-    				} catch (SQLException e) {
-    					// ignore
-    				}
-    				break;
-    			}  
-    			case BOOLEAN_CODE: {
-    				return results.getBoolean(columnIndex);
-    			}
-            }
-        }
-
-        return results.getObject(columnIndex);
-    }
-
-    /**
-     * Retrieve the value for the given parameter index
-     * @param results
-     * @param parameterIndex
-     * @param expectedType
-     * @return
-     * @throws SQLException
-     */
-    public Object retrieveValue(CallableStatement results, int parameterIndex, Class expectedType) throws SQLException{
-        Integer code = TYPE_CODE_MAP.get(expectedType);
-        if(code != null) {
-            switch(code.intValue()) {
-                case INTEGER_CODE:  {
-                    int value = results.getInt(parameterIndex);                    
-                    if(results.wasNull()) {
-                        return null;
-                    }
-                    return Integer.valueOf(value);
-                }
-                case LONG_CODE:  {
-                    long value = results.getLong(parameterIndex);                    
-                    if(results.wasNull()) {
-                        return null;
-                    } 
-                    return Long.valueOf(value);
-                }                
-                case DOUBLE_CODE:  {
-                    double value = results.getDouble(parameterIndex);                    
-                    if(results.wasNull()) {
-                        return null;
-                    } 
-                    return new Double(value);
-                }                
-                case BIGDECIMAL_CODE:  {
-                    return results.getBigDecimal(parameterIndex); 
-                }
-                case SHORT_CODE:  {
-                    short value = results.getShort(parameterIndex);                    
-                    if(results.wasNull()) {
-                        return null;
-                    }                    
-                    return Short.valueOf(value);
-                }
-                case FLOAT_CODE:  {
-                    float value = results.getFloat(parameterIndex);                    
-                    if(results.wasNull()) {
-                        return null;
-                    } 
-                    return new Float(value);
-                }
-                case TIME_CODE: {
-            		return results.getTime(parameterIndex, getDatabaseCalendar());
-                }
-                case DATE_CODE: {
-            		return results.getDate(parameterIndex, getDatabaseCalendar());
-                }
-                case TIMESTAMP_CODE: {
-            		return results.getTimestamp(parameterIndex, getDatabaseCalendar());
-                }
-    			case BLOB_CODE: {
-    				try {
-    					return results.getBlob(parameterIndex);
-    				} catch (SQLException e) {
-    					// ignore
-    				}
-    				try {
-    					return results.getBytes(parameterIndex);
-    				} catch (SQLException e) {
-    					// ignore
-    				}
-    			}
-    			case CLOB_CODE: {
-    				try {
-    					return results.getClob(parameterIndex);
-    				} catch (SQLException e) {
-    					// ignore
-    				}
-    			}
-    			case BOOLEAN_CODE: {
-    				return results.getBoolean(parameterIndex);
-    			}
-            }
-        }
-
-        // otherwise fall through and call getObject() and rely on the normal
-		// translation routines
-		return results.getObject(parameterIndex);
-    }
-       
-    /**
-     * Called exactly once for this source.
-     * @param connection
-     */
-    protected void afterInitialConnectionCreation(Connection connection) {
-        // now dig some details about this driver/database for log.
-        try {
-            StringBuffer sb = new StringBuffer();
-            DatabaseMetaData dbmd = connection.getMetaData();
-            sb.append("Commit=").append(connection.getAutoCommit()); //$NON-NLS-1$
-            sb.append(";DatabaseProductName=").append(dbmd.getDatabaseProductName()); //$NON-NLS-1$
-            sb.append(";DatabaseProductVersion=").append(dbmd.getDatabaseProductVersion()); //$NON-NLS-1$
-            sb.append(";DriverMajorVersion=").append(dbmd.getDriverMajorVersion()); //$NON-NLS-1$
-            sb.append(";DriverMajorVersion=").append(dbmd.getDriverMinorVersion()); //$NON-NLS-1$
-            sb.append(";DriverName=").append(dbmd.getDriverName()); //$NON-NLS-1$
-            sb.append(";DriverVersion=").append(dbmd.getDriverVersion()); //$NON-NLS-1$
-            sb.append(";IsolationLevel=").append(dbmd.getDefaultTransactionIsolation()); //$NON-NLS-1$
-            
-            LogManager.logInfo(LogConstants.CTX_CONNECTOR, sb.toString());
-        } catch (SQLException e) {
-            String errorStr = JDBCPlugin.Util.getString("ConnectionListener.failed_to_report_jdbc_connection_details"); //$NON-NLS-1$            
-            LogManager.logInfo(LogConstants.CTX_CONNECTOR, errorStr); 
-        }
-    }
-    
-    /**
-     * Provides a hook to call source specific logic when 
-     * a connection is created.
-     * 
-     * defect request 13979 & 13978
-     */
-    public void afterConnectionCreation(Connection connection) {
-        if (initialConnection) {
-        	synchronized (this) {
-        		if (!initialConnection) {
-        			return;
-        		}
-	            initialConnection = false;
-	            afterInitialConnectionCreation(connection);
-        	}
-        }
-    }
-    
-
-    
-    /**
-     * Create the {@link SQLConversionVisitor} that will perform translation.  Typical custom
-     * JDBC connectors will not need to create custom conversion visitors, rather implementors 
-     * should override existing {@link Translator} methods.
-     * @return
-     */
-    public SQLConversionVisitor getSQLConversionVisitor() {
-    	return new SQLConversionVisitor(this);
-    }
-    
-    /**
-     * Get the default capabilities class.  Will be used by {@link #getConnectorCapabilities()} to
-     * return a capabilities instance.
-     * @return
-     */
-    public Class<? extends ConnectorCapabilities> getDefaultCapabilities() {
-    	return JDBCCapabilities.class;
-    }
-    
-    /**
-     * Get the capabilties for the source.
-     * @return
-     * @throws ConnectorException
-     */
-    public ConnectorCapabilities getConnectorCapabilities() throws ConnectorException {
-		// create Capabilities
-		String className = this.environment.getCapabilitiesClass();
-		try {
-			ConnectorCapabilities result = null;
-			if (className != null && className.length() > 0) {
-				result = (ConnectorCapabilities) ReflectionHelper.create(className, null, Thread.currentThread().getContextClassLoader());
-			} else {
-				result = getDefaultCapabilities().newInstance();
-			}
-
-			return result;
-		} catch (Exception e) {
-			throw new ConnectorException(e);
-		}
-	}
-    
-    /**
-     * Set to true to indicate that every branch of a join
-     * should have parenthesis.
-     * @return
-     */
-    public boolean useParensForJoins() {
-    	return false;
-    }
-    
-    /**
-     * get the default null ordering
-     * @return
-     */
-    public NullOrder getDefaultNullOrder() {
-    	return NullOrder.LOW;
-    }
-    
-    /**
-     * 
-     * @return true if nulls high|low can be specified
-     */
-    public boolean supportsExplicitNullOrdering() {
-    	return false;
-    }
-    
-    /**
-     * 
-     * @return true if the limit clause is part of the select
-     */
-    public boolean useSelectLimit() {
-    	return false;
-    }
-    
-}

Deleted: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/access/AccessCapabilities.java
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/access/AccessCapabilities.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/access/AccessCapabilities.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -1,46 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership.  Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- * 
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- * 
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-/*
- */
-package org.teiid.translator.jdbc.access;
-
-import org.teiid.translator.jdbc.JDBCCapabilities;
-
-public class AccessCapabilities extends JDBCCapabilities{
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsOrderBy()
-     */
-    public boolean supportsOrderBy() {
-        return false;
-    }
-    
-    public boolean supportsRowLimit() {
-        return true;
-    }
-    
-    @Override
-    public boolean supportsInsertWithQueryExpression() {
-    	return false;
-    }
-
-}

Copied: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/access/AccessExecutionFactory.java (from rev 2119, trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/access/AccessSQLTranslator.java)
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/access/AccessExecutionFactory.java	                        (rev 0)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/access/AccessExecutionFactory.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -0,0 +1,87 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership.  Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ * 
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ * 
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+/*
+ */
+package org.teiid.translator.jdbc.access;
+
+import java.util.List;
+
+import org.teiid.translator.jdbc.JDBCExecutionFactory;
+import org.teiid.translator.jdbc.sybase.SybaseExecutionFactory;
+
+
+public class AccessExecutionFactory extends SybaseExecutionFactory {
+	
+    @Override
+    public String translateLiteralBoolean(Boolean booleanValue) {
+        if(booleanValue.booleanValue()) {
+            return "-1"; //$NON-NLS-1$
+        }
+        return "0"; //$NON-NLS-1$
+    }
+    
+    @Override
+    public boolean addSourceComment() {
+    	return false;
+    }
+    
+    @Override
+    public boolean supportsOrderBy() {
+        return false;
+    }
+    
+    @Override
+    public boolean supportsRowLimit() {
+        return true;
+    }
+    
+    @Override
+    public boolean supportsInsertWithQueryExpression() {
+    	return false;
+    }
+    
+    @Override
+    public boolean supportsInlineViews() {
+        return false;
+    }
+
+    @Override
+    public boolean supportsFunctionsInGroupBy() {
+        return false;
+    }
+    
+    @Override
+    public int getMaxInCriteriaSize() {
+    	return JDBCExecutionFactory.DEFAULT_MAX_IN_CRITERIA;
+    }
+    
+    @Override
+    public int getMaxFromGroups() {
+        return DEFAULT_MAX_FROM_GROUPS;
+    } 
+    
+    @Override
+    public List<String> getSupportedFunctions() {
+    	return getDefaultSupportedFunctions();
+    }
+}

Deleted: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/access/AccessSQLTranslator.java
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/access/AccessSQLTranslator.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/access/AccessSQLTranslator.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -1,51 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership.  Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- * 
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- * 
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-/*
- */
-package org.teiid.translator.jdbc.access;
-
-import org.teiid.translator.ConnectorCapabilities;
-import org.teiid.translator.jdbc.sybase.SybaseSQLTranslator;
-
-
-public class AccessSQLTranslator extends SybaseSQLTranslator {
-	
-    @Override
-    public String translateLiteralBoolean(Boolean booleanValue) {
-        if(booleanValue.booleanValue()) {
-            return "-1"; //$NON-NLS-1$
-        }
-        return "0"; //$NON-NLS-1$
-    }
-    
-    @Override
-    public boolean addSourceComment() {
-    	return false;
-    }
-    
-    @Override
-    public Class<? extends ConnectorCapabilities> getDefaultCapabilities() {
-    	return AccessCapabilities.class;
-    }
-    
-}

Deleted: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/db2/DB2Capabilities.java
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/db2/DB2Capabilities.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/db2/DB2Capabilities.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -1,141 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership.  Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- * 
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- * 
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-/*
- */
-package org.teiid.translator.jdbc.db2;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.teiid.translator.jdbc.JDBCCapabilities;
-
-
-/**
- */
-public class DB2Capabilities extends JDBCCapabilities {
-
-    public DB2Capabilities() {
-    }
-    
-    /**
-     * @see org.teiid.resource.cci.data.ConnectorCapabilities#getSupportedFunctions()
-     */
-    public List<String> getSupportedFunctions() {
-        List<String> supportedFunctions = new ArrayList<String>();
-        supportedFunctions.addAll(super.getSupportedFunctions());
-        supportedFunctions.add("ABS"); //$NON-NLS-1$
-        supportedFunctions.add("ACOS"); //$NON-NLS-1$
-        supportedFunctions.add("ASIN"); //$NON-NLS-1$
-        supportedFunctions.add("ATAN"); //$NON-NLS-1$
-        supportedFunctions.add("ATAN2"); //$NON-NLS-1$
-        supportedFunctions.add("CEILING"); //$NON-NLS-1$
-        supportedFunctions.add("COS"); //$NON-NLS-1$
-        supportedFunctions.add("COT"); //$NON-NLS-1$
-        supportedFunctions.add("DEGREES"); //$NON-NLS-1$
-        supportedFunctions.add("EXP"); //$NON-NLS-1$
-        supportedFunctions.add("FLOOR"); //$NON-NLS-1$
-        supportedFunctions.add("LOG"); //$NON-NLS-1$
-        supportedFunctions.add("LOG10"); //$NON-NLS-1$
-        supportedFunctions.add("MOD"); //$NON-NLS-1$
-        supportedFunctions.add("POWER"); //$NON-NLS-1$
-        supportedFunctions.add("RADIANS"); //$NON-NLS-1$
-        supportedFunctions.add("SIGN"); //$NON-NLS-1$
-        supportedFunctions.add("SIN"); //$NON-NLS-1$
-        supportedFunctions.add("SQRT"); //$NON-NLS-1$
-        supportedFunctions.add("TAN"); //$NON-NLS-1$
-        //supportedFunctions.add("ASCII"); //$NON-NLS-1$
-        supportedFunctions.add("CHAR"); //$NON-NLS-1$
-        supportedFunctions.add("CHR"); //$NON-NLS-1$
-        supportedFunctions.add("CONCAT"); //$NON-NLS-1$
-        supportedFunctions.add("||"); //$NON-NLS-1$
-        //supportedFunctions.add("INITCAP"); //$NON-NLS-1$
-        supportedFunctions.add("LCASE"); //$NON-NLS-1$
-        supportedFunctions.add("LENGTH"); //$NON-NLS-1$
-        supportedFunctions.add("LEFT"); //$NON-NLS-1$
-        supportedFunctions.add("LOCATE"); //$NON-NLS-1$
-        supportedFunctions.add("LOWER"); //$NON-NLS-1$
-        //supportedFunctions.add("LPAD"); //$NON-NLS-1$
-        supportedFunctions.add("LTRIM"); //$NON-NLS-1$
-        supportedFunctions.add("RAND"); //$NON-NLS-1$
-        supportedFunctions.add("REPLACE"); //$NON-NLS-1$
-        //supportedFunctions.add("RPAD"); //$NON-NLS-1$
-        supportedFunctions.add("RIGHT"); //$NON-NLS-1$
-        supportedFunctions.add("RTRIM"); //$NON-NLS-1$
-        supportedFunctions.add("SUBSTRING"); //$NON-NLS-1$
-        //supportedFunctions.add("TRANSLATE"); //$NON-NLS-1$
-        supportedFunctions.add("UCASE"); //$NON-NLS-1$
-        supportedFunctions.add("UPPER"); //$NON-NLS-1$
-        supportedFunctions.add("HOUR"); //$NON-NLS-1$
-        supportedFunctions.add("MONTH"); //$NON-NLS-1$
-        supportedFunctions.add("MONTHNAME"); //$NON-NLS-1$
-        supportedFunctions.add("YEAR"); //$NON-NLS-1$
-        supportedFunctions.add("DAY"); //$NON-NLS-1$
-        supportedFunctions.add("DAYNAME"); //$NON-NLS-1$
-        supportedFunctions.add("DAYOFMONTH"); //$NON-NLS-1$
-        supportedFunctions.add("DAYOFWEEK"); //$NON-NLS-1$
-        supportedFunctions.add("DAYOFYEAR"); //$NON-NLS-1$
-        supportedFunctions.add("QUARTER"); //$NON-NLS-1$
-        supportedFunctions.add("MINUTE"); //$NON-NLS-1$
-        supportedFunctions.add("SECOND"); //$NON-NLS-1$
-        supportedFunctions.add("QUARTER"); //$NON-NLS-1$
-        supportedFunctions.add("WEEK"); //$NON-NLS-1$
-        supportedFunctions.add("CAST"); //$NON-NLS-1$
-        supportedFunctions.add("CONVERT"); //$NON-NLS-1$
-        supportedFunctions.add("IFNULL"); //$NON-NLS-1$
-        supportedFunctions.add("NVL");      //$NON-NLS-1$ 
-        supportedFunctions.add("COALESCE"); //$NON-NLS-1$
-        return supportedFunctions;
-    }
-    
-    public boolean supportsInlineViews() {
-        return true;
-    }
-    
-    /** 
-     * @see org.teiid.translator.ConnectorCapabilities#supportsFunctionsInGroupBy()
-     * @since 5.0
-     */
-    public boolean supportsFunctionsInGroupBy() {
-        return true;
-    }    
-    
-    public boolean supportsRowLimit() {
-        return true;
-    }
-    
-    /** 
-     * @see org.teiid.translator.BasicConnectorCapabilities#supportsExcept()
-     */
-    @Override
-    public boolean supportsExcept() {
-        return true;
-    }
-    
-    /** 
-     * @see org.teiid.translator.BasicConnectorCapabilities#supportsIntersect()
-     */
-    @Override
-    public boolean supportsIntersect() {
-        return true;
-    }
-}

Copied: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/db2/DB2ExecutionFactory.java (from rev 2121, trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/db2/DB2SQLTranslator.java)
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/db2/DB2ExecutionFactory.java	                        (rev 0)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/db2/DB2ExecutionFactory.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -0,0 +1,246 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership.  Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ * 
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ * 
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.translator.jdbc.db2;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.teiid.language.DerivedColumn;
+import org.teiid.language.Expression;
+import org.teiid.language.Function;
+import org.teiid.language.Join;
+import org.teiid.language.LanguageObject;
+import org.teiid.language.Limit;
+import org.teiid.language.Literal;
+import org.teiid.language.Comparison.Operator;
+import org.teiid.language.Join.JoinType;
+import org.teiid.translator.ConnectorException;
+import org.teiid.translator.ExecutionContext;
+import org.teiid.translator.SourceSystemFunctions;
+import org.teiid.translator.TypeFacility;
+import org.teiid.translator.jdbc.AliasModifier;
+import org.teiid.translator.jdbc.ConvertModifier;
+import org.teiid.translator.jdbc.FunctionModifier;
+import org.teiid.translator.jdbc.JDBCExecutionFactory;
+import org.teiid.translator.jdbc.LocateFunctionModifier;
+import org.teiid.translator.jdbc.ModFunctionModifier;
+
+public class DB2ExecutionFactory extends JDBCExecutionFactory {
+
+	private final class NullHandlingFormatModifier extends
+			ConvertModifier.FormatModifier {
+		private NullHandlingFormatModifier(String alias) {
+			super(alias);
+		}
+
+		@Override
+		public List<?> translate(Function function) {
+			Expression arg = function.getParameters().get(0);
+			if (arg instanceof Literal && ((Literal)arg).getValue() == null) {
+				((Literal)function.getParameters().get(1)).setValue(this.alias);
+				return null;
+			}
+			return super.translate(function);
+		}
+	}
+
+	@Override
+	public void start() throws ConnectorException {
+		super.start();
+        registerFunctionModifier(SourceSystemFunctions.CHAR, new AliasModifier("chr")); //$NON-NLS-1$ 
+        registerFunctionModifier(SourceSystemFunctions.DAYOFMONTH, new AliasModifier("day")); //$NON-NLS-1$ 
+        registerFunctionModifier(SourceSystemFunctions.IFNULL, new AliasModifier("coalesce")); //$NON-NLS-1$ 
+        registerFunctionModifier(SourceSystemFunctions.LOCATE, new LocateFunctionModifier(getLanguageFactory()));
+        registerFunctionModifier(SourceSystemFunctions.SUBSTRING, new AliasModifier("substr")); //$NON-NLS-1$ 
+
+        registerFunctionModifier(SourceSystemFunctions.MOD, new ModFunctionModifier("MOD", getLanguageFactory()));  //$NON-NLS-1$
+        
+        //add in type conversion
+        ConvertModifier convertModifier = new ConvertModifier();
+    	convertModifier.addTypeMapping("real", FunctionModifier.FLOAT); //$NON-NLS-1$
+    	convertModifier.addTypeMapping("numeric(31,0)", FunctionModifier.BIGINTEGER); //$NON-NLS-1$
+    	convertModifier.addTypeMapping("numeric(31,12)", FunctionModifier.BIGDECIMAL); //$NON-NLS-1$
+    	convertModifier.addTypeMapping("char(1)", FunctionModifier.CHAR); //$NON-NLS-1$
+    	convertModifier.addTypeMapping("blob", FunctionModifier.BLOB, FunctionModifier.OBJECT); //$NON-NLS-1$
+    	convertModifier.addTypeMapping("clob", FunctionModifier.CLOB, FunctionModifier.XML); //$NON-NLS-1$
+    	convertModifier.addConvert(FunctionModifier.TIME, FunctionModifier.TIMESTAMP, new FunctionModifier() {
+			@Override
+			public List<?> translate(Function function) {
+				return Arrays.asList("timestamp('1970-01-01', ", function.getParameters().get(0), ")"); //$NON-NLS-1$ //$NON-NLS-2$
+			}
+		});
+    	convertModifier.addConvert(FunctionModifier.DATE, FunctionModifier.TIMESTAMP, new FunctionModifier() {
+			@Override
+			public List<?> translate(Function function) {
+				return Arrays.asList("timestamp(",function.getParameters().get(0), ", '00:00:00')"); //$NON-NLS-1$ //$NON-NLS-2$
+			}
+		});
+    	//the next convert is not strictly necessary for db2, but it also works for derby
+    	convertModifier.addConvert(FunctionModifier.STRING, FunctionModifier.FLOAT, new FunctionModifier() {
+			@Override
+			public List<?> translate(Function function) {
+				return Arrays.asList("cast(double(", function.getParameters().get(0), ") as real)"); //$NON-NLS-1$ //$NON-NLS-2$
+			}
+		});
+    	convertModifier.addTypeConversion(new NullHandlingFormatModifier("char"), FunctionModifier.STRING); //$NON-NLS-1$
+    	convertModifier.addTypeConversion(new NullHandlingFormatModifier("smallint"), FunctionModifier.BYTE, FunctionModifier.SHORT); //$NON-NLS-1$
+    	convertModifier.addTypeConversion(new NullHandlingFormatModifier("integer"), FunctionModifier.INTEGER); //$NON-NLS-1$
+    	convertModifier.addTypeConversion(new NullHandlingFormatModifier("bigint"), FunctionModifier.LONG); //$NON-NLS-1$
+    	convertModifier.addTypeConversion(new NullHandlingFormatModifier("double"), FunctionModifier.DOUBLE); //$NON-NLS-1$
+    	convertModifier.addTypeConversion(new NullHandlingFormatModifier("date"), FunctionModifier.DATE); //$NON-NLS-1$
+    	convertModifier.addTypeConversion(new NullHandlingFormatModifier("time"), FunctionModifier.TIME); //$NON-NLS-1$
+    	convertModifier.addTypeConversion(new NullHandlingFormatModifier("timestamp"), FunctionModifier.TIMESTAMP); //$NON-NLS-1$
+    	convertModifier.addNumericBooleanConversions();
+    	registerFunctionModifier(SourceSystemFunctions.CONVERT, convertModifier);
+    }
+		
+	@SuppressWarnings("unchecked")
+	@Override
+	public List<?> translateLimit(Limit limit, ExecutionContext context) {
+		return Arrays.asList("FETCH FIRST ", limit.getRowLimit(), " ROWS ONLY"); //$NON-NLS-1$ //$NON-NLS-2$ 
+	}
+	
+	@Override
+	public List<?> translate(LanguageObject obj, ExecutionContext context) {
+		//DB2 doesn't support cross join
+		if (obj instanceof Join) {
+			Join join = (Join)obj;
+			if (join.getJoinType() == JoinType.CROSS_JOIN) {
+				Literal one = getLanguageFactory().createLiteral(1, TypeFacility.RUNTIME_TYPES.INTEGER);
+				join.setCondition(getLanguageFactory().createCompareCriteria(Operator.EQ, one, one));
+				join.setJoinType(JoinType.INNER_JOIN);
+			}
+		}
+		//DB2 needs projected nulls wrapped in casts
+		if (obj instanceof DerivedColumn) {
+			DerivedColumn selectSymbol = (DerivedColumn)obj;
+			if (selectSymbol.getExpression() instanceof Literal) {
+				Literal literal = (Literal)selectSymbol.getExpression();
+				if (literal.getValue() == null) {
+					selectSymbol.setExpression(ConvertModifier.createConvertFunction(getLanguageFactory(), literal, TypeFacility.getDataTypeName(literal.getType())));
+				}
+			}
+		}
+		return super.translate(obj, context);
+	}
+
+	
+	@Override
+	public NullOrder getDefaultNullOrder() {
+		return NullOrder.HIGH;
+	}
+	
+	@Override
+	public List<String> getSupportedFunctions() {
+		List<String> supportedFunctions = new ArrayList<String>();
+		supportedFunctions.addAll(super.getSupportedFunctions());
+		supportedFunctions.add("ABS"); //$NON-NLS-1$
+		supportedFunctions.add("ACOS"); //$NON-NLS-1$
+		supportedFunctions.add("ASIN"); //$NON-NLS-1$
+		supportedFunctions.add("ATAN"); //$NON-NLS-1$
+		supportedFunctions.add("ATAN2"); //$NON-NLS-1$
+		supportedFunctions.add("CEILING"); //$NON-NLS-1$
+		supportedFunctions.add("COS"); //$NON-NLS-1$
+		supportedFunctions.add("COT"); //$NON-NLS-1$
+		supportedFunctions.add("DEGREES"); //$NON-NLS-1$
+		supportedFunctions.add("EXP"); //$NON-NLS-1$
+		supportedFunctions.add("FLOOR"); //$NON-NLS-1$
+		supportedFunctions.add("LOG"); //$NON-NLS-1$
+		supportedFunctions.add("LOG10"); //$NON-NLS-1$
+		supportedFunctions.add("MOD"); //$NON-NLS-1$
+		supportedFunctions.add("POWER"); //$NON-NLS-1$
+		supportedFunctions.add("RADIANS"); //$NON-NLS-1$
+		supportedFunctions.add("SIGN"); //$NON-NLS-1$
+		supportedFunctions.add("SIN"); //$NON-NLS-1$
+		supportedFunctions.add("SQRT"); //$NON-NLS-1$
+		supportedFunctions.add("TAN"); //$NON-NLS-1$
+		//supportedFunctions.add("ASCII"); //$NON-NLS-1$
+		supportedFunctions.add("CHAR"); //$NON-NLS-1$
+		supportedFunctions.add("CHR"); //$NON-NLS-1$
+		supportedFunctions.add("CONCAT"); //$NON-NLS-1$
+		supportedFunctions.add("||"); //$NON-NLS-1$
+		//supportedFunctions.add("INITCAP"); //$NON-NLS-1$
+		supportedFunctions.add("LCASE"); //$NON-NLS-1$
+		supportedFunctions.add("LENGTH"); //$NON-NLS-1$
+		supportedFunctions.add("LEFT"); //$NON-NLS-1$
+		supportedFunctions.add("LOCATE"); //$NON-NLS-1$
+		supportedFunctions.add("LOWER"); //$NON-NLS-1$
+		//supportedFunctions.add("LPAD"); //$NON-NLS-1$
+		supportedFunctions.add("LTRIM"); //$NON-NLS-1$
+		supportedFunctions.add("RAND"); //$NON-NLS-1$
+		supportedFunctions.add("REPLACE"); //$NON-NLS-1$
+		//supportedFunctions.add("RPAD"); //$NON-NLS-1$
+		supportedFunctions.add("RIGHT"); //$NON-NLS-1$
+		supportedFunctions.add("RTRIM"); //$NON-NLS-1$
+		supportedFunctions.add("SUBSTRING"); //$NON-NLS-1$
+		//supportedFunctions.add("TRANSLATE"); //$NON-NLS-1$
+		supportedFunctions.add("UCASE"); //$NON-NLS-1$
+		supportedFunctions.add("UPPER"); //$NON-NLS-1$
+		supportedFunctions.add("HOUR"); //$NON-NLS-1$
+		supportedFunctions.add("MONTH"); //$NON-NLS-1$
+		supportedFunctions.add("MONTHNAME"); //$NON-NLS-1$
+		supportedFunctions.add("YEAR"); //$NON-NLS-1$
+		supportedFunctions.add("DAY"); //$NON-NLS-1$
+		supportedFunctions.add("DAYNAME"); //$NON-NLS-1$
+		supportedFunctions.add("DAYOFMONTH"); //$NON-NLS-1$
+		supportedFunctions.add("DAYOFWEEK"); //$NON-NLS-1$
+		supportedFunctions.add("DAYOFYEAR"); //$NON-NLS-1$
+		supportedFunctions.add("QUARTER"); //$NON-NLS-1$
+		supportedFunctions.add("MINUTE"); //$NON-NLS-1$
+		supportedFunctions.add("SECOND"); //$NON-NLS-1$
+		supportedFunctions.add("QUARTER"); //$NON-NLS-1$
+		supportedFunctions.add("WEEK"); //$NON-NLS-1$
+		supportedFunctions.add("CAST"); //$NON-NLS-1$
+		supportedFunctions.add("CONVERT"); //$NON-NLS-1$
+		supportedFunctions.add("IFNULL"); //$NON-NLS-1$
+		supportedFunctions.add("NVL"); //$NON-NLS-1$ 
+		supportedFunctions.add("COALESCE"); //$NON-NLS-1$
+		return supportedFunctions;
+	}
+
+	@Override
+	public boolean supportsInlineViews() {
+		return true;
+	}
+
+	@Override
+	public boolean supportsFunctionsInGroupBy() {
+		return true;
+	}
+
+	@Override
+	public boolean supportsRowLimit() {
+		return true;
+	}
+
+	@Override
+	public boolean supportsExcept() {
+		return true;
+	}
+
+	@Override
+	public boolean supportsIntersect() {
+		return true;
+	}
+}

Deleted: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/db2/DB2SQLTranslator.java
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/db2/DB2SQLTranslator.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/db2/DB2SQLTranslator.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -1,159 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership.  Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- * 
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- * 
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package org.teiid.translator.jdbc.db2;
-
-import java.util.Arrays;
-import java.util.List;
-
-import org.teiid.language.DerivedColumn;
-import org.teiid.language.Expression;
-import org.teiid.language.Function;
-import org.teiid.language.Join;
-import org.teiid.language.LanguageObject;
-import org.teiid.language.Limit;
-import org.teiid.language.Literal;
-import org.teiid.language.Comparison.Operator;
-import org.teiid.language.Join.JoinType;
-import org.teiid.translator.ConnectorCapabilities;
-import org.teiid.translator.ConnectorException;
-import org.teiid.translator.ExecutionContext;
-import org.teiid.translator.SourceSystemFunctions;
-import org.teiid.translator.TypeFacility;
-import org.teiid.translator.jdbc.AliasModifier;
-import org.teiid.translator.jdbc.ConvertModifier;
-import org.teiid.translator.jdbc.FunctionModifier;
-import org.teiid.translator.jdbc.JDBCExecutionFactory;
-import org.teiid.translator.jdbc.LocateFunctionModifier;
-import org.teiid.translator.jdbc.ModFunctionModifier;
-import org.teiid.translator.jdbc.Translator;
-
-public class DB2SQLTranslator extends Translator {
-
-	private final class NullHandlingFormatModifier extends
-			ConvertModifier.FormatModifier {
-		private NullHandlingFormatModifier(String alias) {
-			super(alias);
-		}
-
-		@Override
-		public List<?> translate(Function function) {
-			Expression arg = function.getParameters().get(0);
-			if (arg instanceof Literal && ((Literal)arg).getValue() == null) {
-				((Literal)function.getParameters().get(1)).setValue(this.alias);
-				return null;
-			}
-			return super.translate(function);
-		}
-	}
-
-	@Override
-	public void initialize(JDBCExecutionFactory env) throws ConnectorException {
-		super.initialize(env);
-        registerFunctionModifier(SourceSystemFunctions.CHAR, new AliasModifier("chr")); //$NON-NLS-1$ 
-        registerFunctionModifier(SourceSystemFunctions.DAYOFMONTH, new AliasModifier("day")); //$NON-NLS-1$ 
-        registerFunctionModifier(SourceSystemFunctions.IFNULL, new AliasModifier("coalesce")); //$NON-NLS-1$ 
-        registerFunctionModifier(SourceSystemFunctions.LOCATE, new LocateFunctionModifier(getLanguageFactory()));
-        registerFunctionModifier(SourceSystemFunctions.SUBSTRING, new AliasModifier("substr")); //$NON-NLS-1$ 
-
-        registerFunctionModifier(SourceSystemFunctions.MOD, new ModFunctionModifier("MOD", getLanguageFactory()));  //$NON-NLS-1$
-        
-        //add in type conversion
-        ConvertModifier convertModifier = new ConvertModifier();
-    	convertModifier.addTypeMapping("real", FunctionModifier.FLOAT); //$NON-NLS-1$
-    	convertModifier.addTypeMapping("numeric(31,0)", FunctionModifier.BIGINTEGER); //$NON-NLS-1$
-    	convertModifier.addTypeMapping("numeric(31,12)", FunctionModifier.BIGDECIMAL); //$NON-NLS-1$
-    	convertModifier.addTypeMapping("char(1)", FunctionModifier.CHAR); //$NON-NLS-1$
-    	convertModifier.addTypeMapping("blob", FunctionModifier.BLOB, FunctionModifier.OBJECT); //$NON-NLS-1$
-    	convertModifier.addTypeMapping("clob", FunctionModifier.CLOB, FunctionModifier.XML); //$NON-NLS-1$
-    	convertModifier.addConvert(FunctionModifier.TIME, FunctionModifier.TIMESTAMP, new FunctionModifier() {
-			@Override
-			public List<?> translate(Function function) {
-				return Arrays.asList("timestamp('1970-01-01', ", function.getParameters().get(0), ")"); //$NON-NLS-1$ //$NON-NLS-2$
-			}
-		});
-    	convertModifier.addConvert(FunctionModifier.DATE, FunctionModifier.TIMESTAMP, new FunctionModifier() {
-			@Override
-			public List<?> translate(Function function) {
-				return Arrays.asList("timestamp(",function.getParameters().get(0), ", '00:00:00')"); //$NON-NLS-1$ //$NON-NLS-2$
-			}
-		});
-    	//the next convert is not strictly necessary for db2, but it also works for derby
-    	convertModifier.addConvert(FunctionModifier.STRING, FunctionModifier.FLOAT, new FunctionModifier() {
-			@Override
-			public List<?> translate(Function function) {
-				return Arrays.asList("cast(double(", function.getParameters().get(0), ") as real)"); //$NON-NLS-1$ //$NON-NLS-2$
-			}
-		});
-    	convertModifier.addTypeConversion(new NullHandlingFormatModifier("char"), FunctionModifier.STRING); //$NON-NLS-1$
-    	convertModifier.addTypeConversion(new NullHandlingFormatModifier("smallint"), FunctionModifier.BYTE, FunctionModifier.SHORT); //$NON-NLS-1$
-    	convertModifier.addTypeConversion(new NullHandlingFormatModifier("integer"), FunctionModifier.INTEGER); //$NON-NLS-1$
-    	convertModifier.addTypeConversion(new NullHandlingFormatModifier("bigint"), FunctionModifier.LONG); //$NON-NLS-1$
-    	convertModifier.addTypeConversion(new NullHandlingFormatModifier("double"), FunctionModifier.DOUBLE); //$NON-NLS-1$
-    	convertModifier.addTypeConversion(new NullHandlingFormatModifier("date"), FunctionModifier.DATE); //$NON-NLS-1$
-    	convertModifier.addTypeConversion(new NullHandlingFormatModifier("time"), FunctionModifier.TIME); //$NON-NLS-1$
-    	convertModifier.addTypeConversion(new NullHandlingFormatModifier("timestamp"), FunctionModifier.TIMESTAMP); //$NON-NLS-1$
-    	convertModifier.addNumericBooleanConversions();
-    	registerFunctionModifier(SourceSystemFunctions.CONVERT, convertModifier);
-    }
-		
-	@SuppressWarnings("unchecked")
-	@Override
-	public List<?> translateLimit(Limit limit, ExecutionContext context) {
-		return Arrays.asList("FETCH FIRST ", limit.getRowLimit(), " ROWS ONLY"); //$NON-NLS-1$ //$NON-NLS-2$ 
-	}
-	
-	@Override
-	public List<?> translate(LanguageObject obj, ExecutionContext context) {
-		//DB2 doesn't support cross join
-		if (obj instanceof Join) {
-			Join join = (Join)obj;
-			if (join.getJoinType() == JoinType.CROSS_JOIN) {
-				Literal one = getLanguageFactory().createLiteral(1, TypeFacility.RUNTIME_TYPES.INTEGER);
-				join.setCondition(getLanguageFactory().createCompareCriteria(Operator.EQ, one, one));
-				join.setJoinType(JoinType.INNER_JOIN);
-			}
-		}
-		//DB2 needs projected nulls wrapped in casts
-		if (obj instanceof DerivedColumn) {
-			DerivedColumn selectSymbol = (DerivedColumn)obj;
-			if (selectSymbol.getExpression() instanceof Literal) {
-				Literal literal = (Literal)selectSymbol.getExpression();
-				if (literal.getValue() == null) {
-					selectSymbol.setExpression(ConvertModifier.createConvertFunction(getLanguageFactory(), literal, TypeFacility.getDataTypeName(literal.getType())));
-				}
-			}
-		}
-		return super.translate(obj, context);
-	}
-
-	
-	@Override
-	public Class<? extends ConnectorCapabilities> getDefaultCapabilities() {
-		return DB2Capabilities.class;
-	}
-    
-	@Override
-	public NullOrder getDefaultNullOrder() {
-		return NullOrder.HIGH;
-	}
-}

Deleted: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/derby/DerbyCapabilities.java
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/derby/DerbyCapabilities.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/derby/DerbyCapabilities.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -1,192 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership.  Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- * 
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- * 
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package org.teiid.translator.jdbc.derby;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.teiid.translator.jdbc.JDBCCapabilities;
-
-
-
-/** 
- * @since 5.0
- */
-public class DerbyCapabilities extends JDBCCapabilities {
-	
-	public static final String TEN_1 = "10.1"; //$NON-NLS-1$
-	public static final String TEN_2 = "10.2"; //$NON-NLS-1$
-	public static final String TEN_4 = "10.4"; //$NON-NLS-1$
-	public static final String TEN_5 = "10.5"; //$NON-NLS-1$
-	
-	private String version = TEN_1;
-
-    public List<String> getSupportedFunctions() {
-        List<String> supportedFunctions = new ArrayList<String>();
-        supportedFunctions.addAll(super.getSupportedFunctions());
-
-        supportedFunctions.add("ABS"); //$NON-NLS-1$
-        if (version.compareTo(TEN_2) >= 0) {
-        	supportedFunctions.add("ACOS"); //$NON-NLS-1$
-        	supportedFunctions.add("ASIN"); //$NON-NLS-1$
-        	supportedFunctions.add("ATAN"); //$NON-NLS-1$
-        }
-        if (version.compareTo(TEN_4) >= 0) {
-        	supportedFunctions.add("ATAN2"); //$NON-NLS-1$
-        }
-        // These are executed within the server and never pushed down
-        //supportedFunctions.add("BITAND"); //$NON-NLS-1$
-        //supportedFunctions.add("BITNOT"); //$NON-NLS-1$
-        //supportedFunctions.add("BITOR"); //$NON-NLS-1$
-        //supportedFunctions.add("BITXOR"); //$NON-NLS-1$
-        if (version.compareTo(TEN_2) >= 0) {
-	        supportedFunctions.add("CEILING"); //$NON-NLS-1$
-	        supportedFunctions.add("COS"); //$NON-NLS-1$
-	        supportedFunctions.add("COT"); //$NON-NLS-1$
-	        supportedFunctions.add("DEGREES"); //$NON-NLS-1$
-	        supportedFunctions.add("EXP"); //$NON-NLS-1$
-	        supportedFunctions.add("FLOOR"); //$NON-NLS-1$
-	        supportedFunctions.add("LOG"); //$NON-NLS-1$
-	        supportedFunctions.add("LOG10"); //$NON-NLS-1$
-        }
-        supportedFunctions.add("MOD"); //$NON-NLS-1$
-        if (version.compareTo(TEN_2) >= 0) {
-        	supportedFunctions.add("PI"); //$NON-NLS-1$
-        	//supportedFunctions.add("POWER"); //$NON-NLS-1$
-        	supportedFunctions.add("RADIANS"); //$NON-NLS-1$
-        	//supportedFunctions.add("ROUND"); //$NON-NLS-1$
-        	if (version.compareTo(TEN_4) >= 0) {
-        		supportedFunctions.add("SIGN"); //$NON-NLS-1$
-        	}
-        	supportedFunctions.add("SIN"); //$NON-NLS-1$
-        }
-        supportedFunctions.add("SQRT"); //$NON-NLS-1$
-        //supportedFunctions.add("TAN"); //$NON-NLS-1$
-        
-        //supportedFunctions.add("ASCII"); //$NON-NLS-1$
-        //supportedFunctions.add("CHR"); //$NON-NLS-1$
-        //supportedFunctions.add("CHAR"); //$NON-NLS-1$
-        supportedFunctions.add("CONCAT"); //$NON-NLS-1$
-        //supportedFunctions.add("INSERT"); //$NON-NLS-1$
-        supportedFunctions.add("LCASE"); //$NON-NLS-1$
-        supportedFunctions.add("LEFT"); //$NON-NLS-1$
-        supportedFunctions.add("LENGTH"); //$NON-NLS-1$
-        supportedFunctions.add("LOCATE"); //$NON-NLS-1$
-        //supportedFunctions.add("LPAD"); //$NON-NLS-1$
-        supportedFunctions.add("LTRIM"); //$NON-NLS-1$
-        //supportedFunctions.add("REPEAT"); //$NON-NLS-1$
-        //supportedFunctions.add("REPLACE"); //$NON-NLS-1$
-        //supportedFunctions.add("RIGHT"); //$NON-NLS-1$
-        //supportedFunctions.add("RPAD"); //$NON-NLS-1$
-        supportedFunctions.add("RTRIM"); //$NON-NLS-1$
-        supportedFunctions.add("SUBSTRING"); //$NON-NLS-1$
-        supportedFunctions.add("UCASE"); //$NON-NLS-1$
-        
-        // These are executed within the server and never pushed down
-        //supportedFunctions.add("CURDATE"); //$NON-NLS-1$
-        //supportedFunctions.add("CURTIME"); //$NON-NLS-1$
-        //supportedFunctions.add("NOW"); //$NON-NLS-1$
-        //supportedFunctions.add("DAYNAME"); //$NON-NLS-1$
-        supportedFunctions.add("DAYOFMONTH"); //$NON-NLS-1$
-        //supportedFunctions.add("DAYOFWEEK"); //$NON-NLS-1$
-        //supportedFunctions.add("DAYOFYEAR"); //$NON-NLS-1$
-        
-        // These should not be pushed down since the grammar for string conversion is different
-//        supportedFunctions.add("FORMATDATE"); //$NON-NLS-1$
-//        supportedFunctions.add("FORMATTIME"); //$NON-NLS-1$
-//        supportedFunctions.add("FORMATTIMESTAMP"); //$NON-NLS-1$
-        supportedFunctions.add("HOUR"); //$NON-NLS-1$
-        supportedFunctions.add("MINUTE"); //$NON-NLS-1$
-        supportedFunctions.add("MONTH"); //$NON-NLS-1$
-        //supportedFunctions.add("MONTHNAME"); //$NON-NLS-1$
-        
-        // These should not be pushed down since the grammar for string conversion is different
-//        supportedFunctions.add("PARSEDATE"); //$NON-NLS-1$
-//        supportedFunctions.add("PARSETIME"); //$NON-NLS-1$
-//        supportedFunctions.add("PARSETIMESTAMP"); //$NON-NLS-1$
-        //supportedFunctions.add("QUARTER"); //$NON-NLS-1$
-        supportedFunctions.add("SECOND"); //$NON-NLS-1$
-        supportedFunctions.add("TIMESTAMPADD"); //$NON-NLS-1$
-        supportedFunctions.add("TIMESTAMPDIFF"); //$NON-NLS-1$
-        //supportedFunctions.add("WEEK"); //$NON-NLS-1$
-        supportedFunctions.add("YEAR"); //$NON-NLS-1$
-        
-        supportedFunctions.add("CONVERT"); //$NON-NLS-1$
-        supportedFunctions.add("IFNULL"); //$NON-NLS-1$
-        supportedFunctions.add("COALESCE"); //$NON-NLS-1$
-        return supportedFunctions;
-    }
-    
-    public void setDatabaseVersion(String version) {
-		this.version = version;
-	}
-
-    /**
-     * Derby supports only SearchedCaseExpression, not CaseExpression. 
-     * @see org.teiid.translator.ConnectorCapabilities#supportsCaseExpressions()
-     * @since 5.0
-     */
-    public boolean supportsCaseExpressions() {
-        return false;
-    }
-    
-    /**
-     * Derby supports only left and right outer joins. 
-     * @see org.teiid.translator.ConnectorCapabilities#supportsFullOuterJoins()
-     * @since 5.0
-     */
-    public boolean supportsFullOuterJoins() {
-        return false;
-    }
-    
-    /**
-     * Inline views (subqueries in the FROM clause) are supported. 
-     * @see org.teiid.translator.ConnectorCapabilities#supportsInlineViews()
-     * @since 4.3
-     */
-    public boolean supportsInlineViews() {
-        return true;
-    }
-    
-    /** 
-     * @see org.teiid.translator.BasicConnectorCapabilities#supportsExcept()
-     */
-    @Override
-    public boolean supportsExcept() {
-        return true;
-    }
-    
-    /** 
-     * @see org.teiid.translator.BasicConnectorCapabilities#supportsIntersect()
-     */
-    @Override
-    public boolean supportsIntersect() {
-        return true;
-    }
-    
-    @Override
-    public boolean supportsRowLimit() {
-    	return this.version.compareTo(TEN_5) >= 0;
-    }
-
-}

Copied: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/derby/DerbyExecutionFactory.java (from rev 2121, trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/derby/DerbySQLTranslator.java)
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/derby/DerbyExecutionFactory.java	                        (rev 0)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/derby/DerbyExecutionFactory.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -0,0 +1,206 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership.  Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ * 
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ * 
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.translator.jdbc.derby;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.teiid.translator.ConnectorException;
+import org.teiid.translator.SourceSystemFunctions;
+import org.teiid.translator.TranslatorProperty;
+import org.teiid.translator.jdbc.EscapeSyntaxModifier;
+import org.teiid.translator.jdbc.db2.DB2ExecutionFactory;
+import org.teiid.translator.jdbc.oracle.LeftOrRightFunctionModifier;
+
+
+
+/** 
+ * @since 4.3
+ */
+public class DerbyExecutionFactory extends DB2ExecutionFactory {
+	
+	public static final String TEN_1 = "10.1"; //$NON-NLS-1$
+	public static final String TEN_2 = "10.2"; //$NON-NLS-1$
+	public static final String TEN_4 = "10.4"; //$NON-NLS-1$
+	public static final String TEN_5 = "10.5"; //$NON-NLS-1$
+	
+	private String version = TEN_1;
+	
+	@Override
+	public void start() throws ConnectorException {
+		super.start();
+		//additional derby functions
+        registerFunctionModifier(SourceSystemFunctions.TIMESTAMPADD, new EscapeSyntaxModifier()); 
+        registerFunctionModifier(SourceSystemFunctions.TIMESTAMPDIFF, new EscapeSyntaxModifier()); 
+        registerFunctionModifier(SourceSystemFunctions.LEFT, new LeftOrRightFunctionModifier(getLanguageFactory()));
+        
+        //overrides of db2 functions
+        registerFunctionModifier(SourceSystemFunctions.CONCAT, new EscapeSyntaxModifier()); 
+    }  
+ 
+    @Override
+    public boolean addSourceComment() {
+        return false;
+    }
+    
+    @Override
+    public boolean supportsExplicitNullOrdering() {
+    	return version.compareTo(TEN_4) >= 0;
+    }
+    
+    @TranslatorProperty(name="DatabaseVersion", description= "Version of the postgres", defaultValue=TEN_1)
+    public String getDatabaseVersion() {
+    	return this.version;
+    }    
+    
+    public void setDatabaseVersion(String version) {
+    	this.version = version;
+    }
+
+    @Override
+    public List<String> getSupportedFunctions() {
+        List<String> supportedFunctions = new ArrayList<String>();
+        supportedFunctions.addAll(super.getDefaultSupportedFunctions());
+
+        supportedFunctions.add("ABS"); //$NON-NLS-1$
+        if (version.compareTo(TEN_2) >= 0) {
+        	supportedFunctions.add("ACOS"); //$NON-NLS-1$
+        	supportedFunctions.add("ASIN"); //$NON-NLS-1$
+        	supportedFunctions.add("ATAN"); //$NON-NLS-1$
+        }
+        if (version.compareTo(TEN_4) >= 0) {
+        	supportedFunctions.add("ATAN2"); //$NON-NLS-1$
+        }
+        // These are executed within the server and never pushed down
+        //supportedFunctions.add("BITAND"); //$NON-NLS-1$
+        //supportedFunctions.add("BITNOT"); //$NON-NLS-1$
+        //supportedFunctions.add("BITOR"); //$NON-NLS-1$
+        //supportedFunctions.add("BITXOR"); //$NON-NLS-1$
+        if (version.compareTo(TEN_2) >= 0) {
+	        supportedFunctions.add("CEILING"); //$NON-NLS-1$
+	        supportedFunctions.add("COS"); //$NON-NLS-1$
+	        supportedFunctions.add("COT"); //$NON-NLS-1$
+	        supportedFunctions.add("DEGREES"); //$NON-NLS-1$
+	        supportedFunctions.add("EXP"); //$NON-NLS-1$
+	        supportedFunctions.add("FLOOR"); //$NON-NLS-1$
+	        supportedFunctions.add("LOG"); //$NON-NLS-1$
+	        supportedFunctions.add("LOG10"); //$NON-NLS-1$
+        }
+        supportedFunctions.add("MOD"); //$NON-NLS-1$
+        if (version.compareTo(TEN_2) >= 0) {
+        	supportedFunctions.add("PI"); //$NON-NLS-1$
+        	//supportedFunctions.add("POWER"); //$NON-NLS-1$
+        	supportedFunctions.add("RADIANS"); //$NON-NLS-1$
+        	//supportedFunctions.add("ROUND"); //$NON-NLS-1$
+        	if (version.compareTo(TEN_4) >= 0) {
+        		supportedFunctions.add("SIGN"); //$NON-NLS-1$
+        	}
+        	supportedFunctions.add("SIN"); //$NON-NLS-1$
+        }
+        supportedFunctions.add("SQRT"); //$NON-NLS-1$
+        //supportedFunctions.add("TAN"); //$NON-NLS-1$
+        
+        //supportedFunctions.add("ASCII"); //$NON-NLS-1$
+        //supportedFunctions.add("CHR"); //$NON-NLS-1$
+        //supportedFunctions.add("CHAR"); //$NON-NLS-1$
+        supportedFunctions.add("CONCAT"); //$NON-NLS-1$
+        //supportedFunctions.add("INSERT"); //$NON-NLS-1$
+        supportedFunctions.add("LCASE"); //$NON-NLS-1$
+        supportedFunctions.add("LEFT"); //$NON-NLS-1$
+        supportedFunctions.add("LENGTH"); //$NON-NLS-1$
+        supportedFunctions.add("LOCATE"); //$NON-NLS-1$
+        //supportedFunctions.add("LPAD"); //$NON-NLS-1$
+        supportedFunctions.add("LTRIM"); //$NON-NLS-1$
+        //supportedFunctions.add("REPEAT"); //$NON-NLS-1$
+        //supportedFunctions.add("REPLACE"); //$NON-NLS-1$
+        //supportedFunctions.add("RIGHT"); //$NON-NLS-1$
+        //supportedFunctions.add("RPAD"); //$NON-NLS-1$
+        supportedFunctions.add("RTRIM"); //$NON-NLS-1$
+        supportedFunctions.add("SUBSTRING"); //$NON-NLS-1$
+        supportedFunctions.add("UCASE"); //$NON-NLS-1$
+        
+        // These are executed within the server and never pushed down
+        //supportedFunctions.add("CURDATE"); //$NON-NLS-1$
+        //supportedFunctions.add("CURTIME"); //$NON-NLS-1$
+        //supportedFunctions.add("NOW"); //$NON-NLS-1$
+        //supportedFunctions.add("DAYNAME"); //$NON-NLS-1$
+        supportedFunctions.add("DAYOFMONTH"); //$NON-NLS-1$
+        //supportedFunctions.add("DAYOFWEEK"); //$NON-NLS-1$
+        //supportedFunctions.add("DAYOFYEAR"); //$NON-NLS-1$
+        
+        // These should not be pushed down since the grammar for string conversion is different
+//        supportedFunctions.add("FORMATDATE"); //$NON-NLS-1$
+//        supportedFunctions.add("FORMATTIME"); //$NON-NLS-1$
+//        supportedFunctions.add("FORMATTIMESTAMP"); //$NON-NLS-1$
+        supportedFunctions.add("HOUR"); //$NON-NLS-1$
+        supportedFunctions.add("MINUTE"); //$NON-NLS-1$
+        supportedFunctions.add("MONTH"); //$NON-NLS-1$
+        //supportedFunctions.add("MONTHNAME"); //$NON-NLS-1$
+        
+        // These should not be pushed down since the grammar for string conversion is different
+//        supportedFunctions.add("PARSEDATE"); //$NON-NLS-1$
+//        supportedFunctions.add("PARSETIME"); //$NON-NLS-1$
+//        supportedFunctions.add("PARSETIMESTAMP"); //$NON-NLS-1$
+        //supportedFunctions.add("QUARTER"); //$NON-NLS-1$
+        supportedFunctions.add("SECOND"); //$NON-NLS-1$
+        supportedFunctions.add("TIMESTAMPADD"); //$NON-NLS-1$
+        supportedFunctions.add("TIMESTAMPDIFF"); //$NON-NLS-1$
+        //supportedFunctions.add("WEEK"); //$NON-NLS-1$
+        supportedFunctions.add("YEAR"); //$NON-NLS-1$
+        
+        supportedFunctions.add("CONVERT"); //$NON-NLS-1$
+        supportedFunctions.add("IFNULL"); //$NON-NLS-1$
+        supportedFunctions.add("COALESCE"); //$NON-NLS-1$
+        return supportedFunctions;
+    }
+    
+    /**
+     * Derby supports only SearchedCaseExpression, not CaseExpression. 
+     * @see org.teiid.translator.ConnectorCapabilities#supportsCaseExpressions()
+     * @since 5.0
+     */
+    @Override
+    public boolean supportsCaseExpressions() {
+        return false;
+    }
+    
+    /**
+     * Derby supports only left and right outer joins. 
+     * @see org.teiid.translator.ConnectorCapabilities#supportsFullOuterJoins()
+     * @since 5.0
+     */
+    @Override
+    public boolean supportsFullOuterJoins() {
+        return false;
+    }
+    
+    @Override
+    public boolean supportsRowLimit() {
+    	return this.version.compareTo(TEN_5) >= 0;
+    }
+    
+	@Override
+	public boolean supportsFunctionsInGroupBy() {
+		return false;
+	}
+}

Deleted: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/derby/DerbySQLTranslator.java
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/derby/DerbySQLTranslator.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/derby/DerbySQLTranslator.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -1,73 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership.  Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- * 
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- * 
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package org.teiid.translator.jdbc.derby;
-
-import org.teiid.translator.ConnectorCapabilities;
-import org.teiid.translator.ConnectorException;
-import org.teiid.translator.SourceSystemFunctions;
-import org.teiid.translator.jdbc.EscapeSyntaxModifier;
-import org.teiid.translator.jdbc.JDBCExecutionFactory;
-import org.teiid.translator.jdbc.db2.DB2SQLTranslator;
-import org.teiid.translator.jdbc.oracle.LeftOrRightFunctionModifier;
-
-
-
-/** 
- * @since 4.3
- */
-public class DerbySQLTranslator extends DB2SQLTranslator {
-	
-	private String version = DerbyCapabilities.TEN_1;
-	
-	@Override
-	public void initialize(JDBCExecutionFactory env) throws ConnectorException {
-		super.initialize(env);
-		//additional derby functions
-        registerFunctionModifier(SourceSystemFunctions.TIMESTAMPADD, new EscapeSyntaxModifier()); 
-        registerFunctionModifier(SourceSystemFunctions.TIMESTAMPDIFF, new EscapeSyntaxModifier()); 
-        registerFunctionModifier(SourceSystemFunctions.LEFT, new LeftOrRightFunctionModifier(getLanguageFactory()));
-        
-        //overrides of db2 functions
-        registerFunctionModifier(SourceSystemFunctions.CONCAT, new EscapeSyntaxModifier()); 
-    }  
- 
-    @Override
-    public boolean addSourceComment() {
-        return false;
-    }
-    
-    @Override
-    public Class<? extends ConnectorCapabilities> getDefaultCapabilities() {
-    	return DerbyCapabilities.class;
-    }
-    
-    @Override
-    public boolean supportsExplicitNullOrdering() {
-    	return version.compareTo(DerbyCapabilities.TEN_4) >= 0;
-    }
-    
-    public void setDatabaseVersion(String version) {
-    	this.version = version;
-    }
-
-}

Deleted: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/h2/H2Capabilities.java
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/h2/H2Capabilities.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/h2/H2Capabilities.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -1,133 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership.  Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- * 
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- * 
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package org.teiid.translator.jdbc.h2;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.teiid.translator.SourceSystemFunctions;
-import org.teiid.translator.jdbc.JDBCCapabilities;
-
-public class H2Capabilities extends JDBCCapabilities {
-
-    public List<String> getSupportedFunctions() {
-        List<String> supportedFunctions = new ArrayList<String>();
-        supportedFunctions.addAll(super.getSupportedFunctions());
-
-        supportedFunctions.add(SourceSystemFunctions.ABS); 
-        supportedFunctions.add(SourceSystemFunctions.ACOS); 
-        supportedFunctions.add(SourceSystemFunctions.ASIN);
-        supportedFunctions.add(SourceSystemFunctions.ATAN);
-        supportedFunctions.add(SourceSystemFunctions.ATAN2);
-        supportedFunctions.add(SourceSystemFunctions.BITAND);
-        //supportedFunctions.add(SourceSystemFunctions.BITNOT);
-        supportedFunctions.add(SourceSystemFunctions.BITOR);
-        supportedFunctions.add(SourceSystemFunctions.BITXOR);
-        supportedFunctions.add(SourceSystemFunctions.CEILING);
-        supportedFunctions.add(SourceSystemFunctions.COS);
-        supportedFunctions.add(SourceSystemFunctions.COT);
-        supportedFunctions.add(SourceSystemFunctions.DEGREES);
-        supportedFunctions.add(SourceSystemFunctions.EXP);
-        supportedFunctions.add(SourceSystemFunctions.FLOOR);
-        supportedFunctions.add(SourceSystemFunctions.LOG);
-        supportedFunctions.add(SourceSystemFunctions.LOG10);
-        supportedFunctions.add(SourceSystemFunctions.MOD);
-        supportedFunctions.add(SourceSystemFunctions.PI);
-        supportedFunctions.add(SourceSystemFunctions.POWER);
-        supportedFunctions.add(SourceSystemFunctions.RADIANS);
-        supportedFunctions.add(SourceSystemFunctions.ROUND);
-        supportedFunctions.add(SourceSystemFunctions.SIGN);
-        supportedFunctions.add(SourceSystemFunctions.SIN);
-        supportedFunctions.add(SourceSystemFunctions.SQRT);
-        supportedFunctions.add(SourceSystemFunctions.TAN);
-
-        supportedFunctions.add(SourceSystemFunctions.ASCII);
-        supportedFunctions.add(SourceSystemFunctions.CHAR);
-        supportedFunctions.add(SourceSystemFunctions.CONCAT);
-        supportedFunctions.add(SourceSystemFunctions.INSERT);
-        supportedFunctions.add(SourceSystemFunctions.LCASE);
-        supportedFunctions.add(SourceSystemFunctions.LEFT);
-        supportedFunctions.add(SourceSystemFunctions.LENGTH);
-        supportedFunctions.add(SourceSystemFunctions.LOCATE);
-        supportedFunctions.add(SourceSystemFunctions.LPAD);
-        supportedFunctions.add(SourceSystemFunctions.LTRIM);
-        supportedFunctions.add(SourceSystemFunctions.REPEAT);
-        supportedFunctions.add(SourceSystemFunctions.REPLACE);
-        supportedFunctions.add(SourceSystemFunctions.RIGHT);
-        supportedFunctions.add(SourceSystemFunctions.RPAD);
-        supportedFunctions.add(SourceSystemFunctions.RTRIM);
-        supportedFunctions.add(SourceSystemFunctions.SUBSTRING);
-        supportedFunctions.add(SourceSystemFunctions.UCASE);
-        
-        supportedFunctions.add(SourceSystemFunctions.DAYNAME);
-        supportedFunctions.add(SourceSystemFunctions.DAYOFMONTH);
-        supportedFunctions.add(SourceSystemFunctions.DAYOFWEEK);
-        supportedFunctions.add(SourceSystemFunctions.DAYOFYEAR);
-        
-        supportedFunctions.add(SourceSystemFunctions.FORMATTIMESTAMP); 
-        supportedFunctions.add(SourceSystemFunctions.HOUR);
-        supportedFunctions.add(SourceSystemFunctions.MINUTE);
-        supportedFunctions.add(SourceSystemFunctions.MONTH);
-        supportedFunctions.add(SourceSystemFunctions.MONTHNAME);
-        
-        supportedFunctions.add(SourceSystemFunctions.PARSETIMESTAMP);
-        supportedFunctions.add(SourceSystemFunctions.QUARTER);
-        supportedFunctions.add(SourceSystemFunctions.SECOND);
-        supportedFunctions.add(SourceSystemFunctions.TIMESTAMPADD);
-        supportedFunctions.add(SourceSystemFunctions.TIMESTAMPDIFF);
-        //supportedFunctions.add(SourceSystemFunctions.TIMESTAMPCREATE);
-        supportedFunctions.add(SourceSystemFunctions.WEEK);
-        supportedFunctions.add(SourceSystemFunctions.YEAR);
-
-        supportedFunctions.add(SourceSystemFunctions.CONVERT);
-        supportedFunctions.add(SourceSystemFunctions.IFNULL);
-        supportedFunctions.add(SourceSystemFunctions.COALESCE);
-        return supportedFunctions;
-    }
-	
-    @Override
-    public boolean supportsInlineViews() {
-        return true;
-    }
-    
-    @Override
-    public boolean supportsRowLimit() {
-        return true;
-    }
-
-    @Override
-    public boolean supportsRowOffset() {
-    	return true;
-    }
-    
-    @Override
-    public boolean supportsExcept() {
-        return true;
-    }
-    
-    @Override
-    public boolean supportsIntersect() {
-        return true;
-    }
-	
-}

Copied: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/h2/H2ExecutionFactory.java (from rev 2121, trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/h2/H2Translator.java)
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/h2/H2ExecutionFactory.java	                        (rev 0)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/h2/H2ExecutionFactory.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -0,0 +1,191 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership.  Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ * 
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ * 
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.translator.jdbc.h2;
+
+import java.sql.Date;
+import java.sql.Time;
+import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.teiid.translator.ConnectorException;
+import org.teiid.translator.SourceSystemFunctions;
+import org.teiid.translator.jdbc.AliasModifier;
+import org.teiid.translator.jdbc.ConvertModifier;
+import org.teiid.translator.jdbc.FunctionModifier;
+import org.teiid.translator.jdbc.JDBCExecutionFactory;
+import org.teiid.translator.jdbc.ModFunctionModifier;
+import org.teiid.translator.jdbc.hsql.AddDiffModifier;
+import org.teiid.translator.jdbc.oracle.ConcatFunctionModifier;
+
+public class H2ExecutionFactory extends JDBCExecutionFactory {
+	
+	@Override
+	public void start() throws ConnectorException {
+		super.start();
+		registerFunctionModifier(SourceSystemFunctions.PARSETIMESTAMP, new AliasModifier("parsedatetime")); //$NON-NLS-1$
+		registerFunctionModifier(SourceSystemFunctions.FORMATTIMESTAMP, new AliasModifier("formatdatetime")); //$NON-NLS-1$
+		registerFunctionModifier(SourceSystemFunctions.DAYOFMONTH, new AliasModifier("day_of_month")); //$NON-NLS-1$
+		registerFunctionModifier(SourceSystemFunctions.DAYOFWEEK, new AliasModifier("day_of_week")); //$NON-NLS-1$
+		registerFunctionModifier(SourceSystemFunctions.DAYOFYEAR, new AliasModifier("day_of_year")); //$NON-NLS-1$
+		registerFunctionModifier(SourceSystemFunctions.MOD, new ModFunctionModifier(SourceSystemFunctions.MOD, getLanguageFactory()));
+		//TODO: this behavior is configurable in h2 starting with 1.1.119
+		registerFunctionModifier(SourceSystemFunctions.CONCAT, new ConcatFunctionModifier(getLanguageFactory()));
+		
+		registerFunctionModifier(SourceSystemFunctions.TIMESTAMPADD, new AddDiffModifier(true, getLanguageFactory())); 
+		registerFunctionModifier(SourceSystemFunctions.TIMESTAMPDIFF, new AddDiffModifier(false, getLanguageFactory())); 
+	
+		ConvertModifier convert = new ConvertModifier();
+		convert.addTypeMapping("boolean", FunctionModifier.BOOLEAN); //$NON-NLS-1$
+		convert.addTypeMapping("tinyint", FunctionModifier.BYTE); //$NON-NLS-1$
+		convert.addTypeMapping("smallint", FunctionModifier.SHORT); //$NON-NLS-1$
+		convert.addTypeMapping("int", FunctionModifier.INTEGER); //$NON-NLS-1$
+		convert.addTypeMapping("bigint", FunctionModifier.LONG); //$NON-NLS-1$
+		convert.addTypeMapping("real", FunctionModifier.FLOAT); //$NON-NLS-1$
+		convert.addTypeMapping("double", FunctionModifier.DOUBLE); //$NON-NLS-1$
+		convert.addTypeMapping("decimal", FunctionModifier.BIGDECIMAL); //$NON-NLS-1$
+		convert.addTypeMapping("decimal(38,0)", FunctionModifier.BIGINTEGER); //$NON-NLS-1$
+		convert.addTypeMapping("date", FunctionModifier.DATE); //$NON-NLS-1$
+		convert.addTypeMapping("time", FunctionModifier.TIME); //$NON-NLS-1$
+		convert.addTypeMapping("timestamp", FunctionModifier.TIMESTAMP); //$NON-NLS-1$
+		convert.addTypeMapping("char(1)", FunctionModifier.CHAR); //$NON-NLS-1$
+		convert.addTypeMapping("varchar", FunctionModifier.STRING); //$NON-NLS-1$
+		registerFunctionModifier(SourceSystemFunctions.CONVERT, convert);		
+	}
+	
+    @Override
+    public String translateLiteralDate(Date dateValue) {
+        return "DATE '" + formatDateValue(dateValue) + "'"; //$NON-NLS-1$//$NON-NLS-2$
+    }
+
+    @Override
+    public String translateLiteralTime(Time timeValue) {
+        return "TIME '" + formatDateValue(timeValue) + "'"; //$NON-NLS-1$//$NON-NLS-2$
+    }
+    
+    @Override
+    public String translateLiteralTimestamp(Timestamp timestampValue) {
+        return "TIMESTAMP '" + formatDateValue(timestampValue) + "'"; //$NON-NLS-1$//$NON-NLS-2$ 
+    }
+	
+    @Override
+    public List<String> getSupportedFunctions() {
+        List<String> supportedFunctions = new ArrayList<String>();
+        supportedFunctions.addAll(super.getSupportedFunctions());
+
+        supportedFunctions.add(SourceSystemFunctions.ABS); 
+        supportedFunctions.add(SourceSystemFunctions.ACOS); 
+        supportedFunctions.add(SourceSystemFunctions.ASIN);
+        supportedFunctions.add(SourceSystemFunctions.ATAN);
+        supportedFunctions.add(SourceSystemFunctions.ATAN2);
+        supportedFunctions.add(SourceSystemFunctions.BITAND);
+        //supportedFunctions.add(SourceSystemFunctions.BITNOT);
+        supportedFunctions.add(SourceSystemFunctions.BITOR);
+        supportedFunctions.add(SourceSystemFunctions.BITXOR);
+        supportedFunctions.add(SourceSystemFunctions.CEILING);
+        supportedFunctions.add(SourceSystemFunctions.COS);
+        supportedFunctions.add(SourceSystemFunctions.COT);
+        supportedFunctions.add(SourceSystemFunctions.DEGREES);
+        supportedFunctions.add(SourceSystemFunctions.EXP);
+        supportedFunctions.add(SourceSystemFunctions.FLOOR);
+        supportedFunctions.add(SourceSystemFunctions.LOG);
+        supportedFunctions.add(SourceSystemFunctions.LOG10);
+        supportedFunctions.add(SourceSystemFunctions.MOD);
+        supportedFunctions.add(SourceSystemFunctions.PI);
+        supportedFunctions.add(SourceSystemFunctions.POWER);
+        supportedFunctions.add(SourceSystemFunctions.RADIANS);
+        supportedFunctions.add(SourceSystemFunctions.ROUND);
+        supportedFunctions.add(SourceSystemFunctions.SIGN);
+        supportedFunctions.add(SourceSystemFunctions.SIN);
+        supportedFunctions.add(SourceSystemFunctions.SQRT);
+        supportedFunctions.add(SourceSystemFunctions.TAN);
+
+        supportedFunctions.add(SourceSystemFunctions.ASCII);
+        supportedFunctions.add(SourceSystemFunctions.CHAR);
+        supportedFunctions.add(SourceSystemFunctions.CONCAT);
+        supportedFunctions.add(SourceSystemFunctions.INSERT);
+        supportedFunctions.add(SourceSystemFunctions.LCASE);
+        supportedFunctions.add(SourceSystemFunctions.LEFT);
+        supportedFunctions.add(SourceSystemFunctions.LENGTH);
+        supportedFunctions.add(SourceSystemFunctions.LOCATE);
+        supportedFunctions.add(SourceSystemFunctions.LPAD);
+        supportedFunctions.add(SourceSystemFunctions.LTRIM);
+        supportedFunctions.add(SourceSystemFunctions.REPEAT);
+        supportedFunctions.add(SourceSystemFunctions.REPLACE);
+        supportedFunctions.add(SourceSystemFunctions.RIGHT);
+        supportedFunctions.add(SourceSystemFunctions.RPAD);
+        supportedFunctions.add(SourceSystemFunctions.RTRIM);
+        supportedFunctions.add(SourceSystemFunctions.SUBSTRING);
+        supportedFunctions.add(SourceSystemFunctions.UCASE);
+        
+        supportedFunctions.add(SourceSystemFunctions.DAYNAME);
+        supportedFunctions.add(SourceSystemFunctions.DAYOFMONTH);
+        supportedFunctions.add(SourceSystemFunctions.DAYOFWEEK);
+        supportedFunctions.add(SourceSystemFunctions.DAYOFYEAR);
+        
+        supportedFunctions.add(SourceSystemFunctions.FORMATTIMESTAMP); 
+        supportedFunctions.add(SourceSystemFunctions.HOUR);
+        supportedFunctions.add(SourceSystemFunctions.MINUTE);
+        supportedFunctions.add(SourceSystemFunctions.MONTH);
+        supportedFunctions.add(SourceSystemFunctions.MONTHNAME);
+        
+        supportedFunctions.add(SourceSystemFunctions.PARSETIMESTAMP);
+        supportedFunctions.add(SourceSystemFunctions.QUARTER);
+        supportedFunctions.add(SourceSystemFunctions.SECOND);
+        supportedFunctions.add(SourceSystemFunctions.TIMESTAMPADD);
+        supportedFunctions.add(SourceSystemFunctions.TIMESTAMPDIFF);
+        //supportedFunctions.add(SourceSystemFunctions.TIMESTAMPCREATE);
+        supportedFunctions.add(SourceSystemFunctions.WEEK);
+        supportedFunctions.add(SourceSystemFunctions.YEAR);
+
+        supportedFunctions.add(SourceSystemFunctions.CONVERT);
+        supportedFunctions.add(SourceSystemFunctions.IFNULL);
+        supportedFunctions.add(SourceSystemFunctions.COALESCE);
+        return supportedFunctions;
+    }
+	
+    @Override
+    public boolean supportsInlineViews() {
+        return true;
+    }
+    
+    @Override
+    public boolean supportsRowLimit() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsRowOffset() {
+    	return true;
+    }
+    
+    @Override
+    public boolean supportsExcept() {
+        return true;
+    }
+    
+    @Override
+    public boolean supportsIntersect() {
+        return true;
+    }	
+}

Deleted: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/h2/H2Translator.java
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/h2/H2Translator.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/h2/H2Translator.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -1,96 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership.  Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- * 
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- * 
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package org.teiid.translator.jdbc.h2;
-
-import java.sql.Date;
-import java.sql.Time;
-import java.sql.Timestamp;
-
-import org.teiid.translator.ConnectorCapabilities;
-import org.teiid.translator.ConnectorException;
-import org.teiid.translator.SourceSystemFunctions;
-import org.teiid.translator.jdbc.AliasModifier;
-import org.teiid.translator.jdbc.ConvertModifier;
-import org.teiid.translator.jdbc.FunctionModifier;
-import org.teiid.translator.jdbc.JDBCExecutionFactory;
-import org.teiid.translator.jdbc.ModFunctionModifier;
-import org.teiid.translator.jdbc.Translator;
-import org.teiid.translator.jdbc.hsql.AddDiffModifier;
-import org.teiid.translator.jdbc.oracle.ConcatFunctionModifier;
-
-public class H2Translator extends Translator {
-	
-	@Override
-	public void initialize(JDBCExecutionFactory env) throws ConnectorException {
-		super.initialize(env);
-		registerFunctionModifier(SourceSystemFunctions.PARSETIMESTAMP, new AliasModifier("parsedatetime")); //$NON-NLS-1$
-		registerFunctionModifier(SourceSystemFunctions.FORMATTIMESTAMP, new AliasModifier("formatdatetime")); //$NON-NLS-1$
-		registerFunctionModifier(SourceSystemFunctions.DAYOFMONTH, new AliasModifier("day_of_month")); //$NON-NLS-1$
-		registerFunctionModifier(SourceSystemFunctions.DAYOFWEEK, new AliasModifier("day_of_week")); //$NON-NLS-1$
-		registerFunctionModifier(SourceSystemFunctions.DAYOFYEAR, new AliasModifier("day_of_year")); //$NON-NLS-1$
-		registerFunctionModifier(SourceSystemFunctions.MOD, new ModFunctionModifier(SourceSystemFunctions.MOD, getLanguageFactory()));
-		//TODO: this behavior is configurable in h2 starting with 1.1.119
-		registerFunctionModifier(SourceSystemFunctions.CONCAT, new ConcatFunctionModifier(getLanguageFactory()));
-		
-		registerFunctionModifier(SourceSystemFunctions.TIMESTAMPADD, new AddDiffModifier(true, getLanguageFactory())); 
-		registerFunctionModifier(SourceSystemFunctions.TIMESTAMPDIFF, new AddDiffModifier(false, getLanguageFactory())); 
-	
-		ConvertModifier convert = new ConvertModifier();
-		convert.addTypeMapping("boolean", FunctionModifier.BOOLEAN); //$NON-NLS-1$
-		convert.addTypeMapping("tinyint", FunctionModifier.BYTE); //$NON-NLS-1$
-		convert.addTypeMapping("smallint", FunctionModifier.SHORT); //$NON-NLS-1$
-		convert.addTypeMapping("int", FunctionModifier.INTEGER); //$NON-NLS-1$
-		convert.addTypeMapping("bigint", FunctionModifier.LONG); //$NON-NLS-1$
-		convert.addTypeMapping("real", FunctionModifier.FLOAT); //$NON-NLS-1$
-		convert.addTypeMapping("double", FunctionModifier.DOUBLE); //$NON-NLS-1$
-		convert.addTypeMapping("decimal", FunctionModifier.BIGDECIMAL); //$NON-NLS-1$
-		convert.addTypeMapping("decimal(38,0)", FunctionModifier.BIGINTEGER); //$NON-NLS-1$
-		convert.addTypeMapping("date", FunctionModifier.DATE); //$NON-NLS-1$
-		convert.addTypeMapping("time", FunctionModifier.TIME); //$NON-NLS-1$
-		convert.addTypeMapping("timestamp", FunctionModifier.TIMESTAMP); //$NON-NLS-1$
-		convert.addTypeMapping("char(1)", FunctionModifier.CHAR); //$NON-NLS-1$
-		convert.addTypeMapping("varchar", FunctionModifier.STRING); //$NON-NLS-1$
-		registerFunctionModifier(SourceSystemFunctions.CONVERT, convert);		
-	}
-	
-    @Override
-    public String translateLiteralDate(Date dateValue) {
-        return "DATE '" + formatDateValue(dateValue) + "'"; //$NON-NLS-1$//$NON-NLS-2$
-    }
-
-    @Override
-    public String translateLiteralTime(Time timeValue) {
-        return "TIME '" + formatDateValue(timeValue) + "'"; //$NON-NLS-1$//$NON-NLS-2$
-    }
-    
-    @Override
-    public String translateLiteralTimestamp(Timestamp timestampValue) {
-        return "TIMESTAMP '" + formatDateValue(timestampValue) + "'"; //$NON-NLS-1$//$NON-NLS-2$ 
-    }
-	
-	@Override
-	public Class<? extends ConnectorCapabilities> getDefaultCapabilities() {
-		return H2Capabilities.class;
-	}
-	
-}

Deleted: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/hsql/HsqlCapabilities.java
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/hsql/HsqlCapabilities.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/hsql/HsqlCapabilities.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -1,133 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership.  Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- * 
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- * 
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package org.teiid.translator.jdbc.hsql;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.teiid.translator.SourceSystemFunctions;
-import org.teiid.translator.jdbc.JDBCCapabilities;
-
-public class HsqlCapabilities extends JDBCCapabilities {
-
-	public List<String> getSupportedFunctions() {
-        List<String> supportedFunctions = new ArrayList<String>();
-        supportedFunctions.addAll(super.getSupportedFunctions());
-
-        supportedFunctions.add(SourceSystemFunctions.ABS); 
-        supportedFunctions.add(SourceSystemFunctions.ACOS); 
-        supportedFunctions.add(SourceSystemFunctions.ASIN);
-        supportedFunctions.add(SourceSystemFunctions.ATAN);
-        supportedFunctions.add(SourceSystemFunctions.ATAN2);
-        supportedFunctions.add(SourceSystemFunctions.BITAND);
-        //supportedFunctions.add(SourceSystemFunctions.BITNOT);
-        supportedFunctions.add(SourceSystemFunctions.BITOR);
-        //supportedFunctions.add(SourceSystemFunctions.BITXOR);
-        supportedFunctions.add(SourceSystemFunctions.CEILING);
-        supportedFunctions.add(SourceSystemFunctions.COS);
-        supportedFunctions.add(SourceSystemFunctions.COT);
-        supportedFunctions.add(SourceSystemFunctions.DEGREES);
-        supportedFunctions.add(SourceSystemFunctions.EXP);
-        supportedFunctions.add(SourceSystemFunctions.FLOOR);
-        supportedFunctions.add(SourceSystemFunctions.LOG);
-        supportedFunctions.add(SourceSystemFunctions.LOG10);
-        supportedFunctions.add(SourceSystemFunctions.MOD);
-        supportedFunctions.add(SourceSystemFunctions.PI);
-        supportedFunctions.add(SourceSystemFunctions.POWER);
-        supportedFunctions.add(SourceSystemFunctions.RADIANS);
-        supportedFunctions.add(SourceSystemFunctions.ROUND);
-        supportedFunctions.add(SourceSystemFunctions.SIGN);
-        supportedFunctions.add(SourceSystemFunctions.SIN);
-        supportedFunctions.add(SourceSystemFunctions.SQRT);
-        supportedFunctions.add(SourceSystemFunctions.TAN);
-
-        supportedFunctions.add(SourceSystemFunctions.ASCII);
-        supportedFunctions.add(SourceSystemFunctions.CHAR);
-        supportedFunctions.add(SourceSystemFunctions.CONCAT);
-        supportedFunctions.add(SourceSystemFunctions.INSERT);
-        supportedFunctions.add(SourceSystemFunctions.LCASE);
-        supportedFunctions.add(SourceSystemFunctions.LEFT);
-        supportedFunctions.add(SourceSystemFunctions.LENGTH);
-        supportedFunctions.add(SourceSystemFunctions.LOCATE);
-        supportedFunctions.add(SourceSystemFunctions.LPAD);
-        supportedFunctions.add(SourceSystemFunctions.LTRIM);
-        supportedFunctions.add(SourceSystemFunctions.REPEAT);
-        supportedFunctions.add(SourceSystemFunctions.REPLACE);
-        supportedFunctions.add(SourceSystemFunctions.RIGHT);
-        supportedFunctions.add(SourceSystemFunctions.RPAD);
-        supportedFunctions.add(SourceSystemFunctions.RTRIM);
-        supportedFunctions.add(SourceSystemFunctions.SUBSTRING);
-        supportedFunctions.add(SourceSystemFunctions.UCASE);
-        
-        supportedFunctions.add(SourceSystemFunctions.DAYNAME);
-        supportedFunctions.add(SourceSystemFunctions.DAYOFMONTH);
-        supportedFunctions.add(SourceSystemFunctions.DAYOFWEEK);
-        supportedFunctions.add(SourceSystemFunctions.DAYOFYEAR);
-        
-        //supportedFunctions.add(SourceSystemFunctions.FORMATDATE); 
-        //supportedFunctions.add(SourceSystemFunctions.FORMATTIME); 
-        //supportedFunctions.add(SourceSystemFunctions.FORMATTIMESTAMP); 
-        supportedFunctions.add(SourceSystemFunctions.HOUR);
-        supportedFunctions.add(SourceSystemFunctions.MINUTE);
-        supportedFunctions.add(SourceSystemFunctions.MONTH);
-        supportedFunctions.add(SourceSystemFunctions.MONTHNAME);
-        
-        //supportedFunctions.add(SourceSystemFunctions.PARSEDATE); 
-        //supportedFunctions.add(SourceSystemFunctions.PARSETIME); 
-        //supportedFunctions.add(SourceSystemFunctions.PARSETIMESTAMP);
-        supportedFunctions.add(SourceSystemFunctions.QUARTER);
-        supportedFunctions.add(SourceSystemFunctions.SECOND);
-        supportedFunctions.add(SourceSystemFunctions.TIMESTAMPADD);
-        supportedFunctions.add(SourceSystemFunctions.TIMESTAMPDIFF);
-        supportedFunctions.add(SourceSystemFunctions.WEEK);
-        supportedFunctions.add(SourceSystemFunctions.YEAR);
-
-        supportedFunctions.add(SourceSystemFunctions.CONVERT);
-        supportedFunctions.add(SourceSystemFunctions.IFNULL);
-        supportedFunctions.add(SourceSystemFunctions.COALESCE);
-        return supportedFunctions;
-    }
-	
-    public boolean supportsInlineViews() {
-        return true;
-    }
-    
-    public boolean supportsRowLimit() {
-        return true;
-    }
-    
-    public boolean supportsRowOffset() {
-    	return true;
-    }
-    
-    @Override
-    public boolean supportsExcept() {
-        return true;
-    }
-    
-    @Override
-    public boolean supportsIntersect() {
-        return true;
-    }
-	
-}

Copied: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/hsql/HsqlExecutionFactory.java (from rev 2121, trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/hsql/HsqlTranslator.java)
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/hsql/HsqlExecutionFactory.java	                        (rev 0)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/hsql/HsqlExecutionFactory.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -0,0 +1,181 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership.  Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ * 
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ * 
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.translator.jdbc.hsql;
+
+import java.sql.Date;
+import java.sql.Time;
+import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.teiid.translator.ConnectorException;
+import org.teiid.translator.SourceSystemFunctions;
+import org.teiid.translator.jdbc.ConvertModifier;
+import org.teiid.translator.jdbc.FunctionModifier;
+import org.teiid.translator.jdbc.JDBCExecutionFactory;
+
+public class HsqlExecutionFactory extends JDBCExecutionFactory {
+	
+	@Override
+	public void start() throws ConnectorException {
+		super.start();
+		registerFunctionModifier(SourceSystemFunctions.TIMESTAMPADD, new AddDiffModifier(true, getLanguageFactory()));
+		registerFunctionModifier(SourceSystemFunctions.TIMESTAMPDIFF, new AddDiffModifier(false, getLanguageFactory())); 
+	
+		ConvertModifier convert = new ConvertModifier();
+		convert.addTypeMapping("boolean", FunctionModifier.BOOLEAN); //$NON-NLS-1$
+		convert.addTypeMapping("tinyint", FunctionModifier.BYTE); //$NON-NLS-1$
+		convert.addTypeMapping("smallint", FunctionModifier.SHORT); //$NON-NLS-1$
+		convert.addTypeMapping("int", FunctionModifier.INTEGER); //$NON-NLS-1$
+		convert.addTypeMapping("bigint", FunctionModifier.LONG); //$NON-NLS-1$
+		convert.addTypeMapping("real", FunctionModifier.FLOAT); //$NON-NLS-1$
+		convert.addTypeMapping("double", FunctionModifier.DOUBLE); //$NON-NLS-1$
+		convert.addTypeMapping("decimal", FunctionModifier.BIGDECIMAL); //$NON-NLS-1$
+		convert.addTypeMapping("decimal(38,0)", FunctionModifier.BIGINTEGER); //$NON-NLS-1$
+		convert.addTypeMapping("date", FunctionModifier.DATE); //$NON-NLS-1$
+		convert.addTypeMapping("time", FunctionModifier.TIME); //$NON-NLS-1$
+		convert.addTypeMapping("timestamp", FunctionModifier.TIMESTAMP); //$NON-NLS-1$
+		convert.addTypeMapping("char(1)", FunctionModifier.CHAR); //$NON-NLS-1$
+		convert.addTypeMapping("varchar", FunctionModifier.STRING); //$NON-NLS-1$
+		registerFunctionModifier(SourceSystemFunctions.CONVERT, convert);		
+	}
+	
+    @Override
+    public String translateLiteralDate(Date dateValue) {
+        return "DATE '" + formatDateValue(dateValue) + "'"; //$NON-NLS-1$//$NON-NLS-2$
+    }
+
+    @Override
+    public String translateLiteralTime(Time timeValue) {
+        return "TIME '" + formatDateValue(timeValue) + "'"; //$NON-NLS-1$//$NON-NLS-2$
+    }
+    
+    @Override
+    public String translateLiteralTimestamp(Timestamp timestampValue) {
+        return "TIMESTAMP '" + formatDateValue(timestampValue) + "'"; //$NON-NLS-1$//$NON-NLS-2$ 
+    }
+	
+    @Override
+	public List<String> getSupportedFunctions() {
+        List<String> supportedFunctions = new ArrayList<String>();
+        supportedFunctions.addAll(super.getSupportedFunctions());
+
+        supportedFunctions.add(SourceSystemFunctions.ABS); 
+        supportedFunctions.add(SourceSystemFunctions.ACOS); 
+        supportedFunctions.add(SourceSystemFunctions.ASIN);
+        supportedFunctions.add(SourceSystemFunctions.ATAN);
+        supportedFunctions.add(SourceSystemFunctions.ATAN2);
+        supportedFunctions.add(SourceSystemFunctions.BITAND);
+        //supportedFunctions.add(SourceSystemFunctions.BITNOT);
+        supportedFunctions.add(SourceSystemFunctions.BITOR);
+        //supportedFunctions.add(SourceSystemFunctions.BITXOR);
+        supportedFunctions.add(SourceSystemFunctions.CEILING);
+        supportedFunctions.add(SourceSystemFunctions.COS);
+        supportedFunctions.add(SourceSystemFunctions.COT);
+        supportedFunctions.add(SourceSystemFunctions.DEGREES);
+        supportedFunctions.add(SourceSystemFunctions.EXP);
+        supportedFunctions.add(SourceSystemFunctions.FLOOR);
+        supportedFunctions.add(SourceSystemFunctions.LOG);
+        supportedFunctions.add(SourceSystemFunctions.LOG10);
+        supportedFunctions.add(SourceSystemFunctions.MOD);
+        supportedFunctions.add(SourceSystemFunctions.PI);
+        supportedFunctions.add(SourceSystemFunctions.POWER);
+        supportedFunctions.add(SourceSystemFunctions.RADIANS);
+        supportedFunctions.add(SourceSystemFunctions.ROUND);
+        supportedFunctions.add(SourceSystemFunctions.SIGN);
+        supportedFunctions.add(SourceSystemFunctions.SIN);
+        supportedFunctions.add(SourceSystemFunctions.SQRT);
+        supportedFunctions.add(SourceSystemFunctions.TAN);
+
+        supportedFunctions.add(SourceSystemFunctions.ASCII);
+        supportedFunctions.add(SourceSystemFunctions.CHAR);
+        supportedFunctions.add(SourceSystemFunctions.CONCAT);
+        supportedFunctions.add(SourceSystemFunctions.INSERT);
+        supportedFunctions.add(SourceSystemFunctions.LCASE);
+        supportedFunctions.add(SourceSystemFunctions.LEFT);
+        supportedFunctions.add(SourceSystemFunctions.LENGTH);
+        supportedFunctions.add(SourceSystemFunctions.LOCATE);
+        supportedFunctions.add(SourceSystemFunctions.LPAD);
+        supportedFunctions.add(SourceSystemFunctions.LTRIM);
+        supportedFunctions.add(SourceSystemFunctions.REPEAT);
+        supportedFunctions.add(SourceSystemFunctions.REPLACE);
+        supportedFunctions.add(SourceSystemFunctions.RIGHT);
+        supportedFunctions.add(SourceSystemFunctions.RPAD);
+        supportedFunctions.add(SourceSystemFunctions.RTRIM);
+        supportedFunctions.add(SourceSystemFunctions.SUBSTRING);
+        supportedFunctions.add(SourceSystemFunctions.UCASE);
+        
+        supportedFunctions.add(SourceSystemFunctions.DAYNAME);
+        supportedFunctions.add(SourceSystemFunctions.DAYOFMONTH);
+        supportedFunctions.add(SourceSystemFunctions.DAYOFWEEK);
+        supportedFunctions.add(SourceSystemFunctions.DAYOFYEAR);
+        
+        //supportedFunctions.add(SourceSystemFunctions.FORMATDATE); 
+        //supportedFunctions.add(SourceSystemFunctions.FORMATTIME); 
+        //supportedFunctions.add(SourceSystemFunctions.FORMATTIMESTAMP); 
+        supportedFunctions.add(SourceSystemFunctions.HOUR);
+        supportedFunctions.add(SourceSystemFunctions.MINUTE);
+        supportedFunctions.add(SourceSystemFunctions.MONTH);
+        supportedFunctions.add(SourceSystemFunctions.MONTHNAME);
+        
+        //supportedFunctions.add(SourceSystemFunctions.PARSEDATE); 
+        //supportedFunctions.add(SourceSystemFunctions.PARSETIME); 
+        //supportedFunctions.add(SourceSystemFunctions.PARSETIMESTAMP);
+        supportedFunctions.add(SourceSystemFunctions.QUARTER);
+        supportedFunctions.add(SourceSystemFunctions.SECOND);
+        supportedFunctions.add(SourceSystemFunctions.TIMESTAMPADD);
+        supportedFunctions.add(SourceSystemFunctions.TIMESTAMPDIFF);
+        supportedFunctions.add(SourceSystemFunctions.WEEK);
+        supportedFunctions.add(SourceSystemFunctions.YEAR);
+
+        supportedFunctions.add(SourceSystemFunctions.CONVERT);
+        supportedFunctions.add(SourceSystemFunctions.IFNULL);
+        supportedFunctions.add(SourceSystemFunctions.COALESCE);
+        return supportedFunctions;
+    }
+	
+	@Override
+    public boolean supportsInlineViews() {
+        return true;
+    }
+    
+    @Override
+    public boolean supportsRowLimit() {
+        return true;
+    }
+    
+    @Override
+    public boolean supportsRowOffset() {
+    	return true;
+    }
+    
+    @Override
+    public boolean supportsExcept() {
+        return true;
+    }
+    
+    @Override
+    public boolean supportsIntersect() {
+        return true;
+    }
+}

Deleted: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/hsql/HsqlTranslator.java
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/hsql/HsqlTranslator.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/hsql/HsqlTranslator.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -1,83 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership.  Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- * 
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- * 
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package org.teiid.translator.jdbc.hsql;
-
-import java.sql.Date;
-import java.sql.Time;
-import java.sql.Timestamp;
-
-import org.teiid.translator.ConnectorCapabilities;
-import org.teiid.translator.ConnectorException;
-import org.teiid.translator.SourceSystemFunctions;
-import org.teiid.translator.jdbc.ConvertModifier;
-import org.teiid.translator.jdbc.FunctionModifier;
-import org.teiid.translator.jdbc.JDBCExecutionFactory;
-import org.teiid.translator.jdbc.Translator;
-
-public class HsqlTranslator extends Translator {
-	
-	@Override
-	public void initialize(JDBCExecutionFactory env) throws ConnectorException {
-		super.initialize(env);
-		registerFunctionModifier(SourceSystemFunctions.TIMESTAMPADD, new AddDiffModifier(true, getLanguageFactory()));
-		registerFunctionModifier(SourceSystemFunctions.TIMESTAMPDIFF, new AddDiffModifier(false, getLanguageFactory())); 
-	
-		ConvertModifier convert = new ConvertModifier();
-		convert.addTypeMapping("boolean", FunctionModifier.BOOLEAN); //$NON-NLS-1$
-		convert.addTypeMapping("tinyint", FunctionModifier.BYTE); //$NON-NLS-1$
-		convert.addTypeMapping("smallint", FunctionModifier.SHORT); //$NON-NLS-1$
-		convert.addTypeMapping("int", FunctionModifier.INTEGER); //$NON-NLS-1$
-		convert.addTypeMapping("bigint", FunctionModifier.LONG); //$NON-NLS-1$
-		convert.addTypeMapping("real", FunctionModifier.FLOAT); //$NON-NLS-1$
-		convert.addTypeMapping("double", FunctionModifier.DOUBLE); //$NON-NLS-1$
-		convert.addTypeMapping("decimal", FunctionModifier.BIGDECIMAL); //$NON-NLS-1$
-		convert.addTypeMapping("decimal(38,0)", FunctionModifier.BIGINTEGER); //$NON-NLS-1$
-		convert.addTypeMapping("date", FunctionModifier.DATE); //$NON-NLS-1$
-		convert.addTypeMapping("time", FunctionModifier.TIME); //$NON-NLS-1$
-		convert.addTypeMapping("timestamp", FunctionModifier.TIMESTAMP); //$NON-NLS-1$
-		convert.addTypeMapping("char(1)", FunctionModifier.CHAR); //$NON-NLS-1$
-		convert.addTypeMapping("varchar", FunctionModifier.STRING); //$NON-NLS-1$
-		registerFunctionModifier(SourceSystemFunctions.CONVERT, convert);		
-	}
-	
-    @Override
-    public String translateLiteralDate(Date dateValue) {
-        return "DATE '" + formatDateValue(dateValue) + "'"; //$NON-NLS-1$//$NON-NLS-2$
-    }
-
-    @Override
-    public String translateLiteralTime(Time timeValue) {
-        return "TIME '" + formatDateValue(timeValue) + "'"; //$NON-NLS-1$//$NON-NLS-2$
-    }
-    
-    @Override
-    public String translateLiteralTimestamp(Timestamp timestampValue) {
-        return "TIMESTAMP '" + formatDateValue(timestampValue) + "'"; //$NON-NLS-1$//$NON-NLS-2$ 
-    }
-	
-	@Override
-	public Class<? extends ConnectorCapabilities> getDefaultCapabilities() {
-		return HsqlCapabilities.class;
-	}
-
-}

Deleted: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/informix/InformixCapabilities.java
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/informix/InformixCapabilities.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/informix/InformixCapabilities.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -1,45 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership.  Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- * 
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- * 
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-/*
- */
-package org.teiid.translator.jdbc.informix;
-
-import java.util.*;
-
-import org.teiid.translator.jdbc.JDBCCapabilities;
-
-
-/**
- */
-public class InformixCapabilities extends JDBCCapabilities {
-    /**
-     * @see org.teiid.resource.cci.data.ConnectorCapabilities#getSupportedFunctions()
-     */
-    public List getSupportedFunctions() {
-        List supportedFunctons = new ArrayList();
-        supportedFunctons.addAll(super.getSupportedFunctions());
-        supportedFunctons.add("CAST"); //$NON-NLS-1$
-        supportedFunctons.add("CONVERT"); //$NON-NLS-1$
-        return supportedFunctons;
-    }
-}

Copied: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/informix/InformixExecutionFactory.java (from rev 2121, trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/informix/InformixSQLTranslator.java)
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/informix/InformixExecutionFactory.java	                        (rev 0)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/informix/InformixExecutionFactory.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership.  Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ * 
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ * 
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+/*
+ */
+package org.teiid.translator.jdbc.informix;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.teiid.translator.ConnectorException;
+import org.teiid.translator.SourceSystemFunctions;
+import org.teiid.translator.jdbc.ConvertModifier;
+import org.teiid.translator.jdbc.JDBCExecutionFactory;
+
+
+/**
+ */
+public class InformixExecutionFactory extends JDBCExecutionFactory {
+
+	@Override
+	public void start() throws ConnectorException {
+		super.start();
+    	registerFunctionModifier(SourceSystemFunctions.CONVERT, new ConvertModifier());
+    }
+
+	@Override
+    public List getSupportedFunctions() {
+        List supportedFunctons = new ArrayList();
+        supportedFunctons.addAll(super.getSupportedFunctions());
+        supportedFunctons.add("CAST"); //$NON-NLS-1$
+        supportedFunctons.add("CONVERT"); //$NON-NLS-1$
+        return supportedFunctons;
+    }
+}

Deleted: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/informix/InformixSQLTranslator.java
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/informix/InformixSQLTranslator.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/informix/InformixSQLTranslator.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -1,50 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership.  Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- * 
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- * 
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-/*
- */
-package org.teiid.translator.jdbc.informix;
-
-import org.teiid.translator.ConnectorCapabilities;
-import org.teiid.translator.ConnectorException;
-import org.teiid.translator.SourceSystemFunctions;
-import org.teiid.translator.jdbc.ConvertModifier;
-import org.teiid.translator.jdbc.JDBCExecutionFactory;
-import org.teiid.translator.jdbc.Translator;
-
-
-/**
- */
-public class InformixSQLTranslator extends Translator {
-
-	@Override
-	public void initialize(JDBCExecutionFactory env) throws ConnectorException {
-		super.initialize(env);
-    	registerFunctionModifier(SourceSystemFunctions.CONVERT, new ConvertModifier());
-    }
-	
-	@Override
-	public Class<? extends ConnectorCapabilities> getDefaultCapabilities() {
-		return InformixCapabilities.class;
-	}
-    
-}

Deleted: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/mm/MMCapabilities.java
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/mm/MMCapabilities.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/mm/MMCapabilities.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -1,126 +0,0 @@
-/*
- * Copyright © 2000-2005 MetaMatrix, Inc.  All rights reserved.
- */
-/*
- */
-package org.teiid.translator.jdbc.mm;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.teiid.translator.jdbc.JDBCCapabilities;
-
-/** 
- * Capabilities compatible with MM 5.5.x
- */
-public class MMCapabilities extends JDBCCapabilities {
-    
-    public List<String> getSupportedFunctions() {
-        List<String> supportedFunctions = new ArrayList<String>();
-        supportedFunctions.addAll(super.getSupportedFunctions());
-        supportedFunctions.add("ABS"); //$NON-NLS-1$
-        supportedFunctions.add("ACOS"); //$NON-NLS-1$
-        supportedFunctions.add("ASIN"); //$NON-NLS-1$
-        supportedFunctions.add("ATAN"); //$NON-NLS-1$
-        supportedFunctions.add("ATAN2"); //$NON-NLS-1$
-        supportedFunctions.add("CEILING"); //$NON-NLS-1$
-        supportedFunctions.add("COS"); //$NON-NLS-1$
-        supportedFunctions.add("COT"); //$NON-NLS-1$
-        supportedFunctions.add("DEGREES"); //$NON-NLS-1$
-        supportedFunctions.add("EXP"); //$NON-NLS-1$
-        supportedFunctions.add("FLOOR"); //$NON-NLS-1$
-        supportedFunctions.add("FORMATBIGDECIMAL"); //$NON-NLS-1$
-        supportedFunctions.add("FORMATBIGINTEGER"); //$NON-NLS-1$
-        supportedFunctions.add("FORMATDOUBLE"); //$NON-NLS-1$
-        supportedFunctions.add("FORMATFLOAT"); //$NON-NLS-1$
-        supportedFunctions.add("FORMATINTEGER"); //$NON-NLS-1$
-        supportedFunctions.add("FORMATLONG"); //$NON-NLS-1$
-        supportedFunctions.add("LOG"); //$NON-NLS-1$
-        supportedFunctions.add("LOG10"); //$NON-NLS-1$
-        supportedFunctions.add("MOD"); //$NON-NLS-1$
-        supportedFunctions.add("PARSEBIGDECIMAL"); //$NON-NLS-1$
-        supportedFunctions.add("PARSEBIGINTEGER"); //$NON-NLS-1$
-        supportedFunctions.add("PARSEDOUBLE"); //$NON-NLS-1$
-        supportedFunctions.add("PARSEFLOAT"); //$NON-NLS-1$
-        supportedFunctions.add("PARSEINTEGER"); //$NON-NLS-1$
-        supportedFunctions.add("PARSELONG"); //$NON-NLS-1$
-        supportedFunctions.add("PI"); //$NON-NLS-1$
-        supportedFunctions.add("POWER"); //$NON-NLS-1$
-        supportedFunctions.add("RADIANS"); //$NON-NLS-1$
-        supportedFunctions.add("RAND"); //$NON-NLS-1$
-        supportedFunctions.add("ROUND"); //$NON-NLS-1$
-        supportedFunctions.add("SIGN"); //$NON-NLS-1$
-        supportedFunctions.add("SIN"); //$NON-NLS-1$
-        supportedFunctions.add("SQRT"); //$NON-NLS-1$
-        supportedFunctions.add("TAN"); //$NON-NLS-1$
-        supportedFunctions.add("ASCII"); //$NON-NLS-1$
-        supportedFunctions.add("CHAR"); //$NON-NLS-1$
-        supportedFunctions.add("CHR"); //$NON-NLS-1$
-        supportedFunctions.add("CONCAT"); //$NON-NLS-1$
-        supportedFunctions.add("CONCAT2"); //$NON-NLS-1$
-        supportedFunctions.add("||"); //$NON-NLS-1$
-        supportedFunctions.add("INITCAP"); //$NON-NLS-1$
-        supportedFunctions.add("INSERT"); //$NON-NLS-1$
-        supportedFunctions.add("LCASE"); //$NON-NLS-1$
-        supportedFunctions.add("LENGTH"); //$NON-NLS-1$
-        supportedFunctions.add("LEFT"); //$NON-NLS-1$
-        supportedFunctions.add("LOCATE"); //$NON-NLS-1$
-        supportedFunctions.add("LPAD"); //$NON-NLS-1$
-        supportedFunctions.add("LTRIM"); //$NON-NLS-1$
-        supportedFunctions.add("REPEAT"); //$NON-NLS-1$
-        supportedFunctions.add("REPLACE"); //$NON-NLS-1$
-        supportedFunctions.add("RPAD"); //$NON-NLS-1$
-        supportedFunctions.add("RIGHT"); //$NON-NLS-1$
-        supportedFunctions.add("RTRIM"); //$NON-NLS-1$
-        supportedFunctions.add("SUBSTRING"); //$NON-NLS-1$
-        supportedFunctions.add("TRANSLATE"); //$NON-NLS-1$
-        supportedFunctions.add("UCASE"); //$NON-NLS-1$
-        supportedFunctions.add("CURDATE"); //$NON-NLS-1$
-        supportedFunctions.add("CURTIME"); //$NON-NLS-1$
-        supportedFunctions.add("NOW"); //$NON-NLS-1$
-        supportedFunctions.add("DAYNAME"); //$NON-NLS-1$
-        supportedFunctions.add("DAYOFMONTH"); //$NON-NLS-1$
-        supportedFunctions.add("DAYOFWEEK"); //$NON-NLS-1$
-        supportedFunctions.add("DAYOFYEAR"); //$NON-NLS-1$
-        supportedFunctions.add("FORMATDATE"); //$NON-NLS-1$
-        supportedFunctions.add("FORMATTIME"); //$NON-NLS-1$
-        supportedFunctions.add("FORMATTIMESTAMP"); //$NON-NLS-1$
-        supportedFunctions.add("HOUR"); //$NON-NLS-1$
-        supportedFunctions.add("MINUTE"); //$NON-NLS-1$
-        supportedFunctions.add("MONTH"); //$NON-NLS-1$
-        supportedFunctions.add("MONTHNAME"); //$NON-NLS-1$
-        supportedFunctions.add("PARSEDATE"); //$NON-NLS-1$
-        supportedFunctions.add("PARSETIME"); //$NON-NLS-1$
-        supportedFunctions.add("PARSETIMESTAMP"); //$NON-NLS-1$
-        supportedFunctions.add("SECOND"); //$NON-NLS-1$
-        supportedFunctions.add("TIMESTAMPADD"); //$NON-NLS-1$
-        supportedFunctions.add("TIMESTAMPDIFF"); //$NON-NLS-1$
-        supportedFunctions.add("WEEK"); //$NON-NLS-1$
-        supportedFunctions.add("YEAR"); //$NON-NLS-1$
-        supportedFunctions.add("MODIFYTIMEZONE"); //$NON-NLS-1$
-        supportedFunctions.add("DECODESTRING"); //$NON-NLS-1$
-        supportedFunctions.add("DECODEINTEGER"); //$NON-NLS-1$
-        supportedFunctions.add("IFNULL"); //$NON-NLS-1$
-        supportedFunctions.add("NVL");      //$NON-NLS-1$ 
-        supportedFunctions.add("CAST"); //$NON-NLS-1$
-        supportedFunctions.add("CONVERT"); //$NON-NLS-1$
-        supportedFunctions.add("USER"); //$NON-NLS-1$
-        return supportedFunctions;
-    }
-    
-    public boolean supportsInlineViews() {
-        return true;
-    }
-
-    public boolean supportsFunctionsInGroupBy() {
-        return true;
-    }    
-    
-    public boolean supportsRowLimit() {
-        return true;
-    }
-    
-    public boolean supportsRowOffset() {
-        return true;
-    }
-}
\ No newline at end of file

Copied: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/mm/MetaMatrixExecutionFactory.java (from rev 2121, trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/mm/MMCapabilities.java)
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/mm/MetaMatrixExecutionFactory.java	                        (rev 0)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/mm/MetaMatrixExecutionFactory.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -0,0 +1,130 @@
+/*
+ * Copyright © 2000-2005 MetaMatrix, Inc.  All rights reserved.
+ */
+/*
+ */
+package org.teiid.translator.jdbc.mm;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.teiid.translator.jdbc.JDBCExecutionFactory;
+
+/** 
+ * Capabilities compatible with MM 5.5.x
+ */
+public class MetaMatrixExecutionFactory extends JDBCExecutionFactory {
+    
+    public List<String> getSupportedFunctions() {
+        List<String> supportedFunctions = new ArrayList<String>();
+        supportedFunctions.addAll(super.getSupportedFunctions());
+        supportedFunctions.add("ABS"); //$NON-NLS-1$
+        supportedFunctions.add("ACOS"); //$NON-NLS-1$
+        supportedFunctions.add("ASIN"); //$NON-NLS-1$
+        supportedFunctions.add("ATAN"); //$NON-NLS-1$
+        supportedFunctions.add("ATAN2"); //$NON-NLS-1$
+        supportedFunctions.add("CEILING"); //$NON-NLS-1$
+        supportedFunctions.add("COS"); //$NON-NLS-1$
+        supportedFunctions.add("COT"); //$NON-NLS-1$
+        supportedFunctions.add("DEGREES"); //$NON-NLS-1$
+        supportedFunctions.add("EXP"); //$NON-NLS-1$
+        supportedFunctions.add("FLOOR"); //$NON-NLS-1$
+        supportedFunctions.add("FORMATBIGDECIMAL"); //$NON-NLS-1$
+        supportedFunctions.add("FORMATBIGINTEGER"); //$NON-NLS-1$
+        supportedFunctions.add("FORMATDOUBLE"); //$NON-NLS-1$
+        supportedFunctions.add("FORMATFLOAT"); //$NON-NLS-1$
+        supportedFunctions.add("FORMATINTEGER"); //$NON-NLS-1$
+        supportedFunctions.add("FORMATLONG"); //$NON-NLS-1$
+        supportedFunctions.add("LOG"); //$NON-NLS-1$
+        supportedFunctions.add("LOG10"); //$NON-NLS-1$
+        supportedFunctions.add("MOD"); //$NON-NLS-1$
+        supportedFunctions.add("PARSEBIGDECIMAL"); //$NON-NLS-1$
+        supportedFunctions.add("PARSEBIGINTEGER"); //$NON-NLS-1$
+        supportedFunctions.add("PARSEDOUBLE"); //$NON-NLS-1$
+        supportedFunctions.add("PARSEFLOAT"); //$NON-NLS-1$
+        supportedFunctions.add("PARSEINTEGER"); //$NON-NLS-1$
+        supportedFunctions.add("PARSELONG"); //$NON-NLS-1$
+        supportedFunctions.add("PI"); //$NON-NLS-1$
+        supportedFunctions.add("POWER"); //$NON-NLS-1$
+        supportedFunctions.add("RADIANS"); //$NON-NLS-1$
+        supportedFunctions.add("RAND"); //$NON-NLS-1$
+        supportedFunctions.add("ROUND"); //$NON-NLS-1$
+        supportedFunctions.add("SIGN"); //$NON-NLS-1$
+        supportedFunctions.add("SIN"); //$NON-NLS-1$
+        supportedFunctions.add("SQRT"); //$NON-NLS-1$
+        supportedFunctions.add("TAN"); //$NON-NLS-1$
+        supportedFunctions.add("ASCII"); //$NON-NLS-1$
+        supportedFunctions.add("CHAR"); //$NON-NLS-1$
+        supportedFunctions.add("CHR"); //$NON-NLS-1$
+        supportedFunctions.add("CONCAT"); //$NON-NLS-1$
+        supportedFunctions.add("CONCAT2"); //$NON-NLS-1$
+        supportedFunctions.add("||"); //$NON-NLS-1$
+        supportedFunctions.add("INITCAP"); //$NON-NLS-1$
+        supportedFunctions.add("INSERT"); //$NON-NLS-1$
+        supportedFunctions.add("LCASE"); //$NON-NLS-1$
+        supportedFunctions.add("LENGTH"); //$NON-NLS-1$
+        supportedFunctions.add("LEFT"); //$NON-NLS-1$
+        supportedFunctions.add("LOCATE"); //$NON-NLS-1$
+        supportedFunctions.add("LPAD"); //$NON-NLS-1$
+        supportedFunctions.add("LTRIM"); //$NON-NLS-1$
+        supportedFunctions.add("REPEAT"); //$NON-NLS-1$
+        supportedFunctions.add("REPLACE"); //$NON-NLS-1$
+        supportedFunctions.add("RPAD"); //$NON-NLS-1$
+        supportedFunctions.add("RIGHT"); //$NON-NLS-1$
+        supportedFunctions.add("RTRIM"); //$NON-NLS-1$
+        supportedFunctions.add("SUBSTRING"); //$NON-NLS-1$
+        supportedFunctions.add("TRANSLATE"); //$NON-NLS-1$
+        supportedFunctions.add("UCASE"); //$NON-NLS-1$
+        supportedFunctions.add("CURDATE"); //$NON-NLS-1$
+        supportedFunctions.add("CURTIME"); //$NON-NLS-1$
+        supportedFunctions.add("NOW"); //$NON-NLS-1$
+        supportedFunctions.add("DAYNAME"); //$NON-NLS-1$
+        supportedFunctions.add("DAYOFMONTH"); //$NON-NLS-1$
+        supportedFunctions.add("DAYOFWEEK"); //$NON-NLS-1$
+        supportedFunctions.add("DAYOFYEAR"); //$NON-NLS-1$
+        supportedFunctions.add("FORMATDATE"); //$NON-NLS-1$
+        supportedFunctions.add("FORMATTIME"); //$NON-NLS-1$
+        supportedFunctions.add("FORMATTIMESTAMP"); //$NON-NLS-1$
+        supportedFunctions.add("HOUR"); //$NON-NLS-1$
+        supportedFunctions.add("MINUTE"); //$NON-NLS-1$
+        supportedFunctions.add("MONTH"); //$NON-NLS-1$
+        supportedFunctions.add("MONTHNAME"); //$NON-NLS-1$
+        supportedFunctions.add("PARSEDATE"); //$NON-NLS-1$
+        supportedFunctions.add("PARSETIME"); //$NON-NLS-1$
+        supportedFunctions.add("PARSETIMESTAMP"); //$NON-NLS-1$
+        supportedFunctions.add("SECOND"); //$NON-NLS-1$
+        supportedFunctions.add("TIMESTAMPADD"); //$NON-NLS-1$
+        supportedFunctions.add("TIMESTAMPDIFF"); //$NON-NLS-1$
+        supportedFunctions.add("WEEK"); //$NON-NLS-1$
+        supportedFunctions.add("YEAR"); //$NON-NLS-1$
+        supportedFunctions.add("MODIFYTIMEZONE"); //$NON-NLS-1$
+        supportedFunctions.add("DECODESTRING"); //$NON-NLS-1$
+        supportedFunctions.add("DECODEINTEGER"); //$NON-NLS-1$
+        supportedFunctions.add("IFNULL"); //$NON-NLS-1$
+        supportedFunctions.add("NVL");      //$NON-NLS-1$ 
+        supportedFunctions.add("CAST"); //$NON-NLS-1$
+        supportedFunctions.add("CONVERT"); //$NON-NLS-1$
+        supportedFunctions.add("USER"); //$NON-NLS-1$
+        return supportedFunctions;
+    }
+    
+    @Override
+    public boolean supportsInlineViews() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsFunctionsInGroupBy() {
+        return true;
+    }    
+    
+    @Override
+    public boolean supportsRowLimit() {
+        return true;
+    }
+    
+    @Override
+    public boolean supportsRowOffset() {
+        return true;
+    }
+}
\ No newline at end of file

Deleted: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/mysql/MySQL5Capabilities.java
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/mysql/MySQL5Capabilities.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/mysql/MySQL5Capabilities.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -1,49 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership.  Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- * 
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- * 
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package org.teiid.translator.jdbc.mysql;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.teiid.translator.SourceSystemFunctions;
-
-
-
-/** 
- * @since 4.3
- */
-public class MySQL5Capabilities extends MySQLCapabilities {
-
-    public List<String> getSupportedFunctions() {
-        List<String> supportedFunctions = new ArrayList<String>();
-        supportedFunctions.addAll(super.getSupportedFunctions());
-        supportedFunctions.add(SourceSystemFunctions.TIMESTAMPADD);
-        supportedFunctions.add(SourceSystemFunctions.TIMESTAMPDIFF);
-        return supportedFunctions;
-    }
-    
-    @Override
-    public boolean supportsInlineViews() {
-    	return true;
-    }
-}

Copied: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/mysql/MySQL5ExecutionFactory.java (from rev 2121, trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/mysql/MySQL5Translator.java)
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/mysql/MySQL5ExecutionFactory.java	                        (rev 0)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/mysql/MySQL5ExecutionFactory.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -0,0 +1,62 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership.  Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ * 
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ * 
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.translator.jdbc.mysql;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.teiid.language.Function;
+import org.teiid.translator.ConnectorException;
+import org.teiid.translator.SourceSystemFunctions;
+import org.teiid.translator.jdbc.FunctionModifier;
+
+public class MySQL5ExecutionFactory extends MySQLExecutionFactory {
+	
+	@Override
+    public void start() throws ConnectorException {
+        super.start();
+        registerFunctionModifier(SourceSystemFunctions.CHAR, new FunctionModifier() {
+			
+			@Override
+			public List<?> translate(Function function) {
+				return Arrays.asList("char(", function.getParameters().get(0), " USING ASCII)"); //$NON-NLS-1$ //$NON-NLS-2$
+			}
+		});
+	}
+	
+	@Override
+    public List<String> getSupportedFunctions() {
+        List<String> supportedFunctions = new ArrayList<String>();
+        supportedFunctions.addAll(super.getSupportedFunctions());
+        supportedFunctions.add(SourceSystemFunctions.TIMESTAMPADD);
+        supportedFunctions.add(SourceSystemFunctions.TIMESTAMPDIFF);
+        return supportedFunctions;
+    }
+    
+    @Override
+    public boolean supportsInlineViews() {
+    	return true;
+    }
+	
+}

Deleted: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/mysql/MySQL5Translator.java
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/mysql/MySQL5Translator.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/mysql/MySQL5Translator.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -1,54 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership.  Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- * 
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- * 
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package org.teiid.translator.jdbc.mysql;
-
-import java.util.Arrays;
-import java.util.List;
-
-import org.teiid.language.Function;
-import org.teiid.translator.ConnectorCapabilities;
-import org.teiid.translator.ConnectorException;
-import org.teiid.translator.SourceSystemFunctions;
-import org.teiid.translator.jdbc.FunctionModifier;
-import org.teiid.translator.jdbc.JDBCExecutionFactory;
-
-public class MySQL5Translator extends MySQLTranslator {
-	
-	@Override
-    public void initialize(JDBCExecutionFactory env) throws ConnectorException {
-        super.initialize(env);
-        registerFunctionModifier(SourceSystemFunctions.CHAR, new FunctionModifier() {
-			
-			@Override
-			public List<?> translate(Function function) {
-				return Arrays.asList("char(", function.getParameters().get(0), " USING ASCII)"); //$NON-NLS-1$ //$NON-NLS-2$
-			}
-		});
-	}
-	
-	@Override
-	public Class<? extends ConnectorCapabilities> getDefaultCapabilities() {
-		return MySQL5Capabilities.class;
-	}
-	
-}

Deleted: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/mysql/MySQLCapabilities.java
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/mysql/MySQLCapabilities.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/mysql/MySQLCapabilities.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -1,282 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership.  Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- * 
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- * 
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package org.teiid.translator.jdbc.mysql;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.teiid.translator.SourceSystemFunctions;
-import org.teiid.translator.jdbc.JDBCCapabilities;
-
-
-
-/** 
- * @since 4.3
- */
-public class MySQLCapabilities extends JDBCCapabilities {
-
-    public List<String> getSupportedFunctions() {
-        List<String> supportedFunctions = new ArrayList<String>();
-        supportedFunctions.addAll(super.getSupportedFunctions());
-
-        supportedFunctions.add(SourceSystemFunctions.ABS); 
-        supportedFunctions.add(SourceSystemFunctions.ACOS); 
-        supportedFunctions.add(SourceSystemFunctions.ASIN);
-        supportedFunctions.add(SourceSystemFunctions.ATAN);
-        supportedFunctions.add(SourceSystemFunctions.ATAN2);
-        supportedFunctions.add(SourceSystemFunctions.BITAND);
-        supportedFunctions.add(SourceSystemFunctions.BITNOT);
-        supportedFunctions.add(SourceSystemFunctions.BITOR);
-        supportedFunctions.add(SourceSystemFunctions.BITXOR);
-        supportedFunctions.add(SourceSystemFunctions.CEILING);
-        supportedFunctions.add(SourceSystemFunctions.COS);
-        supportedFunctions.add(SourceSystemFunctions.COT);
-        supportedFunctions.add(SourceSystemFunctions.DEGREES);
-        supportedFunctions.add(SourceSystemFunctions.EXP);
-        supportedFunctions.add(SourceSystemFunctions.FLOOR);
-        supportedFunctions.add(SourceSystemFunctions.LOG);
-        supportedFunctions.add(SourceSystemFunctions.LOG10);
-        supportedFunctions.add(SourceSystemFunctions.MOD);
-        supportedFunctions.add(SourceSystemFunctions.PI);
-        supportedFunctions.add(SourceSystemFunctions.POWER);
-        supportedFunctions.add(SourceSystemFunctions.RADIANS);
-        supportedFunctions.add(SourceSystemFunctions.ROUND);
-        supportedFunctions.add(SourceSystemFunctions.SIGN);
-        supportedFunctions.add(SourceSystemFunctions.SIN);
-        supportedFunctions.add(SourceSystemFunctions.SQRT);
-        supportedFunctions.add(SourceSystemFunctions.TAN);
-
-        supportedFunctions.add(SourceSystemFunctions.ASCII);
-        supportedFunctions.add(SourceSystemFunctions.CHAR);
-        supportedFunctions.add(SourceSystemFunctions.CONCAT);
-        supportedFunctions.add(SourceSystemFunctions.INSERT);
-        supportedFunctions.add(SourceSystemFunctions.LCASE);
-        supportedFunctions.add(SourceSystemFunctions.LEFT);
-        supportedFunctions.add(SourceSystemFunctions.LENGTH);
-        supportedFunctions.add(SourceSystemFunctions.LOCATE);
-        supportedFunctions.add(SourceSystemFunctions.LPAD);
-        supportedFunctions.add(SourceSystemFunctions.LTRIM);
-        supportedFunctions.add(SourceSystemFunctions.REPEAT);
-        supportedFunctions.add(SourceSystemFunctions.REPLACE);
-        supportedFunctions.add(SourceSystemFunctions.RIGHT);
-        supportedFunctions.add(SourceSystemFunctions.RPAD);
-        supportedFunctions.add(SourceSystemFunctions.RTRIM);
-        supportedFunctions.add(SourceSystemFunctions.SUBSTRING);
-        supportedFunctions.add(SourceSystemFunctions.UCASE);
-        
-        // These are executed within the server and never pushed down
-//        supportedFunctions.add("CURDATE"); //$NON-NLS-1$
-//        supportedFunctions.add("CURTIME"); //$NON-NLS-1$
-//        supportedFunctions.add("NOW"); //$NON-NLS-1$
-        supportedFunctions.add(SourceSystemFunctions.DAYNAME);
-        supportedFunctions.add(SourceSystemFunctions.DAYOFMONTH);
-        supportedFunctions.add(SourceSystemFunctions.DAYOFWEEK);
-        supportedFunctions.add(SourceSystemFunctions.DAYOFYEAR);
-        
-        // These should not be pushed down since the grammar for string conversion is different
-//        supportedFunctions.add("FORMATDATE"); //$NON-NLS-1$
-//        supportedFunctions.add("FORMATTIME"); //$NON-NLS-1$
-//        supportedFunctions.add("FORMATTIMESTAMP"); //$NON-NLS-1$
-        supportedFunctions.add(SourceSystemFunctions.HOUR);
-        supportedFunctions.add(SourceSystemFunctions.MINUTE);
-        supportedFunctions.add(SourceSystemFunctions.MONTH);
-        supportedFunctions.add(SourceSystemFunctions.MONTHNAME);
-        
-        // These should not be pushed down since the grammar for string conversion is different
-//        supportedFunctions.add("PARSEDATE"); //$NON-NLS-1$
-//        supportedFunctions.add("PARSETIME"); //$NON-NLS-1$
-//        supportedFunctions.add("PARSETIMESTAMP"); //$NON-NLS-1$
-        supportedFunctions.add(SourceSystemFunctions.QUARTER);
-        supportedFunctions.add(SourceSystemFunctions.SECOND);
-//        supportedFunctions.add(SourceSystemFunctions.TIMESTAMPADD);
-//        supportedFunctions.add(SourceSystemFunctions.TIMESTAMPDIFF);
-        supportedFunctions.add(SourceSystemFunctions.WEEK);
-        supportedFunctions.add(SourceSystemFunctions.YEAR);
-
-        supportedFunctions.add(SourceSystemFunctions.CONVERT);
-        supportedFunctions.add(SourceSystemFunctions.IFNULL);
-        supportedFunctions.add(SourceSystemFunctions.COALESCE);
-        
-//        supportedFunctions.add("GREATEST"); //$NON-NLS-1$
-//        supportedFunctions.add("ISNULL"); //$NON-NLS-1$
-//        supportedFunctions.add("LEAST"); //$NON-NLS-1$
-//        supportedFunctions.add("STRCMP"); // String-specific //$NON-NLS-1$
-//        
-//        // String
-//        supportedFunctions.add("BIN"); //$NON-NLS-1$
-//        supportedFunctions.add("BIT_LENGTH"); //$NON-NLS-1$
-//        supportedFunctions.add("CHAR_LENGTH"); //$NON-NLS-1$
-//        supportedFunctions.add("CHARACTER_LENGTH"); //$NON-NLS-1$
-//        supportedFunctions.add("COMPRESS"); //$NON-NLS-1$
-//        supportedFunctions.add("CONCAT_WS"); //$NON-NLS-1$
-//        supportedFunctions.add("CONV"); //$NON-NLS-1$
-//        supportedFunctions.add("ELT"); //$NON-NLS-1$
-//        supportedFunctions.add("EXPORT_SET"); //$NON-NLS-1$
-//        supportedFunctions.add("FIELD"); //$NON-NLS-1$
-//        supportedFunctions.add("FIND_IN_SET"); //$NON-NLS-1$
-//        supportedFunctions.add("FORMAT"); //$NON-NLS-1$
-//        supportedFunctions.add("HEX"); //$NON-NLS-1$
-//        supportedFunctions.add("INSTR"); //$NON-NLS-1$
-//        supportedFunctions.add("LOAD_FILE"); //$NON-NLS-1$
-//        supportedFunctions.add("MAKE_SET"); //$NON-NLS-1$
-//        supportedFunctions.add("MID"); //$NON-NLS-1$
-//        supportedFunctions.add("OCT"); //$NON-NLS-1$
-//        supportedFunctions.add("OCTET_LENGTH"); //$NON-NLS-1$
-//        supportedFunctions.add("ORD"); //$NON-NLS-1$
-//        supportedFunctions.add("QUOTE"); //$NON-NLS-1$
-//        supportedFunctions.add("REVERSE"); //$NON-NLS-1$
-//        supportedFunctions.add("SOUNDEX"); //$NON-NLS-1$
-//        supportedFunctions.add("SPACE"); //$NON-NLS-1$
-//        supportedFunctions.add("SUBSTR"); //$NON-NLS-1$
-//        supportedFunctions.add("SUBSTRING_INDEX"); //$NON-NLS-1$
-//        supportedFunctions.add("TRIM"); //$NON-NLS-1$
-//        supportedFunctions.add("UNCOMPRESS"); //$NON-NLS-1$
-//        supportedFunctions.add("UNHEX"); //$NON-NLS-1$
-//        
-//        // Math
-//        supportedFunctions.add("CEIL"); //$NON-NLS-1$
-//        supportedFunctions.add("CRC32"); //$NON-NLS-1$
-//          // DIV is an operator equivalent to '/'
-//        supportedFunctions.add("DIV"); //$NON-NLS-1$
-//        supportedFunctions.add("FORMAT"); //$NON-NLS-1$
-//        supportedFunctions.add("LN"); //$NON-NLS-1$
-//        supportedFunctions.add("LOG2"); //$NON-NLS-1$
-//        supportedFunctions.add("POW"); //$NON-NLS-1$
-//        supportedFunctions.add("RAND"); //$NON-NLS-1$
-//        supportedFunctions.add("TRUNCATE"); //$NON-NLS-1$
-//        
-//        // Date / Time
-//        supportedFunctions.add("ADDDATE"); //$NON-NLS-1$
-//        supportedFunctions.add("ADDTIME"); //$NON-NLS-1$
-//        supportedFunctions.add("CONVERT_TZ"); //$NON-NLS-1$
-//        supportedFunctions.add("CURRENT_DATE"); //$NON-NLS-1$
-//        supportedFunctions.add("CURRENT_TIME"); //$NON-NLS-1$
-//        supportedFunctions.add("CURRENT_TIMESTAMP"); //$NON-NLS-1$
-//        supportedFunctions.add("DATE"); //$NON-NLS-1$
-//        supportedFunctions.add("DATEDIFF"); //$NON-NLS-1$
-////        supportedFunctions.add("DATE_ADD");
-////        supportedFunctions.add("DATE_SUB");
-//        supportedFunctions.add("DATE_FORMAT"); //$NON-NLS-1$
-//        supportedFunctions.add("DAY"); //$NON-NLS-1$
-////        supportedFunctions.add("EXTRACT");
-//        supportedFunctions.add("FROM_DAYS"); //$NON-NLS-1$
-//        supportedFunctions.add("FROM_UNIXTIME"); //$NON-NLS-1$
-//        supportedFunctions.add("GET_FORMAT"); //$NON-NLS-1$
-//        supportedFunctions.add("LAST_DAY"); //$NON-NLS-1$
-//        supportedFunctions.add("LOCALTIME"); //$NON-NLS-1$
-//        supportedFunctions.add("LOCALTIMESTAMP"); //$NON-NLS-1$
-//        supportedFunctions.add("MAKEDATE"); //$NON-NLS-1$
-//        supportedFunctions.add("MAKETIME"); //$NON-NLS-1$
-//        supportedFunctions.add("MICROSECOND"); //$NON-NLS-1$
-//        supportedFunctions.add("PERIOD_ADD"); //$NON-NLS-1$
-//        supportedFunctions.add("PERIOD_DIFF"); //$NON-NLS-1$
-//        supportedFunctions.add("SEC_TO_TIME"); //$NON-NLS-1$
-//        supportedFunctions.add("STR_TO_DATE"); //$NON-NLS-1$
-//        supportedFunctions.add("SUBDATE"); //$NON-NLS-1$
-//        supportedFunctions.add("SUBTIME"); //$NON-NLS-1$
-//        supportedFunctions.add("SYSDATE"); //$NON-NLS-1$
-//        supportedFunctions.add("TIME"); //$NON-NLS-1$
-//        supportedFunctions.add("TIMEDIFF"); //$NON-NLS-1$
-//        supportedFunctions.add("TIMESTAMP"); //$NON-NLS-1$
-//        supportedFunctions.add("TIME_FORMAT"); //$NON-NLS-1$
-//        supportedFunctions.add("TIME_TO_SEC"); //$NON-NLS-1$
-//        supportedFunctions.add("TO_DAYS"); //$NON-NLS-1$
-//        supportedFunctions.add("UNIX_TIMESTAMP"); //$NON-NLS-1$
-//        supportedFunctions.add("UTC_DATE"); //$NON-NLS-1$
-//        supportedFunctions.add("UTC_TIME"); //$NON-NLS-1$
-//        supportedFunctions.add("UTC_TIMESTAMP"); //$NON-NLS-1$
-//        supportedFunctions.add("WEEKDAY"); //$NON-NLS-1$
-//        supportedFunctions.add("WEEKOFYEAR"); //$NON-NLS-1$
-//        supportedFunctions.add("YEARWEEK"); //$NON-NLS-1$
-//        
-//        // Bit
-//        supportedFunctions.add("|"); //$NON-NLS-1$
-//        supportedFunctions.add("&"); //$NON-NLS-1$
-//        supportedFunctions.add("^"); //$NON-NLS-1$
-//        supportedFunctions.add("<<"); //$NON-NLS-1$
-//        supportedFunctions.add(">>"); //$NON-NLS-1$
-//        supportedFunctions.add("~"); //$NON-NLS-1$
-//        supportedFunctions.add("BIT_COUNT"); //$NON-NLS-1$
-//        
-//        // Encryption
-//        supportedFunctions.add("AES_ENCRYPT"); //$NON-NLS-1$
-//        supportedFunctions.add("AES_DECRYPT"); //$NON-NLS-1$
-//        supportedFunctions.add("DECODE"); //$NON-NLS-1$
-//        supportedFunctions.add("ENCODE"); //$NON-NLS-1$
-//        supportedFunctions.add("DES_ENCRYPT"); //$NON-NLS-1$
-//        supportedFunctions.add("DES_DECRYPT"); //$NON-NLS-1$
-//        supportedFunctions.add("MD5"); //$NON-NLS-1$
-//        supportedFunctions.add("OLD_PASSWORD"); //$NON-NLS-1$
-//        supportedFunctions.add("PASSWORD"); //$NON-NLS-1$
-//        supportedFunctions.add("SHA"); //$NON-NLS-1$
-//        supportedFunctions.add("SHA1"); //$NON-NLS-1$
-//        
-//        // Information
-//        supportedFunctions.add("BENCHMARK"); //$NON-NLS-1$
-//        supportedFunctions.add("CHARSET"); //$NON-NLS-1$
-//        supportedFunctions.add("COERCIBILITY"); //$NON-NLS-1$
-//        supportedFunctions.add("COLLATION"); //$NON-NLS-1$
-//        supportedFunctions.add("CONNECTION_ID"); //$NON-NLS-1$
-//        supportedFunctions.add("CURRENT_USER"); //$NON-NLS-1$
-//        supportedFunctions.add("DATABASE"); //$NON-NLS-1$
-//        supportedFunctions.add("FOUND_ROWS"); //$NON-NLS-1$
-//        supportedFunctions.add("LAST_INSERT_ID"); //$NON-NLS-1$
-//        supportedFunctions.add("ROW_COUNT"); //$NON-NLS-1$
-//        supportedFunctions.add("SCHEMA"); //$NON-NLS-1$
-//        supportedFunctions.add("SESSION_USER"); //$NON-NLS-1$
-//        supportedFunctions.add("SYSTEM_USER"); //$NON-NLS-1$
-//        supportedFunctions.add("USER"); //$NON-NLS-1$
-//        supportedFunctions.add("VERSION"); //$NON-NLS-1$
-//        
-//        // Misc.
-//        supportedFunctions.add("DEFAULT"); //$NON-NLS-1$
-//        supportedFunctions.add("FORMAT"); //$NON-NLS-1$
-////        supportedFunctions.add("GET_LOCK"); //$NON-NLS-1$
-//        supportedFunctions.add("INET_ATON"); //$NON-NLS-1$
-//        supportedFunctions.add("INET_NTOA"); //$NON-NLS-1$
-////        supportedFunctions.add("IS_FREE_LOCK"); //$NON-NLS-1$
-////        supportedFunctions.add("IS_USED_LOCK"); //$NON-NLS-1$
-////        supportedFunctions.add("MASTER_POS_WAIT"); //$NON-NLS-1$
-////        supportedFunctions.add("NAME_CONST"); //$NON-NLS-1$
-////        supportedFunctions.add("RELEASE_LOCK"); //$NON-NLS-1$
-////        supportedFunctions.add("SLEEP"); //$NON-NLS-1$
-//        supportedFunctions.add("UUID"); //$NON-NLS-1$
-//        supportedFunctions.add("VALUES"); //$NON-NLS-1$
-        return supportedFunctions;
-    }
-
-    public boolean supportsFullOuterJoins() {
-        return false;
-    }
-    
-    public boolean supportsAggregatesDistinct() {
-        return false;
-    }
-        
-    public boolean supportsRowLimit() {
-        return true;
-    }
-    public boolean supportsRowOffset() {
-        return true;
-    }
-}

Copied: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/mysql/MySQLExecutionFactory.java (from rev 2121, trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/mysql/MySQLTranslator.java)
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/mysql/MySQLExecutionFactory.java	                        (rev 0)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/mysql/MySQLExecutionFactory.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -0,0 +1,398 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership.  Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ * 
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ * 
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.translator.jdbc.mysql;
+
+import java.sql.Connection;
+import java.sql.Date;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.sql.Time;
+import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.teiid.language.Function;
+import org.teiid.logging.LogConstants;
+import org.teiid.logging.LogManager;
+import org.teiid.translator.ConnectorException;
+import org.teiid.translator.SourceSystemFunctions;
+import org.teiid.translator.TypeFacility;
+import org.teiid.translator.jdbc.ConvertModifier;
+import org.teiid.translator.jdbc.FunctionModifier;
+import org.teiid.translator.jdbc.JDBCExecutionFactory;
+import org.teiid.translator.jdbc.LocateFunctionModifier;
+
+
+/** 
+ * @since 4.3
+ */
+public class MySQLExecutionFactory extends JDBCExecutionFactory {
+	
+	/**
+	 * Adds support for the 2 argument form of padding
+	 */
+	private final class PadFunctionModifier extends FunctionModifier {
+		@Override
+		public List<?> translate(Function function) {
+			if (function.getParameters().size() == 2) {
+				function.getParameters().add(getLanguageFactory().createLiteral(" ", TypeFacility.RUNTIME_TYPES.STRING)); //$NON-NLS-1$
+			}
+			return null;
+		}
+	}
+
+	@Override
+    public void start() throws ConnectorException {
+        super.start();
+        registerFunctionModifier(SourceSystemFunctions.BITAND, new BitFunctionModifier("&", getLanguageFactory())); //$NON-NLS-1$
+        registerFunctionModifier(SourceSystemFunctions.BITNOT, new BitFunctionModifier("~", getLanguageFactory())); //$NON-NLS-1$
+        registerFunctionModifier(SourceSystemFunctions.BITOR, new BitFunctionModifier("|", getLanguageFactory())); //$NON-NLS-1$
+        registerFunctionModifier(SourceSystemFunctions.BITXOR, new BitFunctionModifier("^", getLanguageFactory())); //$NON-NLS-1$
+        registerFunctionModifier(SourceSystemFunctions.LOCATE, new LocateFunctionModifier(getLanguageFactory()));
+        registerFunctionModifier(SourceSystemFunctions.LPAD, new PadFunctionModifier());
+        registerFunctionModifier(SourceSystemFunctions.RPAD, new PadFunctionModifier());
+        //add in type conversion
+        ConvertModifier convertModifier = new ConvertModifier();
+        convertModifier.addTypeMapping("signed", FunctionModifier.BOOLEAN, FunctionModifier.BYTE, FunctionModifier.SHORT, FunctionModifier.INTEGER, FunctionModifier.LONG); //$NON-NLS-1$
+    	//char(n) assume 4.1 or later
+    	convertModifier.addTypeMapping("char(1)", FunctionModifier.CHAR); //$NON-NLS-1$
+    	convertModifier.addTypeMapping("char", FunctionModifier.STRING); //$NON-NLS-1$
+    	convertModifier.addTypeMapping("date", FunctionModifier.DATE); //$NON-NLS-1$
+    	convertModifier.addTypeMapping("time", FunctionModifier.TIME); //$NON-NLS-1$
+    	convertModifier.addTypeMapping("timestamp", FunctionModifier.TIMESTAMP); //$NON-NLS-1$
+    	convertModifier.addConvert(FunctionModifier.STRING, FunctionModifier.DATE, new ConvertModifier.FormatModifier("DATE")); //$NON-NLS-1$
+    	convertModifier.addConvert(FunctionModifier.STRING, FunctionModifier.TIME, new ConvertModifier.FormatModifier("TIME")); //$NON-NLS-1$
+    	convertModifier.addConvert(FunctionModifier.STRING, FunctionModifier.TIMESTAMP, new ConvertModifier.FormatModifier("TIMESTAMP")); //$NON-NLS-1$
+    	convertModifier.addConvert(FunctionModifier.DATE, FunctionModifier.STRING, new ConvertModifier.FormatModifier("date_format", "%Y-%m-%d")); //$NON-NLS-1$ //$NON-NLS-2$
+    	convertModifier.addConvert(FunctionModifier.TIME, FunctionModifier.STRING, new ConvertModifier.FormatModifier("date_format", "%H:%i:%S")); //$NON-NLS-1$ //$NON-NLS-2$
+    	convertModifier.addConvert(FunctionModifier.TIMESTAMP, FunctionModifier.STRING, new ConvertModifier.FormatModifier("date_format", "%Y-%m-%d %H:%i:%S.%f")); //$NON-NLS-1$ //$NON-NLS-2$
+    	convertModifier.addTypeConversion(new FunctionModifier() {
+			@Override
+			public List<?> translate(Function function) {
+				return Arrays.asList(function.getParameters().get(0), " + 0.0"); //$NON-NLS-1$
+			}
+		}, FunctionModifier.BIGDECIMAL, FunctionModifier.BIGINTEGER, FunctionModifier.FLOAT, FunctionModifier.DOUBLE);
+    	convertModifier.addNumericBooleanConversions();
+    	convertModifier.setWideningNumericImplicit(true);
+    	registerFunctionModifier(SourceSystemFunctions.CONVERT, convertModifier);
+    }  
+	
+	@Override
+    public String translateLiteralDate(Date dateValue) {
+        return "DATE('" + formatDateValue(dateValue) + "')";  //$NON-NLS-1$//$NON-NLS-2$
+    }
+
+	@Override
+    public String translateLiteralTime(Time timeValue) {
+        return "TIME('" + formatDateValue(timeValue) + "')";  //$NON-NLS-1$//$NON-NLS-2$
+    }
+
+	@Override
+    public String translateLiteralTimestamp(Timestamp timestampValue) {
+        return "{ts '" + formatDateValue(timestampValue) + "'}";  //$NON-NLS-1$//$NON-NLS-2$
+    }
+	
+	@Override
+	public boolean useParensForSetQueries() {
+		return true;
+	}
+	
+	@Override
+	public int getTimestampNanoPrecision() {
+		return 0;
+	}
+	
+	@Override
+	public void afterConnectionCreation(Connection connection) {
+		super.afterConnectionCreation(connection);
+		
+		Statement stmt = null;
+		try {
+			stmt = connection.createStatement();
+			stmt.execute("set SESSION sql_mode = 'ANSI'"); //$NON-NLS-1$
+		} catch (SQLException e) {
+			LogManager.logError(LogConstants.CTX_CONNECTOR,  e, "Error setting ANSI mode"); //$NON-NLS-1$
+		} finally {
+			if (stmt != null) {
+				try {
+					stmt.close();
+				} catch (SQLException e) {
+					LogManager.logDetail("Error closing statement", e); //$NON-NLS-1$
+				}
+			}
+		}
+	}
+	@Override
+    public boolean useParensForJoins() {
+    	return true;
+    }
+    
+    @Override
+    public List<String> getSupportedFunctions() {
+        List<String> supportedFunctions = new ArrayList<String>();
+        supportedFunctions.addAll(super.getSupportedFunctions());
+
+        supportedFunctions.add(SourceSystemFunctions.ABS); 
+        supportedFunctions.add(SourceSystemFunctions.ACOS); 
+        supportedFunctions.add(SourceSystemFunctions.ASIN);
+        supportedFunctions.add(SourceSystemFunctions.ATAN);
+        supportedFunctions.add(SourceSystemFunctions.ATAN2);
+        supportedFunctions.add(SourceSystemFunctions.BITAND);
+        supportedFunctions.add(SourceSystemFunctions.BITNOT);
+        supportedFunctions.add(SourceSystemFunctions.BITOR);
+        supportedFunctions.add(SourceSystemFunctions.BITXOR);
+        supportedFunctions.add(SourceSystemFunctions.CEILING);
+        supportedFunctions.add(SourceSystemFunctions.COS);
+        supportedFunctions.add(SourceSystemFunctions.COT);
+        supportedFunctions.add(SourceSystemFunctions.DEGREES);
+        supportedFunctions.add(SourceSystemFunctions.EXP);
+        supportedFunctions.add(SourceSystemFunctions.FLOOR);
+        supportedFunctions.add(SourceSystemFunctions.LOG);
+        supportedFunctions.add(SourceSystemFunctions.LOG10);
+        supportedFunctions.add(SourceSystemFunctions.MOD);
+        supportedFunctions.add(SourceSystemFunctions.PI);
+        supportedFunctions.add(SourceSystemFunctions.POWER);
+        supportedFunctions.add(SourceSystemFunctions.RADIANS);
+        supportedFunctions.add(SourceSystemFunctions.ROUND);
+        supportedFunctions.add(SourceSystemFunctions.SIGN);
+        supportedFunctions.add(SourceSystemFunctions.SIN);
+        supportedFunctions.add(SourceSystemFunctions.SQRT);
+        supportedFunctions.add(SourceSystemFunctions.TAN);
+
+        supportedFunctions.add(SourceSystemFunctions.ASCII);
+        supportedFunctions.add(SourceSystemFunctions.CHAR);
+        supportedFunctions.add(SourceSystemFunctions.CONCAT);
+        supportedFunctions.add(SourceSystemFunctions.INSERT);
+        supportedFunctions.add(SourceSystemFunctions.LCASE);
+        supportedFunctions.add(SourceSystemFunctions.LEFT);
+        supportedFunctions.add(SourceSystemFunctions.LENGTH);
+        supportedFunctions.add(SourceSystemFunctions.LOCATE);
+        supportedFunctions.add(SourceSystemFunctions.LPAD);
+        supportedFunctions.add(SourceSystemFunctions.LTRIM);
+        supportedFunctions.add(SourceSystemFunctions.REPEAT);
+        supportedFunctions.add(SourceSystemFunctions.REPLACE);
+        supportedFunctions.add(SourceSystemFunctions.RIGHT);
+        supportedFunctions.add(SourceSystemFunctions.RPAD);
+        supportedFunctions.add(SourceSystemFunctions.RTRIM);
+        supportedFunctions.add(SourceSystemFunctions.SUBSTRING);
+        supportedFunctions.add(SourceSystemFunctions.UCASE);
+        
+        // These are executed within the server and never pushed down
+//        supportedFunctions.add("CURDATE"); //$NON-NLS-1$
+//        supportedFunctions.add("CURTIME"); //$NON-NLS-1$
+//        supportedFunctions.add("NOW"); //$NON-NLS-1$
+        supportedFunctions.add(SourceSystemFunctions.DAYNAME);
+        supportedFunctions.add(SourceSystemFunctions.DAYOFMONTH);
+        supportedFunctions.add(SourceSystemFunctions.DAYOFWEEK);
+        supportedFunctions.add(SourceSystemFunctions.DAYOFYEAR);
+        
+        // These should not be pushed down since the grammar for string conversion is different
+//        supportedFunctions.add("FORMATDATE"); //$NON-NLS-1$
+//        supportedFunctions.add("FORMATTIME"); //$NON-NLS-1$
+//        supportedFunctions.add("FORMATTIMESTAMP"); //$NON-NLS-1$
+        supportedFunctions.add(SourceSystemFunctions.HOUR);
+        supportedFunctions.add(SourceSystemFunctions.MINUTE);
+        supportedFunctions.add(SourceSystemFunctions.MONTH);
+        supportedFunctions.add(SourceSystemFunctions.MONTHNAME);
+        
+        // These should not be pushed down since the grammar for string conversion is different
+//        supportedFunctions.add("PARSEDATE"); //$NON-NLS-1$
+//        supportedFunctions.add("PARSETIME"); //$NON-NLS-1$
+//        supportedFunctions.add("PARSETIMESTAMP"); //$NON-NLS-1$
+        supportedFunctions.add(SourceSystemFunctions.QUARTER);
+        supportedFunctions.add(SourceSystemFunctions.SECOND);
+//        supportedFunctions.add(SourceSystemFunctions.TIMESTAMPADD);
+//        supportedFunctions.add(SourceSystemFunctions.TIMESTAMPDIFF);
+        supportedFunctions.add(SourceSystemFunctions.WEEK);
+        supportedFunctions.add(SourceSystemFunctions.YEAR);
+
+        supportedFunctions.add(SourceSystemFunctions.CONVERT);
+        supportedFunctions.add(SourceSystemFunctions.IFNULL);
+        supportedFunctions.add(SourceSystemFunctions.COALESCE);
+        
+//        supportedFunctions.add("GREATEST"); //$NON-NLS-1$
+//        supportedFunctions.add("ISNULL"); //$NON-NLS-1$
+//        supportedFunctions.add("LEAST"); //$NON-NLS-1$
+//        supportedFunctions.add("STRCMP"); // String-specific //$NON-NLS-1$
+//        
+//        // String
+//        supportedFunctions.add("BIN"); //$NON-NLS-1$
+//        supportedFunctions.add("BIT_LENGTH"); //$NON-NLS-1$
+//        supportedFunctions.add("CHAR_LENGTH"); //$NON-NLS-1$
+//        supportedFunctions.add("CHARACTER_LENGTH"); //$NON-NLS-1$
+//        supportedFunctions.add("COMPRESS"); //$NON-NLS-1$
+//        supportedFunctions.add("CONCAT_WS"); //$NON-NLS-1$
+//        supportedFunctions.add("CONV"); //$NON-NLS-1$
+//        supportedFunctions.add("ELT"); //$NON-NLS-1$
+//        supportedFunctions.add("EXPORT_SET"); //$NON-NLS-1$
+//        supportedFunctions.add("FIELD"); //$NON-NLS-1$
+//        supportedFunctions.add("FIND_IN_SET"); //$NON-NLS-1$
+//        supportedFunctions.add("FORMAT"); //$NON-NLS-1$
+//        supportedFunctions.add("HEX"); //$NON-NLS-1$
+//        supportedFunctions.add("INSTR"); //$NON-NLS-1$
+//        supportedFunctions.add("LOAD_FILE"); //$NON-NLS-1$
+//        supportedFunctions.add("MAKE_SET"); //$NON-NLS-1$
+//        supportedFunctions.add("MID"); //$NON-NLS-1$
+//        supportedFunctions.add("OCT"); //$NON-NLS-1$
+//        supportedFunctions.add("OCTET_LENGTH"); //$NON-NLS-1$
+//        supportedFunctions.add("ORD"); //$NON-NLS-1$
+//        supportedFunctions.add("QUOTE"); //$NON-NLS-1$
+//        supportedFunctions.add("REVERSE"); //$NON-NLS-1$
+//        supportedFunctions.add("SOUNDEX"); //$NON-NLS-1$
+//        supportedFunctions.add("SPACE"); //$NON-NLS-1$
+//        supportedFunctions.add("SUBSTR"); //$NON-NLS-1$
+//        supportedFunctions.add("SUBSTRING_INDEX"); //$NON-NLS-1$
+//        supportedFunctions.add("TRIM"); //$NON-NLS-1$
+//        supportedFunctions.add("UNCOMPRESS"); //$NON-NLS-1$
+//        supportedFunctions.add("UNHEX"); //$NON-NLS-1$
+//        
+//        // Math
+//        supportedFunctions.add("CEIL"); //$NON-NLS-1$
+//        supportedFunctions.add("CRC32"); //$NON-NLS-1$
+//          // DIV is an operator equivalent to '/'
+//        supportedFunctions.add("DIV"); //$NON-NLS-1$
+//        supportedFunctions.add("FORMAT"); //$NON-NLS-1$
+//        supportedFunctions.add("LN"); //$NON-NLS-1$
+//        supportedFunctions.add("LOG2"); //$NON-NLS-1$
+//        supportedFunctions.add("POW"); //$NON-NLS-1$
+//        supportedFunctions.add("RAND"); //$NON-NLS-1$
+//        supportedFunctions.add("TRUNCATE"); //$NON-NLS-1$
+//        
+//        // Date / Time
+//        supportedFunctions.add("ADDDATE"); //$NON-NLS-1$
+//        supportedFunctions.add("ADDTIME"); //$NON-NLS-1$
+//        supportedFunctions.add("CONVERT_TZ"); //$NON-NLS-1$
+//        supportedFunctions.add("CURRENT_DATE"); //$NON-NLS-1$
+//        supportedFunctions.add("CURRENT_TIME"); //$NON-NLS-1$
+//        supportedFunctions.add("CURRENT_TIMESTAMP"); //$NON-NLS-1$
+//        supportedFunctions.add("DATE"); //$NON-NLS-1$
+//        supportedFunctions.add("DATEDIFF"); //$NON-NLS-1$
+////        supportedFunctions.add("DATE_ADD");
+////        supportedFunctions.add("DATE_SUB");
+//        supportedFunctions.add("DATE_FORMAT"); //$NON-NLS-1$
+//        supportedFunctions.add("DAY"); //$NON-NLS-1$
+////        supportedFunctions.add("EXTRACT");
+//        supportedFunctions.add("FROM_DAYS"); //$NON-NLS-1$
+//        supportedFunctions.add("FROM_UNIXTIME"); //$NON-NLS-1$
+//        supportedFunctions.add("GET_FORMAT"); //$NON-NLS-1$
+//        supportedFunctions.add("LAST_DAY"); //$NON-NLS-1$
+//        supportedFunctions.add("LOCALTIME"); //$NON-NLS-1$
+//        supportedFunctions.add("LOCALTIMESTAMP"); //$NON-NLS-1$
+//        supportedFunctions.add("MAKEDATE"); //$NON-NLS-1$
+//        supportedFunctions.add("MAKETIME"); //$NON-NLS-1$
+//        supportedFunctions.add("MICROSECOND"); //$NON-NLS-1$
+//        supportedFunctions.add("PERIOD_ADD"); //$NON-NLS-1$
+//        supportedFunctions.add("PERIOD_DIFF"); //$NON-NLS-1$
+//        supportedFunctions.add("SEC_TO_TIME"); //$NON-NLS-1$
+//        supportedFunctions.add("STR_TO_DATE"); //$NON-NLS-1$
+//        supportedFunctions.add("SUBDATE"); //$NON-NLS-1$
+//        supportedFunctions.add("SUBTIME"); //$NON-NLS-1$
+//        supportedFunctions.add("SYSDATE"); //$NON-NLS-1$
+//        supportedFunctions.add("TIME"); //$NON-NLS-1$
+//        supportedFunctions.add("TIMEDIFF"); //$NON-NLS-1$
+//        supportedFunctions.add("TIMESTAMP"); //$NON-NLS-1$
+//        supportedFunctions.add("TIME_FORMAT"); //$NON-NLS-1$
+//        supportedFunctions.add("TIME_TO_SEC"); //$NON-NLS-1$
+//        supportedFunctions.add("TO_DAYS"); //$NON-NLS-1$
+//        supportedFunctions.add("UNIX_TIMESTAMP"); //$NON-NLS-1$
+//        supportedFunctions.add("UTC_DATE"); //$NON-NLS-1$
+//        supportedFunctions.add("UTC_TIME"); //$NON-NLS-1$
+//        supportedFunctions.add("UTC_TIMESTAMP"); //$NON-NLS-1$
+//        supportedFunctions.add("WEEKDAY"); //$NON-NLS-1$
+//        supportedFunctions.add("WEEKOFYEAR"); //$NON-NLS-1$
+//        supportedFunctions.add("YEARWEEK"); //$NON-NLS-1$
+//        
+//        // Bit
+//        supportedFunctions.add("|"); //$NON-NLS-1$
+//        supportedFunctions.add("&"); //$NON-NLS-1$
+//        supportedFunctions.add("^"); //$NON-NLS-1$
+//        supportedFunctions.add("<<"); //$NON-NLS-1$
+//        supportedFunctions.add(">>"); //$NON-NLS-1$
+//        supportedFunctions.add("~"); //$NON-NLS-1$
+//        supportedFunctions.add("BIT_COUNT"); //$NON-NLS-1$
+//        
+//        // Encryption
+//        supportedFunctions.add("AES_ENCRYPT"); //$NON-NLS-1$
+//        supportedFunctions.add("AES_DECRYPT"); //$NON-NLS-1$
+//        supportedFunctions.add("DECODE"); //$NON-NLS-1$
+//        supportedFunctions.add("ENCODE"); //$NON-NLS-1$
+//        supportedFunctions.add("DES_ENCRYPT"); //$NON-NLS-1$
+//        supportedFunctions.add("DES_DECRYPT"); //$NON-NLS-1$
+//        supportedFunctions.add("MD5"); //$NON-NLS-1$
+//        supportedFunctions.add("OLD_PASSWORD"); //$NON-NLS-1$
+//        supportedFunctions.add("PASSWORD"); //$NON-NLS-1$
+//        supportedFunctions.add("SHA"); //$NON-NLS-1$
+//        supportedFunctions.add("SHA1"); //$NON-NLS-1$
+//        
+//        // Information
+//        supportedFunctions.add("BENCHMARK"); //$NON-NLS-1$
+//        supportedFunctions.add("CHARSET"); //$NON-NLS-1$
+//        supportedFunctions.add("COERCIBILITY"); //$NON-NLS-1$
+//        supportedFunctions.add("COLLATION"); //$NON-NLS-1$
+//        supportedFunctions.add("CONNECTION_ID"); //$NON-NLS-1$
+//        supportedFunctions.add("CURRENT_USER"); //$NON-NLS-1$
+//        supportedFunctions.add("DATABASE"); //$NON-NLS-1$
+//        supportedFunctions.add("FOUND_ROWS"); //$NON-NLS-1$
+//        supportedFunctions.add("LAST_INSERT_ID"); //$NON-NLS-1$
+//        supportedFunctions.add("ROW_COUNT"); //$NON-NLS-1$
+//        supportedFunctions.add("SCHEMA"); //$NON-NLS-1$
+//        supportedFunctions.add("SESSION_USER"); //$NON-NLS-1$
+//        supportedFunctions.add("SYSTEM_USER"); //$NON-NLS-1$
+//        supportedFunctions.add("USER"); //$NON-NLS-1$
+//        supportedFunctions.add("VERSION"); //$NON-NLS-1$
+//        
+//        // Misc.
+//        supportedFunctions.add("DEFAULT"); //$NON-NLS-1$
+//        supportedFunctions.add("FORMAT"); //$NON-NLS-1$
+////        supportedFunctions.add("GET_LOCK"); //$NON-NLS-1$
+//        supportedFunctions.add("INET_ATON"); //$NON-NLS-1$
+//        supportedFunctions.add("INET_NTOA"); //$NON-NLS-1$
+////        supportedFunctions.add("IS_FREE_LOCK"); //$NON-NLS-1$
+////        supportedFunctions.add("IS_USED_LOCK"); //$NON-NLS-1$
+////        supportedFunctions.add("MASTER_POS_WAIT"); //$NON-NLS-1$
+////        supportedFunctions.add("NAME_CONST"); //$NON-NLS-1$
+////        supportedFunctions.add("RELEASE_LOCK"); //$NON-NLS-1$
+////        supportedFunctions.add("SLEEP"); //$NON-NLS-1$
+//        supportedFunctions.add("UUID"); //$NON-NLS-1$
+//        supportedFunctions.add("VALUES"); //$NON-NLS-1$
+        return supportedFunctions;
+    }
+    @Override
+    public boolean supportsFullOuterJoins() {
+        return false;
+    }
+    @Override
+    public boolean supportsAggregatesDistinct() {
+        return false;
+    }
+        
+    @Override
+    public boolean supportsRowLimit() {
+        return true;
+    }
+    @Override
+    public boolean supportsRowOffset() {
+        return true;
+    }    
+}

Deleted: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/mysql/MySQLTranslator.java
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/mysql/MySQLTranslator.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/mysql/MySQLTranslator.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -1,156 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership.  Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- * 
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- * 
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package org.teiid.translator.jdbc.mysql;
-
-import java.sql.Connection;
-import java.sql.Date;
-import java.sql.SQLException;
-import java.sql.Statement;
-import java.sql.Time;
-import java.sql.Timestamp;
-import java.util.Arrays;
-import java.util.List;
-
-import org.teiid.language.Function;
-import org.teiid.logging.LogConstants;
-import org.teiid.logging.LogManager;
-import org.teiid.translator.ConnectorCapabilities;
-import org.teiid.translator.ConnectorException;
-import org.teiid.translator.SourceSystemFunctions;
-import org.teiid.translator.TypeFacility;
-import org.teiid.translator.jdbc.ConvertModifier;
-import org.teiid.translator.jdbc.FunctionModifier;
-import org.teiid.translator.jdbc.JDBCExecutionFactory;
-import org.teiid.translator.jdbc.LocateFunctionModifier;
-import org.teiid.translator.jdbc.Translator;
-
-
-/** 
- * @since 4.3
- */
-public class MySQLTranslator extends Translator {
-	
-	/**
-	 * Adds support for the 2 argument form of padding
-	 */
-	private final class PadFunctionModifier extends FunctionModifier {
-		@Override
-		public List<?> translate(Function function) {
-			if (function.getParameters().size() == 2) {
-				function.getParameters().add(getLanguageFactory().createLiteral(" ", TypeFacility.RUNTIME_TYPES.STRING)); //$NON-NLS-1$
-			}
-			return null;
-		}
-	}
-
-	@Override
-    public void initialize(JDBCExecutionFactory env) throws ConnectorException {
-        super.initialize(env);
-        registerFunctionModifier(SourceSystemFunctions.BITAND, new BitFunctionModifier("&", getLanguageFactory())); //$NON-NLS-1$
-        registerFunctionModifier(SourceSystemFunctions.BITNOT, new BitFunctionModifier("~", getLanguageFactory())); //$NON-NLS-1$
-        registerFunctionModifier(SourceSystemFunctions.BITOR, new BitFunctionModifier("|", getLanguageFactory())); //$NON-NLS-1$
-        registerFunctionModifier(SourceSystemFunctions.BITXOR, new BitFunctionModifier("^", getLanguageFactory())); //$NON-NLS-1$
-        registerFunctionModifier(SourceSystemFunctions.LOCATE, new LocateFunctionModifier(getLanguageFactory()));
-        registerFunctionModifier(SourceSystemFunctions.LPAD, new PadFunctionModifier());
-        registerFunctionModifier(SourceSystemFunctions.RPAD, new PadFunctionModifier());
-        //add in type conversion
-        ConvertModifier convertModifier = new ConvertModifier();
-        convertModifier.addTypeMapping("signed", FunctionModifier.BOOLEAN, FunctionModifier.BYTE, FunctionModifier.SHORT, FunctionModifier.INTEGER, FunctionModifier.LONG); //$NON-NLS-1$
-    	//char(n) assume 4.1 or later
-    	convertModifier.addTypeMapping("char(1)", FunctionModifier.CHAR); //$NON-NLS-1$
-    	convertModifier.addTypeMapping("char", FunctionModifier.STRING); //$NON-NLS-1$
-    	convertModifier.addTypeMapping("date", FunctionModifier.DATE); //$NON-NLS-1$
-    	convertModifier.addTypeMapping("time", FunctionModifier.TIME); //$NON-NLS-1$
-    	convertModifier.addTypeMapping("timestamp", FunctionModifier.TIMESTAMP); //$NON-NLS-1$
-    	convertModifier.addConvert(FunctionModifier.STRING, FunctionModifier.DATE, new ConvertModifier.FormatModifier("DATE")); //$NON-NLS-1$
-    	convertModifier.addConvert(FunctionModifier.STRING, FunctionModifier.TIME, new ConvertModifier.FormatModifier("TIME")); //$NON-NLS-1$
-    	convertModifier.addConvert(FunctionModifier.STRING, FunctionModifier.TIMESTAMP, new ConvertModifier.FormatModifier("TIMESTAMP")); //$NON-NLS-1$
-    	convertModifier.addConvert(FunctionModifier.DATE, FunctionModifier.STRING, new ConvertModifier.FormatModifier("date_format", "%Y-%m-%d")); //$NON-NLS-1$ //$NON-NLS-2$
-    	convertModifier.addConvert(FunctionModifier.TIME, FunctionModifier.STRING, new ConvertModifier.FormatModifier("date_format", "%H:%i:%S")); //$NON-NLS-1$ //$NON-NLS-2$
-    	convertModifier.addConvert(FunctionModifier.TIMESTAMP, FunctionModifier.STRING, new ConvertModifier.FormatModifier("date_format", "%Y-%m-%d %H:%i:%S.%f")); //$NON-NLS-1$ //$NON-NLS-2$
-    	convertModifier.addTypeConversion(new FunctionModifier() {
-			@Override
-			public List<?> translate(Function function) {
-				return Arrays.asList(function.getParameters().get(0), " + 0.0"); //$NON-NLS-1$
-			}
-		}, FunctionModifier.BIGDECIMAL, FunctionModifier.BIGINTEGER, FunctionModifier.FLOAT, FunctionModifier.DOUBLE);
-    	convertModifier.addNumericBooleanConversions();
-    	convertModifier.setWideningNumericImplicit(true);
-    	registerFunctionModifier(SourceSystemFunctions.CONVERT, convertModifier);
-    }  
-	
-	@Override
-    public String translateLiteralDate(Date dateValue) {
-        return "DATE('" + formatDateValue(dateValue) + "')";  //$NON-NLS-1$//$NON-NLS-2$
-    }
-
-	@Override
-    public String translateLiteralTime(Time timeValue) {
-        return "TIME('" + formatDateValue(timeValue) + "')";  //$NON-NLS-1$//$NON-NLS-2$
-    }
-
-	@Override
-    public String translateLiteralTimestamp(Timestamp timestampValue) {
-        return "{ts '" + formatDateValue(timestampValue) + "'}";  //$NON-NLS-1$//$NON-NLS-2$
-    }
-	
-	@Override
-	public boolean useParensForSetQueries() {
-		return true;
-	}
-	
-	@Override
-	public int getTimestampNanoPrecision() {
-		return 0;
-	}
-	
-	@Override
-	public void afterConnectionCreation(Connection connection) {
-		super.afterConnectionCreation(connection);
-		
-		Statement stmt = null;
-		try {
-			stmt = connection.createStatement();
-			stmt.execute("set SESSION sql_mode = 'ANSI'"); //$NON-NLS-1$
-		} catch (SQLException e) {
-			LogManager.logError(LogConstants.CTX_CONNECTOR,  e, "Error setting ANSI mode"); //$NON-NLS-1$
-		} finally {
-			if (stmt != null) {
-				try {
-					stmt.close();
-				} catch (SQLException e) {
-					LogManager.logDetail("Error closing statement", e); //$NON-NLS-1$
-				}
-			}
-		}
-	}
-	
-	@Override
-	public Class<? extends ConnectorCapabilities> getDefaultCapabilities() {
-		return MySQLCapabilities.class;
-	}
-	
-    public boolean useParensForJoins() {
-    	return true;
-    }
-}

Deleted: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/oracle/OracleCapabilities.java
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/oracle/OracleCapabilities.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/oracle/OracleCapabilities.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -1,154 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership.  Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- * 
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- * 
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-/*
- */
-package org.teiid.translator.jdbc.oracle;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.teiid.translator.SourceSystemFunctions;
-import org.teiid.translator.jdbc.JDBCCapabilities;
-
-
-/**
- */
-public class OracleCapabilities extends JDBCCapabilities {    
-    
-    public OracleCapabilities() {
-    }
-    
-    /**
-     * @see org.teiid.resource.cci.data.ConnectorCapabilities#getSupportedFunctions()
-     */
-    public List<String> getSupportedFunctions() {
-        List<String> supportedFunctions = new ArrayList<String>();
-        supportedFunctions.addAll(super.getSupportedFunctions());
-        supportedFunctions.add("ABS"); //$NON-NLS-1$
-        supportedFunctions.add("ACOS"); //$NON-NLS-1$
-        supportedFunctions.add("ASIN"); //$NON-NLS-1$
-        supportedFunctions.add("ATAN"); //$NON-NLS-1$
-        supportedFunctions.add("ATAN2"); //$NON-NLS-1$
-        supportedFunctions.add("COS"); //$NON-NLS-1$
-        supportedFunctions.add(SourceSystemFunctions.COT); 
-        supportedFunctions.add("EXP"); //$NON-NLS-1$
-        supportedFunctions.add("FLOOR"); //$NON-NLS-1$
-        supportedFunctions.add("CEILING"); //$NON-NLS-1$
-        supportedFunctions.add("LOG"); //$NON-NLS-1$
-        supportedFunctions.add("LOG10"); //$NON-NLS-1$
-        supportedFunctions.add("MOD"); //$NON-NLS-1$
-        supportedFunctions.add("POWER"); //$NON-NLS-1$
-        supportedFunctions.add("SIGN"); //$NON-NLS-1$
-        supportedFunctions.add("SIN"); //$NON-NLS-1$
-        supportedFunctions.add("SQRT"); //$NON-NLS-1$
-        supportedFunctions.add("TAN"); //$NON-NLS-1$
-        supportedFunctions.add("ASCII"); //$NON-NLS-1$
-        supportedFunctions.add("CHAR"); //$NON-NLS-1$
-        supportedFunctions.add("CHR"); //$NON-NLS-1$
-        supportedFunctions.add("CONCAT"); //$NON-NLS-1$
-        supportedFunctions.add("||"); //$NON-NLS-1$
-        supportedFunctions.add("INITCAP"); //$NON-NLS-1$
-        supportedFunctions.add("LCASE"); //$NON-NLS-1$
-        supportedFunctions.add("LENGTH"); //$NON-NLS-1$
-        supportedFunctions.add("LEFT"); //$NON-NLS-1$
-        supportedFunctions.add("LOCATE"); //$NON-NLS-1$
-        supportedFunctions.add("LOWER"); //$NON-NLS-1$
-        supportedFunctions.add("LPAD"); //$NON-NLS-1$
-        supportedFunctions.add("LTRIM"); //$NON-NLS-1$
-        supportedFunctions.add("REPLACE"); //$NON-NLS-1$
-        supportedFunctions.add("RPAD"); //$NON-NLS-1$
-        supportedFunctions.add("RIGHT"); //$NON-NLS-1$
-        supportedFunctions.add("RTRIM"); //$NON-NLS-1$
-        supportedFunctions.add("SUBSTRING"); //$NON-NLS-1$
-        supportedFunctions.add("TRANSLATE"); //$NON-NLS-1$
-        supportedFunctions.add("UCASE"); //$NON-NLS-1$
-        supportedFunctions.add("UPPER"); //$NON-NLS-1$
-        supportedFunctions.add("HOUR"); //$NON-NLS-1$
-        supportedFunctions.add("MONTH"); //$NON-NLS-1$
-        supportedFunctions.add("MONTHNAME"); //$NON-NLS-1$
-        supportedFunctions.add("YEAR"); //$NON-NLS-1$
-        supportedFunctions.add("DAY"); //$NON-NLS-1$
-        supportedFunctions.add("DAYNAME"); //$NON-NLS-1$
-        supportedFunctions.add("DAYOFMONTH"); //$NON-NLS-1$
-        supportedFunctions.add("DAYOFWEEK"); //$NON-NLS-1$
-        supportedFunctions.add("DAYOFYEAR"); //$NON-NLS-1$
-        supportedFunctions.add("QUARTER"); //$NON-NLS-1$
-        supportedFunctions.add("MINUTE"); //$NON-NLS-1$
-        supportedFunctions.add("SECOND"); //$NON-NLS-1$
-        supportedFunctions.add("QUARTER"); //$NON-NLS-1$
-        supportedFunctions.add("WEEK"); //$NON-NLS-1$
-        //supportedFunctions.add("FORMATDATE"); //$NON-NLS-1$
-        //supportedFunctions.add("FORMATTIME"); //$NON-NLS-1$
-        //supportedFunctions.add("FORMATTIMESTAMP"); //$NON-NLS-1$ 
-        //supportedFunctions.add("PARSEDATE"); //$NON-NLS-1$
-        //supportedFunctions.add("PARSETIME"); //$NON-NLS-1$
-        //supportedFunctions.add("PARSETIMESTAMP"); //$NON-NLS-1$          
-        supportedFunctions.add("CAST"); //$NON-NLS-1$
-        supportedFunctions.add("CONVERT"); //$NON-NLS-1$
-        supportedFunctions.add("IFNULL"); //$NON-NLS-1$
-        supportedFunctions.add("NVL");      //$NON-NLS-1$ 
-        supportedFunctions.add("COALESCE"); //$NON-NLS-1$
-        
-        supportedFunctions.add(OracleSQLTranslator.RELATE);
-        supportedFunctions.add(OracleSQLTranslator.NEAREST_NEIGHBOR);
-        supportedFunctions.add(OracleSQLTranslator.FILTER);
-        supportedFunctions.add(OracleSQLTranslator.NEAREST_NEIGHBOR_DISTANCE);
-        supportedFunctions.add(OracleSQLTranslator.WITHIN_DISTANCE);
-        return supportedFunctions;
-    }
-    
-    public boolean supportsInlineViews() {
-        return true;
-    }
-
-    /** 
-     * @see org.teiid.translator.ConnectorCapabilities#supportsFunctionsInGroupBy()
-     * @since 5.0
-     */
-    public boolean supportsFunctionsInGroupBy() {
-        return true;
-    }    
-
-    public boolean supportsRowLimit() {
-        return true;
-    }
-    public boolean supportsRowOffset() {
-        return true;
-    }
-    
-    /** 
-     * @see org.teiid.translator.BasicConnectorCapabilities#supportsExcept()
-     */
-    @Override
-    public boolean supportsExcept() {
-        return true;
-    }
-    
-    /** 
-     * @see org.teiid.translator.BasicConnectorCapabilities#supportsIntersect()
-     */
-    @Override
-    public boolean supportsIntersect() {
-        return true;
-    }
-}

Copied: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/oracle/OracleExecutionFactory.java (from rev 2121, trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/oracle/OracleSQLTranslator.java)
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/oracle/OracleExecutionFactory.java	                        (rev 0)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/oracle/OracleExecutionFactory.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -0,0 +1,549 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership.  Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ * 
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ * 
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+/*
+ */
+package org.teiid.translator.jdbc.oracle;
+
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.sql.Types;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.List;
+
+import org.teiid.language.ColumnReference;
+import org.teiid.language.Command;
+import org.teiid.language.DerivedColumn;
+import org.teiid.language.Expression;
+import org.teiid.language.ExpressionValueSource;
+import org.teiid.language.Function;
+import org.teiid.language.Insert;
+import org.teiid.language.Limit;
+import org.teiid.language.Literal;
+import org.teiid.language.NamedTable;
+import org.teiid.language.QueryExpression;
+import org.teiid.language.Select;
+import org.teiid.language.SQLReservedWords.Tokens;
+import org.teiid.language.SetQuery.Operation;
+import org.teiid.language.visitor.CollectorVisitor;
+import org.teiid.logging.LogConstants;
+import org.teiid.logging.LogManager;
+import org.teiid.metadata.Column;
+import org.teiid.translator.ConnectorException;
+import org.teiid.translator.ExecutionContext;
+import org.teiid.translator.SourceSystemFunctions;
+import org.teiid.translator.TypeFacility;
+import org.teiid.translator.jdbc.AliasModifier;
+import org.teiid.translator.jdbc.ConvertModifier;
+import org.teiid.translator.jdbc.ExtractFunctionModifier;
+import org.teiid.translator.jdbc.FunctionModifier;
+import org.teiid.translator.jdbc.JDBCExecutionFactory;
+import org.teiid.translator.jdbc.JDBCPlugin;
+import org.teiid.translator.jdbc.LocateFunctionModifier;
+
+
+
+public class OracleExecutionFactory extends JDBCExecutionFactory {
+
+	/*
+	 * Spatial Functions
+	 */
+	public static final String RELATE = "sdo_relate"; //$NON-NLS-1$
+	public static final String NEAREST_NEIGHBOR = "sdo_nn"; //$NON-NLS-1$
+	public static final String FILTER = "sdo_filter"; //$NON-NLS-1$
+	public static final String WITHIN_DISTANCE = "sdo_within_distance"; //$NON-NLS-1$
+	public static final String NEAREST_NEIGHBOR_DISTANCE = "sdo_nn_distance"; //$NON-NLS-1$
+
+    public final static String HINT_PREFIX = "/*+"; //$NON-NLS-1$
+    public final static String DUAL = "DUAL"; //$NON-NLS-1$
+    public final static String ROWNUM = "ROWNUM"; //$NON-NLS-1$
+    public final static String SEQUENCE = ":SEQUENCE="; //$NON-NLS-1$
+	
+    public void start() throws ConnectorException {
+        super.start();
+        
+        registerFunctionModifier(SourceSystemFunctions.CHAR, new AliasModifier("chr")); //$NON-NLS-1$ 
+        registerFunctionModifier(SourceSystemFunctions.LCASE, new AliasModifier("lower")); //$NON-NLS-1$ 
+        registerFunctionModifier(SourceSystemFunctions.UCASE, new AliasModifier("upper")); //$NON-NLS-1$ 
+        registerFunctionModifier(SourceSystemFunctions.IFNULL, new AliasModifier("nvl")); //$NON-NLS-1$ 
+        registerFunctionModifier(SourceSystemFunctions.LOG, new AliasModifier("ln")); //$NON-NLS-1$ 
+        registerFunctionModifier(SourceSystemFunctions.CEILING, new AliasModifier("ceil")); //$NON-NLS-1$ 
+        registerFunctionModifier(SourceSystemFunctions.LOG10, new Log10FunctionModifier(getLanguageFactory())); 
+        registerFunctionModifier(SourceSystemFunctions.HOUR, new ExtractFunctionModifier());
+        registerFunctionModifier(SourceSystemFunctions.YEAR, new ExtractFunctionModifier()); 
+        registerFunctionModifier(SourceSystemFunctions.MINUTE, new ExtractFunctionModifier()); 
+        registerFunctionModifier(SourceSystemFunctions.SECOND, new ExtractFunctionModifier()); 
+        registerFunctionModifier(SourceSystemFunctions.MONTH, new ExtractFunctionModifier()); 
+        registerFunctionModifier(SourceSystemFunctions.DAYOFMONTH, new ExtractFunctionModifier()); 
+        registerFunctionModifier(SourceSystemFunctions.MONTHNAME, new MonthOrDayNameFunctionModifier(getLanguageFactory(), "Month"));//$NON-NLS-1$ 
+        registerFunctionModifier(SourceSystemFunctions.DAYNAME, new MonthOrDayNameFunctionModifier(getLanguageFactory(), "Day"));//$NON-NLS-1$ 
+        registerFunctionModifier(SourceSystemFunctions.WEEK, new DayWeekQuarterFunctionModifier("WW"));//$NON-NLS-1$ 
+        registerFunctionModifier(SourceSystemFunctions.QUARTER, new DayWeekQuarterFunctionModifier("Q"));//$NON-NLS-1$ 
+        registerFunctionModifier(SourceSystemFunctions.DAYOFWEEK, new DayWeekQuarterFunctionModifier("D"));//$NON-NLS-1$ 
+        registerFunctionModifier(SourceSystemFunctions.DAYOFYEAR, new DayWeekQuarterFunctionModifier("DDD"));//$NON-NLS-1$ 
+        registerFunctionModifier(SourceSystemFunctions.LOCATE, new LocateFunctionModifier(getLanguageFactory(), "INSTR", true)); //$NON-NLS-1$
+        registerFunctionModifier(SourceSystemFunctions.SUBSTRING, new AliasModifier("substr"));//$NON-NLS-1$ 
+        registerFunctionModifier(SourceSystemFunctions.LEFT, new LeftOrRightFunctionModifier(getLanguageFactory()));
+        registerFunctionModifier(SourceSystemFunctions.RIGHT, new LeftOrRightFunctionModifier(getLanguageFactory()));
+        registerFunctionModifier(SourceSystemFunctions.CONCAT, new ConcatFunctionModifier(getLanguageFactory())); 
+        registerFunctionModifier(SourceSystemFunctions.COT, new FunctionModifier() {
+			@Override
+			public List<?> translate(Function function) {
+				function.setName(SourceSystemFunctions.TAN);
+				return Arrays.asList(getLanguageFactory().createFunction(SourceSystemFunctions.DIVIDE_OP, new Expression[] {new Literal(1, TypeFacility.RUNTIME_TYPES.INTEGER), function}, TypeFacility.RUNTIME_TYPES.DOUBLE));
+			}
+		});
+        
+        //spatial functions
+        registerFunctionModifier(RELATE, new OracleSpatialFunctionModifier());
+        registerFunctionModifier(NEAREST_NEIGHBOR, new OracleSpatialFunctionModifier());
+        registerFunctionModifier(FILTER, new OracleSpatialFunctionModifier());
+        registerFunctionModifier(WITHIN_DISTANCE, new OracleSpatialFunctionModifier());
+        
+        //add in type conversion
+        ConvertModifier convertModifier = new ConvertModifier();
+    	convertModifier.addTypeMapping("char(1)", FunctionModifier.CHAR); //$NON-NLS-1$
+    	convertModifier.addTypeMapping("date", FunctionModifier.DATE, FunctionModifier.TIME); //$NON-NLS-1$
+    	convertModifier.addTypeMapping("timestamp", FunctionModifier.TIMESTAMP); //$NON-NLS-1$
+    	convertModifier.addConvert(FunctionModifier.TIMESTAMP, FunctionModifier.TIME, new FunctionModifier() {
+    		@Override
+    		public List<?> translate(Function function) {
+    			return Arrays.asList("case when ", function.getParameters().get(0), " is null then null else to_date('1970-01-01 ' || to_char(",function.getParameters().get(0),", 'HH24:MI:SS'), 'YYYY-MM-DD HH24:MI:SS') end"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+    		}
+    	});
+    	convertModifier.addConvert(FunctionModifier.TIMESTAMP, FunctionModifier.DATE, new FunctionModifier() {
+			@Override
+			public List<?> translate(Function function) {
+				return Arrays.asList("trunc(cast(",function.getParameters().get(0)," AS date))"); //$NON-NLS-1$ //$NON-NLS-2$
+			}
+		});
+    	convertModifier.addConvert(FunctionModifier.DATE, FunctionModifier.STRING, new ConvertModifier.FormatModifier("to_char", "YYYY-MM-DD")); //$NON-NLS-1$ //$NON-NLS-2$
+    	convertModifier.addConvert(FunctionModifier.TIME, FunctionModifier.STRING, new ConvertModifier.FormatModifier("to_char", "HH24:MI:SS")); //$NON-NLS-1$ //$NON-NLS-2$
+    	convertModifier.addConvert(FunctionModifier.TIMESTAMP, FunctionModifier.STRING, new FunctionModifier() {
+			@Override
+			public List<?> translate(Function function) {
+				//if column and type is date, just use date format
+				Expression ex = function.getParameters().get(0);
+				String format = "YYYY-MM-DD HH24:MI:SS.FF"; //$NON-NLS-1$
+				if (ex instanceof ColumnReference) {
+					if ("date".equals(((ColumnReference)ex).getMetadataObject().getNativeType())) { //$NON-NLS-1$
+						format = "YYYY-MM-DD HH24:MI:SS"; //$NON-NLS-1$
+					}
+				} else if (!(ex instanceof Function) && !(ex instanceof Literal)) {
+					//this isn't needed in every case, but it's simpler than inspecting the expression more
+					ex = ConvertModifier.createConvertFunction(getLanguageFactory(), function.getParameters().get(0), TypeFacility.RUNTIME_NAMES.TIMESTAMP);
+				}
+				return Arrays.asList("to_char(", ex, ", '", format, "')"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			}
+		});
+    	convertModifier.addConvert(FunctionModifier.STRING, FunctionModifier.DATE, new ConvertModifier.FormatModifier("to_date", "YYYY-MM-DD")); //$NON-NLS-1$ //$NON-NLS-2$
+    	convertModifier.addConvert(FunctionModifier.STRING, FunctionModifier.TIME, new ConvertModifier.FormatModifier("to_date", "HH24:MI:SS")); //$NON-NLS-1$ //$NON-NLS-2$
+    	convertModifier.addConvert(FunctionModifier.STRING, FunctionModifier.TIMESTAMP, new ConvertModifier.FormatModifier("to_timestamp", "YYYY-MM-DD HH24:MI:SS.FF")); //$NON-NLS-1$ //$NON-NLS-2$
+    	convertModifier.addTypeConversion(new ConvertModifier.FormatModifier("to_char"), FunctionModifier.STRING); //$NON-NLS-1$
+    	//NOTE: numeric handling in Oracle is split only between integral vs. floating/decimal types
+    	convertModifier.addTypeConversion(new ConvertModifier.FormatModifier("to_number"), //$NON-NLS-1$
+    			FunctionModifier.FLOAT, FunctionModifier.DOUBLE, FunctionModifier.BIGDECIMAL);
+    	convertModifier.addTypeConversion(new FunctionModifier() {
+			@Override
+			public List<?> translate(Function function) {
+				if (Number.class.isAssignableFrom(function.getParameters().get(0).getType())) {
+					return Arrays.asList("trunc(", function.getParameters().get(0), ")"); //$NON-NLS-1$ //$NON-NLS-2$
+				}
+				return Arrays.asList("trunc(to_number(", function.getParameters().get(0), "))"); //$NON-NLS-1$ //$NON-NLS-2$
+			}
+		}, 
+		FunctionModifier.BYTE, FunctionModifier.SHORT, FunctionModifier.INTEGER, FunctionModifier.LONG,	FunctionModifier.BIGINTEGER);
+    	convertModifier.addNumericBooleanConversions();
+    	convertModifier.setWideningNumericImplicit(true);
+    	registerFunctionModifier(SourceSystemFunctions.CONVERT, convertModifier);
+    }
+    
+    public void handleInsertSequences(Insert insert) throws ConnectorException {
+        /* 
+         * If a missing auto_increment column is modeled with name in source indicating that an Oracle Sequence 
+         * then pull the Sequence name out of the name in source of the column.
+         */
+    	if (!(insert.getValueSource() instanceof ExpressionValueSource)) {
+    		return;
+    	}
+    	ExpressionValueSource values = (ExpressionValueSource)insert.getValueSource();
+    	List<Column> allElements = insert.getTable().getMetadataObject().getColumns();
+    	if (allElements.size() == values.getValues().size()) {
+    		return;
+    	}
+    	
+    	int index = 0;
+    	List<ColumnReference> elements = insert.getColumns();
+    	
+    	for (Column element : allElements) {
+    		if (!element.isAutoIncremented()) {
+    			continue;
+    		}
+    		String name = element.getNameInSource();
+    		int seqIndex = name.indexOf(SEQUENCE);
+    		if (seqIndex == -1) {
+    			continue;
+    		}
+    		boolean found = false;
+    		while (index < elements.size()) {
+    			if (element.equals(elements.get(index).getMetadataObject())) {
+    				found = true;
+    				break;
+    			}
+    			index++;
+    		}
+    		if (found) {
+    			continue;
+    		}
+    		
+            String sequence = name.substring(seqIndex + SEQUENCE.length());
+            
+            int delimiterIndex = sequence.indexOf(Tokens.DOT);
+            if (delimiterIndex == -1) {
+            	throw new ConnectorException("Invalid name in source sequence format.  Expected <element name>" + SEQUENCE + "<sequence name>.<sequence value>, but was " + name); //$NON-NLS-1$ //$NON-NLS-2$
+            }
+            String sequenceGroupName = sequence.substring(0, delimiterIndex);
+            String sequenceElementName = sequence.substring(delimiterIndex + 1);
+                
+            NamedTable sequenceGroup = this.getLanguageFactory().createNamedTable(sequenceGroupName, null, null);
+            ColumnReference sequenceElement = this.getLanguageFactory().createColumnReference(sequenceElementName, sequenceGroup, null, element.getJavaType());
+            insert.getColumns().add(index, this.getLanguageFactory().createColumnReference(element.getName(), insert.getTable(), element, element.getJavaType()));
+            values.getValues().add(index, sequenceElement);
+		}
+    }
+    
+    @Override
+    public List<?> translateCommand(Command command, ExecutionContext context) {
+    	if (command instanceof Insert) {
+    		try {
+				handleInsertSequences((Insert)command);
+			} catch (ConnectorException e) {
+				throw new RuntimeException(e);
+			}
+    	}
+    	
+    	if (!(command instanceof QueryExpression)) {
+    		return null;
+    	}
+		QueryExpression queryCommand = (QueryExpression)command;
+		if (queryCommand.getLimit() == null) {
+			return null;
+    	}
+		Limit limit = queryCommand.getLimit();
+		queryCommand.setLimit(null);
+    	List<Object> parts = new ArrayList<Object>();
+    	parts.add("SELECT "); //$NON-NLS-1$
+    	/*
+    	 * if all of the columns are aliased, assume that names matter - it actually only seems to matter for
+    	 * the first query of a set op when there is a order by.  Rather than adding logic to traverse up,
+    	 * we just use the projected names 
+    	 */
+    	boolean allAliased = true;
+    	for (DerivedColumn selectSymbol : queryCommand.getProjectedQuery().getDerivedColumns()) {
+			if (selectSymbol.getAlias() == null) {
+				allAliased = false;
+				break;
+			}
+		}
+    	if (allAliased) {
+	    	String[] columnNames = queryCommand.getColumnNames();
+	    	for (int i = 0; i < columnNames.length; i++) {
+	    		if (i > 0) {
+	    			parts.add(", "); //$NON-NLS-1$
+	    		}
+	    		parts.add(columnNames[i]);
+			}
+    	} else {
+        	parts.add("*"); //$NON-NLS-1$
+    	}
+		if (limit.getRowOffset() > 0) {
+			parts.add(" FROM (SELECT VIEW_FOR_LIMIT.*, ROWNUM ROWNUM_ FROM ("); //$NON-NLS-1$
+		} else {
+			parts.add(" FROM ("); //$NON-NLS-1$ 
+		}
+		parts.add(queryCommand);
+		if (limit.getRowOffset() > 0) {
+			parts.add(") VIEW_FOR_LIMIT WHERE ROWNUM <= "); //$NON-NLS-1$
+			parts.add(limit.getRowLimit() + limit.getRowOffset());
+			parts.add(") WHERE ROWNUM_ > "); //$NON-NLS-1$
+			parts.add(limit.getRowOffset());
+		} else {
+			parts.add(") WHERE ROWNUM <= "); //$NON-NLS-1$
+			parts.add(limit.getRowLimit());
+		}
+		return parts;
+    }
+
+    @Override
+    public boolean useAsInGroupAlias(){
+        return false;
+    }
+    
+    @Override
+    public String getSetOperationString(Operation operation) {
+    	if (operation == Operation.EXCEPT) {
+    		return "MINUS"; //$NON-NLS-1$
+    	}
+    	return super.getSetOperationString(operation);
+    }
+    
+    @Override
+    public String getSourceComment(ExecutionContext context, Command command) {
+    	String comment = super.getSourceComment(context, command);
+    	
+    	if (context != null) {
+	    	// Check for db hints
+		    Object payload = context.getExecutionPayload();
+		    if (payload instanceof String) {
+		        String payloadString = (String)payload;
+		        if (payloadString.startsWith(HINT_PREFIX)) {
+		            comment += payloadString + " "; //$NON-NLS-1$
+		        }
+		    }
+    	}
+    	
+		if (command instanceof Select) {
+	        //
+	        // This simple algorithm determines the hint which will be added to the
+	        // query.
+	        // Right now, we look through all functions passed in the query
+	        // (returned as a collection)
+	        // Then we check if any of those functions are sdo_relate
+	        // If so, the ORDERED hint is added, if not, it isn't
+	        Collection<Function> col = CollectorVisitor.collectObjects(Function.class, command);
+	        for (Function func : col) {
+	            if (func.getName().equalsIgnoreCase(RELATE)) {
+	                return comment + "/*+ ORDERED */ "; //$NON-NLS-1$
+	            }
+	        }
+		}
+    	return comment;
+    }
+    
+    /**
+     * Don't fully qualify elements if table = DUAL or element = ROWNUM or special stuff is packed into name in source value.
+     *  
+     * @see org.teiid.language.visitor.SQLStringVisitor#skipGroupInElement(java.lang.String, java.lang.String)
+     * @since 5.0
+     */
+    @Override
+    public String replaceElementName(String group, String element) {        
+
+        // Check if the element was modeled as using a Sequence
+        int useIndex = element.indexOf(SEQUENCE);
+        if (useIndex >= 0) {
+        	String name = element.substring(0, useIndex);
+        	if (group != null) {
+        		return group + Tokens.DOT + name;
+        	}
+        	return name;
+        }
+
+        // Check if the group name should be discarded
+        if((group != null && DUAL.equalsIgnoreCase(group)) || element.equalsIgnoreCase(ROWNUM)) {
+            // Strip group if group or element are pseudo-columns
+            return element;
+        }
+        
+        return null;
+    }
+    
+    @Override
+    public boolean hasTimeType() {
+    	return false;
+    }
+       
+    @Override
+    public void bindValue(PreparedStatement stmt, Object param, Class<?> paramType, int i) throws SQLException {
+    	if(param == null && Object.class.equals(paramType)){
+    		//Oracle drive does not support JAVA_OBJECT type
+    		stmt.setNull(i, Types.LONGVARBINARY);
+    		return;
+    	}
+    	super.bindValue(stmt, param, paramType, i);
+    }
+    
+    @Override
+    public void afterInitialConnectionCreation(Connection connection) {
+    	String errorStr = JDBCPlugin.Util.getString("ConnectionListener.failed_to_report_oracle_connection_details"); //$NON-NLS-1$
+    	ResultSet rs = null;
+        Statement stmt = null;
+        try {                
+            stmt = connection.createStatement();
+            rs = stmt.executeQuery("select * from v$instance"); //$NON-NLS-1$ 
+            
+            int columnCount = rs.getMetaData().getColumnCount();
+            while (rs.next()) {
+                StringBuffer sb = new StringBuffer();
+                for (int i = 1; i <= columnCount; i++) {
+                    sb.append(rs.getMetaData().getColumnName(i)).append("=").append(rs.getString(i)).append(";"); //$NON-NLS-1$ //$NON-NLS-2$
+                }                    
+                // log the queried information
+                LogManager.logInfo(LogConstants.CTX_CONNECTOR, sb.toString());                    
+            }                
+            
+        } catch (SQLException e) {
+        	LogManager.logInfo(LogConstants.CTX_CONNECTOR, errorStr); 
+        }finally {
+            try {
+                if (rs != null) {
+                    rs.close();
+                } 
+                if (stmt != null) {
+                    stmt.close();
+                }
+            } catch (SQLException e1) {
+            	LogManager.logInfo(LogConstants.CTX_CONNECTOR, errorStr);
+            }
+        }
+    }
+    
+    @Override
+    public NullOrder getDefaultNullOrder() {
+    	return NullOrder.HIGH;
+    }
+    
+    @Override
+    public boolean supportsExplicitNullOrdering() {
+    	return true;
+    }    
+    
+    @Override
+    public List<String> getSupportedFunctions() {
+        List<String> supportedFunctions = new ArrayList<String>();
+        supportedFunctions.addAll(super.getSupportedFunctions());
+        supportedFunctions.add("ABS"); //$NON-NLS-1$
+        supportedFunctions.add("ACOS"); //$NON-NLS-1$
+        supportedFunctions.add("ASIN"); //$NON-NLS-1$
+        supportedFunctions.add("ATAN"); //$NON-NLS-1$
+        supportedFunctions.add("ATAN2"); //$NON-NLS-1$
+        supportedFunctions.add("COS"); //$NON-NLS-1$
+        supportedFunctions.add(SourceSystemFunctions.COT); 
+        supportedFunctions.add("EXP"); //$NON-NLS-1$
+        supportedFunctions.add("FLOOR"); //$NON-NLS-1$
+        supportedFunctions.add("CEILING"); //$NON-NLS-1$
+        supportedFunctions.add("LOG"); //$NON-NLS-1$
+        supportedFunctions.add("LOG10"); //$NON-NLS-1$
+        supportedFunctions.add("MOD"); //$NON-NLS-1$
+        supportedFunctions.add("POWER"); //$NON-NLS-1$
+        supportedFunctions.add("SIGN"); //$NON-NLS-1$
+        supportedFunctions.add("SIN"); //$NON-NLS-1$
+        supportedFunctions.add("SQRT"); //$NON-NLS-1$
+        supportedFunctions.add("TAN"); //$NON-NLS-1$
+        supportedFunctions.add("ASCII"); //$NON-NLS-1$
+        supportedFunctions.add("CHAR"); //$NON-NLS-1$
+        supportedFunctions.add("CHR"); //$NON-NLS-1$
+        supportedFunctions.add("CONCAT"); //$NON-NLS-1$
+        supportedFunctions.add("||"); //$NON-NLS-1$
+        supportedFunctions.add("INITCAP"); //$NON-NLS-1$
+        supportedFunctions.add("LCASE"); //$NON-NLS-1$
+        supportedFunctions.add("LENGTH"); //$NON-NLS-1$
+        supportedFunctions.add("LEFT"); //$NON-NLS-1$
+        supportedFunctions.add("LOCATE"); //$NON-NLS-1$
+        supportedFunctions.add("LOWER"); //$NON-NLS-1$
+        supportedFunctions.add("LPAD"); //$NON-NLS-1$
+        supportedFunctions.add("LTRIM"); //$NON-NLS-1$
+        supportedFunctions.add("REPLACE"); //$NON-NLS-1$
+        supportedFunctions.add("RPAD"); //$NON-NLS-1$
+        supportedFunctions.add("RIGHT"); //$NON-NLS-1$
+        supportedFunctions.add("RTRIM"); //$NON-NLS-1$
+        supportedFunctions.add("SUBSTRING"); //$NON-NLS-1$
+        supportedFunctions.add("TRANSLATE"); //$NON-NLS-1$
+        supportedFunctions.add("UCASE"); //$NON-NLS-1$
+        supportedFunctions.add("UPPER"); //$NON-NLS-1$
+        supportedFunctions.add("HOUR"); //$NON-NLS-1$
+        supportedFunctions.add("MONTH"); //$NON-NLS-1$
+        supportedFunctions.add("MONTHNAME"); //$NON-NLS-1$
+        supportedFunctions.add("YEAR"); //$NON-NLS-1$
+        supportedFunctions.add("DAY"); //$NON-NLS-1$
+        supportedFunctions.add("DAYNAME"); //$NON-NLS-1$
+        supportedFunctions.add("DAYOFMONTH"); //$NON-NLS-1$
+        supportedFunctions.add("DAYOFWEEK"); //$NON-NLS-1$
+        supportedFunctions.add("DAYOFYEAR"); //$NON-NLS-1$
+        supportedFunctions.add("QUARTER"); //$NON-NLS-1$
+        supportedFunctions.add("MINUTE"); //$NON-NLS-1$
+        supportedFunctions.add("SECOND"); //$NON-NLS-1$
+        supportedFunctions.add("QUARTER"); //$NON-NLS-1$
+        supportedFunctions.add("WEEK"); //$NON-NLS-1$
+        //supportedFunctions.add("FORMATDATE"); //$NON-NLS-1$
+        //supportedFunctions.add("FORMATTIME"); //$NON-NLS-1$
+        //supportedFunctions.add("FORMATTIMESTAMP"); //$NON-NLS-1$ 
+        //supportedFunctions.add("PARSEDATE"); //$NON-NLS-1$
+        //supportedFunctions.add("PARSETIME"); //$NON-NLS-1$
+        //supportedFunctions.add("PARSETIMESTAMP"); //$NON-NLS-1$          
+        supportedFunctions.add("CAST"); //$NON-NLS-1$
+        supportedFunctions.add("CONVERT"); //$NON-NLS-1$
+        supportedFunctions.add("IFNULL"); //$NON-NLS-1$
+        supportedFunctions.add("NVL");      //$NON-NLS-1$ 
+        supportedFunctions.add("COALESCE"); //$NON-NLS-1$
+        
+        supportedFunctions.add(OracleExecutionFactory.RELATE);
+        supportedFunctions.add(OracleExecutionFactory.NEAREST_NEIGHBOR);
+        supportedFunctions.add(OracleExecutionFactory.FILTER);
+        supportedFunctions.add(OracleExecutionFactory.NEAREST_NEIGHBOR_DISTANCE);
+        supportedFunctions.add(OracleExecutionFactory.WITHIN_DISTANCE);
+        return supportedFunctions;
+    }
+    
+    @Override
+    public boolean supportsInlineViews() {
+        return true;
+    }
+
+    /** 
+     * @see org.teiid.translator.ConnectorCapabilities#supportsFunctionsInGroupBy()
+     * @since 5.0
+     */
+    @Override
+    public boolean supportsFunctionsInGroupBy() {
+        return true;
+    }    
+    @Override
+    public boolean supportsRowLimit() {
+        return true;
+    }
+    @Override
+    public boolean supportsRowOffset() {
+        return true;
+    }
+    
+    /** 
+     * @see org.teiid.translator.BasicConnectorCapabilities#supportsExcept()
+     */
+    @Override
+    public boolean supportsExcept() {
+        return true;
+    }
+    
+    /** 
+     * @see org.teiid.translator.BasicConnectorCapabilities#supportsIntersect()
+     */
+    @Override
+    public boolean supportsIntersect() {
+        return true;
+    }    
+}

Deleted: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/oracle/OracleSQLTranslator.java
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/oracle/OracleSQLTranslator.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/oracle/OracleSQLTranslator.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -1,439 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership.  Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- * 
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- * 
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-/*
- */
-package org.teiid.translator.jdbc.oracle;
-
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.sql.Statement;
-import java.sql.Types;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.List;
-
-import org.teiid.language.ColumnReference;
-import org.teiid.language.Command;
-import org.teiid.language.DerivedColumn;
-import org.teiid.language.Expression;
-import org.teiid.language.ExpressionValueSource;
-import org.teiid.language.Function;
-import org.teiid.language.Insert;
-import org.teiid.language.Limit;
-import org.teiid.language.Literal;
-import org.teiid.language.NamedTable;
-import org.teiid.language.QueryExpression;
-import org.teiid.language.Select;
-import org.teiid.language.SQLReservedWords.Tokens;
-import org.teiid.language.SetQuery.Operation;
-import org.teiid.language.visitor.CollectorVisitor;
-import org.teiid.logging.LogConstants;
-import org.teiid.logging.LogManager;
-import org.teiid.metadata.Column;
-import org.teiid.translator.ConnectorCapabilities;
-import org.teiid.translator.ConnectorException;
-import org.teiid.translator.ExecutionContext;
-import org.teiid.translator.SourceSystemFunctions;
-import org.teiid.translator.TypeFacility;
-import org.teiid.translator.jdbc.AliasModifier;
-import org.teiid.translator.jdbc.ConvertModifier;
-import org.teiid.translator.jdbc.ExtractFunctionModifier;
-import org.teiid.translator.jdbc.FunctionModifier;
-import org.teiid.translator.jdbc.JDBCExecutionFactory;
-import org.teiid.translator.jdbc.JDBCPlugin;
-import org.teiid.translator.jdbc.LocateFunctionModifier;
-import org.teiid.translator.jdbc.Translator;
-
-
-
-public class OracleSQLTranslator extends Translator {
-
-	/*
-	 * Spatial Functions
-	 */
-	public static final String RELATE = "sdo_relate"; //$NON-NLS-1$
-	public static final String NEAREST_NEIGHBOR = "sdo_nn"; //$NON-NLS-1$
-	public static final String FILTER = "sdo_filter"; //$NON-NLS-1$
-	public static final String WITHIN_DISTANCE = "sdo_within_distance"; //$NON-NLS-1$
-	public static final String NEAREST_NEIGHBOR_DISTANCE = "sdo_nn_distance"; //$NON-NLS-1$
-
-    public final static String HINT_PREFIX = "/*+"; //$NON-NLS-1$
-    public final static String DUAL = "DUAL"; //$NON-NLS-1$
-    public final static String ROWNUM = "ROWNUM"; //$NON-NLS-1$
-    public final static String SEQUENCE = ":SEQUENCE="; //$NON-NLS-1$
-	
-    public void initialize(JDBCExecutionFactory env) throws ConnectorException {
-        super.initialize(env);
-        registerFunctionModifier(SourceSystemFunctions.CHAR, new AliasModifier("chr")); //$NON-NLS-1$ 
-        registerFunctionModifier(SourceSystemFunctions.LCASE, new AliasModifier("lower")); //$NON-NLS-1$ 
-        registerFunctionModifier(SourceSystemFunctions.UCASE, new AliasModifier("upper")); //$NON-NLS-1$ 
-        registerFunctionModifier(SourceSystemFunctions.IFNULL, new AliasModifier("nvl")); //$NON-NLS-1$ 
-        registerFunctionModifier(SourceSystemFunctions.LOG, new AliasModifier("ln")); //$NON-NLS-1$ 
-        registerFunctionModifier(SourceSystemFunctions.CEILING, new AliasModifier("ceil")); //$NON-NLS-1$ 
-        registerFunctionModifier(SourceSystemFunctions.LOG10, new Log10FunctionModifier(getLanguageFactory())); 
-        registerFunctionModifier(SourceSystemFunctions.HOUR, new ExtractFunctionModifier());
-        registerFunctionModifier(SourceSystemFunctions.YEAR, new ExtractFunctionModifier()); 
-        registerFunctionModifier(SourceSystemFunctions.MINUTE, new ExtractFunctionModifier()); 
-        registerFunctionModifier(SourceSystemFunctions.SECOND, new ExtractFunctionModifier()); 
-        registerFunctionModifier(SourceSystemFunctions.MONTH, new ExtractFunctionModifier()); 
-        registerFunctionModifier(SourceSystemFunctions.DAYOFMONTH, new ExtractFunctionModifier()); 
-        registerFunctionModifier(SourceSystemFunctions.MONTHNAME, new MonthOrDayNameFunctionModifier(getLanguageFactory(), "Month"));//$NON-NLS-1$ 
-        registerFunctionModifier(SourceSystemFunctions.DAYNAME, new MonthOrDayNameFunctionModifier(getLanguageFactory(), "Day"));//$NON-NLS-1$ 
-        registerFunctionModifier(SourceSystemFunctions.WEEK, new DayWeekQuarterFunctionModifier("WW"));//$NON-NLS-1$ 
-        registerFunctionModifier(SourceSystemFunctions.QUARTER, new DayWeekQuarterFunctionModifier("Q"));//$NON-NLS-1$ 
-        registerFunctionModifier(SourceSystemFunctions.DAYOFWEEK, new DayWeekQuarterFunctionModifier("D"));//$NON-NLS-1$ 
-        registerFunctionModifier(SourceSystemFunctions.DAYOFYEAR, new DayWeekQuarterFunctionModifier("DDD"));//$NON-NLS-1$ 
-        registerFunctionModifier(SourceSystemFunctions.LOCATE, new LocateFunctionModifier(getLanguageFactory(), "INSTR", true)); //$NON-NLS-1$
-        registerFunctionModifier(SourceSystemFunctions.SUBSTRING, new AliasModifier("substr"));//$NON-NLS-1$ 
-        registerFunctionModifier(SourceSystemFunctions.LEFT, new LeftOrRightFunctionModifier(getLanguageFactory()));
-        registerFunctionModifier(SourceSystemFunctions.RIGHT, new LeftOrRightFunctionModifier(getLanguageFactory()));
-        registerFunctionModifier(SourceSystemFunctions.CONCAT, new ConcatFunctionModifier(getLanguageFactory())); 
-        registerFunctionModifier(SourceSystemFunctions.COT, new FunctionModifier() {
-			@Override
-			public List<?> translate(Function function) {
-				function.setName(SourceSystemFunctions.TAN);
-				return Arrays.asList(getLanguageFactory().createFunction(SourceSystemFunctions.DIVIDE_OP, new Expression[] {new Literal(1, TypeFacility.RUNTIME_TYPES.INTEGER), function}, TypeFacility.RUNTIME_TYPES.DOUBLE));
-			}
-		});
-        
-        //spatial functions
-        registerFunctionModifier(RELATE, new OracleSpatialFunctionModifier());
-        registerFunctionModifier(NEAREST_NEIGHBOR, new OracleSpatialFunctionModifier());
-        registerFunctionModifier(FILTER, new OracleSpatialFunctionModifier());
-        registerFunctionModifier(WITHIN_DISTANCE, new OracleSpatialFunctionModifier());
-        
-        //add in type conversion
-        ConvertModifier convertModifier = new ConvertModifier();
-    	convertModifier.addTypeMapping("char(1)", FunctionModifier.CHAR); //$NON-NLS-1$
-    	convertModifier.addTypeMapping("date", FunctionModifier.DATE, FunctionModifier.TIME); //$NON-NLS-1$
-    	convertModifier.addTypeMapping("timestamp", FunctionModifier.TIMESTAMP); //$NON-NLS-1$
-    	convertModifier.addConvert(FunctionModifier.TIMESTAMP, FunctionModifier.TIME, new FunctionModifier() {
-    		@Override
-    		public List<?> translate(Function function) {
-    			return Arrays.asList("case when ", function.getParameters().get(0), " is null then null else to_date('1970-01-01 ' || to_char(",function.getParameters().get(0),", 'HH24:MI:SS'), 'YYYY-MM-DD HH24:MI:SS') end"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-    		}
-    	});
-    	convertModifier.addConvert(FunctionModifier.TIMESTAMP, FunctionModifier.DATE, new FunctionModifier() {
-			@Override
-			public List<?> translate(Function function) {
-				return Arrays.asList("trunc(cast(",function.getParameters().get(0)," AS date))"); //$NON-NLS-1$ //$NON-NLS-2$
-			}
-		});
-    	convertModifier.addConvert(FunctionModifier.DATE, FunctionModifier.STRING, new ConvertModifier.FormatModifier("to_char", "YYYY-MM-DD")); //$NON-NLS-1$ //$NON-NLS-2$
-    	convertModifier.addConvert(FunctionModifier.TIME, FunctionModifier.STRING, new ConvertModifier.FormatModifier("to_char", "HH24:MI:SS")); //$NON-NLS-1$ //$NON-NLS-2$
-    	convertModifier.addConvert(FunctionModifier.TIMESTAMP, FunctionModifier.STRING, new FunctionModifier() {
-			@Override
-			public List<?> translate(Function function) {
-				//if column and type is date, just use date format
-				Expression ex = function.getParameters().get(0);
-				String format = "YYYY-MM-DD HH24:MI:SS.FF"; //$NON-NLS-1$
-				if (ex instanceof ColumnReference) {
-					if ("date".equals(((ColumnReference)ex).getMetadataObject().getNativeType())) { //$NON-NLS-1$
-						format = "YYYY-MM-DD HH24:MI:SS"; //$NON-NLS-1$
-					}
-				} else if (!(ex instanceof Function) && !(ex instanceof Literal)) {
-					//this isn't needed in every case, but it's simpler than inspecting the expression more
-					ex = ConvertModifier.createConvertFunction(getLanguageFactory(), function.getParameters().get(0), TypeFacility.RUNTIME_NAMES.TIMESTAMP);
-				}
-				return Arrays.asList("to_char(", ex, ", '", format, "')"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-			}
-		});
-    	convertModifier.addConvert(FunctionModifier.STRING, FunctionModifier.DATE, new ConvertModifier.FormatModifier("to_date", "YYYY-MM-DD")); //$NON-NLS-1$ //$NON-NLS-2$
-    	convertModifier.addConvert(FunctionModifier.STRING, FunctionModifier.TIME, new ConvertModifier.FormatModifier("to_date", "HH24:MI:SS")); //$NON-NLS-1$ //$NON-NLS-2$
-    	convertModifier.addConvert(FunctionModifier.STRING, FunctionModifier.TIMESTAMP, new ConvertModifier.FormatModifier("to_timestamp", "YYYY-MM-DD HH24:MI:SS.FF")); //$NON-NLS-1$ //$NON-NLS-2$
-    	convertModifier.addTypeConversion(new ConvertModifier.FormatModifier("to_char"), FunctionModifier.STRING); //$NON-NLS-1$
-    	//NOTE: numeric handling in Oracle is split only between integral vs. floating/decimal types
-    	convertModifier.addTypeConversion(new ConvertModifier.FormatModifier("to_number"), //$NON-NLS-1$
-    			FunctionModifier.FLOAT, FunctionModifier.DOUBLE, FunctionModifier.BIGDECIMAL);
-    	convertModifier.addTypeConversion(new FunctionModifier() {
-			@Override
-			public List<?> translate(Function function) {
-				if (Number.class.isAssignableFrom(function.getParameters().get(0).getType())) {
-					return Arrays.asList("trunc(", function.getParameters().get(0), ")"); //$NON-NLS-1$ //$NON-NLS-2$
-				}
-				return Arrays.asList("trunc(to_number(", function.getParameters().get(0), "))"); //$NON-NLS-1$ //$NON-NLS-2$
-			}
-		}, 
-		FunctionModifier.BYTE, FunctionModifier.SHORT, FunctionModifier.INTEGER, FunctionModifier.LONG,	FunctionModifier.BIGINTEGER);
-    	convertModifier.addNumericBooleanConversions();
-    	convertModifier.setWideningNumericImplicit(true);
-    	registerFunctionModifier(SourceSystemFunctions.CONVERT, convertModifier);
-    }
-    
-    public void handleInsertSequences(Insert insert) throws ConnectorException {
-        /* 
-         * If a missing auto_increment column is modeled with name in source indicating that an Oracle Sequence 
-         * then pull the Sequence name out of the name in source of the column.
-         */
-    	if (!(insert.getValueSource() instanceof ExpressionValueSource)) {
-    		return;
-    	}
-    	ExpressionValueSource values = (ExpressionValueSource)insert.getValueSource();
-    	List<Column> allElements = insert.getTable().getMetadataObject().getColumns();
-    	if (allElements.size() == values.getValues().size()) {
-    		return;
-    	}
-    	
-    	int index = 0;
-    	List<ColumnReference> elements = insert.getColumns();
-    	
-    	for (Column element : allElements) {
-    		if (!element.isAutoIncremented()) {
-    			continue;
-    		}
-    		String name = element.getNameInSource();
-    		int seqIndex = name.indexOf(SEQUENCE);
-    		if (seqIndex == -1) {
-    			continue;
-    		}
-    		boolean found = false;
-    		while (index < elements.size()) {
-    			if (element.equals(elements.get(index).getMetadataObject())) {
-    				found = true;
-    				break;
-    			}
-    			index++;
-    		}
-    		if (found) {
-    			continue;
-    		}
-    		
-            String sequence = name.substring(seqIndex + SEQUENCE.length());
-            
-            int delimiterIndex = sequence.indexOf(Tokens.DOT);
-            if (delimiterIndex == -1) {
-            	throw new ConnectorException("Invalid name in source sequence format.  Expected <element name>" + SEQUENCE + "<sequence name>.<sequence value>, but was " + name); //$NON-NLS-1$ //$NON-NLS-2$
-            }
-            String sequenceGroupName = sequence.substring(0, delimiterIndex);
-            String sequenceElementName = sequence.substring(delimiterIndex + 1);
-                
-            NamedTable sequenceGroup = this.getLanguageFactory().createNamedTable(sequenceGroupName, null, null);
-            ColumnReference sequenceElement = this.getLanguageFactory().createColumnReference(sequenceElementName, sequenceGroup, null, element.getJavaType());
-            insert.getColumns().add(index, this.getLanguageFactory().createColumnReference(element.getName(), insert.getTable(), element, element.getJavaType()));
-            values.getValues().add(index, sequenceElement);
-		}
-    }
-    
-    @Override
-    public List<?> translateCommand(Command command, ExecutionContext context) {
-    	if (command instanceof Insert) {
-    		try {
-				handleInsertSequences((Insert)command);
-			} catch (ConnectorException e) {
-				throw new RuntimeException(e);
-			}
-    	}
-    	
-    	if (!(command instanceof QueryExpression)) {
-    		return null;
-    	}
-		QueryExpression queryCommand = (QueryExpression)command;
-		if (queryCommand.getLimit() == null) {
-			return null;
-    	}
-		Limit limit = queryCommand.getLimit();
-		queryCommand.setLimit(null);
-    	List<Object> parts = new ArrayList<Object>();
-    	parts.add("SELECT "); //$NON-NLS-1$
-    	/*
-    	 * if all of the columns are aliased, assume that names matter - it actually only seems to matter for
-    	 * the first query of a set op when there is a order by.  Rather than adding logic to traverse up,
-    	 * we just use the projected names 
-    	 */
-    	boolean allAliased = true;
-    	for (DerivedColumn selectSymbol : queryCommand.getProjectedQuery().getDerivedColumns()) {
-			if (selectSymbol.getAlias() == null) {
-				allAliased = false;
-				break;
-			}
-		}
-    	if (allAliased) {
-	    	String[] columnNames = queryCommand.getColumnNames();
-	    	for (int i = 0; i < columnNames.length; i++) {
-	    		if (i > 0) {
-	    			parts.add(", "); //$NON-NLS-1$
-	    		}
-	    		parts.add(columnNames[i]);
-			}
-    	} else {
-        	parts.add("*"); //$NON-NLS-1$
-    	}
-		if (limit.getRowOffset() > 0) {
-			parts.add(" FROM (SELECT VIEW_FOR_LIMIT.*, ROWNUM ROWNUM_ FROM ("); //$NON-NLS-1$
-		} else {
-			parts.add(" FROM ("); //$NON-NLS-1$ 
-		}
-		parts.add(queryCommand);
-		if (limit.getRowOffset() > 0) {
-			parts.add(") VIEW_FOR_LIMIT WHERE ROWNUM <= "); //$NON-NLS-1$
-			parts.add(limit.getRowLimit() + limit.getRowOffset());
-			parts.add(") WHERE ROWNUM_ > "); //$NON-NLS-1$
-			parts.add(limit.getRowOffset());
-		} else {
-			parts.add(") WHERE ROWNUM <= "); //$NON-NLS-1$
-			parts.add(limit.getRowLimit());
-		}
-		return parts;
-    }
-
-    @Override
-    public boolean useAsInGroupAlias(){
-        return false;
-    }
-    
-    @Override
-    public String getSetOperationString(Operation operation) {
-    	if (operation == Operation.EXCEPT) {
-    		return "MINUS"; //$NON-NLS-1$
-    	}
-    	return super.getSetOperationString(operation);
-    }
-    
-    @Override
-    public String getSourceComment(ExecutionContext context, Command command) {
-    	String comment = super.getSourceComment(context, command);
-    	
-    	if (context != null) {
-	    	// Check for db hints
-		    Object payload = context.getExecutionPayload();
-		    if (payload instanceof String) {
-		        String payloadString = (String)payload;
-		        if (payloadString.startsWith(HINT_PREFIX)) {
-		            comment += payloadString + " "; //$NON-NLS-1$
-		        }
-		    }
-    	}
-    	
-		if (command instanceof Select) {
-	        //
-	        // This simple algorithm determines the hint which will be added to the
-	        // query.
-	        // Right now, we look through all functions passed in the query
-	        // (returned as a collection)
-	        // Then we check if any of those functions are sdo_relate
-	        // If so, the ORDERED hint is added, if not, it isn't
-	        Collection<Function> col = CollectorVisitor.collectObjects(Function.class, command);
-	        for (Function func : col) {
-	            if (func.getName().equalsIgnoreCase(RELATE)) {
-	                return comment + "/*+ ORDERED */ "; //$NON-NLS-1$
-	            }
-	        }
-		}
-    	return comment;
-    }
-    
-    /**
-     * Don't fully qualify elements if table = DUAL or element = ROWNUM or special stuff is packed into name in source value.
-     *  
-     * @see org.teiid.language.visitor.SQLStringVisitor#skipGroupInElement(java.lang.String, java.lang.String)
-     * @since 5.0
-     */
-    @Override
-    public String replaceElementName(String group, String element) {        
-
-        // Check if the element was modeled as using a Sequence
-        int useIndex = element.indexOf(SEQUENCE);
-        if (useIndex >= 0) {
-        	String name = element.substring(0, useIndex);
-        	if (group != null) {
-        		return group + Tokens.DOT + name;
-        	}
-        	return name;
-        }
-
-        // Check if the group name should be discarded
-        if((group != null && DUAL.equalsIgnoreCase(group)) || element.equalsIgnoreCase(ROWNUM)) {
-            // Strip group if group or element are pseudo-columns
-            return element;
-        }
-        
-        return null;
-    }
-    
-    @Override
-    public boolean hasTimeType() {
-    	return false;
-    }
-       
-    @Override
-    public void bindValue(PreparedStatement stmt, Object param, Class<?> paramType, int i) throws SQLException {
-    	if(param == null && Object.class.equals(paramType)){
-    		//Oracle drive does not support JAVA_OBJECT type
-    		stmt.setNull(i, Types.LONGVARBINARY);
-    		return;
-    	}
-    	super.bindValue(stmt, param, paramType, i);
-    }
-    
-    @Override
-    public void afterInitialConnectionCreation(Connection connection) {
-    	String errorStr = JDBCPlugin.Util.getString("ConnectionListener.failed_to_report_oracle_connection_details"); //$NON-NLS-1$
-    	ResultSet rs = null;
-        Statement stmt = null;
-        try {                
-            stmt = connection.createStatement();
-            rs = stmt.executeQuery("select * from v$instance"); //$NON-NLS-1$ 
-            
-            int columnCount = rs.getMetaData().getColumnCount();
-            while (rs.next()) {
-                StringBuffer sb = new StringBuffer();
-                for (int i = 1; i <= columnCount; i++) {
-                    sb.append(rs.getMetaData().getColumnName(i)).append("=").append(rs.getString(i)).append(";"); //$NON-NLS-1$ //$NON-NLS-2$
-                }                    
-                // log the queried information
-                LogManager.logInfo(LogConstants.CTX_CONNECTOR, sb.toString());                    
-            }                
-            
-        } catch (SQLException e) {
-        	LogManager.logInfo(LogConstants.CTX_CONNECTOR, errorStr); 
-        }finally {
-            try {
-                if (rs != null) {
-                    rs.close();
-                } 
-                if (stmt != null) {
-                    stmt.close();
-                }
-            } catch (SQLException e1) {
-            	LogManager.logInfo(LogConstants.CTX_CONNECTOR, errorStr);
-            }
-        }
-    }
-    
-    @Override
-    public NullOrder getDefaultNullOrder() {
-    	return NullOrder.HIGH;
-    }
-    
-    @Override
-    public Class<? extends ConnectorCapabilities> getDefaultCapabilities() {
-    	return OracleCapabilities.class;
-    }
-    
-    public boolean supportsExplicitNullOrdering() {
-    	return true;
-    }    
-}

Deleted: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/oracle/SequeLinkOracleCapabilities.java
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/oracle/SequeLinkOracleCapabilities.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/oracle/SequeLinkOracleCapabilities.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -1,37 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership.  Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- * 
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- * 
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package org.teiid.translator.jdbc.oracle;
-
-
-
-/** 
- * @since 5.0
- */
-public class SequeLinkOracleCapabilities extends OracleCapabilities {
-    
-	@Override
-	public boolean supportsBulkUpdate() {
-		return false;
-	}
-	
-}

Deleted: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/postgresql/PostgreSQLCapabilities.java
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/postgresql/PostgreSQLCapabilities.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/postgresql/PostgreSQLCapabilities.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -1,284 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership.  Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- * 
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- * 
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package org.teiid.translator.jdbc.postgresql;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.teiid.translator.jdbc.JDBCCapabilities;
-
-
-
-/** 
- * @since 4.3
- */
-public class PostgreSQLCapabilities extends JDBCCapabilities {
-    
-	public static final String EIGHT_0 = "8.0"; //$NON-NLS-1$
-	public static final String EIGHT_1 = "8.1"; //$NON-NLS-1$
-	public static final String EIGHT_2 = "8.2"; //$NON-NLS-1$
-	public static final String EIGHT_3 = "8.3"; //$NON-NLS-1$
-	public static final String EIGHT_4 = "8.4"; //$NON-NLS-1$
-    
-	private String version = EIGHT_0;
-	
-    public List<String> getSupportedFunctions() {
-        List<String> supportedFunctions = new ArrayList<String>();
-        supportedFunctions.addAll(super.getSupportedFunctions());
-    
-        supportedFunctions.add("ABS"); //$NON-NLS-1$
-        supportedFunctions.add("ACOS"); //$NON-NLS-1$
-        supportedFunctions.add("ASIN"); //$NON-NLS-1$
-        supportedFunctions.add("ATAN"); //$NON-NLS-1$
-        supportedFunctions.add("ATAN2"); //$NON-NLS-1$
-        supportedFunctions.add("BITAND"); //$NON-NLS-1$
-        supportedFunctions.add("BITNOT"); //$NON-NLS-1$
-        supportedFunctions.add("BITOR"); //$NON-NLS-1$
-        supportedFunctions.add("BITXOR"); //$NON-NLS-1$
-        supportedFunctions.add("CEILING"); //$NON-NLS-1$
-        supportedFunctions.add("COS"); //$NON-NLS-1$
-        supportedFunctions.add("COT"); //$NON-NLS-1$
-        supportedFunctions.add("DEGREES"); //$NON-NLS-1$
-        supportedFunctions.add("EXP"); //$NON-NLS-1$
-        supportedFunctions.add("FLOOR"); //$NON-NLS-1$
-        // These should not be pushed down since the grammar for string conversion is different
-//        supportedFunctions.add("FORMATBIGDECIMAL"); //$NON-NLS-1$
-//        supportedFunctions.add("FORMATBIGINTEGER"); //$NON-NLS-1$
-//        supportedFunctions.add("FORMATDOUBLE"); //$NON-NLS-1$
-//        supportedFunctions.add("FORMATFLOAT"); //$NON-NLS-1$
-//        supportedFunctions.add("FORMATINTEGER"); //$NON-NLS-1$
-//        supportedFunctions.add("FORMATLONG"); //$NON-NLS-1$
-        supportedFunctions.add("LOG"); //$NON-NLS-1$
-        supportedFunctions.add("LOG10"); //$NON-NLS-1$
-        supportedFunctions.add("MOD"); //$NON-NLS-1$
-        supportedFunctions.add("PI"); //$NON-NLS-1$
-        supportedFunctions.add("POWER"); //$NON-NLS-1$
-        supportedFunctions.add("RADIANS"); //$NON-NLS-1$
-        supportedFunctions.add("ROUND"); //$NON-NLS-1$
-        supportedFunctions.add("SIGN"); //$NON-NLS-1$
-        supportedFunctions.add("SIN"); //$NON-NLS-1$
-        supportedFunctions.add("SQRT"); //$NON-NLS-1$
-        supportedFunctions.add("TAN"); //$NON-NLS-1$
-        
-        supportedFunctions.add("ASCII"); //$NON-NLS-1$
-        supportedFunctions.add("CHR"); //$NON-NLS-1$
-        supportedFunctions.add("CHAR"); //$NON-NLS-1$
-        supportedFunctions.add("||"); //$NON-NLS-1$
-        supportedFunctions.add("CONCAT"); //$NON-NLS-1$
-        supportedFunctions.add("INITCAP"); //$NON-NLS-1$
-        supportedFunctions.add("LCASE"); //$NON-NLS-1$
-        supportedFunctions.add("LEFT"); //$NON-NLS-1$
-        supportedFunctions.add("LENGTH"); //$NON-NLS-1$
-        supportedFunctions.add("LOCATE"); //$NON-NLS-1$
-        supportedFunctions.add("LOWER"); //$NON-NLS-1$
-        supportedFunctions.add("LPAD"); //$NON-NLS-1$
-        supportedFunctions.add("LTRIM"); //$NON-NLS-1$
-        supportedFunctions.add("REPEAT"); //$NON-NLS-1$
-        supportedFunctions.add("REPLACE"); //$NON-NLS-1$
-        supportedFunctions.add("RIGHT"); //$NON-NLS-1$
-        supportedFunctions.add("RPAD"); //$NON-NLS-1$
-        supportedFunctions.add("RTRIM"); //$NON-NLS-1$
-        supportedFunctions.add("SUBSTRING"); //$NON-NLS-1$
-        supportedFunctions.add("UCASE"); //$NON-NLS-1$
-        supportedFunctions.add("UPPER"); //$NON-NLS-1$
-        
-        // These are executed within the server and never pushed down
-//        supportedFunctions.add("CURDATE"); //$NON-NLS-1$
-//        supportedFunctions.add("CURTIME"); //$NON-NLS-1$
-//        supportedFunctions.add("NOW"); //$NON-NLS-1$
-        supportedFunctions.add("DAYNAME"); //$NON-NLS-1$
-        supportedFunctions.add("DAYOFMONTH"); //$NON-NLS-1$
-        supportedFunctions.add("DAYOFWEEK"); //$NON-NLS-1$
-        supportedFunctions.add("DAYOFYEAR"); //$NON-NLS-1$
-        // These should not be pushed down since the grammar for string conversion is different
-//        supportedFunctions.add("FORMATDATE"); //$NON-NLS-1$
-//        supportedFunctions.add("FORMATTIME"); //$NON-NLS-1$
-//        supportedFunctions.add("FORMATTIMESTAMP"); //$NON-NLS-1$
-        supportedFunctions.add("HOUR"); //$NON-NLS-1$
-        supportedFunctions.add("MINUTE"); //$NON-NLS-1$
-        supportedFunctions.add("MONTH"); //$NON-NLS-1$
-        supportedFunctions.add("MONTHNAME"); //$NON-NLS-1$
-        // These should not be pushed down since the grammar for string conversion is different
-//        supportedFunctions.add("PARSEDATE"); //$NON-NLS-1$
-//        supportedFunctions.add("PARSETIME"); //$NON-NLS-1$
-//        supportedFunctions.add("PARSETIMESTAMP"); //$NON-NLS-1$
-        supportedFunctions.add("QUARTER"); //$NON-NLS-1$
-        supportedFunctions.add("SECOND"); //$NON-NLS-1$
-        if (this.version.compareTo(EIGHT_2) >= 0) {
-        	supportedFunctions.add("TIMESTAMPADD"); //$NON-NLS-1$
-        	supportedFunctions.add("TIMESTAMPDIFF"); //$NON-NLS-1$
-        }
-        supportedFunctions.add("WEEK"); //$NON-NLS-1$
-        supportedFunctions.add("YEAR"); //$NON-NLS-1$
-        
-        supportedFunctions.add("CAST"); //$NON-NLS-1$
-        supportedFunctions.add("CONVERT"); //$NON-NLS-1$
-        supportedFunctions.add("IFNULL"); //$NON-NLS-1$
-        supportedFunctions.add("NVL"); //$NON-NLS-1$
-        
-        // Additional functions
-//        // Math
-//        supportedFunctions.add("%"); //$NON-NLS-1$
-//        supportedFunctions.add("^"); //$NON-NLS-1$
-//        supportedFunctions.add("|/"); //$NON-NLS-1$
-//        supportedFunctions.add("||/"); //$NON-NLS-1$
-//        supportedFunctions.add("!"); //$NON-NLS-1$
-//        supportedFunctions.add("!!"); //$NON-NLS-1$
-//        supportedFunctions.add("@"); //$NON-NLS-1$
-//          // Bit manipulation
-//        supportedFunctions.add("&"); //$NON-NLS-1$
-//        supportedFunctions.add("|"); //$NON-NLS-1$
-//        supportedFunctions.add("#"); //$NON-NLS-1$
-//        supportedFunctions.add("~"); //$NON-NLS-1$
-//        supportedFunctions.add("<<"); //$NON-NLS-1$
-//        supportedFunctions.add(">>"); //$NON-NLS-1$
-//        
-//        supportedFunctions.add("CBRT"); //$NON-NLS-1$
-//        supportedFunctions.add("CEIL"); //$NON-NLS-1$
-//        supportedFunctions.add("LN"); //$NON-NLS-1$
-//        supportedFunctions.add("MOD"); //$NON-NLS-1$
-//        supportedFunctions.add("RANDOM"); //$NON-NLS-1$
-//        supportedFunctions.add("SETSEED"); //$NON-NLS-1$
-//        supportedFunctions.add("TRUNC"); //$NON-NLS-1$
-//        supportedFunctions.add("WIDTH_BUCKET"); //$NON-NLS-1$
-//        
-//        // String
-//        supportedFunctions.add("BIT_LENGTH"); //$NON-NLS-1$
-//        supportedFunctions.add("BTRIM"); //$NON-NLS-1$
-//        supportedFunctions.add("CHAR_LENGTH"); //$NON-NLS-1$
-//        supportedFunctions.add("CHARACTER_LENGTH"); //$NON-NLS-1$
-//        supportedFunctions.add("DECODE"); //$NON-NLS-1$
-//        supportedFunctions.add("ENCODE"); //$NON-NLS-1$
-//        supportedFunctions.add("MD5"); //$NON-NLS-1$
-//        supportedFunctions.add("OCTET_LENGTH"); //$NON-NLS-1$
-//        supportedFunctions.add("PG_CLIENT_ENCODING"); //$NON-NLS-1$
-//        supportedFunctions.add("QUOTE_IDENT"); //$NON-NLS-1$
-//        supportedFunctions.add("QUOTE_LITERAL"); //$NON-NLS-1$
-//        supportedFunctions.add("SPLIT_PART"); //$NON-NLS-1$
-//        supportedFunctions.add("STRPOS"); //$NON-NLS-1$
-//        supportedFunctions.add("SUBSTR"); //$NON-NLS-1$
-//        supportedFunctions.add("TO_ASCII"); //$NON-NLS-1$
-//        supportedFunctions.add("TO_HEX"); //$NON-NLS-1$
-//        supportedFunctions.add("TRANSLATE"); //$NON-NLS-1$
-//        
-//        // Bit operations
-//        supportedFunctions.add("GET_BIT"); //$NON-NLS-1$
-//        supportedFunctions.add("GET_BYTE"); //$NON-NLS-1$
-//        supportedFunctions.add("SET_BIT"); //$NON-NLS-1$
-//        supportedFunctions.add("SET_BYTE"); //$NON-NLS-1$
-//        
-//        // Formatting
-//        supportedFunctions.add("TO_CHAR"); //$NON-NLS-1$
-//        supportedFunctions.add("TO_DATE"); //$NON-NLS-1$
-//        supportedFunctions.add("TO_TIMESTAMP"); //$NON-NLS-1$
-//        supportedFunctions.add("TO_NUMBER"); //$NON-NLS-1$
-//        
-//        // Date / Time
-//        supportedFunctions.add("AGE"); //$NON-NLS-1$
-//        supportedFunctions.add("CURRENT_DATE"); //$NON-NLS-1$            // no ()
-//        supportedFunctions.add("CURRENT_TIME"); //$NON-NLS-1$            // no ()
-//        supportedFunctions.add("CURRENT_TIMESTAMP"); //$NON-NLS-1$       // no ()
-//        supportedFunctions.add("DATE_PART"); //$NON-NLS-1$
-//        supportedFunctions.add("DATE_TRUNC"); //$NON-NLS-1$
-//        supportedFunctions.add("ISFINITE"); //$NON-NLS-1$
-//        supportedFunctions.add("JUSTIFY_HOURS"); //$NON-NLS-1$
-//        supportedFunctions.add("JUSTIFY_DAYS"); //$NON-NLS-1$
-//        supportedFunctions.add("LOCALTIME"); //$NON-NLS-1$               // no ()
-//        supportedFunctions.add("LOCALTIMESTAMP"); //$NON-NLS-1$          // no ()
-//        supportedFunctions.add("TIMEOFDAY"); //$NON-NLS-1$
-//        
-//        // Conditional
-          supportedFunctions.add("COALESCE"); //$NON-NLS-1$
-//        supportedFunctions.add("NULLIF"); //$NON-NLS-1$
-//        supportedFunctions.add("GREATEST"); //$NON-NLS-1$
-//        supportedFunctions.add("LEAST"); //$NON-NLS-1$
-//        
-//        // Network Addresses
-////        supportedFunctions.add("BROADCAST"); //$NON-NLS-1$
-////        supportedFunctions.add("HOST"); //$NON-NLS-1$
-////        supportedFunctions.add("MASKLEN"); //$NON-NLS-1$
-////        supportedFunctions.add("SET_MASKLEN"); //$NON-NLS-1$
-////        supportedFunctions.add("NETMASK"); //$NON-NLS-1$
-////        supportedFunctions.add("HOSTMASK"); //$NON-NLS-1$
-////        supportedFunctions.add("NETWORK"); //$NON-NLS-1$
-////        supportedFunctions.add("TEXT"); //$NON-NLS-1$
-////        supportedFunctions.add("ABBREV"); //$NON-NLS-1$
-////        supportedFunctions.add("FAMILY"); //$NON-NLS-1$
-////        supportedFunctions.add("TRUNC"); //$NON-NLS-1$
-//        
-//        // Set generator
-//        supportedFunctions.add("GENERATE_SERIES"); //$NON-NLS-1$
-//        
-//        // Information
-//        supportedFunctions.add("CURRENT_DATABASE"); //$NON-NLS-1$
-//        supportedFunctions.add("CURRENT_SCHEMA"); //$NON-NLS-1$
-//        supportedFunctions.add("CURRENT_SCHEMAS"); //$NON-NLS-1$
-//        supportedFunctions.add("CURRENT_USER"); //$NON-NLS-1$           // no ()
-//        supportedFunctions.add("INET_CLIENT_ADDR"); //$NON-NLS-1$
-//        supportedFunctions.add("INET_CLIENT_PORT"); //$NON-NLS-1$
-//        supportedFunctions.add("INET_SERVER_ADDR"); //$NON-NLS-1$
-//        supportedFunctions.add("INET_SERVER_PORT"); //$NON-NLS-1$
-//        supportedFunctions.add("SESSION_USER"); //$NON-NLS-1$           // no ()
-//        supportedFunctions.add("USER"); //$NON-NLS-1$                   // no ()
-//        supportedFunctions.add("VERSION"); //$NON-NLS-1$
-//        
-        return supportedFunctions;
-    }
-    
-    /** 
-     * This is true only after Postgre version 7.1 
-     * However, since version 7 was released in 2000 we'll assume a post 7 instance.
-     * 
-     * @see org.teiid.translator.jdbc.JDBCCapabilities#supportsInlineViews()
-     */
-    public boolean supportsInlineViews() {
-        return true;
-    }
-
-    public boolean supportsRowLimit() {
-        return true;
-    }
-    public boolean supportsRowOffset() {
-        return true;
-    }
-    
-    /** 
-     * @see org.teiid.translator.BasicConnectorCapabilities#supportsExcept()
-     */
-    @Override
-    public boolean supportsExcept() {
-        return true;
-    }
-    
-    /** 
-     * @see org.teiid.translator.BasicConnectorCapabilities#supportsIntersect()
-     */
-    @Override
-    public boolean supportsIntersect() {
-        return true;
-    }
-    
-    public void setDatabaseVersion(String version) {
-    	this.version = version;
-    }
-}

Copied: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/postgresql/PostgreSQLExecutionFactory.java (from rev 2121, trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/postgresql/PostgreSQLTranslator.java)
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/postgresql/PostgreSQLExecutionFactory.java	                        (rev 0)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/postgresql/PostgreSQLExecutionFactory.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -0,0 +1,473 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership.  Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ * 
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ * 
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.translator.jdbc.postgresql;
+
+import java.sql.Date;
+import java.sql.Time;
+import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.teiid.language.AggregateFunction;
+import org.teiid.language.Expression;
+import org.teiid.language.Function;
+import org.teiid.language.LanguageObject;
+import org.teiid.language.Limit;
+import org.teiid.language.Literal;
+import org.teiid.language.SQLReservedWords;
+import org.teiid.translator.ConnectorException;
+import org.teiid.translator.ExecutionContext;
+import org.teiid.translator.SourceSystemFunctions;
+import org.teiid.translator.TranslatorProperty;
+import org.teiid.translator.TypeFacility;
+import org.teiid.translator.jdbc.AliasModifier;
+import org.teiid.translator.jdbc.ConvertModifier;
+import org.teiid.translator.jdbc.EscapeSyntaxModifier;
+import org.teiid.translator.jdbc.ExtractFunctionModifier;
+import org.teiid.translator.jdbc.FunctionModifier;
+import org.teiid.translator.jdbc.JDBCExecutionFactory;
+import org.teiid.translator.jdbc.ModFunctionModifier;
+import org.teiid.translator.jdbc.oracle.LeftOrRightFunctionModifier;
+import org.teiid.translator.jdbc.oracle.MonthOrDayNameFunctionModifier;
+
+
+
+/** 
+ * Translator class for PostgreSQL.  Updated to expect a 8.0+ jdbc client
+ * @since 4.3
+ */
+public class PostgreSQLExecutionFactory extends JDBCExecutionFactory {
+	
+	public static final String EIGHT_0 = "8.0"; //$NON-NLS-1$
+	public static final String EIGHT_1 = "8.1"; //$NON-NLS-1$
+	public static final String EIGHT_2 = "8.2"; //$NON-NLS-1$
+	public static final String EIGHT_3 = "8.3"; //$NON-NLS-1$
+	public static final String EIGHT_4 = "8.4"; //$NON-NLS-1$
+    
+	private String version = EIGHT_0;	
+
+    public void start() throws ConnectorException {
+        //TODO: all of the functions (except for convert) can be handled through just the escape syntax
+        super.start();
+        
+        registerFunctionModifier(SourceSystemFunctions.LOG, new AliasModifier("ln")); //$NON-NLS-1$ 
+        registerFunctionModifier(SourceSystemFunctions.LOG10, new AliasModifier("log")); //$NON-NLS-1$ 
+        
+        registerFunctionModifier(SourceSystemFunctions.BITAND, new AliasModifier("&")); //$NON-NLS-1$ 
+        registerFunctionModifier(SourceSystemFunctions.BITNOT, new AliasModifier("~")); //$NON-NLS-1$ 
+        registerFunctionModifier(SourceSystemFunctions.BITOR, new AliasModifier("|")); //$NON-NLS-1$ 
+        registerFunctionModifier(SourceSystemFunctions.BITXOR, new AliasModifier("#")); //$NON-NLS-1$ 
+        
+        registerFunctionModifier(SourceSystemFunctions.CHAR, new AliasModifier("chr")); //$NON-NLS-1$ 
+        registerFunctionModifier(SourceSystemFunctions.CONCAT, new AliasModifier("||")); //$NON-NLS-1$ 
+        registerFunctionModifier(SourceSystemFunctions.LCASE, new AliasModifier("lower")); //$NON-NLS-1$ 
+        registerFunctionModifier(SourceSystemFunctions.LEFT, new LeftOrRightFunctionModifier(getLanguageFactory()));
+        registerFunctionModifier(SourceSystemFunctions.RIGHT, new LeftOrRightFunctionModifier(getLanguageFactory()));
+        registerFunctionModifier(SourceSystemFunctions.SUBSTRING, new AliasModifier("substr")); //$NON-NLS-1$ 
+        registerFunctionModifier(SourceSystemFunctions.UCASE, new AliasModifier("upper")); //$NON-NLS-1$ 
+        
+        registerFunctionModifier(SourceSystemFunctions.DAYNAME, new MonthOrDayNameFunctionModifier(getLanguageFactory(), "Day"));//$NON-NLS-1$ 
+        registerFunctionModifier(SourceSystemFunctions.DAYOFWEEK, new ExtractFunctionModifier()); 
+        registerFunctionModifier(SourceSystemFunctions.DAYOFMONTH, new ExtractFunctionModifier()); 
+        registerFunctionModifier(SourceSystemFunctions.DAYOFYEAR, new ExtractFunctionModifier()); 
+        registerFunctionModifier(SourceSystemFunctions.HOUR, new ExtractFunctionModifier()); 
+        registerFunctionModifier(SourceSystemFunctions.MINUTE, new ExtractFunctionModifier()); 
+        registerFunctionModifier(SourceSystemFunctions.MONTH, new ExtractFunctionModifier()); 
+        registerFunctionModifier(SourceSystemFunctions.MONTHNAME, new MonthOrDayNameFunctionModifier(getLanguageFactory(), "Month"));//$NON-NLS-1$ 
+        registerFunctionModifier(SourceSystemFunctions.QUARTER, new ExtractFunctionModifier()); 
+        registerFunctionModifier(SourceSystemFunctions.SECOND, new ExtractFunctionModifier()); 
+        registerFunctionModifier(SourceSystemFunctions.WEEK, new ExtractFunctionModifier()); 
+        registerFunctionModifier(SourceSystemFunctions.YEAR, new ExtractFunctionModifier()); 
+        registerFunctionModifier(SourceSystemFunctions.LOCATE, new LocateFunctionModifier(getLanguageFactory()));
+        registerFunctionModifier(SourceSystemFunctions.IFNULL, new AliasModifier("coalesce")); //$NON-NLS-1$
+        
+        registerFunctionModifier(SourceSystemFunctions.MOD, new ModFunctionModifier("%", getLanguageFactory(), Arrays.asList(TypeFacility.RUNTIME_TYPES.BIG_INTEGER, TypeFacility.RUNTIME_TYPES.BIG_DECIMAL))); //$NON-NLS-1$ 
+
+        //specific to 8.2 client or later
+        registerFunctionModifier(SourceSystemFunctions.TIMESTAMPADD, new EscapeSyntaxModifier());
+        registerFunctionModifier(SourceSystemFunctions.TIMESTAMPDIFF, new EscapeSyntaxModifier());
+                
+        //add in type conversion
+        ConvertModifier convertModifier = new ConvertModifier();
+        convertModifier.addTypeMapping("boolean", FunctionModifier.BOOLEAN); //$NON-NLS-1$
+    	convertModifier.addTypeMapping("smallint", FunctionModifier.BYTE, FunctionModifier.SHORT); //$NON-NLS-1$
+    	convertModifier.addTypeMapping("integer", FunctionModifier.INTEGER); //$NON-NLS-1$
+    	convertModifier.addTypeMapping("bigint", FunctionModifier.LONG); //$NON-NLS-1$
+    	convertModifier.addTypeMapping("real", FunctionModifier.FLOAT); //$NON-NLS-1$
+    	convertModifier.addTypeMapping("float8", FunctionModifier.DOUBLE); //$NON-NLS-1$
+    	convertModifier.addTypeMapping("numeric(38)", FunctionModifier.BIGINTEGER); //$NON-NLS-1$
+    	convertModifier.addTypeMapping("decimal", FunctionModifier.BIGDECIMAL); //$NON-NLS-1$
+    	convertModifier.addTypeMapping("char(1)", FunctionModifier.CHAR); //$NON-NLS-1$
+    	convertModifier.addTypeMapping("varchar(4000)", FunctionModifier.STRING); //$NON-NLS-1$
+    	convertModifier.addTypeMapping("date", FunctionModifier.DATE); //$NON-NLS-1$
+    	convertModifier.addTypeMapping("time", FunctionModifier.TIME); //$NON-NLS-1$
+    	convertModifier.addTypeMapping("timestamp", FunctionModifier.TIMESTAMP); //$NON-NLS-1$
+    	convertModifier.addConvert(FunctionModifier.TIME, FunctionModifier.TIMESTAMP, new FunctionModifier() {
+			@Override
+			public List<?> translate(Function function) {
+				return Arrays.asList(function.getParameters().get(0), " + TIMESTAMP '1970-01-01'"); //$NON-NLS-1$
+			}
+		});
+    	convertModifier.addConvert(FunctionModifier.TIMESTAMP, FunctionModifier.TIME, new FunctionModifier() {
+			@Override
+			public List<?> translate(Function function) {
+				return Arrays.asList("cast(date_trunc('second', ", function.getParameters().get(0), ") AS time)"); //$NON-NLS-1$ //$NON-NLS-2$
+			}
+		});
+    	convertModifier.addConvert(FunctionModifier.DATE, FunctionModifier.STRING, new ConvertModifier.FormatModifier("to_char", "YYYY-MM-DD")); //$NON-NLS-1$ //$NON-NLS-2$
+    	convertModifier.addConvert(FunctionModifier.TIME, FunctionModifier.STRING, new ConvertModifier.FormatModifier("to_char", "HH24:MI:SS")); //$NON-NLS-1$ //$NON-NLS-2$
+    	convertModifier.addConvert(FunctionModifier.TIMESTAMP, FunctionModifier.STRING, new ConvertModifier.FormatModifier("to_char", "YYYY-MM-DD HH24:MI:SS.UF")); //$NON-NLS-1$ //$NON-NLS-2$
+    	convertModifier.addConvert(FunctionModifier.BOOLEAN, FunctionModifier.STRING, new FunctionModifier() {
+			@Override
+			public List<?> translate(Function function) {
+				Expression stringValue = function.getParameters().get(0);
+				return Arrays.asList("CASE WHEN ", stringValue, " THEN 'true' WHEN not(", stringValue, ") THEN 'false' END"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			}
+		});
+    	convertModifier.addSourceConversion(new FunctionModifier() {
+			@Override
+			public List<?> translate(Function function) {
+				((Literal)function.getParameters().get(1)).setValue("integer"); //$NON-NLS-1$
+				return null;
+			}
+		}, FunctionModifier.BOOLEAN);
+    	registerFunctionModifier(SourceSystemFunctions.CONVERT, convertModifier); 
+    }    
+    
+    @Override
+    public String translateLiteralBoolean(Boolean booleanValue) {
+        if(booleanValue.booleanValue()) {
+            return "TRUE"; //$NON-NLS-1$
+        }
+        return "FALSE"; //$NON-NLS-1$
+    }
+
+    @Override
+    public String translateLiteralDate(Date dateValue) {
+        return "DATE '" + formatDateValue(dateValue) + "'"; //$NON-NLS-1$//$NON-NLS-2$
+    }
+
+    @Override
+    public String translateLiteralTime(Time timeValue) {
+        return "TIME '" + formatDateValue(timeValue) + "'"; //$NON-NLS-1$//$NON-NLS-2$
+    }
+    
+    @Override
+    public String translateLiteralTimestamp(Timestamp timestampValue) {
+        return "TIMESTAMP '" + formatDateValue(timestampValue) + "'"; //$NON-NLS-1$//$NON-NLS-2$ 
+    }
+    
+    @Override
+    public int getTimestampNanoPrecision() {
+    	return 6;
+    }
+    
+    @SuppressWarnings("unchecked")
+	@Override
+    public List<?> translateLimit(Limit limit, ExecutionContext context) {
+    	if (limit.getRowOffset() > 0) {
+    		return Arrays.asList("LIMIT ", limit.getRowLimit(), " OFFSET ", limit.getRowOffset()); //$NON-NLS-1$ //$NON-NLS-2$ 
+    	}
+        return null;
+    }
+
+    /**
+     * Postgres doesn't provide min/max(boolean), so this conversion writes a min(BooleanValue) as 
+     * bool_and(BooleanValue)
+     * @see org.teiid.language.visitor.LanguageObjectVisitor#visit(org.teiid.language.AggregateFunction)
+     * @since 4.3
+     */
+    @Override
+    public List<?> translate(LanguageObject obj, ExecutionContext context) {
+    	if (obj instanceof AggregateFunction) {
+    		AggregateFunction agg = (AggregateFunction)obj;
+    		if (agg.getExpression() != null && TypeFacility.RUNTIME_TYPES.BOOLEAN.equals(agg.getExpression().getType())) {
+            	if (agg.getName().equalsIgnoreCase(SQLReservedWords.MIN)) {
+            		agg.setName("bool_and"); //$NON-NLS-1$
+            	} else if (agg.getName().equalsIgnoreCase(SQLReservedWords.MAX)) {
+            		agg.setName("bool_or"); //$NON-NLS-1$
+            	}
+            }
+    	}
+    	return super.translate(obj, context);
+    }
+    
+    @Override
+    public NullOrder getDefaultNullOrder() {
+    	return NullOrder.HIGH;
+    }
+    
+    @Override
+    public boolean supportsExplicitNullOrdering() {
+    	return version.compareTo(EIGHT_4) >= 0;
+    }
+    
+    @Override
+    public List<String> getSupportedFunctions() {
+        List<String> supportedFunctions = new ArrayList<String>();
+        supportedFunctions.addAll(super.getSupportedFunctions());
+    
+        supportedFunctions.add("ABS"); //$NON-NLS-1$
+        supportedFunctions.add("ACOS"); //$NON-NLS-1$
+        supportedFunctions.add("ASIN"); //$NON-NLS-1$
+        supportedFunctions.add("ATAN"); //$NON-NLS-1$
+        supportedFunctions.add("ATAN2"); //$NON-NLS-1$
+        supportedFunctions.add("BITAND"); //$NON-NLS-1$
+        supportedFunctions.add("BITNOT"); //$NON-NLS-1$
+        supportedFunctions.add("BITOR"); //$NON-NLS-1$
+        supportedFunctions.add("BITXOR"); //$NON-NLS-1$
+        supportedFunctions.add("CEILING"); //$NON-NLS-1$
+        supportedFunctions.add("COS"); //$NON-NLS-1$
+        supportedFunctions.add("COT"); //$NON-NLS-1$
+        supportedFunctions.add("DEGREES"); //$NON-NLS-1$
+        supportedFunctions.add("EXP"); //$NON-NLS-1$
+        supportedFunctions.add("FLOOR"); //$NON-NLS-1$
+        // These should not be pushed down since the grammar for string conversion is different
+//        supportedFunctions.add("FORMATBIGDECIMAL"); //$NON-NLS-1$
+//        supportedFunctions.add("FORMATBIGINTEGER"); //$NON-NLS-1$
+//        supportedFunctions.add("FORMATDOUBLE"); //$NON-NLS-1$
+//        supportedFunctions.add("FORMATFLOAT"); //$NON-NLS-1$
+//        supportedFunctions.add("FORMATINTEGER"); //$NON-NLS-1$
+//        supportedFunctions.add("FORMATLONG"); //$NON-NLS-1$
+        supportedFunctions.add("LOG"); //$NON-NLS-1$
+        supportedFunctions.add("LOG10"); //$NON-NLS-1$
+        supportedFunctions.add("MOD"); //$NON-NLS-1$
+        supportedFunctions.add("PI"); //$NON-NLS-1$
+        supportedFunctions.add("POWER"); //$NON-NLS-1$
+        supportedFunctions.add("RADIANS"); //$NON-NLS-1$
+        supportedFunctions.add("ROUND"); //$NON-NLS-1$
+        supportedFunctions.add("SIGN"); //$NON-NLS-1$
+        supportedFunctions.add("SIN"); //$NON-NLS-1$
+        supportedFunctions.add("SQRT"); //$NON-NLS-1$
+        supportedFunctions.add("TAN"); //$NON-NLS-1$
+        
+        supportedFunctions.add("ASCII"); //$NON-NLS-1$
+        supportedFunctions.add("CHR"); //$NON-NLS-1$
+        supportedFunctions.add("CHAR"); //$NON-NLS-1$
+        supportedFunctions.add("||"); //$NON-NLS-1$
+        supportedFunctions.add("CONCAT"); //$NON-NLS-1$
+        supportedFunctions.add("INITCAP"); //$NON-NLS-1$
+        supportedFunctions.add("LCASE"); //$NON-NLS-1$
+        supportedFunctions.add("LEFT"); //$NON-NLS-1$
+        supportedFunctions.add("LENGTH"); //$NON-NLS-1$
+        supportedFunctions.add("LOCATE"); //$NON-NLS-1$
+        supportedFunctions.add("LOWER"); //$NON-NLS-1$
+        supportedFunctions.add("LPAD"); //$NON-NLS-1$
+        supportedFunctions.add("LTRIM"); //$NON-NLS-1$
+        supportedFunctions.add("REPEAT"); //$NON-NLS-1$
+        supportedFunctions.add("REPLACE"); //$NON-NLS-1$
+        supportedFunctions.add("RIGHT"); //$NON-NLS-1$
+        supportedFunctions.add("RPAD"); //$NON-NLS-1$
+        supportedFunctions.add("RTRIM"); //$NON-NLS-1$
+        supportedFunctions.add("SUBSTRING"); //$NON-NLS-1$
+        supportedFunctions.add("UCASE"); //$NON-NLS-1$
+        supportedFunctions.add("UPPER"); //$NON-NLS-1$
+        
+        // These are executed within the server and never pushed down
+//        supportedFunctions.add("CURDATE"); //$NON-NLS-1$
+//        supportedFunctions.add("CURTIME"); //$NON-NLS-1$
+//        supportedFunctions.add("NOW"); //$NON-NLS-1$
+        supportedFunctions.add("DAYNAME"); //$NON-NLS-1$
+        supportedFunctions.add("DAYOFMONTH"); //$NON-NLS-1$
+        supportedFunctions.add("DAYOFWEEK"); //$NON-NLS-1$
+        supportedFunctions.add("DAYOFYEAR"); //$NON-NLS-1$
+        // These should not be pushed down since the grammar for string conversion is different
+//        supportedFunctions.add("FORMATDATE"); //$NON-NLS-1$
+//        supportedFunctions.add("FORMATTIME"); //$NON-NLS-1$
+//        supportedFunctions.add("FORMATTIMESTAMP"); //$NON-NLS-1$
+        supportedFunctions.add("HOUR"); //$NON-NLS-1$
+        supportedFunctions.add("MINUTE"); //$NON-NLS-1$
+        supportedFunctions.add("MONTH"); //$NON-NLS-1$
+        supportedFunctions.add("MONTHNAME"); //$NON-NLS-1$
+        // These should not be pushed down since the grammar for string conversion is different
+//        supportedFunctions.add("PARSEDATE"); //$NON-NLS-1$
+//        supportedFunctions.add("PARSETIME"); //$NON-NLS-1$
+//        supportedFunctions.add("PARSETIMESTAMP"); //$NON-NLS-1$
+        supportedFunctions.add("QUARTER"); //$NON-NLS-1$
+        supportedFunctions.add("SECOND"); //$NON-NLS-1$
+        if (this.version.compareTo(EIGHT_2) >= 0) {
+        	supportedFunctions.add("TIMESTAMPADD"); //$NON-NLS-1$
+        	supportedFunctions.add("TIMESTAMPDIFF"); //$NON-NLS-1$
+        }
+        supportedFunctions.add("WEEK"); //$NON-NLS-1$
+        supportedFunctions.add("YEAR"); //$NON-NLS-1$
+        
+        supportedFunctions.add("CAST"); //$NON-NLS-1$
+        supportedFunctions.add("CONVERT"); //$NON-NLS-1$
+        supportedFunctions.add("IFNULL"); //$NON-NLS-1$
+        supportedFunctions.add("NVL"); //$NON-NLS-1$
+        
+        // Additional functions
+//        // Math
+//        supportedFunctions.add("%"); //$NON-NLS-1$
+//        supportedFunctions.add("^"); //$NON-NLS-1$
+//        supportedFunctions.add("|/"); //$NON-NLS-1$
+//        supportedFunctions.add("||/"); //$NON-NLS-1$
+//        supportedFunctions.add("!"); //$NON-NLS-1$
+//        supportedFunctions.add("!!"); //$NON-NLS-1$
+//        supportedFunctions.add("@"); //$NON-NLS-1$
+//          // Bit manipulation
+//        supportedFunctions.add("&"); //$NON-NLS-1$
+//        supportedFunctions.add("|"); //$NON-NLS-1$
+//        supportedFunctions.add("#"); //$NON-NLS-1$
+//        supportedFunctions.add("~"); //$NON-NLS-1$
+//        supportedFunctions.add("<<"); //$NON-NLS-1$
+//        supportedFunctions.add(">>"); //$NON-NLS-1$
+//        
+//        supportedFunctions.add("CBRT"); //$NON-NLS-1$
+//        supportedFunctions.add("CEIL"); //$NON-NLS-1$
+//        supportedFunctions.add("LN"); //$NON-NLS-1$
+//        supportedFunctions.add("MOD"); //$NON-NLS-1$
+//        supportedFunctions.add("RANDOM"); //$NON-NLS-1$
+//        supportedFunctions.add("SETSEED"); //$NON-NLS-1$
+//        supportedFunctions.add("TRUNC"); //$NON-NLS-1$
+//        supportedFunctions.add("WIDTH_BUCKET"); //$NON-NLS-1$
+//        
+//        // String
+//        supportedFunctions.add("BIT_LENGTH"); //$NON-NLS-1$
+//        supportedFunctions.add("BTRIM"); //$NON-NLS-1$
+//        supportedFunctions.add("CHAR_LENGTH"); //$NON-NLS-1$
+//        supportedFunctions.add("CHARACTER_LENGTH"); //$NON-NLS-1$
+//        supportedFunctions.add("DECODE"); //$NON-NLS-1$
+//        supportedFunctions.add("ENCODE"); //$NON-NLS-1$
+//        supportedFunctions.add("MD5"); //$NON-NLS-1$
+//        supportedFunctions.add("OCTET_LENGTH"); //$NON-NLS-1$
+//        supportedFunctions.add("PG_CLIENT_ENCODING"); //$NON-NLS-1$
+//        supportedFunctions.add("QUOTE_IDENT"); //$NON-NLS-1$
+//        supportedFunctions.add("QUOTE_LITERAL"); //$NON-NLS-1$
+//        supportedFunctions.add("SPLIT_PART"); //$NON-NLS-1$
+//        supportedFunctions.add("STRPOS"); //$NON-NLS-1$
+//        supportedFunctions.add("SUBSTR"); //$NON-NLS-1$
+//        supportedFunctions.add("TO_ASCII"); //$NON-NLS-1$
+//        supportedFunctions.add("TO_HEX"); //$NON-NLS-1$
+//        supportedFunctions.add("TRANSLATE"); //$NON-NLS-1$
+//        
+//        // Bit operations
+//        supportedFunctions.add("GET_BIT"); //$NON-NLS-1$
+//        supportedFunctions.add("GET_BYTE"); //$NON-NLS-1$
+//        supportedFunctions.add("SET_BIT"); //$NON-NLS-1$
+//        supportedFunctions.add("SET_BYTE"); //$NON-NLS-1$
+//        
+//        // Formatting
+//        supportedFunctions.add("TO_CHAR"); //$NON-NLS-1$
+//        supportedFunctions.add("TO_DATE"); //$NON-NLS-1$
+//        supportedFunctions.add("TO_TIMESTAMP"); //$NON-NLS-1$
+//        supportedFunctions.add("TO_NUMBER"); //$NON-NLS-1$
+//        
+//        // Date / Time
+//        supportedFunctions.add("AGE"); //$NON-NLS-1$
+//        supportedFunctions.add("CURRENT_DATE"); //$NON-NLS-1$            // no ()
+//        supportedFunctions.add("CURRENT_TIME"); //$NON-NLS-1$            // no ()
+//        supportedFunctions.add("CURRENT_TIMESTAMP"); //$NON-NLS-1$       // no ()
+//        supportedFunctions.add("DATE_PART"); //$NON-NLS-1$
+//        supportedFunctions.add("DATE_TRUNC"); //$NON-NLS-1$
+//        supportedFunctions.add("ISFINITE"); //$NON-NLS-1$
+//        supportedFunctions.add("JUSTIFY_HOURS"); //$NON-NLS-1$
+//        supportedFunctions.add("JUSTIFY_DAYS"); //$NON-NLS-1$
+//        supportedFunctions.add("LOCALTIME"); //$NON-NLS-1$               // no ()
+//        supportedFunctions.add("LOCALTIMESTAMP"); //$NON-NLS-1$          // no ()
+//        supportedFunctions.add("TIMEOFDAY"); //$NON-NLS-1$
+//        
+//        // Conditional
+          supportedFunctions.add("COALESCE"); //$NON-NLS-1$
+//        supportedFunctions.add("NULLIF"); //$NON-NLS-1$
+//        supportedFunctions.add("GREATEST"); //$NON-NLS-1$
+//        supportedFunctions.add("LEAST"); //$NON-NLS-1$
+//        
+//        // Network Addresses
+////        supportedFunctions.add("BROADCAST"); //$NON-NLS-1$
+////        supportedFunctions.add("HOST"); //$NON-NLS-1$
+////        supportedFunctions.add("MASKLEN"); //$NON-NLS-1$
+////        supportedFunctions.add("SET_MASKLEN"); //$NON-NLS-1$
+////        supportedFunctions.add("NETMASK"); //$NON-NLS-1$
+////        supportedFunctions.add("HOSTMASK"); //$NON-NLS-1$
+////        supportedFunctions.add("NETWORK"); //$NON-NLS-1$
+////        supportedFunctions.add("TEXT"); //$NON-NLS-1$
+////        supportedFunctions.add("ABBREV"); //$NON-NLS-1$
+////        supportedFunctions.add("FAMILY"); //$NON-NLS-1$
+////        supportedFunctions.add("TRUNC"); //$NON-NLS-1$
+//        
+//        // Set generator
+//        supportedFunctions.add("GENERATE_SERIES"); //$NON-NLS-1$
+//        
+//        // Information
+//        supportedFunctions.add("CURRENT_DATABASE"); //$NON-NLS-1$
+//        supportedFunctions.add("CURRENT_SCHEMA"); //$NON-NLS-1$
+//        supportedFunctions.add("CURRENT_SCHEMAS"); //$NON-NLS-1$
+//        supportedFunctions.add("CURRENT_USER"); //$NON-NLS-1$           // no ()
+//        supportedFunctions.add("INET_CLIENT_ADDR"); //$NON-NLS-1$
+//        supportedFunctions.add("INET_CLIENT_PORT"); //$NON-NLS-1$
+//        supportedFunctions.add("INET_SERVER_ADDR"); //$NON-NLS-1$
+//        supportedFunctions.add("INET_SERVER_PORT"); //$NON-NLS-1$
+//        supportedFunctions.add("SESSION_USER"); //$NON-NLS-1$           // no ()
+//        supportedFunctions.add("USER"); //$NON-NLS-1$                   // no ()
+//        supportedFunctions.add("VERSION"); //$NON-NLS-1$
+//        
+        return supportedFunctions;
+    }
+    
+    /** 
+     * This is true only after Postgre version 7.1 
+     * However, since version 7 was released in 2000 we'll assume a post 7 instance.
+     * 
+     * @see org.teiid.translator.jdbc.JDBCCapabilities#supportsInlineViews()
+     */
+    public boolean supportsInlineViews() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsRowLimit() {
+        return true;
+    }
+    @Override
+    public boolean supportsRowOffset() {
+        return true;
+    }
+    
+    /** 
+     * @see org.teiid.translator.BasicConnectorCapabilities#supportsExcept()
+     */
+    @Override
+    public boolean supportsExcept() {
+        return true;
+    }
+    
+    /** 
+     * @see org.teiid.translator.BasicConnectorCapabilities#supportsIntersect()
+     */
+    @Override
+    public boolean supportsIntersect() {
+        return true;
+    }
+    
+    @TranslatorProperty(name="DatabaseVersion", description= "Version of the postgres", defaultValue=EIGHT_0)
+    public String getDatabaseVersion() {
+    	return this.version;
+    }
+    
+    public void setDatabaseVersion(String version) {
+    	this.version = version;
+    }    
+}

Deleted: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/postgresql/PostgreSQLTranslator.java
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/postgresql/PostgreSQLTranslator.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/postgresql/PostgreSQLTranslator.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -1,224 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership.  Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- * 
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- * 
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package org.teiid.translator.jdbc.postgresql;
-
-import java.sql.Date;
-import java.sql.Time;
-import java.sql.Timestamp;
-import java.util.Arrays;
-import java.util.List;
-
-import org.teiid.language.AggregateFunction;
-import org.teiid.language.Expression;
-import org.teiid.language.Function;
-import org.teiid.language.LanguageObject;
-import org.teiid.language.Limit;
-import org.teiid.language.Literal;
-import org.teiid.language.SQLReservedWords;
-import org.teiid.translator.ConnectorCapabilities;
-import org.teiid.translator.ConnectorException;
-import org.teiid.translator.ExecutionContext;
-import org.teiid.translator.SourceSystemFunctions;
-import org.teiid.translator.TypeFacility;
-import org.teiid.translator.jdbc.AliasModifier;
-import org.teiid.translator.jdbc.ConvertModifier;
-import org.teiid.translator.jdbc.EscapeSyntaxModifier;
-import org.teiid.translator.jdbc.ExtractFunctionModifier;
-import org.teiid.translator.jdbc.FunctionModifier;
-import org.teiid.translator.jdbc.JDBCExecutionFactory;
-import org.teiid.translator.jdbc.ModFunctionModifier;
-import org.teiid.translator.jdbc.Translator;
-import org.teiid.translator.jdbc.oracle.LeftOrRightFunctionModifier;
-import org.teiid.translator.jdbc.oracle.MonthOrDayNameFunctionModifier;
-
-
-
-/** 
- * Translator class for PostgreSQL.  Updated to expect a 8.0+ jdbc client
- * @since 4.3
- */
-public class PostgreSQLTranslator extends Translator {
-	
-	private String version = PostgreSQLCapabilities.EIGHT_0;
-
-    public void initialize(JDBCExecutionFactory env) throws ConnectorException {
-        //TODO: all of the functions (except for convert) can be handled through just the escape syntax
-        super.initialize(env);
-        registerFunctionModifier(SourceSystemFunctions.LOG, new AliasModifier("ln")); //$NON-NLS-1$ 
-        registerFunctionModifier(SourceSystemFunctions.LOG10, new AliasModifier("log")); //$NON-NLS-1$ 
-        
-        registerFunctionModifier(SourceSystemFunctions.BITAND, new AliasModifier("&")); //$NON-NLS-1$ 
-        registerFunctionModifier(SourceSystemFunctions.BITNOT, new AliasModifier("~")); //$NON-NLS-1$ 
-        registerFunctionModifier(SourceSystemFunctions.BITOR, new AliasModifier("|")); //$NON-NLS-1$ 
-        registerFunctionModifier(SourceSystemFunctions.BITXOR, new AliasModifier("#")); //$NON-NLS-1$ 
-        
-        registerFunctionModifier(SourceSystemFunctions.CHAR, new AliasModifier("chr")); //$NON-NLS-1$ 
-        registerFunctionModifier(SourceSystemFunctions.CONCAT, new AliasModifier("||")); //$NON-NLS-1$ 
-        registerFunctionModifier(SourceSystemFunctions.LCASE, new AliasModifier("lower")); //$NON-NLS-1$ 
-        registerFunctionModifier(SourceSystemFunctions.LEFT, new LeftOrRightFunctionModifier(getLanguageFactory()));
-        registerFunctionModifier(SourceSystemFunctions.RIGHT, new LeftOrRightFunctionModifier(getLanguageFactory()));
-        registerFunctionModifier(SourceSystemFunctions.SUBSTRING, new AliasModifier("substr")); //$NON-NLS-1$ 
-        registerFunctionModifier(SourceSystemFunctions.UCASE, new AliasModifier("upper")); //$NON-NLS-1$ 
-        
-        registerFunctionModifier(SourceSystemFunctions.DAYNAME, new MonthOrDayNameFunctionModifier(getLanguageFactory(), "Day"));//$NON-NLS-1$ 
-        registerFunctionModifier(SourceSystemFunctions.DAYOFWEEK, new ExtractFunctionModifier()); 
-        registerFunctionModifier(SourceSystemFunctions.DAYOFMONTH, new ExtractFunctionModifier()); 
-        registerFunctionModifier(SourceSystemFunctions.DAYOFYEAR, new ExtractFunctionModifier()); 
-        registerFunctionModifier(SourceSystemFunctions.HOUR, new ExtractFunctionModifier()); 
-        registerFunctionModifier(SourceSystemFunctions.MINUTE, new ExtractFunctionModifier()); 
-        registerFunctionModifier(SourceSystemFunctions.MONTH, new ExtractFunctionModifier()); 
-        registerFunctionModifier(SourceSystemFunctions.MONTHNAME, new MonthOrDayNameFunctionModifier(getLanguageFactory(), "Month"));//$NON-NLS-1$ 
-        registerFunctionModifier(SourceSystemFunctions.QUARTER, new ExtractFunctionModifier()); 
-        registerFunctionModifier(SourceSystemFunctions.SECOND, new ExtractFunctionModifier()); 
-        registerFunctionModifier(SourceSystemFunctions.WEEK, new ExtractFunctionModifier()); 
-        registerFunctionModifier(SourceSystemFunctions.YEAR, new ExtractFunctionModifier()); 
-        registerFunctionModifier(SourceSystemFunctions.LOCATE, new LocateFunctionModifier(getLanguageFactory()));
-        registerFunctionModifier(SourceSystemFunctions.IFNULL, new AliasModifier("coalesce")); //$NON-NLS-1$
-        
-        registerFunctionModifier(SourceSystemFunctions.MOD, new ModFunctionModifier("%", getLanguageFactory(), Arrays.asList(TypeFacility.RUNTIME_TYPES.BIG_INTEGER, TypeFacility.RUNTIME_TYPES.BIG_DECIMAL))); //$NON-NLS-1$ 
-
-        //specific to 8.2 client or later
-        registerFunctionModifier(SourceSystemFunctions.TIMESTAMPADD, new EscapeSyntaxModifier());
-        registerFunctionModifier(SourceSystemFunctions.TIMESTAMPDIFF, new EscapeSyntaxModifier());
-                
-        //add in type conversion
-        ConvertModifier convertModifier = new ConvertModifier();
-        convertModifier.addTypeMapping("boolean", FunctionModifier.BOOLEAN); //$NON-NLS-1$
-    	convertModifier.addTypeMapping("smallint", FunctionModifier.BYTE, FunctionModifier.SHORT); //$NON-NLS-1$
-    	convertModifier.addTypeMapping("integer", FunctionModifier.INTEGER); //$NON-NLS-1$
-    	convertModifier.addTypeMapping("bigint", FunctionModifier.LONG); //$NON-NLS-1$
-    	convertModifier.addTypeMapping("real", FunctionModifier.FLOAT); //$NON-NLS-1$
-    	convertModifier.addTypeMapping("float8", FunctionModifier.DOUBLE); //$NON-NLS-1$
-    	convertModifier.addTypeMapping("numeric(38)", FunctionModifier.BIGINTEGER); //$NON-NLS-1$
-    	convertModifier.addTypeMapping("decimal", FunctionModifier.BIGDECIMAL); //$NON-NLS-1$
-    	convertModifier.addTypeMapping("char(1)", FunctionModifier.CHAR); //$NON-NLS-1$
-    	convertModifier.addTypeMapping("varchar(4000)", FunctionModifier.STRING); //$NON-NLS-1$
-    	convertModifier.addTypeMapping("date", FunctionModifier.DATE); //$NON-NLS-1$
-    	convertModifier.addTypeMapping("time", FunctionModifier.TIME); //$NON-NLS-1$
-    	convertModifier.addTypeMapping("timestamp", FunctionModifier.TIMESTAMP); //$NON-NLS-1$
-    	convertModifier.addConvert(FunctionModifier.TIME, FunctionModifier.TIMESTAMP, new FunctionModifier() {
-			@Override
-			public List<?> translate(Function function) {
-				return Arrays.asList(function.getParameters().get(0), " + TIMESTAMP '1970-01-01'"); //$NON-NLS-1$
-			}
-		});
-    	convertModifier.addConvert(FunctionModifier.TIMESTAMP, FunctionModifier.TIME, new FunctionModifier() {
-			@Override
-			public List<?> translate(Function function) {
-				return Arrays.asList("cast(date_trunc('second', ", function.getParameters().get(0), ") AS time)"); //$NON-NLS-1$ //$NON-NLS-2$
-			}
-		});
-    	convertModifier.addConvert(FunctionModifier.DATE, FunctionModifier.STRING, new ConvertModifier.FormatModifier("to_char", "YYYY-MM-DD")); //$NON-NLS-1$ //$NON-NLS-2$
-    	convertModifier.addConvert(FunctionModifier.TIME, FunctionModifier.STRING, new ConvertModifier.FormatModifier("to_char", "HH24:MI:SS")); //$NON-NLS-1$ //$NON-NLS-2$
-    	convertModifier.addConvert(FunctionModifier.TIMESTAMP, FunctionModifier.STRING, new ConvertModifier.FormatModifier("to_char", "YYYY-MM-DD HH24:MI:SS.UF")); //$NON-NLS-1$ //$NON-NLS-2$
-    	convertModifier.addConvert(FunctionModifier.BOOLEAN, FunctionModifier.STRING, new FunctionModifier() {
-			@Override
-			public List<?> translate(Function function) {
-				Expression stringValue = function.getParameters().get(0);
-				return Arrays.asList("CASE WHEN ", stringValue, " THEN 'true' WHEN not(", stringValue, ") THEN 'false' END"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-			}
-		});
-    	convertModifier.addSourceConversion(new FunctionModifier() {
-			@Override
-			public List<?> translate(Function function) {
-				((Literal)function.getParameters().get(1)).setValue("integer"); //$NON-NLS-1$
-				return null;
-			}
-		}, FunctionModifier.BOOLEAN);
-    	registerFunctionModifier(SourceSystemFunctions.CONVERT, convertModifier); 
-    }    
-    
-    @Override
-    public String translateLiteralBoolean(Boolean booleanValue) {
-        if(booleanValue.booleanValue()) {
-            return "TRUE"; //$NON-NLS-1$
-        }
-        return "FALSE"; //$NON-NLS-1$
-    }
-
-    @Override
-    public String translateLiteralDate(Date dateValue) {
-        return "DATE '" + formatDateValue(dateValue) + "'"; //$NON-NLS-1$//$NON-NLS-2$
-    }
-
-    @Override
-    public String translateLiteralTime(Time timeValue) {
-        return "TIME '" + formatDateValue(timeValue) + "'"; //$NON-NLS-1$//$NON-NLS-2$
-    }
-    
-    @Override
-    public String translateLiteralTimestamp(Timestamp timestampValue) {
-        return "TIMESTAMP '" + formatDateValue(timestampValue) + "'"; //$NON-NLS-1$//$NON-NLS-2$ 
-    }
-    
-    @Override
-    public int getTimestampNanoPrecision() {
-    	return 6;
-    }
-    
-    @SuppressWarnings("unchecked")
-	@Override
-    public List<?> translateLimit(Limit limit, ExecutionContext context) {
-    	if (limit.getRowOffset() > 0) {
-    		return Arrays.asList("LIMIT ", limit.getRowLimit(), " OFFSET ", limit.getRowOffset()); //$NON-NLS-1$ //$NON-NLS-2$ 
-    	}
-        return null;
-    }
-
-    /**
-     * Postgres doesn't provide min/max(boolean), so this conversion writes a min(BooleanValue) as 
-     * bool_and(BooleanValue)
-     * @see org.teiid.language.visitor.LanguageObjectVisitor#visit(org.teiid.language.AggregateFunction)
-     * @since 4.3
-     */
-    @Override
-    public List<?> translate(LanguageObject obj, ExecutionContext context) {
-    	if (obj instanceof AggregateFunction) {
-    		AggregateFunction agg = (AggregateFunction)obj;
-    		if (agg.getExpression() != null && TypeFacility.RUNTIME_TYPES.BOOLEAN.equals(agg.getExpression().getType())) {
-            	if (agg.getName().equalsIgnoreCase(SQLReservedWords.MIN)) {
-            		agg.setName("bool_and"); //$NON-NLS-1$
-            	} else if (agg.getName().equalsIgnoreCase(SQLReservedWords.MAX)) {
-            		agg.setName("bool_or"); //$NON-NLS-1$
-            	}
-            }
-    	}
-    	return super.translate(obj, context);
-    }
-    
-    @Override
-    public NullOrder getDefaultNullOrder() {
-    	return NullOrder.HIGH;
-    }
-    
-    @Override
-    public boolean supportsExplicitNullOrdering() {
-    	return version.compareTo(PostgreSQLCapabilities.EIGHT_4) >= 0;
-    }
-    
-    @Override
-    public Class<? extends ConnectorCapabilities> getDefaultCapabilities() {
-    	return PostgreSQLCapabilities.class;
-    }
-
-}

Deleted: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/sqlserver/SQLServerCapabilities.java
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/sqlserver/SQLServerCapabilities.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/sqlserver/SQLServerCapabilities.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -1,138 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership.  Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- * 
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- * 
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-/*
- */
-package org.teiid.translator.jdbc.sqlserver;
-
-import java.util.*;
-
-import org.teiid.translator.jdbc.JDBCCapabilities;
-
-
-/**
- */
-public class SQLServerCapabilities extends JDBCCapabilities {
-
-    public SQLServerCapabilities() {
-    }
-    
-    /**
-     * @see org.teiid.resource.cci.data.ConnectorCapabilities#getSupportedFunctions()
-     */
-    public List<String> getSupportedFunctions() {
-        List<String> supportedFunctions = new ArrayList<String>();
-        supportedFunctions.addAll(super.getSupportedFunctions());
-        supportedFunctions.add("ABS"); //$NON-NLS-1$
-        supportedFunctions.add("ACOS"); //$NON-NLS-1$
-        supportedFunctions.add("ASIN"); //$NON-NLS-1$
-        supportedFunctions.add("ATAN"); //$NON-NLS-1$
-        supportedFunctions.add("ATAN2"); //$NON-NLS-1$
-        supportedFunctions.add("COS"); //$NON-NLS-1$
-        supportedFunctions.add("COT"); //$NON-NLS-1$
-        supportedFunctions.add("DEGREES"); //$NON-NLS-1$
-        supportedFunctions.add("EXP"); //$NON-NLS-1$
-        supportedFunctions.add("FLOOR"); //$NON-NLS-1$
-        supportedFunctions.add("LOG"); //$NON-NLS-1$
-        supportedFunctions.add("LOG10"); //$NON-NLS-1$
-        supportedFunctions.add("MOD"); //$NON-NLS-1$
-        supportedFunctions.add("PI"); //$NON-NLS-1$
-        supportedFunctions.add("POWER"); //$NON-NLS-1$
-        supportedFunctions.add("RADIANS"); //$NON-NLS-1$
-        supportedFunctions.add("SIGN"); //$NON-NLS-1$
-        supportedFunctions.add("SIN"); //$NON-NLS-1$
-        supportedFunctions.add("SQRT"); //$NON-NLS-1$
-        supportedFunctions.add("TAN"); //$NON-NLS-1$
-        supportedFunctions.add("ASCII"); //$NON-NLS-1$
-        supportedFunctions.add("CHAR"); //$NON-NLS-1$
-        supportedFunctions.add("CHR"); //$NON-NLS-1$
-        supportedFunctions.add("CONCAT"); //$NON-NLS-1$
-        supportedFunctions.add("||"); //$NON-NLS-1$
-        //supportedFunctons.add("INITCAP"); //$NON-NLS-1$
-        supportedFunctions.add("LCASE"); //$NON-NLS-1$
-        supportedFunctions.add("LEFT"); //$NON-NLS-1$
-        supportedFunctions.add("LENGTH"); //$NON-NLS-1$
-        //supportedFunctons.add("LOCATE"); //$NON-NLS-1$
-        supportedFunctions.add("LOWER"); //$NON-NLS-1$
-        //supportedFunctons.add("LPAD"); //$NON-NLS-1$
-        supportedFunctions.add("LTRIM"); //$NON-NLS-1$
-        supportedFunctions.add("REPEAT"); //$NON-NLS-1$
-        //supportedFunctions.add("RAND"); //$NON-NLS-1$
-        supportedFunctions.add("REPLACE"); //$NON-NLS-1$
-        supportedFunctions.add("RIGHT"); //$NON-NLS-1$
-        //supportedFunctons.add("RPAD"); //$NON-NLS-1$
-        supportedFunctions.add("RTRIM"); //$NON-NLS-1$
-        supportedFunctions.add("SPACE"); //$NON-NLS-1$
-        supportedFunctions.add("SUBSTRING"); //$NON-NLS-1$
-        //supportedFunctons.add("TRANSLATE"); //$NON-NLS-1$
-        supportedFunctions.add("UCASE"); //$NON-NLS-1$
-        supportedFunctions.add("UPPER"); //$NON-NLS-1$
-        //supportedFunctons.add("CURDATE"); //$NON-NLS-1$
-        //supportedFunctons.add("CURTIME"); //$NON-NLS-1$
-        supportedFunctions.add("DAYNAME"); //$NON-NLS-1$
-        supportedFunctions.add("DAYOFMONTH"); //$NON-NLS-1$
-        supportedFunctions.add("DAYOFWEEK"); //$NON-NLS-1$
-        supportedFunctions.add("DAYOFYEAR"); //$NON-NLS-1$
-        supportedFunctions.add("HOUR"); //$NON-NLS-1$
-        supportedFunctions.add("MINUTE"); //$NON-NLS-1$
-        supportedFunctions.add("MONTH"); //$NON-NLS-1$
-        supportedFunctions.add("MONTHNAME"); //$NON-NLS-1$
-        //supportedFunctions.add("NOW"); //$NON-NLS-1$
-        supportedFunctions.add("QUARTER"); //$NON-NLS-1$
-        supportedFunctions.add("SECOND"); //$NON-NLS-1$
-        supportedFunctions.add("TIMESTAMPADD"); //$NON-NLS-1$
-        supportedFunctions.add("TIMESTAMPDIFF"); //$NON-NLS-1$
-        supportedFunctions.add("WEEK"); //$NON-NLS-1$
-        supportedFunctions.add("YEAR"); //$NON-NLS-1$
-        supportedFunctions.add("CAST"); //$NON-NLS-1$
-        supportedFunctions.add("CONVERT"); //$NON-NLS-1$
-        supportedFunctions.add("IFNULL"); //$NON-NLS-1$
-        supportedFunctions.add("NVL");      //$NON-NLS-1$ 
-        
-        return supportedFunctions;
-    }
-    
-    public boolean supportsInlineViews() {
-        return true;
-    }
-
-    /** 
-     * @see org.teiid.translator.ConnectorCapabilities#supportsFunctionsInGroupBy()
-     * @since 5.0
-     */
-    public boolean supportsFunctionsInGroupBy() {
-        return true;
-    }    
-    
-    public boolean supportsRowLimit() {
-        return true;
-    }
-    
-    @Override
-    public boolean supportsIntersect() {
-    	return true;
-    }
-    
-    public boolean supportsExcept() {
-    	return true;
-    };
-}

Copied: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/sqlserver/SQLServerExecutionFactory.java (from rev 2119, trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/sqlserver/SQLServerSQLTranslator.java)
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/sqlserver/SQLServerExecutionFactory.java	                        (rev 0)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/sqlserver/SQLServerExecutionFactory.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -0,0 +1,173 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership.  Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ * 
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ * 
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+/*
+ */
+package org.teiid.translator.jdbc.sqlserver;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.teiid.language.ColumnReference;
+import org.teiid.language.Function;
+import org.teiid.language.LanguageObject;
+import org.teiid.translator.ExecutionContext;
+import org.teiid.translator.TypeFacility;
+import org.teiid.translator.jdbc.JDBCExecutionFactory;
+import org.teiid.translator.jdbc.sybase.SybaseExecutionFactory;
+
+/**
+ * Updated to assume the use of the DataDirect, 2005 driver, or later.
+ */
+public class SQLServerExecutionFactory extends SybaseExecutionFactory {
+	
+	//TEIID-31 remove mod modifier for SQL Server 2008
+	
+	@Override
+	protected List<Object> convertDateToString(Function function) {
+		return Arrays.asList("replace(convert(varchar, ", function.getParameters().get(0), ", 102), '.', '-')"); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+    
+	@Override
+	protected List<?> convertTimestampToString(Function function) {
+		return Arrays.asList("convert(varchar, ", function.getParameters().get(0), ", 21)"); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+	
+    @Override
+    public List<?> translate(LanguageObject obj, ExecutionContext context) {
+    	if (obj instanceof ColumnReference) {
+    		ColumnReference elem = (ColumnReference)obj;
+			if (TypeFacility.RUNTIME_TYPES.STRING.equals(elem.getType()) && elem.getMetadataObject() != null && "uniqueidentifier".equalsIgnoreCase(elem.getMetadataObject().getNativeType())) { //$NON-NLS-1$
+				return Arrays.asList("cast(", elem, " as char(36))"); //$NON-NLS-1$ //$NON-NLS-2$
+			}
+    	}
+    	return super.translate(obj, context);
+    }
+    
+    @Override
+    public List<String> getSupportedFunctions() {
+        List<String> supportedFunctions = new ArrayList<String>();
+        supportedFunctions.addAll(super.getDefaultSupportedFunctions());
+        supportedFunctions.add("ABS"); //$NON-NLS-1$
+        supportedFunctions.add("ACOS"); //$NON-NLS-1$
+        supportedFunctions.add("ASIN"); //$NON-NLS-1$
+        supportedFunctions.add("ATAN"); //$NON-NLS-1$
+        supportedFunctions.add("ATAN2"); //$NON-NLS-1$
+        supportedFunctions.add("COS"); //$NON-NLS-1$
+        supportedFunctions.add("COT"); //$NON-NLS-1$
+        supportedFunctions.add("DEGREES"); //$NON-NLS-1$
+        supportedFunctions.add("EXP"); //$NON-NLS-1$
+        supportedFunctions.add("FLOOR"); //$NON-NLS-1$
+        supportedFunctions.add("LOG"); //$NON-NLS-1$
+        supportedFunctions.add("LOG10"); //$NON-NLS-1$
+        supportedFunctions.add("MOD"); //$NON-NLS-1$
+        supportedFunctions.add("PI"); //$NON-NLS-1$
+        supportedFunctions.add("POWER"); //$NON-NLS-1$
+        supportedFunctions.add("RADIANS"); //$NON-NLS-1$
+        supportedFunctions.add("SIGN"); //$NON-NLS-1$
+        supportedFunctions.add("SIN"); //$NON-NLS-1$
+        supportedFunctions.add("SQRT"); //$NON-NLS-1$
+        supportedFunctions.add("TAN"); //$NON-NLS-1$
+        supportedFunctions.add("ASCII"); //$NON-NLS-1$
+        supportedFunctions.add("CHAR"); //$NON-NLS-1$
+        supportedFunctions.add("CHR"); //$NON-NLS-1$
+        supportedFunctions.add("CONCAT"); //$NON-NLS-1$
+        supportedFunctions.add("||"); //$NON-NLS-1$
+        //supportedFunctons.add("INITCAP"); //$NON-NLS-1$
+        supportedFunctions.add("LCASE"); //$NON-NLS-1$
+        supportedFunctions.add("LEFT"); //$NON-NLS-1$
+        supportedFunctions.add("LENGTH"); //$NON-NLS-1$
+        //supportedFunctons.add("LOCATE"); //$NON-NLS-1$
+        supportedFunctions.add("LOWER"); //$NON-NLS-1$
+        //supportedFunctons.add("LPAD"); //$NON-NLS-1$
+        supportedFunctions.add("LTRIM"); //$NON-NLS-1$
+        supportedFunctions.add("REPEAT"); //$NON-NLS-1$
+        //supportedFunctions.add("RAND"); //$NON-NLS-1$
+        supportedFunctions.add("REPLACE"); //$NON-NLS-1$
+        supportedFunctions.add("RIGHT"); //$NON-NLS-1$
+        //supportedFunctons.add("RPAD"); //$NON-NLS-1$
+        supportedFunctions.add("RTRIM"); //$NON-NLS-1$
+        supportedFunctions.add("SPACE"); //$NON-NLS-1$
+        supportedFunctions.add("SUBSTRING"); //$NON-NLS-1$
+        //supportedFunctons.add("TRANSLATE"); //$NON-NLS-1$
+        supportedFunctions.add("UCASE"); //$NON-NLS-1$
+        supportedFunctions.add("UPPER"); //$NON-NLS-1$
+        //supportedFunctons.add("CURDATE"); //$NON-NLS-1$
+        //supportedFunctons.add("CURTIME"); //$NON-NLS-1$
+        supportedFunctions.add("DAYNAME"); //$NON-NLS-1$
+        supportedFunctions.add("DAYOFMONTH"); //$NON-NLS-1$
+        supportedFunctions.add("DAYOFWEEK"); //$NON-NLS-1$
+        supportedFunctions.add("DAYOFYEAR"); //$NON-NLS-1$
+        supportedFunctions.add("HOUR"); //$NON-NLS-1$
+        supportedFunctions.add("MINUTE"); //$NON-NLS-1$
+        supportedFunctions.add("MONTH"); //$NON-NLS-1$
+        supportedFunctions.add("MONTHNAME"); //$NON-NLS-1$
+        //supportedFunctions.add("NOW"); //$NON-NLS-1$
+        supportedFunctions.add("QUARTER"); //$NON-NLS-1$
+        supportedFunctions.add("SECOND"); //$NON-NLS-1$
+        supportedFunctions.add("TIMESTAMPADD"); //$NON-NLS-1$
+        supportedFunctions.add("TIMESTAMPDIFF"); //$NON-NLS-1$
+        supportedFunctions.add("WEEK"); //$NON-NLS-1$
+        supportedFunctions.add("YEAR"); //$NON-NLS-1$
+        supportedFunctions.add("CAST"); //$NON-NLS-1$
+        supportedFunctions.add("CONVERT"); //$NON-NLS-1$
+        supportedFunctions.add("IFNULL"); //$NON-NLS-1$
+        supportedFunctions.add("NVL");      //$NON-NLS-1$ 
+        
+        return supportedFunctions;
+    }
+    
+    @Override
+    public boolean supportsInlineViews() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsFunctionsInGroupBy() {
+        return true;
+    }    
+    @Override
+    public boolean supportsRowLimit() {
+        return true;
+    }
+    
+    @Override
+    public boolean supportsIntersect() {
+    	return true;
+    }
+    @Override
+    public boolean supportsExcept() {
+    	return true;
+    };
+    
+    @Override
+    public int getMaxFromGroups() {
+        return DEFAULT_MAX_FROM_GROUPS;
+    } 
+    
+    @Override
+    public int getMaxInCriteriaSize() {
+    	return JDBCExecutionFactory.DEFAULT_MAX_IN_CRITERIA;
+    }    
+     
+}

Deleted: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/sqlserver/SQLServerSQLTranslator.java
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/sqlserver/SQLServerSQLTranslator.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/sqlserver/SQLServerSQLTranslator.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -1,71 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership.  Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- * 
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- * 
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-/*
- */
-package org.teiid.translator.jdbc.sqlserver;
-
-import java.util.Arrays;
-import java.util.List;
-
-import org.teiid.language.ColumnReference;
-import org.teiid.language.Function;
-import org.teiid.language.LanguageObject;
-import org.teiid.translator.ConnectorCapabilities;
-import org.teiid.translator.ExecutionContext;
-import org.teiid.translator.TypeFacility;
-import org.teiid.translator.jdbc.sybase.SybaseSQLTranslator;
-
-/**
- * Updated to assume the use of the DataDirect, 2005 driver, or later.
- */
-public class SQLServerSQLTranslator extends SybaseSQLTranslator {
-	
-	//TEIID-31 remove mod modifier for SQL Server 2008
-	
-	@Override
-	protected List<Object> convertDateToString(Function function) {
-		return Arrays.asList("replace(convert(varchar, ", function.getParameters().get(0), ", 102), '.', '-')"); //$NON-NLS-1$ //$NON-NLS-2$
-	}
-    
-	@Override
-	protected List<?> convertTimestampToString(Function function) {
-		return Arrays.asList("convert(varchar, ", function.getParameters().get(0), ", 21)"); //$NON-NLS-1$ //$NON-NLS-2$
-	}
-	
-    @Override
-    public Class<? extends ConnectorCapabilities> getDefaultCapabilities() {
-    	return SQLServerCapabilities.class;
-    }
-    
-    @Override
-    public List<?> translate(LanguageObject obj, ExecutionContext context) {
-    	if (obj instanceof ColumnReference) {
-    		ColumnReference elem = (ColumnReference)obj;
-			if (TypeFacility.RUNTIME_TYPES.STRING.equals(elem.getType()) && elem.getMetadataObject() != null && "uniqueidentifier".equalsIgnoreCase(elem.getMetadataObject().getNativeType())) { //$NON-NLS-1$
-				return Arrays.asList("cast(", elem, " as char(36))"); //$NON-NLS-1$ //$NON-NLS-2$
-			}
-    	}
-    	return super.translate(obj, context);
-    }
-    
-}

Deleted: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/sybase/SybaseCapabilities.java
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/sybase/SybaseCapabilities.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/sybase/SybaseCapabilities.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -1,134 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership.  Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- * 
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- * 
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-/*
- */
-package org.teiid.translator.jdbc.sybase;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.teiid.translator.jdbc.JDBCCapabilities;
-
-
-/**
- */
-public class SybaseCapabilities extends JDBCCapabilities {
-
-    public SybaseCapabilities() {
-    }
-    
-    @Override
-    public int getMaxInCriteriaSize() {
-    	return 250;
-    }
-    
-    /**
-     * @see org.teiid.resource.cci.data.ConnectorCapabilities#getSupportedFunctions()
-     */
-    public List<String> getSupportedFunctions() {
-        List<String> supportedFunctions = new ArrayList<String>();
-        supportedFunctions.addAll(super.getSupportedFunctions());
-        supportedFunctions.add("ABS"); //$NON-NLS-1$
-        supportedFunctions.add("ACOS"); //$NON-NLS-1$
-        supportedFunctions.add("ASIN"); //$NON-NLS-1$
-        supportedFunctions.add("ATAN"); //$NON-NLS-1$
-        supportedFunctions.add("ATAN2"); //$NON-NLS-1$
-        supportedFunctions.add("COS"); //$NON-NLS-1$
-        supportedFunctions.add("COT"); //$NON-NLS-1$
-        supportedFunctions.add("DEGREES"); //$NON-NLS-1$
-        supportedFunctions.add("EXP"); //$NON-NLS-1$
-        supportedFunctions.add("FLOOR"); //$NON-NLS-1$
-        supportedFunctions.add("LOG"); //$NON-NLS-1$
-        supportedFunctions.add("LOG10"); //$NON-NLS-1$
-        supportedFunctions.add("MOD"); //$NON-NLS-1$
-        supportedFunctions.add("PI"); //$NON-NLS-1$
-        supportedFunctions.add("POWER"); //$NON-NLS-1$
-        supportedFunctions.add("RADIANS"); //$NON-NLS-1$
-        supportedFunctions.add("SIGN"); //$NON-NLS-1$
-        supportedFunctions.add("SIN"); //$NON-NLS-1$
-        supportedFunctions.add("SQRT"); //$NON-NLS-1$
-        supportedFunctions.add("TAN"); //$NON-NLS-1$
-        supportedFunctions.add("ASCII"); //$NON-NLS-1$
-        supportedFunctions.add("CHAR"); //$NON-NLS-1$
-        supportedFunctions.add("CHR"); //$NON-NLS-1$
-        supportedFunctions.add("CONCAT"); //$NON-NLS-1$
-        supportedFunctions.add("||"); //$NON-NLS-1$
-        supportedFunctions.add("LCASE"); //$NON-NLS-1$
-        supportedFunctions.add("LEFT"); //$NON-NLS-1$
-        supportedFunctions.add("LENGTH"); //$NON-NLS-1$
-        supportedFunctions.add("LOWER"); //$NON-NLS-1$
-        supportedFunctions.add("LTRIM"); //$NON-NLS-1$
-        supportedFunctions.add("REPEAT"); //$NON-NLS-1$
-        //supportedFunctions.add("RAND"); //$NON-NLS-1$
-        supportedFunctions.add("RIGHT"); //$NON-NLS-1$
-        supportedFunctions.add("RTRIM"); //$NON-NLS-1$
-        supportedFunctions.add("SPACE"); //$NON-NLS-1$
-        supportedFunctions.add("SUBSTRING"); //$NON-NLS-1$
-        supportedFunctions.add("UCASE"); //$NON-NLS-1$
-        supportedFunctions.add("UPPER"); //$NON-NLS-1$
-        //supportedFunctons.add("CURDATE"); //$NON-NLS-1$
-        //supportedFunctons.add("CURTIME"); //$NON-NLS-1$
-        supportedFunctions.add("DAYNAME"); //$NON-NLS-1$
-        supportedFunctions.add("DAYOFMONTH"); //$NON-NLS-1$
-        supportedFunctions.add("DAYOFWEEK"); //$NON-NLS-1$
-        supportedFunctions.add("DAYOFYEAR"); //$NON-NLS-1$
-        supportedFunctions.add("HOUR"); //$NON-NLS-1$
-        supportedFunctions.add("MINUTE"); //$NON-NLS-1$
-        supportedFunctions.add("MONTH"); //$NON-NLS-1$
-        supportedFunctions.add("MONTHNAME"); //$NON-NLS-1$
-        //supportedFunctions.add("NOW"); //$NON-NLS-1$
-        supportedFunctions.add("QUARTER"); //$NON-NLS-1$
-        supportedFunctions.add("SECOND"); //$NON-NLS-1$
-        supportedFunctions.add("TIMESTAMPADD"); //$NON-NLS-1$
-        supportedFunctions.add("TIMESTAMPDIFF"); //$NON-NLS-1$
-        supportedFunctions.add("WEEK"); //$NON-NLS-1$
-        supportedFunctions.add("YEAR"); //$NON-NLS-1$
-        supportedFunctions.add("CAST"); //$NON-NLS-1$
-        supportedFunctions.add("CONVERT"); //$NON-NLS-1$
-        supportedFunctions.add("IFNULL"); //$NON-NLS-1$
-        supportedFunctions.add("NVL");      //$NON-NLS-1$ 
-        //supportedFunctions.add("FORMATTIMESTAMP");   //$NON-NLS-1$
-        
-        return supportedFunctions;
-    }
-    
-    public boolean supportsInlineViews() {
-        return true;
-    }
-
-    /** 
-     * @see org.teiid.translator.ConnectorCapabilities#supportsFunctionsInGroupBy()
-     * @since 5.0
-     */
-    public boolean supportsFunctionsInGroupBy() {
-        return true;
-    }
-    
-    /** 
-     * @see org.teiid.translator.BasicConnectorCapabilities#getMaxFromGroups()
-     */
-    public int getMaxFromGroups() {
-        return 50;
-    }
-    
-}

Copied: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/sybase/SybaseExecutionFactory.java (from rev 2121, trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/sybase/SybaseSQLTranslator.java)
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/sybase/SybaseExecutionFactory.java	                        (rev 0)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/sybase/SybaseExecutionFactory.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -0,0 +1,292 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership.  Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ * 
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ * 
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+/*
+ */
+package org.teiid.translator.jdbc.sybase;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.teiid.language.Command;
+import org.teiid.language.Function;
+import org.teiid.language.Limit;
+import org.teiid.language.OrderBy;
+import org.teiid.language.SetQuery;
+import org.teiid.translator.ConnectorException;
+import org.teiid.translator.ExecutionContext;
+import org.teiid.translator.SourceSystemFunctions;
+import org.teiid.translator.jdbc.AliasModifier;
+import org.teiid.translator.jdbc.ConvertModifier;
+import org.teiid.translator.jdbc.EscapeSyntaxModifier;
+import org.teiid.translator.jdbc.FunctionModifier;
+import org.teiid.translator.jdbc.JDBCExecutionFactory;
+import org.teiid.translator.jdbc.ModFunctionModifier;
+
+
+/**
+ */
+public class SybaseExecutionFactory extends JDBCExecutionFactory {
+    
+    public void start() throws ConnectorException {
+        super.start();
+        
+        registerFunctionModifier(SourceSystemFunctions.MOD, new ModFunctionModifier("%", getLanguageFactory())); //$NON-NLS-1$ 
+        registerFunctionModifier(SourceSystemFunctions.CONCAT, new AliasModifier("+")); //$NON-NLS-1$ 
+        registerFunctionModifier(SourceSystemFunctions.LCASE, new AliasModifier("lower")); //$NON-NLS-1$ 
+        registerFunctionModifier(SourceSystemFunctions.IFNULL, new AliasModifier("isnull")); //$NON-NLS-1$ 
+        registerFunctionModifier(SourceSystemFunctions.UCASE, new AliasModifier("upper")); //$NON-NLS-1$ 
+        registerFunctionModifier(SourceSystemFunctions.REPEAT, new AliasModifier("replicate")); //$NON-NLS-1$
+        registerFunctionModifier(SourceSystemFunctions.SUBSTRING, new SubstringFunctionModifier(getLanguageFactory()));
+        registerFunctionModifier(SourceSystemFunctions.DAYNAME, new EscapeSyntaxModifier());
+        registerFunctionModifier(SourceSystemFunctions.MONTHNAME, new EscapeSyntaxModifier());
+        registerFunctionModifier(SourceSystemFunctions.DAYOFWEEK, new EscapeSyntaxModifier());
+        registerFunctionModifier(SourceSystemFunctions.DAYOFYEAR, new EscapeSyntaxModifier());
+        registerFunctionModifier(SourceSystemFunctions.DAYOFMONTH, new EscapeSyntaxModifier());
+        registerFunctionModifier(SourceSystemFunctions.HOUR, new EscapeSyntaxModifier());
+        registerFunctionModifier(SourceSystemFunctions.MINUTE, new EscapeSyntaxModifier());
+        registerFunctionModifier(SourceSystemFunctions.QUARTER, new EscapeSyntaxModifier());
+        registerFunctionModifier(SourceSystemFunctions.SECOND, new EscapeSyntaxModifier());
+        registerFunctionModifier(SourceSystemFunctions.WEEK, new EscapeSyntaxModifier());
+        registerFunctionModifier(SourceSystemFunctions.TIMESTAMPADD, new EscapeSyntaxModifier());
+        registerFunctionModifier(SourceSystemFunctions.TIMESTAMPDIFF, new EscapeSyntaxModifier());
+        registerFunctionModifier(SourceSystemFunctions.LENGTH, new EscapeSyntaxModifier());
+        registerFunctionModifier(SourceSystemFunctions.ATAN2, new EscapeSyntaxModifier());
+        
+        //add in type conversion
+        ConvertModifier convertModifier = new ConvertModifier();
+        //boolean isn't treated as bit, since it doesn't support null
+        //byte is treated as smallint, since tinyint is unsigned
+    	convertModifier.addTypeMapping("smallint", FunctionModifier.BYTE, FunctionModifier.SHORT); //$NON-NLS-1$
+    	convertModifier.addTypeMapping("int", FunctionModifier.INTEGER); //$NON-NLS-1$
+    	convertModifier.addTypeMapping("numeric(19,0)", FunctionModifier.LONG); //$NON-NLS-1$
+    	convertModifier.addTypeMapping("real", FunctionModifier.FLOAT); //$NON-NLS-1$
+    	convertModifier.addTypeMapping("double precision", FunctionModifier.DOUBLE); //$NON-NLS-1$
+    	convertModifier.addTypeMapping("numeric(38, 0)", FunctionModifier.BIGINTEGER); //$NON-NLS-1$
+    	convertModifier.addTypeMapping("numeric(38, 19)", FunctionModifier.BIGDECIMAL); //$NON-NLS-1$
+    	convertModifier.addTypeMapping("char(1)", FunctionModifier.CHAR); //$NON-NLS-1$
+    	convertModifier.addTypeMapping("varchar(40)", FunctionModifier.STRING); //$NON-NLS-1$
+    	convertModifier.addTypeMapping("datetime", FunctionModifier.DATE, FunctionModifier.TIME, FunctionModifier.TIMESTAMP); //$NON-NLS-1$
+    	convertModifier.addConvert(FunctionModifier.TIMESTAMP, FunctionModifier.TIME, new FunctionModifier() {
+			@Override
+			public List<?> translate(Function function) {
+				List<Object> result = new ArrayList<Object>();
+				result.add("cast("); //$NON-NLS-1$
+				result.add("'1970-01-01 ' + "); //$NON-NLS-1$
+				result.addAll(convertTimeToString(function));
+				result.add(" AS datetime)"); //$NON-NLS-1$
+				return result;
+			}
+		});
+    	convertModifier.addConvert(FunctionModifier.TIMESTAMP, FunctionModifier.DATE, new FunctionModifier() {
+			@Override
+			public List<?> translate(Function function) {
+				List<Object> result = new ArrayList<Object>();
+				result.add("cast("); //$NON-NLS-1$
+				result.addAll(convertDateToString(function));
+				result.add(" AS datetime)"); //$NON-NLS-1$
+				return result;
+			}
+		});
+    	convertModifier.addConvert(FunctionModifier.TIME, FunctionModifier.STRING, new FunctionModifier() {
+			@Override
+			public List<?> translate(Function function) {
+				return convertTimeToString(function);
+			}
+		}); 
+    	convertModifier.addConvert(FunctionModifier.DATE, FunctionModifier.STRING, new FunctionModifier() {
+			@Override
+			public List<?> translate(Function function) {
+				return convertDateToString(function);
+			}
+		});
+    	convertModifier.addConvert(FunctionModifier.TIMESTAMP, FunctionModifier.STRING, new FunctionModifier() {
+			@Override
+			public List<?> translate(Function function) {
+				return convertTimestampToString(function);
+			}
+		});
+    	convertModifier.addNumericBooleanConversions();
+    	registerFunctionModifier(SourceSystemFunctions.CONVERT, convertModifier);
+    }
+    
+	private List<Object> convertTimeToString(Function function) {
+		return Arrays.asList("convert(varchar, ", function.getParameters().get(0), ", 8)"); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+    
+    protected List<Object> convertDateToString(Function function) {
+		return Arrays.asList("stuff(stuff(convert(varchar, ", function.getParameters().get(0), ", 102), 5, 1, '-'), 8, 1, '-')"); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+    
+    /**
+     * Written to only support version 15
+     * @param function
+     * @return
+     */
+	protected List<?> convertTimestampToString(Function function) {
+		return Arrays.asList("stuff(convert(varchar, ", function.getParameters().get(0), ", 123), 11, 1, ' ')"); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+    
+    @Override
+    public boolean useAsInGroupAlias() {
+    	return false;
+    }
+    
+    @Override
+    public boolean hasTimeType() {
+    	return false;
+    }
+    
+    @Override
+    public int getTimestampNanoPrecision() {
+    	return 3;
+    }
+    
+    /**
+     * SetQueries don't have a concept of TOP, an inline view is needed.
+     */
+    @Override
+    public List<?> translateCommand(Command command, ExecutionContext context) {
+    	if (!(command instanceof SetQuery)) {
+    		return null;
+    	}
+    	SetQuery queryCommand = (SetQuery)command;
+		if (queryCommand.getLimit() == null) {
+			return null;
+    	}
+		Limit limit = queryCommand.getLimit();
+		OrderBy orderBy = queryCommand.getOrderBy();
+		queryCommand.setLimit(null);
+		queryCommand.setOrderBy(null);
+		List<Object> parts = new ArrayList<Object>(6);
+		parts.add("SELECT "); //$NON-NLS-1$
+		parts.addAll(translateLimit(limit, context));
+		parts.add(" * FROM ("); //$NON-NLS-1$
+		parts.add(queryCommand);
+		parts.add(") AS X"); //$NON-NLS-1$
+		if (orderBy != null) {
+			parts.add(" "); //$NON-NLS-1$
+			parts.add(orderBy);
+		}
+		return parts;
+    }
+    
+    @SuppressWarnings("unchecked")
+	@Override
+    public List<?> translateLimit(Limit limit, ExecutionContext context) {
+    	return Arrays.asList("TOP ", limit.getRowLimit()); //$NON-NLS-1$
+    }
+    
+    @Override
+    public boolean useSelectLimit() {
+    	return true;
+    }
+    
+    @Override
+    public int getMaxInCriteriaSize() {
+    	return 250;
+    }
+    
+    @Override
+    public List<String> getSupportedFunctions() {
+        List<String> supportedFunctions = new ArrayList<String>();
+        supportedFunctions.addAll(super.getSupportedFunctions());
+        supportedFunctions.add("ABS"); //$NON-NLS-1$
+        supportedFunctions.add("ACOS"); //$NON-NLS-1$
+        supportedFunctions.add("ASIN"); //$NON-NLS-1$
+        supportedFunctions.add("ATAN"); //$NON-NLS-1$
+        supportedFunctions.add("ATAN2"); //$NON-NLS-1$
+        supportedFunctions.add("COS"); //$NON-NLS-1$
+        supportedFunctions.add("COT"); //$NON-NLS-1$
+        supportedFunctions.add("DEGREES"); //$NON-NLS-1$
+        supportedFunctions.add("EXP"); //$NON-NLS-1$
+        supportedFunctions.add("FLOOR"); //$NON-NLS-1$
+        supportedFunctions.add("LOG"); //$NON-NLS-1$
+        supportedFunctions.add("LOG10"); //$NON-NLS-1$
+        supportedFunctions.add("MOD"); //$NON-NLS-1$
+        supportedFunctions.add("PI"); //$NON-NLS-1$
+        supportedFunctions.add("POWER"); //$NON-NLS-1$
+        supportedFunctions.add("RADIANS"); //$NON-NLS-1$
+        supportedFunctions.add("SIGN"); //$NON-NLS-1$
+        supportedFunctions.add("SIN"); //$NON-NLS-1$
+        supportedFunctions.add("SQRT"); //$NON-NLS-1$
+        supportedFunctions.add("TAN"); //$NON-NLS-1$
+        supportedFunctions.add("ASCII"); //$NON-NLS-1$
+        supportedFunctions.add("CHAR"); //$NON-NLS-1$
+        supportedFunctions.add("CHR"); //$NON-NLS-1$
+        supportedFunctions.add("CONCAT"); //$NON-NLS-1$
+        supportedFunctions.add("||"); //$NON-NLS-1$
+        supportedFunctions.add("LCASE"); //$NON-NLS-1$
+        supportedFunctions.add("LEFT"); //$NON-NLS-1$
+        supportedFunctions.add("LENGTH"); //$NON-NLS-1$
+        supportedFunctions.add("LOWER"); //$NON-NLS-1$
+        supportedFunctions.add("LTRIM"); //$NON-NLS-1$
+        supportedFunctions.add("REPEAT"); //$NON-NLS-1$
+        //supportedFunctions.add("RAND"); //$NON-NLS-1$
+        supportedFunctions.add("RIGHT"); //$NON-NLS-1$
+        supportedFunctions.add("RTRIM"); //$NON-NLS-1$
+        supportedFunctions.add("SPACE"); //$NON-NLS-1$
+        supportedFunctions.add("SUBSTRING"); //$NON-NLS-1$
+        supportedFunctions.add("UCASE"); //$NON-NLS-1$
+        supportedFunctions.add("UPPER"); //$NON-NLS-1$
+        //supportedFunctons.add("CURDATE"); //$NON-NLS-1$
+        //supportedFunctons.add("CURTIME"); //$NON-NLS-1$
+        supportedFunctions.add("DAYNAME"); //$NON-NLS-1$
+        supportedFunctions.add("DAYOFMONTH"); //$NON-NLS-1$
+        supportedFunctions.add("DAYOFWEEK"); //$NON-NLS-1$
+        supportedFunctions.add("DAYOFYEAR"); //$NON-NLS-1$
+        supportedFunctions.add("HOUR"); //$NON-NLS-1$
+        supportedFunctions.add("MINUTE"); //$NON-NLS-1$
+        supportedFunctions.add("MONTH"); //$NON-NLS-1$
+        supportedFunctions.add("MONTHNAME"); //$NON-NLS-1$
+        //supportedFunctions.add("NOW"); //$NON-NLS-1$
+        supportedFunctions.add("QUARTER"); //$NON-NLS-1$
+        supportedFunctions.add("SECOND"); //$NON-NLS-1$
+        supportedFunctions.add("TIMESTAMPADD"); //$NON-NLS-1$
+        supportedFunctions.add("TIMESTAMPDIFF"); //$NON-NLS-1$
+        supportedFunctions.add("WEEK"); //$NON-NLS-1$
+        supportedFunctions.add("YEAR"); //$NON-NLS-1$
+        supportedFunctions.add("CAST"); //$NON-NLS-1$
+        supportedFunctions.add("CONVERT"); //$NON-NLS-1$
+        supportedFunctions.add("IFNULL"); //$NON-NLS-1$
+        supportedFunctions.add("NVL");      //$NON-NLS-1$ 
+        //supportedFunctions.add("FORMATTIMESTAMP");   //$NON-NLS-1$
+        
+        return supportedFunctions;
+    }
+    
+    @Override
+    public boolean supportsInlineViews() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsFunctionsInGroupBy() {
+        return true;
+    }
+    
+    @Override
+    public int getMaxFromGroups() {
+        return 50;
+    }    
+}

Deleted: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/sybase/SybaseSQLTranslator.java
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/sybase/SybaseSQLTranslator.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/sybase/SybaseSQLTranslator.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -1,214 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership.  Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- * 
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- * 
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-/*
- */
-package org.teiid.translator.jdbc.sybase;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.teiid.language.Command;
-import org.teiid.language.Function;
-import org.teiid.language.Limit;
-import org.teiid.language.OrderBy;
-import org.teiid.language.SetQuery;
-import org.teiid.translator.ConnectorCapabilities;
-import org.teiid.translator.ConnectorException;
-import org.teiid.translator.ExecutionContext;
-import org.teiid.translator.SourceSystemFunctions;
-import org.teiid.translator.jdbc.AliasModifier;
-import org.teiid.translator.jdbc.ConvertModifier;
-import org.teiid.translator.jdbc.EscapeSyntaxModifier;
-import org.teiid.translator.jdbc.FunctionModifier;
-import org.teiid.translator.jdbc.JDBCExecutionFactory;
-import org.teiid.translator.jdbc.ModFunctionModifier;
-import org.teiid.translator.jdbc.Translator;
-
-
-/**
- */
-public class SybaseSQLTranslator extends Translator {
-    
-    /* 
-     * @see com.metamatrix.connector.jdbc.extension.SQLTranslator#initialize(com.metamatrix.data.api.ConnectorEnvironment, com.metamatrix.data.metadata.runtime.RuntimeMetadata)
-     */
-    public void initialize(JDBCExecutionFactory env) throws ConnectorException {
-        super.initialize(env);
-        registerFunctionModifier(SourceSystemFunctions.MOD, new ModFunctionModifier("%", getLanguageFactory())); //$NON-NLS-1$ 
-        registerFunctionModifier(SourceSystemFunctions.CONCAT, new AliasModifier("+")); //$NON-NLS-1$ 
-        registerFunctionModifier(SourceSystemFunctions.LCASE, new AliasModifier("lower")); //$NON-NLS-1$ 
-        registerFunctionModifier(SourceSystemFunctions.IFNULL, new AliasModifier("isnull")); //$NON-NLS-1$ 
-        registerFunctionModifier(SourceSystemFunctions.UCASE, new AliasModifier("upper")); //$NON-NLS-1$ 
-        registerFunctionModifier(SourceSystemFunctions.REPEAT, new AliasModifier("replicate")); //$NON-NLS-1$
-        registerFunctionModifier(SourceSystemFunctions.SUBSTRING, new SubstringFunctionModifier(getLanguageFactory()));
-        registerFunctionModifier(SourceSystemFunctions.DAYNAME, new EscapeSyntaxModifier());
-        registerFunctionModifier(SourceSystemFunctions.MONTHNAME, new EscapeSyntaxModifier());
-        registerFunctionModifier(SourceSystemFunctions.DAYOFWEEK, new EscapeSyntaxModifier());
-        registerFunctionModifier(SourceSystemFunctions.DAYOFYEAR, new EscapeSyntaxModifier());
-        registerFunctionModifier(SourceSystemFunctions.DAYOFMONTH, new EscapeSyntaxModifier());
-        registerFunctionModifier(SourceSystemFunctions.HOUR, new EscapeSyntaxModifier());
-        registerFunctionModifier(SourceSystemFunctions.MINUTE, new EscapeSyntaxModifier());
-        registerFunctionModifier(SourceSystemFunctions.QUARTER, new EscapeSyntaxModifier());
-        registerFunctionModifier(SourceSystemFunctions.SECOND, new EscapeSyntaxModifier());
-        registerFunctionModifier(SourceSystemFunctions.WEEK, new EscapeSyntaxModifier());
-        registerFunctionModifier(SourceSystemFunctions.TIMESTAMPADD, new EscapeSyntaxModifier());
-        registerFunctionModifier(SourceSystemFunctions.TIMESTAMPDIFF, new EscapeSyntaxModifier());
-        registerFunctionModifier(SourceSystemFunctions.LENGTH, new EscapeSyntaxModifier());
-        registerFunctionModifier(SourceSystemFunctions.ATAN2, new EscapeSyntaxModifier());
-        
-        //add in type conversion
-        ConvertModifier convertModifier = new ConvertModifier();
-        //boolean isn't treated as bit, since it doesn't support null
-        //byte is treated as smallint, since tinyint is unsigned
-    	convertModifier.addTypeMapping("smallint", FunctionModifier.BYTE, FunctionModifier.SHORT); //$NON-NLS-1$
-    	convertModifier.addTypeMapping("int", FunctionModifier.INTEGER); //$NON-NLS-1$
-    	convertModifier.addTypeMapping("numeric(19,0)", FunctionModifier.LONG); //$NON-NLS-1$
-    	convertModifier.addTypeMapping("real", FunctionModifier.FLOAT); //$NON-NLS-1$
-    	convertModifier.addTypeMapping("double precision", FunctionModifier.DOUBLE); //$NON-NLS-1$
-    	convertModifier.addTypeMapping("numeric(38, 0)", FunctionModifier.BIGINTEGER); //$NON-NLS-1$
-    	convertModifier.addTypeMapping("numeric(38, 19)", FunctionModifier.BIGDECIMAL); //$NON-NLS-1$
-    	convertModifier.addTypeMapping("char(1)", FunctionModifier.CHAR); //$NON-NLS-1$
-    	convertModifier.addTypeMapping("varchar(40)", FunctionModifier.STRING); //$NON-NLS-1$
-    	convertModifier.addTypeMapping("datetime", FunctionModifier.DATE, FunctionModifier.TIME, FunctionModifier.TIMESTAMP); //$NON-NLS-1$
-    	convertModifier.addConvert(FunctionModifier.TIMESTAMP, FunctionModifier.TIME, new FunctionModifier() {
-			@Override
-			public List<?> translate(Function function) {
-				List<Object> result = new ArrayList<Object>();
-				result.add("cast("); //$NON-NLS-1$
-				result.add("'1970-01-01 ' + "); //$NON-NLS-1$
-				result.addAll(convertTimeToString(function));
-				result.add(" AS datetime)"); //$NON-NLS-1$
-				return result;
-			}
-		});
-    	convertModifier.addConvert(FunctionModifier.TIMESTAMP, FunctionModifier.DATE, new FunctionModifier() {
-			@Override
-			public List<?> translate(Function function) {
-				List<Object> result = new ArrayList<Object>();
-				result.add("cast("); //$NON-NLS-1$
-				result.addAll(convertDateToString(function));
-				result.add(" AS datetime)"); //$NON-NLS-1$
-				return result;
-			}
-		});
-    	convertModifier.addConvert(FunctionModifier.TIME, FunctionModifier.STRING, new FunctionModifier() {
-			@Override
-			public List<?> translate(Function function) {
-				return convertTimeToString(function);
-			}
-		}); 
-    	convertModifier.addConvert(FunctionModifier.DATE, FunctionModifier.STRING, new FunctionModifier() {
-			@Override
-			public List<?> translate(Function function) {
-				return convertDateToString(function);
-			}
-		});
-    	convertModifier.addConvert(FunctionModifier.TIMESTAMP, FunctionModifier.STRING, new FunctionModifier() {
-			@Override
-			public List<?> translate(Function function) {
-				return convertTimestampToString(function);
-			}
-		});
-    	convertModifier.addNumericBooleanConversions();
-    	registerFunctionModifier(SourceSystemFunctions.CONVERT, convertModifier);
-    }
-    
-	private List<Object> convertTimeToString(Function function) {
-		return Arrays.asList("convert(varchar, ", function.getParameters().get(0), ", 8)"); //$NON-NLS-1$ //$NON-NLS-2$
-	}
-    
-    protected List<Object> convertDateToString(Function function) {
-		return Arrays.asList("stuff(stuff(convert(varchar, ", function.getParameters().get(0), ", 102), 5, 1, '-'), 8, 1, '-')"); //$NON-NLS-1$ //$NON-NLS-2$
-	}
-    
-    /**
-     * Written to only support version 15
-     * @param function
-     * @return
-     */
-	protected List<?> convertTimestampToString(Function function) {
-		return Arrays.asList("stuff(convert(varchar, ", function.getParameters().get(0), ", 123), 11, 1, ' ')"); //$NON-NLS-1$ //$NON-NLS-2$
-	}
-    
-    @Override
-    public boolean useAsInGroupAlias() {
-    	return false;
-    }
-    
-    @Override
-    public boolean hasTimeType() {
-    	return false;
-    }
-    
-    @Override
-    public int getTimestampNanoPrecision() {
-    	return 3;
-    }
-    
-    /**
-     * SetQueries don't have a concept of TOP, an inline view is needed.
-     */
-    @Override
-    public List<?> translateCommand(Command command, ExecutionContext context) {
-    	if (!(command instanceof SetQuery)) {
-    		return null;
-    	}
-    	SetQuery queryCommand = (SetQuery)command;
-		if (queryCommand.getLimit() == null) {
-			return null;
-    	}
-		Limit limit = queryCommand.getLimit();
-		OrderBy orderBy = queryCommand.getOrderBy();
-		queryCommand.setLimit(null);
-		queryCommand.setOrderBy(null);
-		List<Object> parts = new ArrayList<Object>(6);
-		parts.add("SELECT "); //$NON-NLS-1$
-		parts.addAll(translateLimit(limit, context));
-		parts.add(" * FROM ("); //$NON-NLS-1$
-		parts.add(queryCommand);
-		parts.add(") AS X"); //$NON-NLS-1$
-		if (orderBy != null) {
-			parts.add(" "); //$NON-NLS-1$
-			parts.add(orderBy);
-		}
-		return parts;
-    }
-    
-    @SuppressWarnings("unchecked")
-	@Override
-    public List<?> translateLimit(Limit limit, ExecutionContext context) {
-    	return Arrays.asList("TOP ", limit.getRowLimit()); //$NON-NLS-1$
-    }
-    
-    @Override
-    public boolean useSelectLimit() {
-    	return true;
-    }
-    
-    @Override
-    public Class<? extends ConnectorCapabilities> getDefaultCapabilities() {
-    	return SybaseCapabilities.class;
-    }
-    
-}

Deleted: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/teiid/TeiidCapabilities.java
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/teiid/TeiidCapabilities.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/teiid/TeiidCapabilities.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -1,167 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership.  Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- * 
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- * 
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-/*
- */
-package org.teiid.translator.jdbc.teiid;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.teiid.translator.jdbc.JDBCCapabilities;
-
-
-/** 
- * @since 4.3
- */
-public class TeiidCapabilities extends JDBCCapabilities {
-    
-    /** 
-     * @see org.teiid.translator.ConnectorCapabilities#getSupportedFunctions()
-     * @since 4.3
-     */
-    public List<String> getSupportedFunctions() {
-        List<String> supportedFunctions = new ArrayList<String>();
-        supportedFunctions.addAll(super.getSupportedFunctions());
-        supportedFunctions.add("ABS"); //$NON-NLS-1$
-        supportedFunctions.add("ACOS"); //$NON-NLS-1$
-        supportedFunctions.add("ASIN"); //$NON-NLS-1$
-        supportedFunctions.add("ATAN"); //$NON-NLS-1$
-        supportedFunctions.add("ATAN2"); //$NON-NLS-1$
-        supportedFunctions.add("CEILING"); //$NON-NLS-1$
-        supportedFunctions.add("COS"); //$NON-NLS-1$
-        supportedFunctions.add("COT"); //$NON-NLS-1$
-        supportedFunctions.add("DEGREES"); //$NON-NLS-1$
-        supportedFunctions.add("EXP"); //$NON-NLS-1$
-        supportedFunctions.add("FLOOR"); //$NON-NLS-1$
-        supportedFunctions.add("FORMATBIGDECIMAL"); //$NON-NLS-1$
-        supportedFunctions.add("FORMATBIGINTEGER"); //$NON-NLS-1$
-        supportedFunctions.add("FORMATDOUBLE"); //$NON-NLS-1$
-        supportedFunctions.add("FORMATFLOAT"); //$NON-NLS-1$
-        supportedFunctions.add("FORMATINTEGER"); //$NON-NLS-1$
-        supportedFunctions.add("FORMATLONG"); //$NON-NLS-1$
-        supportedFunctions.add("LOG"); //$NON-NLS-1$
-        supportedFunctions.add("LOG10"); //$NON-NLS-1$
-        supportedFunctions.add("MOD"); //$NON-NLS-1$
-        supportedFunctions.add("PARSEBIGDECIMAL"); //$NON-NLS-1$
-        supportedFunctions.add("PARSEBIGINTEGER"); //$NON-NLS-1$
-        supportedFunctions.add("PARSEDOUBLE"); //$NON-NLS-1$
-        supportedFunctions.add("PARSEFLOAT"); //$NON-NLS-1$
-        supportedFunctions.add("PARSEINTEGER"); //$NON-NLS-1$
-        supportedFunctions.add("PARSELONG"); //$NON-NLS-1$
-        supportedFunctions.add("PI"); //$NON-NLS-1$
-        supportedFunctions.add("POWER"); //$NON-NLS-1$
-        supportedFunctions.add("RADIANS"); //$NON-NLS-1$
-        supportedFunctions.add("RAND"); //$NON-NLS-1$
-        supportedFunctions.add("ROUND"); //$NON-NLS-1$
-        supportedFunctions.add("SIGN"); //$NON-NLS-1$
-        supportedFunctions.add("SIN"); //$NON-NLS-1$
-        supportedFunctions.add("SQRT"); //$NON-NLS-1$
-        supportedFunctions.add("TAN"); //$NON-NLS-1$
-        supportedFunctions.add("ASCII"); //$NON-NLS-1$
-        supportedFunctions.add("CHAR"); //$NON-NLS-1$
-        supportedFunctions.add("CHR"); //$NON-NLS-1$
-        supportedFunctions.add("CONCAT"); //$NON-NLS-1$
-        supportedFunctions.add("CONCAT2"); //$NON-NLS-1$
-        supportedFunctions.add("||"); //$NON-NLS-1$
-        supportedFunctions.add("INITCAP"); //$NON-NLS-1$
-        supportedFunctions.add("INSERT"); //$NON-NLS-1$
-        supportedFunctions.add("LCASE"); //$NON-NLS-1$
-        supportedFunctions.add("LENGTH"); //$NON-NLS-1$
-        supportedFunctions.add("LEFT"); //$NON-NLS-1$
-        supportedFunctions.add("LOCATE"); //$NON-NLS-1$
-        supportedFunctions.add("LPAD"); //$NON-NLS-1$
-        supportedFunctions.add("LTRIM"); //$NON-NLS-1$
-        supportedFunctions.add("REPEAT"); //$NON-NLS-1$
-        supportedFunctions.add("REPLACE"); //$NON-NLS-1$
-        supportedFunctions.add("RPAD"); //$NON-NLS-1$
-        supportedFunctions.add("RIGHT"); //$NON-NLS-1$
-        supportedFunctions.add("RTRIM"); //$NON-NLS-1$
-        supportedFunctions.add("SUBSTRING"); //$NON-NLS-1$
-        supportedFunctions.add("TRANSLATE"); //$NON-NLS-1$
-        supportedFunctions.add("UCASE"); //$NON-NLS-1$
-        supportedFunctions.add("CURDATE"); //$NON-NLS-1$
-        supportedFunctions.add("CURTIME"); //$NON-NLS-1$
-        supportedFunctions.add("NOW"); //$NON-NLS-1$
-        supportedFunctions.add("DAYNAME"); //$NON-NLS-1$
-        supportedFunctions.add("DAYOFMONTH"); //$NON-NLS-1$
-        supportedFunctions.add("DAYOFWEEK"); //$NON-NLS-1$
-        supportedFunctions.add("DAYOFYEAR"); //$NON-NLS-1$
-        supportedFunctions.add("FORMATDATE"); //$NON-NLS-1$
-        supportedFunctions.add("FORMATTIME"); //$NON-NLS-1$
-        supportedFunctions.add("FORMATTIMESTAMP"); //$NON-NLS-1$
-        supportedFunctions.add("HOUR"); //$NON-NLS-1$
-        supportedFunctions.add("MINUTE"); //$NON-NLS-1$
-        supportedFunctions.add("MONTH"); //$NON-NLS-1$
-        supportedFunctions.add("MONTHNAME"); //$NON-NLS-1$
-        supportedFunctions.add("PARSEDATE"); //$NON-NLS-1$
-        supportedFunctions.add("PARSETIME"); //$NON-NLS-1$
-        supportedFunctions.add("PARSETIMESTAMP"); //$NON-NLS-1$
-        supportedFunctions.add("SECOND"); //$NON-NLS-1$
-        supportedFunctions.add("TIMESTAMPADD"); //$NON-NLS-1$
-        supportedFunctions.add("TIMESTAMPDIFF"); //$NON-NLS-1$
-        supportedFunctions.add("WEEK"); //$NON-NLS-1$
-        supportedFunctions.add("YEAR"); //$NON-NLS-1$
-        supportedFunctions.add("MODIFYTIMEZONE"); //$NON-NLS-1$
-        supportedFunctions.add("DECODESTRING"); //$NON-NLS-1$
-        supportedFunctions.add("DECODEINTEGER"); //$NON-NLS-1$
-        supportedFunctions.add("IFNULL"); //$NON-NLS-1$
-        supportedFunctions.add("NVL");      //$NON-NLS-1$ 
-        supportedFunctions.add("CAST"); //$NON-NLS-1$
-        supportedFunctions.add("CONVERT"); //$NON-NLS-1$
-        supportedFunctions.add("USER"); //$NON-NLS-1$
-        supportedFunctions.add("FROM_UNIXTIME"); //$NON-NLS-1$
-        supportedFunctions.add("NULLIF"); //$NON-NLS-1$
-        supportedFunctions.add("COALESCE"); //$NON-NLS-1$
-        return supportedFunctions;
-    }
-    
-    public boolean supportsInlineViews() {
-        return true;
-    }
-
-    /** 
-     * @see org.teiid.translator.ConnectorCapabilities#supportsFunctionsInGroupBy()
-     * @since 5.0
-     */
-    public boolean supportsFunctionsInGroupBy() {
-        return true;
-    }    
-    
-    public boolean supportsRowLimit() {
-        return true;
-    }
-    
-    public boolean supportsRowOffset() {
-        return true;
-    }
-    
-    @Override
-    public boolean supportsExcept() {
-    	return true;
-    }
-    
-    @Override
-    public boolean supportsIntersect() {
-    	return true;
-    }
-}

Copied: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/teiid/TeiidExecutionFactory.java (from rev 2121, trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/teiid/TeiidCapabilities.java)
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/teiid/TeiidExecutionFactory.java	                        (rev 0)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/teiid/TeiidExecutionFactory.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -0,0 +1,164 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership.  Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ * 
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ * 
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+/*
+ */
+package org.teiid.translator.jdbc.teiid;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.teiid.translator.jdbc.JDBCExecutionFactory;
+
+
+/** 
+ * @since 4.3
+ */
+public class TeiidExecutionFactory extends JDBCExecutionFactory {
+    
+    /** 
+     * @see org.teiid.translator.ConnectorCapabilities#getSupportedFunctions()
+     * @since 4.3
+     */
+    public List<String> getSupportedFunctions() {
+        List<String> supportedFunctions = new ArrayList<String>();
+        supportedFunctions.addAll(super.getSupportedFunctions());
+        supportedFunctions.add("ABS"); //$NON-NLS-1$
+        supportedFunctions.add("ACOS"); //$NON-NLS-1$
+        supportedFunctions.add("ASIN"); //$NON-NLS-1$
+        supportedFunctions.add("ATAN"); //$NON-NLS-1$
+        supportedFunctions.add("ATAN2"); //$NON-NLS-1$
+        supportedFunctions.add("CEILING"); //$NON-NLS-1$
+        supportedFunctions.add("COS"); //$NON-NLS-1$
+        supportedFunctions.add("COT"); //$NON-NLS-1$
+        supportedFunctions.add("DEGREES"); //$NON-NLS-1$
+        supportedFunctions.add("EXP"); //$NON-NLS-1$
+        supportedFunctions.add("FLOOR"); //$NON-NLS-1$
+        supportedFunctions.add("FORMATBIGDECIMAL"); //$NON-NLS-1$
+        supportedFunctions.add("FORMATBIGINTEGER"); //$NON-NLS-1$
+        supportedFunctions.add("FORMATDOUBLE"); //$NON-NLS-1$
+        supportedFunctions.add("FORMATFLOAT"); //$NON-NLS-1$
+        supportedFunctions.add("FORMATINTEGER"); //$NON-NLS-1$
+        supportedFunctions.add("FORMATLONG"); //$NON-NLS-1$
+        supportedFunctions.add("LOG"); //$NON-NLS-1$
+        supportedFunctions.add("LOG10"); //$NON-NLS-1$
+        supportedFunctions.add("MOD"); //$NON-NLS-1$
+        supportedFunctions.add("PARSEBIGDECIMAL"); //$NON-NLS-1$
+        supportedFunctions.add("PARSEBIGINTEGER"); //$NON-NLS-1$
+        supportedFunctions.add("PARSEDOUBLE"); //$NON-NLS-1$
+        supportedFunctions.add("PARSEFLOAT"); //$NON-NLS-1$
+        supportedFunctions.add("PARSEINTEGER"); //$NON-NLS-1$
+        supportedFunctions.add("PARSELONG"); //$NON-NLS-1$
+        supportedFunctions.add("PI"); //$NON-NLS-1$
+        supportedFunctions.add("POWER"); //$NON-NLS-1$
+        supportedFunctions.add("RADIANS"); //$NON-NLS-1$
+        supportedFunctions.add("RAND"); //$NON-NLS-1$
+        supportedFunctions.add("ROUND"); //$NON-NLS-1$
+        supportedFunctions.add("SIGN"); //$NON-NLS-1$
+        supportedFunctions.add("SIN"); //$NON-NLS-1$
+        supportedFunctions.add("SQRT"); //$NON-NLS-1$
+        supportedFunctions.add("TAN"); //$NON-NLS-1$
+        supportedFunctions.add("ASCII"); //$NON-NLS-1$
+        supportedFunctions.add("CHAR"); //$NON-NLS-1$
+        supportedFunctions.add("CHR"); //$NON-NLS-1$
+        supportedFunctions.add("CONCAT"); //$NON-NLS-1$
+        supportedFunctions.add("CONCAT2"); //$NON-NLS-1$
+        supportedFunctions.add("||"); //$NON-NLS-1$
+        supportedFunctions.add("INITCAP"); //$NON-NLS-1$
+        supportedFunctions.add("INSERT"); //$NON-NLS-1$
+        supportedFunctions.add("LCASE"); //$NON-NLS-1$
+        supportedFunctions.add("LENGTH"); //$NON-NLS-1$
+        supportedFunctions.add("LEFT"); //$NON-NLS-1$
+        supportedFunctions.add("LOCATE"); //$NON-NLS-1$
+        supportedFunctions.add("LPAD"); //$NON-NLS-1$
+        supportedFunctions.add("LTRIM"); //$NON-NLS-1$
+        supportedFunctions.add("REPEAT"); //$NON-NLS-1$
+        supportedFunctions.add("REPLACE"); //$NON-NLS-1$
+        supportedFunctions.add("RPAD"); //$NON-NLS-1$
+        supportedFunctions.add("RIGHT"); //$NON-NLS-1$
+        supportedFunctions.add("RTRIM"); //$NON-NLS-1$
+        supportedFunctions.add("SUBSTRING"); //$NON-NLS-1$
+        supportedFunctions.add("TRANSLATE"); //$NON-NLS-1$
+        supportedFunctions.add("UCASE"); //$NON-NLS-1$
+        supportedFunctions.add("CURDATE"); //$NON-NLS-1$
+        supportedFunctions.add("CURTIME"); //$NON-NLS-1$
+        supportedFunctions.add("NOW"); //$NON-NLS-1$
+        supportedFunctions.add("DAYNAME"); //$NON-NLS-1$
+        supportedFunctions.add("DAYOFMONTH"); //$NON-NLS-1$
+        supportedFunctions.add("DAYOFWEEK"); //$NON-NLS-1$
+        supportedFunctions.add("DAYOFYEAR"); //$NON-NLS-1$
+        supportedFunctions.add("FORMATDATE"); //$NON-NLS-1$
+        supportedFunctions.add("FORMATTIME"); //$NON-NLS-1$
+        supportedFunctions.add("FORMATTIMESTAMP"); //$NON-NLS-1$
+        supportedFunctions.add("HOUR"); //$NON-NLS-1$
+        supportedFunctions.add("MINUTE"); //$NON-NLS-1$
+        supportedFunctions.add("MONTH"); //$NON-NLS-1$
+        supportedFunctions.add("MONTHNAME"); //$NON-NLS-1$
+        supportedFunctions.add("PARSEDATE"); //$NON-NLS-1$
+        supportedFunctions.add("PARSETIME"); //$NON-NLS-1$
+        supportedFunctions.add("PARSETIMESTAMP"); //$NON-NLS-1$
+        supportedFunctions.add("SECOND"); //$NON-NLS-1$
+        supportedFunctions.add("TIMESTAMPADD"); //$NON-NLS-1$
+        supportedFunctions.add("TIMESTAMPDIFF"); //$NON-NLS-1$
+        supportedFunctions.add("WEEK"); //$NON-NLS-1$
+        supportedFunctions.add("YEAR"); //$NON-NLS-1$
+        supportedFunctions.add("MODIFYTIMEZONE"); //$NON-NLS-1$
+        supportedFunctions.add("DECODESTRING"); //$NON-NLS-1$
+        supportedFunctions.add("DECODEINTEGER"); //$NON-NLS-1$
+        supportedFunctions.add("IFNULL"); //$NON-NLS-1$
+        supportedFunctions.add("NVL");      //$NON-NLS-1$ 
+        supportedFunctions.add("CAST"); //$NON-NLS-1$
+        supportedFunctions.add("CONVERT"); //$NON-NLS-1$
+        supportedFunctions.add("USER"); //$NON-NLS-1$
+        supportedFunctions.add("FROM_UNIXTIME"); //$NON-NLS-1$
+        supportedFunctions.add("NULLIF"); //$NON-NLS-1$
+        supportedFunctions.add("COALESCE"); //$NON-NLS-1$
+        return supportedFunctions;
+    }
+    
+    public boolean supportsInlineViews() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsFunctionsInGroupBy() {
+        return true;
+    }    
+    
+    public boolean supportsRowLimit() {
+        return true;
+    }
+    
+    public boolean supportsRowOffset() {
+        return true;
+    }
+    
+    @Override
+    public boolean supportsExcept() {
+    	return true;
+    }
+    
+    @Override
+    public boolean supportsIntersect() {
+    	return true;
+    }
+}

Deleted: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/teradata/TeradataCapabilities.java
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/teradata/TeradataCapabilities.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/teradata/TeradataCapabilities.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -1,87 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership.  Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- * 
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- * 
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package org.teiid.translator.jdbc.teradata;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.teiid.translator.jdbc.JDBCCapabilities;
-
-
-
-/** 
- * for Teradata database Release V2R5.1
- */
-public class TeradataCapabilities extends JDBCCapabilities {
-
-    public TeradataCapabilities() {
-    }
-    
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsFullOuterJoins()
-     */
-    public boolean supportsFullOuterJoins() {
-        return false;
-    }
-    
-    /**
-     * @see org.teiid.resource.cci.data.ConnectorCapabilities#getSupportedFunctions()
-     */
-    public List getSupportedFunctions() {
-        List supportedFunctions = new ArrayList();
-        supportedFunctions.addAll(super.getSupportedFunctions());
-        supportedFunctions.add("ABS"); //$NON-NLS-1$
-        supportedFunctions.add("ACOS"); //$NON-NLS-1$
-        supportedFunctions.add("ASIN"); //$NON-NLS-1$
-        supportedFunctions.add("ATAN"); //$NON-NLS-1$
-        supportedFunctions.add("ATAN2"); //$NON-NLS-1$
-        supportedFunctions.add("COS"); //$NON-NLS-1$
-        supportedFunctions.add("EXP"); //$NON-NLS-1$
-//        supportedFunctions.add("LOG"); //$NON-NLS-1$ // "LN"
-//        supportedFunctions.add("LOG10"); //$NON-NLS-1$ // "LOG"
-        supportedFunctions.add("MOD"); //$NON-NLS-1$
-        supportedFunctions.add("SIN"); //$NON-NLS-1$
-        supportedFunctions.add("SQRT"); //$NON-NLS-1$
-        supportedFunctions.add("TAN"); //$NON-NLS-1$
-        supportedFunctions.add("||"); //$NON-NLS-1$
-//        supportedFunctions.add("CONCAT"); //$NON-NLS-1$ // "||"
-//        supportedFunctions.add("LCASE"); //$NON-NLS-1$ // "LOWER"
-//        supportedFunctions.add("LOCATE"); //$NON-NLS-1$ //"POSITION", "INDEX" ?
-        supportedFunctions.add("LOWER"); //$NON-NLS-1$
-        supportedFunctions.add("SUBSTRING"); //$NON-NLS-1$
-//        supportedFunctions.add("UCASE"); //$NON-NLS-1$ // "UPPER"
-        supportedFunctions.add("UPPER"); //$NON-NLS-1$
-        supportedFunctions.add("HOUR"); //$NON-NLS-1$
-        supportedFunctions.add("MONTH"); //$NON-NLS-1$
-        supportedFunctions.add("YEAR"); //$NON-NLS-1$
-        supportedFunctions.add("DAY"); //$NON-NLS-1$
-        supportedFunctions.add("MINUTE"); //$NON-NLS-1$
-        supportedFunctions.add("SECOND"); //$NON-NLS-1$
-
-        supportedFunctions.add("CAST"); //$NON-NLS-1$
-        //supportedFunctions.add("CONVERT"); //$NON-NLS-1$ "CAST"
-
-        return supportedFunctions;
-    }
-    
-}

Copied: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/teradata/TeradataExecutionFactory.java (from rev 2121, trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/teradata/TeradataCapabilities.java)
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/teradata/TeradataExecutionFactory.java	                        (rev 0)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/teradata/TeradataExecutionFactory.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -0,0 +1,87 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership.  Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ * 
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ * 
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.translator.jdbc.teradata;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.teiid.translator.jdbc.JDBCExecutionFactory;
+
+
+
+/** 
+ * for Teradata database Release V2R5.1
+ */
+public class TeradataExecutionFactory extends JDBCExecutionFactory {
+
+    public TeradataExecutionFactory() {
+    }
+    
+    /* 
+     * @see com.metamatrix.data.ConnectorCapabilities#supportsFullOuterJoins()
+     */
+    public boolean supportsFullOuterJoins() {
+        return false;
+    }
+    
+    /**
+     * @see org.teiid.resource.cci.data.ConnectorCapabilities#getSupportedFunctions()
+     */
+    public List getSupportedFunctions() {
+        List supportedFunctions = new ArrayList();
+        supportedFunctions.addAll(super.getSupportedFunctions());
+        supportedFunctions.add("ABS"); //$NON-NLS-1$
+        supportedFunctions.add("ACOS"); //$NON-NLS-1$
+        supportedFunctions.add("ASIN"); //$NON-NLS-1$
+        supportedFunctions.add("ATAN"); //$NON-NLS-1$
+        supportedFunctions.add("ATAN2"); //$NON-NLS-1$
+        supportedFunctions.add("COS"); //$NON-NLS-1$
+        supportedFunctions.add("EXP"); //$NON-NLS-1$
+//        supportedFunctions.add("LOG"); //$NON-NLS-1$ // "LN"
+//        supportedFunctions.add("LOG10"); //$NON-NLS-1$ // "LOG"
+        supportedFunctions.add("MOD"); //$NON-NLS-1$
+        supportedFunctions.add("SIN"); //$NON-NLS-1$
+        supportedFunctions.add("SQRT"); //$NON-NLS-1$
+        supportedFunctions.add("TAN"); //$NON-NLS-1$
+        supportedFunctions.add("||"); //$NON-NLS-1$
+//        supportedFunctions.add("CONCAT"); //$NON-NLS-1$ // "||"
+//        supportedFunctions.add("LCASE"); //$NON-NLS-1$ // "LOWER"
+//        supportedFunctions.add("LOCATE"); //$NON-NLS-1$ //"POSITION", "INDEX" ?
+        supportedFunctions.add("LOWER"); //$NON-NLS-1$
+        supportedFunctions.add("SUBSTRING"); //$NON-NLS-1$
+//        supportedFunctions.add("UCASE"); //$NON-NLS-1$ // "UPPER"
+        supportedFunctions.add("UPPER"); //$NON-NLS-1$
+        supportedFunctions.add("HOUR"); //$NON-NLS-1$
+        supportedFunctions.add("MONTH"); //$NON-NLS-1$
+        supportedFunctions.add("YEAR"); //$NON-NLS-1$
+        supportedFunctions.add("DAY"); //$NON-NLS-1$
+        supportedFunctions.add("MINUTE"); //$NON-NLS-1$
+        supportedFunctions.add("SECOND"); //$NON-NLS-1$
+
+        supportedFunctions.add("CAST"); //$NON-NLS-1$
+        //supportedFunctions.add("CONVERT"); //$NON-NLS-1$ "CAST"
+
+        return supportedFunctions;
+    }
+    
+}

Modified: trunk/connectors/translator-jdbc/src/main/resources/META-INF/jboss-beans.xml
===================================================================
--- trunk/connectors/translator-jdbc/src/main/resources/META-INF/jboss-beans.xml	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/main/resources/META-INF/jboss-beans.xml	2010-05-13 13:40:34 UTC (rev 2122)
@@ -10,7 +10,7 @@
       <constructor factoryMethod="createTemplateInfo">
          <factory bean="TranslatorDeploymentTemplateInfoFactory"/>
          <parameter class="java.lang.Class">org.teiid.templates.TranslatorTemplateInfo</parameter>
-         <parameter class="java.lang.Class">org.teiid.resource.adapter.jdbc.JDBCExecutionFactory</parameter>
+         <parameter class="java.lang.Class">org.teiid.translator.jdbc.JDBCExecutionFactory</parameter>
          <parameter class="java.lang.String">${project.artifactId}-${project.version}</parameter>
          <parameter class="java.lang.String">${project.description}</parameter>         
       </constructor>

Modified: trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/FakeMetadataFactory.java
===================================================================
--- trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/FakeMetadataFactory.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/FakeMetadataFactory.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -29,8 +29,6 @@
 import org.teiid.language.Command;
 import org.teiid.translator.ConnectorException;
 import org.teiid.translator.ExecutionContext;
-import org.teiid.translator.jdbc.TranslatedCommand;
-import org.teiid.translator.jdbc.Translator;
 
 import com.metamatrix.cdk.api.TranslationUtility;
 import com.metamatrix.cdk.unittest.FakeTranslationFactory;
@@ -52,7 +50,7 @@
         return util.parseCommand(sql);        
     }
 
-	public static void helpTestVisitor(String vdb, String input, String expectedOutput, Translator translator) throws ConnectorException {
+	public static void helpTestVisitor(String vdb, String input, String expectedOutput, JDBCExecutionFactory translator) throws ConnectorException {
 	    // Convert from sql to objects
 	    Command obj = helpTranslate(vdb, input);
 	    

Modified: trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/TestExtractFunctionModifier.java
===================================================================
--- trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/TestExtractFunctionModifier.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/TestExtractFunctionModifier.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -36,9 +36,6 @@
 import org.teiid.query.unittest.TimestampUtil;
 import org.teiid.translator.SourceSystemFunctions;
 import org.teiid.translator.TypeFacility;
-import org.teiid.translator.jdbc.ExtractFunctionModifier;
-import org.teiid.translator.jdbc.SQLConversionVisitor;
-import org.teiid.translator.jdbc.Translator;
 
 
 /**
@@ -61,9 +58,9 @@
             Integer.class);
         
         ExtractFunctionModifier mod = new ExtractFunctionModifier ();
-        Translator trans = new Translator();
+        JDBCExecutionFactory trans = new JDBCExecutionFactory();
         trans.registerFunctionModifier(target, mod);
-        trans.initialize(new JDBCExecutionFactory());
+        trans.start();
         
         SQLConversionVisitor sqlVisitor = trans.getSQLConversionVisitor(); 
 

Deleted: trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/TestJDBCExecutionFactory.java
===================================================================
--- trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/TestJDBCExecutionFactory.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/TestJDBCExecutionFactory.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -1,44 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership.  Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- * 
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- * 
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package org.teiid.translator.jdbc;
-
-import static org.junit.Assert.*;
-
-import org.junit.Test;
-import org.teiid.translator.jdbc.JDBCExecutionFactory;
-import org.teiid.translator.jdbc.Translator;
-import org.teiid.translator.jdbc.sqlserver.SQLServerSQLTranslator;
-public class TestJDBCExecutionFactory {
-
-	@Test public void testGetExtensionTranslationClassDefault() throws Exception {
-		JDBCExecutionFactory mcf = new JDBCExecutionFactory();
-		assertSame(Translator.class, mcf.getTranslator().getClass());
-	}
-	
-	@Test public void testGetExtensionTranslationClass() throws Exception {
-		JDBCExecutionFactory mcf = new JDBCExecutionFactory();
-		mcf.setExtensionTranslationClassName(SQLServerSQLTranslator.class.getName());
-		assertSame(SQLServerSQLTranslator.class, mcf.getTranslator().getClass());
-	}
-	
-}

Modified: trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/TestJDBCProcedureExecution.java
===================================================================
--- trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/TestJDBCProcedureExecution.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/TestJDBCProcedureExecution.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -33,9 +33,6 @@
 import org.mockito.Mockito;
 import org.teiid.language.Command;
 import org.teiid.translator.ExecutionContext;
-import org.teiid.translator.jdbc.JDBCExecutionFactory;
-import org.teiid.translator.jdbc.JDBCProcedureExecution;
-import org.teiid.translator.jdbc.Translator;
 
 public class TestJDBCProcedureExecution {
 	
@@ -46,12 +43,9 @@
 		Mockito.stub(cs.getUpdateCount()).toReturn(-1);
 		Mockito.stub(cs.getInt(1)).toReturn(5);
 		Mockito.stub(connection.prepareCall("{  call spTest8a(?)}")).toReturn(cs); //$NON-NLS-1$
-		Translator sqlTranslator = new Translator();
+		JDBCExecutionFactory ef = new JDBCExecutionFactory();
 		
-		JDBCExecutionFactory config = Mockito.mock(JDBCExecutionFactory.class);
-		Mockito.stub(config.getTranslator()).toReturn(sqlTranslator);
-		
-		JDBCProcedureExecution procedureExecution = new JDBCProcedureExecution(command, connection, Mockito.mock(ExecutionContext.class),  config, sqlTranslator);
+		JDBCProcedureExecution procedureExecution = new JDBCProcedureExecution(command, connection, Mockito.mock(ExecutionContext.class),  ef);
 		procedureExecution.execute();
 		assertEquals(Arrays.asList(5), procedureExecution.getOutputParameterValues());
 		Mockito.verify(cs, Mockito.times(1)).registerOutParameter(1, Types.INTEGER);
@@ -63,12 +57,9 @@
 		Mockito.stub(cs.getUpdateCount()).toReturn(-1);
 		Mockito.stub(cs.getInt(2)).toReturn(5);
 		Mockito.stub(connection.prepareCall("{  call spTest8(?,?)}")).toReturn(cs); //$NON-NLS-1$
-		Translator sqlTranslator = new Translator();
+		JDBCExecutionFactory config = new JDBCExecutionFactory();
 
-		JDBCExecutionFactory config = Mockito.mock(JDBCExecutionFactory.class);
-		Mockito.stub(config.getTranslator()).toReturn(sqlTranslator);
-		
-		JDBCProcedureExecution procedureExecution = new JDBCProcedureExecution(command, connection, Mockito.mock(ExecutionContext.class), config, sqlTranslator);
+		JDBCProcedureExecution procedureExecution = new JDBCProcedureExecution(command, connection, Mockito.mock(ExecutionContext.class), config);
 		procedureExecution.execute();
 		assertEquals(Arrays.asList(5), procedureExecution.getOutputParameterValues());
 		Mockito.verify(cs, Mockito.times(1)).registerOutParameter(2, Types.INTEGER);

Modified: trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/TestJDBCUpdateExecution.java
===================================================================
--- trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/TestJDBCUpdateExecution.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/TestJDBCUpdateExecution.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -33,9 +33,6 @@
 import org.teiid.language.Insert;
 import org.teiid.language.Literal;
 import org.teiid.translator.ExecutionContext;
-import org.teiid.translator.jdbc.JDBCExecutionFactory;
-import org.teiid.translator.jdbc.JDBCUpdateExecution;
-import org.teiid.translator.jdbc.Translator;
 
 public class TestJDBCUpdateExecution {
 
@@ -54,10 +51,9 @@
 		Mockito.stub(p.executeBatch()).toReturn(new int [] {1, 1});
 		Mockito.stub(connection.prepareStatement("INSERT INTO SmallA (IntKey, IntNum) VALUES (?, ?)")).toReturn(p); //$NON-NLS-1$
 		
-		JDBCExecutionFactory config = Mockito.mock(JDBCExecutionFactory.class);
-		Mockito.stub(config.getTranslator()).toReturn(new Translator());
+		JDBCExecutionFactory config = new JDBCExecutionFactory();
 		
-		JDBCUpdateExecution updateExecution = new JDBCUpdateExecution(command, connection, Mockito.mock(ExecutionContext.class), config, config.getTranslator());
+		JDBCUpdateExecution updateExecution = new JDBCUpdateExecution(command, connection, Mockito.mock(ExecutionContext.class), config);
 		updateExecution.execute();
 		Mockito.verify(p, Mockito.times(2)).addBatch();
 	}

Modified: trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/TestLocateFunctionModifier.java
===================================================================
--- trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/TestLocateFunctionModifier.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/TestLocateFunctionModifier.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -32,9 +32,6 @@
 import org.teiid.language.LanguageFactory;
 import org.teiid.translator.ConnectorException;
 import org.teiid.translator.SourceSystemFunctions;
-import org.teiid.translator.jdbc.LocateFunctionModifier;
-import org.teiid.translator.jdbc.SQLConversionVisitor;
-import org.teiid.translator.jdbc.Translator;
 
 /**
  * Test <code>LOCATEFunctionModifier</code> by invoking its methods with varying 
@@ -97,16 +94,15 @@
     	            Arrays.asList(param1, param2), Integer.class);
     	}
 
-    	Translator trans = new Translator() {
+    	JDBCExecutionFactory trans = new JDBCExecutionFactory() {
 			@Override
-			public void initialize(JDBCExecutionFactory env)
-					throws ConnectorException {
-				super.initialize(env);
+			public void start() throws ConnectorException {
+				super.start();
 				registerFunctionModifier(SourceSystemFunctions.LOCATE, new LocateFunctionModifier(getLanguageFactory(), locateFunctionName, parameterOrder));
 			}
     	};
     	
-        trans.initialize(new JDBCExecutionFactory());
+        trans.start();
 
         SQLConversionVisitor sqlVisitor = trans.getSQLConversionVisitor(); 
         sqlVisitor.append(func);  

Modified: trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/TestModFunctionModifier.java
===================================================================
--- trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/TestModFunctionModifier.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/TestModFunctionModifier.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -33,9 +33,6 @@
 import org.teiid.language.LanguageFactory;
 import org.teiid.translator.ConnectorException;
 import org.teiid.translator.SourceSystemFunctions;
-import org.teiid.translator.jdbc.ModFunctionModifier;
-import org.teiid.translator.jdbc.SQLConversionVisitor;
-import org.teiid.translator.jdbc.Translator;
 
 /**
  * Test <code>ModFunctionModifier</code> by invoking its methods with varying 
@@ -90,16 +87,15 @@
     	Function func = LANG_FACTORY.createFunction(modFunctionName,
             Arrays.asList(param1, param2), param1.getType());
 
-    	Translator trans = new Translator() {
+    	JDBCExecutionFactory trans = new JDBCExecutionFactory() {
 			@Override
-			public void initialize(JDBCExecutionFactory env)
-					throws ConnectorException {
-				super.initialize(env);
+			public void start() throws ConnectorException {
+				super.start();
 				registerFunctionModifier(SourceSystemFunctions.MOD, new ModFunctionModifier(modFunctionName, getLanguageFactory()));
 			}
     	};
     	
-        trans.initialize(new JDBCExecutionFactory());
+        trans.start();
 
         SQLConversionVisitor sqlVisitor = trans.getSQLConversionVisitor(); 
         sqlVisitor.append(func);  

Modified: trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/TestSQLConversionVisitor.java
===================================================================
--- trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/TestSQLConversionVisitor.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/TestSQLConversionVisitor.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -37,8 +37,6 @@
 import org.teiid.metadata.RuntimeMetadata;
 import org.teiid.translator.ConnectorException;
 import org.teiid.translator.ExecutionContext;
-import org.teiid.translator.jdbc.SQLConversionVisitor;
-import org.teiid.translator.jdbc.Translator;
 
 /**
  */
@@ -53,13 +51,12 @@
                                                                             "PartID",  //$NON-NLS-1$ 
                                                                             "ExecCount");     //$NON-NLS-1$ 
     
-    private static Translator TRANSLATOR; 
+    private static JDBCExecutionFactory TRANSLATOR; 
     
     @BeforeClass public static void oneTimeSetup() throws ConnectorException {
-    	TRANSLATOR = new Translator();
-    	JDBCExecutionFactory env = new JDBCExecutionFactory();
-    	env.setTrimStrings(true);
-    	TRANSLATOR.initialize(env);
+    	TRANSLATOR = new JDBCExecutionFactory();
+    	TRANSLATOR.setTrimStrings(true);
+    	TRANSLATOR.start();
     }
     
     public String getTestVDB() {
@@ -71,13 +68,12 @@
     }
     
     public void helpTestVisitor(String vdb, String input, String expectedOutput, boolean usePreparedStatement) {
-        Translator trans = new Translator();
-        JDBCExecutionFactory env = new JDBCExecutionFactory();
+    	JDBCExecutionFactory trans = new JDBCExecutionFactory();
         if (usePreparedStatement) {
-        	env.setUseBindVariables(true);
+        	trans.setUseBindVariables(true);
         }
         try {
-			trans.initialize(env);
+			trans.start();
 	        TranslationHelper.helpTestVisitor(vdb, input, expectedOutput, trans);
 		} catch (ConnectorException e) {
 			throw new RuntimeException(e);
@@ -89,9 +85,9 @@
     private String getStringWithContext(LanguageObject obj) throws ConnectorException {
     	JDBCExecutionFactory env = new JDBCExecutionFactory();
     	env.setUseCommentsInSourceQuery(true);
-        Translator trans = new Translator();
-        trans.initialize(env);
-        SQLConversionVisitor visitor = trans.getSQLConversionVisitor();
+        env.start();
+        
+        SQLConversionVisitor visitor = env.getSQLConversionVisitor();
         visitor.setExecutionContext(context);
         visitor.append(obj);
         return visitor.toString();

Modified: trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/TranslationHelper.java
===================================================================
--- trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/TranslationHelper.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/TranslationHelper.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -36,8 +36,6 @@
 import org.teiid.query.function.metadata.FunctionMethod;
 import org.teiid.translator.ConnectorException;
 import org.teiid.translator.ExecutionContext;
-import org.teiid.translator.jdbc.TranslatedCommand;
-import org.teiid.translator.jdbc.Translator;
 
 import com.metamatrix.cdk.api.TranslationUtility;
 import com.metamatrix.cdk.unittest.FakeTranslationFactory;
@@ -72,19 +70,18 @@
         return util.parseCommand(sql);        
     }    
 
-	public static void helpTestVisitor(String vdb, String input, String expectedOutput, Translator translator) throws ConnectorException {
+	public static void helpTestVisitor(String vdb, String input, String expectedOutput, JDBCExecutionFactory translator) throws ConnectorException {
 		helpTestVisitor(vdb,null,input, expectedOutput, translator);
 	}
 	
-	public static void helpTestVisitor(String vdb, String udf, String input, String expectedOutput, Translator translator) throws ConnectorException {
+	public static void helpTestVisitor(String vdb, String udf, String input, String expectedOutput, JDBCExecutionFactory translator) throws ConnectorException {
 	    // Convert from sql to objects
 	    Command obj = helpTranslate(vdb, udf, input);
 	    
 	    helpTestVisitor(expectedOutput, translator, obj);
 	}	
 
-	public static void helpTestVisitor(String expectedOutput,
-			Translator translator, Command obj) throws ConnectorException {
+	public static void helpTestVisitor(String expectedOutput, JDBCExecutionFactory translator, Command obj) throws ConnectorException {
 		TranslatedCommand tc = new TranslatedCommand(Mockito.mock(ExecutionContext.class), translator);
 	    tc.translateCommand(obj);
 	    assertEquals("Did not get correct sql", expectedOutput, tc.getSql());             //$NON-NLS-1$

Modified: trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/access/TestAccessSQLTranslator.java
===================================================================
--- trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/access/TestAccessSQLTranslator.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/access/TestAccessSQLTranslator.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -30,8 +30,6 @@
 import org.teiid.translator.ExecutionContext;
 import org.teiid.translator.jdbc.JDBCExecutionFactory;
 import org.teiid.translator.jdbc.TranslatedCommand;
-import org.teiid.translator.jdbc.Translator;
-import org.teiid.translator.jdbc.access.AccessSQLTranslator;
 
 import com.metamatrix.cdk.unittest.FakeTranslationFactory;
 
@@ -41,12 +39,12 @@
  */
 public class TestAccessSQLTranslator extends TestCase {
 
-    private static Translator TRANSLATOR; 
+    private static JDBCExecutionFactory TRANSLATOR; 
 
     static {
         try {
-            TRANSLATOR = new AccessSQLTranslator();        
-            TRANSLATOR.initialize(Mockito.mock(JDBCExecutionFactory.class));
+            TRANSLATOR = new AccessExecutionFactory();        
+            TRANSLATOR.start();
         } catch(ConnectorException e) {
             e.printStackTrace();    
         }

Modified: trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/db2/TestDB2ConvertModifier.java
===================================================================
--- trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/db2/TestDB2ConvertModifier.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/db2/TestDB2ConvertModifier.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -34,9 +34,7 @@
 import org.teiid.language.LanguageFactory;
 import org.teiid.query.unittest.TimestampUtil;
 import org.teiid.translator.TypeFacility;
-import org.teiid.translator.jdbc.JDBCExecutionFactory;
 import org.teiid.translator.jdbc.SQLConversionVisitor;
-import org.teiid.translator.jdbc.db2.DB2SQLTranslator;
 
 
 /**
@@ -54,8 +52,8 @@
     }
 
     public String helpGetString(Expression expr) throws Exception {
-        DB2SQLTranslator trans = new DB2SQLTranslator();
-        trans.initialize(new JDBCExecutionFactory());
+        DB2ExecutionFactory trans = new DB2ExecutionFactory();
+        trans.start();
         SQLConversionVisitor sqlVisitor = trans.getSQLConversionVisitor(); 
         sqlVisitor.append(expr);  
         

Modified: trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/db2/TestDB2SqlTranslator.java
===================================================================
--- trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/db2/TestDB2SqlTranslator.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/db2/TestDB2SqlTranslator.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -31,10 +31,8 @@
 import org.teiid.language.Command;
 import org.teiid.translator.ConnectorException;
 import org.teiid.translator.ExecutionContext;
-import org.teiid.translator.jdbc.JDBCExecutionFactory;
 import org.teiid.translator.jdbc.TranslatedCommand;
 import org.teiid.translator.jdbc.TranslationHelper;
-import org.teiid.translator.jdbc.db2.DB2SQLTranslator;
 
 import com.metamatrix.cdk.api.TranslationUtility;
 import com.metamatrix.cdk.unittest.FakeTranslationFactory;
@@ -43,12 +41,12 @@
  */
 public class TestDB2SqlTranslator {
 
-    private static DB2SQLTranslator TRANSLATOR; 
+    private static DB2ExecutionFactory TRANSLATOR; 
 
     @BeforeClass
     public static void setUp() throws ConnectorException {
-        TRANSLATOR = new DB2SQLTranslator();        
-        TRANSLATOR.initialize(new JDBCExecutionFactory());
+        TRANSLATOR = new DB2ExecutionFactory();        
+        TRANSLATOR.start();
     }
     
     public String getTestVDB() {

Modified: trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/derby/TestDerbyCapabilities.java
===================================================================
--- trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/derby/TestDerbyCapabilities.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/derby/TestDerbyCapabilities.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -22,24 +22,25 @@
 
 package org.teiid.translator.jdbc.derby;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 
 import org.junit.Test;
-import org.teiid.translator.jdbc.derby.DerbyCapabilities;
 
 public class TestDerbyCapabilities {
 	
 	@Test public void testLimitSupport() {
-		DerbyCapabilities derbyCapabilities = new DerbyCapabilities();
+		DerbyExecutionFactory derbyCapabilities = new DerbyExecutionFactory();
 		assertFalse(derbyCapabilities.supportsRowLimit());
-		derbyCapabilities.setDatabaseVersion(DerbyCapabilities.TEN_5);
+		derbyCapabilities.setDatabaseVersion(DerbyExecutionFactory.TEN_5);
 		assertTrue(derbyCapabilities.supportsRowLimit());
 	}
 	
 	@Test public void testFunctionSupport() {
-		DerbyCapabilities derbyCapabilities = new DerbyCapabilities();
+		DerbyExecutionFactory derbyCapabilities = new DerbyExecutionFactory();
 		assertEquals(27, derbyCapabilities.getSupportedFunctions().size());
-		derbyCapabilities.setDatabaseVersion(DerbyCapabilities.TEN_4);
+		derbyCapabilities.setDatabaseVersion(DerbyExecutionFactory.TEN_4);
 		assertEquals(43, derbyCapabilities.getSupportedFunctions().size());
 	}
 

Modified: trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/derby/TestDerbySQLTranslator.java
===================================================================
--- trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/derby/TestDerbySQLTranslator.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/derby/TestDerbySQLTranslator.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -24,23 +24,20 @@
 
 import org.junit.BeforeClass;
 import org.junit.Test;
-import org.mockito.Mockito;
 import org.teiid.translator.ConnectorException;
-import org.teiid.translator.jdbc.JDBCExecutionFactory;
 import org.teiid.translator.jdbc.TranslationHelper;
-import org.teiid.translator.jdbc.derby.DerbySQLTranslator;
 
 
 /**
  */
 public class TestDerbySQLTranslator {
 
-    private static DerbySQLTranslator TRANSLATOR; 
+    private static DerbyExecutionFactory TRANSLATOR; 
 
     @BeforeClass
     public static void setUp() throws ConnectorException {
-        TRANSLATOR = new DerbySQLTranslator();        
-        TRANSLATOR.initialize(Mockito.mock(JDBCExecutionFactory.class));
+        TRANSLATOR = new DerbyExecutionFactory();        
+        TRANSLATOR.start();
     }
     
     @Test

Modified: trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/h2/TestH2Translator.java
===================================================================
--- trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/h2/TestH2Translator.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/h2/TestH2Translator.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -25,18 +25,16 @@
 import org.junit.BeforeClass;
 import org.junit.Test;
 import org.teiid.translator.ConnectorException;
-import org.teiid.translator.jdbc.JDBCExecutionFactory;
 import org.teiid.translator.jdbc.TranslationHelper;
-import org.teiid.translator.jdbc.h2.H2Translator;
 
 public class TestH2Translator {
 	
-    private static H2Translator TRANSLATOR; 
+    private static H2ExecutionFactory TRANSLATOR; 
 
     @BeforeClass
     public static void setUp() throws ConnectorException {
-        TRANSLATOR = new H2Translator();        
-        TRANSLATOR.initialize(new JDBCExecutionFactory());
+        TRANSLATOR = new H2ExecutionFactory();        
+        TRANSLATOR.start();
     }
 	
 	@Test public void testTimestampDiff() throws Exception {

Modified: trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/mysql/TestMySQL5Translator.java
===================================================================
--- trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/mysql/TestMySQL5Translator.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/mysql/TestMySQL5Translator.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -25,19 +25,17 @@
 import org.junit.BeforeClass;
 import org.junit.Test;
 import org.teiid.translator.ConnectorException;
-import org.teiid.translator.jdbc.JDBCExecutionFactory;
 import org.teiid.translator.jdbc.TranslationHelper;
-import org.teiid.translator.jdbc.mysql.MySQL5Translator;
 
 /**
  */
 public class TestMySQL5Translator {
 
-    private static MySQL5Translator TRANSLATOR; 
+    private static MySQL5ExecutionFactory TRANSLATOR; 
     
     @BeforeClass public static void oneTimeSetup() throws ConnectorException {
-        TRANSLATOR = new MySQL5Translator();        
-        TRANSLATOR.initialize(new JDBCExecutionFactory());
+        TRANSLATOR = new MySQL5ExecutionFactory();        
+        TRANSLATOR.start();
     }
 
     @Test public void testChar() throws Exception {

Modified: trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/mysql/TestMySQLTranslator.java
===================================================================
--- trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/mysql/TestMySQLTranslator.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/mysql/TestMySQLTranslator.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -26,19 +26,17 @@
 import org.junit.Ignore;
 import org.junit.Test;
 import org.teiid.translator.ConnectorException;
-import org.teiid.translator.jdbc.JDBCExecutionFactory;
 import org.teiid.translator.jdbc.TranslationHelper;
-import org.teiid.translator.jdbc.mysql.MySQLTranslator;
 
 /**
  */
 public class TestMySQLTranslator {
 
-    private static MySQLTranslator TRANSLATOR; 
+    private static MySQLExecutionFactory TRANSLATOR; 
     
     @BeforeClass public static void oneTimeSetup() throws ConnectorException {
-        TRANSLATOR = new MySQLTranslator();        
-        TRANSLATOR.initialize(new JDBCExecutionFactory());
+        TRANSLATOR = new MySQLExecutionFactory();        
+        TRANSLATOR.start();
     }
 
     private String getTestVDB() {

Modified: trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/oracle/TestDayWeekQuarterFunctionModifier.java
===================================================================
--- trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/oracle/TestDayWeekQuarterFunctionModifier.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/oracle/TestDayWeekQuarterFunctionModifier.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -32,9 +32,7 @@
 import org.teiid.language.Literal;
 import org.teiid.query.unittest.TimestampUtil;
 import org.teiid.translator.SourceSystemFunctions;
-import org.teiid.translator.jdbc.JDBCExecutionFactory;
 import org.teiid.translator.jdbc.SQLConversionVisitor;
-import org.teiid.translator.jdbc.oracle.OracleSQLTranslator;
 
 
 /**
@@ -56,8 +54,8 @@
             Arrays.asList(c),
             String.class);
         
-        OracleSQLTranslator trans = new OracleSQLTranslator();
-        trans.initialize(new JDBCExecutionFactory());
+        OracleExecutionFactory trans = new OracleExecutionFactory();
+        trans.start();
         
         SQLConversionVisitor sqlVisitor = trans.getSQLConversionVisitor(); 
         sqlVisitor.append(func);  

Modified: trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/oracle/TestLeftOrRightFunctionModifier.java
===================================================================
--- trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/oracle/TestLeftOrRightFunctionModifier.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/oracle/TestLeftOrRightFunctionModifier.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -29,9 +29,7 @@
 import org.teiid.language.Function;
 import org.teiid.language.LanguageFactory;
 import org.teiid.language.Literal;
-import org.teiid.translator.jdbc.JDBCExecutionFactory;
 import org.teiid.translator.jdbc.SQLConversionVisitor;
-import org.teiid.translator.jdbc.oracle.OracleSQLTranslator;
 
 /**
  */
@@ -52,8 +50,8 @@
             Arrays.asList( c, d ),
             String.class);
         
-        OracleSQLTranslator trans = new OracleSQLTranslator();
-        trans.initialize(new JDBCExecutionFactory());
+        OracleExecutionFactory trans = new OracleExecutionFactory();
+        trans.start();
         
         SQLConversionVisitor sqlVisitor = trans.getSQLConversionVisitor(); 
         sqlVisitor.append(func);  

Modified: trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/oracle/TestMonthOrDayNameFunctionModifier.java
===================================================================
--- trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/oracle/TestMonthOrDayNameFunctionModifier.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/oracle/TestMonthOrDayNameFunctionModifier.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -31,9 +31,7 @@
 import org.teiid.language.LanguageFactory;
 import org.teiid.language.Literal;
 import org.teiid.query.unittest.TimestampUtil;
-import org.teiid.translator.jdbc.JDBCExecutionFactory;
 import org.teiid.translator.jdbc.SQLConversionVisitor;
-import org.teiid.translator.jdbc.oracle.OracleSQLTranslator;
 
 
 /**
@@ -55,8 +53,8 @@
             Arrays.asList( c ),
             String.class);
         
-        OracleSQLTranslator trans = new OracleSQLTranslator();
-        trans.initialize(new JDBCExecutionFactory());
+        OracleExecutionFactory trans = new OracleExecutionFactory();
+        trans.start();
         
         SQLConversionVisitor sqlVisitor = trans.getSQLConversionVisitor(); 
         sqlVisitor.append(func);  

Modified: trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/oracle/TestOracleConvertModifier.java
===================================================================
--- trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/oracle/TestOracleConvertModifier.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/oracle/TestOracleConvertModifier.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -36,10 +36,7 @@
 import org.teiid.language.LanguageFactory;
 import org.teiid.query.unittest.TimestampUtil;
 import org.teiid.translator.TypeFacility;
-import org.teiid.translator.jdbc.JDBCExecutionFactory;
 import org.teiid.translator.jdbc.SQLConversionVisitor;
-import org.teiid.translator.jdbc.Translator;
-import org.teiid.translator.jdbc.oracle.OracleSQLTranslator;
 
 
 /**
@@ -48,15 +45,15 @@
 
     private static final LanguageFactory LANG_FACTORY = new LanguageFactory();
     
-    private static Translator TRANSLATOR = new OracleSQLTranslator(); 
+    private static OracleExecutionFactory TRANSLATOR = new OracleExecutionFactory(); 
     
     @BeforeClass public static void oneTimeSetup() throws Exception {
-        TRANSLATOR.initialize(new JDBCExecutionFactory());
+        TRANSLATOR.start();
     }
     
     public String helpGetString(Expression expr) throws Exception {
-        OracleSQLTranslator trans = new OracleSQLTranslator();
-        trans.initialize(new JDBCExecutionFactory());
+        OracleExecutionFactory trans = new OracleExecutionFactory();
+        trans.start();
         
         SQLConversionVisitor sqlVisitor = TRANSLATOR.getSQLConversionVisitor(); 
         sqlVisitor.append(expr);  

Modified: trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/oracle/TestOracleTranslator.java
===================================================================
--- trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/oracle/TestOracleTranslator.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/oracle/TestOracleTranslator.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -45,27 +45,21 @@
 import org.teiid.query.unittest.RealMetadataFactory;
 import org.teiid.translator.ConnectorException;
 import org.teiid.translator.ExecutionContext;
-import org.teiid.translator.jdbc.JDBCExecutionFactory;
 import org.teiid.translator.jdbc.TranslatedCommand;
 import org.teiid.translator.jdbc.TranslationHelper;
-import org.teiid.translator.jdbc.Translator;
-import org.teiid.translator.jdbc.oracle.OracleSQLTranslator;
 
 import com.metamatrix.cdk.api.TranslationUtility;
 
 public class TestOracleTranslator {
 	
-    /**
-     * An instance of {@link Translator} which has already been initialized.  
-     */
-    private Translator TRANSLATOR;
+    private OracleExecutionFactory TRANSLATOR;
     private String UDF = "/OracleSpatialFunctions.xmi"; //$NON-NLS-1$;
     private static ExecutionContext EMPTY_CONTEXT = new FakeExecutionContextImpl();
 
     @Before 
     public void setup() throws Exception {
-        TRANSLATOR = new OracleSQLTranslator();     
-        TRANSLATOR.initialize(new JDBCExecutionFactory());
+        TRANSLATOR = new OracleExecutionFactory();     
+        TRANSLATOR.start();
     }
 
 	private void helpTestVisitor(String input, String expectedOutput) throws ConnectorException {
@@ -522,13 +516,12 @@
     }
     
     private void helpTestVisitor(Command obj, ExecutionContext context, String dbmsTimeZone, String expectedOutput) throws ConnectorException {
-        OracleSQLTranslator translator = new OracleSQLTranslator();
-        JDBCExecutionFactory f = new JDBCExecutionFactory();
+        OracleExecutionFactory translator = new OracleExecutionFactory();
         if (dbmsTimeZone != null) {
-        	f.setDatabaseTimeZone(dbmsTimeZone);
+        	translator.setDatabaseTimeZone(dbmsTimeZone);
         }
         
-        translator.initialize(f);
+        translator.start();
         // Convert back to SQL
         TranslatedCommand tc = new TranslatedCommand(context, translator);
         tc.translateCommand(obj);

Modified: trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/oracle/TestSubstringFunctionModifier.java
===================================================================
--- trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/oracle/TestSubstringFunctionModifier.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/oracle/TestSubstringFunctionModifier.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -30,9 +30,7 @@
 import org.teiid.language.Function;
 import org.teiid.language.LanguageFactory;
 import org.teiid.translator.TypeFacility;
-import org.teiid.translator.jdbc.JDBCExecutionFactory;
 import org.teiid.translator.jdbc.SQLConversionVisitor;
-import org.teiid.translator.jdbc.oracle.OracleSQLTranslator;
 
 /**
  */
@@ -53,8 +51,8 @@
         Function func = LANG_FACTORY.createFunction("substring",  //$NON-NLS-1$
             Arrays.asList(args), TypeFacility.RUNTIME_TYPES.STRING);
         
-        OracleSQLTranslator trans = new OracleSQLTranslator();
-        trans.initialize(new JDBCExecutionFactory());
+        OracleExecutionFactory trans = new OracleExecutionFactory();
+        trans.start();
 
         SQLConversionVisitor sqlVisitor = trans.getSQLConversionVisitor(); 
         sqlVisitor.append(func);  

Modified: trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/postgresql/TestPostgreSQLTranslator.java
===================================================================
--- trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/postgresql/TestPostgreSQLTranslator.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/postgresql/TestPostgreSQLTranslator.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -25,17 +25,15 @@
 import org.junit.BeforeClass;
 import org.junit.Test;
 import org.teiid.translator.ConnectorException;
-import org.teiid.translator.jdbc.JDBCExecutionFactory;
 import org.teiid.translator.jdbc.TranslationHelper;
-import org.teiid.translator.jdbc.postgresql.PostgreSQLTranslator;
 
 public class TestPostgreSQLTranslator {
 
-    private static PostgreSQLTranslator TRANSLATOR; 
+    private static PostgreSQLExecutionFactory TRANSLATOR; 
 
     @BeforeClass public static void setupOnce() throws Exception {
-        TRANSLATOR = new PostgreSQLTranslator();        
-        TRANSLATOR.initialize(new JDBCExecutionFactory());
+        TRANSLATOR = new PostgreSQLExecutionFactory();        
+        TRANSLATOR.start();
     }
     
     public String getTestVDB() {

Modified: trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/sqlserver/TestSqlServerConversionVisitor.java
===================================================================
--- trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/sqlserver/TestSqlServerConversionVisitor.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/sqlserver/TestSqlServerConversionVisitor.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -37,9 +37,7 @@
 import org.teiid.query.metadata.QueryMetadataInterface;
 import org.teiid.query.unittest.RealMetadataFactory;
 import org.teiid.translator.ConnectorException;
-import org.teiid.translator.jdbc.JDBCExecutionFactory;
 import org.teiid.translator.jdbc.TranslationHelper;
-import org.teiid.translator.jdbc.sqlserver.SQLServerSQLTranslator;
 
 import com.metamatrix.cdk.api.TranslationUtility;
 
@@ -47,11 +45,11 @@
  */
 public class TestSqlServerConversionVisitor {
 
-    private static SQLServerSQLTranslator trans = new SQLServerSQLTranslator();
+    private static SQLServerExecutionFactory trans = new SQLServerExecutionFactory();
     
     @BeforeClass
     public static void setup() throws ConnectorException {
-        trans.initialize(new JDBCExecutionFactory());
+        trans.start();
     }
 
     public String getTestVDB() {

Modified: trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/sybase/TestSybaseConvertModifier.java
===================================================================
--- trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/sybase/TestSybaseConvertModifier.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/sybase/TestSybaseConvertModifier.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -37,9 +37,7 @@
 import org.teiid.language.Literal;
 import org.teiid.query.unittest.TimestampUtil;
 import org.teiid.translator.ConnectorException;
-import org.teiid.translator.jdbc.JDBCExecutionFactory;
 import org.teiid.translator.jdbc.SQLConversionVisitor;
-import org.teiid.translator.jdbc.sybase.SybaseSQLTranslator;
 
 
 /**
@@ -47,11 +45,11 @@
 public class TestSybaseConvertModifier {
 
     private static final LanguageFactory LANG_FACTORY = new LanguageFactory();
-    private static SybaseSQLTranslator trans = new SybaseSQLTranslator();
+    private static SybaseExecutionFactory trans = new SybaseExecutionFactory();
     
     @BeforeClass
     public static void setup() throws ConnectorException {
-        trans.initialize(new JDBCExecutionFactory());
+        trans.start();
     }
     
     public String helpGetString(Expression expr) throws Exception {

Modified: trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/sybase/TestSybaseSQLConversionVisitor.java
===================================================================
--- trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/sybase/TestSybaseSQLConversionVisitor.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/sybase/TestSybaseSQLConversionVisitor.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -33,17 +33,17 @@
 import org.teiid.translator.jdbc.JDBCExecutionFactory;
 import org.teiid.translator.jdbc.TranslatedCommand;
 import org.teiid.translator.jdbc.TranslationHelper;
-import org.teiid.translator.jdbc.sybase.SybaseSQLTranslator;
+import org.teiid.translator.jdbc.sybase.SybaseExecutionFactory;
 
 /**
  */
 public class TestSybaseSQLConversionVisitor {
 
-    private static SybaseSQLTranslator trans = new SybaseSQLTranslator();
+    private static SybaseExecutionFactory trans = new SybaseExecutionFactory();
     
     @BeforeClass
     public static void setup() throws ConnectorException {
-        trans.initialize(new JDBCExecutionFactory());
+        trans.start();
     }
 
     public String getTestVDB() {

Deleted: trunk/connectors/translator-ldap/src/main/java/org/teiid/translator/ldap/LDAPConnectorCapabilities.java
===================================================================
--- trunk/connectors/translator-ldap/src/main/java/org/teiid/translator/ldap/LDAPConnectorCapabilities.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-ldap/src/main/java/org/teiid/translator/ldap/LDAPConnectorCapabilities.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -1,82 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership.  Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- * 
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- * 
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-package org.teiid.translator.ldap;
-
-import org.teiid.translator.BasicConnectorCapabilities;
-
-/**
- * This class extends the BasicConnectorCapabilities class, and establishes
- * the capabilities that are supported by the LDAPConnector.  
- */
-public class LDAPConnectorCapabilities extends BasicConnectorCapabilities {
-	
-	@Override
-	public int getMaxInCriteriaSize() {
-		return 1000;
-	}
-	
-    public boolean supportsCompareCriteriaEquals() {
-		return true;
-	}
-
-	public boolean supportsInCriteria() {
-		return true;
-	}
-
-	public boolean supportsLikeCriteria() {
-		return true;
-	}
-
-	public boolean supportsOrCriteria() {
-		return true;
-	}
-
-	public boolean supportsOrderBy() {
-		// Removed this support -- see LDAPSyncQueryExecution comments for details.
-		return false;
-	}
-
-	public boolean supportsRowLimit() {
-		// GHH 20080408 - turned this on, because I fixed issue
-		// in nextBatch that was causing this to fail
-		return true;
-	}
-
-	public boolean supportsRowOffset() {
-		// TODO This might actually be possible in future releases,
-		// when using virtual list views/Sun. note that this requires the ability
-		// to set the count limit, as well as an offset, so setCountLimit::searchControls
-		// won't do it alone.
-		return false;
-	}
-	
-	@Override
-	public boolean supportsCompareCriteriaOrdered() {
-		return true;
-	}
-	
-	@Override
-	public boolean supportsNotCriteria() {
-		return true;
-	}
-
-}

Modified: trunk/connectors/translator-ldap/src/main/java/org/teiid/translator/ldap/LDAPExecutionFactory.java
===================================================================
--- trunk/connectors/translator-ldap/src/main/java/org/teiid/translator/ldap/LDAPExecutionFactory.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-ldap/src/main/java/org/teiid/translator/ldap/LDAPExecutionFactory.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -29,28 +29,24 @@
 import org.teiid.language.QueryExpression;
 import org.teiid.language.Select;
 import org.teiid.metadata.RuntimeMetadata;
-import org.teiid.translator.BasicExecutionFactory;
-import org.teiid.translator.ConnectorCapabilities;
 import org.teiid.translator.ConnectorException;
 import org.teiid.translator.ExecutionContext;
+import org.teiid.translator.ExecutionFactory;
 import org.teiid.translator.ResultSetExecution;
 import org.teiid.translator.TranslatorProperty;
 import org.teiid.translator.UpdateExecution;
 
 
 /** 
- * LDAPConnector.  This is responsible for initializing 
+ * LDAP translator.  This is responsible for initializing 
  * a connection factory, and obtaining connections to LDAP.
  */
-public class LDAPExecutionFactory extends BasicExecutionFactory {
+public class LDAPExecutionFactory extends ExecutionFactory {
 
 	private String searchDefaultBaseDN;
 	private boolean restrictToObjectClass = false;
 	private String searchDefaultScope = "SUBTREE_SCOPE"; //$NON-NLS-1$
 	
-    public Class<? extends ConnectorCapabilities> getDefaultCapabilities() {
-    	return LDAPConnectorCapabilities.class;
-    }	
     	
     @TranslatorProperty(name="SearchDefaultBaseDN", display="Default Search Base DN", description="Default Base DN for LDAP Searches",advanced=true, defaultValue="")
 	public String getSearchDefaultBaseDN() {
@@ -100,4 +96,61 @@
 			throw new ConnectorException(e);
 		}
 	}	
+	
+	@Override
+	public int getMaxInCriteriaSize() {
+		return 1000;
+	}
+	
+	@Override
+    public boolean supportsCompareCriteriaEquals() {
+		return true;
+	}
+
+    @Override
+	public boolean supportsInCriteria() {
+		return true;
+	}
+
+	@Override
+	public boolean supportsLikeCriteria() {
+		return true;
+	}
+
+	@Override
+	public boolean supportsOrCriteria() {
+		return true;
+	}
+
+	@Override
+	public boolean supportsOrderBy() {
+		// Removed this support -- see LDAPSyncQueryExecution comments for details.
+		return false;
+	}
+
+	@Override
+	public boolean supportsRowLimit() {
+		// GHH 20080408 - turned this on, because I fixed issue
+		// in nextBatch that was causing this to fail
+		return true;
+	}
+
+	@Override
+	public boolean supportsRowOffset() {
+		// TODO This might actually be possible in future releases,
+		// when using virtual list views/Sun. note that this requires the ability
+		// to set the count limit, as well as an offset, so setCountLimit::searchControls
+		// won't do it alone.
+		return false;
+	}
+	
+	@Override
+	public boolean supportsCompareCriteriaOrdered() {
+		return true;
+	}
+	
+	@Override
+	public boolean supportsNotCriteria() {
+		return true;
+	}	
 }

Modified: trunk/connectors/translator-ldap/src/main/java/org/teiid/translator/ldap/LDAPSyncQueryExecution.java
===================================================================
--- trunk/connectors/translator-ldap/src/main/java/org/teiid/translator/ldap/LDAPSyncQueryExecution.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-ldap/src/main/java/org/teiid/translator/ldap/LDAPSyncQueryExecution.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -97,7 +97,6 @@
 import org.teiid.logging.LogConstants;
 import org.teiid.logging.LogManager;
 import org.teiid.metadata.Column;
-import org.teiid.translator.BasicExecution;
 import org.teiid.translator.ConnectorException;
 import org.teiid.translator.ResultSetExecution;
 
@@ -107,7 +106,7 @@
  * LDAPSyncQueryExecution is responsible for executing an LDAP search 
  * corresponding to a read-only "select" query from MetaMatrix.
  */
-public class LDAPSyncQueryExecution extends BasicExecution implements ResultSetExecution {
+public class LDAPSyncQueryExecution implements ResultSetExecution {
 
 	private LDAPSearchDetails searchDetails;
 	private LdapContext ldapConnection;

Modified: trunk/connectors/translator-ldap/src/main/java/org/teiid/translator/ldap/LDAPUpdateExecution.java
===================================================================
--- trunk/connectors/translator-ldap/src/main/java/org/teiid/translator/ldap/LDAPUpdateExecution.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-ldap/src/main/java/org/teiid/translator/ldap/LDAPUpdateExecution.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -47,7 +47,6 @@
 import org.teiid.logging.LogConstants;
 import org.teiid.logging.LogManager;
 import org.teiid.metadata.AbstractMetadataRecord;
-import org.teiid.translator.BasicExecution;
 import org.teiid.translator.ConnectorException;
 import org.teiid.translator.DataNotAvailableException;
 import org.teiid.translator.UpdateExecution;
@@ -69,7 +68,7 @@
  * item in the WHERE clause for UPDATE and DELETE operations, and in the list
  * of attributes to assign values in an INSERT operation * Responsible for update/insert/delete operations against LDAP
  */
-public class LDAPUpdateExecution extends BasicExecution implements UpdateExecution {
+public class LDAPUpdateExecution implements UpdateExecution {
 	private LdapContext ldapConnection;
 	private LdapContext ldapCtx;
 	private Command command;

Modified: trunk/connectors/translator-ldap/src/main/resources/META-INF/jboss-beans.xml
===================================================================
--- trunk/connectors/translator-ldap/src/main/resources/META-INF/jboss-beans.xml	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-ldap/src/main/resources/META-INF/jboss-beans.xml	2010-05-13 13:40:34 UTC (rev 2122)
@@ -10,7 +10,7 @@
       <constructor factoryMethod="createTemplateInfo">
          <factory bean="TranslatorDeploymentTemplateInfoFactory"/>
          <parameter class="java.lang.Class">org.teiid.templates.TranslatorTemplateInfo</parameter>
-         <parameter class="java.lang.Class">org.teiid.resource.adapter.ldap.LDAPExecutionFactory</parameter>
+         <parameter class="java.lang.Class">org.teiid.translator.ldap.LDAPExecutionFactory</parameter>
          <parameter class="java.lang.String">${project.artifactId}-${project.version}</parameter>
          <parameter class="java.lang.String">${project.description}</parameter>         
       </constructor>

Deleted: trunk/connectors/translator-loopback/src/main/java/org/teiid/translator/loopback/LoopbackCapabilities.java
===================================================================
--- trunk/connectors/translator-loopback/src/main/java/org/teiid/translator/loopback/LoopbackCapabilities.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-loopback/src/main/java/org/teiid/translator/loopback/LoopbackCapabilities.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -1,317 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership.  Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- * 
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- * 
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package org.teiid.translator.loopback;
-
-import java.util.Arrays;
-import java.util.List;
-
-import org.teiid.translator.BasicConnectorCapabilities;
-
-
-/**
- * Specifies the capabilities of this connector.  Since we want this 
- * connector to be able to emulate most other connectors, these 
- * capabilities support everything.
- */
-public class LoopbackCapabilities extends BasicConnectorCapabilities {
-
-    /**
-     * Construct the capabilities class 
-     */
-    public LoopbackCapabilities() {
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#getSupportedFunctions()
-     */
-    public List getSupportedFunctions() {
-        List functions = Arrays.asList(new String[] {
-            "+", "-", "*", "/", "abs", "acos", "asin", "atan", "atan2", "ceiling", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
-            "bitand", "bitnot", "bitor", "bitxor", "cos", "cot", "degrees", "cos", "cot", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
-            "degrees", "exp", "floor", "log", "log10", "mod", "pi", "power", "radians",  //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
-            "round", "sign", "sin", "sqrt", "tan",  //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
-            "ascii", "chr", "char", "concat", "initcap", "insert", "lcase", "left", "length", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
-            "locate", "lower", "lpad", "ltrim", "repeat", "replace", "right", "rpad", "rtrim", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
-            "substring", "translate", "ucase", "upper",  //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-            "curdate", "curtime", "now", "dayname", "dayofmonth", "dayofweek", "dayofyear",  //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$
-            "hour", "minute", "month", "monthname", "quarter", "second", "timestampadd",  //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$
-            "timestampdiff", "week", "year", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-            "cast", "convert", "ifnull", "nvl"  //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-        });
-        return functions;
-    }
-    
-    @Override
-    public boolean supportsGroupBy() {
-    	return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsAggregatesAvg()
-     */
-    public boolean supportsAggregatesAvg() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsAggregatesCount()
-     */
-    public boolean supportsAggregatesCount() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsAggregatesCountStar()
-     */
-    public boolean supportsAggregatesCountStar() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsAggregatesDistinct()
-     */
-    public boolean supportsAggregatesDistinct() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsAggregatesMax()
-     */
-    public boolean supportsAggregatesMax() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsAggregatesMin()
-     */
-    public boolean supportsAggregatesMin() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsAggregatesSum()
-     */
-    public boolean supportsAggregatesSum() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsAliasedGroup()
-     */
-    public boolean supportsAliasedGroup() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsBetweenCriteria()
-     */
-    public boolean supportsBetweenCriteria() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsCaseExpressions()
-     */
-    public boolean supportsCaseExpressions() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsCompareCriteriaEquals()
-     */
-    public boolean supportsCompareCriteriaEquals() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsCorrelatedSubqueries()
-     */
-    public boolean supportsCorrelatedSubqueries() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsExistsCriteria()
-     */
-    public boolean supportsExistsCriteria() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsFullOuterJoins()
-     */
-    public boolean supportsFullOuterJoins() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsInCriteria()
-     */
-    public boolean supportsInCriteria() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsInCriteriaSubquery()
-     */
-    public boolean supportsInCriteriaSubquery() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsIsNullCriteria()
-     */
-    public boolean supportsIsNullCriteria() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsLikeCriteria()
-     */
-    public boolean supportsLikeCriteria() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsLikeCriteriaEscapeCharacter()
-     */
-    public boolean supportsLikeCriteriaEscapeCharacter() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsNotCriteria()
-     */
-    public boolean supportsNotCriteria() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsOrCriteria()
-     */
-    public boolean supportsOrCriteria() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsOrderBy()
-     */
-    public boolean supportsOrderBy() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsOuterJoins()
-     */
-    public boolean supportsOuterJoins() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsQuantifiedCompareCriteriaAll()
-     */
-    public boolean supportsQuantifiedCompareCriteriaAll() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsScalarSubqueries()
-     */
-    public boolean supportsScalarSubqueries() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsSearchedCaseExpressions()
-     */
-    public boolean supportsSearchedCaseExpressions() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsSelectDistinct()
-     */
-    public boolean supportsSelectDistinct() {
-        return true;
-    }
-
-    /* 
-     * @see com.metamatrix.data.ConnectorCapabilities#supportsSelfJoins()
-     */
-    public boolean supportsSelfJoins() {
-        return true;
-    }
-
-    public boolean supportsInlineViews() {
-        return true;
-    }
-        
-    public boolean supportsQuantifiedCompareCriteriaSome() {
-        return true;
-    }
-
-    public boolean supportsRowLimit() {
-        return true;
-    }
-    
-    @Override
-    public boolean supportsSelectExpression() {
-    	return true;
-    }
-        
-    @Override
-    public boolean supportsSetQueryOrderBy() {
-    	return true;
-    }
-    
-    @Override
-    public boolean supportsUnions() {
-    	return true;
-    }
-    
-    @Override
-    public boolean supportsCompareCriteriaOrdered() {
-    	return true;
-    }
-    
-    @Override
-    public boolean supportsInnerJoins() {
-    	return true;
-    }
-    
-    @Override
-    public boolean supportsExcept() {
-    	return true;
-    }
-    
-    @Override
-    public boolean supportsHaving() {
-    	return true;
-    }
-    
-    @Override
-    public boolean supportsIntersect() {
-    	return true;
-    }
-    
-}

Modified: trunk/connectors/translator-loopback/src/main/java/org/teiid/translator/loopback/LoopbackExecution.java
===================================================================
--- trunk/connectors/translator-loopback/src/main/java/org/teiid/translator/loopback/LoopbackExecution.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-loopback/src/main/java/org/teiid/translator/loopback/LoopbackExecution.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -40,8 +40,6 @@
 import org.teiid.language.Argument.Direction;
 import org.teiid.logging.LogConstants;
 import org.teiid.logging.LogManager;
-import org.teiid.metadata.RuntimeMetadata;
-import org.teiid.translator.BasicExecution;
 import org.teiid.translator.ConnectorException;
 import org.teiid.translator.DataNotAvailableException;
 import org.teiid.translator.ProcedureExecution;
@@ -52,7 +50,7 @@
 /**
  * Represents the execution of a command.
  */
-public class LoopbackExecution extends BasicExecution implements UpdateExecution, ProcedureExecution {
+public class LoopbackExecution implements UpdateExecution, ProcedureExecution {
 
     private static final String ALPHA = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; //$NON-NLS-1$
 

Modified: trunk/connectors/translator-loopback/src/main/java/org/teiid/translator/loopback/LoopbackExecutionFactory.java
===================================================================
--- trunk/connectors/translator-loopback/src/main/java/org/teiid/translator/loopback/LoopbackExecutionFactory.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-loopback/src/main/java/org/teiid/translator/loopback/LoopbackExecutionFactory.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -22,19 +22,21 @@
 
 package org.teiid.translator.loopback;
 
+import java.util.Arrays;
+import java.util.List;
+
 import org.teiid.language.Command;
 import org.teiid.metadata.RuntimeMetadata;
-import org.teiid.translator.BasicExecutionFactory;
-import org.teiid.translator.ConnectorCapabilities;
 import org.teiid.translator.ConnectorException;
 import org.teiid.translator.Execution;
 import org.teiid.translator.ExecutionContext;
+import org.teiid.translator.ExecutionFactory;
 import org.teiid.translator.TranslatorProperty;
 
 /**
- * Loopback connector.
+ * Loopback translator.
  */
-public class LoopbackExecutionFactory extends BasicExecutionFactory {
+public class LoopbackExecutionFactory extends ExecutionFactory {
 
 	private int waitTime = 0;
 	private int rowCount = 1;
@@ -83,11 +85,6 @@
 	}
 
     @Override
-    public Class<? extends ConnectorCapabilities> getDefaultCapabilities() {
-    	return LoopbackCapabilities.class;
-    }
-    
-    @Override
     public Execution createExecution(Command command, ExecutionContext executionContext, RuntimeMetadata metadata, Object connectionfactory)
     		throws ConnectorException {
         return new LoopbackExecution(command, this);
@@ -97,4 +94,220 @@
 	public boolean isSourceRequired() {
 		return false;
 	}    
+	
+	@Override
+    public List getSupportedFunctions() {
+        List functions = Arrays.asList(new String[] {
+            "+", "-", "*", "/", "abs", "acos", "asin", "atan", "atan2", "ceiling", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
+            "bitand", "bitnot", "bitor", "bitxor", "cos", "cot", "degrees", "cos", "cot", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
+            "degrees", "exp", "floor", "log", "log10", "mod", "pi", "power", "radians",  //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
+            "round", "sign", "sin", "sqrt", "tan",  //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+            "ascii", "chr", "char", "concat", "initcap", "insert", "lcase", "left", "length", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
+            "locate", "lower", "lpad", "ltrim", "repeat", "replace", "right", "rpad", "rtrim", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
+            "substring", "translate", "ucase", "upper",  //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+            "curdate", "curtime", "now", "dayname", "dayofmonth", "dayofweek", "dayofyear",  //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$
+            "hour", "minute", "month", "monthname", "quarter", "second", "timestampadd",  //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$
+            "timestampdiff", "week", "year", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+            "cast", "convert", "ifnull", "nvl"  //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+        });
+        return functions;
+    }
+    
+    @Override
+    public boolean supportsGroupBy() {
+    	return true;
+    }
+
+    @Override
+    public boolean supportsAggregatesAvg() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsAggregatesCount() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsAggregatesCountStar() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsAggregatesDistinct() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsAggregatesMax() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsAggregatesMin() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsAggregatesSum() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsAliasedGroup() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsBetweenCriteria() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsCaseExpressions() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsCompareCriteriaEquals() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsCorrelatedSubqueries() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsExistsCriteria() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsFullOuterJoins() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsInCriteria() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsInCriteriaSubquery() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsIsNullCriteria() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsLikeCriteria() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsLikeCriteriaEscapeCharacter() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsNotCriteria() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsOrCriteria() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsOrderBy() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsOuterJoins() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsQuantifiedCompareCriteriaAll() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsScalarSubqueries() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsSearchedCaseExpressions() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsSelectDistinct() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsSelfJoins() {
+        return true;
+    }
+    @Override
+    public boolean supportsInlineViews() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsQuantifiedCompareCriteriaSome() {
+        return true;
+    }
+    @Override
+    public boolean supportsRowLimit() {
+        return true;
+    }
+    
+    @Override
+    public boolean supportsSelectExpression() {
+    	return true;
+    }
+        
+    @Override
+    public boolean supportsSetQueryOrderBy() {
+    	return true;
+    }
+    
+    @Override
+    public boolean supportsUnions() {
+    	return true;
+    }
+    
+    @Override
+    public boolean supportsCompareCriteriaOrdered() {
+    	return true;
+    }
+    
+    @Override
+    public boolean supportsInnerJoins() {
+    	return true;
+    }
+    
+    @Override
+    public boolean supportsExcept() {
+    	return true;
+    }
+    
+    @Override
+    public boolean supportsHaving() {
+    	return true;
+    }
+    
+    @Override
+    public boolean supportsIntersect() {
+    	return true;
+    }	
 }

Modified: trunk/connectors/translator-loopback/src/main/resources/META-INF/jboss-beans.xml
===================================================================
--- trunk/connectors/translator-loopback/src/main/resources/META-INF/jboss-beans.xml	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-loopback/src/main/resources/META-INF/jboss-beans.xml	2010-05-13 13:40:34 UTC (rev 2122)
@@ -10,7 +10,7 @@
       <constructor factoryMethod="createTemplateInfo">
          <factory bean="TranslatorDeploymentTemplateInfoFactory"/>
          <parameter class="java.lang.Class">org.teiid.templates.TranslatorTemplateInfo</parameter>
-         <parameter class="java.lang.Class">org.teiid.resource.adapter.loopback.LoopbackExecutionFactory</parameter>
+         <parameter class="java.lang.Class">org.teiid.translator.loopback.LoopbackExecutionFactory</parameter>
          <parameter class="java.lang.String">${project.artifactId}-${project.version}</parameter>
          <parameter class="java.lang.String">${project.description}</parameter>         
       </constructor>

Modified: trunk/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/SalesForceExecutionFactory.java
===================================================================
--- trunk/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/SalesForceExecutionFactory.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/SalesForceExecutionFactory.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -22,6 +22,9 @@
 
 package org.teiid.translator.salesforce;
 
+import java.util.ArrayList;
+import java.util.List;
+
 import org.teiid.language.Call;
 import org.teiid.language.Command;
 import org.teiid.language.QueryExpression;
@@ -29,9 +32,9 @@
 import org.teiid.logging.LogManager;
 import org.teiid.metadata.MetadataFactory;
 import org.teiid.metadata.RuntimeMetadata;
-import org.teiid.translator.ConnectorCapabilities;
 import org.teiid.translator.ConnectorException;
 import org.teiid.translator.ExecutionContext;
+import org.teiid.translator.ExecutionFactory;
 import org.teiid.translator.MetadataProvider;
 import org.teiid.translator.ProcedureExecution;
 import org.teiid.translator.ResultSetExecution;
@@ -44,7 +47,7 @@
 import org.teiid.translator.salesforce.execution.UpdateExecutionImpl;
 
 
-public class SalesForceExecutionFactory extends org.teiid.translator.BasicExecutionFactory implements MetadataProvider {
+public class SalesForceExecutionFactory extends ExecutionFactory implements MetadataProvider {
 
 	private String connectorStateClass;
 	private boolean auditModelFields = false;	
@@ -74,11 +77,6 @@
 
 
 	@Override
-    public Class<? extends ConnectorCapabilities> getDefaultCapabilities() {
-    	return SalesforceCapabilities.class;
-    }	
-	
-	@Override
 	public ResultSetExecution createResultSetExecution(QueryExpression command, ExecutionContext executionContext, RuntimeMetadata metadata, Object connectionFactory)
 			throws ConnectorException {
 		return new QueryExecutionImpl(command, (SalesforceConnection)connectionFactory, metadata, executionContext);
@@ -108,4 +106,74 @@
 		MetadataProcessor processor = new MetadataProcessor((SalesforceConnection)connectionFactory,metadataFactory, this);
 		processor.processMetadata();
 	}	
+	
+	@Override
+    public int getMaxInCriteriaSize() {
+        return 700;
+    }
+
+    @Override
+    public List getSupportedFunctions() {
+        List<String> supportedFunctions = new ArrayList<String>();
+        supportedFunctions.add("includes"); //$NON-NLS-1$
+        supportedFunctions.add("excludes"); //$NON-NLS-1$
+        return supportedFunctions;
+    }
+
+    @Override
+    public boolean supportsCompareCriteriaEquals() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsInCriteria() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsLikeCriteria() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsRowLimit() {
+        return true;
+    }
+
+    // http://jira.jboss.org/jira/browse/JBEDSP-306
+    // Salesforce supports ORDER BY, but not on all column types
+    @Override
+    public boolean supportsOrderBy() {
+        return false;
+    }
+
+    @Override
+    public boolean supportsAggregatesCountStar() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsNotCriteria() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsOrCriteria() {
+        return true;
+    }
+
+    @Override
+    public boolean supportsCompareCriteriaOrdered() {
+        return true;
+    }
+
+	@Override
+	public SupportedJoinCriteria getSupportedJoinCriteria() {
+		return SupportedJoinCriteria.KEY;
+	}
+
+	@Override
+	public boolean supportsOuterJoins() {
+		return true;
+	}	
 }

Deleted: trunk/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/SalesforceCapabilities.java
===================================================================
--- trunk/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/SalesforceCapabilities.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/SalesforceCapabilities.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -1,96 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership.  Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- * 
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- * 
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-package org.teiid.translator.salesforce;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.teiid.translator.BasicConnectorCapabilities;
-
-public class SalesforceCapabilities extends BasicConnectorCapabilities {
-
-    public int getMaxInCriteriaSize() {
-        return 700;
-    }
-
-    public List getSupportedFunctions() {
-        List<String> supportedFunctions = new ArrayList<String>();
-        supportedFunctions.add("includes");
-        supportedFunctions.add("excludes");
-        return supportedFunctions;
-    }
-
-    public boolean supportsCompareCriteriaEquals() {
-        return true;
-    }
-
-    public boolean supportsInCriteria() {
-        return true;
-    }
-
-    public boolean supportsLikeCriteria() {
-        return true;
-    }
-
-    public boolean supportsRowLimit() {
-        return true;
-    }
-
-    // http://jira.jboss.org/jira/browse/JBEDSP-306
-    // Salesforce supports ORDER BY, but not on all column types
-    public boolean supportsOrderBy() {
-        return false;
-    }
-
-    @Override
-    public boolean supportsAggregatesCountStar() {
-        return true;
-    }
-
-    @Override
-    public boolean supportsNotCriteria() {
-        return true;
-    }
-
-    @Override
-    public boolean supportsOrCriteria() {
-        return true;
-    }
-
-    @Override
-    public boolean supportsCompareCriteriaOrdered() {
-        return true;
-    }
-
-	@Override
-	public SupportedJoinCriteria getSupportedJoinCriteria() {
-		return SupportedJoinCriteria.KEY;
-	}
-
-	@Override
-	public boolean supportsOuterJoins() {
-		return true;
-	}
-    
-    
-
-}

Modified: trunk/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/execution/AbstractUpdateExecution.java
===================================================================
--- trunk/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/execution/AbstractUpdateExecution.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/execution/AbstractUpdateExecution.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -27,7 +27,6 @@
 import org.teiid.language.Comparison;
 import org.teiid.language.Condition;
 import org.teiid.metadata.RuntimeMetadata;
-import org.teiid.translator.BasicExecution;
 import org.teiid.translator.ConnectorException;
 import org.teiid.translator.DataNotAvailableException;
 import org.teiid.translator.ExecutionContext;
@@ -46,7 +45,7 @@
  * get IDs of Salesforce objects.
  *
  */
-public abstract class AbstractUpdateExecution extends BasicExecution implements UpdateExecution {
+public abstract class AbstractUpdateExecution implements UpdateExecution {
 
 	protected SalesforceConnection connection;
 	protected RuntimeMetadata metadata;

Modified: trunk/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/execution/QueryExecutionImpl.java
===================================================================
--- trunk/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/execution/QueryExecutionImpl.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/execution/QueryExecutionImpl.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -44,7 +44,6 @@
 import org.teiid.metadata.Column;
 import org.teiid.metadata.RuntimeMetadata;
 import org.teiid.metadata.Table;
-import org.teiid.translator.BasicExecution;
 import org.teiid.translator.ConnectorException;
 import org.teiid.translator.DataNotAvailableException;
 import org.teiid.translator.ExecutionContext;
@@ -59,7 +58,7 @@
 import com.sforce.soap.partner.QueryResult;
 import com.sforce.soap.partner.sobject.SObject;
 
-public class QueryExecutionImpl extends BasicExecution implements ResultSetExecution {
+public class QueryExecutionImpl implements ResultSetExecution {
 
 	private SalesforceConnection connection;
 

Modified: trunk/connectors/translator-salesforce/src/main/resources/META-INF/jboss-beans.xml
===================================================================
--- trunk/connectors/translator-salesforce/src/main/resources/META-INF/jboss-beans.xml	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-salesforce/src/main/resources/META-INF/jboss-beans.xml	2010-05-13 13:40:34 UTC (rev 2122)
@@ -10,7 +10,7 @@
       <constructor factoryMethod="createTemplateInfo">
          <factory bean="TranslatorDeploymentTemplateInfoFactory"/>
          <parameter class="java.lang.Class">org.teiid.templates.TranslatorTemplateInfo</parameter>
-         <parameter class="java.lang.Class">org.teiid.resource.adapter.salesforce.SalesForceExecutionFactory</parameter>
+         <parameter class="java.lang.Class">org.teiid.translator.salesforce.SalesForceExecutionFactory</parameter>
          <parameter class="java.lang.String">${project.artifactId}-${project.version}</parameter>
          <parameter class="java.lang.String">${project.description}</parameter>         
       </constructor>

Deleted: trunk/connectors/translator-text/src/main/java/org/teiid/translator/text/TextCapabilities.java
===================================================================
--- trunk/connectors/translator-text/src/main/java/org/teiid/translator/text/TextCapabilities.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-text/src/main/java/org/teiid/translator/text/TextCapabilities.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -1,31 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership.  Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- * 
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- * 
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package org.teiid.translator.text;
-
-import org.teiid.translator.BasicConnectorCapabilities;
-
-public class TextCapabilities extends BasicConnectorCapabilities {
-
-	static TextCapabilities INSTANCE = new TextCapabilities();
-	
-}

Modified: trunk/connectors/translator-text/src/main/java/org/teiid/translator/text/TextExecutionFactory.java
===================================================================
--- trunk/connectors/translator-text/src/main/java/org/teiid/translator/text/TextExecutionFactory.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-text/src/main/java/org/teiid/translator/text/TextExecutionFactory.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -45,9 +45,9 @@
 import org.teiid.metadata.MetadataFactory;
 import org.teiid.metadata.RuntimeMetadata;
 import org.teiid.metadata.Table;
-import org.teiid.translator.BasicExecutionFactory;
 import org.teiid.translator.ConnectorException;
 import org.teiid.translator.ExecutionContext;
+import org.teiid.translator.ExecutionFactory;
 import org.teiid.translator.FileConnection;
 import org.teiid.translator.MetadataProvider;
 import org.teiid.translator.ResultSetExecution;
@@ -58,7 +58,7 @@
 /**
  * Implementation of text connector.
  */
-public class TextExecutionFactory extends BasicExecutionFactory implements MetadataProvider{
+public class TextExecutionFactory extends ExecutionFactory implements MetadataProvider{
 
 	private boolean enforceColumnCount = false;
 	private String dateResultFormatsDelimiter;

Modified: trunk/connectors/translator-text/src/main/java/org/teiid/translator/text/TextSynchExecution.java
===================================================================
--- trunk/connectors/translator-text/src/main/java/org/teiid/translator/text/TextSynchExecution.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-text/src/main/java/org/teiid/translator/text/TextSynchExecution.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -39,7 +39,6 @@
 import org.teiid.logging.LogConstants;
 import org.teiid.logging.LogManager;
 import org.teiid.metadata.Column;
-import org.teiid.translator.BasicExecution;
 import org.teiid.translator.ConnectorException;
 import org.teiid.translator.DataNotAvailableException;
 import org.teiid.translator.ResultSetExecution;
@@ -49,7 +48,7 @@
  * The essential part that executes the query. It keeps all the execution
  * states.
  */
-public class TextSynchExecution extends BasicExecution implements ResultSetExecution {
+public class TextSynchExecution implements ResultSetExecution {
     // Command to be executed
     private Select cmd;
 

Modified: trunk/connectors/translator-text/src/main/resources/META-INF/jboss-beans.xml
===================================================================
--- trunk/connectors/translator-text/src/main/resources/META-INF/jboss-beans.xml	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/connectors/translator-text/src/main/resources/META-INF/jboss-beans.xml	2010-05-13 13:40:34 UTC (rev 2122)
@@ -10,7 +10,7 @@
       <constructor factoryMethod="createTemplateInfo">
          <factory bean="TranslatorDeploymentTemplateInfoFactory"/>
          <parameter class="java.lang.Class">org.teiid.templates.TranslatorTemplateInfo</parameter>
-         <parameter class="java.lang.Class">org.teiid.resource.adapter.text.TextExecutionFactory</parameter>
+         <parameter class="java.lang.Class">org.teiid.translator.text.TextExecutionFactory</parameter>
          <parameter class="java.lang.String">${project.artifactId}-${project.version}</parameter>
          <parameter class="java.lang.String">${project.description}</parameter>         
       </constructor>

Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorManager.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorManager.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorManager.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -144,9 +144,8 @@
     	}
 
     	checkStatus();
-    	ExecutionFactory connector = getExecutionFactory();
-    	ConnectorCapabilities caps = connector.getCapabilities();
-        BasicSourceCapabilities resultCaps = CapabilitiesConverter.convertCapabilities(caps, this.connectorId, connector.isXaCapable());
+    	ExecutionFactory translator = getExecutionFactory();
+        BasicSourceCapabilities resultCaps = CapabilitiesConverter.convertCapabilities(translator, this.connectorId, translator.isXaCapable());
     	resultCaps.setScope(Scope.SCOPE_GLOBAL);
     	cachedCapabilities = resultCaps;
         return resultCaps;

Modified: trunk/engine/src/test/java/org/teiid/dqp/internal/datamgr/impl/FakeConnector.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/dqp/internal/datamgr/impl/FakeConnector.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/engine/src/test/java/org/teiid/dqp/internal/datamgr/impl/FakeConnector.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -30,18 +30,15 @@
 import org.teiid.language.Command;
 import org.teiid.language.QueryExpression;
 import org.teiid.metadata.RuntimeMetadata;
-import org.teiid.translator.BasicConnectorCapabilities;
-import org.teiid.translator.BasicExecution;
-import org.teiid.translator.BasicExecutionFactory;
-import org.teiid.translator.ConnectorCapabilities;
 import org.teiid.translator.ConnectorException;
 import org.teiid.translator.DataNotAvailableException;
 import org.teiid.translator.Execution;
 import org.teiid.translator.ExecutionContext;
+import org.teiid.translator.ExecutionFactory;
 import org.teiid.translator.ResultSetExecution;
 import org.teiid.translator.UpdateExecution;
 
-public class FakeConnector extends BasicExecutionFactory {
+public class FakeConnector extends ExecutionFactory {
 	private static final int RESULT_SIZE = 5;
 	
 	private boolean executeBlocks;
@@ -67,9 +64,6 @@
     	executionCount++;
         return new FakeBlockingExecution(executionContext);
     }
-    public ConnectorCapabilities getCapabilities() {
-    	return new BasicConnectorCapabilities();
-    }    
     
     public Object getConnection() {
         return new FakeConnection();
@@ -87,7 +81,7 @@
         }
     }   
     
-    private final class FakeBlockingExecution extends BasicExecution implements ResultSetExecution, UpdateExecution {
+    private final class FakeBlockingExecution implements ResultSetExecution, UpdateExecution {
         private boolean closed = false;
         private boolean cancelled = false;
         private int rowCount;

Modified: trunk/engine/src/test/java/org/teiid/dqp/internal/datamgr/impl/FakeProcedureExecution.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/dqp/internal/datamgr/impl/FakeProcedureExecution.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/engine/src/test/java/org/teiid/dqp/internal/datamgr/impl/FakeProcedureExecution.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -26,13 +26,12 @@
 import java.util.Arrays;
 import java.util.List;
 
-import org.teiid.translator.BasicExecution;
 import org.teiid.translator.ConnectorException;
 import org.teiid.translator.DataNotAvailableException;
 import org.teiid.translator.ProcedureExecution;
 
 
-final class FakeProcedureExecution extends BasicExecution implements ProcedureExecution {
+final class FakeProcedureExecution implements ProcedureExecution {
 
     int resultSetSize;
     int rowNum;

Modified: trunk/runtime/src/test/java/org/teiid/deployers/TestTranslatorDeployer.java
===================================================================
--- trunk/runtime/src/test/java/org/teiid/deployers/TestTranslatorDeployer.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/runtime/src/test/java/org/teiid/deployers/TestTranslatorDeployer.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -21,11 +21,11 @@
  */
 package org.teiid.deployers;
 
-import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.*;
 
 import org.junit.Test;
 import org.teiid.adminapi.impl.TranslatorMetaData;
-import org.teiid.translator.BasicExecutionFactory;
+import org.teiid.translator.ExecutionFactory;
 import org.teiid.translator.TranslatorProperty;
 
 @SuppressWarnings("nls")
@@ -35,18 +35,17 @@
 	public void testBuildExecutionFactory() throws Exception {
 		TranslatorMetaData tm = new TranslatorMetaData();
 		
-		tm.setCapabilitiesClass("capabilities");
 		tm.setXaCapable(true);
 		tm.addProperty("my-property", "correctly-assigned");
 		
 		TranslatorDeployer td = new TranslatorDeployer();
 		MyTranslator my = (MyTranslator)td.buildTranslator(MyTranslator.class.getName(), tm);
 		
-		assertEquals("capabilities", my.getCapabilitiesClass());
+		assertTrue(my.isXaCapable());
 		assertEquals("correctly-assigned", my.getMyProperty());
 	}
 	
-	public static class MyTranslator extends BasicExecutionFactory {
+	public static class MyTranslator extends ExecutionFactory {
 		String mine;
 		
 		@TranslatorProperty(name="my-property")

Modified: trunk/test-integration/common/src/test/java/org/teiid/connector/metadata/runtime/MockConnector.java
===================================================================
--- trunk/test-integration/common/src/test/java/org/teiid/connector/metadata/runtime/MockConnector.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/test-integration/common/src/test/java/org/teiid/connector/metadata/runtime/MockConnector.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -15,23 +15,16 @@
 import org.teiid.metadata.RuntimeMetadata;
 import org.teiid.metadata.BaseColumn.NullType;
 import org.teiid.metadata.Column.SearchType;
-import org.teiid.translator.BasicConnectorCapabilities;
-import org.teiid.translator.BasicExecutionFactory;
-import org.teiid.translator.ConnectorCapabilities;
 import org.teiid.translator.ConnectorException;
 import org.teiid.translator.ExecutionContext;
+import org.teiid.translator.ExecutionFactory;
 import org.teiid.translator.ProcedureExecution;
 import org.teiid.translator.ResultSetExecution;
 
 
-public class MockConnector extends BasicExecutionFactory {
+public class MockConnector extends ExecutionFactory {
 	
-	@Override
-	public ConnectorCapabilities getCapabilities() {
-		return new BasicConnectorCapabilities();
-	}
 	
-	
 	@Override
 	public ProcedureExecution createProcedureExecution(
 			Call procedure, ExecutionContext executionContext,

Modified: trunk/test-integration/common/src/test/java/org/teiid/dqp/internal/process/TestTPCR.java
===================================================================
--- trunk/test-integration/common/src/test/java/org/teiid/dqp/internal/process/TestTPCR.java	2010-05-12 22:19:30 UTC (rev 2121)
+++ trunk/test-integration/common/src/test/java/org/teiid/dqp/internal/process/TestTPCR.java	2010-05-13 13:40:34 UTC (rev 2122)
@@ -34,8 +34,8 @@
 import org.teiid.query.processor.HardcodedDataManager;
 import org.teiid.query.processor.ProcessorPlan;
 import org.teiid.query.unittest.TimestampUtil;
-import org.teiid.translator.jdbc.oracle.OracleCapabilities;
-import org.teiid.translator.jdbc.sqlserver.SQLServerCapabilities;
+import org.teiid.translator.jdbc.oracle.OracleExecutionFactory;
+import org.teiid.translator.jdbc.sqlserver.SQLServerExecutionFactory;
 
 
 
@@ -54,7 +54,7 @@
      */
     public void testQuery3() throws Exception{
         FakeCapabilitiesFinder finder = new FakeCapabilitiesFinder();
-        finder.addCapabilities("TPCR_Oracle_9i", CapabilitiesConverter.convertCapabilities(new OracleCapabilities())); //$NON-NLS-1$
+        finder.addCapabilities("TPCR_Oracle_9i", CapabilitiesConverter.convertCapabilities(new OracleExecutionFactory())); //$NON-NLS-1$
         
         HardcodedDataManager dataMgr = new HardcodedDataManager();
     
@@ -80,7 +80,7 @@
     
     public void testQueryCase3042() throws Exception{
         FakeCapabilitiesFinder finder = new FakeCapabilitiesFinder();
-        finder.addCapabilities("TPCR_Ora", CapabilitiesConverter.convertCapabilities(new OracleCapabilities())); //$NON-NLS-1$
+        finder.addCapabilities("TPCR_Ora", CapabilitiesConverter.convertCapabilities(new OracleExecutionFactory())); //$NON-NLS-1$
         
         HardcodedDataManager dataMgr = new HardcodedDataManager();
         List[] expected =
@@ -112,8 +112,8 @@
      */
     public void testQueryCase3047() throws Exception{
         FakeCapabilitiesFinder finder = new FakeCapabilitiesFinder();
-        finder.addCapabilities("TPCR_Ora", CapabilitiesConverter.convertCapabilities(new OracleCapabilities())); //$NON-NLS-1$
-        finder.addCapabilities("TPCR_SQLS", CapabilitiesConverter.convertCapabilities(new SQLServerCapabilities())); //$NON-NLS-1$
+        finder.addCapabilities("TPCR_Ora", CapabilitiesConverter.convertCapabilities(new OracleExecutionFactory())); //$NON-NLS-1$
+        finder.addCapabilities("TPCR_SQLS", CapabilitiesConverter.convertCapabilities(new SQLServerExecutionFactory())); //$NON-NLS-1$
         
         HardcodedDataManager dataMgr = new HardcodedDataManager();
                 
@@ -152,8 +152,8 @@
      */
     public void testQueryCase3047workaround() throws Exception{
         FakeCapabilitiesFinder finder = new FakeCapabilitiesFinder();
-        finder.addCapabilities("TPCR_Ora", CapabilitiesConverter.convertCapabilities(new OracleCapabilities())); //$NON-NLS-1$
-        finder.addCapabilities("TPCR_SQLS", CapabilitiesConverter.convertCapabilities(new SQLServerCapabilities())); //$NON-NLS-1$
+        finder.addCapabilities("TPCR_Ora", CapabilitiesConverter.convertCapabilities(new OracleExecutionFactory())); //$NON-NLS-1$
+        finder.addCapabilities("TPCR_SQLS", CapabilitiesConverter.convertCapabilities(new SQLServerExecutionFactory())); //$NON-NLS-1$
         
         HardcodedDataManager dataMgr = new HardcodedDataManager();
                 
@@ -187,7 +187,7 @@
     
     public void testQuery22() throws Exception{
         FakeCapabilitiesFinder finder = new FakeCapabilitiesFinder();
-        finder.addCapabilities("TPCR_Oracle_9i", CapabilitiesConverter.convertCapabilities(new OracleCapabilities())); //$NON-NLS-1$
+        finder.addCapabilities("TPCR_Oracle_9i", CapabilitiesConverter.convertCapabilities(new OracleExecutionFactory())); //$NON-NLS-1$
         
         ProcessorPlan plan = TestOptimizer.helpPlan("SELECT custsale.cntrycode, COUNT(*) AS numcust, SUM(c_acctbal) AS totacctbal FROM (SELECT left(C_PHONE, 2) AS cntrycode, CUSTOMER.C_ACCTBAL FROM CUSTOMER WHERE (left(C_PHONE, 2) IN ('13','31','23','29','30','18','17')) AND (CUSTOMER.C_ACCTBAL > (SELECT AVG(CUSTOMER.C_ACCTBAL) FROM CUSTOMER WHERE (CUSTOMER.C_ACCTBAL > 0.0) AND (left(C_PHONE, 2) IN ('13','31','23','29','30','18','17')))) AND (NOT (EXISTS (SELECT * FROM ORDERS WHERE O_CUSTKEY = C_CUSTKEY)))) AS custsale GROUP BY custsale.cntrycode ORDER BY custsale.cntrycode", //$NON-NLS-1$
         		METADATA, null, finder,
@@ -197,7 +197,7 @@
     
     public void testDefect22475() throws Exception {
         FakeCapabilitiesFinder finder = new FakeCapabilitiesFinder();
-        finder.addCapabilities("TPCR_Oracle_9i", CapabilitiesConverter.convertCapabilities(new SQLServerCapabilities())); //$NON-NLS-1$
+        finder.addCapabilities("TPCR_Oracle_9i", CapabilitiesConverter.convertCapabilities(new SQLServerExecutionFactory())); //$NON-NLS-1$
 
         ProcessorPlan plan = TestOptimizer.helpPlan("select S_ACCTBAL, S_NAME, N_NAME, P_PARTKEY, P_MFGR, S_ADDRESS, S_PHONE, S_COMMENT from (SELECT SUPPLIER.S_ACCTBAL, SUPPLIER.S_NAME, NATION.N_NAME, PART.P_PARTKEY, PART.P_MFGR, SUPPLIER.S_ADDRESS, SUPPLIER.S_PHONE, SUPPLIER.S_COMMENT FROM PART, SUPPLIER, PARTSUPP, NATION, REGION WHERE (PART.P_PARTKEY = PS_PARTKEY) AND (S_SUPPKEY = PS_SUPPKEY) AND (P_SIZE = 15) AND (P_TYPE LIKE '%BRASS') AND (S_NATIONKEY = N_NATIONKEY) AND (N_REGIONKEY = R_REGIONKEY) AND (R_NAME = 'EUROPE') AND (PS_SUPPLYCOST = (SELECT MIN(PS_SUPPLYCOST) FROM PARTSUPP, SUPPLIER, NATION, REGION WHERE (PART.P_PARTKEY = PS_PARTKEY) AND (S_SUPPKEY = PS_SUPPKEY) AND (S_NATIONKEY = N_NATIONKEY) AND (N_REGIONKEY = R_REGIONKEY) AND (R_NAME = 'EUROPE'))) ORDER BY SUPPLIER.S_ACCTBAL DESC, NATION.N_NAME, SUPPLIER.S_NAME, PART.P_PARTKEY) as x", //$NON-NLS-1$
         		METADATA, null, finder,



More information about the teiid-commits mailing list