Author: shawkins
Date: 2009-02-16 16:35:21 -0500 (Mon, 16 Feb 2009)
New Revision: 474
Added:
trunk/connector-api/src/main/java/com/metamatrix/connector/api/ConnectorException.java
trunk/connector-api/src/main/java/com/metamatrix/connector/api/CredentialMap.java
trunk/connector-api/src/main/java/com/metamatrix/connector/basic/BasicConnector.java
Removed:
trunk/connector-api/src/main/java/com/metamatrix/connector/pool/CredentialMap.java
Modified:
trunk/connector-api/src/main/java/com/metamatrix/connector/api/Connection.java
trunk/connector-api/src/main/java/com/metamatrix/connector/api/Connector.java
trunk/connector-api/src/main/java/com/metamatrix/connector/api/DataNotAvailableException.java
trunk/connector-api/src/main/java/com/metamatrix/connector/api/Execution.java
trunk/connector-api/src/main/java/com/metamatrix/connector/api/ExecutionContext.java
trunk/connector-api/src/main/java/com/metamatrix/connector/api/ProcedureExecution.java
trunk/connector-api/src/main/java/com/metamatrix/connector/api/ResultSetExecution.java
trunk/connector-api/src/main/java/com/metamatrix/connector/api/TypeFacility.java
trunk/connector-api/src/main/java/com/metamatrix/connector/api/UpdateExecution.java
trunk/connector-api/src/main/java/com/metamatrix/connector/api/ValueTranslator.java
trunk/connector-api/src/main/java/com/metamatrix/connector/basic/BasicConnection.java
trunk/connector-api/src/main/java/com/metamatrix/connector/basic/BasicExecution.java
trunk/connector-api/src/main/java/com/metamatrix/connector/basic/BasicValueTranslator.java
trunk/connector-api/src/main/java/com/metamatrix/connector/language/IBatchedUpdates.java
trunk/connector-api/src/main/java/com/metamatrix/connector/language/IBulkInsert.java
trunk/connector-api/src/main/java/com/metamatrix/connector/language/ICommand.java
trunk/connector-api/src/main/java/com/metamatrix/connector/language/ICompareCriteria.java
trunk/connector-api/src/main/java/com/metamatrix/connector/language/ICompoundCriteria.java
trunk/connector-api/src/main/java/com/metamatrix/connector/language/IFrom.java
trunk/connector-api/src/main/java/com/metamatrix/connector/language/IGroupBy.java
trunk/connector-api/src/main/java/com/metamatrix/connector/language/IInCriteria.java
trunk/connector-api/src/main/java/com/metamatrix/connector/language/IInsert.java
trunk/connector-api/src/main/java/com/metamatrix/connector/language/IJoin.java
trunk/connector-api/src/main/java/com/metamatrix/connector/language/ILanguageFactory.java
trunk/connector-api/src/main/java/com/metamatrix/connector/language/IOrderBy.java
trunk/connector-api/src/main/java/com/metamatrix/connector/language/IParameter.java
trunk/connector-api/src/main/java/com/metamatrix/connector/language/IProcedure.java
trunk/connector-api/src/main/java/com/metamatrix/connector/language/ISelect.java
trunk/connector-api/src/main/java/com/metamatrix/connector/language/ISubqueryCompareCriteria.java
trunk/connector-api/src/main/java/com/metamatrix/connector/language/LanguageUtil.java
trunk/connector-api/src/main/java/com/metamatrix/connector/metadata/runtime/Element.java
trunk/connector-api/src/main/java/com/metamatrix/connector/metadata/runtime/MetadataID.java
trunk/connector-api/src/main/java/com/metamatrix/connector/metadata/runtime/MetadataObject.java
trunk/connector-api/src/main/java/com/metamatrix/connector/metadata/runtime/Parameter.java
trunk/connector-api/src/main/java/com/metamatrix/connector/metadata/runtime/RuntimeMetadata.java
trunk/connector-api/src/main/java/com/metamatrix/connector/metadata/runtime/TypeModel.java
trunk/connector-api/src/main/java/com/metamatrix/connector/pool/ConnectorIdentity.java
trunk/connector-api/src/main/java/com/metamatrix/connector/pool/ConnectorIdentityFactory.java
trunk/connector-api/src/main/java/com/metamatrix/connector/pool/PoolAwareConnection.java
trunk/connector-api/src/main/java/com/metamatrix/connector/pool/SingleIdentity.java
trunk/connector-api/src/main/java/com/metamatrix/connector/pool/SingleIdentityFactory.java
trunk/connector-api/src/main/java/com/metamatrix/connector/pool/UserIdentity.java
trunk/connector-api/src/main/java/com/metamatrix/connector/pool/UserIdentityFactory.java
trunk/connector-api/src/main/java/com/metamatrix/connector/visitor/framework/AbstractLanguageVisitor.java
trunk/connector-api/src/main/java/com/metamatrix/connector/visitor/framework/HierarchyVisitor.java
trunk/connector-api/src/main/java/com/metamatrix/connector/visitor/util/CollectorVisitor.java
trunk/connector-api/src/main/java/com/metamatrix/connector/visitor/util/SQLStringVisitor.java
trunk/connector-api/src/main/java/com/metamatrix/connector/xa/api/XAConnection.java
trunk/connector-api/src/main/java/com/metamatrix/connector/xa/api/XAConnector.java
trunk/connector-api/src/test/java/com/metamatrix/data/pool/TestCredentialMap.java
trunk/connector-api/src/test/java/com/metamatrix/data/transform/TestBasicValueTranslator.java
trunk/connector-metadata/src/main/java/com/metamatrix/connector/metadata/IndexConnector.java
trunk/connector-metadata/src/main/java/com/metamatrix/connector/metadata/MetadataProcedureExecution.java
trunk/connector-metadata/src/main/java/com/metamatrix/connector/metadata/adapter/ObjectConnection.java
trunk/connector-metadata/src/main/java/com/metamatrix/connector/metadata/adapter/ObjectConnector.java
trunk/connector-metadata/src/main/java/com/metamatrix/connector/metadata/adapter/ObjectSynchExecution.java
trunk/connector-metadata/src/main/java/com/metamatrix/connector/metadata/internal/MetadataSearchCriteriaBuilder.java
trunk/connector-metadata/src/main/java/com/metamatrix/connector/metadata/internal/ObjectProcedure.java
trunk/connector-metadata/src/main/java/com/metamatrix/connector/metadata/internal/ObjectProcedureProcessor.java
trunk/connector-metadata/src/main/java/com/metamatrix/connector/metadata/internal/ObjectQuery.java
trunk/connector-metadata/src/test/java/com/metamatrix/connector/metadata/TestIndexConnector.java
trunk/connector-metadata/src/test/java/com/metamatrix/connector/metadata/adapter/FakeObjectConnector.java
trunk/connector-metadata/src/test/java/com/metamatrix/connector/metadata/adapter/TestObjectConnector.java
trunk/connector-metadata/src/test/java/com/metamatrix/connector/metadata/internal/FakeRuntimeMetadata.java
trunk/connector-metadata/src/test/java/com/metamatrix/connector/metadata/internal/TestConnectorHost.java
trunk/connector-sdk/src/main/java/com/metamatrix/cdk/ConnectorShellCommandTarget.java
trunk/connector-sdk/src/main/java/com/metamatrix/cdk/IConnectorHost.java
trunk/connector-sdk/src/main/java/com/metamatrix/cdk/api/ConnectorHost.java
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/JDBCBaseExecution.java
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/JDBCConnector.java
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/JDBCProcedureExecution.java
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/JDBCQueryExecution.java
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/JDBCSingleIdentityConnectionFactory.java
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/JDBCSourceConnection.java
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/JDBCSourceConnectionFactory.java
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/JDBCUpdateExecution.java
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/JDBCUserIdentityConnectionFactory.java
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/access/AccessSQLTranslator.java
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/db2/DB2ConvertModifier.java
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/db2/DB2SQLConversionVisitor.java
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/db2/DB2SQLTranslator.java
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/derby/DerbyConvertModifier.java
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/derby/DerbySQLTranslator.java
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/extension/ResultsTranslator.java
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/extension/SQLConversionVisitor.java
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/extension/SQLTranslator.java
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/extension/TranslatedCommand.java
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/extension/impl/BasicResultsTranslator.java
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/extension/impl/BasicSQLTranslator.java
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/informix/InformixSQLTranslator.java
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/mysql/MySQLTranslator.java
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/oracle/ConcatFunctionModifier.java
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/oracle/OracleConvertModifier.java
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/oracle/OracleSQLConversionVisitor.java
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/oracle/OracleSQLTranslator.java
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/postgresql/PostgreSQLTranslator.java
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/sqlserver/SqlServerSQLTranslator.java
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/ssl/JDBCSequeLinkSingleIdentityConnectionFactory.java
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/sybase/SybaseSQLTranslator.java
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/util/JDBCExecutionHelper.java
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/xa/JDBCSingleIdentityDSConnectionFactory.java
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/xa/JDBCSourceXAConnection.java
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/xa/JDBCXAConnector.java
trunk/connectors/connector-jdbc/src/test/java/com/metamatrix/connector/jdbc/access/TestAccessSQLTranslator.java
trunk/connectors/connector-jdbc/src/test/java/com/metamatrix/connector/jdbc/db2/TestDB2SqlTranslator.java
trunk/connectors/connector-jdbc/src/test/java/com/metamatrix/connector/jdbc/mysql/TestMySQLTranslator.java
trunk/connectors/connector-jdbc/src/test/java/com/metamatrix/connector/jdbc/postgresql/TestPostgreSQLTranslator.java
trunk/connectors/connector-jdbc/src/test/java/com/metamatrix/connector/jdbc/sqlserver/TestSqlServerConversionVisitor.java
trunk/connectors/connector-jdbc/src/test/java/com/metamatrix/connector/jdbc/sybase/TestSybaseSQLConversionVisitor.java
trunk/connectors/connector-jdbc/src/test/java/com/metamatrix/connector/jdbc/userpool/MockExampleConnectionFactory.java
trunk/connectors/connector-jdbc/src/test/java/com/metamatrix/connector/jdbc/userpool/MockSourceConnection.java
trunk/connectors/connector-jdbc/src/test/java/com/metamatrix/connector/jdbc/userpool/TestPerUserPool.java
trunk/connectors/connector-ldap/src/main/java/com/metamatrix/connector/ldap/IQueryToLdapSearchParser.java
trunk/connectors/connector-ldap/src/main/java/com/metamatrix/connector/ldap/LDAPConnection.java
trunk/connectors/connector-ldap/src/main/java/com/metamatrix/connector/ldap/LDAPConnector.java
trunk/connectors/connector-ldap/src/main/java/com/metamatrix/connector/ldap/LDAPSyncQueryExecution.java
trunk/connectors/connector-ldap/src/main/java/com/metamatrix/connector/ldap/LDAPUpdateExecution.java
trunk/connectors/connector-ldap/src/test/java/com/metamatrix/connector/ldap/TestIQueryToLdapSearchParser.java
trunk/connectors/connector-loopback/src/main/java/com/metamatrix/connector/loopback/LoopbackConnection.java
trunk/connectors/connector-loopback/src/main/java/com/metamatrix/connector/loopback/LoopbackConnector.java
trunk/connectors/connector-loopback/src/main/java/com/metamatrix/connector/loopback/LoopbackExecution.java
trunk/connectors/connector-loopback/src/test/java/com/metamatrix/connector/loopback/TestLoopbackExecution.java
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/Connector.java
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/ConnectorState.java
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/Util.java
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/connection/SalesforceConnection.java
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/connection/impl/ConnectionImpl.java
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/execution/DeleteExecutionImpl.java
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/execution/InsertExecutionImpl.java
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/execution/QueryExecutionImpl.java
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/execution/UpdateExecutionImpl.java
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/execution/UpdateExecutionParent.java
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/execution/visitors/CriteriaVisitor.java
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/execution/visitors/DeleteVisitor.java
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/execution/visitors/ICriteriaVisitor.java
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/execution/visitors/IQueryProvidingVisitor.java
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/execution/visitors/InsertVisitor.java
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/execution/visitors/SelectVisitor.java
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/execution/visitors/UpdateVisitor.java
trunk/connectors/connector-salesforce/src/test/java/com/metamatrix/connector/salesforce/TestConnector.java
trunk/connectors/connector-salesforce/src/test/java/com/metamatrix/connector/salesforce/test/util/ObjectFactory.java
trunk/connectors/connector-text/src/main/java/com/metamatrix/connector/text/TextConnection.java
trunk/connectors/connector-text/src/main/java/com/metamatrix/connector/text/TextConnector.java
trunk/connectors/connector-text/src/main/java/com/metamatrix/connector/text/TextSynchExecution.java
trunk/connectors/connector-text/src/test/java/com/metamatrix/connector/text/TestMultiFileTextSynchExecution.java
trunk/connectors/connector-text/src/test/java/com/metamatrix/connector/text/TestRowHeaderTextSynchExecution.java
trunk/connectors/connector-text/src/test/java/com/metamatrix/connector/text/TestTextConnection.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/AbstractCachingConnector.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/AsynchronousDocumentProducer.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/BaseXMLConnectorState.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/CachingConnector.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/DocumentProducer.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/NamedDocumentExecutor.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/SecureConnectorState.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/XMLConnection.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/XMLConnectorState.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/BaseBatchProducer.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/BaseResultsProducer.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/CriteriaDesc.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/DocumentBuilder.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/FileBackedValueReference.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/LargeOrSmallString.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/LargeTextExtractingXmlFilter.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/LargeTextValueReference.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/LoggingConnector.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/OutputXPathDesc.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/ParameterDescriptor.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/QueryAnalyzer.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/RequestResponseDocumentProducer.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/Response.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/SecureConnectorStateImpl.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/TrustedPayloadBridge.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/ValueConvertor.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/XMLConnectionImpl.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/XMLConnector.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/XMLConnectorStateImpl.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/XMLExecutionImpl.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/XMLExtractor.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/cache/DocumentCache.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/cache/IDocumentCache.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/cache/RequestRecord.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/file/FileConnectorState.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/file/FileExecutor.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/http/DefaultTrustDeserializer.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/http/HTTPConnectorState.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/http/HTTPExecutor.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/http/HTTPRequestor.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/http/HTTPTrustDeserializer.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/jms/JMSConnection.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/jms/JMSExecution.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/jms/JMSRequestExecutor.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/jms/JMSSOAPConnectorState.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/jms/JMSXMLConnectorState.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/soap/SOAPConnectorState.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/soap/SOAPConnectorStateImpl.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/soap/SOAPDocBuilder.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/soap/SOAPExecutor.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xmlsource/XMLConnectionFacory.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xmlsource/XMLSourceConnection.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xmlsource/XMLSourceConnector.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xmlsource/XMLSourceExecution.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xmlsource/file/FileConnection.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xmlsource/file/FileExecution.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xmlsource/soap/SoapConnection.java
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xmlsource/soap/SoapExecution.java
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/MockCachingConnector.java
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/ProxyObjectFactory.java
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestCriteriaDesc.java
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestExecutionInfo.java
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestOutputXPathDesc.java
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestParameterDescriptor.java
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestQueryAnalyzer.java
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestStringBackedValueReference.java
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestXMLConnection.java
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestXMLConnector.java
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestXMLConnectorState.java
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestXMLExecution.java
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestXMLExtractor.java
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/cache/TestCache.java
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/file/TestFileConnectorState.java
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/file/TestFileExecutor.java
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/http/TestHTTPConnectorState.java
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/jms/TestJMSConnectorState.java
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/jms/TestJMSSOAPConnectorState.java
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xmlsource/FakeRuntimeMetadata.java
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xmlsource/file/TestFileConnection.java
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xmlsource/file/TestFileExecution.java
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xmlsource/soap/TestSoapConnection.java
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xmlsource/soap/TestSoapExecution.java
trunk/connectors/sandbox/connector-exec/src/main/java/com/metamatrix/connector/exec/ExecAntExecution.java
trunk/connectors/sandbox/connector-exec/src/main/java/com/metamatrix/connector/exec/ExecConnection.java
trunk/connectors/sandbox/connector-exec/src/main/java/com/metamatrix/connector/exec/ExecConnector.java
trunk/connectors/sandbox/connector-exec/src/main/java/com/metamatrix/connector/exec/ExecVisitor.java
trunk/connectors/sandbox/connector-exec/src/test/java/com/metamatrix/connector/exec/FakeExecConnector.java
trunk/connectors/sandbox/connector-exec/src/test/java/com/metamatrix/connector/exec/TestsExec.java
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/ObjectConnection.java
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/ObjectConnector.java
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/ObjectProcedureExecution.java
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/SourceConnectionFactory.java
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/extension/IObjectSource.java
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/extension/ISourceTranslator.java
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/extension/command/ObjectCommand.java
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/extension/command/ProcedureCommand.java
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/extension/source/BaseObjectSource.java
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/extension/source/BaseSourceConnectionFactory.java
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/extension/source/BasicSourceTranslator.java
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/extension/value/BasicValueRetriever.java
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/extension/value/JavaUtilDateValueTranslator.java
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/util/ObjectConnectorUtil.java
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/util/ObjectExecutionHelper.java
trunk/connectors/sandbox/connector-oracle-spatial/src/main/java/com/metamatrix/connector/jdbc/oracle/spatial/OracleSpatialConnector.java
trunk/connectors/sandbox/connector-oracle-spatial/src/main/java/com/metamatrix/connector/jdbc/oracle/spatial/OracleSpatialSQLTranslator.java
trunk/connectors/sandbox/connector-yahoo/src/main/java/com/metamatrix/connector/yahoo/TickerCollectorVisitor.java
trunk/connectors/sandbox/connector-yahoo/src/main/java/com/metamatrix/connector/yahoo/YahooConnection.java
trunk/connectors/sandbox/connector-yahoo/src/main/java/com/metamatrix/connector/yahoo/YahooConnector.java
trunk/connectors/sandbox/connector-yahoo/src/main/java/com/metamatrix/connector/yahoo/YahooExecution.java
trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/admin/BaseAdmin.java
trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedDataService.java
trunk/engine/src/main/java/com/metamatrix/common/comm/ClientServiceRegistry.java
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/impl/ConnectorManager.java
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/impl/ConnectorWorkItem.java
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/impl/ConnectorWrapper.java
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/impl/ExecutionContextImpl.java
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/impl/ProcedureBatchHandler.java
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/impl/SynchConnectorWorkItem.java
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/impl/TypeFacilityImpl.java
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/language/CompareCriteriaImpl.java
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/language/CompoundCriteriaImpl.java
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/language/JoinImpl.java
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/language/LanguageBridgeFactory.java
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/language/LanguageFactoryImpl.java
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/language/ParameterImpl.java
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/language/SubqueryCompareCriteriaImpl.java
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/metadata/ElementImpl.java
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/metadata/MetadataFactory.java
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/metadata/MetadataIDImpl.java
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/metadata/MetadataObjectImpl.java
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/metadata/ParameterIDImpl.java
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/metadata/ParameterImpl.java
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/metadata/ProcedureIDImpl.java
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/metadata/RuntimeMetadataImpl.java
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/metadata/TypeModelImpl.java
trunk/engine/src/main/java/com/metamatrix/dqp/internal/pooling/connector/ConnectionPool.java
trunk/engine/src/main/java/com/metamatrix/dqp/internal/pooling/connector/ConnectionPoolException.java
trunk/engine/src/main/java/com/metamatrix/dqp/internal/pooling/connector/ConnectionWrapper.java
trunk/engine/src/main/java/com/metamatrix/dqp/internal/pooling/connector/PooledConnector.java
trunk/engine/src/main/java/com/metamatrix/dqp/message/AtomicResultsMessage.java
trunk/engine/src/main/java/com/metamatrix/dqp/service/DataService.java
trunk/engine/src/test/java/com/metamatrix/dqp/internal/datamgr/impl/FakeConnector.java
trunk/engine/src/test/java/com/metamatrix/dqp/internal/datamgr/impl/FakeProcedureExecution.java
trunk/engine/src/test/java/com/metamatrix/dqp/internal/datamgr/impl/TestConnectorManagerImpl.java
trunk/engine/src/test/java/com/metamatrix/dqp/internal/datamgr/impl/TestConnectorWorkItem.java
trunk/engine/src/test/java/com/metamatrix/dqp/internal/datamgr/language/TestCompareCriteriaImpl.java
trunk/engine/src/test/java/com/metamatrix/dqp/internal/datamgr/language/TestCompoundCriteriaImpl.java
trunk/engine/src/test/java/com/metamatrix/dqp/internal/datamgr/language/TestJoinImpl.java
trunk/engine/src/test/java/com/metamatrix/dqp/internal/datamgr/language/TestParameterImpl.java
trunk/engine/src/test/java/com/metamatrix/dqp/internal/datamgr/language/TestSubqueryCompareCriteriaImpl.java
trunk/engine/src/test/java/com/metamatrix/dqp/internal/pooling/connector/FakeSourceConnectionFactory.java
trunk/engine/src/test/java/com/metamatrix/dqp/internal/pooling/connector/FakeUserIdentityConnectionFactory.java
trunk/engine/src/test/java/com/metamatrix/dqp/internal/pooling/connector/TestConnectionPool.java
trunk/engine/src/test/java/com/metamatrix/dqp/internal/process/TestDataTierManager.java
trunk/engine/src/test/java/com/metamatrix/dqp/service/AutoGenDataService.java
trunk/server/src/main/java/com/metamatrix/common/comm/platform/socket/SocketVMController.java
trunk/server/src/main/java/com/metamatrix/common/comm/platform/socket/server/LogonImpl.java
trunk/server/src/main/java/com/metamatrix/common/comm/platform/socket/server/ServerWorkItem.java
trunk/server/src/main/java/com/metamatrix/common/comm/platform/socket/server/SocketClientInstance.java
trunk/server/src/main/java/com/metamatrix/common/comm/platform/socket/server/SocketListener.java
trunk/server/src/main/java/com/metamatrix/platform/vm/controller/VMController.java
trunk/server/src/main/java/com/metamatrix/server/connector/service/ConnectorService.java
trunk/server/src/main/java/com/metamatrix/server/connector/service/ConnectorServiceInterface.java
trunk/server/src/main/java/com/metamatrix/server/dqp/service/PlatformDataService.java
trunk/server/src/test/java/com/metamatrix/common/comm/platform/socket/server/TestCommSockets.java
trunk/server/src/test/java/com/metamatrix/common/comm/platform/socket/server/TestSocketRemoting.java
trunk/test-integration/src/test/java/com/metamatrix/connector/jdbc/extension/TestSQLConversionVisitor.java
trunk/test-integration/src/test/java/com/metamatrix/connector/jdbc/oracle/TestOracleSQLConversionVisitor.java
trunk/test-integration/src/test/java/com/metamatrix/connector/jdbc/util/TestJDBCExecutionHelper.java
trunk/test-integration/src/test/java/com/metamatrix/data/metadata/runtime/MockConnector.java
trunk/test-integration/src/test/java/com/metamatrix/data/metadata/runtime/TestMetadataInConnector.java
trunk/test-integration/src/test/java/com/metamatrix/data/metadata/runtime/TestParams.java
trunk/test-integration/src/test/java/com/metamatrix/data/visitor/util/TestCollectorVisitor.java
trunk/txn-jbossts/src/test/java/com/metamatrix/xa/arjuna/FakeXAConnection.java
trunk/txn-jbossts/src/test/java/com/metamatrix/xa/arjuna/TestArjunaRecovery.java
Log:
TEIID-351 TEIID-348 TEIID-164 minor fix for ldap lt gt support, removed explicit
interfaces for monitoredconnector, repackaged connectorexception, added the use of
appropriate generics to connector api.
Modified: trunk/connector-api/src/main/java/com/metamatrix/connector/api/Connection.java
===================================================================
---
trunk/connector-api/src/main/java/com/metamatrix/connector/api/Connection.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-api/src/main/java/com/metamatrix/connector/api/Connection.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -22,7 +22,6 @@
package com.metamatrix.connector.api;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.language.ICommand;
import com.metamatrix.connector.metadata.runtime.RuntimeMetadata;
import com.metamatrix.connector.pool.PoolAwareConnection;
@@ -58,5 +57,12 @@
* using the connection for an execution.
*/
void close();
+
+ /**
+ * Called to determine whether the connection is open
+ * @return true if open, false if there is a source error.
+ */
+ boolean isAlive();
+
}
Modified: trunk/connector-api/src/main/java/com/metamatrix/connector/api/Connector.java
===================================================================
---
trunk/connector-api/src/main/java/com/metamatrix/connector/api/Connector.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-api/src/main/java/com/metamatrix/connector/api/Connector.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -22,7 +22,6 @@
package com.metamatrix.connector.api;
-import com.metamatrix.connector.exception.ConnectorException;
/**
* <p>The primary entry point for a Connector. This interface should be
implemented
@@ -33,8 +32,6 @@
* instantiated, the {@link #initialize(ConnectorEnvironment)} method will be called
* with all necessary connector properties. The {@link #start()} and {@link #stop()}
* methods are lifecycle methods called when starting or stopping the
connector.</p>
- *
- * <p>
*/
public interface Connector {
@@ -58,7 +55,8 @@
* with a particular security context. The connection is assumed to be pooled in
* the underlying source if pooling is necessary - the connection will be closed
* when execution has completed against it.
- * @param context The context of the current MetaMatrix user that will be using this
connection
+ * @param context The context of the current user that will be using this connection,
+ * may be null if this connection is for an administrative operation.
* @return A Connection, created by the Connector
* @throws ConnectorException If an error occurred obtaining a connection
*/
@@ -67,7 +65,7 @@
/**
* Get the capabilities of this connector. The capabilities affect what kinds of
* queries (and other commands) will be sent to the connector.
- * @return Connector capabilities, may return null if the Connector provides User
scoped capabilities {@link Connection#getCapabilities()}
+ * @return ConnectorCapabilities, may return null if the Connector provides User
scoped capabilities {@link Connection#getCapabilities()}
*/
ConnectorCapabilities getCapabilities();
Copied:
trunk/connector-api/src/main/java/com/metamatrix/connector/api/ConnectorException.java
(from rev 468,
trunk/connector-api/src/main/java/com/metamatrix/connector/exception/ConnectorException.java)
===================================================================
---
trunk/connector-api/src/main/java/com/metamatrix/connector/api/ConnectorException.java
(rev 0)
+++
trunk/connector-api/src/main/java/com/metamatrix/connector/api/ConnectorException.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -0,0 +1,70 @@
+/*
+ * 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 com.metamatrix.connector.api;
+
+import com.metamatrix.core.MetaMatrixCoreException;
+
+/**
+ * An exception the connector writer can return in case of an
+ * error while using the connector.
+ */
+public class ConnectorException extends MetaMatrixCoreException{
+
+ private static final long serialVersionUID = -5980862789340592219L;
+
+ /**
+ * No-arg constructor required by Externalizable semantics.
+ */
+ public ConnectorException() {
+ super();
+ }
+
+ /**
+ * Construct an instance with the message specified.
+ *
+ * @param message A message describing the exception
+ */
+ public ConnectorException( String message ) {
+ super( message );
+ }
+
+ /**
+ * Construct an instance from a message and an exception to chain to this one.
+ *
+ * @param code A code denoting the exception
+ * @param e An exception to nest within this one
+ */
+ public ConnectorException( Throwable e, String message ) {
+ super( e, message );
+ }
+
+ /**
+ * Construct an instance with a linked exception specified.
+ *
+ * @param e An exception to chain to this exception
+ */
+ public ConnectorException( Throwable e ) {
+ super( e );
+ }
+
+}
Property changes on:
trunk/connector-api/src/main/java/com/metamatrix/connector/api/ConnectorException.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: trunk/connector-api/src/main/java/com/metamatrix/connector/api/CredentialMap.java
(from rev 468,
trunk/connector-api/src/main/java/com/metamatrix/connector/pool/CredentialMap.java)
===================================================================
--- trunk/connector-api/src/main/java/com/metamatrix/connector/api/CredentialMap.java
(rev 0)
+++
trunk/connector-api/src/main/java/com/metamatrix/connector/api/CredentialMap.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -0,0 +1,376 @@
+/*
+ * 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 com.metamatrix.connector.api;
+
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import com.metamatrix.connector.DataPlugin;
+import com.metamatrix.core.util.StringUtil;
+
+/**
+ * Allows credentials to be passed on a per user basis to a connector.
+ *
+ * A CredentialsMap object is produced based on information provided in the JDBC
+ * URL. The static method parseCredentials() is used for this purpose.
+ *
+ * This CredentialMap serves as the session "trusted payload".
+ *
+ * It is the responsibility of a Connector to call
+ * {@link ExecutionContext#getTrustedPayload()} to retrieve the CredentialMap.
+ *
+ * The system name should be the same as the Connector Binding Name retrieved from
+ * {@link ConnectorEnvironment#getConnectorName()}.
+ *
+ * To get the keyword/value pairs use getSystemCredentials(systemName), this will
+ * return a Map that contains the properties for the specified system.
+ *
+ * Specific user and password values can be retrieved with
+ * getUser(systemName) and getPassword(systemName)
+ */
+public class CredentialMap implements Serializable {
+ //Parsing keywords for system, user, and password. Comparison is done
+ //ignoring case.
+ public final static String SYSTEM_KEYWORD = "system"; //$NON-NLS-1$
+ public final static String USER_KEYWORD = "user"; //$NON-NLS-1$
+ public final static String PASSWORD_KEYWORD = "password"; //$NON-NLS-1$
+ public final static String ESCAPE_CHAR = "\\"; //$NON-NLS-1$
+ public final static String DEFAULT_SYSTEM = "default"; //$NON-NLS-1$
+
+ private final static String ESCAPE_SLASH = "ESCAPE_SLASH"; // forward
slash //$NON-NLS-1$
+ private final static String ESCAPE_COMMA = "ESCAPE_COMMA"; // comma
//$NON-NLS-1$
+ private final static String ESCAPE_EQUAL = "ESCAPE_EQUAL"; // equals
//$NON-NLS-1$
+// private final static String ESCAPE_SEMI = "ESCAPE_SEMI"; // semicolon
+// private final static String ESCAPE_CLOSE_PAREN = "ESCAPE_CLOSE_PAREN"; //
closing paren
+
+
+ private final static String[] escape_chars = {
+ ESCAPE_CHAR + "/", // forward
slash //$NON-NLS-1$
+ ESCAPE_CHAR + ",", // comma
//$NON-NLS-1$
+ ESCAPE_CHAR + "="}; // equals
//$NON-NLS-1$
+// ESCAPE_CHAR + ";", //
semicolon
+// ESCAPE_CHAR + ")"}; // closing
paren
+
+ private final static String[] escape_strings = {
+ ESCAPE_SLASH, // forward slash
+ ESCAPE_COMMA, // comma
+ ESCAPE_EQUAL }; // equals
+// ESCAPE_SEMI, // semicolon
+// ESCAPE_CLOSE_PAREN }; // closing paren
+
+ /**
+ * In this mode, the CredentialMap will ignore the default credentials
+ * and only credentials set for a system will be exposed. This is the
+ * default setting for the CredentialMap.
+ */
+ public static final short MODE_IGNORE_DEFAULTS = 0;
+
+ /**
+ * In this mode, the default credentials will be returned for any system,
+ * overlaid with any system-specific credentials. If a system is unknown,
+ * all default credentials are returned for that system.
+ */
+ public static final short MODE_USE_DEFAULTS_GLOBALLY = 1;
+
+ /**
+ * In this mode, the default credentials will be returned for any system,
+ * overlaid with any system-specific credentials. If a system is unknown,
+ * the default credentials are NOT used.
+ */
+ public static final short MODE_USE_DEFAULTS_ON_EXISTING = 2;
+
+ /**
+ * The map of map of credentials (keyed by system name, upper case).
+ */
+ private Map map = new HashMap();
+
+ private short defaultCredentialMode = MODE_IGNORE_DEFAULTS;
+ private Map defaultCredentials;
+
+
+ /**
+ * Method to parse a credentials substring extracted from a JDBC URL. The
+ * presumed command line syntax is ...;credentials=(...);...
+ * Only the substring starting and ending with the parentheses is passed to
+ * this method. That is, the first non-blank character must be a '(' and the
+ * last non-blank character must be a ')', or an exception will be thrown.
+ *
+ * Syntax is: (credentialspec1/credentialspec2/.../credentialspecn)
+ *
+ * Any number one or greater of credential specifications may be included,
+ * separated by '/' characters.
+ *
+ * Each credentials spec will be specified in the following way:
+ * Keyword-specified, order-independent name-value pairs of the form
+ * keyword=value. The only required keyword is "system", which must be
specified
+ * for each credentials spec, and must have a value corresponding to the name of an
EIS
+ * already known to the system.
+ *
+ * Ex: system=sys1,user=sys1un,pass=sys1pw, whatever=somevalue.
+ * Each of the keywords must be unique.
+ *
+ * All blank space is ignored, except within a keyword or value.
+ *
+ * Any syntax error will cause an Exception to be thrown.
+ *
+ * @param inputStr the string to be parsed; first non-blank must be a '(',
last non-blank must be a ')'
+ * @return a CredentialMap containing the input
+ * @throws ConnectorException upon any syntax error; descriptive text included
+ */
+ public static CredentialMap parseCredentials(String inputStr) throws ConnectorException
{
+
+ for (int i = 0; i < escape_chars.length; i++) {
+ inputStr = StringUtil.replaceAll(inputStr, escape_chars[i], escape_strings[i]);
+ }
+
+ if (inputStr == null) {
+ throw new
ConnectorException(DataPlugin.Util.getString("CredentialMap.Null_input"));
//$NON-NLS-1$
+ }
+
+ inputStr = inputStr.trim();
+
+ CredentialMap credentialMap = new CredentialMap(); // map of maps keyed on system
+ int strLen = inputStr.length();
+
+ //Check that not empty
+
+ if (strLen == 0) {
+ throw new
ConnectorException(DataPlugin.Util.getString("CredentialMap.Empty_input"));
//$NON-NLS-1$
+ }
+
+ //Check that first non-blank char is left paren
+ if (!inputStr.startsWith("(")|| !inputStr.endsWith(")")) {
//$NON-NLS-1$ //$NON-NLS-2$
+ throw new
ConnectorException(DataPlugin.Util.getString("CredentialMap.Missing_parens"));
//$NON-NLS-1$
+ }
+
+ // strip of ()'s
+ inputStr = inputStr.substring(1, inputStr.length()-1);
+
+ List credentials = StringUtil.getTokens(inputStr, "/"); //$NON-NLS-1$
+ Iterator credentialIter = credentials.iterator();
+
+ while (credentialIter.hasNext()) {
+ String credential = (String) credentialIter.next();
+
+ // Convert the escaped "/" since we already parsed on the "/"
+ credential = StringUtil.replaceAll(credential, escape_strings[0], "/");
//$NON-NLS-1$
+
+ Map newMap = getCredentialMap(credential.trim());
+ String system = (String) newMap.get(SYSTEM_KEYWORD);
+ if (system == null || system.length() == 0) {
+ throw new
ConnectorException(DataPlugin.Util.getString("CredentialMap.Missing_system_prop"));
//$NON-NLS-1$
+ }
+ credentialMap.addSystemCredentials(system, newMap); // add to Map of Maps.
+ }
+ return credentialMap;
+ }
+
+
+ /**
+ * Takes a string containing key/value pairs.
+ * Example "propName1=propValue1,propName2,propValue2,....."
+ * and returns a map of key/value pairs.
+ */
+ private static Map getCredentialMap(String credential) {
+ List propList = StringUtil.getTokens(credential, ","); //$NON-NLS-1$
+ Iterator propIter = propList.iterator();
+ Map map = new HashMap();
+ while (propIter.hasNext()) {
+ String propVal = (String) propIter.next();
+ List pvList = StringUtil.getTokens(propVal, "="); //$NON-NLS-1$
+ String key = null;
+ String val = null;
+ if (pvList.size() > 0) {
+ key = (String) pvList.get(0);
+ key = key.trim();
+ }
+ if (pvList.size() > 1) {
+ val = (String) pvList.get(1);
+ val = val.trim();
+ // put back the escaped "," and "=" since we already parsed on
these.
+ val = StringUtil.replaceAll(val, escape_strings[1], ","); //$NON-NLS-1$
+ val = StringUtil.replaceAll(val, escape_strings[2], "="); //$NON-NLS-1$
+ }
+ map.put(key,val);
+ }
+ return map;
+ }
+
+ public CredentialMap() {
+ super();
+ }
+
+ /**
+ * Method to return an array of systems that have been added to this
+ * CredentialMap.
+ *
+ * @return array of the systems that have been added using addSystemCredentials() -
always uppercase
+ */
+ public String[] getSystems() {
+ Set keySet = map.keySet();
+ String[] keys = new String[keySet.size()];
+ Iterator it = keySet.iterator();
+ for (int i = 0; it.hasNext(); i++) {
+ keys[i] = (String)it.next();
+ }
+ return keys;
+ }
+
+ /**
+ * Method to add a user name and credentials (e.g. password) for a system
+ *
+ * @param system system name corresponding to the user and credentials
+ * @param credentials Map containing name/val pairs
+ */
+ public void addSystemCredentials(String system, Map credentials) {
+ map.put(system.toUpperCase(), credentials);
+ }
+
+ /**
+ * Set the default credentials to use with this credential map. See the
+ * various default credential modes to understand when and how these will
+ * be returned.
+ *
+ * @param defaultCredentials Map of credentials
+ * @since 4.3
+ */
+ public void setDefaultCredentials(Map defaultCredentials) {
+ this.defaultCredentials = defaultCredentials;
+ }
+
+ /**
+ * Set the default credential mode to determine when default credentials should
+ * be returned.
+ *
+ * @param mode The mode
+ * @see #MODE_IGNORE_DEFAULTS
+ * @see #MODE_USE_DEFAULTS_GLOBALLY
+ * @see #MODE_USE_DEFAULTS_ON_EXISTING
+ * @since 4.3
+ */
+ public void setDefaultCredentialMode(short mode) {
+ this.defaultCredentialMode = mode;
+ }
+
+ /**
+ * Method to return the credentials map for a system
+ *
+ * @param systemName system name
+ * @return Map
+ */
+ public Map getSystemCredentials(String systemName) {
+ Map systemCredentials = (Map)map.get(systemName.toUpperCase());
+
+ // If ignoring defaults, return just as is
+ if(this.defaultCredentialMode == MODE_IGNORE_DEFAULTS) {
+ return systemCredentials;
+ }
+
+ // Pre-load the credential set to return with the defaults if
+ // 1. defaults exist
+ // 2. AND using defaults globally
+ // 3. OR (using defaults on existing AND system credentials exist)
+ Map workingMap = null;
+ if(this.defaultCredentials != null &&
+ (this.defaultCredentialMode == MODE_USE_DEFAULTS_GLOBALLY ||
+ (this.defaultCredentialMode ==
MODE_USE_DEFAULTS_ON_EXISTING &&
+ systemCredentials != null))) {
+
+ workingMap = new HashMap();
+ workingMap.putAll(defaultCredentials);
+ }
+
+ // Apply system credentials over the top if they exist
+ if(systemCredentials != null) {
+ if(workingMap == null) {
+ workingMap = new HashMap();
+ }
+ workingMap.putAll(systemCredentials);
+ }
+
+ return workingMap;
+ }
+
+ /**
+ * Get the user property for the specified system, if it exists. The
+ * user property is defined by the static constant {@link #USER_KEYWORD}.
+ *
+ * @param systemName The system to look up (case insensitive)
+ * @return The user name for this system if the system was found and the system had a
user property
+ * @since 4.3
+ */
+ public String getUser(String systemName) {
+ Map credentials = getSystemCredentials(systemName);
+ if(credentials != null) {
+ return (String) credentials.get(USER_KEYWORD);
+ }
+
+ return null;
+ }
+
+ /**
+ * Get the password property for the specified system, if it exists. The
+ * password property is defined by the static constant {@link #PASSWORD_KEYWORD}.
+ *
+ * @param systemName The system to look up (case insensitive)
+ * @return The password for this system if the system was found and the system had a
password property
+ * @since 4.3
+ */
+ public String getPassword(String systemName) {
+ Map credentials = getSystemCredentials(systemName);
+ if(credentials != null) {
+ return (String) credentials.get(PASSWORD_KEYWORD);
+ }
+
+ return null;
+ }
+
+ public String toString() {
+ StringBuffer b = new StringBuffer();
+ String[] systems = this.getSystems();
+ for (int i=0; i < systems.length; i++) {
+ String system = systems[i];
+ Map map = this.getSystemCredentials(system);
+ b.append("\n"); //$NON-NLS-1$
+ b.append(system);
+ b.append("\n"); //$NON-NLS-1$
+ Iterator iter = map.keySet().iterator();
+ while (iter.hasNext()) {
+ Object key = iter.next();
+ b.append("\t"); //$NON-NLS-1$
+ b.append(key);
+ b.append("="); //$NON-NLS-1$
+ b.append(map.get(key));
+ b.append("\n"); //$NON-NLS-1$
+ }
+ }
+ return b.toString();
+ }
+
+}//end CredentialMap
+
+
Property changes on:
trunk/connector-api/src/main/java/com/metamatrix/connector/api/CredentialMap.java
___________________________________________________________________
Name: svn:mergeinfo
+
Modified:
trunk/connector-api/src/main/java/com/metamatrix/connector/api/DataNotAvailableException.java
===================================================================
---
trunk/connector-api/src/main/java/com/metamatrix/connector/api/DataNotAvailableException.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-api/src/main/java/com/metamatrix/connector/api/DataNotAvailableException.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -1,9 +1,34 @@
+/*
+ * 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 com.metamatrix.connector.api;
-import com.metamatrix.connector.exception.ConnectorException;
-
+/**
+ * Used by asynch connectors to indicate data is not available
+ * and results should be polled for after the given delay.
+ */
public class DataNotAvailableException extends ConnectorException {
+ private static final long serialVersionUID = 5569111182915674334L;
+
private long retryDelay = 0;
public DataNotAvailableException() {
Modified: trunk/connector-api/src/main/java/com/metamatrix/connector/api/Execution.java
===================================================================
---
trunk/connector-api/src/main/java/com/metamatrix/connector/api/Execution.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-api/src/main/java/com/metamatrix/connector/api/Execution.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -22,10 +22,6 @@
package com.metamatrix.connector.api;
-import java.util.List;
-
-import com.metamatrix.connector.exception.ConnectorException;
-
/**
* An execution represents the state and lifecycle for a particular
* command execution. The methods provided on this interface define
@@ -54,10 +50,4 @@
*/
void execute() throws ConnectorException;
- /**
- * Get and clear the warnings for this execution. Will be called
- * each time results are retrieved.
- * @return a List of ConnectorExceptions or null if there are no warnings
- */
- List<Exception> getWarnings();
}
Modified:
trunk/connector-api/src/main/java/com/metamatrix/connector/api/ExecutionContext.java
===================================================================
---
trunk/connector-api/src/main/java/com/metamatrix/connector/api/ExecutionContext.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-api/src/main/java/com/metamatrix/connector/api/ExecutionContext.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -152,5 +152,11 @@
* @return the Connector batch size.
*/
int getBatchSize();
+
+ /**
+ * Add an exception as a warning to this Execution.
+ * @param ex
+ */
+ void addWarning(Exception ex);
}
Modified:
trunk/connector-api/src/main/java/com/metamatrix/connector/api/ProcedureExecution.java
===================================================================
---
trunk/connector-api/src/main/java/com/metamatrix/connector/api/ProcedureExecution.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-api/src/main/java/com/metamatrix/connector/api/ProcedureExecution.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -22,7 +22,6 @@
package com.metamatrix.connector.api;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.language.IParameter;
/**
Modified:
trunk/connector-api/src/main/java/com/metamatrix/connector/api/ResultSetExecution.java
===================================================================
---
trunk/connector-api/src/main/java/com/metamatrix/connector/api/ResultSetExecution.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-api/src/main/java/com/metamatrix/connector/api/ResultSetExecution.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -24,13 +24,12 @@
import java.util.List;
-import com.metamatrix.connector.exception.ConnectorException;
/**
*/
public interface ResultSetExecution extends Execution {
- List next() throws ConnectorException, DataNotAvailableException;
+ List<?> next() throws ConnectorException, DataNotAvailableException;
}
Modified:
trunk/connector-api/src/main/java/com/metamatrix/connector/api/TypeFacility.java
===================================================================
---
trunk/connector-api/src/main/java/com/metamatrix/connector/api/TypeFacility.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-api/src/main/java/com/metamatrix/connector/api/TypeFacility.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -24,7 +24,6 @@
import com.metamatrix.common.types.DataTypeManager;
import com.metamatrix.common.types.MMJDBCSQLTypeInfo;
-import com.metamatrix.connector.exception.ConnectorException;
/**
*/
Modified:
trunk/connector-api/src/main/java/com/metamatrix/connector/api/UpdateExecution.java
===================================================================
---
trunk/connector-api/src/main/java/com/metamatrix/connector/api/UpdateExecution.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-api/src/main/java/com/metamatrix/connector/api/UpdateExecution.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -22,7 +22,6 @@
package com.metamatrix.connector.api;
-import com.metamatrix.connector.exception.ConnectorException;
/**
* The update execution represents the case where a connector can
Modified:
trunk/connector-api/src/main/java/com/metamatrix/connector/api/ValueTranslator.java
===================================================================
---
trunk/connector-api/src/main/java/com/metamatrix/connector/api/ValueTranslator.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-api/src/main/java/com/metamatrix/connector/api/ValueTranslator.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -24,17 +24,16 @@
*/
package com.metamatrix.connector.api;
-import com.metamatrix.connector.exception.ConnectorException;
/**
* A ValueTranslator knows how to convert an object value of a given source type
* into a target type.
*/
-public interface ValueTranslator {
+public interface ValueTranslator<S, T> {
- Class getSourceType();
+ Class<S> getSourceType();
- Class getTargetType();
+ Class<T> getTargetType();
- Object translate(Object value, ExecutionContext context) throws ConnectorException;
+ T translate(S value, ExecutionContext context) throws ConnectorException;
}
Modified:
trunk/connector-api/src/main/java/com/metamatrix/connector/basic/BasicConnection.java
===================================================================
---
trunk/connector-api/src/main/java/com/metamatrix/connector/basic/BasicConnection.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-api/src/main/java/com/metamatrix/connector/basic/BasicConnection.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -23,18 +23,27 @@
package com.metamatrix.connector.basic;
import com.metamatrix.connector.api.ConnectorCapabilities;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.Execution;
import com.metamatrix.connector.api.ExecutionContext;
import com.metamatrix.connector.api.ProcedureExecution;
import com.metamatrix.connector.api.ResultSetExecution;
import com.metamatrix.connector.api.UpdateExecution;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.language.ICommand;
import com.metamatrix.connector.language.IProcedure;
import com.metamatrix.connector.language.IQueryCommand;
import com.metamatrix.connector.metadata.runtime.RuntimeMetadata;
+import com.metamatrix.connector.pool.ConnectorIdentity;
import com.metamatrix.connector.pool.PoolAwareConnection;
+/**
+ * Provides a default implementation of a {@link PoolAwareConnection} for a Connector
+ * that supports global capabilities. Extensions of this class should implement
+ * {@link #createProcedureExecution(IProcedure, ExecutionContext, RuntimeMetadata)}
+ * {@link #createResultSetExecution(IProcedure, ExecutionContext, RuntimeMetadata)}
+ * {@link #createUpdateExecution(IProcedure, ExecutionContext, RuntimeMetadata)}
+ * as necessary.
+ */
public abstract class BasicConnection implements PoolAwareConnection {
@Override
@@ -73,6 +82,12 @@
}
@Override
+ public void setConnectorIdentity(ConnectorIdentity context)
+ throws ConnectorException {
+
+ }
+
+ @Override
public ConnectorCapabilities getCapabilities() {
return null;
}
Added:
trunk/connector-api/src/main/java/com/metamatrix/connector/basic/BasicConnector.java
===================================================================
--- trunk/connector-api/src/main/java/com/metamatrix/connector/basic/BasicConnector.java
(rev 0)
+++
trunk/connector-api/src/main/java/com/metamatrix/connector/basic/BasicConnector.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -0,0 +1,29 @@
+/*
+ * 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 com.metamatrix.connector.basic;
+
+import com.metamatrix.connector.api.Connector;
+
+public abstract class BasicConnector implements Connector {
+
+}
Property changes on:
trunk/connector-api/src/main/java/com/metamatrix/connector/basic/BasicConnector.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
trunk/connector-api/src/main/java/com/metamatrix/connector/basic/BasicExecution.java
===================================================================
---
trunk/connector-api/src/main/java/com/metamatrix/connector/basic/BasicExecution.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-api/src/main/java/com/metamatrix/connector/basic/BasicExecution.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -22,31 +22,8 @@
package com.metamatrix.connector.basic;
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-
import com.metamatrix.connector.api.Execution;
public abstract class BasicExecution implements Execution {
- private List<Exception> warnings = new LinkedList<Exception>();
-
- /**
- * Add an exception as a warning to this Execution.
- */
- public void addWarning(Exception ex) {
- if (ex == null) {
- return;
- }
- this.warnings.add(ex);
- }
-
- @Override
- public List<Exception> getWarnings() {
- List<Exception> result = new ArrayList<Exception>(warnings);
- warnings.clear();
- return result;
- }
-
}
Modified:
trunk/connector-api/src/main/java/com/metamatrix/connector/basic/BasicValueTranslator.java
===================================================================
---
trunk/connector-api/src/main/java/com/metamatrix/connector/basic/BasicValueTranslator.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-api/src/main/java/com/metamatrix/connector/basic/BasicValueTranslator.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -25,37 +25,41 @@
package com.metamatrix.connector.basic;
import com.metamatrix.connector.DataPlugin;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
import com.metamatrix.connector.api.TypeFacility;
import com.metamatrix.connector.api.ValueTranslator;
-import com.metamatrix.connector.exception.ConnectorException;
/**
* BasicValueTranslator can translate between types using the standard {@link
TypeFacility}
* transformations.
*/
-public class BasicValueTranslator implements ValueTranslator {
- private Class sourceType;
- private Class targetType;
+public class BasicValueTranslator<S, T> implements ValueTranslator<S, T> {
+ private Class<S> sourceType;
+ private Class<T> targetType;
private TypeFacility typeFacility;
- public BasicValueTranslator(Class sourceType, Class targetType, TypeFacility
typeFacility) {
+ public static <S, T> BasicValueTranslator<S, T>
createTranslator(Class<S> sourceType, Class<T> targetType, TypeFacility
typeFacility) {
+ return new BasicValueTranslator<S, T>(sourceType, targetType, typeFacility);
+ }
+
+ public BasicValueTranslator(Class<S> sourceType, Class<T> targetType,
TypeFacility typeFacility) {
this.sourceType = sourceType;
this.targetType = targetType;
this.typeFacility = typeFacility;
}
- public Class getSourceType() {
+ public Class<S> getSourceType() {
return this.sourceType;
}
- public Class getTargetType() {
+ public Class<T> getTargetType() {
return this.targetType;
}
- public Object translate(Object value, ExecutionContext context) throws
ConnectorException {
+ public T translate(S value, ExecutionContext context) throws ConnectorException {
if (typeFacility.hasTransformation(sourceType, targetType)) {
- return typeFacility.transformValue(value, sourceType, targetType);
+ return (T)typeFacility.transformValue(value, sourceType, targetType);
}
throw new
ConnectorException(DataPlugin.Util.getString("ValueTranslator.no_tranfrom_found",
new Object[] {this.sourceType, this.targetType}));
}
Modified:
trunk/connector-api/src/main/java/com/metamatrix/connector/language/IBatchedUpdates.java
===================================================================
---
trunk/connector-api/src/main/java/com/metamatrix/connector/language/IBatchedUpdates.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-api/src/main/java/com/metamatrix/connector/language/IBatchedUpdates.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -36,5 +36,5 @@
* @return a list of IInsert, IUpdate and IDelete commands in this batched update.
* @since 4.2
*/
- List getUpdateCommands();
+ List<ICommand> getUpdateCommands();
}
Modified:
trunk/connector-api/src/main/java/com/metamatrix/connector/language/IBulkInsert.java
===================================================================
---
trunk/connector-api/src/main/java/com/metamatrix/connector/language/IBulkInsert.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-api/src/main/java/com/metamatrix/connector/language/IBulkInsert.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -25,7 +25,7 @@
import java.util.List;
/**
- * This is a simple variation of insert, where mulitple rows with single insert
+ * This is a simple variation of insert, where multiple rows with single insert
* will be loaded.
*/
public interface IBulkInsert extends IInsert {
@@ -34,11 +34,11 @@
* Get the list of row values for this bulk insert
* @return list; never null
*/
- List getRows();
+ List<List<?>> getRows();
/**
* Set the list of row values for this bulk insert
* @return list; never null
*/
- void setRows(List rows);
+ void setRows(List<List<?>> rows);
}
Modified:
trunk/connector-api/src/main/java/com/metamatrix/connector/language/ICommand.java
===================================================================
---
trunk/connector-api/src/main/java/com/metamatrix/connector/language/ICommand.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-api/src/main/java/com/metamatrix/connector/language/ICommand.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -29,7 +29,4 @@
*/
public interface ICommand extends ILanguageObject {
- //List<List> getPreparedValues();
-
- //void setPreparedValues(List<List>);
}
Modified:
trunk/connector-api/src/main/java/com/metamatrix/connector/language/ICompareCriteria.java
===================================================================
---
trunk/connector-api/src/main/java/com/metamatrix/connector/language/ICompareCriteria.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-api/src/main/java/com/metamatrix/connector/language/ICompareCriteria.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -28,13 +28,15 @@
*/
public interface ICompareCriteria extends IPredicateCriteria {
- public static final int EQ = 0;
- public static final int NE = 1;
- public static final int LT = 2;
- public static final int LE = 3;
- public static final int GT = 4;
- public static final int GE = 5;
-
+ public enum Operator {
+ EQ,
+ NE,
+ LT,
+ LE,
+ GT,
+ GE
+ }
+
/**
* Get left expression.
* @return Left expression
@@ -62,24 +64,24 @@
/**
* Get operator from set defined in this interface.
* @return Operator constant
- * @see #EQ
- * @see #NE
- * @see #LT
- * @see #LE
- * @see #GT
- * @see #GE
+ * @see Operator#EQ
+ * @see Operator#NE
+ * @see Operator#LT
+ * @see Operator#LE
+ * @see Operator#GT
+ * @see Operator#GE
*/
- int getOperator();
+ Operator getOperator();
/**
* Set operator from set defined in this interface.
* @param operator Operator constant
- * @see #EQ
- * @see #NE
- * @see #LT
- * @see #LE
- * @see #GT
- * @see #GE
+ * @see Operator#EQ
+ * @see Operator#NE
+ * @see Operator#LT
+ * @see Operator#LE
+ * @see Operator#GT
+ * @see Operator#GE
*/
- void setOperator(int operator);
+ void setOperator(Operator operator);
}
Modified:
trunk/connector-api/src/main/java/com/metamatrix/connector/language/ICompoundCriteria.java
===================================================================
---
trunk/connector-api/src/main/java/com/metamatrix/connector/language/ICompoundCriteria.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-api/src/main/java/com/metamatrix/connector/language/ICompoundCriteria.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -29,35 +29,37 @@
*/
public interface ICompoundCriteria extends ILogicalCriteria {
- public static final int AND = 0;
- public static final int OR = 1;
-
+ public enum Operator {
+ AND,
+ OR
+ }
+
/**
* Get operator used to connect these criteria.
* @return Operator constant
- * @see #AND
- * @see #OR
+ * @see Operator#AND
+ * @see Operator#OR
*/
- int getOperator();
+ Operator getOperator();
/**
* Set operator used to connect these criteria.
* @param operator Operator constant
- * @see #AND
- * @see #OR
+ * @see Operator#AND
+ * @see Operator#OR
*/
- void setOperator(int operator);
+ void setOperator(Operator operator);
/**
* Get list of ICriteria combined by this compound criteria.
* @return List of ICriteria
*/
- List getCriteria();
+ List<ICriteria> getCriteria();
/**
* Set list of ICriteria combined by this compound criteria.
* @param criteria List of ICriteria
*/
- void setCriteria(List criteria);
+ void setCriteria(List<ICriteria> criteria);
}
Modified: trunk/connector-api/src/main/java/com/metamatrix/connector/language/IFrom.java
===================================================================
---
trunk/connector-api/src/main/java/com/metamatrix/connector/language/IFrom.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-api/src/main/java/com/metamatrix/connector/language/IFrom.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -33,12 +33,12 @@
* Get a List of IFromItem in this FROM clause.
* @return List of IFromItem
*/
- List getItems();
+ List<IFromItem> getItems();
/**
* Set a List of IFromItem in this FROM clause.
* @param items List of IFromItem
*/
- void setItems(List items);
+ void setItems(List<IFromItem> items);
}
Modified:
trunk/connector-api/src/main/java/com/metamatrix/connector/language/IGroupBy.java
===================================================================
---
trunk/connector-api/src/main/java/com/metamatrix/connector/language/IGroupBy.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-api/src/main/java/com/metamatrix/connector/language/IGroupBy.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -33,12 +33,12 @@
* Get list of IExpression that the GROUP BY should be grouped on.
* @return List of IExpression
*/
- List getElements();
+ List<IExpression> getElements();
/**
* Set list of IExpression that the GROUP BY should be grouped on.
* @param elements List of IExpression
*/
- void setElements(List elements);
+ void setElements(List<IExpression> elements);
}
Modified:
trunk/connector-api/src/main/java/com/metamatrix/connector/language/IInCriteria.java
===================================================================
---
trunk/connector-api/src/main/java/com/metamatrix/connector/language/IInCriteria.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-api/src/main/java/com/metamatrix/connector/language/IInCriteria.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -33,12 +33,12 @@
* Get List of IExpression in the set on the right side of the criteria.
* @return List of IExpression
*/
- List getRightExpressions();
+ List<IExpression> getRightExpressions();
/**
* Set List of IExpression in the set on the right side of the criteria.
* @param expressions List of IExpression
*/
- void setRightExpressions(List expressions);
+ void setRightExpressions(List<IExpression> expressions);
}
Modified:
trunk/connector-api/src/main/java/com/metamatrix/connector/language/IInsert.java
===================================================================
---
trunk/connector-api/src/main/java/com/metamatrix/connector/language/IInsert.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-api/src/main/java/com/metamatrix/connector/language/IInsert.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -39,13 +39,13 @@
* Get list of elements being inserted into
* @return List of IElement
*/
- List getElements();
+ List<IElement> getElements();
/**
* Get list of values being inserted
* @return List of ILiteral
*/
- List getValues();
+ List<IExpression> getValues();
/**
* Set group that is being inserted into.
@@ -57,12 +57,12 @@
* Set list of elements being inserted into
* @param elements List of IElement
*/
- void setElements(List elements);
+ void setElements(List<IElement> elements);
/**
* Set list of values being inserted
- * @param values List of ILiteral
+ * @param values List of IExpression
*/
- void setValues(List values);
+ void setValues(List<IExpression> values);
}
Modified: trunk/connector-api/src/main/java/com/metamatrix/connector/language/IJoin.java
===================================================================
---
trunk/connector-api/src/main/java/com/metamatrix/connector/language/IJoin.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-api/src/main/java/com/metamatrix/connector/language/IJoin.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -30,12 +30,14 @@
*/
public interface IJoin extends IFromItem {
- public static final int INNER_JOIN = 0;
- public static final int CROSS_JOIN = 1;
- public static final int LEFT_OUTER_JOIN = 2;
- public static final int RIGHT_OUTER_JOIN = 3;
- public static final int FULL_OUTER_JOIN = 4;
-
+ public enum JoinType {
+ INNER_JOIN,
+ CROSS_JOIN,
+ LEFT_OUTER_JOIN,
+ RIGHT_OUTER_JOIN,
+ FULL_OUTER_JOIN
+ }
+
/**
* Get the left IFromItem
* @return From item
@@ -51,19 +53,19 @@
/**
* Get join type
* @return Join type
- * @see #INNER_JOIN
- * @see #CROSS_JOIN
- * @see #LEFT_OUTER_JOIN
- * @see #RIGHT_OUTER_JOIN
- * @see #FULL_OUTER_JOIN
+ * @see JoinType#INNER_JOIN
+ * @see JoinType#CROSS_JOIN
+ * @see JoinType#LEFT_OUTER_JOIN
+ * @see JoinType#RIGHT_OUTER_JOIN
+ * @see JoinType#FULL_OUTER_JOIN
*/
- int getJoinType();
+ JoinType getJoinType();
/**
* Return List of CompareCriteria specifying join criteria.
* @return List of CompareCriteria
*/
- List getCriteria();
+ List<ICriteria> getCriteria();
/**
* Set the left IFromItem
@@ -80,17 +82,17 @@
/**
* Set join type
* @param type Join type
- * @see #INNER_JOIN
- * @see #CROSS_JOIN
- * @see #LEFT_OUTER_JOIN
- * @see #RIGHT_OUTER_JOIN
- * @see #FULL_OUTER_JOIN
+ * @see JoinType#INNER_JOIN
+ * @see JoinType#CROSS_JOIN
+ * @see JoinType#LEFT_OUTER_JOIN
+ * @see JoinType#RIGHT_OUTER_JOIN
+ * @see JoinType#FULL_OUTER_JOIN
*/
- void setJoinType(int type);
+ void setJoinType(JoinType type);
/**
* Set List of CompareCriteria specifying join criteria.
- * @param criteria List of CompareCriteria
+ * @param criteria List of Criteria
*/
- void setCriteria(List criteria);
+ void setCriteria(List<ICriteria> criteria);
}
Modified:
trunk/connector-api/src/main/java/com/metamatrix/connector/language/ILanguageFactory.java
===================================================================
---
trunk/connector-api/src/main/java/com/metamatrix/connector/language/ILanguageFactory.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-api/src/main/java/com/metamatrix/connector/language/ILanguageFactory.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -24,6 +24,8 @@
import java.util.List;
+import com.metamatrix.connector.language.ICompoundCriteria.Operator;
+import com.metamatrix.connector.language.IParameter.Direction;
import com.metamatrix.connector.metadata.runtime.MetadataID;
/**
@@ -52,7 +54,7 @@
* @param type Data type
* @return New ICaseExpression
*/
- ICaseExpression createCaseExpression(IExpression mainExpression, List
whenExpressions, List thenExpressions, IExpression elseExpression, Class type);
+ ICaseExpression createCaseExpression(IExpression mainExpression,
List<IExpression> whenExpressions, List<IExpression> thenExpressions,
IExpression elseExpression, Class type);
/**
* Create compare criteria.
@@ -61,16 +63,16 @@
* @param rightExpression Right expression
* @return New ICompareCriteria
*/
- ICompareCriteria createCompareCriteria(int operator, IExpression leftExpression,
IExpression rightExpression);
+ ICompareCriteria createCompareCriteria(ICompareCriteria.Operator operator,
IExpression leftExpression, IExpression rightExpression);
/**
* Create a new ICompoundCriteria
- * @param operator Operator, as defined by {@link ICompoundCriteria#AND} or
- * {@link ICompoundCriteria#OR}
+ * @param operator Operator, as defined by {@link Operator#AND} or
+ * {@link Operator#OR}
* @param innerCriteria List of ICriteria, typically containing two criteria
* @return New ICompoundCriteria
*/
- ICompoundCriteria createCompoundCriteria(int operator, List innerCriteria);
+ ICompoundCriteria createCompoundCriteria(ICompoundCriteria.Operator operator,
List<ICriteria> innerCriteria);
/**
* Create a new IDelete.
@@ -102,7 +104,7 @@
* @param items List of IFromItem
* @return New IFrom
*/
- IFrom createFrom(List items);
+ IFrom createFrom(List<IFromItem> items);
/**
* Create new function
@@ -127,7 +129,7 @@
* @param items List of IGroupByItem
* @return New IGroupBy
*/
- IGroupBy createGroupBy(List items);
+ IGroupBy createGroupBy(List<IExpression> items);
/**
* Create new IN criteria
@@ -136,7 +138,7 @@
* @param isNegated True if NOT IN, false for IN
* @return New IInCriteria
*/
- IInCriteria createInCriteria(IExpression leftExpression, List rightExpressions,
boolean isNegated);
+ IInCriteria createInCriteria(IExpression leftExpression, List<IExpression>
rightExpressions, boolean isNegated);
/**
* Create new inline view
@@ -153,17 +155,16 @@
* @param values List of IExpression (usually ILiteral)
* @return New IInsert
*/
- IInsert createInsert(IGroup group, List columns, List values);
+ IInsert createInsert(IGroup group, List<IElement> columns,
List<IExpression> values);
/**
* Create new bulk insert command
* @param group Insert group
* @param columns List of IElement being inserted into
- * @param List of Rows which contain --> List(s) of values, which are usally
- * List of IExpression (usually ILiteral)
+ * @param List of Lists containing the actual values
* @return New IBulkInsert
*/
- IBulkInsert createBulkInsert(IGroup group, List columns, List rows);
+ IBulkInsert createBulkInsert(IGroup group, List<IElement> columns,
List<List<Object>> rows);
/**
* Create new IS NULL criteria
@@ -181,7 +182,7 @@
* @param criteria List of ICriteria (considered to be AND'ed together)
* @return New IJoin
*/
- IJoin createJoin(int joinType, IFromItem leftItem, IFromItem rightItem, List
criteria);
+ IJoin createJoin(IJoin.JoinType joinType, IFromItem leftItem, IFromItem rightItem,
List<ICriteria> criteria);
/**
* Create new LIKE criteria
@@ -213,7 +214,7 @@
* @param items List of IOrderByItem
* @return New IOrderBy
*/
- IOrderBy createOrderBy(List items);
+ IOrderBy createOrderBy(List<IOrderByItem> items);
/**
* Create new ORDER BY item
@@ -233,7 +234,7 @@
* @param metadataReference Metadata identifier reference
* @return New IParameter
*/
- IParameter createParameter(int index, int direction, Object value, Class type,
MetadataID metadataReference);
+ IParameter createParameter(int index, Direction direction, Object value, Class type,
MetadataID metadataReference);
/**
* Create new procedure
@@ -242,7 +243,7 @@
* @param metadataReference Metadata identifier reference
* @return New IProcedure
*/
- IProcedure createProcedure(String name, List parameters, MetadataID
metadataReference);
+ IProcedure createProcedure(String name, List<IParameter> parameters, MetadataID
metadataReference);
/**
* Create new query
@@ -273,7 +274,7 @@
* @param type Data type
* @return New ICaseExpression
*/
- ISearchedCaseExpression createSearchedCaseExpression(List whenExpressions, List
thenExpressions, IExpression elseExpression, Class type);
+ ISearchedCaseExpression createSearchedCaseExpression(List<IExpression>
whenExpressions, List<IExpression> thenExpressions, IExpression elseExpression,
Class type);
/**
* Create new SELECT clause
@@ -281,7 +282,7 @@
* @param selectSymbols List of ISelectSymbol
* @return New ISelect
*/
- ISelect createSelect(boolean isDistinct, List selectSymbols);
+ ISelect createSelect(boolean isDistinct, List<ISelectSymbol> selectSymbols);
/**
* Create new select symbol
@@ -299,7 +300,7 @@
* @param subquery Right subquery
* @return New ISubqueryCompareCriteria
*/
- ISubqueryCompareCriteria createSubqueryCompareCriteria(IExpression leftExpression,
int operator, int quantifier, IQuery subquery);
+ ISubqueryCompareCriteria createSubqueryCompareCriteria(IExpression leftExpression,
ICompareCriteria.Operator operator, ISubqueryCompareCriteria.Quantifier quantifier, IQuery
subquery);
/**
* Create new subquery IN criteria
Modified:
trunk/connector-api/src/main/java/com/metamatrix/connector/language/IOrderBy.java
===================================================================
---
trunk/connector-api/src/main/java/com/metamatrix/connector/language/IOrderBy.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-api/src/main/java/com/metamatrix/connector/language/IOrderBy.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -38,12 +38,12 @@
* Get list of {@link IOrderByItem}s specifying the ordering of the results.
* @return List of IOrderByItem
*/
- List getItems();
+ List<IOrderByItem> getItems();
/**
* Set list of {@link IOrderByItem}s specifying the ordering of the results.
* @param items List of IOrderByItem
*/
- void setItems(List items);
+ void setItems(List<IOrderByItem> items);
}
Modified:
trunk/connector-api/src/main/java/com/metamatrix/connector/language/IParameter.java
===================================================================
---
trunk/connector-api/src/main/java/com/metamatrix/connector/language/IParameter.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-api/src/main/java/com/metamatrix/connector/language/IParameter.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -26,13 +26,15 @@
* Represents an execution parameter.
*/
public interface IParameter extends ILanguageObject, IMetadataReference {
+
+ public enum Direction {
+ IN,
+ OUT,
+ INOUT,
+ RETURN,
+ RESULT_SET
+ }
- public static final int IN = 0;
- public static final int OUT = 1;
- public static final int INOUT = 2;
- public static final int RETURN = 3;
- public static final int RESULT_SET = 4;
-
/**
* Get index of this parameter in the IExecution.
* @return Index of the parameter
@@ -42,12 +44,12 @@
/**
* Get direction of parameter
* @return Direction
- * @see #IN
- * @see #OUT
- * @see #INOUT
- * @see #RETURN
+ * @see Direction#IN
+ * @see Direction#OUT
+ * @see Direction#INOUT
+ * @see Direction#RETURN
*/
- int getDirection();
+ Direction getDirection();
/**
* Get type of parameter, defined as a Java class. Output result sets will
@@ -84,12 +86,12 @@
/**
* Set direction of parameter
* @param direction Direction
- * @see #IN
- * @see #OUT
- * @see #INOUT
- * @see #RETURN
+ * @see Direction#IN
+ * @see Direction#OUT
+ * @see Direction#INOUT
+ * @see Direction#RETURN
*/
- void setDirection(int direction);
+ void setDirection(Direction direction);
/**
* Set type of parameter, defined as a Java class. Output result sets will
Modified:
trunk/connector-api/src/main/java/com/metamatrix/connector/language/IProcedure.java
===================================================================
---
trunk/connector-api/src/main/java/com/metamatrix/connector/language/IProcedure.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-api/src/main/java/com/metamatrix/connector/language/IProcedure.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -40,7 +40,7 @@
* The parameters describe inputs and outputs.
* @return List of IParameter
*/
- List getParameters();
+ List<IParameter> getParameters();
/**
* Sets the name of the procedure.
@@ -53,6 +53,6 @@
* The parameters describe inputs and outputs.
* @param parameters List of IParameter
*/
- void setParameters(List parameters);
+ void setParameters(List<IParameter> parameters);
}
Modified:
trunk/connector-api/src/main/java/com/metamatrix/connector/language/ISelect.java
===================================================================
---
trunk/connector-api/src/main/java/com/metamatrix/connector/language/ISelect.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-api/src/main/java/com/metamatrix/connector/language/ISelect.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -33,7 +33,7 @@
* Get List of ISelectSymbol.
* @return List of ISelectSymbol
*/
- List getSelectSymbols();
+ List<ISelectSymbol> getSelectSymbols();
/**
* Determine whether the DISTINCT flag is used in this SELECT.
@@ -45,7 +45,7 @@
* Set List of ISelectSymbol.
* @param symbols List of ISelectSymbol
*/
- void setSelectSymbols(List symbols);
+ void setSelectSymbols(List<ISelectSymbol> symbols);
/**
* Set whether the DISTINCT flag is used in this SELECT.
Modified:
trunk/connector-api/src/main/java/com/metamatrix/connector/language/ISubqueryCompareCriteria.java
===================================================================
---
trunk/connector-api/src/main/java/com/metamatrix/connector/language/ISubqueryCompareCriteria.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-api/src/main/java/com/metamatrix/connector/language/ISubqueryCompareCriteria.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -29,16 +29,10 @@
*/
public interface ISubqueryCompareCriteria extends IPredicateCriteria, ISubqueryContainer
{
- public static final int EQ = 1;
- public static final int NE = 2;
- public static final int LT = 3;
- public static final int LE = 4;
- public static final int GT = 5;
- public static final int GE = 6;
-
- public static final int SOME = 0;
- public static final int ALL = 1;
-
+ public enum Quantifier {
+ SOME,
+ ALL
+ }
/**
* Get left expression.
* @return Left expression
@@ -55,15 +49,15 @@
* @see #GT
* @see #GE
*/
- int getOperator();
+ ICompareCriteria.Operator getOperator();
/**
* Get quantifier.
* @return Quantifier constant
- * @see #SOME
- * @see #ALL
+ * @see Quantifier#SOME
+ * @see Quantifier#ALL
*/
- int getQuantifier();
+ Quantifier getQuantifier();
/**
* Set left expression.
@@ -81,15 +75,15 @@
* @see #GT
* @see #GE
*/
- void setOperator(int operator);
+ void setOperator(ICompareCriteria.Operator operator);
/**
* Set quantifier.
* @param quantifier Quantifier constant
- * @see #SOME
- * @see #ALL
+ * @see Quantifier#SOME
+ * @see Quantifier#ALL
*/
- void setQuantifier(int quantifier);
+ void setQuantifier(Quantifier quantifier);
}
Modified:
trunk/connector-api/src/main/java/com/metamatrix/connector/language/LanguageUtil.java
===================================================================
---
trunk/connector-api/src/main/java/com/metamatrix/connector/language/LanguageUtil.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-api/src/main/java/com/metamatrix/connector/language/LanguageUtil.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -23,9 +23,9 @@
package com.metamatrix.connector.language;
import java.util.*;
-import java.util.Collections;
-import java.util.List;
+import com.metamatrix.connector.language.ICompoundCriteria.Operator;
+
/**
* Helpful utility methods to work with language interfaces.
*/
@@ -66,7 +66,7 @@
private static void separateCriteria(ICriteria crit, List parts) {
if(crit instanceof ICompoundCriteria) {
ICompoundCriteria compCrit = (ICompoundCriteria) crit;
- if(compCrit.getOperator() == ICompoundCriteria.AND) {
+ if(compCrit.getOperator() == Operator.AND) {
List subCrits = compCrit.getCriteria();
Iterator iter = subCrits.iterator();
while(iter.hasNext()) {
@@ -97,7 +97,7 @@
return additionalCrit;
} else if(additionalCrit == null) {
return primaryCrit;
- } else if((primaryCrit instanceof ICompoundCriteria) &&
((ICompoundCriteria)primaryCrit).getOperator() == ICompoundCriteria.AND) {
+ } else if((primaryCrit instanceof ICompoundCriteria) &&
((ICompoundCriteria)primaryCrit).getOperator() == Operator.AND) {
ICompoundCriteria primaryCompound = (ICompoundCriteria) primaryCrit;
primaryCompound.getCriteria().add(additionalCrit);
return primaryCrit;
@@ -105,7 +105,7 @@
List crits = new ArrayList(2);
crits.add(primaryCrit);
crits.add(additionalCrit);
- ICompoundCriteria compCrit =
languageFactory.createCompoundCriteria(ICompoundCriteria.AND, crits);
+ ICompoundCriteria compCrit =
languageFactory.createCompoundCriteria(Operator.AND, crits);
return compCrit;
}
}
Modified:
trunk/connector-api/src/main/java/com/metamatrix/connector/metadata/runtime/Element.java
===================================================================
---
trunk/connector-api/src/main/java/com/metamatrix/connector/metadata/runtime/Element.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-api/src/main/java/com/metamatrix/connector/metadata/runtime/Element.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -26,7 +26,7 @@
*/
package com.metamatrix.connector.metadata.runtime;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
/**
* Represents an element, such as a column, in runtime metadata.
Modified:
trunk/connector-api/src/main/java/com/metamatrix/connector/metadata/runtime/MetadataID.java
===================================================================
---
trunk/connector-api/src/main/java/com/metamatrix/connector/metadata/runtime/MetadataID.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-api/src/main/java/com/metamatrix/connector/metadata/runtime/MetadataID.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -24,7 +24,7 @@
import java.util.List;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
/**
* Represents a runtime metadata identifier.
@@ -52,7 +52,7 @@
* A procedure ID will return the IDs of it's parameters.
* @return List of MetadataID, which may be empty but never null
*/
- List getChildIDs() throws ConnectorException;
+ List<MetadataID> getChildIDs() throws ConnectorException;
/**
* Get the parent ID if one exists
Modified:
trunk/connector-api/src/main/java/com/metamatrix/connector/metadata/runtime/MetadataObject.java
===================================================================
---
trunk/connector-api/src/main/java/com/metamatrix/connector/metadata/runtime/MetadataObject.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-api/src/main/java/com/metamatrix/connector/metadata/runtime/MetadataObject.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -24,7 +24,7 @@
import java.util.Properties;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
/**
* Represents a runtime metadata object.
Modified:
trunk/connector-api/src/main/java/com/metamatrix/connector/metadata/runtime/Parameter.java
===================================================================
---
trunk/connector-api/src/main/java/com/metamatrix/connector/metadata/runtime/Parameter.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-api/src/main/java/com/metamatrix/connector/metadata/runtime/Parameter.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -22,7 +22,7 @@
package com.metamatrix.connector.metadata.runtime;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
/**
* Represents a procedure parameter in the runtime metadata.
Modified:
trunk/connector-api/src/main/java/com/metamatrix/connector/metadata/runtime/RuntimeMetadata.java
===================================================================
---
trunk/connector-api/src/main/java/com/metamatrix/connector/metadata/runtime/RuntimeMetadata.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-api/src/main/java/com/metamatrix/connector/metadata/runtime/RuntimeMetadata.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -22,7 +22,7 @@
package com.metamatrix.connector.metadata.runtime;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
/**
* Helper methods that can be used to access runtime metadata.
Modified:
trunk/connector-api/src/main/java/com/metamatrix/connector/metadata/runtime/TypeModel.java
===================================================================
---
trunk/connector-api/src/main/java/com/metamatrix/connector/metadata/runtime/TypeModel.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-api/src/main/java/com/metamatrix/connector/metadata/runtime/TypeModel.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -22,7 +22,7 @@
package com.metamatrix.connector.metadata.runtime;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
/**
Modified:
trunk/connector-api/src/main/java/com/metamatrix/connector/pool/ConnectorIdentity.java
===================================================================
---
trunk/connector-api/src/main/java/com/metamatrix/connector/pool/ConnectorIdentity.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-api/src/main/java/com/metamatrix/connector/pool/ConnectorIdentity.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -24,7 +24,6 @@
*/
package com.metamatrix.connector.pool;
-import com.metamatrix.connector.api.ExecutionContext;
/**
* Represents the identity of a connection in the pool. Identities are
@@ -33,11 +32,5 @@
* {@link java.lang.Object#hashCode()} methods.
*/
public interface ConnectorIdentity {
-
- /**
- * Get the security context that was used to create this identity.
- * @return The original context
- * @deprecated see {@link ExecutionContext#getConnectorIdentity()}
- */
- ExecutionContext getSecurityContext();
+
}
Modified:
trunk/connector-api/src/main/java/com/metamatrix/connector/pool/ConnectorIdentityFactory.java
===================================================================
---
trunk/connector-api/src/main/java/com/metamatrix/connector/pool/ConnectorIdentityFactory.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-api/src/main/java/com/metamatrix/connector/pool/ConnectorIdentityFactory.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -22,16 +22,13 @@
package com.metamatrix.connector.pool;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
-import com.metamatrix.connector.exception.ConnectorException;
public interface ConnectorIdentityFactory {
/**
- * Create an identity object based on a security context. This method determines
- * how different security contexts are treated within the connection pool. For
- * example, using a {@link SingleIdentity} specifies that ALL contexts are treated
- * equally and thus use the same pool.
+ * Create an identity object based on a security context.
*
* If single identity is not supported then an exception should be thrown when a
* null context is supplied.
Deleted:
trunk/connector-api/src/main/java/com/metamatrix/connector/pool/CredentialMap.java
===================================================================
---
trunk/connector-api/src/main/java/com/metamatrix/connector/pool/CredentialMap.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-api/src/main/java/com/metamatrix/connector/pool/CredentialMap.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -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 com.metamatrix.connector.pool;
-
-import java.io.Serializable;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import com.metamatrix.connector.DataPlugin;
-import com.metamatrix.connector.api.ConnectorEnvironment;
-import com.metamatrix.connector.api.ExecutionContext;
-import com.metamatrix.connector.exception.ConnectorException;
-import com.metamatrix.core.util.StringUtil;
-
-/**
- * Allows credentials to be passed on a per user basis to a connector.
- *
- * A CredentialsMap object is produced based on information provided in the JDBC
- * URL. The static method parseCredentials() is used for this purpose.
- *
- * This CredentialMap serves as the session "trusted payload".
- *
- * It is the responsibility of a Connector to call
- * {@link ExecutionContext#getTrustedPayload()} to retrieve the CredentialMap.
- *
- * The system name should be the same as the Connector Binding Name retrieved from
- * {@link ConnectorEnvironment#getConnectorName()}.
- *
- * To get the keyword/value pairs use getSystemCredentials(systemName), this will
- * return a Map that contains the properties for the specified system.
- *
- * Specific user and password values can be retrieved with
- * getUser(systemName) and getPassword(systemName)
- */
-public class CredentialMap implements Serializable {
- //Parsing keywords for system, user, and password. Comparison is done
- //ignoring case.
- public final static String SYSTEM_KEYWORD = "system"; //$NON-NLS-1$
- public final static String USER_KEYWORD = "user"; //$NON-NLS-1$
- public final static String PASSWORD_KEYWORD = "password"; //$NON-NLS-1$
- public final static String ESCAPE_CHAR = "\\"; //$NON-NLS-1$
- public final static String DEFAULT_SYSTEM = "default"; //$NON-NLS-1$
-
- private final static String ESCAPE_SLASH = "ESCAPE_SLASH"; // forward
slash //$NON-NLS-1$
- private final static String ESCAPE_COMMA = "ESCAPE_COMMA"; // comma
//$NON-NLS-1$
- private final static String ESCAPE_EQUAL = "ESCAPE_EQUAL"; // equals
//$NON-NLS-1$
-// private final static String ESCAPE_SEMI = "ESCAPE_SEMI"; // semicolon
-// private final static String ESCAPE_CLOSE_PAREN = "ESCAPE_CLOSE_PAREN"; //
closing paren
-
-
- private final static String[] escape_chars = {
- ESCAPE_CHAR + "/", // forward
slash //$NON-NLS-1$
- ESCAPE_CHAR + ",", // comma
//$NON-NLS-1$
- ESCAPE_CHAR + "="}; // equals
//$NON-NLS-1$
-// ESCAPE_CHAR + ";", //
semicolon
-// ESCAPE_CHAR + ")"}; // closing
paren
-
- private final static String[] escape_strings = {
- ESCAPE_SLASH, // forward slash
- ESCAPE_COMMA, // comma
- ESCAPE_EQUAL }; // equals
-// ESCAPE_SEMI, // semicolon
-// ESCAPE_CLOSE_PAREN }; // closing paren
-
- /**
- * In this mode, the CredentialMap will ignore the default credentials
- * and only credentials set for a system will be exposed. This is the
- * default setting for the CredentialMap.
- */
- public static final short MODE_IGNORE_DEFAULTS = 0;
-
- /**
- * In this mode, the default credentials will be returned for any system,
- * overlaid with any system-specific credentials. If a system is unknown,
- * all default credentials are returned for that system.
- */
- public static final short MODE_USE_DEFAULTS_GLOBALLY = 1;
-
- /**
- * In this mode, the default credentials will be returned for any system,
- * overlaid with any system-specific credentials. If a system is unknown,
- * the default credentials are NOT used.
- */
- public static final short MODE_USE_DEFAULTS_ON_EXISTING = 2;
-
- /**
- * The map of map of credentials (keyed by system name, upper case).
- */
- private Map map = new HashMap();
-
- private short defaultCredentialMode = MODE_IGNORE_DEFAULTS;
- private Map defaultCredentials;
-
-
- /**
- * Method to parse a credentials substring extracted from a JDBC URL. The
- * presumed command line syntax is ...;credentials=(...);...
- * Only the substring starting and ending with the parentheses is passed to
- * this method. That is, the first non-blank character must be a '(' and the
- * last non-blank character must be a ')', or an exception will be thrown.
- *
- * Syntax is: (credentialspec1/credentialspec2/.../credentialspecn)
- *
- * Any number one or greater of credential specifications may be included,
- * separated by '/' characters.
- *
- * Each credentials spec will be specified in the following way:
- * Keyword-specified, order-independent name-value pairs of the form
- * keyword=value. The only required keyword is "system", which must be
specified
- * for each credentials spec, and must have a value corresponding to the name of an
EIS
- * already known to the system.
- *
- * Ex: system=sys1,user=sys1un,pass=sys1pw, whatever=somevalue.
- * Each of the keywords must be unique.
- *
- * All blank space is ignored, except within a keyword or value.
- *
- * Any syntax error will cause an Exception to be thrown.
- *
- * @param inputStr the string to be parsed; first non-blank must be a '(',
last non-blank must be a ')'
- * @return a CredentialMap containing the input
- * @throws ConnectorException upon any syntax error; descriptive text included
- */
- public static CredentialMap parseCredentials(String inputStr) throws ConnectorException
{
-
- for (int i = 0; i < escape_chars.length; i++) {
- inputStr = StringUtil.replaceAll(inputStr, escape_chars[i], escape_strings[i]);
- }
-
- if (inputStr == null) {
- throw new
ConnectorException(DataPlugin.Util.getString("CredentialMap.Null_input"));
//$NON-NLS-1$
- }
-
- inputStr = inputStr.trim();
-
- CredentialMap credentialMap = new CredentialMap(); // map of maps keyed on system
- int strLen = inputStr.length();
-
- //Check that not empty
-
- if (strLen == 0) {
- throw new
ConnectorException(DataPlugin.Util.getString("CredentialMap.Empty_input"));
//$NON-NLS-1$
- }
-
- //Check that first non-blank char is left paren
- if (!inputStr.startsWith("(")|| !inputStr.endsWith(")")) {
//$NON-NLS-1$ //$NON-NLS-2$
- throw new
ConnectorException(DataPlugin.Util.getString("CredentialMap.Missing_parens"));
//$NON-NLS-1$
- }
-
- // strip of ()'s
- inputStr = inputStr.substring(1, inputStr.length()-1);
-
- List credentials = StringUtil.getTokens(inputStr, "/"); //$NON-NLS-1$
- Iterator credentialIter = credentials.iterator();
-
- while (credentialIter.hasNext()) {
- String credential = (String) credentialIter.next();
-
- // Convert the escaped "/" since we already parsed on the "/"
- credential = StringUtil.replaceAll(credential, escape_strings[0], "/");
//$NON-NLS-1$
-
- Map newMap = getCredentialMap(credential.trim());
- String system = (String) newMap.get(SYSTEM_KEYWORD);
- if (system == null || system.length() == 0) {
- throw new
ConnectorException(DataPlugin.Util.getString("CredentialMap.Missing_system_prop"));
//$NON-NLS-1$
- }
- credentialMap.addSystemCredentials(system, newMap); // add to Map of Maps.
- }
- return credentialMap;
- }
-
-
- /**
- * Takes a string containing key/value pairs.
- * Example "propName1=propValue1,propName2,propValue2,....."
- * and returns a map of key/value pairs.
- */
- private static Map getCredentialMap(String credential) {
- List propList = StringUtil.getTokens(credential, ","); //$NON-NLS-1$
- Iterator propIter = propList.iterator();
- Map map = new HashMap();
- while (propIter.hasNext()) {
- String propVal = (String) propIter.next();
- List pvList = StringUtil.getTokens(propVal, "="); //$NON-NLS-1$
- String key = null;
- String val = null;
- if (pvList.size() > 0) {
- key = (String) pvList.get(0);
- key = key.trim();
- }
- if (pvList.size() > 1) {
- val = (String) pvList.get(1);
- val = val.trim();
- // put back the escaped "," and "=" since we already parsed on
these.
- val = StringUtil.replaceAll(val, escape_strings[1], ","); //$NON-NLS-1$
- val = StringUtil.replaceAll(val, escape_strings[2], "="); //$NON-NLS-1$
- }
- map.put(key,val);
- }
- return map;
- }
-
- public CredentialMap() {
- super();
- }
-
- /**
- * Method to return an array of systems that have been added to this
- * CredentialMap.
- *
- * @return array of the systems that have been added using addSystemCredentials() -
always uppercase
- */
- public String[] getSystems() {
- Set keySet = map.keySet();
- String[] keys = new String[keySet.size()];
- Iterator it = keySet.iterator();
- for (int i = 0; it.hasNext(); i++) {
- keys[i] = (String)it.next();
- }
- return keys;
- }
-
- /**
- * Method to add a user name and credentials (e.g. password) for a system
- *
- * @param system system name corresponding to the user and credentials
- * @param credentials Map containing name/val pairs
- */
- public void addSystemCredentials(String system, Map credentials) {
- map.put(system.toUpperCase(), credentials);
- }
-
- /**
- * Set the default credentials to use with this credential map. See the
- * various default credential modes to understand when and how these will
- * be returned.
- *
- * @param defaultCredentials Map of credentials
- * @since 4.3
- */
- public void setDefaultCredentials(Map defaultCredentials) {
- this.defaultCredentials = defaultCredentials;
- }
-
- /**
- * Set the default credential mode to determine when default credentials should
- * be returned.
- *
- * @param mode The mode
- * @see #MODE_IGNORE_DEFAULTS
- * @see #MODE_USE_DEFAULTS_GLOBALLY
- * @see #MODE_USE_DEFAULTS_ON_EXISTING
- * @since 4.3
- */
- public void setDefaultCredentialMode(short mode) {
- this.defaultCredentialMode = mode;
- }
-
- /**
- * Method to return the credentials map for a system
- *
- * @param systemName system name
- * @return Map
- */
- public Map getSystemCredentials(String systemName) {
- Map systemCredentials = (Map)map.get(systemName.toUpperCase());
-
- // If ignoring defaults, return just as is
- if(this.defaultCredentialMode == MODE_IGNORE_DEFAULTS) {
- return systemCredentials;
- }
-
- // Pre-load the credential set to return with the defaults if
- // 1. defaults exist
- // 2. AND using defaults globally
- // 3. OR (using defaults on existing AND system credentials exist)
- Map workingMap = null;
- if(this.defaultCredentials != null &&
- (this.defaultCredentialMode == MODE_USE_DEFAULTS_GLOBALLY ||
- (this.defaultCredentialMode ==
MODE_USE_DEFAULTS_ON_EXISTING &&
- systemCredentials != null))) {
-
- workingMap = new HashMap();
- workingMap.putAll(defaultCredentials);
- }
-
- // Apply system credentials over the top if they exist
- if(systemCredentials != null) {
- if(workingMap == null) {
- workingMap = new HashMap();
- }
- workingMap.putAll(systemCredentials);
- }
-
- return workingMap;
- }
-
- /**
- * Get the user property for the specified system, if it exists. The
- * user property is defined by the static constant {@link #USER_KEYWORD}.
- *
- * @param systemName The system to look up (case insensitive)
- * @return The user name for this system if the system was found and the system had a
user property
- * @since 4.3
- */
- public String getUser(String systemName) {
- Map credentials = getSystemCredentials(systemName);
- if(credentials != null) {
- return (String) credentials.get(USER_KEYWORD);
- }
-
- return null;
- }
-
- /**
- * Get the password property for the specified system, if it exists. The
- * password property is defined by the static constant {@link #PASSWORD_KEYWORD}.
- *
- * @param systemName The system to look up (case insensitive)
- * @return The password for this system if the system was found and the system had a
password property
- * @since 4.3
- */
- public String getPassword(String systemName) {
- Map credentials = getSystemCredentials(systemName);
- if(credentials != null) {
- return (String) credentials.get(PASSWORD_KEYWORD);
- }
-
- return null;
- }
-
- public String toString() {
- StringBuffer b = new StringBuffer();
- String[] systems = this.getSystems();
- for (int i=0; i < systems.length; i++) {
- String system = systems[i];
- Map map = this.getSystemCredentials(system);
- b.append("\n"); //$NON-NLS-1$
- b.append(system);
- b.append("\n"); //$NON-NLS-1$
- Iterator iter = map.keySet().iterator();
- while (iter.hasNext()) {
- Object key = iter.next();
- b.append("\t"); //$NON-NLS-1$
- b.append(key);
- b.append("="); //$NON-NLS-1$
- b.append(map.get(key));
- b.append("\n"); //$NON-NLS-1$
- }
- }
- return b.toString();
- }
-
-}//end CredentialMap
-
-
Modified:
trunk/connector-api/src/main/java/com/metamatrix/connector/pool/PoolAwareConnection.java
===================================================================
---
trunk/connector-api/src/main/java/com/metamatrix/connector/pool/PoolAwareConnection.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-api/src/main/java/com/metamatrix/connector/pool/PoolAwareConnection.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -25,18 +25,13 @@
package com.metamatrix.connector.pool;
import com.metamatrix.connector.api.Connection;
+import com.metamatrix.connector.api.ConnectorException;
/**
* Pooled Connections can optionally implement this interface to provide implementations
* for Connection testing and pool life-cycle events.
*/
public interface PoolAwareConnection extends Connection {
-
- /**
- * Called by the pool to determine whether the connection is open
- * @return True if open, false if closed or failed.
- */
- boolean isAlive();
/**
* Called by the pool to indicate that the connection was returned to the pool.
@@ -44,4 +39,12 @@
*/
void closeCalled();
+ /**
+ * Called by the pool when an existing connection is leased so that the underlying
+ * Connection may have it's identity switched to a different user.
+ * @param identity
+ * @throws ConnectorException
+ */
+ void setConnectorIdentity(ConnectorIdentity identity) throws ConnectorException;
+
}
Modified:
trunk/connector-api/src/main/java/com/metamatrix/connector/pool/SingleIdentity.java
===================================================================
---
trunk/connector-api/src/main/java/com/metamatrix/connector/pool/SingleIdentity.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-api/src/main/java/com/metamatrix/connector/pool/SingleIdentity.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -30,25 +30,15 @@
* This class represents a single ConnectorIdentity. All the connections are treated the
same.
*/
public class SingleIdentity implements ConnectorIdentity {
- private ExecutionContext context;
/**
* Construct with a context
* @param context The context
*/
public SingleIdentity(ExecutionContext context){
- this.context = context;
}
/**
- * Get the original context
- * @return The original context
- */
- public ExecutionContext getSecurityContext() {
- return this.context;
- }
-
- /**
* Return true for everything - all identities are identical.
*/
public boolean equals(Object obj){
@@ -56,9 +46,6 @@
}
public String toString(){
- if (context != null) {
- return "SingleIdentity:
atomic-request="+this.context.getRequestIdentifier()+"."+this.context.getPartIdentifier()+"."+this.context.getExecutionCountIdentifier();
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
return "SingleIdentity"; //$NON-NLS-1$
}
Modified:
trunk/connector-api/src/main/java/com/metamatrix/connector/pool/SingleIdentityFactory.java
===================================================================
---
trunk/connector-api/src/main/java/com/metamatrix/connector/pool/SingleIdentityFactory.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-api/src/main/java/com/metamatrix/connector/pool/SingleIdentityFactory.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -22,8 +22,8 @@
package com.metamatrix.connector.pool;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
-import com.metamatrix.connector.exception.ConnectorException;
public class SingleIdentityFactory implements ConnectorIdentityFactory {
Modified:
trunk/connector-api/src/main/java/com/metamatrix/connector/pool/UserIdentity.java
===================================================================
---
trunk/connector-api/src/main/java/com/metamatrix/connector/pool/UserIdentity.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-api/src/main/java/com/metamatrix/connector/pool/UserIdentity.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -39,13 +39,6 @@
this.context = context;
}
- /*
- * @see com.metamatrix.data.pool.ConnectorIdentity#getSecurityContext()
- */
- public ExecutionContext getSecurityContext() {
- return this.context;
- }
-
/**
* Implement equals based on the case-insensitive user name.
* @param obj Other identity object
@@ -58,7 +51,7 @@
if (obj instanceof UserIdentity) {
UserIdentity that = (UserIdentity)obj;
- return
this.context.getUser().toUpperCase().equals(that.context.getUser().toUpperCase());
+ return this.context.getUser().equals(that.context.getUser());
}
return false;
@@ -68,7 +61,7 @@
* Get hash code, based on user name
*/
public int hashCode(){
- return context.getUser().toUpperCase().hashCode();
+ return context.getUser().hashCode();
}
public String toString(){
Modified:
trunk/connector-api/src/main/java/com/metamatrix/connector/pool/UserIdentityFactory.java
===================================================================
---
trunk/connector-api/src/main/java/com/metamatrix/connector/pool/UserIdentityFactory.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-api/src/main/java/com/metamatrix/connector/pool/UserIdentityFactory.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -23,8 +23,8 @@
package com.metamatrix.connector.pool;
import com.metamatrix.connector.DataPlugin;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
-import com.metamatrix.connector.exception.ConnectorException;
/**
* Segregates connections by user. It is assumed that no single identity
Modified:
trunk/connector-api/src/main/java/com/metamatrix/connector/visitor/framework/AbstractLanguageVisitor.java
===================================================================
---
trunk/connector-api/src/main/java/com/metamatrix/connector/visitor/framework/AbstractLanguageVisitor.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-api/src/main/java/com/metamatrix/connector/visitor/framework/AbstractLanguageVisitor.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -23,9 +23,45 @@
package com.metamatrix.connector.visitor.framework;
import java.util.Collection;
-import java.util.Iterator;
-import com.metamatrix.connector.language.*;
+import com.metamatrix.connector.language.IAggregate;
+import com.metamatrix.connector.language.IBatchedUpdates;
+import com.metamatrix.connector.language.IBulkInsert;
+import com.metamatrix.connector.language.ICaseExpression;
+import com.metamatrix.connector.language.ICompareCriteria;
+import com.metamatrix.connector.language.ICompoundCriteria;
+import com.metamatrix.connector.language.IDelete;
+import com.metamatrix.connector.language.IElement;
+import com.metamatrix.connector.language.IExistsCriteria;
+import com.metamatrix.connector.language.IFrom;
+import com.metamatrix.connector.language.IFunction;
+import com.metamatrix.connector.language.IGroup;
+import com.metamatrix.connector.language.IGroupBy;
+import com.metamatrix.connector.language.IInCriteria;
+import com.metamatrix.connector.language.IInlineView;
+import com.metamatrix.connector.language.IInsert;
+import com.metamatrix.connector.language.IIsNullCriteria;
+import com.metamatrix.connector.language.IJoin;
+import com.metamatrix.connector.language.ILanguageObject;
+import com.metamatrix.connector.language.ILikeCriteria;
+import com.metamatrix.connector.language.ILimit;
+import com.metamatrix.connector.language.ILiteral;
+import com.metamatrix.connector.language.INotCriteria;
+import com.metamatrix.connector.language.IOrderBy;
+import com.metamatrix.connector.language.IOrderByItem;
+import com.metamatrix.connector.language.IParameter;
+import com.metamatrix.connector.language.IProcedure;
+import com.metamatrix.connector.language.IQuery;
+import com.metamatrix.connector.language.IScalarSubquery;
+import com.metamatrix.connector.language.ISearchedCaseExpression;
+import com.metamatrix.connector.language.ISelect;
+import com.metamatrix.connector.language.ISelectSymbol;
+import com.metamatrix.connector.language.ISetClause;
+import com.metamatrix.connector.language.ISetClauseList;
+import com.metamatrix.connector.language.ISetQuery;
+import com.metamatrix.connector.language.ISubqueryCompareCriteria;
+import com.metamatrix.connector.language.ISubqueryInCriteria;
+import com.metamatrix.connector.language.IUpdate;
/**
* Visitor that visits an instance of ILanguageObject and performs an operation
@@ -57,10 +93,10 @@
* can be used by subclasses to visit each ILanguageObject in the Collection
* @param nodes a Collection of ILanguageObjects
*/
- public void visitNodes(Collection nodes) {
+ public void visitNodes(Collection<? extends ILanguageObject> nodes) {
if (nodes != null && nodes.size() > 0) {
- for (Iterator i = nodes.iterator(); i.hasNext();) {
- visitNode((ILanguageObject)i.next());
+ for (ILanguageObject node : nodes) {
+ visitNode(node);
}
}
}
Modified:
trunk/connector-api/src/main/java/com/metamatrix/connector/visitor/framework/HierarchyVisitor.java
===================================================================
---
trunk/connector-api/src/main/java/com/metamatrix/connector/visitor/framework/HierarchyVisitor.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-api/src/main/java/com/metamatrix/connector/visitor/framework/HierarchyVisitor.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -250,8 +250,4 @@
visitNode(obj.getValue());
}
- public void reset() {
-
- }
-
}
Modified:
trunk/connector-api/src/main/java/com/metamatrix/connector/visitor/util/CollectorVisitor.java
===================================================================
---
trunk/connector-api/src/main/java/com/metamatrix/connector/visitor/util/CollectorVisitor.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-api/src/main/java/com/metamatrix/connector/visitor/util/CollectorVisitor.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -33,27 +33,22 @@
* tree. Each visit method does an instanceof method to check whether the object
* is of the expected type.
*/
-public class CollectorVisitor implements LanguageObjectVisitor {
+public class CollectorVisitor<T> implements LanguageObjectVisitor {
- private Class type;
- private Collection objects;
+ private Class<T> type;
+ private Collection<T> objects = new ArrayList<T>();
- public CollectorVisitor(Class type) {
+ public CollectorVisitor(Class<T> type) {
this.type = type;
- reset();
}
- public void reset() {
- objects= new ArrayList();
- }
-
private void checkInstance(ILanguageObject obj) {
if(type.isInstance(obj)) {
- this.objects.add(obj);
+ this.objects.add((T)obj);
}
}
- public Collection getCollectedObjects() {
+ public Collection<T> getCollectedObjects() {
return this.objects;
}
@@ -314,8 +309,8 @@
* @param object Root of the language object tree
* @return Collection of ILanguageObject of the specified type
*/
- public static Collection collectObjects(Class type, ILanguageObject object) {
- CollectorVisitor visitor = new CollectorVisitor(type);
+ public static <T> Collection<T> collectObjects(Class<T> type,
ILanguageObject object) {
+ CollectorVisitor<T> visitor = new CollectorVisitor<T>(type);
DelegatingHierarchyVisitor hierarchyVisitor = new
DelegatingHierarchyVisitor(visitor, null);
object.acceptVisitor(hierarchyVisitor);
return visitor.getCollectedObjects();
@@ -328,7 +323,7 @@
* @param object Root of the language object tree
* @return Collection of IElement of the specified type
*/
- public static Collection collectElements(ILanguageObject object) {
+ public static Collection<IElement> collectElements(ILanguageObject object) {
return CollectorVisitor.collectObjects(IElement.class, object);
}
@@ -339,7 +334,7 @@
* @param object Root of the language object tree
* @return Collection of IGroup of the specified type
*/
- public static Collection collectGroups(ILanguageObject object) {
+ public static Collection<IGroup> collectGroups(ILanguageObject object) {
return CollectorVisitor.collectObjects(IGroup.class, object);
}
@@ -350,17 +345,13 @@
* @param object Root of the language object tree
* @return Set of IGroup
*/
- public static Set collectGroupsUsedByElements(ILanguageObject object) {
- Collection elements = CollectorVisitor.collectElements(object);
- Set groups = new HashSet();
- Iterator iter = elements.iterator();
- while(iter.hasNext()) {
- IElement element = (IElement) iter.next();
+ public static Set<IGroup> collectGroupsUsedByElements(ILanguageObject object)
{
+ Set<IGroup> groups = new HashSet<IGroup>();
+ for (IElement element : CollectorVisitor.collectElements(object)) {
if(element.getGroup() != null) {
groups.add(element.getGroup());
}
}
-
return groups;
}
Modified:
trunk/connector-api/src/main/java/com/metamatrix/connector/visitor/util/SQLStringVisitor.java
===================================================================
---
trunk/connector-api/src/main/java/com/metamatrix/connector/visitor/util/SQLStringVisitor.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-api/src/main/java/com/metamatrix/connector/visitor/util/SQLStringVisitor.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -26,7 +26,7 @@
import java.util.List;
import com.metamatrix.common.types.DataTypeManager;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.language.IAggregate;
import com.metamatrix.connector.language.IBulkInsert;
import com.metamatrix.connector.language.ICaseExpression;
@@ -69,6 +69,7 @@
import com.metamatrix.connector.language.ISubqueryCompareCriteria;
import com.metamatrix.connector.language.ISubqueryInCriteria;
import com.metamatrix.connector.language.IUpdate;
+import com.metamatrix.connector.language.IParameter.Direction;
import com.metamatrix.connector.metadata.runtime.MetadataID;
import com.metamatrix.connector.metadata.runtime.MetadataObject;
import com.metamatrix.connector.metadata.runtime.RuntimeMetadata;
@@ -131,7 +132,7 @@
* by creating a comma-separated list.
* @param items a list of ILanguageObjects
*/
- protected void append(List items) {
+ protected void append(List<? extends ILanguageObject> items) {
if (items != null && items.size() != 0) {
append((ILanguageObject)items.get(0));
for (int i = 1; i < items.size(); i++) {
@@ -276,14 +277,13 @@
append(obj.getLeftExpression());
buffer.append(SPACE);
- final int op = obj.getOperator();
- switch(op) {
- case ICompareCriteria.EQ: buffer.append(EQ); break;
- case ICompareCriteria.GE: buffer.append(GE); break;
- case ICompareCriteria.GT: buffer.append(GT); break;
- case ICompareCriteria.LE: buffer.append(LE); break;
- case ICompareCriteria.LT: buffer.append(LT); break;
- case ICompareCriteria.NE: buffer.append(NE); break;
+ switch(obj.getOperator()) {
+ case EQ: buffer.append(EQ); break;
+ case GE: buffer.append(GE); break;
+ case GT: buffer.append(GT); break;
+ case LE: buffer.append(LE); break;
+ case LT: buffer.append(LT); break;
+ case NE: buffer.append(NE); break;
default: buffer.append(UNDEFINED);
}
buffer.append(SPACE);
@@ -295,10 +295,9 @@
*/
public void visit(ICompoundCriteria obj) {
String opString = null;
- final int op = obj.getOperator();
- switch(op) {
- case ICompoundCriteria.AND: opString = AND; break;
- case ICompoundCriteria.OR: opString = OR; break;
+ switch(obj.getOperator()) {
+ case AND: opString = AND; break;
+ case OR: opString = OR; break;
default: opString = UNDEFINED;
}
@@ -446,7 +445,7 @@
IParameter param = null;
for (int i = 0; i < params.size(); i++) {
param = (IParameter)params.get(i);
- if (param.getDirection() == IParameter.IN || param.getDirection() ==
IParameter.INOUT) {
+ if (param.getDirection() == Direction.IN || param.getDirection() ==
Direction.INOUT) {
if (i != 0) {
buffer.append(COMMA)
.append(SPACE);
@@ -745,25 +744,24 @@
}
buffer.append(SPACE);
- final int type = obj.getJoinType();
- switch(type) {
- case IJoin.CROSS_JOIN:
+ switch(obj.getJoinType()) {
+ case CROSS_JOIN:
buffer.append(CROSS);
break;
- case IJoin.FULL_OUTER_JOIN:
+ case FULL_OUTER_JOIN:
buffer.append(FULL)
.append(SPACE)
.append(OUTER);
break;
- case IJoin.INNER_JOIN:
+ case INNER_JOIN:
buffer.append(INNER);
break;
- case IJoin.LEFT_OUTER_JOIN:
+ case LEFT_OUTER_JOIN:
buffer.append(LEFT)
.append(SPACE)
.append(OUTER);
break;
- case IJoin.RIGHT_OUTER_JOIN:
+ case RIGHT_OUTER_JOIN:
buffer.append(RIGHT)
.append(SPACE)
.append(OUTER);
@@ -1053,28 +1051,25 @@
append(obj.getLeftExpression());
buffer.append(SPACE);
- final int op = obj.getOperator();
- switch(op) {
- case ISubqueryCompareCriteria.EQ: buffer.append(EQ); break;
- case ISubqueryCompareCriteria.GE: buffer.append(GE); break;
- case ISubqueryCompareCriteria.GT: buffer.append(GT); break;
- case ISubqueryCompareCriteria.LE: buffer.append(LE); break;
- case ISubqueryCompareCriteria.LT: buffer.append(LT); break;
- case ISubqueryCompareCriteria.NE: buffer.append(NE); break;
+ switch(obj.getOperator()) {
+ case EQ: buffer.append(EQ); break;
+ case GE: buffer.append(GE); break;
+ case GT: buffer.append(GT); break;
+ case LE: buffer.append(LE); break;
+ case LT: buffer.append(LT); break;
+ case NE: buffer.append(NE); break;
default: buffer.append(UNDEFINED);
}
buffer.append(SPACE);
switch(obj.getQuantifier()) {
- case ISubqueryCompareCriteria.ALL: buffer.append(ALL); break;
- case ISubqueryCompareCriteria.SOME: buffer.append(SOME); break;
+ case ALL: buffer.append(ALL); break;
+ case SOME: buffer.append(SOME); break;
default: buffer.append(UNDEFINED);
}
buffer.append(SPACE);
buffer.append(LPAREN);
append(obj.getQuery());
buffer.append(RPAREN);
-
-
}
/*
Modified:
trunk/connector-api/src/main/java/com/metamatrix/connector/xa/api/XAConnection.java
===================================================================
---
trunk/connector-api/src/main/java/com/metamatrix/connector/xa/api/XAConnection.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-api/src/main/java/com/metamatrix/connector/xa/api/XAConnection.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -27,7 +27,7 @@
import javax.transaction.xa.XAResource;
import com.metamatrix.connector.api.Connection;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
public interface XAConnection extends Connection{
/**
Modified:
trunk/connector-api/src/main/java/com/metamatrix/connector/xa/api/XAConnector.java
===================================================================
---
trunk/connector-api/src/main/java/com/metamatrix/connector/xa/api/XAConnector.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-api/src/main/java/com/metamatrix/connector/xa/api/XAConnector.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -25,7 +25,6 @@
package com.metamatrix.connector.xa.api;
import com.metamatrix.connector.api.*;
-import com.metamatrix.connector.exception.ConnectorException;
public interface XAConnector extends Connector{
@@ -36,7 +35,8 @@
* with a particular security context. The connection is assumed to be pooled in
* the underlying source if pooling is necessary - the connection will be closed
* when execution has completed against it.
- * @param executionContext The context of the current MetaMatrix user that will be
using this connection
+ * @param context The context of the current user that will be using this connection,
+ * may be null if this connection is for an administrative operation.
* @param transactionContext The context of the transaction under which the
connection will be used. May be null.
* @return A Connection, created by the Connector
* @throws ConnectorException If an error occurred obtaining a connection
Modified:
trunk/connector-api/src/test/java/com/metamatrix/data/pool/TestCredentialMap.java
===================================================================
---
trunk/connector-api/src/test/java/com/metamatrix/data/pool/TestCredentialMap.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-api/src/test/java/com/metamatrix/data/pool/TestCredentialMap.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -25,7 +25,7 @@
import java.util.HashMap;
import java.util.Map;
-import com.metamatrix.connector.pool.CredentialMap;
+import com.metamatrix.connector.api.CredentialMap;
import junit.framework.TestCase;
Modified:
trunk/connector-api/src/test/java/com/metamatrix/data/transform/TestBasicValueTranslator.java
===================================================================
---
trunk/connector-api/src/test/java/com/metamatrix/data/transform/TestBasicValueTranslator.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-api/src/test/java/com/metamatrix/data/transform/TestBasicValueTranslator.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -26,10 +26,10 @@
import org.mockito.Mockito;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
import com.metamatrix.connector.api.TypeFacility;
import com.metamatrix.connector.basic.BasicValueTranslator;
-import com.metamatrix.connector.exception.ConnectorException;
/**
@@ -39,7 +39,7 @@
public void testExceptionFromTransform() throws Exception {
- BasicValueTranslator adaptor = new BasicValueTranslator(String.class, Short.class,
new FakeTypeFacility());
+ BasicValueTranslator<String, Short> adaptor =
BasicValueTranslator.createTranslator(String.class, Short.class, new FakeTypeFacility());
try {
adaptor.translate("mmuuid:blah",
Mockito.mock(ExecutionContext.class)); //$NON-NLS-1$
fail("exceptoin expected"); //$NON-NLS-1$
Modified:
trunk/connector-metadata/src/main/java/com/metamatrix/connector/metadata/IndexConnector.java
===================================================================
---
trunk/connector-metadata/src/main/java/com/metamatrix/connector/metadata/IndexConnector.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-metadata/src/main/java/com/metamatrix/connector/metadata/IndexConnector.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -23,9 +23,9 @@
package com.metamatrix.connector.metadata;
import com.metamatrix.api.exception.MetaMatrixComponentException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
import com.metamatrix.connector.api.ConnectorAnnotations.ConnectionPooling;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.metadata.adapter.ObjectConnector;
import com.metamatrix.connector.metadata.internal.IObjectSource;
import com.metamatrix.dqp.internal.datamgr.impl.ConnectorEnvironmentImpl;
Modified:
trunk/connector-metadata/src/main/java/com/metamatrix/connector/metadata/MetadataProcedureExecution.java
===================================================================
---
trunk/connector-metadata/src/main/java/com/metamatrix/connector/metadata/MetadataProcedureExecution.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-metadata/src/main/java/com/metamatrix/connector/metadata/MetadataProcedureExecution.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -25,12 +25,13 @@
import java.util.Iterator;
import java.util.List;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.DataNotAvailableException;
import com.metamatrix.connector.api.ProcedureExecution;
import com.metamatrix.connector.basic.BasicExecution;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.language.IParameter;
import com.metamatrix.connector.language.IProcedure;
+import com.metamatrix.connector.language.IParameter.Direction;
import com.metamatrix.connector.metadata.internal.IObjectSource;
import com.metamatrix.connector.metadata.internal.ObjectProcedure;
import com.metamatrix.connector.metadata.internal.ObjectProcedureProcessor;
@@ -89,7 +90,7 @@
* @since 4.2
*/
public Object getOutputValue(final IParameter parameter) throws ConnectorException {
- if(parameter.getDirection() != IParameter.OUT && parameter.getDirection()
!= IParameter.INOUT && parameter.getDirection() != IParameter.RETURN){
+ if(parameter.getDirection() != Direction.OUT && parameter.getDirection()
!= Direction.INOUT && parameter.getDirection() != Direction.RETURN){
throw new
ConnectorException(MetadataConnectorPlugin.Util.getString("ObjectProcedureExecution.0"));
//$NON-NLS-1$
}
//TODO: Output parameters are not currently handled
Modified:
trunk/connector-metadata/src/main/java/com/metamatrix/connector/metadata/adapter/ObjectConnection.java
===================================================================
---
trunk/connector-metadata/src/main/java/com/metamatrix/connector/metadata/adapter/ObjectConnection.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-metadata/src/main/java/com/metamatrix/connector/metadata/adapter/ObjectConnection.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -23,11 +23,11 @@
package com.metamatrix.connector.metadata.adapter;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
import com.metamatrix.connector.api.ProcedureExecution;
import com.metamatrix.connector.api.ResultSetExecution;
import com.metamatrix.connector.basic.BasicConnection;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.language.IProcedure;
import com.metamatrix.connector.language.IQuery;
import com.metamatrix.connector.language.IQueryCommand;
Modified:
trunk/connector-metadata/src/main/java/com/metamatrix/connector/metadata/adapter/ObjectConnector.java
===================================================================
---
trunk/connector-metadata/src/main/java/com/metamatrix/connector/metadata/adapter/ObjectConnector.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-metadata/src/main/java/com/metamatrix/connector/metadata/adapter/ObjectConnector.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -26,8 +26,8 @@
import com.metamatrix.connector.api.Connector;
import com.metamatrix.connector.api.ConnectorCapabilities;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.metadata.internal.IObjectSource;
/**
Modified:
trunk/connector-metadata/src/main/java/com/metamatrix/connector/metadata/adapter/ObjectSynchExecution.java
===================================================================
---
trunk/connector-metadata/src/main/java/com/metamatrix/connector/metadata/adapter/ObjectSynchExecution.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-metadata/src/main/java/com/metamatrix/connector/metadata/adapter/ObjectSynchExecution.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -25,10 +25,10 @@
import java.util.Iterator;
import java.util.List;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.DataNotAvailableException;
import com.metamatrix.connector.api.ResultSetExecution;
import com.metamatrix.connector.basic.BasicExecution;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.language.IQuery;
import com.metamatrix.connector.metadata.MetadataConnectorPlugin;
import com.metamatrix.connector.metadata.internal.IObjectQuery;
Modified:
trunk/connector-metadata/src/main/java/com/metamatrix/connector/metadata/internal/MetadataSearchCriteriaBuilder.java
===================================================================
---
trunk/connector-metadata/src/main/java/com/metamatrix/connector/metadata/internal/MetadataSearchCriteriaBuilder.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-metadata/src/main/java/com/metamatrix/connector/metadata/internal/MetadataSearchCriteriaBuilder.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -29,7 +29,7 @@
import java.util.Map;
import com.metamatrix.api.exception.query.CriteriaEvaluationException;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.language.ICompareCriteria;
import com.metamatrix.connector.language.ICompoundCriteria;
import com.metamatrix.connector.language.ICriteria;
@@ -39,6 +39,7 @@
import com.metamatrix.connector.language.ILikeCriteria;
import com.metamatrix.connector.language.IParameter;
import com.metamatrix.connector.language.IQuery;
+import com.metamatrix.connector.language.ICompareCriteria.Operator;
import com.metamatrix.connector.metadata.MetadataConnectorConstants;
import com.metamatrix.connector.metadata.MetadataConnectorPlugin;
import com.metamatrix.connector.metadata.index.MetadataInCriteria;
@@ -195,7 +196,7 @@
* @since 4.3
*/
private void buildMetadataCompareCriteria(ICompareCriteria criteria) throws
ConnectorException {
- Assertion.assertTrue(criteria.getOperator() == ICompareCriteria.EQ, "Only
supports equals."); //$NON-NLS-1$
+ Assertion.assertTrue(criteria.getOperator() == Operator.EQ, "Only supports
equals."); //$NON-NLS-1$
IExpression ltExpression = criteria.getLeftExpression();
@@ -283,7 +284,7 @@
* @since 4.3
*/
private void buildMetadataCompoundCriteria(ICompoundCriteria compoundCriteria) throws
ConnectorException {
- if (compoundCriteria.getOperator() == ICompoundCriteria.AND) {
+ if (compoundCriteria.getOperator() ==
com.metamatrix.connector.language.ICompoundCriteria.Operator.AND) {
for(final Iterator critIter = compoundCriteria.getCriteria().iterator();
critIter.hasNext();) {
buildMetadataSearchCriteria((ICriteria)critIter.next());
}
Modified:
trunk/connector-metadata/src/main/java/com/metamatrix/connector/metadata/internal/ObjectProcedure.java
===================================================================
---
trunk/connector-metadata/src/main/java/com/metamatrix/connector/metadata/internal/ObjectProcedure.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-metadata/src/main/java/com/metamatrix/connector/metadata/internal/ObjectProcedure.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -29,11 +29,12 @@
import java.util.List;
import java.util.Map;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.language.ICommand;
import com.metamatrix.connector.language.IMetadataReference;
import com.metamatrix.connector.language.IParameter;
import com.metamatrix.connector.language.IProcedure;
+import com.metamatrix.connector.language.IParameter.Direction;
import com.metamatrix.connector.metadata.MetadataConnectorConstants;
import com.metamatrix.connector.metadata.MetadataConnectorPlugin;
import com.metamatrix.connector.metadata.index.MetadataLiteralCriteria;
@@ -101,11 +102,11 @@
for(final Iterator iter = parameters.iterator(); iter.hasNext();) {
IParameter parameter = (IParameter) iter.next();
// if there is one result set parameter
- if(parameter.getDirection() == IParameter.RESULT_SET) {
+ if(parameter.getDirection() == Direction.RESULT_SET) {
this.resultSetParameter = parameter;
initResultSet();
}
- if(parameter.getDirection() == IParameter.IN || parameter.getDirection()
== IParameter.INOUT) {
+ if(parameter.getDirection() == Direction.IN || parameter.getDirection()
== Direction.INOUT) {
inParams.add(parameter);
}
}
Modified:
trunk/connector-metadata/src/main/java/com/metamatrix/connector/metadata/internal/ObjectProcedureProcessor.java
===================================================================
---
trunk/connector-metadata/src/main/java/com/metamatrix/connector/metadata/internal/ObjectProcedureProcessor.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-metadata/src/main/java/com/metamatrix/connector/metadata/internal/ObjectProcedureProcessor.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -36,7 +36,7 @@
import com.metamatrix.common.types.ClobType;
import com.metamatrix.common.types.DataTypeManager;
import com.metamatrix.common.vdb.api.VDBFile;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.metadata.MetadataConnectorConstants;
import com.metamatrix.connector.metadata.ResultsIterator;
import com.metamatrix.core.util.ArgCheck;
Modified:
trunk/connector-metadata/src/main/java/com/metamatrix/connector/metadata/internal/ObjectQuery.java
===================================================================
---
trunk/connector-metadata/src/main/java/com/metamatrix/connector/metadata/internal/ObjectQuery.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-metadata/src/main/java/com/metamatrix/connector/metadata/internal/ObjectQuery.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -27,7 +27,7 @@
import java.util.List;
import java.util.Map;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.language.ICommand;
import com.metamatrix.connector.language.IElement;
import com.metamatrix.connector.language.IExpression;
Modified:
trunk/connector-metadata/src/test/java/com/metamatrix/connector/metadata/TestIndexConnector.java
===================================================================
---
trunk/connector-metadata/src/test/java/com/metamatrix/connector/metadata/TestIndexConnector.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-metadata/src/test/java/com/metamatrix/connector/metadata/TestIndexConnector.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -36,10 +36,10 @@
import com.metamatrix.common.application.ApplicationService;
import com.metamatrix.connector.api.Connection;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.DataNotAvailableException;
import com.metamatrix.connector.api.ExecutionContext;
import com.metamatrix.connector.api.ResultSetExecution;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.language.IQuery;
import com.metamatrix.connector.metadata.adapter.ObjectConnector;
import com.metamatrix.connector.metadata.internal.IObjectSource;
Modified:
trunk/connector-metadata/src/test/java/com/metamatrix/connector/metadata/adapter/FakeObjectConnector.java
===================================================================
---
trunk/connector-metadata/src/test/java/com/metamatrix/connector/metadata/adapter/FakeObjectConnector.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-metadata/src/test/java/com/metamatrix/connector/metadata/adapter/FakeObjectConnector.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -26,8 +26,8 @@
import java.util.List;
import java.util.Map;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.metadata.internal.IObjectSource;
public class FakeObjectConnector extends ObjectConnector {
Modified:
trunk/connector-metadata/src/test/java/com/metamatrix/connector/metadata/adapter/TestObjectConnector.java
===================================================================
---
trunk/connector-metadata/src/test/java/com/metamatrix/connector/metadata/adapter/TestObjectConnector.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-metadata/src/test/java/com/metamatrix/connector/metadata/adapter/TestObjectConnector.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -33,9 +33,9 @@
import com.metamatrix.cdk.api.EnvironmentUtility;
import com.metamatrix.connector.api.Connection;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
import com.metamatrix.connector.api.ResultSetExecution;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.language.IQuery;
import com.metamatrix.connector.metadata.runtime.RuntimeMetadata;
import com.metamatrix.core.MetaMatrixRuntimeException;
Modified:
trunk/connector-metadata/src/test/java/com/metamatrix/connector/metadata/internal/FakeRuntimeMetadata.java
===================================================================
---
trunk/connector-metadata/src/test/java/com/metamatrix/connector/metadata/internal/FakeRuntimeMetadata.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-metadata/src/test/java/com/metamatrix/connector/metadata/internal/FakeRuntimeMetadata.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -22,7 +22,7 @@
package com.metamatrix.connector.metadata.internal;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.metadata.runtime.MetadataID;
import com.metamatrix.connector.metadata.runtime.MetadataObject;
import com.metamatrix.connector.metadata.runtime.RuntimeMetadata;
Modified:
trunk/connector-metadata/src/test/java/com/metamatrix/connector/metadata/internal/TestConnectorHost.java
===================================================================
---
trunk/connector-metadata/src/test/java/com/metamatrix/connector/metadata/internal/TestConnectorHost.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-metadata/src/test/java/com/metamatrix/connector/metadata/internal/TestConnectorHost.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -32,7 +32,7 @@
import com.metamatrix.cdk.IConnectorHost;
import com.metamatrix.cdk.api.ConnectorHost;
import com.metamatrix.cdk.api.TranslationUtility;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.metadata.IndexConnector;
import com.metamatrix.dqp.service.DQPServiceNames;
import com.metamatrix.metadata.runtime.FakeMetadataService;
Modified:
trunk/connector-sdk/src/main/java/com/metamatrix/cdk/ConnectorShellCommandTarget.java
===================================================================
---
trunk/connector-sdk/src/main/java/com/metamatrix/cdk/ConnectorShellCommandTarget.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connector-sdk/src/main/java/com/metamatrix/cdk/ConnectorShellCommandTarget.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -54,7 +54,7 @@
import com.metamatrix.common.config.xml.XMLConfigurationImportExportUtility;
import com.metamatrix.common.util.ByteArrayHelper;
import com.metamatrix.connector.api.Connector;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.language.ICommand;
import com.metamatrix.connector.language.IProcedure;
import com.metamatrix.connector.language.IQuery;
Modified: trunk/connector-sdk/src/main/java/com/metamatrix/cdk/IConnectorHost.java
===================================================================
--- trunk/connector-sdk/src/main/java/com/metamatrix/cdk/IConnectorHost.java 2009-02-16
18:56:03 UTC (rev 473)
+++ trunk/connector-sdk/src/main/java/com/metamatrix/cdk/IConnectorHost.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -26,7 +26,7 @@
import java.util.List;
import java.util.Properties;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.language.ICommand;
/**
Modified: trunk/connector-sdk/src/main/java/com/metamatrix/cdk/api/ConnectorHost.java
===================================================================
--- trunk/connector-sdk/src/main/java/com/metamatrix/cdk/api/ConnectorHost.java 2009-02-16
18:56:03 UTC (rev 473)
+++ trunk/connector-sdk/src/main/java/com/metamatrix/cdk/api/ConnectorHost.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -35,12 +35,12 @@
import com.metamatrix.connector.api.Connection;
import com.metamatrix.connector.api.Connector;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.DataNotAvailableException;
import com.metamatrix.connector.api.Execution;
import com.metamatrix.connector.api.ExecutionContext;
import com.metamatrix.connector.api.ResultSetExecution;
import com.metamatrix.connector.api.UpdateExecution;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.language.ICommand;
import com.metamatrix.connector.metadata.runtime.RuntimeMetadata;
import com.metamatrix.dqp.internal.datamgr.impl.ConnectorEnvironmentImpl;
Modified:
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/JDBCBaseExecution.java
===================================================================
---
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/JDBCBaseExecution.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/JDBCBaseExecution.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -33,10 +33,10 @@
import java.util.Properties;
import com.metamatrix.common.util.PropertiesUtils;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ConnectorLogger;
import com.metamatrix.connector.api.ExecutionContext;
import com.metamatrix.connector.basic.BasicExecution;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.jdbc.extension.ResultsTranslator;
import com.metamatrix.connector.jdbc.extension.SQLTranslator;
import com.metamatrix.connector.jdbc.extension.TranslatedCommand;
@@ -283,7 +283,7 @@
if (logger.isDetailEnabled()) {
logger.logDetail(context.getRequestIdentifier() + " Warning: ",
warning); //$NON-NLS-1$
}
- addWarning(toAdd);
+ context.addWarning(toAdd);
}
this.statement.clearWarnings();
}
Modified:
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/JDBCConnector.java
===================================================================
---
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/JDBCConnector.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/JDBCConnector.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -28,10 +28,10 @@
import com.metamatrix.connector.api.Connector;
import com.metamatrix.connector.api.ConnectorCapabilities;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ConnectorLogger;
import com.metamatrix.connector.api.ExecutionContext;
import com.metamatrix.connector.api.ConnectorAnnotations.ConnectionPooling;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.pool.ConnectorIdentity;
import com.metamatrix.connector.pool.ConnectorIdentityFactory;
Modified:
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/JDBCProcedureExecution.java
===================================================================
---
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/JDBCProcedureExecution.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/JDBCProcedureExecution.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -33,11 +33,11 @@
import java.util.Properties;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ConnectorLogger;
import com.metamatrix.connector.api.DataNotAvailableException;
import com.metamatrix.connector.api.ExecutionContext;
import com.metamatrix.connector.api.ProcedureExecution;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.jdbc.extension.ResultsTranslator;
import com.metamatrix.connector.jdbc.extension.SQLTranslator;
import com.metamatrix.connector.jdbc.extension.TranslatedCommand;
@@ -46,6 +46,7 @@
import com.metamatrix.connector.language.ICommand;
import com.metamatrix.connector.language.IParameter;
import com.metamatrix.connector.language.IProcedure;
+import com.metamatrix.connector.language.IParameter.Direction;
import com.metamatrix.connector.metadata.runtime.Element;
import com.metamatrix.connector.metadata.runtime.MetadataID;
import com.metamatrix.connector.metadata.runtime.RuntimeMetadata;
@@ -124,7 +125,7 @@
Iterator iter = params.iterator();
while(iter.hasNext()){
IParameter param = (IParameter)iter.next();
- if(param.getDirection() == IParameter.RESULT_SET){
+ if(param.getDirection() == Direction.RESULT_SET){
resultSet = param;
break;
}
@@ -164,7 +165,7 @@
Iterator iter = parameters.iterator();
while(iter.hasNext()){
IParameter param = (IParameter)iter.next();
- if(param.getDirection() == IParameter.RETURN){
+ if(param.getDirection() == Direction.RETURN){
paramsIndexes.put(param, new Integer(index++));
break;
}
@@ -173,7 +174,7 @@
iter = parameters.iterator();
while(iter.hasNext()){
IParameter param = (IParameter)iter.next();
- if(param.getDirection() != IParameter.RESULT_SET &&
param.getDirection() != IParameter.RETURN){
+ if(param.getDirection() != Direction.RESULT_SET &&
param.getDirection() != Direction.RETURN){
paramsIndexes.put(param, new Integer(index++));
}
}
@@ -184,7 +185,7 @@
* @see
com.metamatrix.data.ProcedureExecution#getOutputValue(com.metamatrix.data.language.IParameter)
*/
public Object getOutputValue(IParameter parameter) throws ConnectorException {
- if(parameter.getDirection() != IParameter.OUT && parameter.getDirection()
!= IParameter.INOUT && parameter.getDirection() != IParameter.RETURN){
+ if(parameter.getDirection() != Direction.OUT && parameter.getDirection()
!= Direction.INOUT && parameter.getDirection() != Direction.RETURN){
throw new
ConnectorException(JDBCPlugin.Util.getString("JDBCProcedureExecution.The_parameter_direction_must_be_out_or_inout_1"));
//$NON-NLS-1$
}
Modified:
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/JDBCQueryExecution.java
===================================================================
---
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/JDBCQueryExecution.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/JDBCQueryExecution.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -38,13 +38,13 @@
import java.util.TimeZone;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ConnectorLogger;
import com.metamatrix.connector.api.DataNotAvailableException;
import com.metamatrix.connector.api.ExecutionContext;
import com.metamatrix.connector.api.ResultSetExecution;
import com.metamatrix.connector.api.TypeFacility;
import com.metamatrix.connector.api.ValueTranslator;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.jdbc.extension.ResultsTranslator;
import com.metamatrix.connector.jdbc.extension.SQLTranslator;
import com.metamatrix.connector.jdbc.extension.TranslatedCommand;
Modified:
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/JDBCSingleIdentityConnectionFactory.java
===================================================================
---
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/JDBCSingleIdentityConnectionFactory.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/JDBCSingleIdentityConnectionFactory.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -30,9 +30,9 @@
import com.metamatrix.connector.api.Connection;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ConnectorLogger;
import com.metamatrix.connector.api.ExecutionContext;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.pool.SingleIdentityFactory;
/**
Modified:
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/JDBCSourceConnection.java
===================================================================
---
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/JDBCSourceConnection.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/JDBCSourceConnection.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -28,13 +28,13 @@
import java.util.Properties;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ConnectorLogger;
import com.metamatrix.connector.api.ExecutionContext;
import com.metamatrix.connector.api.ProcedureExecution;
import com.metamatrix.connector.api.ResultSetExecution;
import com.metamatrix.connector.api.UpdateExecution;
import com.metamatrix.connector.basic.BasicConnection;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.jdbc.extension.ResultsTranslator;
import com.metamatrix.connector.jdbc.extension.SQLTranslator;
import com.metamatrix.connector.language.ICommand;
Modified:
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/JDBCSourceConnectionFactory.java
===================================================================
---
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/JDBCSourceConnectionFactory.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/JDBCSourceConnectionFactory.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -32,8 +32,8 @@
import java.util.Properties;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.internal.ConnectorPropertyNames;
import com.metamatrix.connector.pool.ConnectorIdentity;
import com.metamatrix.connector.pool.ConnectorIdentityFactory;
Modified:
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/JDBCUpdateExecution.java
===================================================================
---
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/JDBCUpdateExecution.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/JDBCUpdateExecution.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -29,11 +29,11 @@
import java.util.List;
import java.util.Properties;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ConnectorLogger;
import com.metamatrix.connector.api.DataNotAvailableException;
import com.metamatrix.connector.api.ExecutionContext;
import com.metamatrix.connector.api.UpdateExecution;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.jdbc.extension.ResultsTranslator;
import com.metamatrix.connector.jdbc.extension.SQLTranslator;
import com.metamatrix.connector.jdbc.extension.TranslatedCommand;
Modified:
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/JDBCUserIdentityConnectionFactory.java
===================================================================
---
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/JDBCUserIdentityConnectionFactory.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/JDBCUserIdentityConnectionFactory.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -27,9 +27,9 @@
import com.metamatrix.connector.api.Connection;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
+import com.metamatrix.connector.api.CredentialMap;
import com.metamatrix.connector.api.ExecutionContext;
-import com.metamatrix.connector.exception.ConnectorException;
-import com.metamatrix.connector.pool.CredentialMap;
import com.metamatrix.connector.pool.UserIdentityFactory;
/**
Modified:
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/access/AccessSQLTranslator.java
===================================================================
---
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/access/AccessSQLTranslator.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/access/AccessSQLTranslator.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -27,7 +27,7 @@
import java.util.Properties;
import com.metamatrix.connector.api.ConnectorEnvironment;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.jdbc.extension.SQLConversionVisitor;
import com.metamatrix.connector.jdbc.extension.impl.BasicSQLTranslator;
import com.metamatrix.connector.language.ILanguageFactory;
Modified:
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/db2/DB2ConvertModifier.java
===================================================================
---
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/db2/DB2ConvertModifier.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/db2/DB2ConvertModifier.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -30,6 +30,7 @@
import com.metamatrix.connector.jdbc.extension.impl.BasicFunctionModifier;
import com.metamatrix.connector.jdbc.extension.impl.DropFunctionModifier;
import com.metamatrix.connector.language.*;
+import com.metamatrix.connector.language.ICompareCriteria.Operator;
/**
*/
@@ -127,7 +128,7 @@
// AFTER: CASE WHEN booleanExpression = 0 THEN 'false' ELSE
'true' END
ILiteral literalZero = this.langFactory.createLiteral(new Integer(0),
TypeFacility.RUNTIME_TYPES.INTEGER);
- ICompareCriteria when =
this.langFactory.createCompareCriteria(ICompareCriteria.EQ, expression, literalZero);
+ ICompareCriteria when = this.langFactory.createCompareCriteria(Operator.EQ,
expression, literalZero);
List whens = new ArrayList(1);
whens.add(when);
@@ -167,7 +168,7 @@
// BEFORE: convert(stringExpression, boolean)
// AFTER: CASE WHEN stringExpression = 'true' THEN 1 ELSE 0 END
ILiteral literalTrue = this.langFactory.createLiteral("true",
TypeFacility.RUNTIME_TYPES.STRING); //$NON-NLS-1$
- ICompareCriteria when =
this.langFactory.createCompareCriteria(ICompareCriteria.EQ, expression, literalTrue);
+ ICompareCriteria when = this.langFactory.createCompareCriteria(Operator.EQ,
expression, literalTrue);
List whens = new ArrayList(1);
whens.add(when);
Modified:
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/db2/DB2SQLConversionVisitor.java
===================================================================
---
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/db2/DB2SQLConversionVisitor.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/db2/DB2SQLConversionVisitor.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -26,6 +26,7 @@
import com.metamatrix.connector.language.IFromItem;
import com.metamatrix.connector.language.IJoin;
import com.metamatrix.connector.language.ILimit;
+import com.metamatrix.connector.language.IJoin.JoinType;
/**
* @since 4.3
@@ -73,8 +74,7 @@
* @see
com.metamatrix.data.visitor.LanguageObjectVisitor#visit(com.metamatrix.connector.language.IJoin)
*/
public void visit(IJoin obj) {
- final int type = obj.getJoinType();
- if(type != IJoin.CROSS_JOIN) {
+ if(obj.getJoinType() != JoinType.CROSS_JOIN) {
super.visit(obj);
return;
}
Modified:
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/db2/DB2SQLTranslator.java
===================================================================
---
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/db2/DB2SQLTranslator.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/db2/DB2SQLTranslator.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -28,8 +28,8 @@
import java.util.Map;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.jdbc.extension.SQLConversionVisitor;
import com.metamatrix.connector.jdbc.extension.impl.AliasModifier;
import com.metamatrix.connector.jdbc.extension.impl.BasicSQLTranslator;
Modified:
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/derby/DerbyConvertModifier.java
===================================================================
---
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/derby/DerbyConvertModifier.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/derby/DerbyConvertModifier.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -30,6 +30,7 @@
import com.metamatrix.connector.jdbc.extension.impl.BasicFunctionModifier;
import com.metamatrix.connector.jdbc.extension.impl.DropFunctionModifier;
import com.metamatrix.connector.language.*;
+import com.metamatrix.connector.language.ICompareCriteria.Operator;
/**
*/
@@ -146,7 +147,7 @@
// AFTER: CASE WHEN booleanExpression = 0 THEN 'false' ELSE
'true' END
ILiteral literalZero = this.langFactory.createLiteral(new Integer(0),
TypeFacility.RUNTIME_TYPES.INTEGER);
- ICompareCriteria when =
this.langFactory.createCompareCriteria(ICompareCriteria.EQ, expression, literalZero);
+ ICompareCriteria when = this.langFactory.createCompareCriteria(Operator.EQ,
expression, literalZero);
List whens = new ArrayList(1);
whens.add(when);
@@ -186,7 +187,7 @@
// BEFORE: convert(stringExpression, boolean)
// AFTER: CASE WHEN stringExpression = 'true' THEN 1 ELSE 0 END
ILiteral literalTrue = this.langFactory.createLiteral("true",
TypeFacility.RUNTIME_TYPES.STRING); //$NON-NLS-1$
- ICompareCriteria when =
this.langFactory.createCompareCriteria(ICompareCriteria.EQ, expression, literalTrue);
+ ICompareCriteria when = this.langFactory.createCompareCriteria(Operator.EQ,
expression, literalTrue);
List whens = new ArrayList(1);
whens.add(when);
Modified:
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/derby/DerbySQLTranslator.java
===================================================================
---
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/derby/DerbySQLTranslator.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/derby/DerbySQLTranslator.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -27,7 +27,7 @@
import java.util.Properties;
import com.metamatrix.connector.api.ConnectorEnvironment;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.jdbc.extension.SQLConversionVisitor;
import com.metamatrix.connector.jdbc.extension.impl.AliasModifier;
import com.metamatrix.connector.jdbc.extension.impl.BasicSQLTranslator;
Modified:
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/extension/ResultsTranslator.java
===================================================================
---
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/extension/ResultsTranslator.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/extension/ResultsTranslator.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -33,9 +33,9 @@
import java.util.TimeZone;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
import com.metamatrix.connector.api.TypeFacility;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.language.ICommand;
/**
Modified:
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/extension/SQLConversionVisitor.java
===================================================================
---
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/extension/SQLConversionVisitor.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/extension/SQLConversionVisitor.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -52,6 +52,7 @@
import com.metamatrix.connector.language.IProcedure;
import com.metamatrix.connector.language.IQuery;
import com.metamatrix.connector.language.IUpdate;
+import com.metamatrix.connector.language.IParameter.Direction;
import com.metamatrix.connector.visitor.util.SQLStringVisitor;
/**
@@ -393,7 +394,7 @@
Iterator iter = params.iterator();
while(iter.hasNext()){
IParameter param = (IParameter)iter.next();
- if(param.getDirection() == IParameter.RETURN){
+ if(param.getDirection() == Direction.RETURN){
needQuestionMark = true;
break;
}
@@ -413,7 +414,7 @@
iter = params.iterator();
while(iter.hasNext()){
IParameter param = (IParameter)iter.next();
- if(param.getDirection() == IParameter.IN || param.getDirection() ==
IParameter.OUT || param.getDirection() == IParameter.INOUT){
+ if(param.getDirection() == Direction.IN || param.getDirection() ==
Direction.OUT || param.getDirection() == Direction.INOUT){
if(numberOfParameters > 0){
prepareCallBuffer.append(","); //$NON-NLS-1$
}
Modified:
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/extension/SQLTranslator.java
===================================================================
---
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/extension/SQLTranslator.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/extension/SQLTranslator.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -27,8 +27,8 @@
import java.util.Map;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.language.ICommand;
import com.metamatrix.connector.metadata.runtime.RuntimeMetadata;
Modified:
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/extension/TranslatedCommand.java
===================================================================
---
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/extension/TranslatedCommand.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/extension/TranslatedCommand.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -24,14 +24,12 @@
*/
package com.metamatrix.connector.jdbc.extension;
-import java.util.Collection;
-import java.util.Iterator;
import java.util.List;
import java.util.Map;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
import com.metamatrix.connector.api.TypeFacility;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.jdbc.util.FunctionReplacementVisitor;
import com.metamatrix.connector.language.ICommand;
import com.metamatrix.connector.language.ILiteral;
@@ -131,10 +129,7 @@
* @return
*/
private boolean hasBindValue(ICommand command) {
- Collection literals = CollectorVisitor.collectObjects(ILiteral.class, command);
-
- for (Iterator i = literals.iterator(); i.hasNext();) {
- ILiteral l = (ILiteral)i.next();
+ for (ILiteral l : CollectorVisitor.collectObjects(ILiteral.class, command)) {
if (l.isBindValue() || isBindEligible(l)) {
return true;
}
Modified:
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/extension/impl/BasicResultsTranslator.java
===================================================================
---
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/extension/impl/BasicResultsTranslator.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/extension/impl/BasicResultsTranslator.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -36,9 +36,9 @@
import java.util.TimeZone;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
import com.metamatrix.connector.api.TypeFacility;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.internal.ConnectorPropertyNames;
import com.metamatrix.connector.jdbc.JDBCPropertyNames;
import com.metamatrix.connector.jdbc.extension.ResultsTranslator;
@@ -46,6 +46,7 @@
import com.metamatrix.connector.jdbc.extension.ValueRetriever;
import com.metamatrix.connector.language.ICommand;
import com.metamatrix.connector.language.IParameter;
+import com.metamatrix.connector.language.IParameter.Direction;
/**
*/
@@ -110,7 +111,7 @@
Iterator iter = params.iterator();
while(iter.hasNext()){
IParameter param = (IParameter)iter.next();
- if(param.getDirection() == IParameter.RETURN){
+ if(param.getDirection() == Direction.RETURN){
registerSpecificTypeOfOutParameter(statement,param, index++);
}
}
@@ -121,13 +122,13 @@
while(iter.hasNext()){
IParameter param = (IParameter)iter.next();
- if(param.getDirection() == IParameter.INOUT){
+ if(param.getDirection() == Direction.INOUT){
registerSpecificTypeOfOutParameter(statement,param, index);
- }else if(param.getDirection() == IParameter.OUT){
+ }else if(param.getDirection() == Direction.OUT){
registerSpecificTypeOfOutParameter(statement,param, index++);
}
- if(param.getDirection() == IParameter.IN || param.getDirection() ==
IParameter.INOUT){
+ if(param.getDirection() == Direction.IN || param.getDirection() ==
Direction.INOUT){
bindValue(statement, param.getValue(), param.getType(), index++, cal);
}
}
Modified:
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/extension/impl/BasicSQLTranslator.java
===================================================================
---
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/extension/impl/BasicSQLTranslator.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/extension/impl/BasicSQLTranslator.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -29,8 +29,8 @@
import java.util.TimeZone;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.jdbc.JDBCPropertyNames;
import com.metamatrix.connector.jdbc.extension.SQLConversionVisitor;
import com.metamatrix.connector.jdbc.extension.SQLTranslator;
Modified:
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/informix/InformixSQLTranslator.java
===================================================================
---
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/informix/InformixSQLTranslator.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/informix/InformixSQLTranslator.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -27,7 +27,7 @@
import java.util.*;
import com.metamatrix.connector.api.ConnectorEnvironment;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.jdbc.extension.impl.*;
import com.metamatrix.connector.metadata.runtime.RuntimeMetadata;
Modified:
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/mysql/MySQLTranslator.java
===================================================================
---
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/mysql/MySQLTranslator.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/mysql/MySQLTranslator.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -27,7 +27,7 @@
import java.util.Properties;
import com.metamatrix.connector.api.ConnectorEnvironment;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.jdbc.extension.SQLConversionVisitor;
import com.metamatrix.connector.jdbc.extension.impl.AliasModifier;
import com.metamatrix.connector.jdbc.extension.impl.BasicSQLTranslator;
Modified:
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/oracle/ConcatFunctionModifier.java
===================================================================
---
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/oracle/ConcatFunctionModifier.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/oracle/ConcatFunctionModifier.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -28,12 +28,12 @@
import com.metamatrix.connector.api.TypeFacility;
import com.metamatrix.connector.jdbc.extension.impl.BasicFunctionModifier;
-import com.metamatrix.connector.language.ICompoundCriteria;
import com.metamatrix.connector.language.ICriteria;
import com.metamatrix.connector.language.IExpression;
import com.metamatrix.connector.language.IFunction;
import com.metamatrix.connector.language.ILanguageFactory;
import com.metamatrix.connector.language.ILiteral;
+import com.metamatrix.connector.language.ICompoundCriteria.Operator;
/**
@@ -81,7 +81,7 @@
} else if (crits.size() == 1) {
crit = (ICriteria)crits.get(0);
} else {
- crit = langFactory.createCompoundCriteria(ICompoundCriteria.OR, crits);
+ crit = langFactory.createCompoundCriteria(Operator.OR, crits);
}
when.add(crit);
List then = Arrays.asList(new IExpression[] {nullValue});
Modified:
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/oracle/OracleConvertModifier.java
===================================================================
---
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/oracle/OracleConvertModifier.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/oracle/OracleConvertModifier.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -25,9 +25,9 @@
import java.util.Iterator;
import java.util.List;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ConnectorLogger;
import com.metamatrix.connector.api.TypeFacility;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.jdbc.extension.FunctionModifier;
import com.metamatrix.connector.jdbc.extension.impl.BasicFunctionModifier;
import com.metamatrix.connector.jdbc.extension.impl.DropFunctionModifier;
Modified:
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/oracle/OracleSQLConversionVisitor.java
===================================================================
---
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/oracle/OracleSQLConversionVisitor.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/oracle/OracleSQLConversionVisitor.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -27,8 +27,8 @@
import java.sql.Time;
import java.util.Iterator;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.TypeFacility;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.jdbc.extension.SQLConversionVisitor;
import com.metamatrix.connector.language.ICompareCriteria;
import com.metamatrix.connector.language.IElement;
@@ -143,14 +143,13 @@
append(leftExpression);
buffer.append(SPACE);
- final int op = obj.getOperator();
- switch(op) {
- case ICompareCriteria.EQ: buffer.append(EQ); break;
- case ICompareCriteria.GE: buffer.append(GE); break;
- case ICompareCriteria.GT: buffer.append(GT); break;
- case ICompareCriteria.LE: buffer.append(LE); break;
- case ICompareCriteria.LT: buffer.append(LT); break;
- case ICompareCriteria.NE: buffer.append(NE); break;
+ switch(obj.getOperator()) {
+ case EQ: buffer.append(EQ); break;
+ case GE: buffer.append(GE); break;
+ case GT: buffer.append(GT); break;
+ case LE: buffer.append(LE); break;
+ case LT: buffer.append(LT); break;
+ case NE: buffer.append(NE); break;
}
buffer.append(SPACE);
Modified:
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/oracle/OracleSQLTranslator.java
===================================================================
---
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/oracle/OracleSQLTranslator.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/oracle/OracleSQLTranslator.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -35,18 +35,17 @@
import java.util.Properties;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
import com.metamatrix.connector.api.TypeFacility;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.jdbc.extension.SQLConversionVisitor;
import com.metamatrix.connector.jdbc.extension.impl.AliasModifier;
import com.metamatrix.connector.jdbc.extension.impl.BasicSQLTranslator;
import com.metamatrix.connector.language.ICommand;
-import com.metamatrix.connector.language.ICompareCriteria;
-import com.metamatrix.connector.language.ICompoundCriteria;
import com.metamatrix.connector.language.ICriteria;
import com.metamatrix.connector.language.IElement;
import com.metamatrix.connector.language.IFrom;
+import com.metamatrix.connector.language.IFromItem;
import com.metamatrix.connector.language.IGroup;
import com.metamatrix.connector.language.IInlineView;
import com.metamatrix.connector.language.ILanguageFactory;
@@ -59,6 +58,7 @@
import com.metamatrix.connector.language.ISelect;
import com.metamatrix.connector.language.ISelectSymbol;
import com.metamatrix.connector.language.ISetQuery;
+import com.metamatrix.connector.language.ICompareCriteria.Operator;
import com.metamatrix.connector.metadata.runtime.RuntimeMetadata;
import com.metamatrix.connector.visitor.util.CollectorVisitor;
import com.metamatrix.connector.visitor.util.SQLStringVisitor;
@@ -129,20 +129,20 @@
IGroup group = languageFactory.createGroup(INLINE_VIEW_ALIAS, null, null);
IElement eleRowNum = languageFactory.createElement(ROWNUM_ALIAS, group, null,
TypeFacility.RUNTIME_TYPES.INTEGER);
ILiteral litOffset = languageFactory.createLiteral(new Integer(
limit.getRowOffset() ), TypeFacility.RUNTIME_TYPES.INTEGER);
- ICriteria criteria =
languageFactory.createCompareCriteria(ICompareCriteria.GT, eleRowNum, litOffset);
+ ICriteria criteria = languageFactory.createCompareCriteria(Operator.GT,
eleRowNum, litOffset);
lstCriteria.add( criteria );
}
IGroup group = languageFactory.createGroup(INLINE_VIEW_ALIAS, null, null);
IElement eleRowNum = languageFactory.createElement(ROWNUM_ALIAS, group, null,
TypeFacility.RUNTIME_TYPES.INTEGER);
ILiteral litLimit = languageFactory.createLiteral(new Integer(
limit.getRowOffset() + limit.getRowLimit() ),TypeFacility.RUNTIME_TYPES.INTEGER);
- ICriteria criteria = languageFactory.createCompareCriteria(ICompareCriteria.LE,
eleRowNum, litLimit);
+ ICriteria criteria = languageFactory.createCompareCriteria(Operator.LE,
eleRowNum, litLimit);
lstCriteria.add( criteria );
if ( lstCriteria.size() == 1 ) {
criteria = lstCriteria.get( 0 );
} else {
- criteria = languageFactory.createCompoundCriteria(ICompoundCriteria.AND,
lstCriteria );
+ criteria =
languageFactory.createCompoundCriteria(com.metamatrix.connector.language.ICompoundCriteria.Operator.AND,
lstCriteria );
}
IQuery intermediate = createLimitQuery(command, null, true);
@@ -167,7 +167,7 @@
ICriteria criteria, boolean alias) {
IInlineView view = languageFactory.createInlineView(query, INLINE_VIEW_ALIAS);
- IFrom from = languageFactory.createFrom(Arrays.asList(new Object[] {view}));
+ IFrom from = languageFactory.createFrom(Arrays.asList(new IFromItem[] {view}));
LinkedHashMap<String, Class<?>> names = new LinkedHashMap<String,
Class<?>>();
Modified:
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/postgresql/PostgreSQLTranslator.java
===================================================================
---
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/postgresql/PostgreSQLTranslator.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/postgresql/PostgreSQLTranslator.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -27,7 +27,7 @@
import java.util.Properties;
import com.metamatrix.connector.api.ConnectorEnvironment;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.jdbc.extension.SQLConversionVisitor;
import com.metamatrix.connector.jdbc.extension.impl.AliasModifier;
import com.metamatrix.connector.jdbc.extension.impl.BasicSQLTranslator;
Modified:
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/sqlserver/SqlServerSQLTranslator.java
===================================================================
---
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/sqlserver/SqlServerSQLTranslator.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/sqlserver/SqlServerSQLTranslator.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -29,7 +29,7 @@
import java.util.Properties;
import com.metamatrix.connector.api.ConnectorEnvironment;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.jdbc.extension.SQLConversionVisitor;
import com.metamatrix.connector.jdbc.extension.impl.AliasModifier;
import com.metamatrix.connector.jdbc.extension.impl.BasicSQLTranslator;
Modified:
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/ssl/JDBCSequeLinkSingleIdentityConnectionFactory.java
===================================================================
---
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/ssl/JDBCSequeLinkSingleIdentityConnectionFactory.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/ssl/JDBCSequeLinkSingleIdentityConnectionFactory.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -32,7 +32,7 @@
import java.sql.SQLException;
import java.util.Properties;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.jdbc.ConnectionQueryStrategy;
import com.metamatrix.connector.jdbc.ConnectionStrategy;
import com.metamatrix.connector.jdbc.JDBCPropertyNames;
Modified:
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/sybase/SybaseSQLTranslator.java
===================================================================
---
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/sybase/SybaseSQLTranslator.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/sybase/SybaseSQLTranslator.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -29,7 +29,7 @@
import java.util.Properties;
import com.metamatrix.connector.api.ConnectorEnvironment;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.jdbc.extension.SQLConversionVisitor;
import com.metamatrix.connector.jdbc.extension.impl.AliasModifier;
import com.metamatrix.connector.jdbc.extension.impl.BasicSQLTranslator;
Modified:
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/util/JDBCExecutionHelper.java
===================================================================
---
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/util/JDBCExecutionHelper.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/util/JDBCExecutionHelper.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -27,11 +27,11 @@
import java.util.Iterator;
import java.util.List;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
import com.metamatrix.connector.api.TypeFacility;
import com.metamatrix.connector.api.ValueTranslator;
import com.metamatrix.connector.basic.BasicValueTranslator;
-import com.metamatrix.connector.exception.ConnectorException;
/**
*/
Modified:
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/xa/JDBCSingleIdentityDSConnectionFactory.java
===================================================================
---
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/xa/JDBCSingleIdentityDSConnectionFactory.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/xa/JDBCSingleIdentityDSConnectionFactory.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -34,8 +34,8 @@
import javax.sql.XAConnection;
import javax.sql.XADataSource;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.jdbc.JDBCPlugin;
import com.metamatrix.connector.jdbc.JDBCPropertyNames;
import com.metamatrix.connector.jdbc.JDBCSingleIdentityConnectionFactory;
Modified:
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/xa/JDBCSourceXAConnection.java
===================================================================
---
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/xa/JDBCSourceXAConnection.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/xa/JDBCSourceXAConnection.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -32,7 +32,7 @@
import javax.transaction.xa.XAResource;
import com.metamatrix.connector.api.ConnectorEnvironment;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.jdbc.ConnectionListener;
import com.metamatrix.connector.jdbc.ConnectionStrategy;
import com.metamatrix.connector.jdbc.JDBCSourceConnection;
Modified:
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/xa/JDBCXAConnector.java
===================================================================
---
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/xa/JDBCXAConnector.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-jdbc/src/main/java/com/metamatrix/connector/jdbc/xa/JDBCXAConnector.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -29,9 +29,9 @@
import com.metamatrix.connector.api.Connection;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
import com.metamatrix.connector.api.ConnectorAnnotations.ConnectionPooling;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.jdbc.JDBCConnector;
import com.metamatrix.connector.jdbc.JDBCPropertyNames;
import com.metamatrix.connector.xa.api.TransactionContext;
Modified:
trunk/connectors/connector-jdbc/src/test/java/com/metamatrix/connector/jdbc/access/TestAccessSQLTranslator.java
===================================================================
---
trunk/connectors/connector-jdbc/src/test/java/com/metamatrix/connector/jdbc/access/TestAccessSQLTranslator.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-jdbc/src/test/java/com/metamatrix/connector/jdbc/access/TestAccessSQLTranslator.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -28,7 +28,7 @@
import com.metamatrix.cdk.api.EnvironmentUtility;
import com.metamatrix.cdk.unittest.FakeTranslationFactory;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.jdbc.extension.SQLTranslator;
import com.metamatrix.connector.jdbc.extension.TranslatedCommand;
import com.metamatrix.connector.language.ICommand;
Modified:
trunk/connectors/connector-jdbc/src/test/java/com/metamatrix/connector/jdbc/db2/TestDB2SqlTranslator.java
===================================================================
---
trunk/connectors/connector-jdbc/src/test/java/com/metamatrix/connector/jdbc/db2/TestDB2SqlTranslator.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-jdbc/src/test/java/com/metamatrix/connector/jdbc/db2/TestDB2SqlTranslator.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -30,8 +30,8 @@
import com.metamatrix.cdk.api.EnvironmentUtility;
import com.metamatrix.cdk.api.TranslationUtility;
import com.metamatrix.cdk.unittest.FakeTranslationFactory;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.jdbc.extension.SQLTranslator;
import com.metamatrix.connector.jdbc.extension.TranslatedCommand;
import com.metamatrix.connector.language.ICommand;
Modified:
trunk/connectors/connector-jdbc/src/test/java/com/metamatrix/connector/jdbc/mysql/TestMySQLTranslator.java
===================================================================
---
trunk/connectors/connector-jdbc/src/test/java/com/metamatrix/connector/jdbc/mysql/TestMySQLTranslator.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-jdbc/src/test/java/com/metamatrix/connector/jdbc/mysql/TestMySQLTranslator.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -28,7 +28,7 @@
import junit.framework.TestCase;
import com.metamatrix.cdk.api.EnvironmentUtility;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.jdbc.MetadataFactory;
import com.metamatrix.connector.jdbc.extension.SQLTranslator;
import com.metamatrix.connector.jdbc.extension.TranslatedCommand;
Modified:
trunk/connectors/connector-jdbc/src/test/java/com/metamatrix/connector/jdbc/postgresql/TestPostgreSQLTranslator.java
===================================================================
---
trunk/connectors/connector-jdbc/src/test/java/com/metamatrix/connector/jdbc/postgresql/TestPostgreSQLTranslator.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-jdbc/src/test/java/com/metamatrix/connector/jdbc/postgresql/TestPostgreSQLTranslator.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -28,7 +28,7 @@
import junit.framework.TestCase;
import com.metamatrix.cdk.api.EnvironmentUtility;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.jdbc.MetadataFactory;
import com.metamatrix.connector.jdbc.extension.SQLTranslator;
import com.metamatrix.connector.jdbc.extension.TranslatedCommand;
Modified:
trunk/connectors/connector-jdbc/src/test/java/com/metamatrix/connector/jdbc/sqlserver/TestSqlServerConversionVisitor.java
===================================================================
---
trunk/connectors/connector-jdbc/src/test/java/com/metamatrix/connector/jdbc/sqlserver/TestSqlServerConversionVisitor.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-jdbc/src/test/java/com/metamatrix/connector/jdbc/sqlserver/TestSqlServerConversionVisitor.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -29,7 +29,7 @@
import com.metamatrix.cdk.CommandBuilder;
import com.metamatrix.cdk.api.EnvironmentUtility;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.jdbc.MetadataFactory;
import com.metamatrix.connector.jdbc.extension.TranslatedCommand;
import com.metamatrix.connector.jdbc.util.FunctionReplacementVisitor;
Modified:
trunk/connectors/connector-jdbc/src/test/java/com/metamatrix/connector/jdbc/sybase/TestSybaseSQLConversionVisitor.java
===================================================================
---
trunk/connectors/connector-jdbc/src/test/java/com/metamatrix/connector/jdbc/sybase/TestSybaseSQLConversionVisitor.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-jdbc/src/test/java/com/metamatrix/connector/jdbc/sybase/TestSybaseSQLConversionVisitor.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -28,7 +28,7 @@
import junit.framework.TestCase;
import com.metamatrix.cdk.api.EnvironmentUtility;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.jdbc.MetadataFactory;
import com.metamatrix.connector.jdbc.extension.TranslatedCommand;
import com.metamatrix.connector.jdbc.util.FunctionReplacementVisitor;
Modified:
trunk/connectors/connector-jdbc/src/test/java/com/metamatrix/connector/jdbc/userpool/MockExampleConnectionFactory.java
===================================================================
---
trunk/connectors/connector-jdbc/src/test/java/com/metamatrix/connector/jdbc/userpool/MockExampleConnectionFactory.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-jdbc/src/test/java/com/metamatrix/connector/jdbc/userpool/MockExampleConnectionFactory.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -26,7 +26,7 @@
import java.util.Properties;
import com.metamatrix.connector.api.Connection;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.jdbc.JDBCUserIdentityConnectionFactory;
/**
Modified:
trunk/connectors/connector-jdbc/src/test/java/com/metamatrix/connector/jdbc/userpool/MockSourceConnection.java
===================================================================
---
trunk/connectors/connector-jdbc/src/test/java/com/metamatrix/connector/jdbc/userpool/MockSourceConnection.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-jdbc/src/test/java/com/metamatrix/connector/jdbc/userpool/MockSourceConnection.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -22,18 +22,16 @@
package com.metamatrix.connector.jdbc.userpool;
-import com.metamatrix.connector.api.Connection;
-import com.metamatrix.connector.api.ConnectorCapabilities;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.Execution;
import com.metamatrix.connector.api.ExecutionContext;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.basic.BasicConnection;
import com.metamatrix.connector.language.ICommand;
import com.metamatrix.connector.metadata.runtime.RuntimeMetadata;
-import com.metamatrix.connector.pool.PoolAwareConnection;
/**
*/
-public class MockSourceConnection implements PoolAwareConnection, Connection {
+public class MockSourceConnection extends BasicConnection {
private String url;
private int transLevel;
@@ -76,18 +74,8 @@
}
@Override
- public ConnectorCapabilities getCapabilities() {
- return null;
- }
-
- @Override
public void close() {
}
- @Override
- public void closeCalled() {
-
- }
-
}
Modified:
trunk/connectors/connector-jdbc/src/test/java/com/metamatrix/connector/jdbc/userpool/TestPerUserPool.java
===================================================================
---
trunk/connectors/connector-jdbc/src/test/java/com/metamatrix/connector/jdbc/userpool/TestPerUserPool.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-jdbc/src/test/java/com/metamatrix/connector/jdbc/userpool/TestPerUserPool.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -30,12 +30,12 @@
import org.mockito.Mockito;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
+import com.metamatrix.connector.api.CredentialMap;
import com.metamatrix.connector.api.ExecutionContext;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.internal.ConnectorPropertyNames;
import com.metamatrix.connector.jdbc.JDBCPropertyNames;
import com.metamatrix.connector.jdbc.JDBCSourceConnectionFactory;
-import com.metamatrix.connector.pool.CredentialMap;
import com.metamatrix.dqp.internal.datamgr.impl.ExecutionContextImpl;
/**
Modified:
trunk/connectors/connector-ldap/src/main/java/com/metamatrix/connector/ldap/IQueryToLdapSearchParser.java
===================================================================
---
trunk/connectors/connector-ldap/src/main/java/com/metamatrix/connector/ldap/IQueryToLdapSearchParser.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-ldap/src/main/java/com/metamatrix/connector/ldap/IQueryToLdapSearchParser.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -50,8 +50,8 @@
import javax.naming.ldap.SortKey;
import javax.naming.NamingException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ConnectorLogger;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.language.IAggregate;
import com.metamatrix.connector.language.ICaseExpression;
import com.metamatrix.connector.language.ICompareCriteria;
@@ -73,6 +73,7 @@
import com.metamatrix.connector.language.IScalarSubquery;
import com.metamatrix.connector.language.ISearchedCaseExpression;
import com.metamatrix.connector.language.ISelectSymbol;
+import com.metamatrix.connector.language.ICompareCriteria.Operator;
import com.metamatrix.connector.metadata.runtime.Element;
import com.metamatrix.connector.metadata.runtime.Group;
import com.metamatrix.connector.metadata.runtime.MetadataID;
@@ -359,11 +360,11 @@
* @param op operator to evaluate
* @return LDAP-specific string equivalent of the operator
*/
- private String parseCompoundCriteriaOp(int op) throws ConnectorException {
+ private String parseCompoundCriteriaOp(ICompoundCriteria.Operator op) throws
ConnectorException {
switch(op) {
- case ICompoundCriteria.AND:
+ case AND:
return "&"; //$NON-NLS-1$
- case ICompoundCriteria.OR:
+ case OR:
return "|"; //$NON-NLS-1$
default:
final String msg =
LDAPPlugin.Util.getString("IQueryToLdapSearchParser.criteriaNotParsableError");
//$NON-NLS-1$
@@ -469,7 +470,7 @@
// Recursive case: compound criteria
if(criteria instanceof ICompoundCriteria) {
logger.logTrace("Parsing compound criteria."); //$NON-NLS-1$
- int op = ((ICompoundCriteria) criteria).getOperator();
+ ICompoundCriteria.Operator op = ((ICompoundCriteria) criteria).getOperator();
List criteriaList = ((ICompoundCriteria) criteria).getCriteria();
String stringOp = parseCompoundCriteriaOp(op);
@@ -486,7 +487,8 @@
// Base case
} else if(criteria instanceof ICompareCriteria) {
logger.logTrace("Parsing compare criteria."); //$NON-NLS-1$
- int op = ((ICompareCriteria) criteria).getOperator();
+ ICompareCriteria.Operator op = ((ICompareCriteria) criteria).getOperator();
+
IExpression lhs = ((ICompareCriteria) criteria).getLeftExpression();
IExpression rhs = ((ICompareCriteria) criteria).getRightExpression();
@@ -496,8 +498,8 @@
final String msg =
LDAPPlugin.Util.getString("IQueryToLdapSearchParser.missingNISError");
//$NON-NLS-1$
throw new ConnectorException(msg);
}
+
addCompareCriteriaToList(filterList, op, lhsString, rhsString);
-
// Base case
} else if(criteria instanceof IExistsCriteria) {
logger.logTrace("Parsing EXISTS criteria: NOT IMPLEMENTED YET");
//$NON-NLS-1$
@@ -506,7 +508,7 @@
} else if(criteria instanceof ILikeCriteria) {
logger.logTrace("Parsing LIKE criteria."); //$NON-NLS-1$
// Convert LIKE to Equals, where any "%" symbol is replaced with
"*".
- int op = ICompareCriteria.EQ;
+ ICompareCriteria.Operator op = Operator.EQ;
IExpression lhs = ((ILikeCriteria) criteria).getLeftExpression();
IExpression rhs = ((ILikeCriteria) criteria).getRightExpression();
@@ -536,10 +538,10 @@
return;
}
filterList.add("("); //$NON-NLS-1$
- filterList.add(parseCompoundCriteriaOp(ICompoundCriteria.OR));
+ filterList.add(parseCompoundCriteriaOp(com.metamatrix.connector.language.ICompoundCriteria.Operator.OR));
Iterator rhsItr = rhsList.iterator();
while(rhsItr.hasNext()) {
- addCompareCriteriaToList(filterList, ICompareCriteria.EQ, getExpressionString(lhs),
+ addCompareCriteriaToList(filterList, Operator.EQ, getExpressionString(lhs),
getExpressionString((IExpression)rhsItr.next()));
}
filterList.add(")"); //$NON-NLS-1$
@@ -552,11 +554,11 @@
* @param lhs left hand side expression
* @param rhs right hand side expression
*/
- private void addCompareCriteriaToList(List filterList, int op, String lhs, String rhs)
throws ConnectorException {
+ private void addCompareCriteriaToList(List filterList, ICompareCriteria.Operator op,
String lhs, String rhs) throws ConnectorException {
// Push the comparison statement into the list, e.g.:
// (sn=Mike)
// !(empNum>=100)
- if(op == ICompareCriteria.NE) {
+ if(op == Operator.NE || op == Operator.GT || op == Operator.LT) {
filterList.add("("); //$NON-NLS-1$
filterList.add("!"); //$NON-NLS-1$
}
@@ -564,26 +566,18 @@
filterList.add(lhs);
switch(op) {
- case ICompareCriteria.EQ:
+ case NE:
+ case EQ:
filterList.add("="); //$NON-NLS-1$
break;
- case ICompareCriteria.GE:
+ case LT:
+ case GE:
filterList.add(">="); //$NON-NLS-1$
break;
- // Arguably, this is not correct, but LDAP doesn't support GT, and
- // we want to support pushdown in this case, to make things uniform.
- case ICompareCriteria.GT:
- filterList.add(">="); //$NON-NLS-1$
- break;
- case ICompareCriteria.LE:
+ case GT:
+ case LE:
filterList.add("<="); //$NON-NLS-1$
break;
- case ICompareCriteria.LT:
- filterList.add("<="); //$NON-NLS-1$
- break;
- case ICompareCriteria.NE:
- filterList.add("="); //$NON-NLS-1$
- break;
default:
final String msg =
LDAPPlugin.Util.getString("IQueryToLdapSearchParser.criteriaNotSupportedError");
//$NON-NLS-1$
throw new ConnectorException(msg);
@@ -591,7 +585,7 @@
}
filterList.add(rhs);
filterList.add(")"); //$NON-NLS-1$
- if(op == ICompareCriteria.NE) {
+ if(op == Operator.NE || op == Operator.GT || op == Operator.LT) {
filterList.add(")"); //$NON-NLS-1$
}
}
Modified:
trunk/connectors/connector-ldap/src/main/java/com/metamatrix/connector/ldap/LDAPConnection.java
===================================================================
---
trunk/connectors/connector-ldap/src/main/java/com/metamatrix/connector/ldap/LDAPConnection.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-ldap/src/main/java/com/metamatrix/connector/ldap/LDAPConnection.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -29,12 +29,12 @@
import javax.naming.NamingException;
import javax.naming.ldap.InitialLdapContext;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ConnectorLogger;
import com.metamatrix.connector.api.ExecutionContext;
import com.metamatrix.connector.api.ResultSetExecution;
import com.metamatrix.connector.api.UpdateExecution;
import com.metamatrix.connector.basic.BasicConnection;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.language.ICommand;
import com.metamatrix.connector.language.IQuery;
import com.metamatrix.connector.language.IQueryCommand;
Modified:
trunk/connectors/connector-ldap/src/main/java/com/metamatrix/connector/ldap/LDAPConnector.java
===================================================================
---
trunk/connectors/connector-ldap/src/main/java/com/metamatrix/connector/ldap/LDAPConnector.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-ldap/src/main/java/com/metamatrix/connector/ldap/LDAPConnector.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -27,9 +27,9 @@
import com.metamatrix.connector.api.Connector;
import com.metamatrix.connector.api.ConnectorCapabilities;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ConnectorLogger;
import com.metamatrix.connector.api.ExecutionContext;
-import com.metamatrix.connector.exception.ConnectorException;
/**
* LDAPConnector. This is responsible for initializing
Modified:
trunk/connectors/connector-ldap/src/main/java/com/metamatrix/connector/ldap/LDAPSyncQueryExecution.java
===================================================================
---
trunk/connectors/connector-ldap/src/main/java/com/metamatrix/connector/ldap/LDAPSyncQueryExecution.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-ldap/src/main/java/com/metamatrix/connector/ldap/LDAPSyncQueryExecution.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -94,12 +94,11 @@
import javax.naming.ldap.SortControl;
import javax.naming.ldap.SortKey;
-import com.metamatrix.connector.api.ConnectorCapabilities;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ConnectorLogger;
import com.metamatrix.connector.api.ExecutionContext;
import com.metamatrix.connector.api.ResultSetExecution;
import com.metamatrix.connector.basic.BasicExecution;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.language.IQuery;
import com.metamatrix.connector.metadata.runtime.Element;
import com.metamatrix.connector.metadata.runtime.RuntimeMetadata;
Modified:
trunk/connectors/connector-ldap/src/main/java/com/metamatrix/connector/ldap/LDAPUpdateExecution.java
===================================================================
---
trunk/connectors/connector-ldap/src/main/java/com/metamatrix/connector/ldap/LDAPUpdateExecution.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-ldap/src/main/java/com/metamatrix/connector/ldap/LDAPUpdateExecution.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -33,12 +33,12 @@
import javax.naming.ldap.InitialLdapContext;
import javax.naming.ldap.LdapContext;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ConnectorLogger;
import com.metamatrix.connector.api.DataNotAvailableException;
import com.metamatrix.connector.api.ExecutionContext;
import com.metamatrix.connector.api.UpdateExecution;
import com.metamatrix.connector.basic.BasicExecution;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.language.ICommand;
import com.metamatrix.connector.language.ICompareCriteria;
import com.metamatrix.connector.language.ICriteria;
@@ -49,6 +49,7 @@
import com.metamatrix.connector.language.ILiteral;
import com.metamatrix.connector.language.ISetClause;
import com.metamatrix.connector.language.IUpdate;
+import com.metamatrix.connector.language.ICompareCriteria.Operator;
import com.metamatrix.connector.metadata.runtime.MetadataID;
import com.metamatrix.connector.metadata.runtime.MetadataObject;
import com.metamatrix.connector.metadata.runtime.RuntimeMetadata;
@@ -368,7 +369,7 @@
throw new ConnectorException(msg);
}
ICompareCriteria compareCriteria = (ICompareCriteria)criteria;
- if (compareCriteria.getOperator() != ICompareCriteria.EQ) {
+ if (compareCriteria.getOperator() != Operator.EQ) {
final String msg =
LDAPPlugin.Util.getString("LDAPUpdateExecution.criteriaNotEqualsError");
//$NON-NLS-1$
throw new ConnectorException(msg);
}
Modified:
trunk/connectors/connector-ldap/src/test/java/com/metamatrix/connector/ldap/TestIQueryToLdapSearchParser.java
===================================================================
---
trunk/connectors/connector-ldap/src/test/java/com/metamatrix/connector/ldap/TestIQueryToLdapSearchParser.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-ldap/src/test/java/com/metamatrix/connector/ldap/TestIQueryToLdapSearchParser.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -35,6 +35,7 @@
import com.metamatrix.cdk.CommandBuilder;
import com.metamatrix.cdk.api.SysLogger;
import com.metamatrix.common.types.DataTypeManager;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ConnectorLogger;
import com.metamatrix.connector.language.ICommand;
import com.metamatrix.connector.language.IQuery;
@@ -90,8 +91,8 @@
SortKey[] sortKeys = searchDetails.getSortKeys();
// Compare actual with Expected
- assertEquals(contextName, expectedContextName);
- assertEquals(contextFilter, expectedContextFilter);
+ assertEquals(expectedContextName, contextName);
+ assertEquals(expectedContextFilter, contextFilter);
assertEquals(attrList.size(),expectedAttrNameList.size());
Iterator iter = attrList.iterator();
@@ -102,25 +103,16 @@
assertEquals(actualName, expectedName);
}
- assertEquals(countLimit, expectedCountLimit);
- assertEquals(searchScope, expectedSearchScope);
- assertEquals(sortKeys, expectedSortKeys);
+ assertEquals(expectedCountLimit, countLimit);
+ assertEquals(expectedSearchScope, searchScope);
+ assertEquals(expectedSortKeys, sortKeys);
}
/**
* Test a Query without criteria
*/
public void testSelectFrom1() throws Exception {
- ConnectorLogger logger = new SysLogger(false);
- QueryMetadataInterface metadata = exampleLdap();
- RuntimeMetadata rm = new MetadataFactory(metadata).createRuntimeMetadata();
- Properties props = new Properties();
-
- IQueryToLdapSearchParser searchParser = new
IQueryToLdapSearchParser(logger,rm,props);
-
- IQuery query = (IQuery)getCommand("SELECT UserID, Name FROM
LdapModel.People", metadata); //$NON-NLS-1$
-
- LDAPSearchDetails searchDetails =
searchParser.translateSQLQueryToLDAPSearch(query);
+ LDAPSearchDetails searchDetails = helpGetSearchDetails("SELECT UserID, Name
FROM LdapModel.People"); //$NON-NLS-1$
//-----------------------------------
// Set Expected SearchDetails Values
@@ -145,16 +137,7 @@
* Test a Query with a criteria
*/
public void testSelectFromWhere1() throws Exception {
- ConnectorLogger logger = new SysLogger(false);
- QueryMetadataInterface metadata = exampleLdap();
- RuntimeMetadata rm = new MetadataFactory(metadata).createRuntimeMetadata();
- Properties props = new Properties();
-
- IQueryToLdapSearchParser searchParser = new
IQueryToLdapSearchParser(logger,rm,props);
-
- IQuery query = (IQuery)getCommand("SELECT UserID, Name FROM LdapModel.People
WHERE Name = 'R%'", metadata); //$NON-NLS-1$
-
- LDAPSearchDetails searchDetails =
searchParser.translateSQLQueryToLDAPSearch(query);
+ LDAPSearchDetails searchDetails = helpGetSearchDetails("SELECT UserID, Name
FROM LdapModel.People WHERE Name = 'R%'"); //$NON-NLS-1$
//-----------------------------------
// Set Expected SearchDetails Values
@@ -175,7 +158,63 @@
}
+ public void testGT() throws Exception {
+ LDAPSearchDetails searchDetails = helpGetSearchDetails("SELECT UserID, Name
FROM LdapModel.People WHERE Name > 'R'"); //$NON-NLS-1$
+
+ //-----------------------------------
+ // Set Expected SearchDetails Values
+ //-----------------------------------
+ String expectedContextName = "ou=people,dc=metamatrix,dc=com";
//$NON-NLS-1$
+ String expectedContextFilter = "(!(cn<=R))"; //$NON-NLS-1$
+
+ List expectedAttrNameList = new ArrayList();
+ expectedAttrNameList.add("uid"); //$NON-NLS-1$
+ expectedAttrNameList.add("cn"); //$NON-NLS-1$
+
+ long expectedCountLimit = -1;
+ int expectedSearchScope = SearchControls.ONELEVEL_SCOPE;
+ SortKey[] expectedSortKeys = null;
+
+ helpTestSearchDetails(searchDetails, expectedContextName, expectedContextFilter,
expectedAttrNameList,
+ expectedCountLimit, expectedSearchScope, expectedSortKeys);
+ }
+ public void testLT() throws Exception {
+ LDAPSearchDetails searchDetails = helpGetSearchDetails("SELECT UserID, Name
FROM LdapModel.People WHERE Name < 'R'"); //$NON-NLS-1$
+
+ //-----------------------------------
+ // Set Expected SearchDetails Values
+ //-----------------------------------
+ String expectedContextName = "ou=people,dc=metamatrix,dc=com";
//$NON-NLS-1$
+ String expectedContextFilter = "(!(cn>=R))"; //$NON-NLS-1$
+
+ List expectedAttrNameList = new ArrayList();
+ expectedAttrNameList.add("uid"); //$NON-NLS-1$
+ expectedAttrNameList.add("cn"); //$NON-NLS-1$
+
+ long expectedCountLimit = -1;
+ int expectedSearchScope = SearchControls.ONELEVEL_SCOPE;
+ SortKey[] expectedSortKeys = null;
+
+ helpTestSearchDetails(searchDetails, expectedContextName, expectedContextFilter,
expectedAttrNameList,
+ expectedCountLimit, expectedSearchScope, expectedSortKeys);
+ }
+
+ private LDAPSearchDetails helpGetSearchDetails(String queryString) throws
ConnectorException {
+ ConnectorLogger logger = new SysLogger(false);
+ QueryMetadataInterface metadata = exampleLdap();
+ RuntimeMetadata rm = new MetadataFactory(metadata).createRuntimeMetadata();
+ Properties props = new Properties();
+
+ IQueryToLdapSearchParser searchParser = new
IQueryToLdapSearchParser(logger,rm,props);
+
+ IQuery query = (IQuery)getCommand(queryString, metadata);
+
+ LDAPSearchDetails searchDetails =
searchParser.translateSQLQueryToLDAPSearch(query);
+ return searchDetails;
+ }
+
+
public static FakeMetadataFacade exampleLdap() {
// Create models
FakeMetadataObject ldapModel =
FakeMetadataFactory.createPhysicalModel("LdapModel"); //$NON-NLS-1$
Modified:
trunk/connectors/connector-loopback/src/main/java/com/metamatrix/connector/loopback/LoopbackConnection.java
===================================================================
---
trunk/connectors/connector-loopback/src/main/java/com/metamatrix/connector/loopback/LoopbackConnection.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-loopback/src/main/java/com/metamatrix/connector/loopback/LoopbackConnection.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -23,7 +23,7 @@
package com.metamatrix.connector.loopback;
import com.metamatrix.connector.api.*;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.basic.BasicConnection;
import com.metamatrix.connector.language.ICommand;
import com.metamatrix.connector.metadata.runtime.RuntimeMetadata;
@@ -31,7 +31,7 @@
* Serves as a connection for the Loopback connector. Since there is no actual
* data source, this "connection" doesn't really have any state.
*/
-public class LoopbackConnection implements Connection {
+public class LoopbackConnection extends BasicConnection {
private ConnectorEnvironment env;
@@ -42,14 +42,6 @@
this.env = env;
}
- /*
- * @see com.metamatrix.data.Connection#getCapabilities()
- */
- public ConnectorCapabilities getCapabilities() {
- return null;
- }
-
-
@Override
public Execution createExecution(ICommand command,
ExecutionContext executionContext, RuntimeMetadata metadata)
Modified:
trunk/connectors/connector-loopback/src/main/java/com/metamatrix/connector/loopback/LoopbackConnector.java
===================================================================
---
trunk/connectors/connector-loopback/src/main/java/com/metamatrix/connector/loopback/LoopbackConnector.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-loopback/src/main/java/com/metamatrix/connector/loopback/LoopbackConnector.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -23,7 +23,6 @@
package com.metamatrix.connector.loopback;
import com.metamatrix.connector.api.*;
-import com.metamatrix.connector.exception.ConnectorException;
/**
* Starting point for the Loopback connector.
Modified:
trunk/connectors/connector-loopback/src/main/java/com/metamatrix/connector/loopback/LoopbackExecution.java
===================================================================
---
trunk/connectors/connector-loopback/src/main/java/com/metamatrix/connector/loopback/LoopbackExecution.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-loopback/src/main/java/com/metamatrix/connector/loopback/LoopbackExecution.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -35,12 +35,12 @@
import java.util.Random;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.DataNotAvailableException;
import com.metamatrix.connector.api.ProcedureExecution;
import com.metamatrix.connector.api.TypeFacility;
import com.metamatrix.connector.api.UpdateExecution;
import com.metamatrix.connector.basic.BasicExecution;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.language.ICommand;
import com.metamatrix.connector.language.IParameter;
import com.metamatrix.connector.language.IQueryCommand;
Modified:
trunk/connectors/connector-loopback/src/test/java/com/metamatrix/connector/loopback/TestLoopbackExecution.java
===================================================================
---
trunk/connectors/connector-loopback/src/test/java/com/metamatrix/connector/loopback/TestLoopbackExecution.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-loopback/src/test/java/com/metamatrix/connector/loopback/TestLoopbackExecution.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -32,7 +32,7 @@
import com.metamatrix.cdk.api.ConnectorHost;
import com.metamatrix.cdk.api.TranslationUtility;
import com.metamatrix.cdk.unittest.FakeTranslationFactory;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
public class TestLoopbackExecution extends TestCase {
Modified:
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/Connector.java
===================================================================
---
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/Connector.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/Connector.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -29,13 +29,13 @@
import com.metamatrix.connector.api.Connection;
import com.metamatrix.connector.api.ConnectorCapabilities;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ConnectorLogger;
+import com.metamatrix.connector.api.CredentialMap;
import com.metamatrix.connector.api.ExecutionContext;
import com.metamatrix.connector.api.ConnectorAnnotations.ConnectionPooling;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.pool.ConnectorIdentity;
import com.metamatrix.connector.pool.ConnectorIdentityFactory;
-import com.metamatrix.connector.pool.CredentialMap;
import com.metamatrix.connector.pool.SingleIdentityFactory;
import com.metamatrix.connector.pool.UserIdentityFactory;
import com.metamatrix.connector.salesforce.connection.SalesforceConnection;
Modified:
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/ConnectorState.java
===================================================================
---
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/ConnectorState.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/ConnectorState.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -25,8 +25,8 @@
import java.net.URL;
import java.util.Properties;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ConnectorLogger;
-import com.metamatrix.connector.exception.ConnectorException;
public class ConnectorState {
Modified:
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/Util.java
===================================================================
---
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/Util.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/Util.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -24,7 +24,7 @@
import java.text.DateFormat;
import java.text.SimpleDateFormat;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
public class Util {
Modified:
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/connection/SalesforceConnection.java
===================================================================
---
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/connection/SalesforceConnection.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/connection/SalesforceConnection.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -25,11 +25,11 @@
import java.util.List;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
import com.metamatrix.connector.api.ResultSetExecution;
import com.metamatrix.connector.api.UpdateExecution;
import com.metamatrix.connector.basic.BasicConnection;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.language.ICommand;
import com.metamatrix.connector.language.IQueryCommand;
import com.metamatrix.connector.metadata.runtime.RuntimeMetadata;
Modified:
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/connection/impl/ConnectionImpl.java
===================================================================
---
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/connection/impl/ConnectionImpl.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/connection/impl/ConnectionImpl.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -37,8 +37,8 @@
import org.apache.axis.transport.http.CommonsHTTPSender;
import org.apache.axis.transport.http.HTTPTransport;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ConnectorLogger;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.salesforce.execution.DataPayload;
import com.sforce.soap.partner.CallOptions;
import com.sforce.soap.partner.DeleteResult;
Modified:
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/execution/DeleteExecutionImpl.java
===================================================================
---
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/execution/DeleteExecutionImpl.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/execution/DeleteExecutionImpl.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -21,7 +21,7 @@
*/
package com.metamatrix.connector.salesforce.execution;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.language.IDelete;
import com.metamatrix.connector.salesforce.execution.visitors.DeleteVisitor;
Modified:
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/execution/InsertExecutionImpl.java
===================================================================
---
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/execution/InsertExecutionImpl.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/execution/InsertExecutionImpl.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -22,7 +22,7 @@
package com.metamatrix.connector.salesforce.execution;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.language.IInsert;
import com.metamatrix.connector.salesforce.execution.visitors.InsertVisitor;
Modified:
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/execution/QueryExecutionImpl.java
===================================================================
---
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/execution/QueryExecutionImpl.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/execution/QueryExecutionImpl.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -32,12 +32,12 @@
import org.apache.axis.message.MessageElement;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ConnectorLogger;
import com.metamatrix.connector.api.DataNotAvailableException;
import com.metamatrix.connector.api.ExecutionContext;
import com.metamatrix.connector.api.ResultSetExecution;
import com.metamatrix.connector.basic.BasicExecution;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.language.IQueryCommand;
import com.metamatrix.connector.metadata.runtime.Element;
import com.metamatrix.connector.metadata.runtime.RuntimeMetadata;
Modified:
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/execution/UpdateExecutionImpl.java
===================================================================
---
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/execution/UpdateExecutionImpl.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/execution/UpdateExecutionImpl.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -28,7 +28,7 @@
import org.apache.axis.message.MessageElement;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.language.IElement;
import com.metamatrix.connector.language.ILiteral;
import com.metamatrix.connector.language.ISetClause;
Modified:
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/execution/UpdateExecutionParent.java
===================================================================
---
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/execution/UpdateExecutionParent.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/execution/UpdateExecutionParent.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -24,11 +24,11 @@
import java.util.ArrayList;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.DataNotAvailableException;
import com.metamatrix.connector.api.ExecutionContext;
import com.metamatrix.connector.api.UpdateExecution;
import com.metamatrix.connector.basic.BasicExecution;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.language.ICommand;
import com.metamatrix.connector.language.ICompareCriteria;
import com.metamatrix.connector.language.ICriteria;
Modified:
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/execution/visitors/CriteriaVisitor.java
===================================================================
---
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/execution/visitors/CriteriaVisitor.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/execution/visitors/CriteriaVisitor.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -28,7 +28,7 @@
import java.util.List;
import java.util.Map;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.language.ICompareCriteria;
import com.metamatrix.connector.language.IElement;
import com.metamatrix.connector.language.IExpression;
@@ -37,6 +37,7 @@
import com.metamatrix.connector.language.IInCriteria;
import com.metamatrix.connector.language.ILikeCriteria;
import com.metamatrix.connector.language.ILiteral;
+import com.metamatrix.connector.language.ICompareCriteria.Operator;
import com.metamatrix.connector.metadata.runtime.Element;
import com.metamatrix.connector.metadata.runtime.Group;
import com.metamatrix.connector.metadata.runtime.MetadataID;
@@ -67,7 +68,7 @@
protected static final String CLOSE = ")";
protected RuntimeMetadata metadata;
- private HashMap<Integer, String> comparisonOperators;
+ private HashMap<ICompareCriteria.Operator, String> comparisonOperators;
protected List<String> criteriaList = new ArrayList<String>();
protected boolean hasCriteria;
protected Map<String, Element> columnElementsByName = new HashMap<String,
Element>();
@@ -77,13 +78,13 @@
public CriteriaVisitor(RuntimeMetadata metadata) {
this.metadata = metadata;
- comparisonOperators = new HashMap<Integer, String>();
- comparisonOperators.put(ICompareCriteria.EQ, "=");
- comparisonOperators.put(ICompareCriteria.GE, ">=");
- comparisonOperators.put(ICompareCriteria.GT, ">");
- comparisonOperators.put(ICompareCriteria.LE, "<=");
- comparisonOperators.put(ICompareCriteria.LT, "<");
- comparisonOperators.put(ICompareCriteria.NE, "!=");
+ comparisonOperators = new HashMap<ICompareCriteria.Operator, String>();
+ comparisonOperators.put(Operator.EQ, "=");
+ comparisonOperators.put(Operator.GE, ">=");
+ comparisonOperators.put(Operator.GT, ">");
+ comparisonOperators.put(Operator.LE, "<=");
+ comparisonOperators.put(Operator.LT, "<");
+ comparisonOperators.put(Operator.NE, "!=");
}
@Override
@@ -91,7 +92,7 @@
super.visit(criteria);
try {
addCompareCriteria(criteriaList, criteria);
- boolean isAcceptableID = (ICompareCriteria.EQ == criteria.getOperator() &&
+ boolean isAcceptableID = (Operator.EQ == criteria.getOperator() &&
isIdColumn(criteria.getLeftExpression()));
setHasCriteria(true, isAcceptableID);
} catch (ConnectorException e) {
Modified:
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/execution/visitors/DeleteVisitor.java
===================================================================
---
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/execution/visitors/DeleteVisitor.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/execution/visitors/DeleteVisitor.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -23,7 +23,7 @@
import java.util.Iterator;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.language.IDelete;
import com.metamatrix.connector.metadata.runtime.RuntimeMetadata;
Modified:
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/execution/visitors/ICriteriaVisitor.java
===================================================================
---
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/execution/visitors/ICriteriaVisitor.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/execution/visitors/ICriteriaVisitor.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -21,7 +21,7 @@
*/
package com.metamatrix.connector.salesforce.execution.visitors;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
public interface ICriteriaVisitor {
Modified:
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/execution/visitors/IQueryProvidingVisitor.java
===================================================================
---
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/execution/visitors/IQueryProvidingVisitor.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/execution/visitors/IQueryProvidingVisitor.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -21,7 +21,7 @@
*/
package com.metamatrix.connector.salesforce.execution.visitors;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
public interface IQueryProvidingVisitor extends ICriteriaVisitor {
Modified:
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/execution/visitors/InsertVisitor.java
===================================================================
---
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/execution/visitors/InsertVisitor.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/execution/visitors/InsertVisitor.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -28,8 +28,9 @@
import org.apache.axis.message.MessageElement;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.language.IElement;
+import com.metamatrix.connector.language.IExpression;
import com.metamatrix.connector.language.IInsert;
import com.metamatrix.connector.language.ILiteral;
import com.metamatrix.connector.metadata.runtime.Element;
@@ -51,7 +52,7 @@
loadColumnMetadata(insert.getGroup());
List<IElement> columns = insert.getElements();
- List<Object> values = insert.getValues();
+ List<IExpression> values = insert.getValues();
if(columns.size() != values.size()) {
throw new ConnectorException("Error: columns.size and values.size are not the
same.");
}
Modified:
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/execution/visitors/SelectVisitor.java
===================================================================
---
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/execution/visitors/SelectVisitor.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/execution/visitors/SelectVisitor.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -26,7 +26,7 @@
import java.util.List;
import java.util.Map;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.language.IElement;
import com.metamatrix.connector.language.IExpression;
import com.metamatrix.connector.language.IFrom;
Modified:
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/execution/visitors/UpdateVisitor.java
===================================================================
---
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/execution/visitors/UpdateVisitor.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-salesforce/src/main/java/com/metamatrix/connector/salesforce/execution/visitors/UpdateVisitor.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -23,7 +23,7 @@
import java.util.Iterator;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.language.IUpdate;
import com.metamatrix.connector.metadata.runtime.RuntimeMetadata;
Modified:
trunk/connectors/connector-salesforce/src/test/java/com/metamatrix/connector/salesforce/TestConnector.java
===================================================================
---
trunk/connectors/connector-salesforce/src/test/java/com/metamatrix/connector/salesforce/TestConnector.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-salesforce/src/test/java/com/metamatrix/connector/salesforce/TestConnector.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -24,8 +24,8 @@
import junit.framework.TestCase;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.salesforce.connection.SalesforceConnection;
import com.metamatrix.connector.salesforce.test.util.ObjectFactory;
@@ -52,14 +52,10 @@
noCredConnector.start(env2);
}
- public void testGetConnection() {
+ public void testGetConnection() throws Exception {
ExecutionContext secContext = ObjectFactory.getDefaultSecurityContext();
- try {
- SalesforceConnection connection = (SalesforceConnection)
connector.getConnection(secContext);
- assertNotNull("the connection is null", connection);
- } catch (ConnectorException e) {
- fail(e.getMessage());
- }
+ SalesforceConnection connection = (SalesforceConnection)
connector.getConnection(secContext);
+ assertNotNull("the connection is null", connection);
}
/*
@@ -80,11 +76,10 @@
try {
localConnector.start(env);
localConnector.getConnection(secContext);
+ fail("should have produced an exception");
} catch (ConnectorException e) {
assertFalse("There is no error message", e.getMessage().length() == 0);
- return;
}
- fail("should have produced an exception");
}
public void testGetConnectionEmptyUser() {
@@ -94,11 +89,10 @@
try {
localConnector.start(env);
localConnector.getConnection(secContext);
+ fail("should have produced an exception");
} catch (ConnectorException e) {
assertTrue("Wrong error message",
e.getMessage().contains("Invalid"));
- return;
}
- fail("should have produced an exception");
}
public void testGetConnectionBadPass() {
@@ -108,11 +102,10 @@
try {
localConnector.start(env);
localConnector.getConnection(secContext);
+ fail("should have produced an exception");
} catch (ConnectorException e) {
assertFalse("There is no error message", e.getMessage().length() == 0);
- return;
}
- fail("should have produced an exception");
}
public void testGetConnectionEmptyPass() {
@@ -122,31 +115,22 @@
try {
localConnector.start(env);
localConnector.getConnection(secContext);
+ fail("should have produced an exception");
} catch (ConnectorException e) {
assertTrue("Wrong error message", e.getMessage().contains("Invalid
credential configuration"));
- return;
}
- fail("should have produced an exception");
}
- public void testInitialize() {
+ public void testInitialize() throws Exception {
Connector localConnector = new Connector();
- try {
- localConnector.start(ObjectFactory.getDefaultTestConnectorEnvironment());
- assertEquals(ObjectFactory.VALID_PASSWORD, connector.getState().getPassword());
- assertEquals(ObjectFactory.VALID_USERNAME, connector.getState().getUsername());
- } catch (ConnectorException e) {
- fail(e.getMessage());
- }
+ localConnector.start(ObjectFactory.getDefaultTestConnectorEnvironment());
+ assertEquals(ObjectFactory.VALID_PASSWORD, connector.getState().getPassword());
+ assertEquals(ObjectFactory.VALID_USERNAME, connector.getState().getUsername());
}
- public void testGetLogger() {
- try {
- assertNotNull(connector.getLogger());
- } catch (ConnectorException e) {
- fail(e.getMessage());
- }
+ public void testGetLogger() throws Exception {
+ assertNotNull(connector.getLogger());
}
public void testGetState() {
Modified:
trunk/connectors/connector-salesforce/src/test/java/com/metamatrix/connector/salesforce/test/util/ObjectFactory.java
===================================================================
---
trunk/connectors/connector-salesforce/src/test/java/com/metamatrix/connector/salesforce/test/util/ObjectFactory.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-salesforce/src/test/java/com/metamatrix/connector/salesforce/test/util/ObjectFactory.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -27,8 +27,8 @@
import com.metamatrix.cdk.api.EnvironmentUtility;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.CredentialMap;
import com.metamatrix.connector.api.ExecutionContext;
-import com.metamatrix.connector.pool.CredentialMap;
import com.metamatrix.connector.salesforce.ConnectorState;
public class ObjectFactory {
Modified:
trunk/connectors/connector-text/src/main/java/com/metamatrix/connector/text/TextConnection.java
===================================================================
---
trunk/connectors/connector-text/src/main/java/com/metamatrix/connector/text/TextConnection.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-text/src/main/java/com/metamatrix/connector/text/TextConnection.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -26,10 +26,10 @@
import java.util.Map;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
import com.metamatrix.connector.api.ResultSetExecution;
import com.metamatrix.connector.basic.BasicConnection;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.language.IQuery;
import com.metamatrix.connector.language.IQueryCommand;
import com.metamatrix.connector.metadata.runtime.RuntimeMetadata;
Modified:
trunk/connectors/connector-text/src/main/java/com/metamatrix/connector/text/TextConnector.java
===================================================================
---
trunk/connectors/connector-text/src/main/java/com/metamatrix/connector/text/TextConnector.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-text/src/main/java/com/metamatrix/connector/text/TextConnector.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -38,9 +38,9 @@
import com.metamatrix.connector.api.Connector;
import com.metamatrix.connector.api.ConnectorCapabilities;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ConnectorLogger;
import com.metamatrix.connector.api.ExecutionContext;
-import com.metamatrix.connector.exception.ConnectorException;
/**
* Implementation of text connector.
Modified:
trunk/connectors/connector-text/src/main/java/com/metamatrix/connector/text/TextSynchExecution.java
===================================================================
---
trunk/connectors/connector-text/src/main/java/com/metamatrix/connector/text/TextSynchExecution.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-text/src/main/java/com/metamatrix/connector/text/TextSynchExecution.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -38,12 +38,12 @@
import java.util.Properties;
import com.metamatrix.connector.api.Connection;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ConnectorLogger;
import com.metamatrix.connector.api.DataNotAvailableException;
import com.metamatrix.connector.api.ResultSetExecution;
import com.metamatrix.connector.api.TypeFacility;
import com.metamatrix.connector.basic.BasicExecution;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.language.ICommand;
import com.metamatrix.connector.language.IElement;
import com.metamatrix.connector.language.IFrom;
Modified:
trunk/connectors/connector-text/src/test/java/com/metamatrix/connector/text/TestMultiFileTextSynchExecution.java
===================================================================
---
trunk/connectors/connector-text/src/test/java/com/metamatrix/connector/text/TestMultiFileTextSynchExecution.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-text/src/test/java/com/metamatrix/connector/text/TestMultiFileTextSynchExecution.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -30,7 +30,7 @@
import junit.framework.TestCase;
import com.metamatrix.cdk.api.ConnectorHost;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.core.util.UnitTestUtil;
import com.metamatrix.query.unittest.TimestampUtil;
Modified:
trunk/connectors/connector-text/src/test/java/com/metamatrix/connector/text/TestRowHeaderTextSynchExecution.java
===================================================================
---
trunk/connectors/connector-text/src/test/java/com/metamatrix/connector/text/TestRowHeaderTextSynchExecution.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-text/src/test/java/com/metamatrix/connector/text/TestRowHeaderTextSynchExecution.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -24,7 +24,7 @@
import junit.framework.TestCase;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
public class TestRowHeaderTextSynchExecution extends TestCase {
Modified:
trunk/connectors/connector-text/src/test/java/com/metamatrix/connector/text/TestTextConnection.java
===================================================================
---
trunk/connectors/connector-text/src/test/java/com/metamatrix/connector/text/TestTextConnection.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-text/src/test/java/com/metamatrix/connector/text/TestTextConnection.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -29,7 +29,7 @@
import com.metamatrix.cdk.api.EnvironmentUtility;
import com.metamatrix.connector.api.ConnectorEnvironment;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.core.util.UnitTestUtil;
/**
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/AbstractCachingConnector.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/AbstractCachingConnector.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/AbstractCachingConnector.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -28,7 +28,7 @@
import java.util.Map;
import com.metamatrix.connector.api.ConnectorEnvironment;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.xml.base.LoggingConnector;
import com.metamatrix.connector.xml.cache.DocumentCache;
import com.metamatrix.connector.xml.cache.IDocumentCache;
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/AsynchronousDocumentProducer.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/AsynchronousDocumentProducer.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/AsynchronousDocumentProducer.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -24,7 +24,7 @@
package com.metamatrix.connector.xml;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
public interface AsynchronousDocumentProducer extends DocumentProducer {
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/BaseXMLConnectorState.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/BaseXMLConnectorState.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/BaseXMLConnectorState.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -26,8 +26,8 @@
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ConnectorLogger;
-import com.metamatrix.connector.exception.ConnectorException;
public interface BaseXMLConnectorState {
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/CachingConnector.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/CachingConnector.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/CachingConnector.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -24,7 +24,7 @@
package com.metamatrix.connector.xml;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.xml.base.StatefulConnector;
import com.metamatrix.connector.xml.cache.IDocumentCache;
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/DocumentProducer.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/DocumentProducer.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/DocumentProducer.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -25,7 +25,7 @@
import java.io.Serializable;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.xml.base.Response;
/**
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/NamedDocumentExecutor.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/NamedDocumentExecutor.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/NamedDocumentExecutor.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -23,7 +23,7 @@
package com.metamatrix.connector.xml;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
public interface NamedDocumentExecutor
{
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/SecureConnectorState.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/SecureConnectorState.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/SecureConnectorState.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -24,7 +24,7 @@
package com.metamatrix.connector.xml;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
public interface SecureConnectorState {
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/XMLConnection.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/XMLConnection.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/XMLConnection.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -26,7 +26,7 @@
import com.metamatrix.connector.api.Connection;
import com.metamatrix.connector.api.ConnectorEnvironment;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
public interface XMLConnection extends Connection {
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/XMLConnectorState.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/XMLConnectorState.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/XMLConnectorState.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -26,8 +26,8 @@
import com.metamatrix.connector.api.Connection;
import com.metamatrix.connector.api.ConnectorCapabilities;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
-import com.metamatrix.connector.exception.ConnectorException;
public interface XMLConnectorState extends BaseXMLConnectorState {
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/BaseBatchProducer.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/BaseBatchProducer.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/BaseBatchProducer.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -26,8 +26,8 @@
import java.util.List;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
-import com.metamatrix.connector.exception.ConnectorException;
public class BaseBatchProducer {
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/BaseResultsProducer.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/BaseResultsProducer.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/BaseResultsProducer.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -50,8 +50,8 @@
import org.jdom.input.SAXBuilder;
import org.jdom.output.XMLOutputter;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ConnectorLogger;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.xml.cache.IDocumentCache;
import com.metamatrix.connector.xml.http.Messages;
/**
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/CriteriaDesc.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/CriteriaDesc.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/CriteriaDesc.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -27,7 +27,7 @@
import java.util.List;
import java.util.Properties;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.language.IBaseInCriteria;
import com.metamatrix.connector.language.ICompareCriteria;
import com.metamatrix.connector.language.ICriteria;
@@ -37,6 +37,7 @@
import com.metamatrix.connector.language.ILiteral;
import com.metamatrix.connector.language.IQuery;
import com.metamatrix.connector.language.LanguageUtil;
+import com.metamatrix.connector.language.ICompareCriteria.Operator;
import com.metamatrix.connector.metadata.runtime.Element;
/**
@@ -380,7 +381,7 @@
ICriteria criteriaSeg = (ICriteria) criteriaIter.next();
if (criteriaSeg instanceof ICompareCriteria) {
ICompareCriteria compCriteria = (ICompareCriteria) criteriaSeg;
- if (compCriteria.getOperator() == ICompareCriteria.EQ) {
+ if (compCriteria.getOperator() == Operator.EQ) {
IExpression lExpr = compCriteria.getLeftExpression();
IExpression rExpr = compCriteria.getRightExpression();
handleCompareCriteria(lExpr, rExpr, fullName, parmPair);
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/DocumentBuilder.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/DocumentBuilder.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/DocumentBuilder.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -36,7 +36,7 @@
import org.jdom.Namespace;
import org.jdom.output.XMLOutputter;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.xml.soap.SOAPDocBuilder;
public class DocumentBuilder {
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/FileBackedValueReference.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/FileBackedValueReference.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/FileBackedValueReference.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -26,7 +26,7 @@
import java.io.RandomAccessFile;
import java.lang.Long;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
public class FileBackedValueReference implements LargeTextValueReference {
private RandomAccessFile file;
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/LargeOrSmallString.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/LargeOrSmallString.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/LargeOrSmallString.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -22,7 +22,7 @@
package com.metamatrix.connector.xml.base;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
public class LargeOrSmallString
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/LargeTextExtractingXmlFilter.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/LargeTextExtractingXmlFilter.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/LargeTextExtractingXmlFilter.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -36,8 +36,8 @@
import org.xml.sax.SAXException;
import org.xml.sax.helpers.XMLFilterImpl;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ConnectorLogger;
-import com.metamatrix.connector.exception.ConnectorException;
class LargeTextExtractingXmlFilter extends XMLFilterImpl {
LargeTextExtractingXmlFilter(int maxInMemoryStringSize,
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/LargeTextValueReference.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/LargeTextValueReference.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/LargeTextValueReference.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -22,7 +22,7 @@
package com.metamatrix.connector.xml.base;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
public interface LargeTextValueReference {
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/LoggingConnector.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/LoggingConnector.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/LoggingConnector.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -23,8 +23,8 @@
package com.metamatrix.connector.xml.base;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ConnectorLogger;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.xml.XMLConnectorState;
/**
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/OutputXPathDesc.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/OutputXPathDesc.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/OutputXPathDesc.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -25,7 +25,7 @@
import java.text.MessageFormat;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.language.ILiteral;
import com.metamatrix.connector.metadata.runtime.Element;
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/ParameterDescriptor.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/ParameterDescriptor.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/ParameterDescriptor.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -23,7 +23,7 @@
package com.metamatrix.connector.xml.base;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.metadata.runtime.Element;
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/QueryAnalyzer.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/QueryAnalyzer.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/QueryAnalyzer.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -28,9 +28,9 @@
import java.util.List;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ConnectorLogger;
import com.metamatrix.connector.api.ExecutionContext;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.language.IElement;
import com.metamatrix.connector.language.IExpression;
import com.metamatrix.connector.language.IFrom;
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/RequestResponseDocumentProducer.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/RequestResponseDocumentProducer.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/RequestResponseDocumentProducer.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -32,8 +32,8 @@
import java.util.Iterator;
import java.util.List;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ConnectorLogger;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.xml.DocumentProducer;
import com.metamatrix.connector.xml.XMLConnectorState;
import com.metamatrix.connector.xml.XMLExecution;
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/Response.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/Response.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/Response.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -33,7 +33,7 @@
import org.apache.commons.codec.binary.Base64;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.xml.DocumentProducer;
import com.metamatrix.connector.xml.cache.DocumentCache;
import com.metamatrix.connector.xml.cache.IDocumentCache;
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/SecureConnectorStateImpl.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/SecureConnectorStateImpl.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/SecureConnectorStateImpl.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -27,7 +27,7 @@
import java.util.Properties;
import com.metamatrix.connector.api.ConnectorEnvironment;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.xml.SecureConnectorState;
import com.metamatrix.connector.xml.TrustedPayloadHandler;
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/TrustedPayloadBridge.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/TrustedPayloadBridge.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/TrustedPayloadBridge.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -28,7 +28,7 @@
import com.metamatrix.connector.api.ConnectorEnvironment;
import com.metamatrix.connector.api.ConnectorLogger;
-import com.metamatrix.connector.pool.CredentialMap;
+import com.metamatrix.connector.api.CredentialMap;
import com.metamatrix.connector.xml.TrustedPayloadHandler;
public abstract class TrustedPayloadBridge implements TrustedPayloadHandler {
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/ValueConvertor.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/ValueConvertor.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/ValueConvertor.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -28,9 +28,9 @@
import java.util.ArrayList;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
import com.metamatrix.connector.api.TypeFacility;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.metadata.runtime.Element;
public class ValueConvertor {
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/XMLConnectionImpl.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/XMLConnectionImpl.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/XMLConnectionImpl.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -26,11 +26,11 @@
import java.io.Serializable;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ConnectorLogger;
import com.metamatrix.connector.api.ExecutionContext;
import com.metamatrix.connector.api.ResultSetExecution;
import com.metamatrix.connector.basic.BasicConnection;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.language.IQuery;
import com.metamatrix.connector.language.IQueryCommand;
import com.metamatrix.connector.metadata.runtime.RuntimeMetadata;
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/XMLConnector.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/XMLConnector.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/XMLConnector.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -26,10 +26,10 @@
import com.metamatrix.connector.api.Connection;
import com.metamatrix.connector.api.ConnectorCapabilities;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ConnectorLogger;
import com.metamatrix.connector.api.ExecutionContext;
import com.metamatrix.connector.api.ConnectorAnnotations.ConnectionPooling;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.xml.AbstractCachingConnector;
@ConnectionPooling(enabled=false)
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/XMLConnectorStateImpl.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/XMLConnectorStateImpl.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/XMLConnectorStateImpl.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -27,8 +27,8 @@
import com.metamatrix.connector.api.ConnectorCapabilities;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ConnectorLogger;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.xml.IQueryPreprocessor;
import com.metamatrix.connector.xml.SAXFilterProvider;
import com.metamatrix.connector.xml.XMLConnectorState;
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/XMLExecutionImpl.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/XMLExecutionImpl.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/XMLExecutionImpl.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -29,12 +29,12 @@
import java.util.List;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ConnectorLogger;
import com.metamatrix.connector.api.DataNotAvailableException;
import com.metamatrix.connector.api.ExecutionContext;
import com.metamatrix.connector.api.ResultSetExecution;
import com.metamatrix.connector.basic.BasicExecution;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.language.IQuery;
import com.metamatrix.connector.metadata.runtime.RuntimeMetadata;
import com.metamatrix.connector.xml.DocumentProducer;
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/XMLExtractor.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/XMLExtractor.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/base/XMLExtractor.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -41,8 +41,8 @@
import org.xml.sax.helpers.AttributesImpl;
import org.xml.sax.helpers.XMLFilterImpl;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ConnectorLogger;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.xml.SAXFilterProvider;
/**
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/cache/DocumentCache.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/cache/DocumentCache.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/cache/DocumentCache.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -40,8 +40,8 @@
import java.util.Set;
import java.util.Vector;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ConnectorLogger;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.xml.base.XMLDocument;
/**
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/cache/IDocumentCache.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/cache/IDocumentCache.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/cache/IDocumentCache.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -23,7 +23,7 @@
package com.metamatrix.connector.xml.cache;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
public interface IDocumentCache {
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/cache/RequestRecord.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/cache/RequestRecord.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/cache/RequestRecord.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -27,8 +27,8 @@
import java.util.HashMap;
import java.util.Map;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ConnectorLogger;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.xml.CachingConnector;
/**
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/file/FileConnectorState.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/file/FileConnectorState.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/file/FileConnectorState.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -27,8 +27,8 @@
import com.metamatrix.connector.api.Connection;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.xml.CachingConnector;
import com.metamatrix.connector.xml.DocumentProducer;
import com.metamatrix.connector.xml.XMLExecution;
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/file/FileExecutor.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/file/FileExecutor.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/file/FileExecutor.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -34,9 +34,9 @@
import org.jdom.Document;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ConnectorLogger;
import com.metamatrix.connector.api.ExecutionContext;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.xml.DocumentProducer;
import com.metamatrix.connector.xml.NamedDocumentExecutor;
import com.metamatrix.connector.xml.SAXFilterProvider;
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/http/DefaultTrustDeserializer.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/http/DefaultTrustDeserializer.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/http/DefaultTrustDeserializer.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -29,7 +29,7 @@
import org.apache.commons.httpclient.UsernamePasswordCredentials;
import org.apache.commons.httpclient.auth.AuthScope;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.xml.XMLConnectorState;
import com.metamatrix.connector.xml.base.TrustedPayloadBridge;
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/http/HTTPConnectorState.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/http/HTTPConnectorState.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/http/HTTPConnectorState.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -40,8 +40,8 @@
import com.metamatrix.connector.api.Connection;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.xml.CachingConnector;
import com.metamatrix.connector.xml.DocumentProducer;
import com.metamatrix.connector.xml.XMLExecution;
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/http/HTTPExecutor.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/http/HTTPExecutor.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/http/HTTPExecutor.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -43,8 +43,8 @@
import org.apache.commons.httpclient.util.ParameterParser;
import org.jdom.Document;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.xml.CachingConnector;
import com.metamatrix.connector.xml.SAXFilterProvider;
import com.metamatrix.connector.xml.XMLConnection;
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/http/HTTPRequestor.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/http/HTTPRequestor.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/http/HTTPRequestor.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -38,8 +38,8 @@
import org.jdom.Document;
import org.jdom.output.XMLOutputter;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ConnectorLogger;
-import com.metamatrix.connector.exception.ConnectorException;
/**
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/http/HTTPTrustDeserializer.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/http/HTTPTrustDeserializer.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/http/HTTPTrustDeserializer.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -29,8 +29,8 @@
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.HttpMethod;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ConnectorLogger;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.xml.TrustedPayloadHandler;
import com.metamatrix.connector.xml.XMLConnectorState;
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/jms/JMSConnection.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/jms/JMSConnection.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/jms/JMSConnection.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -36,10 +36,10 @@
import javax.naming.NamingException;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
import com.metamatrix.connector.api.ResultSetExecution;
import com.metamatrix.connector.basic.BasicConnection;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.language.IQuery;
import com.metamatrix.connector.language.IQueryCommand;
import com.metamatrix.connector.metadata.runtime.RuntimeMetadata;
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/jms/JMSExecution.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/jms/JMSExecution.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/jms/JMSExecution.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -34,12 +34,12 @@
import javax.jms.Session;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ConnectorLogger;
import com.metamatrix.connector.api.DataNotAvailableException;
import com.metamatrix.connector.api.ExecutionContext;
import com.metamatrix.connector.api.ResultSetExecution;
import com.metamatrix.connector.basic.BasicExecution;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.language.IQuery;
import com.metamatrix.connector.metadata.runtime.RuntimeMetadata;
import com.metamatrix.connector.xml.SOAPConnectorState;
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/jms/JMSRequestExecutor.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/jms/JMSRequestExecutor.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/jms/JMSRequestExecutor.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -41,9 +41,9 @@
import org.jdom.Document;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ConnectorLogger;
import com.metamatrix.connector.api.ExecutionContext;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.xml.AsynchronousDocumentProducer;
import com.metamatrix.connector.xml.SOAPConnectorState;
import com.metamatrix.connector.xml.base.CriteriaDesc;
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/jms/JMSSOAPConnectorState.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/jms/JMSSOAPConnectorState.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/jms/JMSSOAPConnectorState.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -27,8 +27,8 @@
import java.util.Properties;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ConnectorLogger;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.xml.SOAPConnectorState;
import com.metamatrix.connector.xml.soap.SOAPConnectorStateImpl;
import com.metamatrix.connector.xmlsource.soap.SecurityToken;
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/jms/JMSXMLConnectorState.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/jms/JMSXMLConnectorState.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/jms/JMSXMLConnectorState.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -31,8 +31,8 @@
import com.metamatrix.connector.api.Connection;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.xml.CachingConnector;
import com.metamatrix.connector.xml.DocumentProducer;
import com.metamatrix.connector.xml.XMLExecution;
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/soap/SOAPConnectorState.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/soap/SOAPConnectorState.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/soap/SOAPConnectorState.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -27,8 +27,8 @@
import java.util.Properties;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ConnectorLogger;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.xml.DocumentProducer;
import com.metamatrix.connector.xml.XMLExecution;
import com.metamatrix.connector.xml.http.HTTPConnectorState;
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/soap/SOAPConnectorStateImpl.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/soap/SOAPConnectorStateImpl.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/soap/SOAPConnectorStateImpl.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -31,8 +31,8 @@
import javax.net.ssl.HttpsURLConnection;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ConnectorLogger;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.xml.SOAPConnectorState;
import com.metamatrix.connector.xml.base.Messages;
import com.metamatrix.connector.xml.http.HTTPConnectorState;
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/soap/SOAPDocBuilder.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/soap/SOAPDocBuilder.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/soap/SOAPDocBuilder.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -35,7 +35,7 @@
import org.jdom.Element;
import org.jdom.Namespace;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.xml.SOAPConnectorState;
import com.metamatrix.connector.xml.base.CriteriaDesc;
import com.metamatrix.connector.xml.base.DocumentBuilder;
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/soap/SOAPExecutor.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/soap/SOAPExecutor.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xml/soap/SOAPExecutor.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -57,8 +57,8 @@
import org.w3c.dom.NodeList;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.xml.CachingConnector;
import com.metamatrix.connector.xml.SOAPConnectorState;
import com.metamatrix.connector.xml.TrustedPayloadHandler;
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xmlsource/XMLConnectionFacory.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xmlsource/XMLConnectionFacory.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xmlsource/XMLConnectionFacory.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -26,8 +26,8 @@
import com.metamatrix.connector.api.Connection;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
-import com.metamatrix.connector.exception.ConnectorException;
/**
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xmlsource/XMLSourceConnection.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xmlsource/XMLSourceConnection.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xmlsource/XMLSourceConnection.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -23,8 +23,8 @@
package com.metamatrix.connector.xmlsource;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.basic.BasicConnection;
-import com.metamatrix.connector.exception.ConnectorException;
/**
* A Base XML Connection to an XML Source
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xmlsource/XMLSourceConnector.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xmlsource/XMLSourceConnector.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xmlsource/XMLSourceConnector.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -26,9 +26,9 @@
import com.metamatrix.connector.api.Connector;
import com.metamatrix.connector.api.ConnectorCapabilities;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
import com.metamatrix.connector.api.ConnectorAnnotations.ConnectionPooling;
-import com.metamatrix.connector.exception.ConnectorException;
/**
* XML Source connector, will give provide a XML document as source to
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xmlsource/XMLSourceExecution.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xmlsource/XMLSourceExecution.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xmlsource/XMLSourceExecution.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -30,10 +30,10 @@
import com.metamatrix.connector.DataPlugin;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.DataNotAvailableException;
import com.metamatrix.connector.api.ProcedureExecution;
import com.metamatrix.connector.basic.BasicExecution;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.language.IParameter;
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xmlsource/file/FileConnection.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xmlsource/file/FileConnection.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xmlsource/file/FileConnection.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -26,9 +26,9 @@
import java.util.Properties;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
import com.metamatrix.connector.api.ProcedureExecution;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.language.IProcedure;
import com.metamatrix.connector.metadata.runtime.RuntimeMetadata;
import com.metamatrix.connector.xmlsource.XMLSourceConnection;
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xmlsource/file/FileExecution.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xmlsource/file/FileExecution.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xmlsource/file/FileExecution.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -32,8 +32,8 @@
import javax.xml.transform.stream.StreamSource;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.language.IProcedure;
import com.metamatrix.connector.metadata.runtime.MetadataObject;
import com.metamatrix.connector.metadata.runtime.RuntimeMetadata;
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xmlsource/soap/SoapConnection.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xmlsource/soap/SoapConnection.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xmlsource/soap/SoapConnection.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -50,9 +50,9 @@
import org.apache.axis.wsdl.symbolTable.SymbolTable;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
import com.metamatrix.connector.api.ProcedureExecution;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.language.IProcedure;
import com.metamatrix.connector.metadata.runtime.RuntimeMetadata;
import com.metamatrix.connector.xmlsource.XMLSourceConnection;
Modified:
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xmlsource/soap/SoapExecution.java
===================================================================
---
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xmlsource/soap/SoapExecution.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/main/java/com/metamatrix/connector/xmlsource/soap/SoapExecution.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -30,10 +30,11 @@
import javax.xml.transform.Source;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.language.IParameter;
import com.metamatrix.connector.language.IProcedure;
+import com.metamatrix.connector.language.IParameter.Direction;
import com.metamatrix.connector.metadata.runtime.MetadataObject;
import com.metamatrix.connector.metadata.runtime.RuntimeMetadata;
import com.metamatrix.connector.xmlsource.XMLSourceExecution;
@@ -88,10 +89,10 @@
// extract all the input parameters to send to the service
for (Iterator i = procedure.getParameters().iterator(); i.hasNext();) {
IParameter param = (IParameter)i.next();
- if (param.getDirection() == IParameter.IN ) {
+ if (param.getDirection() == Direction.IN ) {
argsList.add(param.getValue());
}
- else if (param.getDirection() == IParameter.INOUT) {
+ else if (param.getDirection() == Direction.INOUT) {
argsList.add(param.getValue());
}
}
Modified:
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/MockCachingConnector.java
===================================================================
---
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/MockCachingConnector.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/MockCachingConnector.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -26,9 +26,9 @@
import com.metamatrix.connector.api.Connection;
import com.metamatrix.connector.api.ConnectorCapabilities;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ConnectorLogger;
import com.metamatrix.connector.api.ExecutionContext;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.xml.cache.IDocumentCache;
import com.metamatrix.connector.xml.cache.MockDocumentCache;
Modified:
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/ProxyObjectFactory.java
===================================================================
---
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/ProxyObjectFactory.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/ProxyObjectFactory.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -34,8 +34,8 @@
import com.metamatrix.cdk.api.EnvironmentUtility;
import com.metamatrix.cdk.api.TranslationUtility;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.language.IQuery;
import com.metamatrix.connector.metadata.runtime.RuntimeMetadata;
import com.metamatrix.connector.xml.SecureConnectorState;
Modified:
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestCriteriaDesc.java
===================================================================
---
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestCriteriaDesc.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestCriteriaDesc.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -29,7 +29,7 @@
import junit.framework.TestCase;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.language.IBaseInCriteria;
import com.metamatrix.connector.language.ICompareCriteria;
import com.metamatrix.connector.language.ICriteria;
Modified:
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestExecutionInfo.java
===================================================================
---
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestExecutionInfo.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestExecutionInfo.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -32,9 +32,9 @@
import com.metamatrix.cdk.api.SysLogger;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ConnectorLogger;
import com.metamatrix.connector.api.ExecutionContext;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.language.IQuery;
import com.metamatrix.connector.metadata.runtime.RuntimeMetadata;
import com.metamatrix.connector.xml.IQueryPreprocessor;
Modified:
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestOutputXPathDesc.java
===================================================================
---
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestOutputXPathDesc.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestOutputXPathDesc.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -26,7 +26,7 @@
import junit.framework.TestCase;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.language.ICompareCriteria;
import com.metamatrix.connector.language.ICriteria;
import com.metamatrix.connector.language.IElement;
Modified:
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestParameterDescriptor.java
===================================================================
---
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestParameterDescriptor.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestParameterDescriptor.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -26,7 +26,7 @@
import junit.framework.TestCase;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.language.IElement;
import com.metamatrix.connector.language.IExpression;
import com.metamatrix.connector.language.IQuery;
Modified:
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestQueryAnalyzer.java
===================================================================
---
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestQueryAnalyzer.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestQueryAnalyzer.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -30,9 +30,9 @@
import com.metamatrix.cdk.api.SysLogger;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ConnectorLogger;
import com.metamatrix.connector.api.ExecutionContext;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.language.IQuery;
import com.metamatrix.connector.metadata.runtime.RuntimeMetadata;
import com.metamatrix.connector.xml.IQueryPreprocessor;
Modified:
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestStringBackedValueReference.java
===================================================================
---
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestStringBackedValueReference.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestStringBackedValueReference.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -24,7 +24,7 @@
import junit.framework.TestCase;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
public class TestStringBackedValueReference extends TestCase {
Modified:
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestXMLConnection.java
===================================================================
---
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestXMLConnection.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestXMLConnection.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -26,8 +26,8 @@
import junit.framework.TestCase;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
-import com.metamatrix.connector.exception.ConnectorException;
public class TestXMLConnection extends TestCase {
Modified:
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestXMLConnector.java
===================================================================
---
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestXMLConnector.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestXMLConnector.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -29,8 +29,8 @@
import com.metamatrix.cdk.api.EnvironmentUtility;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.xml.XMLConnectorState;
import com.metamatrix.connector.xml.file.FileConnectorState;
Modified:
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestXMLConnectorState.java
===================================================================
---
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestXMLConnectorState.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestXMLConnectorState.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -30,9 +30,9 @@
import com.metamatrix.cdk.api.SysLogger;
import com.metamatrix.connector.api.Connection;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.Execution;
import com.metamatrix.connector.api.ExecutionContext;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.xml.CachingConnector;
import com.metamatrix.connector.xml.DocumentProducer;
import com.metamatrix.connector.xml.XMLConnectorState;
Modified:
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestXMLExecution.java
===================================================================
---
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestXMLExecution.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestXMLExecution.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -26,7 +26,7 @@
import junit.framework.TestCase;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.language.IQuery;
/**
Modified:
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestXMLExtractor.java
===================================================================
---
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestXMLExtractor.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestXMLExtractor.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -30,8 +30,8 @@
import org.jdom.Document;
import com.metamatrix.cdk.api.SysLogger;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ConnectorLogger;
-import com.metamatrix.connector.exception.ConnectorException;
public class TestXMLExtractor extends TestCase {
Modified:
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/cache/TestCache.java
===================================================================
---
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/cache/TestCache.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/cache/TestCache.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -30,7 +30,7 @@
import junit.framework.TestSuite;
import com.metamatrix.cdk.api.EnvironmentUtility;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.core.util.UnitTestUtil;
/**
Modified:
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/file/TestFileConnectorState.java
===================================================================
---
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/file/TestFileConnectorState.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/file/TestFileConnectorState.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -28,7 +28,7 @@
import com.metamatrix.cdk.api.EnvironmentUtility;
import com.metamatrix.cdk.api.SysLogger;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.xml.DocumentProducer;
import com.metamatrix.connector.xml.base.ProxyObjectFactory;
import com.metamatrix.connector.xml.base.XMLExecutionImpl;
Modified:
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/file/TestFileExecutor.java
===================================================================
---
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/file/TestFileExecutor.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/file/TestFileExecutor.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -32,7 +32,7 @@
import com.metamatrix.cdk.api.EnvironmentUtility;
import com.metamatrix.cdk.api.SysLogger;
import com.metamatrix.connector.api.ConnectorEnvironment;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.language.IElement;
import com.metamatrix.connector.language.IExpression;
import com.metamatrix.connector.language.IQuery;
Modified:
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/http/TestHTTPConnectorState.java
===================================================================
---
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/http/TestHTTPConnectorState.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/http/TestHTTPConnectorState.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -28,7 +28,7 @@
import com.metamatrix.cdk.api.EnvironmentUtility;
import com.metamatrix.cdk.api.SysLogger;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.xml.base.ProxyObjectFactory;
/**
Modified:
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/jms/TestJMSConnectorState.java
===================================================================
---
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/jms/TestJMSConnectorState.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/jms/TestJMSConnectorState.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -32,7 +32,7 @@
import com.metamatrix.cdk.api.EnvironmentUtility;
import com.metamatrix.cdk.api.SysLogger;
import com.metamatrix.connector.api.ConnectorEnvironment;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.xml.base.ProxyObjectFactory;
public class TestJMSConnectorState extends TestCase {
Modified:
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/jms/TestJMSSOAPConnectorState.java
===================================================================
---
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/jms/TestJMSSOAPConnectorState.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/jms/TestJMSSOAPConnectorState.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -32,7 +32,7 @@
import com.metamatrix.cdk.api.EnvironmentUtility;
import com.metamatrix.cdk.api.SysLogger;
import com.metamatrix.connector.api.ConnectorEnvironment;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.xml.base.ProxyObjectFactory;
import com.metamatrix.connector.xml.soap.SOAPConnectorStateImpl;
Modified:
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xmlsource/FakeRuntimeMetadata.java
===================================================================
---
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xmlsource/FakeRuntimeMetadata.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xmlsource/FakeRuntimeMetadata.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -24,7 +24,7 @@
import java.util.Properties;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.metadata.runtime.MetadataID;
import com.metamatrix.connector.metadata.runtime.MetadataObject;
import com.metamatrix.connector.metadata.runtime.RuntimeMetadata;
Modified:
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xmlsource/file/TestFileConnection.java
===================================================================
---
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xmlsource/file/TestFileConnection.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xmlsource/file/TestFileConnection.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -28,7 +28,7 @@
import com.metamatrix.cdk.api.EnvironmentUtility;
import com.metamatrix.connector.api.ConnectorEnvironment;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.core.util.UnitTestUtil;
Modified:
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xmlsource/file/TestFileExecution.java
===================================================================
---
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xmlsource/file/TestFileExecution.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xmlsource/file/TestFileExecution.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -32,13 +32,12 @@
import com.metamatrix.cdk.api.EnvironmentUtility;
import com.metamatrix.connector.api.ConnectorEnvironment;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.language.ILanguageFactory;
import com.metamatrix.connector.language.IParameter;
import com.metamatrix.connector.language.IProcedure;
-import com.metamatrix.connector.metadata.runtime.MetadataID;
+import com.metamatrix.connector.language.IParameter.Direction;
import com.metamatrix.connector.metadata.runtime.RuntimeMetadata;
-import com.metamatrix.connector.visitor.framework.LanguageObjectVisitor;
import com.metamatrix.connector.xmlsource.FakeRuntimeMetadata;
import com.metamatrix.core.util.UnitTestUtil;
@@ -68,8 +67,9 @@
List result = exec.next();
assertNotNull(result);
assertNull(exec.next());
+ IParameter returnParam = fact.createParameter(0, Direction.RETURN, null,
null, null);
try {
- exec.getOutputValue(getReturnParameter());
+ exec.getOutputValue(returnParam);
fail("should have thrown error in returning a return");
//$NON-NLS-1$
}catch(Exception e) {
}
@@ -109,37 +109,6 @@
}
}
-
- IParameter getReturnParameter() {
- return new IParameter() {
- public int getIndex() {
- return 0;
- }
- public int getDirection() {
- return IParameter.RETURN;
- }
- public Class getType() {
- return null;
- }
- public Object getValue() {
- return null;
- }
- public boolean getValueSpecified() {
- return false;
- }
- public void setIndex(int index) {}
- public void setDirection(int direction) {}
- public void setType(Class type) {}
- public void setValue(Object value) {}
- public void setValueSpecified(boolean specified) {}
- public void acceptVisitor(LanguageObjectVisitor visitor) {}
- public MetadataID getMetadataID() {
- return null;
- }
- public void setMetadataID(MetadataID metadataID) {}
- };
- }
-
String readFile(String filename) throws Exception {
Reader reader = new FileReader(filename);
StringBuffer fileContents = new StringBuffer();
Modified:
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xmlsource/soap/TestSoapConnection.java
===================================================================
---
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xmlsource/soap/TestSoapConnection.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xmlsource/soap/TestSoapConnection.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -29,7 +29,7 @@
import com.metamatrix.cdk.api.EnvironmentUtility;
import com.metamatrix.connector.api.ConnectorEnvironment;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.core.util.UnitTestUtil;
Modified:
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xmlsource/soap/TestSoapExecution.java
===================================================================
---
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xmlsource/soap/TestSoapExecution.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xmlsource/soap/TestSoapExecution.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -40,9 +40,8 @@
import com.metamatrix.connector.language.ILanguageFactory;
import com.metamatrix.connector.language.IParameter;
import com.metamatrix.connector.language.IProcedure;
-import com.metamatrix.connector.metadata.runtime.MetadataID;
+import com.metamatrix.connector.language.IParameter.Direction;
import com.metamatrix.connector.metadata.runtime.RuntimeMetadata;
-import com.metamatrix.connector.visitor.framework.LanguageObjectVisitor;
import com.metamatrix.connector.xmlsource.FakeRuntimeMetadata;
import com.metamatrix.connector.xmlsource.soap.service.WebServiceServer;
import com.metamatrix.core.util.UnitTestUtil;
@@ -548,7 +547,7 @@
List parameters = new ArrayList();
if (args != null && args.length > 0) {
for (int i = 0; i < args.length; i++) {
- IParameter param = fact.createParameter(i+1, IParameter.IN, args[i],
args[i].getClass(), null);
+ IParameter param = fact.createParameter(i+1, Direction.IN, args[i],
args[i].getClass(), null);
parameters.add(param);
}
}
@@ -560,9 +559,9 @@
List result = exec.next();
assertNotNull(result);
assertNull(exec.next());
-
+ IParameter returnParam = fact.createParameter(0, Direction.RETURN, null, null,
null);
try {
- exec.getOutputValue(getReturnParameter());
+ exec.getOutputValue(returnParam);
fail("should have thrown error in returning a return");
//$NON-NLS-1$
}catch(Exception e) {
}
@@ -577,34 +576,4 @@
// System.out.println(xmlString);
}
- IParameter getReturnParameter() {
- return new IParameter() {
- public int getIndex() {
- return 0;
- }
- public int getDirection() {
- return IParameter.RETURN;
- }
- public Class getType() {
- return null;
- }
- public Object getValue() {
- return null;
- }
- public boolean getValueSpecified() {
- return false;
- }
- public void setIndex(int index) {}
- public void setDirection(int direction) {}
- public void setType(Class type) {}
- public void setValue(Object value) {}
- public void setValueSpecified(boolean specified) {}
- public void acceptVisitor(LanguageObjectVisitor visitor) {}
- public MetadataID getMetadataID() {
- return null;
- }
- public void setMetadataID(MetadataID metadataID) {}
- };
- }
-
}
Modified:
trunk/connectors/sandbox/connector-exec/src/main/java/com/metamatrix/connector/exec/ExecAntExecution.java
===================================================================
---
trunk/connectors/sandbox/connector-exec/src/main/java/com/metamatrix/connector/exec/ExecAntExecution.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/sandbox/connector-exec/src/main/java/com/metamatrix/connector/exec/ExecAntExecution.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -49,11 +49,11 @@
import com.metamatrix.common.util.CommonPropertyNames;
import com.metamatrix.common.util.OSPlatformUtil;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ConnectorLogger;
import com.metamatrix.connector.api.DataNotAvailableException;
import com.metamatrix.connector.api.ResultSetExecution;
import com.metamatrix.connector.basic.BasicExecution;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.language.IQuery;
import com.metamatrix.connector.metadata.runtime.RuntimeMetadata;
import com.metamatrix.core.util.Assertion;
Modified:
trunk/connectors/sandbox/connector-exec/src/main/java/com/metamatrix/connector/exec/ExecConnection.java
===================================================================
---
trunk/connectors/sandbox/connector-exec/src/main/java/com/metamatrix/connector/exec/ExecConnection.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/sandbox/connector-exec/src/main/java/com/metamatrix/connector/exec/ExecConnection.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -25,11 +25,11 @@
import com.metamatrix.connector.api.ConnectorCapabilities;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ConnectorLogger;
import com.metamatrix.connector.api.ExecutionContext;
import com.metamatrix.connector.api.ResultSetExecution;
import com.metamatrix.connector.basic.BasicConnection;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.language.IQuery;
import com.metamatrix.connector.language.IQueryCommand;
import com.metamatrix.connector.metadata.runtime.RuntimeMetadata;
Modified:
trunk/connectors/sandbox/connector-exec/src/main/java/com/metamatrix/connector/exec/ExecConnector.java
===================================================================
---
trunk/connectors/sandbox/connector-exec/src/main/java/com/metamatrix/connector/exec/ExecConnector.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/sandbox/connector-exec/src/main/java/com/metamatrix/connector/exec/ExecConnector.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -35,9 +35,9 @@
import com.metamatrix.connector.api.Connector;
import com.metamatrix.connector.api.ConnectorCapabilities;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ConnectorLogger;
import com.metamatrix.connector.api.ExecutionContext;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.core.util.ObjectConverterUtil;
/**
Modified:
trunk/connectors/sandbox/connector-exec/src/main/java/com/metamatrix/connector/exec/ExecVisitor.java
===================================================================
---
trunk/connectors/sandbox/connector-exec/src/main/java/com/metamatrix/connector/exec/ExecVisitor.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/sandbox/connector-exec/src/main/java/com/metamatrix/connector/exec/ExecVisitor.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -26,7 +26,7 @@
import java.util.Map;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.language.ICompareCriteria;
import com.metamatrix.connector.language.ICriteria;
import com.metamatrix.connector.language.IElement;
Modified:
trunk/connectors/sandbox/connector-exec/src/test/java/com/metamatrix/connector/exec/FakeExecConnector.java
===================================================================
---
trunk/connectors/sandbox/connector-exec/src/test/java/com/metamatrix/connector/exec/FakeExecConnector.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/sandbox/connector-exec/src/test/java/com/metamatrix/connector/exec/FakeExecConnector.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -28,7 +28,7 @@
import java.util.List;
import java.util.Properties;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
/**
* Implmentation of text connector.
Modified:
trunk/connectors/sandbox/connector-exec/src/test/java/com/metamatrix/connector/exec/TestsExec.java
===================================================================
---
trunk/connectors/sandbox/connector-exec/src/test/java/com/metamatrix/connector/exec/TestsExec.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/sandbox/connector-exec/src/test/java/com/metamatrix/connector/exec/TestsExec.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -33,8 +33,8 @@
import junit.framework.TestCase;
import com.metamatrix.cdk.api.ConnectorHost;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ResultSetExecution;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.core.util.UnitTestUtil;
/**
Modified:
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/ObjectConnection.java
===================================================================
---
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/ObjectConnection.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/ObjectConnection.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -25,11 +25,11 @@
import com.metamatrix.admin.api.exception.AdminException;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ConnectorLogger;
import com.metamatrix.connector.api.ExecutionContext;
import com.metamatrix.connector.api.ProcedureExecution;
import com.metamatrix.connector.basic.BasicConnection;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.language.IProcedure;
import com.metamatrix.connector.metadata.runtime.RuntimeMetadata;
import com.metamatrix.connector.object.extension.IObjectSource;
Modified:
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/ObjectConnector.java
===================================================================
---
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/ObjectConnector.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/ObjectConnector.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -26,9 +26,9 @@
import com.metamatrix.connector.api.Connector;
import com.metamatrix.connector.api.ConnectorCapabilities;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ConnectorLogger;
import com.metamatrix.connector.api.ExecutionContext;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.object.util.ObjectConnectorUtil;
import com.metamatrix.connector.pool.ConnectorIdentity;
import com.metamatrix.connector.pool.ConnectorIdentityFactory;
Modified:
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/ObjectProcedureExecution.java
===================================================================
---
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/ObjectProcedureExecution.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/ObjectProcedureExecution.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -25,11 +25,11 @@
import java.util.List;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ConnectorLogger;
import com.metamatrix.connector.api.DataNotAvailableException;
import com.metamatrix.connector.api.ProcedureExecution;
import com.metamatrix.connector.basic.BasicExecution;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.language.IParameter;
import com.metamatrix.connector.language.IProcedure;
import com.metamatrix.connector.metadata.runtime.RuntimeMetadata;
Modified:
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/SourceConnectionFactory.java
===================================================================
---
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/SourceConnectionFactory.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/SourceConnectionFactory.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -2,8 +2,8 @@
import com.metamatrix.connector.api.Connection;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.pool.ConnectorIdentity;
import com.metamatrix.connector.pool.SingleIdentity;
import com.metamatrix.connector.pool.UserIdentity;
Modified:
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/extension/IObjectSource.java
===================================================================
---
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/extension/IObjectSource.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/extension/IObjectSource.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -24,7 +24,7 @@
import java.util.List;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.object.ObjectProcedureExecution;
/**
Modified:
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/extension/ISourceTranslator.java
===================================================================
---
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/extension/ISourceTranslator.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/extension/ISourceTranslator.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -28,8 +28,8 @@
import java.util.TimeZone;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.TypeFacility;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.language.ICommand;
import com.metamatrix.connector.metadata.runtime.RuntimeMetadata;
Modified:
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/extension/command/ObjectCommand.java
===================================================================
---
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/extension/command/ObjectCommand.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/extension/command/ObjectCommand.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -22,7 +22,7 @@
package com.metamatrix.connector.object.extension.command;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.language.ICommand;
import com.metamatrix.connector.language.IMetadataReference;
import com.metamatrix.connector.metadata.runtime.MetadataID;
Modified:
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/extension/command/ProcedureCommand.java
===================================================================
---
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/extension/command/ProcedureCommand.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/extension/command/ProcedureCommand.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -29,9 +29,10 @@
import java.util.List;
import java.util.Map;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.language.IParameter;
import com.metamatrix.connector.language.IProcedure;
+import com.metamatrix.connector.language.IParameter.Direction;
import com.metamatrix.connector.metadata.runtime.Element;
import com.metamatrix.connector.metadata.runtime.MetadataID;
import com.metamatrix.connector.metadata.runtime.RuntimeMetadata;
@@ -167,13 +168,13 @@
for(final Iterator iter = parameters.iterator(); iter.hasNext();) {
IParameter parameter = (IParameter) iter.next();
// if there is one result set parameter
- if(parameter.getDirection() == IParameter.RESULT_SET) {
+ if(parameter.getDirection() == Direction.RESULT_SET) {
this.resultSetParameter = parameter;
initResultSet();
- } else if(parameter.getDirection() == IParameter.IN ||
parameter.getDirection() == IParameter.INOUT) {
+ } else if(parameter.getDirection() == Direction.IN ||
parameter.getDirection() == Direction.INOUT) {
initCriteria(parameter);
// inParams.add(parameter);
- } else if (parameter.getDirection() == IParameter.RETURN &&
this.resultSetParameter==null) {
+ } else if (parameter.getDirection() == Direction.RETURN &&
this.resultSetParameter==null) {
this.resultSetParameter = parameter;
initResultReturn();
}
Modified:
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/extension/source/BaseObjectSource.java
===================================================================
---
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/extension/source/BaseObjectSource.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/extension/source/BaseObjectSource.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -30,7 +30,7 @@
import java.util.Collections;
import java.util.List;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.object.ObjectSourceMethodManager;
import com.metamatrix.connector.object.extension.IObjectCommand;
import com.metamatrix.connector.object.extension.IObjectSource;
Modified:
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/extension/source/BaseSourceConnectionFactory.java
===================================================================
---
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/extension/source/BaseSourceConnectionFactory.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/extension/source/BaseSourceConnectionFactory.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -26,8 +26,8 @@
import com.metamatrix.connector.api.Connection;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.object.ObjectConnection;
import com.metamatrix.connector.object.SourceConnectionFactory;
import com.metamatrix.connector.object.extension.IObjectSource;
Modified:
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/extension/source/BasicSourceTranslator.java
===================================================================
---
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/extension/source/BasicSourceTranslator.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/extension/source/BasicSourceTranslator.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -29,9 +29,9 @@
import java.util.TimeZone;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.TypeFacility;
import com.metamatrix.connector.api.ValueTranslator;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.language.ICommand;
import com.metamatrix.connector.language.IProcedure;
import com.metamatrix.connector.metadata.runtime.RuntimeMetadata;
Modified:
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/extension/value/BasicValueRetriever.java
===================================================================
---
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/extension/value/BasicValueRetriever.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/extension/value/BasicValueRetriever.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -33,7 +33,7 @@
import java.util.Map;
import java.util.Properties;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.object.ObjectSourceMethodManager;
import com.metamatrix.connector.object.extension.IObjectCommand;
import com.metamatrix.connector.object.extension.IValueRetriever;
Modified:
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/extension/value/JavaUtilDateValueTranslator.java
===================================================================
---
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/extension/value/JavaUtilDateValueTranslator.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/extension/value/JavaUtilDateValueTranslator.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -27,9 +27,9 @@
import java.sql.Timestamp;
import java.util.Date;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
import com.metamatrix.connector.api.ValueTranslator;
-import com.metamatrix.connector.exception.ConnectorException;
/**
*/
Modified:
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/util/ObjectConnectorUtil.java
===================================================================
---
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/util/ObjectConnectorUtil.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/util/ObjectConnectorUtil.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -26,7 +26,7 @@
import com.metamatrix.connector.api.ConnectorCapabilities;
import com.metamatrix.connector.api.ConnectorEnvironment;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.language.ICommand;
import com.metamatrix.connector.language.IMetadataReference;
import com.metamatrix.connector.metadata.runtime.MetadataID;
Modified:
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/util/ObjectExecutionHelper.java
===================================================================
---
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/util/ObjectExecutionHelper.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/sandbox/connector-object/src/main/java/com/metamatrix/connector/object/util/ObjectExecutionHelper.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -36,11 +36,11 @@
import java.util.TimeZone;
import com.metamatrix.common.util.TimestampWithTimezone;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
import com.metamatrix.connector.api.TypeFacility;
import com.metamatrix.connector.api.ValueTranslator;
import com.metamatrix.connector.basic.BasicValueTranslator;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.object.ObjectPlugin;
import com.metamatrix.connector.object.extension.IObjectCommand;
import com.metamatrix.connector.object.extension.ISourceTranslator;
Modified:
trunk/connectors/sandbox/connector-oracle-spatial/src/main/java/com/metamatrix/connector/jdbc/oracle/spatial/OracleSpatialConnector.java
===================================================================
---
trunk/connectors/sandbox/connector-oracle-spatial/src/main/java/com/metamatrix/connector/jdbc/oracle/spatial/OracleSpatialConnector.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/sandbox/connector-oracle-spatial/src/main/java/com/metamatrix/connector/jdbc/oracle/spatial/OracleSpatialConnector.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -30,7 +30,7 @@
import com.metamatrix.connector.api.ConnectorCapabilities;
import com.metamatrix.connector.api.ConnectorEnvironment;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.jdbc.JDBCConnector;
public class OracleSpatialConnector extends JDBCConnector {
Modified:
trunk/connectors/sandbox/connector-oracle-spatial/src/main/java/com/metamatrix/connector/jdbc/oracle/spatial/OracleSpatialSQLTranslator.java
===================================================================
---
trunk/connectors/sandbox/connector-oracle-spatial/src/main/java/com/metamatrix/connector/jdbc/oracle/spatial/OracleSpatialSQLTranslator.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/sandbox/connector-oracle-spatial/src/main/java/com/metamatrix/connector/jdbc/oracle/spatial/OracleSpatialSQLTranslator.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -27,8 +27,8 @@
import java.util.List;
import java.util.Map;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.jdbc.extension.SQLConversionVisitor;
import com.metamatrix.connector.jdbc.oracle.OracleSQLTranslator;
import com.metamatrix.connector.language.ICommand;
Modified:
trunk/connectors/sandbox/connector-yahoo/src/main/java/com/metamatrix/connector/yahoo/TickerCollectorVisitor.java
===================================================================
---
trunk/connectors/sandbox/connector-yahoo/src/main/java/com/metamatrix/connector/yahoo/TickerCollectorVisitor.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/sandbox/connector-yahoo/src/main/java/com/metamatrix/connector/yahoo/TickerCollectorVisitor.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -24,7 +24,7 @@
import java.util.*;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.language.*;
import com.metamatrix.connector.visitor.framework.HierarchyVisitor;
Modified:
trunk/connectors/sandbox/connector-yahoo/src/main/java/com/metamatrix/connector/yahoo/YahooConnection.java
===================================================================
---
trunk/connectors/sandbox/connector-yahoo/src/main/java/com/metamatrix/connector/yahoo/YahooConnection.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/sandbox/connector-yahoo/src/main/java/com/metamatrix/connector/yahoo/YahooConnection.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -23,10 +23,10 @@
package com.metamatrix.connector.yahoo;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
import com.metamatrix.connector.api.ResultSetExecution;
import com.metamatrix.connector.basic.BasicConnection;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.language.IQuery;
import com.metamatrix.connector.language.IQueryCommand;
import com.metamatrix.connector.metadata.runtime.RuntimeMetadata;
Modified:
trunk/connectors/sandbox/connector-yahoo/src/main/java/com/metamatrix/connector/yahoo/YahooConnector.java
===================================================================
---
trunk/connectors/sandbox/connector-yahoo/src/main/java/com/metamatrix/connector/yahoo/YahooConnector.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/sandbox/connector-yahoo/src/main/java/com/metamatrix/connector/yahoo/YahooConnector.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -23,7 +23,6 @@
package com.metamatrix.connector.yahoo;
import com.metamatrix.connector.api.*;
-import com.metamatrix.connector.exception.ConnectorException;
public class YahooConnector implements Connector {
Modified:
trunk/connectors/sandbox/connector-yahoo/src/main/java/com/metamatrix/connector/yahoo/YahooExecution.java
===================================================================
---
trunk/connectors/sandbox/connector-yahoo/src/main/java/com/metamatrix/connector/yahoo/YahooExecution.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/connectors/sandbox/connector-yahoo/src/main/java/com/metamatrix/connector/yahoo/YahooExecution.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -40,11 +40,11 @@
import java.util.StringTokenizer;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ConnectorLogger;
import com.metamatrix.connector.api.DataNotAvailableException;
import com.metamatrix.connector.api.ResultSetExecution;
import com.metamatrix.connector.basic.BasicExecution;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.language.ICriteria;
import com.metamatrix.connector.language.IElement;
import com.metamatrix.connector.language.IExpression;
Modified: trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/admin/BaseAdmin.java
===================================================================
---
trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/admin/BaseAdmin.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/admin/BaseAdmin.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -62,7 +62,6 @@
import com.metamatrix.common.util.crypto.CryptoException;
import com.metamatrix.common.util.crypto.CryptoUtil;
import com.metamatrix.common.vdb.api.VDBArchive;
-import com.metamatrix.connector.monitor.AliveStatus;
import com.metamatrix.dqp.embedded.DQPEmbeddedManager;
import com.metamatrix.dqp.embedded.DQPEmbeddedPlugin;
import com.metamatrix.dqp.service.ConfigurationService;
@@ -320,12 +319,12 @@
// Binding state needs to be converted into pool state; until then we use
// binding state as pool state.
try {
- AliveStatus status =
getDataService().getConnectorBindingState(src.getDeployedName());
- if (status == AliveStatus.ALIVE) {
+ Boolean status =
getDataService().getConnectorBindingState(src.getDeployedName());
+ if (status == Boolean.TRUE) {
binding.setState(com.metamatrix.admin.api.objects.ConnectorBinding.STATE_OPEN);
}
- else if (status == AliveStatus.DEAD) {
-
binding.setState(com.metamatrix.admin.api.objects.ConnectorBinding.STATE_CLOSED);
+ else if (status == Boolean.FALSE) {
+
binding.setState(com.metamatrix.admin.api.objects.ConnectorBinding.STATE_DATA_SOURCE_UNAVAILABLE);
}
else {
binding.setState(com.metamatrix.admin.api.objects.ConnectorBinding.STATE_DATA_SOURCE_UNAVAILABLE);
Modified:
trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedDataService.java
===================================================================
---
trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedDataService.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedDataService.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -48,9 +48,8 @@
import com.metamatrix.common.util.crypto.CryptoUtil;
import com.metamatrix.common.vdb.api.VDBArchive;
import com.metamatrix.common.vdb.api.VDBDefn;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.internal.ConnectorPropertyNames;
-import com.metamatrix.connector.monitor.AliveStatus;
import com.metamatrix.core.vdb.VDBStatus;
import com.metamatrix.dqp.embedded.DQPEmbeddedPlugin;
import com.metamatrix.dqp.embedded.configuration.ExtensionModuleReader;
@@ -291,13 +290,13 @@
* @see
com.metamatrix.dqp.service.DataService#getConnectorBindingState(java.lang.String)
* @since 4.3
*/
- public AliveStatus getConnectorBindingState(String deployedConnectorBindingName)
+ public Boolean getConnectorBindingState(String deployedConnectorBindingName)
throws MetaMatrixComponentException {
ConnectorBinding binding = getConnectorBinding(deployedConnectorBindingName);
if (binding != null) {
ConnectorManager mgr = getConnectorManager(binding);
if (mgr != null) {
- return mgr.getStatus().getStatus();
+ return mgr.getStatus();
}
}
throw new
MetaMatrixComponentException(DQPEmbeddedPlugin.Util.getString("DataService.Unable_to_find_connector",
deployedConnectorBindingName)); //$NON-NLS-1$
Modified:
trunk/engine/src/main/java/com/metamatrix/common/comm/ClientServiceRegistry.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/common/comm/ClientServiceRegistry.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/engine/src/main/java/com/metamatrix/common/comm/ClientServiceRegistry.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -24,14 +24,12 @@
import java.util.concurrent.ConcurrentHashMap;
-public class ClientServiceRegistry<S> {
+public class ClientServiceRegistry {
private ConcurrentHashMap<String, Object> localServices = new
ConcurrentHashMap<String, Object>();
private ConcurrentHashMap<String, String> loggingContext = new
ConcurrentHashMap<String, String>();
- private S sessionServiceProxy;
- public ClientServiceRegistry(S sessionService) {
- this.sessionServiceProxy = sessionService;
+ public ClientServiceRegistry() {
}
public <T> T getClientService(Class<T> iface) {
@@ -42,10 +40,6 @@
return localServices.get(iface);
}
- public S getSessionService() {
- return this.sessionServiceProxy;
- }
-
public void registerClientService(Class<?> iface, Object instance, String
loggingContext) {
this.localServices.put(iface.getName(), instance);
this.loggingContext.put(iface.getName(), loggingContext);
Modified:
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/impl/ConnectorManager.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/impl/ConnectorManager.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/impl/ConnectorManager.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -54,12 +54,11 @@
import com.metamatrix.connector.api.Connector;
import com.metamatrix.connector.api.ConnectorCapabilities;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
import com.metamatrix.connector.api.ConnectorAnnotations.ConnectionPooling;
import com.metamatrix.connector.api.ConnectorAnnotations.SynchronousWorkers;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.internal.ConnectorPropertyNames;
-import com.metamatrix.connector.monitor.ConnectionStatus;
import com.metamatrix.connector.xa.api.XAConnection;
import com.metamatrix.connector.xa.api.XAConnector;
import com.metamatrix.core.util.Assertion;
@@ -270,7 +269,7 @@
/**
* @see com.metamatrix.dqp.internal.datamgr.ConnectorManager#isAlive()
*/
- public ConnectionStatus getStatus() {
+ public Boolean getStatus() {
ClassLoader contextloader = Thread.currentThread().getContextClassLoader();
try {
Thread.currentThread().setContextClassLoader(classloader);
Modified:
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/impl/ConnectorWorkItem.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/impl/ConnectorWorkItem.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/impl/ConnectorWorkItem.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -34,12 +34,12 @@
import com.metamatrix.common.types.DataTypeManager;
import com.metamatrix.connector.api.Connection;
import com.metamatrix.connector.api.Connector;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.DataNotAvailableException;
import com.metamatrix.connector.api.Execution;
import com.metamatrix.connector.api.ProcedureExecution;
import com.metamatrix.connector.api.ResultSetExecution;
import com.metamatrix.connector.api.UpdateExecution;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.language.ICommand;
import com.metamatrix.connector.language.IProcedure;
import com.metamatrix.connector.language.IQueryCommand;
@@ -331,10 +331,6 @@
}
return null;
}
- @Override
- public List<Exception> getWarnings() {
- return exec.getWarnings();
- }
};
}
@@ -406,7 +402,7 @@
// implicit close.
response.setSupportsImplicitClose(!this.securityContext.keepExecutionAlive());
response.setTransactional(this.securityContext.isTransactional());
- response.setWarnings(this.execution.getWarnings());
+ response.setWarnings(this.securityContext.getWarnings());
if ( lastBatch ) {
response.setFinalRow(rowCount);
Modified:
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/impl/ConnectorWrapper.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/impl/ConnectorWrapper.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/impl/ConnectorWrapper.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -26,11 +26,8 @@
import com.metamatrix.connector.api.Connector;
import com.metamatrix.connector.api.ConnectorCapabilities;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
-import com.metamatrix.connector.exception.ConnectorException;
-import com.metamatrix.connector.monitor.AliveStatus;
-import com.metamatrix.connector.monitor.ConnectionStatus;
-import com.metamatrix.connector.monitor.MonitoredConnector;
import com.metamatrix.connector.pool.ConnectorIdentity;
import com.metamatrix.connector.pool.ConnectorIdentityFactory;
import com.metamatrix.connector.pool.SingleIdentity;
@@ -41,7 +38,7 @@
/**
* ConnectorWrapper adds default behavior to the wrapped connector.
*/
-public class ConnectorWrapper implements XAConnector, MonitoredConnector,
ConnectorIdentityFactory {
+public class ConnectorWrapper implements XAConnector, ConnectorIdentityFactory {
private Connector actualConnector;
@@ -94,17 +91,20 @@
return actualConnector.getCapabilities();
}
- @Override
- public final ConnectionStatus getStatus() {
- if(actualConnector instanceof MonitoredConnector){
- return ((MonitoredConnector)actualConnector).getStatus();
+ public final Boolean getStatus() {
+ if (supportsSingleIdentity()) {
+ Connection conn = null;
+ try {
+ conn = this.getConnection(null);
+ return conn.isAlive();
+ } catch (ConnectorException e) {
+ return Boolean.FALSE;
+ } finally {
+ conn.close();
+ }
}
- return getStatusDirect();
+ return null;
}
-
- protected ConnectionStatus getStatusDirect() {
- return new ConnectionStatus(AliveStatus.UNKNOWN);
- }
public Connector getActualConnector() {
return actualConnector;
Modified:
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/impl/ExecutionContextImpl.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/impl/ExecutionContextImpl.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/impl/ExecutionContextImpl.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -23,6 +23,9 @@
package com.metamatrix.dqp.internal.datamgr.impl;
import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.List;
import com.metamatrix.common.buffer.impl.BufferConfig;
import com.metamatrix.connector.api.ExecutionContext;
@@ -63,6 +66,7 @@
private ConnectorIdentity connectorIdentity;
private int batchSize = BufferConfig.DEFAULT_CONNECTOR_BATCH_SIZE;
+ private List<Exception> warnings = new LinkedList<Exception>();
public ExecutionContextImpl(String vdbName, String vdbVersion, String userName,
Serializable trustedPayload, Serializable
executionPayload,
@@ -189,4 +193,21 @@
public void setBatchSize(int batchSize) {
this.batchSize = batchSize;
}
+
+ /**
+ * Add an exception as a warning to this Execution.
+ */
+ @Override
+ public void addWarning(Exception ex) {
+ if (ex == null) {
+ return;
+ }
+ this.warnings.add(ex);
+ }
+
+ public List<Exception> getWarnings() {
+ List<Exception> result = new ArrayList<Exception>(warnings);
+ warnings.clear();
+ return result;
+ }
}
Modified:
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/impl/ProcedureBatchHandler.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/impl/ProcedureBatchHandler.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/impl/ProcedureBatchHandler.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -31,10 +31,11 @@
import java.util.Iterator;
import java.util.List;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ProcedureExecution;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.language.IParameter;
import com.metamatrix.connector.language.IProcedure;
+import com.metamatrix.connector.language.IParameter.Direction;
import com.metamatrix.dqp.DQPPlugin;
class ProcedureBatchHandler {
@@ -53,9 +54,9 @@
Iterator iter = params.iterator();
while(iter.hasNext()){
IParameter param = (IParameter)iter.next();
- if (param.getDirection() == IParameter.RESULT_SET) {
+ if (param.getDirection() == Direction.RESULT_SET) {
resultSetCols = param.getMetadataID().getChildIDs().size();
- } else if(param.getDirection() == IParameter.RETURN ||
param.getDirection() == IParameter.OUT || param.getDirection() == IParameter.INOUT){
+ } else if(param.getDirection() == Direction.RETURN ||
param.getDirection() == Direction.OUT || param.getDirection() == Direction.INOUT){
paramCols += 1;
}
}
@@ -89,7 +90,7 @@
//return
while(iter.hasNext()){
IParameter param = (IParameter)iter.next();
- if(param.getDirection() == IParameter.RETURN){
+ if(param.getDirection() == Direction.RETURN){
outParamValues.set(index++, procExec.getOutputValue(param));
}
}
@@ -97,7 +98,7 @@
iter = params.iterator();
while(iter.hasNext()){
IParameter param = (IParameter)iter.next();
- if(param.getDirection() == IParameter.OUT || param.getDirection() ==
IParameter.INOUT){
+ if(param.getDirection() == Direction.OUT || param.getDirection() ==
Direction.INOUT){
outParamValues.set(index++, procExec.getOutputValue(param));
}
}
Modified:
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/impl/SynchConnectorWorkItem.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/impl/SynchConnectorWorkItem.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/impl/SynchConnectorWorkItem.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -33,7 +33,7 @@
import com.metamatrix.common.comm.api.ResultsReceiver;
import com.metamatrix.common.log.LogManager;
import com.metamatrix.common.xa.XATransactionException;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.xa.api.XAConnection;
import com.metamatrix.dqp.message.AtomicRequestMessage;
import com.metamatrix.dqp.message.AtomicResultsMessage;
Modified:
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/impl/TypeFacilityImpl.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/impl/TypeFacilityImpl.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/impl/TypeFacilityImpl.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -23,8 +23,8 @@
package com.metamatrix.dqp.internal.datamgr.impl;
import com.metamatrix.common.types.*;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.TypeFacility;
-import com.metamatrix.connector.exception.ConnectorException;
/**
*/
Modified:
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/language/CompareCriteriaImpl.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/language/CompareCriteriaImpl.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/language/CompareCriteriaImpl.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -30,9 +30,9 @@
private IExpression leftExpression = null;
private IExpression rightExpression = null;
- private int operator;
+ private Operator operator;
- public CompareCriteriaImpl(IExpression left, IExpression right, int operator) {
+ public CompareCriteriaImpl(IExpression left, IExpression right, Operator operator) {
leftExpression = left;
rightExpression = right;
this.operator = operator;
@@ -54,7 +54,7 @@
/**
* @see com.metamatrix.connector.language.ICompareCriteria#getOperator()
*/
- public int getOperator() {
+ public Operator getOperator() {
return this.operator;
}
@@ -75,7 +75,7 @@
/*
* @see com.metamatrix.data.language.ICompareCriteria#setOperator(int)
*/
- public void setOperator(int operator) {
+ public void setOperator(Operator operator) {
this.operator = operator;
}
Modified:
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/language/CompoundCriteriaImpl.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/language/CompoundCriteriaImpl.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/language/CompoundCriteriaImpl.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -30,9 +30,9 @@
public class CompoundCriteriaImpl extends BaseLanguageObject implements ICompoundCriteria
{
private List criteria = null;
- private int operator = AND;
+ private Operator operator = Operator.AND;
- public CompoundCriteriaImpl(List nestedCriteria, int operator) {
+ public CompoundCriteriaImpl(List nestedCriteria, Operator operator) {
criteria = nestedCriteria;
this.operator = operator;
}
@@ -40,7 +40,7 @@
/**
* @see com.metamatrix.connector.language.ICompoundCriteria#getOperator()
*/
- public int getOperator() {
+ public Operator getOperator() {
return this.operator;
}
@@ -61,7 +61,7 @@
/*
* @see com.metamatrix.data.language.ICompoundCriteria#setOperator(int)
*/
- public void setOperator(int operator) {
+ public void setOperator(Operator operator) {
this.operator = operator;
}
Modified:
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/language/JoinImpl.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/language/JoinImpl.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/language/JoinImpl.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -32,10 +32,10 @@
private IFromItem leftItem = null;
private IFromItem rightItem = null;
- private int joinType;
+ private JoinType joinType;
private List criteria = null;
- public JoinImpl(IFromItem left, IFromItem right, int joinType, List criteria) {
+ public JoinImpl(IFromItem left, IFromItem right, JoinType joinType, List criteria) {
this.leftItem = left;
this.rightItem = right;
this.joinType = joinType;
@@ -58,7 +58,7 @@
/**
* @see com.metamatrix.connector.language.IJoin#getJoinType()
*/
- public int getJoinType() {
+ public JoinType getJoinType() {
return this.joinType;
}
@@ -90,7 +90,7 @@
/*
* @see com.metamatrix.data.language.IJoin#setJoinType(int)
*/
- public void setJoinType(int type) {
+ public void setJoinType(JoinType type) {
this.joinType = type;
}
/*
Modified:
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/language/LanguageBridgeFactory.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/language/LanguageBridgeFactory.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/language/LanguageBridgeFactory.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -67,6 +67,9 @@
import com.metamatrix.connector.language.ISubqueryCompareCriteria;
import com.metamatrix.connector.language.ISubqueryInCriteria;
import com.metamatrix.connector.language.IUpdate;
+import com.metamatrix.connector.language.ICompareCriteria.Operator;
+import com.metamatrix.connector.language.IParameter.Direction;
+import com.metamatrix.connector.language.ISubqueryCompareCriteria.Quantifier;
import com.metamatrix.connector.metadata.runtime.MetadataID;
import com.metamatrix.dqp.DQPPlugin;
import com.metamatrix.dqp.internal.datamgr.metadata.MetadataFactory;
@@ -250,17 +253,17 @@
criteria.add(translate((Criteria)i.next()));
}
- int joinType = IJoin.INNER_JOIN;
+ IJoin.JoinType joinType = IJoin.JoinType.INNER_JOIN;
if(join.getJoinType().equals(JoinType.JOIN_INNER)) {
- joinType = IJoin.INNER_JOIN;
+ joinType = IJoin.JoinType.INNER_JOIN;
} else if(join.getJoinType().equals(JoinType.JOIN_LEFT_OUTER)) {
- joinType = IJoin.LEFT_OUTER_JOIN;
+ joinType = IJoin.JoinType.LEFT_OUTER_JOIN;
} else if(join.getJoinType().equals(JoinType.JOIN_RIGHT_OUTER)) {
- joinType = IJoin.RIGHT_OUTER_JOIN;
+ joinType = IJoin.JoinType.RIGHT_OUTER_JOIN;
} else if(join.getJoinType().equals(JoinType.JOIN_FULL_OUTER)) {
- joinType = IJoin.FULL_OUTER_JOIN;
+ joinType = IJoin.JoinType.FULL_OUTER_JOIN;
} else if(join.getJoinType().equals(JoinType.JOIN_CROSS)) {
- joinType = IJoin.CROSS_JOIN;
+ joinType = IJoin.JoinType.CROSS_JOIN;
}
return new JoinImpl(translate(join.getLeftClause()),
@@ -302,25 +305,25 @@
}
ICompareCriteria translate(CompareCriteria criteria) throws
MetaMatrixComponentException {
- int operator = ICompareCriteria.EQ;
+ ICompareCriteria.Operator operator = Operator.EQ;
switch(criteria.getOperator()) {
case CompareCriteria.EQ:
- operator = ICompareCriteria.EQ;
+ operator = Operator.EQ;
break;
case CompareCriteria.NE:
- operator = ICompareCriteria.NE;
+ operator = Operator.NE;
break;
case CompareCriteria.LT:
- operator = ICompareCriteria.LT;
+ operator = Operator.LT;
break;
case CompareCriteria.LE:
- operator = ICompareCriteria.LE;
+ operator = Operator.LE;
break;
case CompareCriteria.GT:
- operator = ICompareCriteria.GT;
+ operator = Operator.GT;
break;
case CompareCriteria.GE:
- operator = ICompareCriteria.GE;
+ operator = Operator.GE;
break;
}
@@ -336,14 +339,7 @@
translatedCriteria.add(translate((Criteria)i.next()));
}
- int operator = 0;
- if(criteria.getOperator() == CompoundCriteria.AND) {
- operator = ICompoundCriteria.AND;
- } else {
- operator = ICompoundCriteria.OR;
- }
-
- return new CompoundCriteriaImpl(translatedCriteria, operator);
+ return new CompoundCriteriaImpl(translatedCriteria, criteria.getOperator() ==
CompoundCriteria.AND?ICompoundCriteria.Operator.AND:ICompoundCriteria.Operator.OR);
}
IExistsCriteria translate(ExistsCriteria criteria) throws
MetaMatrixComponentException {
@@ -377,38 +373,38 @@
}
ISubqueryCompareCriteria translate(SubqueryCompareCriteria criteria) throws
MetaMatrixComponentException {
- int quantifier = 0;
+ Quantifier quantifier = Quantifier.ALL;
switch(criteria.getPredicateQuantifier()) {
case SubqueryCompareCriteria.ALL:
- quantifier = ISubqueryCompareCriteria.ALL;
+ quantifier = Quantifier.ALL;
break;
case SubqueryCompareCriteria.ANY:
- quantifier = ISubqueryCompareCriteria.SOME;
+ quantifier = Quantifier.SOME;
break;
case SubqueryCompareCriteria.SOME:
- quantifier = ISubqueryCompareCriteria.SOME;
+ quantifier = Quantifier.SOME;
break;
}
- int operator = 0;
+ ICompareCriteria.Operator operator = ICompareCriteria.Operator.EQ;
switch(criteria.getOperator()) {
case SubqueryCompareCriteria.EQ:
- operator = ISubqueryCompareCriteria.EQ;
+ operator = ICompareCriteria.Operator.EQ;
break;
case SubqueryCompareCriteria.NE:
- operator = ISubqueryCompareCriteria.NE;
+ operator = ICompareCriteria.Operator.NE;
break;
case SubqueryCompareCriteria.LT:
- operator = ISubqueryCompareCriteria.LT;
+ operator = ICompareCriteria.Operator.LT;
break;
case SubqueryCompareCriteria.LE:
- operator = ISubqueryCompareCriteria.LE;
+ operator = ICompareCriteria.Operator.LE;
break;
case SubqueryCompareCriteria.GT:
- operator = ISubqueryCompareCriteria.GT;
+ operator = ICompareCriteria.Operator.GT;
break;
case SubqueryCompareCriteria.GE:
- operator = ISubqueryCompareCriteria.GE;
+ operator = ICompareCriteria.Operator.GE;
break;
}
@@ -664,28 +660,28 @@
}
IParameter translate(SPParameter param, ProcedureIDImpl procID) throws
MetaMatrixComponentException {
- int direction = IParameter.IN;
+ Direction direction = Direction.IN;
switch(param.getParameterType()) {
case ParameterInfo.IN:
- direction = IParameter.IN;
+ direction = Direction.IN;
break;
case ParameterInfo.INOUT:
- direction = IParameter.INOUT;
+ direction = Direction.INOUT;
break;
case ParameterInfo.OUT:
- direction = IParameter.OUT;
+ direction = Direction.OUT;
break;
case ParameterInfo.RESULT_SET:
- direction = IParameter.RESULT_SET;
+ direction = Direction.RESULT_SET;
break;
case ParameterInfo.RETURN_VALUE:
- direction = IParameter.RETURN;
+ direction = Direction.RETURN;
break;
}
try {
MetadataID metadataID = null;
- if(direction == IParameter.RESULT_SET) {
+ if(direction == Direction.RESULT_SET) {
metadataID = metadataFactory.createResultSetID(procID,
param.getMetadataID(), param.getResultSetIDs());
return new ParameterImpl(param.getIndex(), direction, param.getValue(),
param.getClassType(), metadataID);
Modified:
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/language/LanguageFactoryImpl.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/language/LanguageFactoryImpl.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/language/LanguageFactoryImpl.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -61,7 +61,7 @@
* @see com.metamatrix.data.language.ILanguageFactory#createCompareCriteria(int,
com.metamatrix.data.language.IExpression, com.metamatrix.data.language.IExpression)
*/
public ICompareCriteria createCompareCriteria(
- int operator,
+ ICompareCriteria.Operator operator,
IExpression leftExpression,
IExpression rightExpression) {
return new CompareCriteriaImpl(leftExpression, rightExpression, operator);
@@ -70,7 +70,7 @@
/*
* @see com.metamatrix.data.language.ILanguageFactory#createCompoundCriteria(int,
java.util.List)
*/
- public ICompoundCriteria createCompoundCriteria(int operator, List innerCriteria) {
+ public ICompoundCriteria createCompoundCriteria(ICompoundCriteria.Operator operator,
List innerCriteria) {
return new CompoundCriteriaImpl(innerCriteria, operator);
}
@@ -154,7 +154,7 @@
/*
* @see com.metamatrix.data.language.ILanguageFactory#createJoin(int,
com.metamatrix.data.language.IFromItem, com.metamatrix.data.language.IFromItem,
java.util.List)
*/
- public IJoin createJoin(int joinType, IFromItem leftItem, IFromItem rightItem, List
criteria) {
+ public IJoin createJoin(IJoin.JoinType joinType, IFromItem leftItem, IFromItem
rightItem, List criteria) {
return new JoinImpl(leftItem, rightItem, joinType, criteria);
}
@@ -200,7 +200,7 @@
/*
* @see com.metamatrix.data.language.ILanguageFactory#createParameter(int, int,
java.lang.Object, java.lang.Class)
*/
- public IParameter createParameter(int index, int direction, Object value, Class type,
MetadataID metadataReference) {
+ public IParameter createParameter(int index, IParameter.Direction direction, Object
value, Class type, MetadataID metadataReference) {
return new ParameterImpl(index, direction, value, type, metadataReference);
}
@@ -261,8 +261,8 @@
*/
public ISubqueryCompareCriteria createSubqueryCompareCriteria(
IExpression leftExpression,
- int operator,
- int quantifier,
+ ICompareCriteria.Operator operator,
+ ISubqueryCompareCriteria.Quantifier quantifier,
IQuery subquery) {
return new SubqueryCompareCriteriaImpl(leftExpression, operator, quantifier,
subquery);
}
Modified:
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/language/ParameterImpl.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/language/ParameterImpl.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/language/ParameterImpl.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -29,13 +29,13 @@
public class ParameterImpl extends BaseLanguageObject implements IParameter {
private int index;
- private int direction;
+ private Direction direction;
private Object value;
private boolean valueSpecified;
private Class type;
private MetadataID metadataID;
- public ParameterImpl(int index, int direction, Object value, Class type, MetadataID
metadataID) {
+ public ParameterImpl(int index, Direction direction, Object value, Class type,
MetadataID metadataID) {
setIndex(index);
setDirection(direction);
setValue(value);
@@ -53,7 +53,7 @@
/**
* @see com.metamatrix.connector.language.IParameter#getDirection()
*/
- public int getDirection() {
+ public Direction getDirection() {
return this.direction;
}
@@ -88,7 +88,7 @@
/*
* @see com.metamatrix.data.language.IParameter#setDirection(int)
*/
- public void setDirection(int direction) {
+ public void setDirection(Direction direction) {
this.direction = direction;
}
Modified:
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/language/SubqueryCompareCriteriaImpl.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/language/SubqueryCompareCriteriaImpl.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/language/SubqueryCompareCriteriaImpl.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -23,6 +23,7 @@
package com.metamatrix.dqp.internal.datamgr.language;
import com.metamatrix.connector.language.*;
+import com.metamatrix.connector.language.ICompareCriteria.Operator;
import com.metamatrix.connector.visitor.framework.LanguageObjectVisitor;
/**
@@ -30,14 +31,14 @@
public class SubqueryCompareCriteriaImpl extends BaseLanguageObject implements
ISubqueryCompareCriteria {
private IExpression leftExpr;
- private int operator;
- private int quantifier;
+ private Operator operator;
+ private Quantifier quantifier;
private IQueryCommand query;
/**
*
*/
- public SubqueryCompareCriteriaImpl(IExpression leftExpr, int operator, int
quantifier, IQueryCommand query) {
+ public SubqueryCompareCriteriaImpl(IExpression leftExpr, Operator operator,
Quantifier quantifier, IQueryCommand query) {
this.leftExpr = leftExpr;
this.operator = operator;
this.quantifier = quantifier;
@@ -54,14 +55,14 @@
/*
* @see com.metamatrix.data.language.ISubqueryCompareCriteria#getOperator()
*/
- public int getOperator() {
+ public Operator getOperator() {
return this.operator;
}
/*
* @see com.metamatrix.data.language.ISubqueryCompareCriteria#getQuantifier()
*/
- public int getQuantifier() {
+ public Quantifier getQuantifier() {
return this.quantifier;
}
@@ -89,14 +90,14 @@
/*
* @see com.metamatrix.data.language.ISubqueryCompareCriteria#setOperator(int)
*/
- public void setOperator(int operator) {
+ public void setOperator(Operator operator) {
this.operator = operator;
}
/*
* @see com.metamatrix.data.language.ISubqueryCompareCriteria#setQuantifier(int)
*/
- public void setQuantifier(int quantifier) {
+ public void setQuantifier(Quantifier quantifier) {
this.quantifier = quantifier;
}
Modified:
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/metadata/ElementImpl.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/metadata/ElementImpl.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/metadata/ElementImpl.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -27,7 +27,7 @@
import com.metamatrix.api.exception.MetaMatrixComponentException;
import com.metamatrix.api.exception.query.QueryMetadataException;
import com.metamatrix.common.types.DataTypeManager;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.metadata.runtime.Element;
import com.metamatrix.query.metadata.SupportConstants;
Modified:
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/metadata/MetadataFactory.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/metadata/MetadataFactory.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/metadata/MetadataFactory.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -28,7 +28,7 @@
import com.metamatrix.api.exception.MetaMatrixComponentException;
import com.metamatrix.api.exception.query.QueryMetadataException;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.metadata.runtime.*;
import com.metamatrix.core.util.ArgCheck;
import com.metamatrix.query.metadata.QueryMetadataInterface;
Modified:
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/metadata/MetadataIDImpl.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/metadata/MetadataIDImpl.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/metadata/MetadataIDImpl.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -28,7 +28,7 @@
import com.metamatrix.api.exception.MetaMatrixComponentException;
import com.metamatrix.api.exception.query.QueryMetadataException;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.metadata.runtime.MetadataID;
import com.metamatrix.query.metadata.QueryMetadataInterface;
Modified:
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/metadata/MetadataObjectImpl.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/metadata/MetadataObjectImpl.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/metadata/MetadataObjectImpl.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -28,7 +28,7 @@
import com.metamatrix.api.exception.MetaMatrixComponentException;
import com.metamatrix.api.exception.query.QueryMetadataException;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.metadata.runtime.MetadataID;
import com.metamatrix.connector.metadata.runtime.MetadataObject;
import com.metamatrix.query.metadata.QueryMetadataInterface;
Modified:
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/metadata/ParameterIDImpl.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/metadata/ParameterIDImpl.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/metadata/ParameterIDImpl.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -25,7 +25,7 @@
import java.util.*;
import com.metamatrix.api.exception.MetaMatrixComponentException;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.metadata.runtime.MetadataID;
import com.metamatrix.query.metadata.QueryMetadataInterface;
Modified:
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/metadata/ParameterImpl.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/metadata/ParameterImpl.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/metadata/ParameterImpl.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -26,7 +26,7 @@
import com.metamatrix.api.exception.MetaMatrixComponentException;
import com.metamatrix.api.exception.query.QueryMetadataException;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.metadata.runtime.Element;
import com.metamatrix.connector.metadata.runtime.Parameter;
import com.metamatrix.dqp.DQPPlugin;
Modified:
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/metadata/ProcedureIDImpl.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/metadata/ProcedureIDImpl.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/metadata/ProcedureIDImpl.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -26,7 +26,7 @@
import com.metamatrix.api.exception.MetaMatrixComponentException;
import com.metamatrix.api.exception.query.QueryMetadataException;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.dqp.message.ParameterInfo;
import com.metamatrix.query.metadata.QueryMetadataInterface;
import com.metamatrix.query.metadata.StoredProcedureInfo;
Modified:
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/metadata/RuntimeMetadataImpl.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/metadata/RuntimeMetadataImpl.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/metadata/RuntimeMetadataImpl.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -26,7 +26,7 @@
import com.metamatrix.api.exception.MetaMatrixComponentException;
import com.metamatrix.api.exception.query.QueryMetadataException;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.metadata.runtime.*;
/**
Modified:
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/metadata/TypeModelImpl.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/metadata/TypeModelImpl.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/engine/src/main/java/com/metamatrix/dqp/internal/datamgr/metadata/TypeModelImpl.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -24,7 +24,7 @@
import com.metamatrix.api.exception.MetaMatrixComponentException;
import com.metamatrix.api.exception.query.QueryMetadataException;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.metadata.runtime.Element;
import com.metamatrix.connector.metadata.runtime.TypeModel;
import com.metamatrix.query.metadata.SupportConstants;
Modified:
trunk/engine/src/main/java/com/metamatrix/dqp/internal/pooling/connector/ConnectionPool.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/dqp/internal/pooling/connector/ConnectionPool.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/engine/src/main/java/com/metamatrix/dqp/internal/pooling/connector/ConnectionPool.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -25,7 +25,6 @@
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
-import java.util.Date;
import java.util.HashMap;
import java.util.IdentityHashMap;
import java.util.Iterator;
@@ -42,10 +41,8 @@
import com.metamatrix.common.util.PropertiesUtils;
import com.metamatrix.connector.DataPlugin;
import com.metamatrix.connector.api.Connection;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
-import com.metamatrix.connector.exception.ConnectorException;
-import com.metamatrix.connector.monitor.AliveStatus;
-import com.metamatrix.connector.monitor.ConnectionStatus;
import com.metamatrix.connector.pool.ConnectorIdentity;
import com.metamatrix.connector.pool.PoolAwareConnection;
import com.metamatrix.connector.pool.SingleIdentity;
@@ -135,14 +132,6 @@
private volatile boolean shuttingDownPool;
- protected volatile boolean lastConnectionAttemptFailed = false;
-
- /**Exception received during last failed connection attempt*/
- private volatile Exception lastConnectionAttemptException = null;
-
- /**Time of last failed connection attempt*/
- private volatile Date lastConnectionAttemptDate = null;
-
/**
* Construct the connection pool with a connection factory
*
@@ -261,10 +250,15 @@
ConnectionWrapper conn = connLists.unused.removeFirst();
if ( conn.isAlive() ) {
- LogManager.logTrace(CTX_CONNECTOR, new Object[] {"Existing
connection leased for", id}); //$NON-NLS-1$
- connLists.used.addLast(conn);
- success = true;
- return conn;
+ try {
+ conn.setConnectorIdentity(id);
+ LogManager.logDetail(CTX_CONNECTOR, new Object[]
{"Existing connection leased for", id}); //$NON-NLS-1$
+ connLists.used.addLast(conn);
+ success = true;
+ return conn;
+ } catch (ConnectorException e) {
+ LogManager.logDetail(CTX_CONNECTOR, new Object[] {"Existing connection
failed to have identity updated", id}); //$NON-NLS-1$
+ }
}
closeSourceConnection(conn, id);
}
@@ -351,12 +345,8 @@
sourceConnection = new ConnectionWrapper(connection, this,
testConnectInterval);
LogManager.logTrace(CTX_CONNECTOR, new Object[] {"Connection pool created a
connection for", id}); //$NON-NLS-1$
} catch (ConnectorException e) {
- lastConnectionAttemptFailed = true;
- lastConnectionAttemptException = e;
- lastConnectionAttemptDate = new Date();
throw new ConnectionPoolException(e);
}
- lastConnectionAttemptFailed = false;
return sourceConnection;
}
@@ -398,103 +388,6 @@
}
/**
- * Check the status of connections in this pool.
- * The pool is operational if it has at least one live
- * connection available to it.
- *
- * @return AliveStatus.ALIVE if there are any connections in use, or any live unused
connections.
- * <p>AliveStatus.DEAD if there are no live connections, and the connection
pool cannot create a new connection.
- * <p>AliveStatus.UNKNOWN if there are no live connections, and we don't
have the ability to test getting a new connection.
- */
- public ConnectionStatus getStatus() {
- AliveStatus poolStatus;
-
- Collection values = null;
- synchronized (this.lock) {
- values = new LinkedList(this.idConnections.values());
- }
-
- poolStatus = checkStatusOfUsedConnections(values);
-
- if (poolStatus.equals(AliveStatus.UNKNOWN)) {
- poolStatus = checkStatusOfUnusedConnections(values);
- }
-
- if (poolStatus.equals(AliveStatus.UNKNOWN)) {
- poolStatus = testGetConnection();
- }
-
- if (poolStatus.equals(AliveStatus.UNKNOWN) &&
lastConnectionAttemptFailed) {
- poolStatus = AliveStatus.DEAD;
- }
-
- //never set the status of "UserIdentity" connectors to DEAD.
- if (poolStatus.equals(AliveStatus.DEAD) &&
(!connectionFactory.supportsSingleIdentity())) {
- poolStatus = AliveStatus.UNKNOWN;
- }
-
- return new ConnectionStatus(poolStatus, getTotalConnectionCount(),
lastConnectionAttemptException,
- lastConnectionAttemptDate);
- }
-
- private AliveStatus checkStatusOfUsedConnections(Collection connectionInfos) {
- // Check size of all used pools. If any > 0, pool is alive.
- // Note that this only proves pool is alive for one ConnectorIdentity.
-
- for (Iterator i = connectionInfos.iterator(); i.hasNext(); ) {
- ConnectionsForId connLists = (ConnectionsForId) i.next();
-
- synchronized (connLists) {
- // check size of this used conn list for one identity
- if ( connLists.used.size() > 0 ) {
- return AliveStatus.ALIVE;
- }
- }
- }
- return AliveStatus.UNKNOWN;
- }
-
- private AliveStatus checkStatusOfUnusedConnections(Collection connectionInfos) {
- // If we're here, we haven't found a live connection yet.
- // Must query unused connections.
- for (Iterator i = connectionInfos.iterator(); i.hasNext(); ) {
- ConnectionsForId connLists = (ConnectionsForId)i.next();
-
- synchronized (connLists) {
- // check size of this used conn list for one identity
- Iterator unusedConnItr = connLists.unused.iterator();
- while (unusedConnItr.hasNext()) {
- if (((ConnectionWrapper)unusedConnItr.next()).isAlive()) {
- return AliveStatus.ALIVE;
- }
- //TODO: remove connection
- }
- }
- }
- return AliveStatus.UNKNOWN;
- }
-
- /**
- * Test datasource availability by getting a connection.
- * @return
- * @since 4.3
- */
- private AliveStatus testGetConnection() {
- if (connectionFactory.supportsSingleIdentity()) {
- try {
- ConnectionWrapper connection = obtain(null);
- boolean alive = connection.isAlive();
- release(connection, !alive);
- return (alive ? AliveStatus.ALIVE : AliveStatus.DEAD);
- } catch (ConnectionPoolException e) {
- return AliveStatus.DEAD;
- }
- }
-
- return AliveStatus.UNKNOWN;
- }
-
- /**
* Shut down the pool.
*/
public void shutDown() {
@@ -553,11 +446,11 @@
//log that we removed a connection
if (LogManager.isMessageToBeRecorded(CTX_CONNECTOR, MessageLevel.TRACE)) {
- LogManager.logTrace(CTX_CONNECTOR,
DataPlugin.Util.getString("ConnectionPool.Removed_conn", id)); //$NON-NLS-1$
+ LogManager.logDetail(CTX_CONNECTOR,
DataPlugin.Util.getString("ConnectionPool.Removed_conn", id)); //$NON-NLS-1$
}
} catch (Exception e) {
- LogManager.logError(CTX_CONNECTOR,
DataPlugin.Util.getString("ConnectionPool.Failed_close_a_connection__2", id));
//$NON-NLS-1$
+ LogManager.logWarning(CTX_CONNECTOR,
DataPlugin.Util.getString("ConnectionPool.Failed_close_a_connection__2", id));
//$NON-NLS-1$
}
}
Modified:
trunk/engine/src/main/java/com/metamatrix/dqp/internal/pooling/connector/ConnectionPoolException.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/dqp/internal/pooling/connector/ConnectionPoolException.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/engine/src/main/java/com/metamatrix/dqp/internal/pooling/connector/ConnectionPoolException.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -24,7 +24,7 @@
*/
package com.metamatrix.dqp.internal.pooling.connector;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
/**
* This class is for exceptions occurring within the connection pool.
Modified:
trunk/engine/src/main/java/com/metamatrix/dqp/internal/pooling/connector/ConnectionWrapper.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/dqp/internal/pooling/connector/ConnectionWrapper.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/engine/src/main/java/com/metamatrix/dqp/internal/pooling/connector/ConnectionWrapper.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -26,11 +26,12 @@
import com.metamatrix.connector.api.Connection;
import com.metamatrix.connector.api.ConnectorCapabilities;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.Execution;
import com.metamatrix.connector.api.ExecutionContext;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.language.ICommand;
import com.metamatrix.connector.metadata.runtime.RuntimeMetadata;
+import com.metamatrix.connector.pool.ConnectorIdentity;
import com.metamatrix.connector.pool.PoolAwareConnection;
import com.metamatrix.connector.xa.api.XAConnection;
@@ -137,5 +138,13 @@
public void setTestInterval(long testInterval) {
this.testInterval = testInterval;
}
+
+ @Override
+ public void setConnectorIdentity(ConnectorIdentity context)
+ throws ConnectorException {
+ if (this.connection instanceof PoolAwareConnection) {
+ ((PoolAwareConnection)this.connection).setConnectorIdentity(context);
+ }
+ }
}
Modified:
trunk/engine/src/main/java/com/metamatrix/dqp/internal/pooling/connector/PooledConnector.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/dqp/internal/pooling/connector/PooledConnector.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/engine/src/main/java/com/metamatrix/dqp/internal/pooling/connector/PooledConnector.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -34,9 +34,8 @@
import com.metamatrix.connector.api.Connection;
import com.metamatrix.connector.api.Connector;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
-import com.metamatrix.connector.exception.ConnectorException;
-import com.metamatrix.connector.monitor.ConnectionStatus;
import com.metamatrix.connector.xa.api.TransactionContext;
import com.metamatrix.connector.xa.api.XAConnection;
import com.metamatrix.connector.xa.api.XAConnector;
@@ -166,9 +165,4 @@
return conn;
}
- @Override
- public ConnectionStatus getStatusDirect() {
- return pool.getStatus();
- }
-
}
Modified: trunk/engine/src/main/java/com/metamatrix/dqp/message/AtomicResultsMessage.java
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/dqp/message/AtomicResultsMessage.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/engine/src/main/java/com/metamatrix/dqp/message/AtomicResultsMessage.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -29,7 +29,7 @@
import java.util.List;
import com.metamatrix.common.batch.BatchSerializer;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.core.util.ExternalizeUtil;
public class AtomicResultsMessage implements Externalizable {
Modified: trunk/engine/src/main/java/com/metamatrix/dqp/service/DataService.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/dqp/service/DataService.java 2009-02-16
18:56:03 UTC (rev 473)
+++ trunk/engine/src/main/java/com/metamatrix/dqp/service/DataService.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -31,7 +31,6 @@
import com.metamatrix.common.application.exception.ApplicationLifecycleException;
import com.metamatrix.common.comm.api.ResultsReceiver;
import com.metamatrix.common.config.api.ConnectorBinding;
-import com.metamatrix.connector.monitor.AliveStatus;
import com.metamatrix.dqp.internal.datamgr.ConnectorID;
import com.metamatrix.dqp.internal.process.DQPWorkContext;
import com.metamatrix.dqp.message.AtomicRequestID;
@@ -122,7 +121,7 @@
* @throws MetaMatrixComponentException
* @since 4.3
*/
- AliveStatus getConnectorBindingState(String connectorBindingName)
+ Boolean getConnectorBindingState(String connectorBindingName)
throws MetaMatrixComponentException;
/**
Modified:
trunk/engine/src/test/java/com/metamatrix/dqp/internal/datamgr/impl/FakeConnector.java
===================================================================
---
trunk/engine/src/test/java/com/metamatrix/dqp/internal/datamgr/impl/FakeConnector.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/engine/src/test/java/com/metamatrix/dqp/internal/datamgr/impl/FakeConnector.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -33,25 +33,23 @@
import com.metamatrix.connector.api.Connector;
import com.metamatrix.connector.api.ConnectorCapabilities;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.DataNotAvailableException;
import com.metamatrix.connector.api.Execution;
import com.metamatrix.connector.api.ExecutionContext;
import com.metamatrix.connector.api.ResultSetExecution;
import com.metamatrix.connector.api.UpdateExecution;
+import com.metamatrix.connector.basic.BasicConnection;
import com.metamatrix.connector.basic.BasicConnectorCapabilities;
import com.metamatrix.connector.basic.BasicExecution;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.language.ICommand;
import com.metamatrix.connector.language.IQueryCommand;
import com.metamatrix.connector.metadata.runtime.RuntimeMetadata;
-import com.metamatrix.connector.monitor.AliveStatus;
-import com.metamatrix.connector.monitor.ConnectionStatus;
-import com.metamatrix.connector.monitor.MonitoredConnector;
import com.metamatrix.connector.xa.api.TransactionContext;
import com.metamatrix.connector.xa.api.XAConnection;
import com.metamatrix.connector.xa.api.XAConnector;
-public class FakeConnector implements Connector, XAConnector, MonitoredConnector {
+public class FakeConnector implements Connector, XAConnector {
private static final int RESULT_SIZE = 5;
private boolean executeBlocks;
@@ -78,7 +76,7 @@
return new FakeXAConnection();
}
- private class FakeConnection implements Connection {
+ private class FakeConnection extends BasicConnection {
public boolean released = false;
public Execution createExecution(ICommand command, ExecutionContext
executionContext, RuntimeMetadata metadata) throws ConnectorException {
return new FakeBlockingExecution(executionContext);
@@ -131,7 +129,7 @@
}
@Override
public void execute() throws ConnectorException {
- this.addWarning(new Exception("Some warning")); //$NON-NLS-1$
+ ec.addWarning(new Exception("Some warning")); //$NON-NLS-1$
}
@Override
public List next() throws ConnectorException, DataNotAvailableException {
@@ -193,11 +191,6 @@
this.simulatedBatchRetrievalTime = simulatedBatchRetrievalTime;
}
- @Override
- public ConnectionStatus getStatus() {
- return new ConnectionStatus(AliveStatus.DEAD);
- }
-
public void setClassloader(ClassLoader classloader) {
this.classloader = classloader;
}
Modified:
trunk/engine/src/test/java/com/metamatrix/dqp/internal/datamgr/impl/FakeProcedureExecution.java
===================================================================
---
trunk/engine/src/test/java/com/metamatrix/dqp/internal/datamgr/impl/FakeProcedureExecution.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/engine/src/test/java/com/metamatrix/dqp/internal/datamgr/impl/FakeProcedureExecution.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -25,10 +25,10 @@
import java.util.Arrays;
import java.util.List;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.DataNotAvailableException;
import com.metamatrix.connector.api.ProcedureExecution;
import com.metamatrix.connector.basic.BasicExecution;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.language.IParameter;
final class FakeProcedureExecution extends BasicExecution implements ProcedureExecution
{
Modified:
trunk/engine/src/test/java/com/metamatrix/dqp/internal/datamgr/impl/TestConnectorManagerImpl.java
===================================================================
---
trunk/engine/src/test/java/com/metamatrix/dqp/internal/datamgr/impl/TestConnectorManagerImpl.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/engine/src/test/java/com/metamatrix/dqp/internal/datamgr/impl/TestConnectorManagerImpl.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -38,7 +38,6 @@
import com.metamatrix.common.application.ApplicationEnvironment;
import com.metamatrix.common.application.exception.ApplicationLifecycleException;
import com.metamatrix.connector.internal.ConnectorPropertyNames;
-import com.metamatrix.connector.monitor.AliveStatus;
import
com.metamatrix.dqp.internal.datamgr.impl.TestConnectorWorkItem.QueueResultsReceiver;
import com.metamatrix.dqp.internal.pooling.connector.FakeSourceConnectionFactory;
import com.metamatrix.dqp.internal.process.DQPWorkContext;
@@ -149,16 +148,6 @@
cm.stop();
}
- public void testMonitoredConnector() throws Exception {
- ConnectorManager cm = new ConnectorManager();
- Properties props = new Properties();
- props.setProperty(ConnectorPropertyNames.CONNECTOR_CLASS,
FakeConnector.class.getName());
- props.put(ConnectorPropertyNames.CONNECTOR_CLASS_LOADER,
this.getClass().getClassLoader());
- startConnectorManager(cm, props);
- assertTrue(cm.getStatus().getStatus() == AliveStatus.DEAD);
- cm.stop();
- }
-
public void testDefect19049() throws Exception {
ConnectorManager cm = new ConnectorManager();
Properties props = new Properties();
Modified:
trunk/engine/src/test/java/com/metamatrix/dqp/internal/datamgr/impl/TestConnectorWorkItem.java
===================================================================
---
trunk/engine/src/test/java/com/metamatrix/dqp/internal/datamgr/impl/TestConnectorWorkItem.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/engine/src/test/java/com/metamatrix/dqp/internal/datamgr/impl/TestConnectorWorkItem.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -30,8 +30,8 @@
import junit.framework.TestCase;
import com.metamatrix.common.comm.api.ResultsReceiver;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ProcedureExecution;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.language.IProcedure;
import com.metamatrix.dqp.client.ResultsFuture;
import com.metamatrix.dqp.internal.datamgr.ConnectorID;
Modified:
trunk/engine/src/test/java/com/metamatrix/dqp/internal/datamgr/language/TestCompareCriteriaImpl.java
===================================================================
---
trunk/engine/src/test/java/com/metamatrix/dqp/internal/datamgr/language/TestCompareCriteriaImpl.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/engine/src/test/java/com/metamatrix/dqp/internal/datamgr/language/TestCompareCriteriaImpl.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -22,7 +22,7 @@
package com.metamatrix.dqp.internal.datamgr.language;
-import com.metamatrix.connector.language.ICompareCriteria;
+import com.metamatrix.connector.language.ICompareCriteria.Operator;
import com.metamatrix.query.sql.lang.CompareCriteria;
import com.metamatrix.query.sql.symbol.Constant;
@@ -62,12 +62,12 @@
}
public void testGetOperator() throws Exception {
- assertEquals(ICompareCriteria.EQ, example(CompareCriteria.EQ, 200,
100).getOperator());
- assertEquals(ICompareCriteria.GE, example(CompareCriteria.GE, 200,
100).getOperator());
- assertEquals(ICompareCriteria.GT, example(CompareCriteria.GT, 200,
100).getOperator());
- assertEquals(ICompareCriteria.LE, example(CompareCriteria.LE, 200,
100).getOperator());
- assertEquals(ICompareCriteria.LT, example(CompareCriteria.LT, 200,
100).getOperator());
- assertEquals(ICompareCriteria.NE, example(CompareCriteria.NE, 200,
100).getOperator());
+ assertEquals(Operator.EQ, example(CompareCriteria.EQ, 200, 100).getOperator());
+ assertEquals(Operator.GE, example(CompareCriteria.GE, 200, 100).getOperator());
+ assertEquals(Operator.GT, example(CompareCriteria.GT, 200, 100).getOperator());
+ assertEquals(Operator.LE, example(CompareCriteria.LE, 200, 100).getOperator());
+ assertEquals(Operator.LT, example(CompareCriteria.LT, 200, 100).getOperator());
+ assertEquals(Operator.NE, example(CompareCriteria.NE, 200, 100).getOperator());
}
}
Modified:
trunk/engine/src/test/java/com/metamatrix/dqp/internal/datamgr/language/TestCompoundCriteriaImpl.java
===================================================================
---
trunk/engine/src/test/java/com/metamatrix/dqp/internal/datamgr/language/TestCompoundCriteriaImpl.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/engine/src/test/java/com/metamatrix/dqp/internal/datamgr/language/TestCompoundCriteriaImpl.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -25,6 +25,7 @@
import java.util.Iterator;
import com.metamatrix.connector.language.ICriteria;
+import com.metamatrix.connector.language.ICompoundCriteria.Operator;
import com.metamatrix.query.sql.lang.CompareCriteria;
import com.metamatrix.query.sql.lang.CompoundCriteria;
@@ -51,8 +52,8 @@
}
public void testGetOperator() throws Exception {
- assertEquals(CompoundCriteriaImpl.AND,
example(CompoundCriteria.AND).getOperator());
- assertEquals(CompoundCriteriaImpl.OR,
example(CompoundCriteria.OR).getOperator());
+ assertEquals(Operator.AND, example(CompoundCriteria.AND).getOperator());
+ assertEquals(Operator.OR, example(CompoundCriteria.OR).getOperator());
}
public void testGetCriteria() throws Exception {
Modified:
trunk/engine/src/test/java/com/metamatrix/dqp/internal/datamgr/language/TestJoinImpl.java
===================================================================
---
trunk/engine/src/test/java/com/metamatrix/dqp/internal/datamgr/language/TestJoinImpl.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/engine/src/test/java/com/metamatrix/dqp/internal/datamgr/language/TestJoinImpl.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -26,7 +26,6 @@
import java.util.Iterator;
import com.metamatrix.connector.language.ICriteria;
-import com.metamatrix.connector.language.IJoin;
import com.metamatrix.query.sql.lang.CompareCriteria;
import com.metamatrix.query.sql.lang.JoinPredicate;
import com.metamatrix.query.sql.lang.JoinType;
@@ -69,11 +68,11 @@
}
public void testGetJoinType() throws Exception {
- assertEquals(IJoin.CROSS_JOIN, example(JoinType.JOIN_CROSS).getJoinType());
- assertEquals(IJoin.FULL_OUTER_JOIN,
example(JoinType.JOIN_FULL_OUTER).getJoinType());
- assertEquals(IJoin.INNER_JOIN, example(JoinType.JOIN_INNER).getJoinType());
- assertEquals(IJoin.LEFT_OUTER_JOIN,
example(JoinType.JOIN_LEFT_OUTER).getJoinType());
- assertEquals(IJoin.RIGHT_OUTER_JOIN,
example(JoinType.JOIN_RIGHT_OUTER).getJoinType());
+ assertEquals(com.metamatrix.connector.language.IJoin.JoinType.CROSS_JOIN,
example(JoinType.JOIN_CROSS).getJoinType());
+ assertEquals(com.metamatrix.connector.language.IJoin.JoinType.FULL_OUTER_JOIN,
example(JoinType.JOIN_FULL_OUTER).getJoinType());
+ assertEquals(com.metamatrix.connector.language.IJoin.JoinType.INNER_JOIN,
example(JoinType.JOIN_INNER).getJoinType());
+ assertEquals(com.metamatrix.connector.language.IJoin.JoinType.LEFT_OUTER_JOIN,
example(JoinType.JOIN_LEFT_OUTER).getJoinType());
+ assertEquals(com.metamatrix.connector.language.IJoin.JoinType.RIGHT_OUTER_JOIN,
example(JoinType.JOIN_RIGHT_OUTER).getJoinType());
}
public void testGetCriteria() throws Exception {
Modified:
trunk/engine/src/test/java/com/metamatrix/dqp/internal/datamgr/language/TestParameterImpl.java
===================================================================
---
trunk/engine/src/test/java/com/metamatrix/dqp/internal/datamgr/language/TestParameterImpl.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/engine/src/test/java/com/metamatrix/dqp/internal/datamgr/language/TestParameterImpl.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -24,7 +24,7 @@
import java.sql.ResultSet;
-import com.metamatrix.connector.language.IParameter;
+import com.metamatrix.connector.language.IParameter.Direction;
import junit.framework.TestCase;
@@ -48,9 +48,9 @@
}
public void testGetDirection() throws Exception {
- assertEquals(ParameterImpl.RESULT_SET, example(0).getDirection());
- assertEquals(ParameterImpl.IN, example(1).getDirection());
- assertEquals(ParameterImpl.IN, example(2).getDirection());
+ assertEquals(Direction.RESULT_SET, example(0).getDirection());
+ assertEquals(Direction.IN, example(1).getDirection());
+ assertEquals(Direction.IN, example(2).getDirection());
}
public void testGetType() throws Exception {
@@ -67,7 +67,7 @@
public void testGetValueSpecified() throws Exception {
assertEquals(false, example(0).getValueSpecified());
- ParameterImpl param = new ParameterImpl(1, IParameter.IN, null, String.class,
null);
+ ParameterImpl param = new ParameterImpl(1, Direction.IN, null, String.class,
null);
// Test construction state (null value)
assertEquals(false, param.getValueSpecified());
// Test value specified not set on null
Modified:
trunk/engine/src/test/java/com/metamatrix/dqp/internal/datamgr/language/TestSubqueryCompareCriteriaImpl.java
===================================================================
---
trunk/engine/src/test/java/com/metamatrix/dqp/internal/datamgr/language/TestSubqueryCompareCriteriaImpl.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/engine/src/test/java/com/metamatrix/dqp/internal/datamgr/language/TestSubqueryCompareCriteriaImpl.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -22,12 +22,15 @@
package com.metamatrix.dqp.internal.datamgr.language;
-import com.metamatrix.connector.language.ISubqueryCompareCriteria;
-import com.metamatrix.query.sql.lang.*;
+import junit.framework.TestCase;
+
+import com.metamatrix.connector.language.ICompareCriteria;
+import com.metamatrix.connector.language.ISubqueryCompareCriteria.Quantifier;
+import com.metamatrix.query.sql.lang.CompareCriteria;
+import com.metamatrix.query.sql.lang.Query;
+import com.metamatrix.query.sql.lang.SubqueryCompareCriteria;
import com.metamatrix.query.sql.symbol.ElementSymbol;
-import junit.framework.TestCase;
-
/**
*/
public class TestSubqueryCompareCriteriaImpl extends TestCase {
@@ -60,11 +63,11 @@
}
public void testOperator() throws Exception {
- assertEquals("Wrong operator", ISubqueryCompareCriteria.GT,
example().getOperator()); //$NON-NLS-1$
+ assertEquals("Wrong operator", ICompareCriteria.Operator.GT,
example().getOperator()); //$NON-NLS-1$
}
public void testQuantifier() throws Exception {
- assertEquals("Wrong quantifier", ISubqueryCompareCriteria.SOME,
example().getQuantifier()); //$NON-NLS-1$
+ assertEquals("Wrong quantifier", Quantifier.SOME,
example().getQuantifier()); //$NON-NLS-1$
}
}
Modified:
trunk/engine/src/test/java/com/metamatrix/dqp/internal/pooling/connector/FakeSourceConnectionFactory.java
===================================================================
---
trunk/engine/src/test/java/com/metamatrix/dqp/internal/pooling/connector/FakeSourceConnectionFactory.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/engine/src/test/java/com/metamatrix/dqp/internal/pooling/connector/FakeSourceConnectionFactory.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -28,12 +28,12 @@
import com.metamatrix.connector.api.Connector;
import com.metamatrix.connector.api.ConnectorCapabilities;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.Execution;
import com.metamatrix.connector.api.ExecutionContext;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.basic.BasicConnection;
import com.metamatrix.connector.language.ICommand;
import com.metamatrix.connector.metadata.runtime.RuntimeMetadata;
-import com.metamatrix.connector.pool.PoolAwareConnection;
/**
*/
@@ -42,7 +42,7 @@
static boolean alive = true;
- class FakeSourceConnection implements Connection, PoolAwareConnection {
+ class FakeSourceConnection extends BasicConnection {
int id;
FakeSourceConnection(int id){
@@ -78,10 +78,6 @@
}
- @Override
- public void closeCalled() {
-
- }
}
@Override
Modified:
trunk/engine/src/test/java/com/metamatrix/dqp/internal/pooling/connector/FakeUserIdentityConnectionFactory.java
===================================================================
---
trunk/engine/src/test/java/com/metamatrix/dqp/internal/pooling/connector/FakeUserIdentityConnectionFactory.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/engine/src/test/java/com/metamatrix/dqp/internal/pooling/connector/FakeUserIdentityConnectionFactory.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -24,8 +24,8 @@
*/
package com.metamatrix.dqp.internal.pooling.connector;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.pool.ConnectorIdentity;
import com.metamatrix.connector.pool.ConnectorIdentityFactory;
import com.metamatrix.connector.pool.UserIdentity;
Modified:
trunk/engine/src/test/java/com/metamatrix/dqp/internal/pooling/connector/TestConnectionPool.java
===================================================================
---
trunk/engine/src/test/java/com/metamatrix/dqp/internal/pooling/connector/TestConnectionPool.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/engine/src/test/java/com/metamatrix/dqp/internal/pooling/connector/TestConnectionPool.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -29,7 +29,6 @@
import junit.framework.TestCase;
import com.metamatrix.connector.api.ExecutionContext;
-import com.metamatrix.connector.monitor.AliveStatus;
import com.metamatrix.connector.pool.UserIdentity;
import com.metamatrix.dqp.internal.datamgr.impl.ConnectorWrapper;
import com.metamatrix.dqp.internal.datamgr.impl.ExecutionContextImpl;
@@ -169,7 +168,7 @@
singleIDPool.obtain(context);
fail("No exception received when maxing out the pool");
//$NON-NLS-1$
} catch(ConnectionPoolException e) {
- assertEquals("The connection pool for identity \"SingleIdentity:
atomic-request=null.null.null\" is at the maximum connection count \"5\"
and no connection became available in the timeout period. Consider increasing the number
of connections allowed per identity or the wait time.", e.getMessage());
//$NON-NLS-1$
+ assertEquals("The connection pool for identity
\"SingleIdentity\" is at the maximum connection count \"5\" and no
connection became available in the timeout period. Consider increasing the number of
connections allowed per identity or the wait time.", e.getMessage()); //$NON-NLS-1$
}
}
@@ -197,7 +196,7 @@
fail("No exception received on pool timeout"); //$NON-NLS-1$
} catch (ConnectionPoolException e) {
- assertEquals("The connection pool for identity \"SingleIdentity:
atomic-request=null.null.null\" exceeded wait time for connection, \"1\"
ms, and no connection became available in the timeout period. Consider increasing the
number of connections allowed per identity or the wait time.", e.getMessage());
//$NON-NLS-1$
+ assertEquals("The connection pool for identity
\"SingleIdentity\" exceeded wait time for connection, \"1\" ms, and no
connection became available in the timeout period. Consider increasing the number of
connections allowed per identity or the wait time.", e.getMessage()); //$NON-NLS-1$
}
}
@@ -279,49 +278,6 @@
assertEquals(1, usedConns2.size());
}
- /**
- * Tests ConnectionPool.getStatus() with a SingleIdentity
- * @since 4.3
- */
- public void testGetStatusSingleIdentity() throws Exception {
- //connection is open: status should be ALIVE
- singleIDPool.lastConnectionAttemptFailed = false;
- FakeSourceConnectionFactory.alive = true;
- assertEquals(AliveStatus.ALIVE, singleIDPool.getStatus().aliveStatus);
-
- //connection can't be reached: status should be DEAD
- singleIDPool.lastConnectionAttemptFailed = false;
- FakeSourceConnectionFactory.alive = false;
- assertEquals(AliveStatus.DEAD, singleIDPool.getStatus().aliveStatus);
-
- //connection can't be reached: status should be DEAD
- singleIDPool.lastConnectionAttemptFailed = true;
- assertEquals(AliveStatus.DEAD, singleIDPool.getStatus().aliveStatus);
- }
-
- /**
- * Tests ConnectionPool.getStatus() with a UserIdentity
- * @since 4.3
- */
- public void testGetStatusUserIdentity() throws Exception {
- userIDPool.lastConnectionAttemptFailed = false;
-
- //status should always be UNKNOWN
- userIDPool.lastConnectionAttemptFailed = false;
- FakeSourceConnectionFactory.alive = true;
- assertEquals(AliveStatus.UNKNOWN, userIDPool.getStatus().aliveStatus);
-
- //status should always be UNKNOWN
- userIDPool.lastConnectionAttemptFailed = false;
- FakeSourceConnectionFactory.alive = false;
- assertEquals(AliveStatus.UNKNOWN, userIDPool.getStatus().aliveStatus);
-
- //status should always be UNKNOWN
- userIDPool.lastConnectionAttemptFailed = true;
- assertEquals(AliveStatus.UNKNOWN, userIDPool.getStatus().aliveStatus);
-
- }
-
static class LoadRunner extends Thread {
ConnectionPool pool;
private int n;
Modified:
trunk/engine/src/test/java/com/metamatrix/dqp/internal/process/TestDataTierManager.java
===================================================================
---
trunk/engine/src/test/java/com/metamatrix/dqp/internal/process/TestDataTierManager.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/engine/src/test/java/com/metamatrix/dqp/internal/process/TestDataTierManager.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -43,7 +43,6 @@
import com.metamatrix.common.buffer.TupleSourceID;
import com.metamatrix.common.comm.api.ResultsReceiver;
import com.metamatrix.common.config.api.ConnectorBinding;
-import com.metamatrix.connector.monitor.AliveStatus;
import com.metamatrix.dqp.internal.datamgr.ConnectorID;
import com.metamatrix.dqp.message.AtomicRequestID;
import com.metamatrix.dqp.message.AtomicRequestMessage;
@@ -371,7 +370,7 @@
public void startConnectorBinding(String connectorBindingName) throws
ApplicationLifecycleException,ComponentNotFoundException {}
public void stopConnectorBinding(String connectorBindingName) throws
ApplicationLifecycleException,ComponentNotFoundException {}
public List getConnectorBindings() throws ComponentNotFoundException {return
null;}
- public AliveStatus getConnectorBindingState(String connectorBindingName) throws
MetaMatrixComponentException {return null;}
+ public Boolean getConnectorBindingState(String connectorBindingName) throws
MetaMatrixComponentException {return null;}
public ConnectorBinding getConnectorBinding(String connectorBindingName) throws
MetaMatrixComponentException {return null;}
public Collection getConnectorBindingStatistics(String connectorBindingName)
throws MetaMatrixComponentException {return null;}
public void clearConnectorBindingCache(String connectorBindingName) throws
MetaMatrixComponentException {}
Modified: trunk/engine/src/test/java/com/metamatrix/dqp/service/AutoGenDataService.java
===================================================================
---
trunk/engine/src/test/java/com/metamatrix/dqp/service/AutoGenDataService.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/engine/src/test/java/com/metamatrix/dqp/service/AutoGenDataService.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -28,15 +28,12 @@
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
-import java.util.Map;
import com.metamatrix.api.exception.MetaMatrixComponentException;
import com.metamatrix.common.application.exception.ApplicationLifecycleException;
import com.metamatrix.common.comm.api.ResultsReceiver;
import com.metamatrix.common.config.api.ConnectorBinding;
import com.metamatrix.common.types.DataTypeManager;
-import com.metamatrix.connector.monitor.AliveStatus;
-import com.metamatrix.connector.monitor.ConnectionStatus;
import com.metamatrix.dqp.internal.datamgr.ConnectorID;
import com.metamatrix.dqp.internal.datamgr.impl.ConnectorWorkItem;
import com.metamatrix.dqp.internal.process.DQPWorkContext;
@@ -170,34 +167,6 @@
return caps;
}
- /*
- * @see com.metamatrix.dqp.service.DataService#getConnectorStatus()
- */
- public Map getConnectorStatus() {
- throw new UnsupportedOperationException();
- }
-
- /*
- * @see com.metamatrix.dqp.service.DataService#getConnectorStatus()
- */
- public ConnectionStatus getConnectorStatus(String connectorName) {
- throw new UnsupportedOperationException();
- }
-
- /*
- * @see com.metamatrix.dqp.service.DataService#getConnectorNames()
- */
- public String[] getConnectorNames() {
- throw new UnsupportedOperationException();
- }
-
- /*
- * @see com.metamatrix.dqp.service.DataService#restartConnector(java.lang.String)
- */
- public void restartConnector(String connectorName) throws
ApplicationLifecycleException {
- throw new UnsupportedOperationException();
- }
-
/**
* @see
com.metamatrix.dqp.service.DataService#startConnectorBinding(java.lang.String)
* @since 4.3
@@ -226,7 +195,7 @@
* @see
com.metamatrix.dqp.service.DataService#getConnectorBindingState(java.lang.String)
* @since 4.3
*/
- public AliveStatus getConnectorBindingState(String connectorBindingName) throws
MetaMatrixComponentException {
+ public Boolean getConnectorBindingState(String connectorBindingName) throws
MetaMatrixComponentException {
return null;
}
Modified:
trunk/server/src/main/java/com/metamatrix/common/comm/platform/socket/SocketVMController.java
===================================================================
---
trunk/server/src/main/java/com/metamatrix/common/comm/platform/socket/SocketVMController.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/server/src/main/java/com/metamatrix/common/comm/platform/socket/SocketVMController.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -42,6 +42,7 @@
import com.metamatrix.common.util.VMNaming;
import com.metamatrix.platform.PlatformPlugin;
import com.metamatrix.platform.registry.ClusteredRegistryState;
+import com.metamatrix.platform.util.PlatformProxyHelper;
import com.metamatrix.platform.vm.controller.ServerEvents;
import com.metamatrix.platform.vm.controller.SocketListenerStats;
import com.metamatrix.platform.vm.controller.VMController;
@@ -140,7 +141,7 @@
ServerSocketConfiguration helper = new ServerSocketConfiguration();
try {
helper.init();
- listener = new SocketListener(socketPort, bindaddress, this.clientServices,
inputBufferSize, outputBufferSize, workerPool, helper.getServerSSLEngine(),
helper.isClientEncryptionEnabled());
+ listener = new SocketListener(socketPort, bindaddress, this.clientServices,
inputBufferSize, outputBufferSize, workerPool, helper.getServerSSLEngine(),
helper.isClientEncryptionEnabled(),
PlatformProxyHelper.getSessionServiceProxy(PlatformProxyHelper.ROUND_ROBIN_LOCAL));
} catch (Exception e) {
LogManager.logCritical(LogCommonConstants.CTX_CONTROLLER, e,
PlatformPlugin.Util.getString("SocketVMController.2",param)); //$NON-NLS-1$
System.exit(1);
Modified:
trunk/server/src/main/java/com/metamatrix/common/comm/platform/socket/server/LogonImpl.java
===================================================================
---
trunk/server/src/main/java/com/metamatrix/common/comm/platform/socket/server/LogonImpl.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/server/src/main/java/com/metamatrix/common/comm/platform/socket/server/LogonImpl.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -35,8 +35,8 @@
import com.metamatrix.api.exception.security.SessionServiceException;
import com.metamatrix.common.api.MMURL;
import com.metamatrix.common.log.LogManager;
-import com.metamatrix.connector.exception.ConnectorException;
-import com.metamatrix.connector.pool.CredentialMap;
+import com.metamatrix.connector.api.ConnectorException;
+import com.metamatrix.connector.api.CredentialMap;
import com.metamatrix.dqp.client.ResultsFuture;
import com.metamatrix.dqp.internal.process.DQPWorkContext;
import com.metamatrix.jdbc.api.ConnectionProperties;
Modified:
trunk/server/src/main/java/com/metamatrix/common/comm/platform/socket/server/ServerWorkItem.java
===================================================================
---
trunk/server/src/main/java/com/metamatrix/common/comm/platform/socket/server/ServerWorkItem.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/server/src/main/java/com/metamatrix/common/comm/platform/socket/server/ServerWorkItem.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -57,15 +57,17 @@
private final ClientInstance socketClientInstance;
private final Serializable messageKey;
private final Message message;
- private final ClientServiceRegistry<SessionServiceInterface> server;
+ private final ClientServiceRegistry server;
+ private final SessionServiceInterface sessionService;
public ServerWorkItem(ClientInstance socketClientInstance,
Serializable messageKey, Message message,
- ClientServiceRegistry server) {
+ ClientServiceRegistry server, SessionServiceInterface sessionService) {
this.socketClientInstance = socketClientInstance;
this.messageKey = messageKey;
this.message = message;
this.server = server;
+ this.sessionService = sessionService;
}
/**
@@ -103,7 +105,7 @@
}
if (!(instance instanceof ILogon)) {
DQPWorkContext workContext = this.socketClientInstance.getWorkContext();
- server.getSessionService().validateSession(workContext.getSessionId());
+ sessionService.validateSession(workContext.getSessionId());
}
service = serviceStruct.targetClass;
ReflectionHelper helper = new ReflectionHelper(instance.getClass());
Modified:
trunk/server/src/main/java/com/metamatrix/common/comm/platform/socket/server/SocketClientInstance.java
===================================================================
---
trunk/server/src/main/java/com/metamatrix/common/comm/platform/socket/server/SocketClientInstance.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/server/src/main/java/com/metamatrix/common/comm/platform/socket/server/SocketClientInstance.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -41,6 +41,7 @@
import com.metamatrix.common.util.crypto.NullCryptor;
import com.metamatrix.core.log.MessageLevel;
import com.metamatrix.dqp.internal.process.DQPWorkContext;
+import com.metamatrix.platform.security.api.service.SessionServiceInterface;
/**
* Sockets implementation of the communication framework class representing the
server's view of a client connection.
@@ -59,12 +60,14 @@
private boolean usingEncryption;
private DhKeyGenerator keyGen;
private DQPWorkContext workContext = new DQPWorkContext();
+ private SessionServiceInterface sessionService;
- public SocketClientInstance(ObjectChannel objectSocket, WorkerPool workerPool,
ClientServiceRegistry server, boolean isClientEncryptionEnabled) {
+ public SocketClientInstance(ObjectChannel objectSocket, WorkerPool workerPool,
ClientServiceRegistry server, boolean isClientEncryptionEnabled, SessionServiceInterface
sessionService) {
this.objectSocket = objectSocket;
this.workerPool = workerPool;
this.server = server;
this.usingEncryption = isClientEncryptionEnabled;
+ this.sessionService = sessionService;
}
public void send(Message message, Serializable messageKey) {
@@ -135,7 +138,7 @@
if (LogManager.isMessageToBeRecorded(SocketVMController.SOCKET_CONTEXT,
SocketLog.DETAIL)) {
LogManager.logDetail(SocketVMController.SOCKET_CONTEXT, "processing
message:" + packet); //$NON-NLS-1$
}
- workerPool.execute(new ServerWorkItem(this, packet.getMessageKey(), packet,
this.server));
+ workerPool.execute(new ServerWorkItem(this, packet.getMessageKey(), packet,
this.server, this.sessionService));
}
public void shutdown() throws CommunicationException {
Modified:
trunk/server/src/main/java/com/metamatrix/common/comm/platform/socket/server/SocketListener.java
===================================================================
---
trunk/server/src/main/java/com/metamatrix/common/comm/platform/socket/server/SocketListener.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/server/src/main/java/com/metamatrix/common/comm/platform/socket/server/SocketListener.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -45,6 +45,7 @@
import com.metamatrix.common.queue.WorkerPool;
import com.metamatrix.common.queue.WorkerPoolFactory;
import com.metamatrix.core.util.MetaMatrixProductVersion;
+import com.metamatrix.platform.security.api.service.SessionServiceInterface;
import com.metamatrix.platform.vm.controller.SocketListenerStats;
/**
@@ -56,6 +57,7 @@
private SSLAwareChannelHandler channelHandler;
private Channel serverChanel;
private boolean isClientEncryptionEnabled;
+ private SessionServiceInterface sessionService;
/**
*
@@ -69,9 +71,9 @@
*/
public SocketListener(int port, String bindAddress,
ClientServiceRegistry server, int inputBufferSize,
- int outputBufferSize, WorkerPool workerPool, SSLEngine engine, boolean
isClientEncryptionEnabled) {
+ int outputBufferSize, WorkerPool workerPool, SSLEngine engine, boolean
isClientEncryptionEnabled, SessionServiceInterface sessionService) {
this.isClientEncryptionEnabled = isClientEncryptionEnabled;
-
+ this.sessionService = sessionService;
if (port < 0 || port > 0xFFFF) {
throw new IllegalArgumentException("port out of range:" + port);
//$NON-NLS-1$
}
@@ -122,7 +124,7 @@
}
public ChannelListener createChannelListener(ObjectChannel channel) {
- return new SocketClientInstance(channel, this.workerPool, this.server,
this.isClientEncryptionEnabled);
+ return new SocketClientInstance(channel, this.workerPool, this.server,
this.isClientEncryptionEnabled, this.sessionService);
}
}
\ No newline at end of file
Modified:
trunk/server/src/main/java/com/metamatrix/platform/vm/controller/VMController.java
===================================================================
---
trunk/server/src/main/java/com/metamatrix/platform/vm/controller/VMController.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/server/src/main/java/com/metamatrix/platform/vm/controller/VMController.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -169,7 +169,7 @@
// Server events that are being generated
ServerEvents events;
- protected ClientServiceRegistry<SessionServiceInterface> clientServices;
+ protected ClientServiceRegistry clientServices;
private Map<ComponentTypeID, Properties> defaultPropertiesCache = new
HashMap<ComponentTypeID, Properties>();
private Properties hostProperties;
@@ -206,7 +206,7 @@
//Register with registry
logMessage(PlatformPlugin.Util.getString(LogMessageKeys.VM_0006, id));
- this.clientServices = new
ClientServiceRegistry(PlatformProxyHelper.getSessionServiceProxy(PlatformProxyHelper.ROUND_ROBIN_LOCAL));
+ this.clientServices = new ClientServiceRegistry();
RuntimeMetadataCatalog.getInstance().init(CurrentConfiguration.getInstance().getProperties(),
ResourceFinder.getMessageBus(), ResourceFinder.getCacheFactory());
Modified:
trunk/server/src/main/java/com/metamatrix/server/connector/service/ConnectorService.java
===================================================================
---
trunk/server/src/main/java/com/metamatrix/server/connector/service/ConnectorService.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/server/src/main/java/com/metamatrix/server/connector/service/ConnectorService.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -70,10 +70,8 @@
import com.metamatrix.common.util.VMNaming;
import com.metamatrix.common.util.crypto.CryptoException;
import com.metamatrix.common.util.crypto.CryptoUtil;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.internal.ConnectorPropertyNames;
-import com.metamatrix.connector.monitor.AliveStatus;
-import com.metamatrix.connector.monitor.ConnectionStatus;
import com.metamatrix.core.MetaMatrixCoreException;
import com.metamatrix.core.event.EventObjectListener;
import com.metamatrix.core.util.ReflectionHelper;
@@ -349,24 +347,20 @@
public void checkState() throws ServiceStateException {
if (monitoringEnabled) {
- ConnectionStatus status = connectorMgr.getStatus();
+ Boolean status = connectorMgr.getStatus();
int state = getCurrentState();
- if (state == ServiceState.STATE_OPEN) {
- if (status.getStatus().equals(AliveStatus.DEAD)) {
- updateState(ServiceState.STATE_DATA_SOURCE_UNAVAILABLE);
-
-
logOK("ConnectorService.Change_state_to_data_source_unavailable",
connectorMgrName); //$NON-NLS-1$
-
- //TODO: store the exception in the registry
- }
+ if (state == ServiceState.STATE_OPEN && status == Boolean.FALSE) {
+ updateState(ServiceState.STATE_DATA_SOURCE_UNAVAILABLE);
+
+
logOK("ConnectorService.Change_state_to_data_source_unavailable",
connectorMgrName); //$NON-NLS-1$
+
+ //TODO: store the exception in the registry
}
- if (state == ServiceState.STATE_DATA_SOURCE_UNAVAILABLE) {
- if (status.getStatus().equals(AliveStatus.ALIVE)) {
- this.updateState(ServiceState.STATE_OPEN);
-
- logOK("ConnectorService.Change_state_to_open",
connectorMgrName); //$NON-NLS-1$
- }
+ if (state == ServiceState.STATE_DATA_SOURCE_UNAVAILABLE && status ==
Boolean.TRUE) {
+ this.updateState(ServiceState.STATE_OPEN);
+
+ logOK("ConnectorService.Change_state_to_open",
connectorMgrName); //$NON-NLS-1$
}
}
Modified:
trunk/server/src/main/java/com/metamatrix/server/connector/service/ConnectorServiceInterface.java
===================================================================
---
trunk/server/src/main/java/com/metamatrix/server/connector/service/ConnectorServiceInterface.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/server/src/main/java/com/metamatrix/server/connector/service/ConnectorServiceInterface.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -30,7 +30,7 @@
import com.metamatrix.api.exception.MetaMatrixComponentException;
import com.metamatrix.common.comm.api.ResultsReceiver;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.dqp.internal.datamgr.ConnectorID;
import com.metamatrix.dqp.internal.process.DQPWorkContext;
import com.metamatrix.dqp.message.AtomicRequestID;
Modified:
trunk/server/src/main/java/com/metamatrix/server/dqp/service/PlatformDataService.java
===================================================================
---
trunk/server/src/main/java/com/metamatrix/server/dqp/service/PlatformDataService.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/server/src/main/java/com/metamatrix/server/dqp/service/PlatformDataService.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -28,7 +28,6 @@
import java.util.Collection;
import java.util.List;
-import java.util.Map;
import java.util.Properties;
import java.util.concurrent.ConcurrentHashMap;
@@ -39,12 +38,8 @@
import com.metamatrix.common.application.exception.ApplicationLifecycleException;
import com.metamatrix.common.comm.api.ResultsReceiver;
import com.metamatrix.common.config.api.ConnectorBinding;
-import com.metamatrix.common.config.api.ConnectorBindingType;
-import com.metamatrix.connector.exception.ConnectorException;
-import com.metamatrix.connector.monitor.AliveStatus;
-import com.metamatrix.connector.monitor.ConnectionStatus;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.core.util.ArgCheck;
-import com.metamatrix.server.ResourceFinder;
import com.metamatrix.dqp.internal.datamgr.ConnectorID;
import com.metamatrix.dqp.internal.process.DQPWorkContext;
import com.metamatrix.dqp.message.AtomicRequestID;
@@ -54,6 +49,7 @@
import com.metamatrix.dqp.service.DataService;
import com.metamatrix.platform.util.PlatformProxyHelper;
import com.metamatrix.query.optimizer.capabilities.SourceCapabilities;
+import com.metamatrix.server.ResourceFinder;
import com.metamatrix.server.ServerPlugin;
import com.metamatrix.server.connector.service.ConnectorServiceInterface;
@@ -165,27 +161,6 @@
// that the client is shutting down
}
- /*
- * @see com.metamatrix.dqp.service.DataService#getConnectorStatus()
- */
- public Map getConnectorStatus() {
- throw new UnsupportedOperationException();
- }
-
- /*
- * @see com.metamatrix.dqp.service.DataService#getConnectorStatus()
- */
- public ConnectionStatus getConnectorStatus(String connectorName) {
- throw new UnsupportedOperationException();
- }
-
- /*
- * @see com.metamatrix.dqp.service.DataService#getConnectorNames()
- */
- public String[] getConnectorNames() {
- throw new UnsupportedOperationException();
- }
-
/**
* @see
com.metamatrix.dqp.service.DataService#startConnectorBinding(java.lang.String)
* @since 4.3
@@ -213,34 +188,10 @@
}
/**
- * @see com.metamatrix.dqp.service.DataService#addConnectorType(java.lang.String,
com.metamatrix.common.config.api.ConnectorBindingType)
- * @since 4.3
- */
- public void addConnectorType(String name, ConnectorBindingType type) {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @see com.metamatrix.dqp.service.DataService#deleteConnectorType(java.lang.String)
- * @since 4.3
- */
- public void deleteConnectorType(String name) {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @see com.metamatrix.dqp.service.DataService#getConnectorTypes()
- * @since 4.3
- */
- public List getConnectorTypes() {
- throw new UnsupportedOperationException();
- }
-
- /**
* @see
com.metamatrix.dqp.service.DataService#getConnectorBindingState(java.lang.String)
* @since 4.3
*/
- public AliveStatus getConnectorBindingState(String connectorBindingName) throws
MetaMatrixComponentException {
+ public Boolean getConnectorBindingState(String connectorBindingName) throws
MetaMatrixComponentException {
throw new UnsupportedOperationException();
}
Modified:
trunk/server/src/test/java/com/metamatrix/common/comm/platform/socket/server/TestCommSockets.java
===================================================================
---
trunk/server/src/test/java/com/metamatrix/common/comm/platform/socket/server/TestCommSockets.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/server/src/test/java/com/metamatrix/common/comm/platform/socket/server/TestCommSockets.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -62,12 +62,12 @@
public void testFailedConnect() throws Exception {
InetSocketAddress addr = new InetSocketAddress(0);
- ClientServiceRegistry<SessionServiceInterface> csr = new ClientServiceRegistry(
- mock(SessionServiceInterface.class));
- csr.registerClientService(ILogon.class, new LogonImpl(csr.getSessionService(),
"fakeCluster"), "foo"); //$NON-NLS-1$ //$NON-NLS-2$
+ ClientServiceRegistry csr = new ClientServiceRegistry();
+ SessionServiceInterface sessionService = mock(SessionServiceInterface.class);
+ csr.registerClientService(ILogon.class, new LogonImpl(sessionService,
"fakeCluster"), "foo"); //$NON-NLS-1$ //$NON-NLS-2$
listener = new SocketListener(addr.getPort(), addr.getAddress().getHostAddress(),
csr, 1024, 1024, WorkerPoolFactory.newWorkerPool(
- "testIO", 1, 120000), null, true); //$NON-NLS-1$
+ "testIO", 1, 120000), null, true, sessionService); //$NON-NLS-1$
try {
Properties p = new Properties();
@@ -114,10 +114,9 @@
SSLEngine serverSSL, boolean isClientEncryptionEnabled, Properties socketConfig)
throws CommunicationException,
ConnectionException {
InetSocketAddress addr = new InetSocketAddress(0);
- ClientServiceRegistry<SessionServiceInterface> csr = new ClientServiceRegistry(
- mock(SessionServiceInterface.class));
- csr.registerClientService(ILogon.class, new LogonImpl(csr
- .getSessionService(), "fakeCluster") { //$NON-NLS-1$
+ SessionServiceInterface sessionService = mock(SessionServiceInterface.class);
+ ClientServiceRegistry csr = new ClientServiceRegistry();
+ csr.registerClientService(ILogon.class, new LogonImpl(sessionService,
"fakeCluster") { //$NON-NLS-1$
@Override
public LogonResult logon(Properties connProps)
throws LogonException, ComponentNotFoundException {
@@ -126,7 +125,7 @@
}, "foo"); //$NON-NLS-1$
listener = new SocketListener(addr.getPort(), addr.getAddress().getHostAddress(),
csr, 1024, 1024, WorkerPoolFactory.newWorkerPool(
- "testIO", 1, 120000), serverSSL, isClientEncryptionEnabled);
//$NON-NLS-1$
+ "testIO", 1, 120000), serverSSL, isClientEncryptionEnabled,
sessionService); //$NON-NLS-1$
SocketListenerStats stats = listener.getStats();
assertEquals(0, stats.maxSockets);
Modified:
trunk/server/src/test/java/com/metamatrix/common/comm/platform/socket/server/TestSocketRemoting.java
===================================================================
---
trunk/server/src/test/java/com/metamatrix/common/comm/platform/socket/server/TestSocketRemoting.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/server/src/test/java/com/metamatrix/common/comm/platform/socket/server/TestSocketRemoting.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -106,7 +106,7 @@
public void send(Message message, MessageListener listener,
Serializable messageKey) throws CommunicationException {
- ServerWorkItem workItem = new ServerWorkItem(this, messageKey, message,
clientServiceRegistry);
+ ServerWorkItem workItem = new ServerWorkItem(this, messageKey, message,
clientServiceRegistry, SimpleMock.createSimpleMock(SessionServiceInterface.class));
this.listener = listener;
workItem.run();
}
@@ -143,7 +143,7 @@
}
public void testMethodInvocation() throws Exception {
- ClientServiceRegistry csr = new
ClientServiceRegistry(SimpleMock.createSimpleMock(SessionServiceInterface.class));
+ ClientServiceRegistry csr = new ClientServiceRegistry();
csr.registerClientService(ILogon.class, new ILogon() {
public ResultsFuture<?> logoff()
Modified:
trunk/test-integration/src/test/java/com/metamatrix/connector/jdbc/extension/TestSQLConversionVisitor.java
===================================================================
---
trunk/test-integration/src/test/java/com/metamatrix/connector/jdbc/extension/TestSQLConversionVisitor.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/test-integration/src/test/java/com/metamatrix/connector/jdbc/extension/TestSQLConversionVisitor.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -30,8 +30,8 @@
import com.metamatrix.cdk.api.TranslationUtility;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.jdbc.JDBCPropertyNames;
import com.metamatrix.connector.jdbc.util.FunctionReplacementVisitor;
import com.metamatrix.connector.language.ICommand;
Modified:
trunk/test-integration/src/test/java/com/metamatrix/connector/jdbc/oracle/TestOracleSQLConversionVisitor.java
===================================================================
---
trunk/test-integration/src/test/java/com/metamatrix/connector/jdbc/oracle/TestOracleSQLConversionVisitor.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/test-integration/src/test/java/com/metamatrix/connector/jdbc/oracle/TestOracleSQLConversionVisitor.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -32,8 +32,8 @@
import com.metamatrix.cdk.api.EnvironmentUtility;
import com.metamatrix.cdk.api.TranslationUtility;
import com.metamatrix.common.types.DataTypeManager;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.jdbc.extension.TranslatedCommand;
import com.metamatrix.connector.jdbc.util.FunctionReplacementVisitor;
import com.metamatrix.connector.language.ICommand;
Modified:
trunk/test-integration/src/test/java/com/metamatrix/connector/jdbc/util/TestJDBCExecutionHelper.java
===================================================================
---
trunk/test-integration/src/test/java/com/metamatrix/connector/jdbc/util/TestJDBCExecutionHelper.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/test-integration/src/test/java/com/metamatrix/connector/jdbc/util/TestJDBCExecutionHelper.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -31,8 +31,8 @@
import junit.framework.TestCase;
import com.metamatrix.common.types.DataTypeManager;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.language.IQuery;
import com.metamatrix.connector.language.ISelect;
import com.metamatrix.dqp.internal.datamgr.impl.FakeExecutionContextImpl;
Modified:
trunk/test-integration/src/test/java/com/metamatrix/data/metadata/runtime/MockConnector.java
===================================================================
---
trunk/test-integration/src/test/java/com/metamatrix/data/metadata/runtime/MockConnector.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/test-integration/src/test/java/com/metamatrix/data/metadata/runtime/MockConnector.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -10,12 +10,12 @@
import com.metamatrix.connector.api.Connector;
import com.metamatrix.connector.api.ConnectorCapabilities;
import com.metamatrix.connector.api.ConnectorEnvironment;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.ExecutionContext;
import com.metamatrix.connector.api.ProcedureExecution;
import com.metamatrix.connector.api.ResultSetExecution;
import com.metamatrix.connector.basic.BasicConnection;
import com.metamatrix.connector.basic.BasicConnectorCapabilities;
-import com.metamatrix.connector.exception.ConnectorException;
import com.metamatrix.connector.language.IElement;
import com.metamatrix.connector.language.IGroup;
import com.metamatrix.connector.language.IProcedure;
Modified:
trunk/test-integration/src/test/java/com/metamatrix/data/metadata/runtime/TestMetadataInConnector.java
===================================================================
---
trunk/test-integration/src/test/java/com/metamatrix/data/metadata/runtime/TestMetadataInConnector.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/test-integration/src/test/java/com/metamatrix/data/metadata/runtime/TestMetadataInConnector.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -1,6 +1,6 @@
package com.metamatrix.data.metadata.runtime;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.core.util.UnitTestUtil;
import com.metamatrix.jdbc.api.AbstractMMQueryTestCase;
Modified:
trunk/test-integration/src/test/java/com/metamatrix/data/metadata/runtime/TestParams.java
===================================================================
---
trunk/test-integration/src/test/java/com/metamatrix/data/metadata/runtime/TestParams.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/test-integration/src/test/java/com/metamatrix/data/metadata/runtime/TestParams.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -31,6 +31,7 @@
import com.metamatrix.cdk.api.TranslationUtility;
import com.metamatrix.connector.language.IParameter;
import com.metamatrix.connector.language.IProcedure;
+import com.metamatrix.connector.language.IParameter.Direction;
import com.metamatrix.connector.metadata.runtime.MetadataID;
import com.metamatrix.connector.metadata.runtime.Parameter;
import com.metamatrix.connector.metadata.runtime.TypeModel;
@@ -77,7 +78,7 @@
String name,
String fullName,
int index,
- int direction,
+ Direction direction,
String nameInSource,
String defaultValue,
int nullability,
@@ -121,7 +122,7 @@
"in1",
"sptest.proc1.in1",
1,
- IParameter.IN,
+ Direction.IN,
null,
"sample default",
TypeModel.NOT_NULLABLE,
@@ -138,7 +139,7 @@
"in2",
"sptest.proc1.in2",
2,
- IParameter.IN,
+ Direction.IN,
null,
"15",
TypeModel.NULLABLE,
@@ -155,7 +156,7 @@
"in3",
"sptest.proc1.in3",
3,
- IParameter.IN,
+ Direction.IN,
null,
"2003-04-23 09:30:00",
TypeModel.NULLABLE_UNKNOWN,
@@ -172,7 +173,7 @@
"inOptional",
"sptest.proc1.inOptional",
4,
- IParameter.IN,
+ Direction.IN,
"optionalName",
null,
TypeModel.NULLABLE,
Modified:
trunk/test-integration/src/test/java/com/metamatrix/data/visitor/util/TestCollectorVisitor.java
===================================================================
---
trunk/test-integration/src/test/java/com/metamatrix/data/visitor/util/TestCollectorVisitor.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/test-integration/src/test/java/com/metamatrix/data/visitor/util/TestCollectorVisitor.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -25,6 +25,7 @@
import java.util.*;
import com.metamatrix.connector.language.*;
+import com.metamatrix.connector.language.ICompareCriteria.Operator;
import com.metamatrix.connector.visitor.util.CollectorVisitor;
import com.metamatrix.dqp.internal.datamgr.language.*;
@@ -115,7 +116,7 @@
GroupImpl g1 = new GroupImpl("g1", null, null); //$NON-NLS-1$
ElementImpl e1 = new ElementImpl(g1, "e1", null, String.class);
//$NON-NLS-1$
ElementImpl e2 = new ElementImpl(g1, "e2", null, String.class);
//$NON-NLS-1$
- CompareCriteriaImpl cc = new CompareCriteriaImpl(e1, e2, ICompareCriteria.EQ);
+ CompareCriteriaImpl cc = new CompareCriteriaImpl(e1, e2, Operator.EQ);
helpTestElementsUsedByGroups(cc, new String[] {"g1.e1",
"g1.e2"}, new String[] {"g1"}); //$NON-NLS-1$ //$NON-NLS-2$
//$NON-NLS-3$
}
Modified: trunk/txn-jbossts/src/test/java/com/metamatrix/xa/arjuna/FakeXAConnection.java
===================================================================
---
trunk/txn-jbossts/src/test/java/com/metamatrix/xa/arjuna/FakeXAConnection.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/txn-jbossts/src/test/java/com/metamatrix/xa/arjuna/FakeXAConnection.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -25,14 +25,15 @@
import javax.transaction.xa.XAResource;
import com.metamatrix.connector.api.ConnectorCapabilities;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.connector.api.Execution;
import com.metamatrix.connector.api.ExecutionContext;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.basic.BasicConnection;
import com.metamatrix.connector.language.ICommand;
import com.metamatrix.connector.metadata.runtime.RuntimeMetadata;
import com.metamatrix.connector.xa.api.XAConnection;
-class FakeXAConnection implements XAConnection {
+class FakeXAConnection extends BasicConnection implements XAConnection {
String name;
boolean released = false;
boolean failToCreateXAResource = false;
Modified:
trunk/txn-jbossts/src/test/java/com/metamatrix/xa/arjuna/TestArjunaRecovery.java
===================================================================
---
trunk/txn-jbossts/src/test/java/com/metamatrix/xa/arjuna/TestArjunaRecovery.java 2009-02-16
18:56:03 UTC (rev 473)
+++
trunk/txn-jbossts/src/test/java/com/metamatrix/xa/arjuna/TestArjunaRecovery.java 2009-02-16
21:35:21 UTC (rev 474)
@@ -35,7 +35,7 @@
import com.arjuna.ats.arjuna.common.Configuration;
import com.arjuna.ats.arjuna.recovery.RecoveryConfiguration;
import com.metamatrix.common.xa.MMXid;
-import com.metamatrix.connector.exception.ConnectorException;
+import com.metamatrix.connector.api.ConnectorException;
import com.metamatrix.dqp.internal.transaction.TransactionProvider;
import com.metamatrix.dqp.service.TransactionService;