teiid SVN: r2603 - in trunk: adminshell and 140 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2010-09-24 14:51:07 -0400 (Fri, 24 Sep 2010)
New Revision: 2603
Added:
trunk/build/kits/jboss-container/teiid-examples/simpleclient/JDBCClient.class
trunk/client/src/test/java/org/teiid/net/TestTeiidURL.java
trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/ModeShapeSQLVisitor.java
trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/ModeShapeUtil.java
trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/PathFunctionModifier.java
trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/
trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/Cast.java
trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/IsChildNode.java
trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/IsSameNode.java
trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/Name.java
trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/Path.java
trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/modeshape/TestPathFunctionModifier.java
trunk/console/src/main/java/org/teiid/rhq/plugin/DataRoleComponent.java
trunk/console/src/main/java/org/teiid/rhq/plugin/DataRoleDiscoveryComponent.java
trunk/runtime/src/main/java/org/teiid/deployers/VDBLifeCycleListener.java
trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testVDBResources.expected
Removed:
trunk/build/assembly/bin.xml
trunk/build/kits/jboss-container/teiid-examples/simpleclient/JDBCClient.class
trunk/client/src/main/java/org/teiid/net/NetPlugin.java
trunk/client/src/main/resources/org/teiid/net/i18n.properties
trunk/client/src/test/java/org/teiid/net/TestMMURL.java
trunk/common-core/src/main/java/org/teiid/core/ErrorMessageKeys.java
trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/Cast.java
trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/IsChildNode.java
trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/IsSameNode.java
trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/Name.java
trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/Path.java
trunk/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/Messages.java
trunk/engine/src/main/java/org/teiid/dqp/DQPPlugin.java
trunk/engine/src/main/java/org/teiid/query/execution/QueryExecPlugin.java
trunk/engine/src/main/java/org/teiid/query/util/ErrorMessageKeys.java
trunk/engine/src/main/resources/org/teiid/dqp/i18n.properties
trunk/engine/src/main/resources/org/teiid/query/execution/i18n.properties
Modified:
trunk/adminshell/pom.xml
trunk/adminshell/src/main/java/org/teiid/adminshell/AdminShell.java
trunk/api/pom.xml
trunk/api/src/main/java/org/teiid/resource/spi/BasicManagedConnection.java
trunk/api/src/main/java/org/teiid/resource/spi/BasicManagedConnectionFactory.java
trunk/api/src/main/java/org/teiid/resource/spi/ConnectionRequestInfoWrapper.java
trunk/api/src/main/java/org/teiid/resource/spi/WrappedConnection.java
trunk/api/src/main/java/org/teiid/resource/spi/WrappedConnectionFactory.java
trunk/api/src/main/java/org/teiid/translator/ExecutionContext.java
trunk/api/src/main/java/org/teiid/translator/ExecutionFactory.java
trunk/api/src/main/java/org/teiid/translator/TranslatorException.java
trunk/api/src/main/resources/org/teiid/connector/i18n.properties
trunk/build/assembly/adminshell/adminshell-dist.xml
trunk/build/assembly/client-jar.xml
trunk/build/assembly/docs.xml
trunk/build/assembly/jboss-container/dist.xml
trunk/build/assembly/src.xml
trunk/build/kits/adminshell/connection.properties
trunk/build/kits/jboss-container/conf/jboss-teiid-log4j.xml
trunk/build/kits/jboss-container/conf/props/teiid-security-roles.properties
trunk/build/kits/jboss-container/deploy/teiid/teiid-jboss-beans.xml
trunk/build/kits/jboss-container/teiid-examples/jca/ldap-ds.xml
trunk/build/kits/jboss-container/teiid-releasenotes.html
trunk/build/pom.xml
trunk/cache-jbosscache/pom.xml
trunk/cache-jbosscache/src/main/java/org/teiid/cache/jboss/ClusterableCacheFactory.java
trunk/cache-jbosscache/src/main/java/org/teiid/cache/jboss/JBossCache.java
trunk/cache-jbosscache/src/main/java/org/teiid/cache/jboss/JBossCacheFactory.java
trunk/client/pom.xml
trunk/client/src/main/java/org/teiid/adminapi/Admin.java
trunk/client/src/main/java/org/teiid/adminapi/AdminFactory.java
trunk/client/src/main/java/org/teiid/adminapi/impl/ListOverMap.java
trunk/client/src/main/java/org/teiid/adminapi/impl/PermissionMap.java
trunk/client/src/main/java/org/teiid/adminapi/impl/SourceMappingMetadata.java
trunk/client/src/main/java/org/teiid/adminapi/impl/VDBMetaData.java
trunk/client/src/main/java/org/teiid/client/BatchSerializer.java
trunk/client/src/main/java/org/teiid/client/RequestMessage.java
trunk/client/src/main/java/org/teiid/client/lob/StreamingLobChunckProducer.java
trunk/client/src/main/java/org/teiid/jdbc/ConnectionImpl.java
trunk/client/src/main/java/org/teiid/jdbc/SocketProfile.java
trunk/client/src/main/java/org/teiid/jdbc/StatementImpl.java
trunk/client/src/main/java/org/teiid/jdbc/TeiidDataSource.java
trunk/client/src/main/java/org/teiid/net/TeiidURL.java
trunk/client/src/main/java/org/teiid/net/socket/SocketServerConnection.java
trunk/client/src/main/java/org/teiid/net/socket/SocketServerInstanceImpl.java
trunk/client/src/main/java/org/teiid/net/socket/SocketUtil.java
trunk/client/src/main/resources/org/teiid/jdbc/i18n.properties
trunk/client/src/main/resources/teiid-client-settings.properties
trunk/client/src/test/java/org/teiid/jdbc/TestSocketProfile.java
trunk/client/src/test/java/org/teiid/jdbc/TestStatement.java
trunk/client/src/test/java/org/teiid/jdbc/TestTeiidDataSource.java
trunk/client/src/test/java/org/teiid/jdbc/util/ResultSetUtil.java
trunk/common-core/pom.xml
trunk/common-core/src/main/java/org/teiid/core/CoreConstants.java
trunk/common-core/src/main/java/org/teiid/core/TeiidRuntimeException.java
trunk/common-core/src/main/java/org/teiid/core/crypto/BasicCryptor.java
trunk/common-core/src/main/java/org/teiid/core/types/DataTypeManager.java
trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToBigDecimalTransform.java
trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToBigIntegerTransform.java
trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToByteTransform.java
trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToDateTransform.java
trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToDoubleTransform.java
trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToFloatTransform.java
trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToIntegerTransform.java
trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToLongTransform.java
trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToShortTransform.java
trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToTimeTransform.java
trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToTimestampTransform.java
trunk/common-core/src/main/java/org/teiid/core/util/StringUtil.java
trunk/common-core/src/main/resources/org/teiid/core/i18n.properties
trunk/common-core/src/test/java/org/teiid/core/util/TestStringUtil.java
trunk/connectors/connector-file/src/main/java/org/teiid/resource/adapter/file/FileManagedConnectionFactory.java
trunk/connectors/connector-ldap/src/main/resources/org/teiid/resource/adapter/ldap/i18n.properties
trunk/connectors/connector-salesforce/src/main/java/org/teiid/resource/adapter/salesforce/SalesForceManagedConnectionFactory.java
trunk/connectors/connector-salesforce/src/main/java/org/teiid/resource/adapter/salesforce/SalesforceConnectionImpl.java
trunk/connectors/pom.xml
trunk/connectors/sandbox/translator-yahoo/src/main/resources/org/teiid/translator/yahoo/i18n.properties
trunk/connectors/translator-file/src/main/java/org/teiid/translator/file/FileExecutionFactory.java
trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCExecutionException.java
trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/ModeShapeExecutionFactory.java
trunk/connectors/translator-jdbc/src/main/resources/org/teiid/translator/jdbc/i18n.properties
trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/modeshape/TestModeShapeSqlTranslator.java
trunk/connectors/translator-jdbc/src/test/resources/ModeShape.vdb
trunk/connectors/translator-ldap/src/main/resources/org/teiid/translator/ldap/i18n.properties
trunk/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/Util.java
trunk/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/execution/QueryExecutionImpl.java
trunk/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/execution/visitors/CriteriaVisitor.java
trunk/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/execution/visitors/SelectVisitor.java
trunk/connectors/translator-salesforce/src/main/resources/org/teiid/translator/salesforce/i18n.properties
trunk/connectors/translator-ws/src/main/java/org/teiid/translator/ws/WSExecutionFactory.java
trunk/console/pom.xml
trunk/console/src/main/java/org/teiid/rhq/plugin/Facet.java
trunk/console/src/main/java/org/teiid/rhq/plugin/util/PluginConstants.java
trunk/console/src/main/resources/META-INF/rhq-plugin.xml
trunk/documentation/admin-guide/src/main/docbook/en-US/admin_guide.xml
trunk/documentation/admin-guide/src/main/docbook/en-US/content/adminshell.xml
trunk/documentation/admin-guide/src/main/docbook/en-US/content/appendix-b.xml
trunk/documentation/admin-guide/src/main/docbook/en-US/content/clustering.xml
trunk/documentation/admin-guide/src/main/docbook/en-US/content/performance.xml
trunk/documentation/admin-guide/src/main/docbook/en-US/content/security.xml
trunk/documentation/admin-guide/src/main/docbook/en-US/content/vdb-deployment.xml
trunk/documentation/caching-guide/src/main/docbook/en-US/content/matviews.xml
trunk/documentation/client-developers-guide/src/main/docbook/en-US/content/jdbc-connection.xml
trunk/documentation/client-developers-guide/src/main/docbook/en-US/content/jdbc-extensions.xml
trunk/documentation/client-developers-guide/src/main/docbook/en-US/content/ssl.xml
trunk/documentation/developer-guide/src/main/docbook/en-US/content/translator-api.xml
trunk/documentation/pom.xml
trunk/documentation/reference/src/main/docbook/en-US/content/dataroles.xml
trunk/documentation/reference/src/main/docbook/en-US/content/federated_planning.xml
trunk/documentation/reference/src/main/docbook/en-US/content/scalar_functions.xml
trunk/documentation/reference/src/main/docbook/en-US/content/system_schema.xml
trunk/documentation/reference/src/main/docbook/en-US/content/transaction_support.xml
trunk/documentation/reference/src/main/docbook/en-US/content/translators.xml
trunk/engine/pom.xml
trunk/engine/src/main/java/org/teiid/cache/Cache.java
trunk/engine/src/main/java/org/teiid/cache/CacheFactory.java
trunk/engine/src/main/java/org/teiid/cache/DefaultCache.java
trunk/engine/src/main/java/org/teiid/cache/DefaultCacheFactory.java
trunk/engine/src/main/java/org/teiid/common/buffer/LobManager.java
trunk/engine/src/main/java/org/teiid/common/buffer/TupleBuffer.java
trunk/engine/src/main/java/org/teiid/common/buffer/impl/BufferManagerImpl.java
trunk/engine/src/main/java/org/teiid/common/buffer/impl/FileStorageManager.java
trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/ConnectorManager.java
trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/ConnectorWorkItem.java
trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/ProcedureBatchHandler.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/AuthorizationValidationVisitor.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/CachedFinder.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/CachedResults.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPWorkContext.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/DataTierManagerImpl.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/DataTierTupleSource.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/LobWorkItem.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/PreparedStatementRequest.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/Request.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/SessionAwareCache.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/TransactionServerImpl.java
trunk/engine/src/main/java/org/teiid/dqp/message/AtomicResultsMessage.java
trunk/engine/src/main/java/org/teiid/query/eval/Evaluator.java
trunk/engine/src/main/java/org/teiid/query/function/FunctionDescriptor.java
trunk/engine/src/main/java/org/teiid/query/function/FunctionMethods.java
trunk/engine/src/main/java/org/teiid/query/function/FunctionTree.java
trunk/engine/src/main/java/org/teiid/query/function/SystemFunctionManager.java
trunk/engine/src/main/java/org/teiid/query/function/aggregate/Avg.java
trunk/engine/src/main/java/org/teiid/query/function/aggregate/Max.java
trunk/engine/src/main/java/org/teiid/query/function/aggregate/Min.java
trunk/engine/src/main/java/org/teiid/query/function/metadata/FunctionMetadataValidator.java
trunk/engine/src/main/java/org/teiid/query/mapping/xml/MappingNode.java
trunk/engine/src/main/java/org/teiid/query/mapping/xml/MappingOutputter.java
trunk/engine/src/main/java/org/teiid/query/metadata/TransformationMetadata.java
trunk/engine/src/main/java/org/teiid/query/optimizer/BatchedUpdatePlanner.java
trunk/engine/src/main/java/org/teiid/query/optimizer/ProcedurePlanner.java
trunk/engine/src/main/java/org/teiid/query/optimizer/relational/PlanToProcessConverter.java
trunk/engine/src/main/java/org/teiid/query/optimizer/relational/RelationalPlanner.java
trunk/engine/src/main/java/org/teiid/query/optimizer/relational/plantree/PlanNode.java
trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/CriteriaCapabilityValidatorVisitor.java
trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/FrameUtil.java
trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/JoinRegion.java
trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/NewCalculateCostUtil.java
trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleAccessPatternValidation.java
trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleImplementJoinStrategy.java
trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePlanJoins.java
trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePlanProcedures.java
trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePushAggregates.java
trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePushSelectCriteria.java
trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleRaiseAccess.java
trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleValidateWhereAll.java
trunk/engine/src/main/java/org/teiid/query/optimizer/xml/CriteriaPlanner.java
trunk/engine/src/main/java/org/teiid/query/optimizer/xml/QueryUtil.java
trunk/engine/src/main/java/org/teiid/query/optimizer/xml/XMLNodeMappingVisitor.java
trunk/engine/src/main/java/org/teiid/query/optimizer/xml/XMLPlanner.java
trunk/engine/src/main/java/org/teiid/query/optimizer/xml/XMLQueryPlanner.java
trunk/engine/src/main/java/org/teiid/query/processor/QueryProcessor.java
trunk/engine/src/main/java/org/teiid/query/processor/proc/ExecDynamicSqlInstruction.java
trunk/engine/src/main/java/org/teiid/query/processor/proc/ProcedurePlan.java
trunk/engine/src/main/java/org/teiid/query/processor/relational/AccessNode.java
trunk/engine/src/main/java/org/teiid/query/processor/relational/BatchedUpdateNode.java
trunk/engine/src/main/java/org/teiid/query/processor/relational/ProjectNode.java
trunk/engine/src/main/java/org/teiid/query/processor/relational/TextTableNode.java
trunk/engine/src/main/java/org/teiid/query/processor/relational/XMLTableNode.java
trunk/engine/src/main/java/org/teiid/query/processor/xml/AbortProcessingInstruction.java
trunk/engine/src/main/java/org/teiid/query/processor/xml/AddNodeInstruction.java
trunk/engine/src/main/java/org/teiid/query/processor/xml/MoveDocInstruction.java
trunk/engine/src/main/java/org/teiid/query/processor/xml/NodeDescriptor.java
trunk/engine/src/main/java/org/teiid/query/processor/xml/RecurseProgramCondition.java
trunk/engine/src/main/java/org/teiid/query/processor/xml/RelationalPlanExecutor.java
trunk/engine/src/main/java/org/teiid/query/processor/xml/XMLContext.java
trunk/engine/src/main/java/org/teiid/query/processor/xml/XMLPlan.java
trunk/engine/src/main/java/org/teiid/query/report/ActivityReport.java
trunk/engine/src/main/java/org/teiid/query/resolver/ProcedureContainerResolver.java
trunk/engine/src/main/java/org/teiid/query/resolver/command/ExecResolver.java
trunk/engine/src/main/java/org/teiid/query/resolver/command/InsertResolver.java
trunk/engine/src/main/java/org/teiid/query/resolver/command/SetQueryResolver.java
trunk/engine/src/main/java/org/teiid/query/resolver/command/SimpleQueryResolver.java
trunk/engine/src/main/java/org/teiid/query/resolver/command/UpdateProcedureResolver.java
trunk/engine/src/main/java/org/teiid/query/resolver/command/XMLQueryResolver.java
trunk/engine/src/main/java/org/teiid/query/resolver/util/BindVariableVisitor.java
trunk/engine/src/main/java/org/teiid/query/resolver/util/ResolverUtil.java
trunk/engine/src/main/java/org/teiid/query/resolver/util/ResolverVisitor.java
trunk/engine/src/main/java/org/teiid/query/rewriter/QueryRewriter.java
trunk/engine/src/main/java/org/teiid/query/sql/lang/AbstractCompareCriteria.java
trunk/engine/src/main/java/org/teiid/query/sql/lang/CompoundCriteria.java
trunk/engine/src/main/java/org/teiid/query/sql/lang/GroupBy.java
trunk/engine/src/main/java/org/teiid/query/sql/lang/SPParameter.java
trunk/engine/src/main/java/org/teiid/query/sql/lang/StoredProcedure.java
trunk/engine/src/main/java/org/teiid/query/sql/symbol/AliasSymbol.java
trunk/engine/src/main/java/org/teiid/query/sql/symbol/CaseExpression.java
trunk/engine/src/main/java/org/teiid/query/sql/symbol/Constant.java
trunk/engine/src/main/java/org/teiid/query/sql/symbol/GroupSymbol.java
trunk/engine/src/main/java/org/teiid/query/sql/symbol/SearchedCaseExpression.java
trunk/engine/src/main/java/org/teiid/query/sql/symbol/Symbol.java
trunk/engine/src/main/java/org/teiid/query/sql/util/UpdateProcedureGenerator.java
trunk/engine/src/main/java/org/teiid/query/sql/util/VariableContext.java
trunk/engine/src/main/java/org/teiid/query/sql/visitor/ElementCollectorVisitor.java
trunk/engine/src/main/java/org/teiid/query/sql/visitor/FunctionCollectorVisitor.java
trunk/engine/src/main/java/org/teiid/query/sql/visitor/GroupCollectorVisitor.java
trunk/engine/src/main/java/org/teiid/query/tempdata/TempTableDataManager.java
trunk/engine/src/main/java/org/teiid/query/tempdata/TempTableStore.java
trunk/engine/src/main/java/org/teiid/query/util/CommandContext.java
trunk/engine/src/main/java/org/teiid/query/validator/AggregateValidationVisitor.java
trunk/engine/src/main/java/org/teiid/query/validator/UpdateValidationVisitor.java
trunk/engine/src/main/java/org/teiid/query/validator/ValidationVisitor.java
trunk/engine/src/main/java/org/teiid/query/validator/ValidatorReport.java
trunk/engine/src/main/resources/org/teiid/query/i18n.properties
trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestDQPWorkContext.java
trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestSessionAwareCache.java
trunk/engine/src/test/java/org/teiid/query/optimizer/relational/rules/TestCalculateCostUtil.java
trunk/engine/src/test/java/org/teiid/query/optimizer/relational/rules/TestCriteriaCapabilityValidatorVisitor.java
trunk/engine/src/test/java/org/teiid/query/optimizer/relational/rules/TestRuleChooseDependent.java
trunk/engine/src/test/java/org/teiid/query/processor/TestMaterialization.java
trunk/engine/src/test/java/org/teiid/query/processor/TestProcessor.java
trunk/engine/src/test/java/org/teiid/query/processor/TestTempTables.java
trunk/engine/src/test/java/org/teiid/query/resolver/TestResolver.java
trunk/engine/src/test/java/org/teiid/query/rewriter/TestQueryRewriter.java
trunk/hibernate-dialect/pom.xml
trunk/jboss-integration/pom.xml
trunk/jboss-integration/src/main/java/org/teiid/adminapi/jboss/Admin.java
trunk/jboss-integration/src/main/java/org/teiid/adminapi/jboss/ManagedUtil.java
trunk/jboss-integration/src/main/java/org/teiid/jboss/deployers/RuntimeEngineDeployer.java
trunk/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties
trunk/metadata/pom.xml
trunk/metadata/src/main/java/org/teiid/metadata/index/IndexMetadataFactory.java
trunk/metadata/src/main/resources/System.vdb
trunk/metadata/src/main/resources/org/teiid/metadata/i18n.properties
trunk/pom.xml
trunk/runtime/pom.xml
trunk/runtime/src/main/java/org/teiid/deployers/VDBDeployer.java
trunk/runtime/src/main/java/org/teiid/deployers/VDBParserDeployer.java
trunk/runtime/src/main/java/org/teiid/deployers/VDBRepository.java
trunk/runtime/src/main/java/org/teiid/odbc/ODBCServerRemoteImpl.java
trunk/runtime/src/main/java/org/teiid/services/BufferServiceImpl.java
trunk/runtime/src/main/java/org/teiid/transport/LocalServerConnection.java
trunk/runtime/src/main/java/org/teiid/transport/PgBackendProtocol.java
trunk/runtime/src/main/java/org/teiid/transport/SSLAwareChannelHandler.java
trunk/runtime/src/main/java/org/teiid/transport/SSLConfiguration.java
trunk/runtime/src/main/java/org/teiid/transport/SocketClientInstance.java
trunk/runtime/src/main/resources/org/teiid/runtime/i18n.properties
trunk/runtime/src/test/java/org/teiid/dqp/service/buffer/TestLocalBufferService.java
trunk/runtime/src/test/java/org/teiid/transport/TestCommSockets.java
trunk/test-integration/common/src/test/java/org/teiid/jdbc/FakeServer.java
trunk/test-integration/common/src/test/java/org/teiid/jdbc/TestMMDatabaseMetaData.java
trunk/test-integration/common/src/test/java/org/teiid/systemmodel/TestMatViews.java
trunk/test-integration/common/src/test/java/org/teiid/systemmodel/TestSystemVirtualModel.java
trunk/test-integration/common/src/test/resources/TestCase3473/testGetTables.expected
trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetColumns.expected
trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetProcedureColumns.expected
trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetProcedures.expected
trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetProceduresWithEscape.expected
trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetSchemas.expected
trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetTables.expected
trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetTables_allTables.expected
trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetTables_specificTableMultipleTypes.expected
trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetTables_specificTableTypes.expected
trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_ATTRIBUTE.expected
trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_CLASS.expected
trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_INDEX.expected
trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_NAMESPACE.expected
trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_PROC.expected
trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_TYPE.expected
trunk/test-integration/common/src/test/resources/TestPartsDatabaseMetadata/testColumns.expected
trunk/test-integration/common/src/test/resources/TestPartsDatabaseMetadata/testProcedureColumns.expected
trunk/test-integration/common/src/test/resources/TestPartsDatabaseMetadata/testProcedures.expected
trunk/test-integration/common/src/test/resources/TestPartsDatabaseMetadata/testSchemas.expected
trunk/test-integration/common/src/test/resources/TestPartsDatabaseMetadata/testTables.expected
trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testColumns.expected
trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testProcedureParams.expected
trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testProcedures.expected
trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testSchemas.expected
trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testTableIsSystem.expected
trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testTables.expected
trunk/test-integration/db/pom.xml
trunk/test-integration/db/src/test/java/org/teiid/test/testcases/CommonTransactionTests.java
trunk/test-integration/pom.xml
Log:
forward merging 7.1.1
Modified: trunk/adminshell/pom.xml
===================================================================
--- trunk/adminshell/pom.xml 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/adminshell/pom.xml 2010-09-24 18:51:07 UTC (rev 2603)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
- <artifactId>teiid</artifactId>
+ <artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
<version>7.2.0.Alpha2-SNAPSHOT</version>
</parent>
Modified: trunk/adminshell/src/main/java/org/teiid/adminshell/AdminShell.java
===================================================================
--- trunk/adminshell/src/main/java/org/teiid/adminshell/AdminShell.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/adminshell/src/main/java/org/teiid/adminshell/AdminShell.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -108,12 +108,12 @@
p = props;
}
- @Doc(text = "Adds a role to the specified policy")
+ @Doc(text = "Adds a mapped role to the specified data role")
public static void addDataRoleMapping(
@Doc(text = "vdb name") String vdbName,
@Doc(text = "vdb version") int vdbVersion,
- @Doc(text = "policy name") String policyName,
- @Doc(text = "role") String role) throws AdminException {
+ @Doc(text = "dataRole name") String policyName,
+ @Doc(text = "mapped role name") String role) throws AdminException {
getAdmin().addDataRoleMapping(vdbName, vdbVersion, policyName, role);
}
@@ -237,16 +237,25 @@
return getAdmin().getCacheStats(identifier);
}
- @Doc(text = "Remove a role for the data policy")
+ @Doc(text = "Remove a mapped role for the data role")
public static void removeDataRoleMapping(
@Doc(text = "vdb name") String vdbName,
@Doc(text = "vdb version") int vdbVersion,
- @Doc(text = "policy name") String policyName,
- @Doc(text = "role name") String role) throws AdminException {
+ @Doc(text = "dataRole name") String policyName,
+ @Doc(text = "mapped role name") String role) throws AdminException {
getAdmin()
.removeDataRoleMapping(vdbName, vdbVersion, policyName, role);
}
+ @Doc(text = "Set the any authenticated flag for the data role")
+ public static void setAnyAuthenticatedForDataRole(
+ @Doc(text = "vdb name")String vdbName,
+ @Doc(text = "vdb version")int vdbVersion,
+ @Doc(text = "dataRole name")String dataRole,
+ @Doc(text = "any authenticated") boolean anyAuthenticated) throws AdminException {
+ getAdmin().setAnyAuthenticatedForDataRole(vdbName, vdbVersion, dataRole, anyAuthenticated);
+ }
+
@Doc(text = "Set a runtime property")
public static void setRuntimeProperty(
@Doc(text = "name") String propertyName,
Modified: trunk/api/pom.xml
===================================================================
--- trunk/api/pom.xml 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/api/pom.xml 2010-09-24 18:51:07 UTC (rev 2603)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
- <artifactId>teiid</artifactId>
+ <artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
<version>7.2.0.Alpha2-SNAPSHOT</version>
</parent>
Modified: trunk/api/src/main/java/org/teiid/resource/spi/BasicManagedConnection.java
===================================================================
--- trunk/api/src/main/java/org/teiid/resource/spi/BasicManagedConnection.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/api/src/main/java/org/teiid/resource/spi/BasicManagedConnection.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -88,9 +88,6 @@
@Override
public Object getConnection(Subject arg0, ConnectionRequestInfo arg1) throws ResourceException {
- if(!(arg1 instanceof ConnectionRequestInfoWrapper)) {
- throw new ResourceException("Un-recognized Connection Request Info object received"); //$NON-NLS-1$
- }
ConnectionContext.setSubject(arg0);
WrappedConnection wc = new WrappedConnection(this);
Modified: trunk/api/src/main/java/org/teiid/resource/spi/BasicManagedConnectionFactory.java
===================================================================
--- trunk/api/src/main/java/org/teiid/resource/spi/BasicManagedConnectionFactory.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/api/src/main/java/org/teiid/resource/spi/BasicManagedConnectionFactory.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -37,6 +37,7 @@
import javax.security.auth.Subject;
import org.teiid.core.TeiidException;
+import org.teiid.core.util.Assertion;
import org.teiid.core.util.ReflectionHelper;
@@ -45,20 +46,29 @@
private static final long serialVersionUID = -7302713800883776790L;
private PrintWriter log;
private BasicResourceAdapter ra;
+ private BasicConnectionFactory cf;
@Override
- public abstract Object createConnectionFactory() throws ResourceException;
+ public abstract BasicConnectionFactory createConnectionFactory() throws ResourceException;
@Override
- public Object createConnectionFactory(ConnectionManager arg0) throws ResourceException {
- return createConnectionFactory();
+ public Object createConnectionFactory(ConnectionManager cm) throws ResourceException {
+ this.cf = createConnectionFactory();
+ return new WrappedConnectionFactory(this.cf, cm, this);
}
@Override
public ManagedConnection createManagedConnection(Subject arg0, ConnectionRequestInfo arg1) throws ResourceException {
- ConnectionRequestInfoWrapper criw = (ConnectionRequestInfoWrapper)arg1;
+ Assertion.isNotNull(this.cf);
ConnectionContext.setSubject(arg0);
- BasicConnection connection = criw.cf.getConnection();
+
+ BasicConnection connection = null;
+ if (arg1 instanceof ConnectionRequestInfoWrapper) {
+ connection = this.cf.getConnection(((ConnectionRequestInfoWrapper)arg1).cs);
+ }
+ else {
+ connection = this.cf.getConnection();
+ }
ConnectionContext.setSubject(null);
return new BasicManagedConnection(connection);
}
Modified: trunk/api/src/main/java/org/teiid/resource/spi/ConnectionRequestInfoWrapper.java
===================================================================
--- trunk/api/src/main/java/org/teiid/resource/spi/ConnectionRequestInfoWrapper.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/api/src/main/java/org/teiid/resource/spi/ConnectionRequestInfoWrapper.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -21,12 +21,13 @@
*/
package org.teiid.resource.spi;
+import javax.resource.cci.ConnectionSpec;
import javax.resource.spi.ConnectionRequestInfo;
class ConnectionRequestInfoWrapper implements ConnectionRequestInfo {
- BasicConnectionFactory cf;
+ ConnectionSpec cs;
- public ConnectionRequestInfoWrapper(BasicConnectionFactory cf) {
- this.cf = cf;
+ public ConnectionRequestInfoWrapper(ConnectionSpec cs) {
+ this.cs = cs;
}
}
Modified: trunk/api/src/main/java/org/teiid/resource/spi/WrappedConnection.java
===================================================================
--- trunk/api/src/main/java/org/teiid/resource/spi/WrappedConnection.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/api/src/main/java/org/teiid/resource/spi/WrappedConnection.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -69,5 +69,9 @@
public ResultSetInfo getResultSetInfo() throws ResourceException {
return this.mc.getConnection().getResultSetInfo();
}
+
+ public Connection unwrap() throws ResourceException {
+ return this.mc.getConnection();
+ }
}
Modified: trunk/api/src/main/java/org/teiid/resource/spi/WrappedConnectionFactory.java
===================================================================
--- trunk/api/src/main/java/org/teiid/resource/spi/WrappedConnectionFactory.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/api/src/main/java/org/teiid/resource/spi/WrappedConnectionFactory.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -50,7 +50,7 @@
@Override
public Connection getConnection() throws ResourceException {
- return (Connection)cm.allocateConnection(mcf, new ConnectionRequestInfoWrapper(this.delegate));
+ return (Connection)cm.allocateConnection(mcf, null);
}
@@ -66,7 +66,7 @@
@Override
public Connection getConnection(ConnectionSpec arg0) throws ResourceException {
- return getConnection();
+ return (Connection)cm.allocateConnection(mcf, new ConnectionRequestInfoWrapper(arg0));
}
@Override
Modified: trunk/api/src/main/java/org/teiid/translator/ExecutionContext.java
===================================================================
--- trunk/api/src/main/java/org/teiid/translator/ExecutionContext.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/api/src/main/java/org/teiid/translator/ExecutionContext.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -109,8 +109,14 @@
/**
* When the execution is turned on with "alive=true", the execution object will not
* be implicitly closed at the end of the last batch. It will only be closed at end
- * of the user query. This is useful in keeping the connection open for
+ * of the user query.
+ * <p>
+ * The engine will already detect situations when the connection should stay open for
* LOB (clob/blob/xml) streaming.
+ * <p>
+ * Keeping the execution alive unnecessarily may cause issues with connection usage
+ * as the connection instance may not be usable by other queries.
+ *
* @param alive
*/
void keepExecutionAlive(boolean alive);
Modified: trunk/api/src/main/java/org/teiid/translator/ExecutionFactory.java
===================================================================
--- trunk/api/src/main/java/org/teiid/translator/ExecutionFactory.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/api/src/main/java/org/teiid/translator/ExecutionFactory.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -753,7 +753,7 @@
try {
if (className == null) {
if (defaultClass == null) {
- throw new TranslatorException("Neither class name or default class specified to create an instance"); //$NON-NLS-1$
+ throw new TranslatorException("Neither class name nor default class specified to create an instance"); //$NON-NLS-1$
}
return expectedType.cast(defaultClass.newInstance());
}
@@ -777,4 +777,12 @@
public void getMetadata(MetadataFactory metadataFactory, C conn) throws TranslatorException {
}
+
+ /**
+ * Indicates if LOBs are usable after the execution is closed.
+ * @return true if LOBs can be used after close
+ */
+ public boolean areLobsUsableAfterClose() {
+ return false;
+ }
}
Modified: trunk/api/src/main/java/org/teiid/translator/TranslatorException.java
===================================================================
--- trunk/api/src/main/java/org/teiid/translator/TranslatorException.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/api/src/main/java/org/teiid/translator/TranslatorException.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -49,13 +49,16 @@
}
public TranslatorException( String errorCode, String message ) {
- super( message, errorCode);
+ super( errorCode, message);
}
public TranslatorException( int errorCode, String message ) {
super(message, Integer.toString(errorCode));
- }
+ }
+ public TranslatorException(Throwable e, int errorCode, String message ) {
+ super(e, Integer.toString(errorCode), message);
+ }
/**
* Construct an instance from a message and an exception to chain to this one.
Modified: trunk/api/src/main/resources/org/teiid/connector/i18n.properties
===================================================================
--- trunk/api/src/main/resources/org/teiid/connector/i18n.properties 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/api/src/main/resources/org/teiid/connector/i18n.properties 2010-09-24 18:51:07 UTC (rev 2603)
@@ -20,52 +20,15 @@
# 02110-1301 USA.
#
-ConnectionPool.The_value__6=The value "{0}" is illegal for property "{1}".
-ConnectionPool.The_conn_value=The max connections property value must be greater than 0; {0} is invalid value.
-ConnectionPool.No_connection_pool_available._8=No connection pool is available.
-ConnectionPool.Timeout_while_waiting_to_obtain_connection_for__9=The connection pool for identity "{0}" is at the maximum connection count "{1}" and no connection became available in the timeout period. Consider increasing the number of connections allowed per identity or the wait time.
-ConnectionPool.Connection_pool_created_1=Connection pool created successfully
-ConnectionPool.Failed_close_a_connection__2=Failed to close a connection for {0}.
-ConnectionPool.Max_conn_reached=Connection pool reached maximum connection limit.
-ConnectionPool.Max_conn_per_id_reached=Connection pool reached maximum connection limit for an identifier pool.
-ConnectionPool.Shut_down=Shutting down connection pool: closing all connections.
-ConnectionPool.Removed_conn=Connection pool closed a connection for {0}.
-ConnectionPool.New_conn=Connection pool created a connection for {0}.
-ConnectionPool.ExceededConnections=The connection pool for identity "{0}" is at the maximum connection count "{1}" and no connection became available in the timeout period. Consider increasing the number of connections allowed per identity or the wait time.
-ConnectionPool.ExceededWait=The connection pool for identity "{0}" 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.
-ConnectionPool.Closed_conn=Connection pool closed a connection.
-ConnectionPool.Failed_close_conn=Failed to close a connection.
-ConnectionPool.Timeout_while_waiting_to_obtain_connection=Timeout while waiting to obtain a connection.
-CollectionVisitor.The_visitor_collection_must_contain_at_least_one_visitor._1=The visitor collection must contain at least one visitor.
-CollectionVisitor.All_the_objects_in_the_collection_must_be_LanguageObjectVisitors._2=All the objects in the collection must be LanguageObjectVisitors.
DelegatingHierarchyVisitor.The_pre-_and_post-processing_visitors_cannot_both_be_null._1=The pre- and post-processing visitors cannot both be null.
-CredentialMap.Null_input=Null credentials input string.
-CredentialMap.Empty_input=Empty credentials input string. Expected "(".
-CredentialMap.Missing_parens=Credentials input string must be enclosed in ()''s
-CredentialMap.Missing_system_prop=Credentials string must contain "system" property.
-BasicValueReference_error=Error occurred during creating the value chunk for the value reference object.
-BasicValueReference_walkbackerror=Walking the results backwards is not supported in this implementation of Value reference, Please provide a custom value reference implementation.
-JDBCTranslator.Retrieved_Blob_is_too_large_13=Retrieved Blob is too large, Blobs have a max size of {0} bytes.
-JDBCTranslator.Error_determining_blob_length___15=Error determining blob length: {0}
-JDBCTranslator.Retrieved_Clob_is_too_large__18=Retrieved Clob is too large, Clobs have a max size of {0}
-JDBCTranslator.Error_determining_clob_length___20=Error determining clob length: {0}
-ClobToStringTranslator.0=Unexpected value type in Clob to String translator: {0}
-JDBCTranslator.Unable_to_translate_data_value__11=Unable to translate data value from {0} to expected type {1}
-ValueTranslator.no_tranfrom_found=To Suitable transform found to convert {0} type value to {1}
-unknown_object_type_to_tranfrom_xml=Unknown object type supplied to transform into SQLXML.
-UserIdentityFactory.single_identity_not_supported=Single identity is not supported by the UserIdentityFactory. A context is required.
-UserIdentityFactory.extraction_error=Unable to extract credentials from command payload or trusted session payload for per-user connection.
-UserIdentityFactory.missing_credentials=Payload missing credentials for {0}
MetadataFactory.unknown_datatype=Unknown datatype {0}
MetadataFactory.no_column_found=No column found with name {0}
-MetadataFactory.duplicate_name="Non-uniquely named record detected ''{0}''
MetadataFactory.invalid_name=Invalid column name ''{0}'', cannot contain the . character.
-WrappedConnection.no_metadata=Connector is not capable of providing metadata. Extend connector with MetadataProvider interface
\ No newline at end of file
Modified: trunk/build/assembly/adminshell/adminshell-dist.xml
===================================================================
--- trunk/build/assembly/adminshell/adminshell-dist.xml 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/build/assembly/adminshell/adminshell-dist.xml 2010-09-24 18:51:07 UTC (rev 2603)
@@ -12,6 +12,7 @@
<moduleSets>
<moduleSet>
<includeSubModules>true</includeSubModules>
+ <useAllReactorProjects>true</useAllReactorProjects>
<includes>
<include>org.jboss.teiid:teiid-adminshell</include>
@@ -39,7 +40,7 @@
<fileSets>
<fileSet>
- <directory>build/target/kits/adminshell</directory>
+ <directory>target/kits/adminshell</directory>
<outputDirectory>/</outputDirectory>
<includes>
<include>**/*.sh</include>
@@ -48,7 +49,7 @@
</fileSet>
<fileSet>
- <directory>build/target/kits/adminshell</directory>
+ <directory>target/kits/adminshell</directory>
<outputDirectory>/</outputDirectory>
<excludes>
<exclude>**/*.sh</exclude>
@@ -57,7 +58,7 @@
</fileSet>
<fileSet>
- <directory>target/distribution</directory>
+ <directory>target</directory>
<includes>
<include>teiid-${version}-client.jar</include>
</includes>
@@ -69,9 +70,9 @@
<files>
<file>
- <source>target/distribution/teiid-${version}-docs/admin-guide/en-US/pdf/teiid_admin_guide.pdf</source>
+ <source>target/teiid-${version}-docs/admin-guide/en-US/pdf/teiid_admin_guide.pdf</source>
<fileMode>0644</fileMode>
</file>
</files>
-</assembly>
\ No newline at end of file
+</assembly>
Deleted: trunk/build/assembly/bin.xml
===================================================================
--- trunk/build/assembly/bin.xml 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/build/assembly/bin.xml 2010-09-24 18:51:07 UTC (rev 2603)
@@ -1,35 +0,0 @@
-<!--This script builds a JAR for a Teiid Embedded Server Installation -->
-<assembly>
-
- <id>bin</id>
-
- <formats>
- <format>zip</format>
- </formats>
-
- <includeBaseDirectory>false</includeBaseDirectory>
-
- <fileSets>
- <fileSet>
- <includes>
- <include>*.txt</include>
- </includes>
- <useDefaultExcludes>true</useDefaultExcludes>
- </fileSet>
- </fileSets>
-
- <moduleSets>
- <moduleSet>
- <includeSubModules>true</includeSubModules>
- <binaries>
- <includeDependencies>false</includeDependencies>
- <unpack>false</unpack>
- <outputDirectory></outputDirectory>
- <includes>
- <include>:jar:*</include>
- </includes>
- </binaries>
- </moduleSet>
- </moduleSets>
-
-</assembly>
\ No newline at end of file
Modified: trunk/build/assembly/client-jar.xml
===================================================================
--- trunk/build/assembly/client-jar.xml 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/build/assembly/client-jar.xml 2010-09-24 18:51:07 UTC (rev 2603)
@@ -13,7 +13,8 @@
<moduleSets>
<moduleSet>
<includeSubModules>true</includeSubModules>
-
+ <useAllReactorProjects>true</useAllReactorProjects>
+
<includes>
<include>org.jboss.teiid:teiid-client</include>
<include>org.jboss.teiid:teiid-common-core</include>
Modified: trunk/build/assembly/docs.xml
===================================================================
--- trunk/build/assembly/docs.xml 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/build/assembly/docs.xml 2010-09-24 18:51:07 UTC (rev 2603)
@@ -12,7 +12,8 @@
<moduleSets>
<moduleSet>
<includeSubModules>true</includeSubModules>
-
+ <useAllReactorProjects>true</useAllReactorProjects>
+
<includes>
<include>org.jboss.teiid.documentation:admin-guide</include>
<include>org.jboss.teiid.documentation:reference</include>
Modified: trunk/build/assembly/jboss-container/dist.xml
===================================================================
--- trunk/build/assembly/jboss-container/dist.xml 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/build/assembly/jboss-container/dist.xml 2010-09-24 18:51:07 UTC (rev 2603)
@@ -13,7 +13,7 @@
<fileSets>
<fileSet>
- <directory>build/target/kits/jboss-container</directory>
+ <directory>target/kits/jboss-container</directory>
<outputDirectory>/</outputDirectory>
<includes>
<include>**/*.sh</include>
@@ -23,7 +23,7 @@
</fileSet>
<fileSet>
- <directory>build/target/kits/jboss-container</directory>
+ <directory>target/kits/jboss-container</directory>
<outputDirectory>/</outputDirectory>
<excludes>
<exclude>**/*.sh</exclude>
@@ -34,7 +34,7 @@
<!-- only true dependency file for any client -->
<fileSet>
- <directory>target/distribution</directory>
+ <directory>target</directory>
<includes>
<include>teiid-${version}-client.jar</include>
</includes>
@@ -44,7 +44,7 @@
</fileSet>
<fileSet>
- <directory>client/src/main/resources</directory>
+ <directory>../client/src/main/resources</directory>
<includes>
<include>vdb-deployer.xsd</include>
</includes>
@@ -70,32 +70,32 @@
<files>
<file>
- <source>target/distribution/teiid-${version}-docs/admin-guide/en-US/pdf/teiid_admin_guide.pdf</source>
+ <source>target/teiid-${version}-docs/admin-guide/en-US/pdf/teiid_admin_guide.pdf</source>
<outputDirectory>teiid-docs</outputDirectory>
<fileMode>0644</fileMode>
</file>
<file>
- <source>target/distribution/teiid-${version}-docs/reference/en-US/pdf/teiid_reference.pdf</source>
+ <source>target/teiid-${version}-docs/reference/en-US/pdf/teiid_reference.pdf</source>
<outputDirectory>teiid-docs</outputDirectory>
<fileMode>0644</fileMode>
</file>
<file>
- <source>target/distribution/teiid-${version}-docs/quick-start-example/en-US/pdf/teiid_quick_start_example.pdf</source>
+ <source>target/teiid-${version}-docs/quick-start-example/en-US/pdf/teiid_quick_start_example.pdf</source>
<outputDirectory>teiid-docs</outputDirectory>
<fileMode>0644</fileMode>
</file>
<file>
- <source>target/distribution/teiid-${version}-docs/developer-guide/en-US/pdf/teiid_developer_guide.pdf</source>
+ <source>target/teiid-${version}-docs/developer-guide/en-US/pdf/teiid_developer_guide.pdf</source>
<outputDirectory>teiid-docs</outputDirectory>
<fileMode>0644</fileMode>
</file>
<file>
- <source>target/distribution/teiid-${version}-docs/client-developers-guide/en-US/pdf/teiid_client_developers_guide.pdf</source>
+ <source>target/teiid-${version}-docs/client-developers-guide/en-US/pdf/teiid_client_developers_guide.pdf</source>
<outputDirectory>teiid-docs</outputDirectory>
<fileMode>0644</fileMode>
</file>
<file>
- <source>target/distribution/teiid-${version}-docs/caching-guide/en-US/pdf/teiid_caching_guide.pdf</source>
+ <source>target/teiid-${version}-docs/caching-guide/en-US/pdf/teiid_caching_guide.pdf</source>
<outputDirectory>teiid-docs</outputDirectory>
<fileMode>0644</fileMode>
</file>
@@ -104,7 +104,9 @@
<!-- these have external dependent clients like connectors-->
<moduleSets>
+
<moduleSet>
+ <useAllReactorProjects>true</useAllReactorProjects>
<includes>
<include>org.jboss.teiid:teiid-hibernate-dialect</include>
</includes>
@@ -118,6 +120,7 @@
<!-- These are Teiid internal dependencies; to make JCA work -->
<moduleSet>
<includeSubModules>true</includeSubModules>
+ <useAllReactorProjects>true</useAllReactorProjects>
<includes>
<include>org.jboss.teiid:teiid-jboss-integration</include>
@@ -142,7 +145,8 @@
<!-- These are built in connectors -->
<moduleSet>
<includeSubModules>true</includeSubModules>
-
+ <useAllReactorProjects>true</useAllReactorProjects>
+
<includes>
<include>org.jboss.teiid.connectors:connector-file:rar</include>
<include>org.jboss.teiid.connectors:connector-ldap:rar</include>
@@ -171,7 +175,8 @@
<!-- These are built in translators -->
<moduleSet>
<includeSubModules>true</includeSubModules>
-
+ <useAllReactorProjects>true</useAllReactorProjects>
+
<includes>
<include>org.jboss.teiid.connectors:translator-jdbc</include>
<include>org.jboss.teiid.connectors:translator-loopback</include>
@@ -201,7 +206,8 @@
<!-- Include the JOPR plugin -->
<moduleSet>
<includeSubModules>true</includeSubModules>
-
+ <useAllReactorProjects>true</useAllReactorProjects>
+
<includes>
<include>org.jboss.teiid:teiid-console</include>
</includes>
@@ -215,4 +221,4 @@
</moduleSet>
</moduleSets>
-</assembly>
\ No newline at end of file
+</assembly>
Modified: trunk/build/assembly/src.xml
===================================================================
--- trunk/build/assembly/src.xml 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/build/assembly/src.xml 2010-09-24 18:51:07 UTC (rev 2603)
@@ -11,7 +11,7 @@
<fileSets>
<fileSet>
- <directory>${project.basedir}</directory>
+ <directory>${project.basedir}/..</directory>
<useDefaultExcludes>true</useDefaultExcludes>
<outputDirectory>teiid</outputDirectory>
<excludes>
Modified: trunk/build/kits/adminshell/connection.properties
===================================================================
--- trunk/build/kits/adminshell/connection.properties 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/build/kits/adminshell/connection.properties 2010-09-24 18:51:07 UTC (rev 2603)
@@ -2,6 +2,6 @@
jdbc.password=teiid
jdbc.url=jdbc:teiid:admin@mm://localhost:31000;
-admin.url=mm://localhost:31443
+admin.url=mms://localhost:31443
admin.user=admin
admin.password=admin
Modified: trunk/build/kits/jboss-container/conf/jboss-teiid-log4j.xml
===================================================================
--- trunk/build/kits/jboss-container/conf/jboss-teiid-log4j.xml 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/build/kits/jboss-container/conf/jboss-teiid-log4j.xml 2010-09-24 18:51:07 UTC (rev 2603)
@@ -62,7 +62,7 @@
-->
<!-- un-comment to enable Teiid COMMAND log
- <appender name="COMMAND" class="org.apache.log4j.RollingFileAppender">
+ <appender name="COMMAND" class="org.jboss.logging.appender.RollingFileAppender">
<param name="File" value="${jboss.server.log.dir}/teiid-command.log"/>
<param name="MaxFileSize" value="1000KB"/>
<param name="MaxBackupIndex" value="25"/>
Modified: trunk/build/kits/jboss-container/conf/props/teiid-security-roles.properties
===================================================================
--- trunk/build/kits/jboss-container/conf/props/teiid-security-roles.properties 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/build/kits/jboss-container/conf/props/teiid-security-roles.properties 2010-09-24 18:51:07 UTC (rev 2603)
@@ -1,4 +1,3 @@
# A roles.properties file for use with the UsersRolesLoginModule
-# username=role1,role1.
-# allowed teiid admin roles (Admin.SystemAdmin, Admin.ProductAdmin, Admin.ReadOnlyAdmin)
-admin=Admin.SystemAdmin
+# username=role1,role2
+admin=admin
Modified: trunk/build/kits/jboss-container/deploy/teiid/teiid-jboss-beans.xml
===================================================================
--- trunk/build/kits/jboss-container/deploy/teiid/teiid-jboss-beans.xml 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/build/kits/jboss-container/deploy/teiid/teiid-jboss-beans.xml 2010-09-24 18:51:07 UTC (rev 2603)
@@ -123,7 +123,14 @@
</bean>
<bean name="JdbcSslConfiguration" class="org.teiid.transport.SSLConfiguration">
- <property name="sslEnabled">false</property>
+ <!-- can be one of disabled, login, or enabled
+ disabled = no transport or message level security will be used
+ login = only the login traffic will be encrypted at a message level
+ using 128 bit AES with an ephemerial DH key exchange.
+ No other config values are needed in this mode
+ enabled = traffic will be secured using this configuration
+ -->
+ <property name="mode">login</property>
<property name="keystoreFilename">cert.keystore</property>
<property name="keystorePassword">passwd</property>
<property name="keystoreType">JKS</property>
@@ -133,7 +140,6 @@
<property name="truststorePassword">passwd</property>
<!-- 1-way, 2-way, anonymous -->
<property name="authenticationMode">1-way</property>
- <property name="clientEncryptionEnabled">true</property>
</bean>
<!-- Admin Socket connection settings (SSL see below) -->
@@ -151,7 +157,14 @@
</bean>
<bean name="AdminSslConfiguration" class="org.teiid.transport.SSLConfiguration">
- <property name="sslEnabled">false</property>
+ <!-- can be one of disabled, login, or enabled
+ disabled = no transport or message level security will be used
+ login = only the login traffic will be encrypted at a message level
+ using 128 bit AES with an ephemerial DH key exchange.
+ No other config values are needed in this mode
+ enabled = traffic will be secured using this configuration
+ -->
+ <property name="mode">enabled</property>
<property name="keystoreFilename">cert.keystore</property>
<property name="keystorePassword">passwd</property>
<property name="keystoreType">JKS</property>
@@ -161,7 +174,6 @@
<property name="truststorePassword">passwd</property>
<!-- 1-way, 2-way, anonymous -->
<property name="authenticationMode">anonymous</property>
- <property name="clientEncryptionEnabled">true</property>
</bean>
<!-- JDBC Socket connection properties (SSL see below) -->
@@ -179,7 +191,11 @@
</bean>
<bean name="OdbcSslConfiguration" class="org.teiid.transport.SSLConfiguration">
- <property name="sslEnabled">false</property>
+ <!-- can be one of disabled or enabled
+ disabled = no transport or message level security will be used
+ enabled = traffic will be secured using this configuration
+ -->
+ <property name="mode">disabled</property>
<property name="keystoreFilename">cert.keystore</property>
<property name="keystorePassword">passwd</property>
<property name="keystoreType">JKS</property>
@@ -189,7 +205,6 @@
<property name="truststorePassword">passwd</property>
<!-- 1-way, 2-way, anonymous -->
<property name="authenticationMode">1-way</property>
- <property name="clientEncryptionEnabled">true</property>
</bean>
<!-- teiid's default security domain, replace this with your own if needs to be any other JAAS domain -->
Modified: trunk/build/kits/jboss-container/teiid-examples/jca/ldap-ds.xml
===================================================================
--- trunk/build/kits/jboss-container/teiid-examples/jca/ldap-ds.xml 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/build/kits/jboss-container/teiid-examples/jca/ldap-ds.xml 2010-09-24 18:51:07 UTC (rev 2603)
@@ -7,7 +7,7 @@
<jndi-name>ldapDS</jndi-name>
<!-- The resource archive file that defines JCA connection for Sales Force (do not change this) -->
- <rar-name>teiid-connector-file.rar</rar-name>
+ <rar-name>teiid-connector-ldap.rar</rar-name>
<!-- connection interface; (do not change this) -->
<connection-definition>javax.resource.cci.ConnectionFactory</connection-definition>
Deleted: trunk/build/kits/jboss-container/teiid-examples/simpleclient/JDBCClient.class
===================================================================
(Binary files differ)
Added: trunk/build/kits/jboss-container/teiid-examples/simpleclient/JDBCClient.class
===================================================================
(Binary files differ)
Property changes on: trunk/build/kits/jboss-container/teiid-examples/simpleclient/JDBCClient.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/build/kits/jboss-container/teiid-releasenotes.html
===================================================================
--- trunk/build/kits/jboss-container/teiid-releasenotes.html 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/build/kits/jboss-container/teiid-releasenotes.html 2010-09-24 18:51:07 UTC (rev 2603)
@@ -26,12 +26,15 @@
</UL>
<H2><A NAME="Highlights"></A>Highlights</H2>
<UL>
+ <LI><B>Transaction Statements</B> - JDBC/ODBC now accepts START TRANSACTION, COMMIT, and ROLLBACK statements to control local transactions.
<LI><B>Procedure Result Caching</B> - virtual procedure definitions may use a cache hint to cache results in the result set cache.
<LI><B>Improved Plan Caching</B> - plans used by internal materialization and stored procedure plans will be automatically cached in the prepared plan cache. Improvements were also made to reduce the memory footprint of the plans.
<LI><B>Refined Load Balancing and Fail Over</B> - clients can use use the statement "SET NEWINSTANCE TRUE" to allow their connection to select a new server instance. See the Client Developer's Guide for more information.
<LI><B>Simplified Role Usage</B> - a role can now be assigned to any authenticated user via the any-authenticated attribute on the data-role element.
<LI><B>Materialized View Performance</B> - materialized view tables will now automatically create and use non-unique secondary indexes for unique constraints and indexes defined on the view.
- <LI><B>Binary Web Service Calls</B> - the ws translator now provides an invokeHttp procedure to return the blob contents and string content type of an http/https call.
+ <LI><B>Binary Web Service Calls</B> - the ws translator now provides an invokeHttp procedure to return the blob contents and string content type of an http/https call.
+ <LI><B>Improved clustering support</B> - see the Admin Guide chapter on clustering.
+ <LI><B>IPv6 support</B> - Teiid can started using IPv6 bind address and can be used with JDBC connection.
</UL>
<h2><a name="Compatibility">Compatibility Issues</a></h2>
@@ -40,6 +43,9 @@
</ul>
<h4>from 7.1</h4>
<ul>
+ <li>The SYSADMIN schema was created to hold procedures and tables that should not be generally accessible. SYS and pg_catalog are now always accessible - permissions do not apply to these schemas. The SYS.getBinaryVDBResource, SYS.getCharacterVDBResource, and SYS.getVDBResourcePaths have been replaced with the
+ SYSADMIN.VDBResources table. The Matviews table and the refreshMatView/refreshMatViewRow procedures were also moved into SYSADMIN.
+ <li>Overwriting an existing VDB will cause old connections to be terminated. Production systems should rely on VDB versioning.
<li>The jdbc:metamatrix JDBC URL prefix is no longer accepted. Use jdbc:teiid instead.
<li>Model visibility no longer restricts access to tables and procedures. Setting visible to false will only hide entries from system tables. Data roles should be used to restrict data access.
</ul>
@@ -75,6 +81,11 @@
<h4>from 7.1</h4>
<ul>
+ <li>Teiid clients now allow the usage of anonymous SSL by default.
+ This changes allows the admin port (default 31443) to use anonymous SSL by default, rather than just securing login traffic.
+ Admin clients should therefore use the mms protocol instead of mm. This will encrypt all admin traffic and ensure that any passwords in configuration files will
+ be encrypted in transit. See the Admin Guide to upgrade from anonymous SSL to 1-way or 2-way authentication.
+ The config properties sslEnabled and clientEncryptionEnabled for SSLConfiguration beans have been combined to a single property mode, that can have the values disabled|login|enabled.
<li>Apache CXF is now expected to be used as the web services stack provider through JBossWS-CXF. See the Admin Guide for instructions on
installing CXF for use with Teiid's Salesforce and web service connectors. The WS Resource Adapter's -ds.xml files should no longer use
WSSecurityConfigURL and WSSecurityConfigName, rather they should be ConfigFile and ConfigName respectively. The property values should no longer
@@ -117,6 +128,10 @@
<h2><a name="LibraryUpdates">Thirdparty Library Updates</a></h2>
The following components have been updated:
+<h4>From 7.1</h4>
+<ul>
+ <li>Netty was upgraded to 3.2.1
+</ul>
<h4>From 7.0</h4>
<ul>
<li>Direct integration of JBossCache jars was removed.
Modified: trunk/build/pom.xml
===================================================================
--- trunk/build/pom.xml 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/build/pom.xml 2010-09-24 18:51:07 UTC (rev 2603)
@@ -1,11 +1,11 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
- <artifactId>teiid</artifactId>
+ <artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
<version>7.2.0.Alpha2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
- <artifactId>build</artifactId>
+ <artifactId>teiid</artifactId>
<name>Build</name>
<description>Teiid Build</description>
<build>
@@ -34,5 +34,60 @@
</excludes>
</resource>
</resources>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+
+ <configuration>
+ <descriptors>
+ <descriptor>assembly/client-jar.xml</descriptor>
+ <descriptor>assembly/jboss-container/dist.xml</descriptor>
+ <descriptor>assembly/adminshell/adminshell-dist.xml</descriptor>
+ </descriptors>
+ </configuration>
+
+ <executions>
+ <execution>
+ <id>create-assemblies</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
</build>
+
+ <profiles>
+ <profile>
+ <!--
+ This profile is activated manually, as in "mvn ... -P release ..."
+ -->
+ <id>release</id>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <configuration>
+ <descriptors>
+ <descriptor>assembly/src.xml</descriptor>
+ <descriptor>assembly/docs.xml</descriptor>
+ <descriptor>assembly/client-jar.xml</descriptor>
+ <descriptor>assembly/jboss-container/dist.xml</descriptor>
+ <descriptor>assembly/adminshell/adminshell-dist.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
</project>
\ No newline at end of file
Modified: trunk/cache-jbosscache/pom.xml
===================================================================
--- trunk/cache-jbosscache/pom.xml 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/cache-jbosscache/pom.xml 2010-09-24 18:51:07 UTC (rev 2603)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
- <artifactId>teiid</artifactId>
+ <artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
<version>7.2.0.Alpha2-SNAPSHOT</version>
</parent>
Modified: trunk/cache-jbosscache/src/main/java/org/teiid/cache/jboss/ClusterableCacheFactory.java
===================================================================
--- trunk/cache-jbosscache/src/main/java/org/teiid/cache/jboss/ClusterableCacheFactory.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/cache-jbosscache/src/main/java/org/teiid/cache/jboss/ClusterableCacheFactory.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -89,4 +89,12 @@
public void setCacheManager(String mgrName) {
this.cacheManagerName = mgrName;
}
+
+ @Override
+ public boolean isReplicated() {
+ if (delegate == null) {
+ return false;
+ }
+ return delegate.isReplicated();
+ }
}
Modified: trunk/cache-jbosscache/src/main/java/org/teiid/cache/jboss/JBossCache.java
===================================================================
--- trunk/cache-jbosscache/src/main/java/org/teiid/cache/jboss/JBossCache.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/cache-jbosscache/src/main/java/org/teiid/cache/jboss/JBossCache.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -128,4 +128,15 @@
void setCacheConfiguration(CacheConfiguration config) {
this.config = config;
}
+
+ @Override
+ public Set<K> keys() {
+ HashSet keys = new HashSet();
+ Node<K, V> node = getRootNode();
+ Set<Node<K, V>> children = node.getChildren();
+ for (Node<K, V> child:children) {
+ keys.addAll(child.getData().keySet());
+ }
+ return keys;
+ }
}
Modified: trunk/cache-jbosscache/src/main/java/org/teiid/cache/jboss/JBossCacheFactory.java
===================================================================
--- trunk/cache-jbosscache/src/main/java/org/teiid/cache/jboss/JBossCacheFactory.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/cache-jbosscache/src/main/java/org/teiid/cache/jboss/JBossCacheFactory.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -113,4 +113,9 @@
public void stop() {
destroy();
}
+
+ @Override
+ public boolean isReplicated() {
+ return true;
+ }
}
Modified: trunk/client/pom.xml
===================================================================
--- trunk/client/pom.xml 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/client/pom.xml 2010-09-24 18:51:07 UTC (rev 2603)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
- <artifactId>teiid</artifactId>
+ <artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
<version>7.2.0.Alpha2-SNAPSHOT</version>
</parent>
Modified: trunk/client/src/main/java/org/teiid/adminapi/Admin.java
===================================================================
--- trunk/client/src/main/java/org/teiid/adminapi/Admin.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/client/src/main/java/org/teiid/adminapi/Admin.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -234,21 +234,30 @@
*
* @param vdbName
* @param vdbVersion
- * @param policyName
- * @param role
+ * @param dataRole
+ * @param mappedRoleName
*/
- void addDataRoleMapping(String vdbName, int vdbVersion, String policyName, String role) throws AdminException;
+ void addDataRoleMapping(String vdbName, int vdbVersion, String dataRole, String mappedRoleName) throws AdminException;
/**
- * Assign a Role name to the Data Role in a given VDB
+ * Remove a Role name to the Data Role in a given VDB
*
* @param vdbName
* @param vdbVersion
- * @param policyName
- * @param role
+ * @param dataRole
+ * @param mappedRoleName
*/
- void removeDataRoleMapping(String vdbName, int vdbVersion, String policyName, String role) throws AdminException;
+ void removeDataRoleMapping(String vdbName, int vdbVersion, String dataRole, String mappedRoleName) throws AdminException;
+ /**
+ * Set the any authenticated flag on the Data Role in a given VDB
+ *
+ * @param vdbName
+ * @param vdbVersion
+ * @param dataRole
+ * @param anyAuthenticated
+ */
+ void setAnyAuthenticatedForDataRole(String vdbName, int vdbVersion, String dataRole, boolean anyAuthenticated) throws AdminException;
/**
* Merge the Source VDB into Target VDB. Both Source and Target VDBs must be present for this method to
Modified: trunk/client/src/main/java/org/teiid/adminapi/AdminFactory.java
===================================================================
--- trunk/client/src/main/java/org/teiid/adminapi/AdminFactory.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/client/src/main/java/org/teiid/adminapi/AdminFactory.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -32,9 +32,9 @@
import org.teiid.client.util.ExceptionUtil;
import org.teiid.core.TeiidRuntimeException;
import org.teiid.core.util.PropertiesUtils;
+import org.teiid.jdbc.JDBCPlugin;
import org.teiid.net.CommunicationException;
import org.teiid.net.ConnectionException;
-import org.teiid.net.NetPlugin;
import org.teiid.net.ServerConnection;
import org.teiid.net.ServerConnectionFactory;
import org.teiid.net.TeiidURL;
@@ -53,18 +53,16 @@
private Admin target;
private ServerConnection registry;
- private Properties p;
private boolean closed;
public AdminProxy(Properties p) throws ConnectionException, CommunicationException {
- this.p = p;
this.registry = serverConnectionFactory.getConnection(p);
this.target = registry.getService(Admin.class);
}
private synchronized Admin getTarget() throws AdminComponentException {
if (closed) {
- throw new AdminComponentException(NetPlugin.Util.getString("ERR.014.001.0001")); //$NON-NLS-1$
+ throw new AdminComponentException(JDBCPlugin.Util.getString("admin_conn_closed")); //$NON-NLS-1$
}
return target;
}
@@ -76,6 +74,9 @@
close();
return null;
}
+ if (!method.getDeclaringClass().equals(Admin.class)) {
+ return method.invoke(this, args);
+ }
try {
return method.invoke(getTarget(), args);
} catch (InvocationTargetException e) {
@@ -186,7 +187,7 @@
String applicationName) throws AdminException {
if (userName == null || userName.trim().length() == 0) {
- throw new IllegalArgumentException(NetPlugin.Util.getString("ERR.014.001.0099")); //$NON-NLS-1$
+ throw new IllegalArgumentException(JDBCPlugin.Util.getString("invalid_parameter")); //$NON-NLS-1$
}
final Properties p = new Properties();
Modified: trunk/client/src/main/java/org/teiid/adminapi/impl/ListOverMap.java
===================================================================
--- trunk/client/src/main/java/org/teiid/adminapi/impl/ListOverMap.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/client/src/main/java/org/teiid/adminapi/impl/ListOverMap.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -1,7 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
* Copyright (C) 2008 Red Hat, Inc.
- * Copyright (C) 2000-2007 MetaMatrix, Inc.
* Licensed to Red Hat, Inc. under one or more contributor
* license agreements. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
Modified: trunk/client/src/main/java/org/teiid/adminapi/impl/PermissionMap.java
===================================================================
--- trunk/client/src/main/java/org/teiid/adminapi/impl/PermissionMap.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/client/src/main/java/org/teiid/adminapi/impl/PermissionMap.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -1,7 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
* Copyright (C) 2008 Red Hat, Inc.
- * Copyright (C) 2000-2007 MetaMatrix, Inc.
* Licensed to Red Hat, Inc. under one or more contributor
* license agreements. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
Modified: trunk/client/src/main/java/org/teiid/adminapi/impl/SourceMappingMetadata.java
===================================================================
--- trunk/client/src/main/java/org/teiid/adminapi/impl/SourceMappingMetadata.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/client/src/main/java/org/teiid/adminapi/impl/SourceMappingMetadata.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -1,7 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
* Copyright (C) 2008 Red Hat, Inc.
- * Copyright (C) 2000-2007 MetaMatrix, Inc.
* Licensed to Red Hat, Inc. under one or more contributor
* license agreements. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
Modified: trunk/client/src/main/java/org/teiid/adminapi/impl/VDBMetaData.java
===================================================================
--- trunk/client/src/main/java/org/teiid/adminapi/impl/VDBMetaData.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/client/src/main/java/org/teiid/adminapi/impl/VDBMetaData.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -285,8 +285,13 @@
}
public String toString() {
- return getName()+VERSION_DELIM+getVersion()+ models.getMap().values(); //$NON-NLS-1$
+ return getName()+VERSION_DELIM+getVersion()+ models.getMap().values();
}
+
+ public boolean isVisible(String modelName) {
+ ModelMetaData model = getModel(modelName);
+ return model == null || model.isVisible();
+ }
public ModelMetaData getModel(String modelName) {
return this.models.getMap().get(modelName);
Modified: trunk/client/src/main/java/org/teiid/client/BatchSerializer.java
===================================================================
--- trunk/client/src/main/java/org/teiid/client/BatchSerializer.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/client/src/main/java/org/teiid/client/BatchSerializer.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -35,7 +35,7 @@
import java.util.Map;
import org.teiid.core.types.DataTypeManager;
-import org.teiid.net.NetPlugin;
+import org.teiid.jdbc.JDBCPlugin;
@@ -380,7 +380,7 @@
break objectSearch;
}
}
- throw new IOException(NetPlugin.Util.getString("BatchSerializer.datatype_mismatch", new Object[] {types[i], new Integer(i), objectClass})); //$NON-NLS-1$
+ throw new IOException(JDBCPlugin.Util.getString("BatchSerializer.datatype_mismatch", new Object[] {types[i], new Integer(i), objectClass})); //$NON-NLS-1$
}
}
}
Modified: trunk/client/src/main/java/org/teiid/client/RequestMessage.java
===================================================================
--- trunk/client/src/main/java/org/teiid/client/RequestMessage.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/client/src/main/java/org/teiid/client/RequestMessage.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -33,7 +33,7 @@
import org.teiid.core.TeiidProcessingException;
import org.teiid.core.util.ExternalizeUtil;
-import org.teiid.net.NetPlugin;
+import org.teiid.jdbc.JDBCPlugin;
/**
@@ -221,7 +221,7 @@
if (!(txnAutoWrapMode.equals(TXN_WRAP_OFF)
|| txnAutoWrapMode.equals(TXN_WRAP_ON)
|| txnAutoWrapMode.equals(TXN_WRAP_DETECT))) {
- throw new TeiidProcessingException(NetPlugin.Util.getString("RequestMessage.invalid_txnAutoWrap", txnAutoWrapMode)); //$NON-NLS-1$
+ throw new TeiidProcessingException(JDBCPlugin.Util.getString("RequestMessage.invalid_txnAutoWrap", txnAutoWrapMode)); //$NON-NLS-1$
}
}
this.txnAutoWrapMode = txnAutoWrapMode;
Modified: trunk/client/src/main/java/org/teiid/client/lob/StreamingLobChunckProducer.java
===================================================================
--- trunk/client/src/main/java/org/teiid/client/lob/StreamingLobChunckProducer.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/client/src/main/java/org/teiid/client/lob/StreamingLobChunckProducer.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -29,7 +29,7 @@
import org.teiid.client.DQP;
import org.teiid.core.TeiidException;
import org.teiid.core.types.Streamable;
-import org.teiid.net.NetPlugin;
+import org.teiid.jdbc.JDBCPlugin;
public class StreamingLobChunckProducer implements LobChunkProducer {
@@ -71,7 +71,7 @@
Future<LobChunk> result = dqp.requestNextLobChunk(streamRequestId, requestId, streamable.getReferenceStreamId());
return result.get();
} catch (Exception e) {
- IOException ex = new IOException(NetPlugin.Util.getString("StreamImpl.Unable_to_read_data_from_stream", e.getMessage())); //$NON-NLS-1$
+ IOException ex = new IOException(JDBCPlugin.Util.getString("StreamImpl.Unable_to_read_data_from_stream", e.getMessage())); //$NON-NLS-1$
ex.initCause(e);
throw ex;
}
Modified: trunk/client/src/main/java/org/teiid/jdbc/ConnectionImpl.java
===================================================================
--- trunk/client/src/main/java/org/teiid/jdbc/ConnectionImpl.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/client/src/main/java/org/teiid/jdbc/ConnectionImpl.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -383,13 +383,6 @@
}
}
- /**
- * <p>This creates a MMStatement object for sending SQL statements to the MetaMatrix
- * server. This should be used for statements without parameters. For statements
- * that are executed many times, use the PreparedStatement object.</p>
- * @return a Statement object.
- * @throws a SQLException if a MetaMatrix server access error occurs.
- */
public Statement createStatement() throws SQLException {
return createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
}
@@ -439,14 +432,6 @@
}
}
- /**
- * <p>This method returns the current status of the connection in regards to it's
- * auto-commit state. By default, the auto-commit is set to true. Meaning that
- * any transaction that occurs is automatically commited to the MetaMatrix server.
- * #See corresponding setAutoCommit() method.</p>
- * @return true if the statements on this connection get committed on execution.
- * @throws SQLException should never happen
- */
public boolean getAutoCommit() throws SQLException {
//Check to see the connection is open
checkConnection();
@@ -563,26 +548,10 @@
return closed;
}
- /**
- * <p>This method will return whether this connection is read only or not.
- * It will throw a SQLException if a MetaMatrix server access error occurs.
- * @return boolean value indication if connection is readonly
- * @throws SQLException, should never occur
- */
public boolean isReadOnly() throws SQLException {
return readOnly;
}
- /**
- * <p>This method will convert the given SQL String into a MetaMatrix SQL Request.
- * This will convert any date escape sequences into the appropriate MetaMatrix
- * type, and any kind of data transformations that the MetaMatrix server would
- * expect. This method returns the native form of the statement that the driver
- * would have sent.</p>
- * @param sql string to be coverted into SQL understood by metamatrix
- * @return uncoverted sql string(escape parsing takesplace in metamatrix)
- * @throws SQLException, should never occur
- */
public String nativeSQL(String sql) throws SQLException {
// return the string argument without any modifications.
// escape syntaxes are directly supported in the server
@@ -639,16 +608,6 @@
}
}
- /**
- * <p>This method creates a MMPreparedStatement which is used for sending parameterized
- * SQL statements to the MetaMatrix server. A statement with or without IN parameters
- * can be pre-compiled and stored in a MMPreparedStatement object. Since the MetaMatrix
- * server does not pre-compile statements, a sql statement will be constructed using the
- * parameters supplied which would be used for execution of this preparedStatement object.</p>
- * @param sql string representing a prepared statement
- * @return a PreparedStatement object
- * @throws SQLException if there is an error creating a prepared statement object
- */
public PreparedStatementImpl prepareStatement(String sql) throws SQLException {
return prepareStatement(sql, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
}
@@ -676,34 +635,21 @@
return newStatement;
}
- /**
- * <p>This method creates a MMPreparedStatement which is used for sending parameterized
- * SQL statements to the MetaMatrix server and it has the capability to retrieve auto-generated keys.</p>
- * @param sql string representing a prepared statement
- * @param intValue indicating the result set Type
- * @param intValue indicating the result set concurrency
- * @param intValue indicating the result set holdability
- * @return a PreparedStatement object
- * @throws SQLException if there is an error creating a prepared statement object
- */
public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency,
int resultSetHoldability ) throws SQLException {
throw SqlUtil.createFeatureNotSupportedException();
}
- /**
- * <p>This method will drop all changes made since the beginning of the transaction
- * and release any MetaMatrix server locks currently held by this connection. This
- * method rolls back transactions on all the statements currently open on this connection.
- * This is used when then auto-commit has been disabled.</p>
- * @see setAutoCommit(boolean) method for more information.
- * @throws SQLException if there is an error rolling back.
- */
public void rollback() throws SQLException {
rollback(true);
}
-
- void rollback(boolean startTxn) throws SQLException {
+
+ /**
+ * Rollback the current local transaction
+ * @param startTxn
+ * @throws SQLException
+ */
+ public void rollback(boolean startTxn) throws SQLException {
//Check to see the connection is open
checkConnection();
@@ -727,17 +673,6 @@
}
}
- /**
- * <p>This method will set the connection's auto commit mode accordingly. By
- * default this is set to true (auto-commit is turned on). An auto-commit
- * value of true means any statements will automatically be made permanent if
- * they are successful after the last row of the ReulstSet has been retrieved
- * or the next execute occurs, whichever comes first. If set to false, changes
- * can be either be committed (using the commit() method) or rolled back ("undo
- * the changes" by using the rollback() method).</p>
- * @param boolean value indicating if autoCommit is turned on
- * @throws SQLException is metamatrix access error occurs.
- */
public void setAutoCommit(boolean autoCommit) throws SQLException {
//Check to see the connection is open
checkConnection();
@@ -756,7 +691,7 @@
}
/**
- * <p>Metamatrix does not allow setting a catalog through a connection. This
+ * <p>Teiid does not allow setting a catalog through a connection. This
* method silently ignores the request as per the specification.</p>
* @param The string values which sets the catalog name on the connection.
* @throws SQLException This should never occur.
Modified: trunk/client/src/main/java/org/teiid/jdbc/SocketProfile.java
===================================================================
--- trunk/client/src/main/java/org/teiid/jdbc/SocketProfile.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/client/src/main/java/org/teiid/jdbc/SocketProfile.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -60,7 +60,7 @@
*/
// This host/port pattern allows just a . or a - to be in the host part.
- static final String HOST_PORT_PATTERN = "[\\p{Alnum}\\.\\-\\_]+:\\d+"; //$NON-NLS-1$
+ static final String HOST_PORT_PATTERN = "\\[?[\\p{Alnum}\\.\\-\\_:]+\\]?:\\d+"; //$NON-NLS-1$
static final String URL_PATTERN = "jdbc:teiid:([\\w-\\.]+)@mm[s]?://"+HOST_PORT_PATTERN+"(,"+HOST_PORT_PATTERN+")*(;.*)?"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
static Pattern urlPattern = Pattern.compile(URL_PATTERN);
Modified: trunk/client/src/main/java/org/teiid/jdbc/StatementImpl.java
===================================================================
--- trunk/client/src/main/java/org/teiid/jdbc/StatementImpl.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/client/src/main/java/org/teiid/jdbc/StatementImpl.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -23,7 +23,6 @@
package org.teiid.jdbc;
import java.io.Serializable;
-import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
@@ -63,6 +62,7 @@
import org.teiid.core.types.JDBCSQLTypeInfo;
import org.teiid.core.types.SQLXMLImpl;
import org.teiid.core.util.SqlUtil;
+import org.teiid.core.util.StringUtil;
public class StatementImpl extends WrapperImpl implements TeiidStatement {
@@ -144,8 +144,9 @@
//Map<out/inout/return param index --> index in results>
protected Map outParamIndexMap = new HashMap();
- private static Pattern SET_STATEMENT = Pattern.compile("\\s*set\\s*(\\w+)\\s*(\\w*)", Pattern.CASE_INSENSITIVE); //$NON-NLS-1$
- private static Pattern SHOW_STATEMENT = Pattern.compile("\\s*show\\s*(\\w*)", Pattern.CASE_INSENSITIVE); //$NON-NLS-1$
+ private static Pattern TRANSACTION_STATEMENT = Pattern.compile("\\s*(commit|rollback|(start\\s*transaction))\\s*;?", Pattern.CASE_INSENSITIVE); //$NON-NLS-1$
+ private static Pattern SET_STATEMENT = Pattern.compile("\\s*set\\s*(\\w+)\\s*(\\w*);?", Pattern.CASE_INSENSITIVE); //$NON-NLS-1$
+ private static Pattern SHOW_STATEMENT = Pattern.compile("\\s*show\\s*(\\w*);?", Pattern.CASE_INSENSITIVE); //$NON-NLS-1$
/**
* Factory Constructor
* @param driverConnection
@@ -403,6 +404,22 @@
this.updateCounts = new int[] {0};
return;
}
+ match = TRANSACTION_STATEMENT.matcher(commands[0]);
+ if (match.matches()) {
+ if (resultsMode == ResultsMode.RESULTSET) {
+ throw new TeiidSQLException(JDBCPlugin.Util.getString("StatementImpl.set_result_set")); //$NON-NLS-1$
+ }
+ String command = match.group(1);
+ if (StringUtil.startsWithIgnoreCase(command, "start")) { //$NON-NLS-1$
+ this.getConnection().setAutoCommit(false);
+ } else if (command.equalsIgnoreCase("commit")) { //$NON-NLS-1$
+ this.getConnection().setAutoCommit(true);
+ } else if (command.equalsIgnoreCase("rollback")) { //$NON-NLS-1$
+ this.getConnection().rollback(false);
+ }
+ this.updateCounts = new int[] {0};
+ return;
+ }
match = SHOW_STATEMENT.matcher(commands[0]);
if (match.matches()) {
if (resultsMode == ResultsMode.UPDATECOUNT) {
@@ -996,7 +1013,7 @@
checkStatement();
}
- public Connection getConnection() throws SQLException {
+ public ConnectionImpl getConnection() throws SQLException {
return this.driverConnection;
}
@@ -1044,7 +1061,7 @@
public void setMaxFieldSize(int max) throws SQLException {
checkStatement();
if ( max < 0 ) {
- throw new TeiidSQLException(JDBCPlugin.Util.getString("MMStatement.Invalid_field_size")); //$NON-NLS-1$
+ throw new TeiidSQLException(JDBCPlugin.Util.getString("MMStatement.Invalid_field_size", max)); //$NON-NLS-1$
}
this.maxFieldSize = max;
}
Modified: trunk/client/src/main/java/org/teiid/jdbc/TeiidDataSource.java
===================================================================
--- trunk/client/src/main/java/org/teiid/jdbc/TeiidDataSource.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/client/src/main/java/org/teiid/jdbc/TeiidDataSource.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -136,23 +136,42 @@
// Format: "mm://server1:port,server2:port,..."
String serverURL = ""; //$NON-NLS-1$
- serverURL = "" + ( this.secure ? TeiidURL.SECURE_PROTOCOL : TeiidURL.DEFAULT_PROTOCOL ); //$NON-NLS-1$
- serverURL += "" + this.serverName; //$NON-NLS-1$
+ serverURL = "" + ( this.secure ? TeiidURL.SECURE_PROTOCOL : TeiidURL.DEFAULT_PROTOCOL ); //$NON-NLS-1$
+
+ if (this.serverName.indexOf(':') != -1) {
+ serverURL += "["; //$NON-NLS-1$
+ }
+
+ serverURL += "" + this.serverName; //$NON-NLS-1$
+
+ if (this.serverName.indexOf(':') != -1) {
+ serverURL += "]"; //$NON-NLS-1$
+ }
+
if ( this.portNumber != 0 )
- serverURL += TeiidURL.COLON_DELIMITER + this.portNumber;
+ serverURL += TeiidURL.COLON_DELIMITER + this.portNumber;
+
if ( this.alternateServers.length() > 0 ) {
String[] as = this.alternateServers.split( TeiidURL.COMMA_DELIMITER);
- for ( int i = 0; i < as.length; i++ ) {
- String[] server = as[i].split( TeiidURL.COLON_DELIMITER );
-
- if ( server.length > 0 ) {
- serverURL += TeiidURL.COMMA_DELIMITER + server[0];
- if ( server.length > 1 ) {
- serverURL += TeiidURL.COLON_DELIMITER + server[1];
- } else {
- serverURL += TeiidURL.COLON_DELIMITER + this.portNumber;
- }
+ for ( int i = 0; i < as.length; i++ ) {
+ if (as[i].startsWith("[") && as[i].endsWith("]:")) { //$NON-NLS-1$ //$NON-NLS-2$
+ serverURL += (TeiidURL.COMMA_DELIMITER + as[i]);
+ }
+ else if (as[i].startsWith("[") && as[i].endsWith("]")) { //$NON-NLS-1$ //$NON-NLS-2$
+ serverURL += (TeiidURL.COMMA_DELIMITER +as[i] + TeiidURL.COLON_DELIMITER + this.portNumber);
+ }
+ else {
+ String[] server = as[i].split(TeiidURL.COLON_DELIMITER );
+
+ if ( server.length > 0 ) {
+ serverURL += TeiidURL.COMMA_DELIMITER + server[0];
+ if ( server.length > 1 ) {
+ serverURL += TeiidURL.COLON_DELIMITER + server[1];
+ } else {
+ serverURL += TeiidURL.COLON_DELIMITER + this.portNumber;
+ }
+ }
}
}
}
@@ -279,7 +298,7 @@
/**
* Returns a string containing a comma delimited list of alternate
- * MetaMatrix Server(s).
+ * server(s).
*
* The list will be in the form of server2[:port2][,server3[:port3]]. If no
* alternate servers have been defined <code>null</code> is returned.
Deleted: trunk/client/src/main/java/org/teiid/net/NetPlugin.java
===================================================================
--- trunk/client/src/main/java/org/teiid/net/NetPlugin.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/client/src/main/java/org/teiid/net/NetPlugin.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -1,35 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package org.teiid.net;
-
-import java.util.ResourceBundle;
-
-import org.teiid.core.BundleUtil;
-
-public class NetPlugin {
-
- public static final String PLUGIN_ID = NetPlugin.class.getPackage().getName();
-
- public static final BundleUtil Util = new BundleUtil(PLUGIN_ID,
- PLUGIN_ID + ".i18n", ResourceBundle.getBundle(PLUGIN_ID + ".i18n")); //$NON-NLS-1$ //$NON-NLS-2$
-}
Modified: trunk/client/src/main/java/org/teiid/net/TeiidURL.java
===================================================================
--- trunk/client/src/main/java/org/teiid/net/TeiidURL.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/client/src/main/java/org/teiid/net/TeiidURL.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -29,7 +29,9 @@
import java.util.NoSuchElementException;
import java.util.StringTokenizer;
+import org.teiid.jdbc.JDBCPlugin;
+
/**
* Class defines the URL in the Teiid.
*
@@ -92,7 +94,7 @@
public static final String FORMAT_SERVER = "mm[s]://server1:port1[,server2:port2]"; //$NON-NLS-1$
- public static final String INVALID_FORMAT_SERVER = NetPlugin.Util.getString("MMURL.INVALID_FORMAT", new Object[] {FORMAT_SERVER}); //$NON-NLS-1$
+ public static final String INVALID_FORMAT_SERVER = JDBCPlugin.Util.getString("MMURL.INVALID_FORMAT", new Object[] {FORMAT_SERVER}); //$NON-NLS-1$
@@ -123,6 +125,9 @@
public TeiidURL(String host, int port, boolean secure) {
usingSSL = secure;
+ if(host.startsWith("[")) { //$NON-NLS-1$
+ host = host.substring(1, host.indexOf(']'));
+ }
hosts.add(new HostInfo(host, port));
}
@@ -230,13 +235,29 @@
throw new IllegalArgumentException(exceptionMessage);
}
while (st.hasMoreTokens()) {
- st2 = new StringTokenizer(st.nextToken(), COLON_DELIMITER);
+ String nextToken = st.nextToken();
try {
- String host = st2.nextToken().trim();
- String port = st2.nextToken().trim();
+ String host = ""; //$NON-NLS-1$
+ String port = ""; //$NON-NLS-1$
+ if (nextToken.startsWith("[")) { //$NON-NLS-1$
+ int hostEnd = nextToken.indexOf("]:"); //$NON-NLS-1$
+ host = nextToken.substring(1, hostEnd);
+ port = nextToken.substring(hostEnd+2);
+ }
+ else {
+ st2 = new StringTokenizer(nextToken, COLON_DELIMITER);
+ host = st2.nextToken().trim();
+ port = st2.nextToken().trim();
+ }
+
if (host.equals("")) { //$NON-NLS-1$
throw new IllegalArgumentException("hostname can't be empty"); //$NON-NLS-1$
}
+
+ if (port.equals("")) { //$NON-NLS-1$
+ throw new IllegalArgumentException("port can't be empty"); //$NON-NLS-1$
+ }
+
int portNumber;
try {
portNumber = Integer.parseInt(port);
@@ -248,11 +269,13 @@
}
HostInfo hostInfo = new HostInfo(host, portNumber);
hosts.add(hostInfo);
+
} catch (NoSuchElementException nsee) {
throw new IllegalArgumentException(exceptionMessage);
} catch (NullPointerException ne) {
throw new IllegalArgumentException(exceptionMessage);
}
+
}
}
@@ -273,7 +296,15 @@
Iterator<HostInfo> iter = hosts.iterator();
while (iter.hasNext()) {
HostInfo host = iter.next();
+
+ boolean ipv6HostName = host.getHostName().indexOf(':') != -1;
+ if (ipv6HostName) {
+ sb.append('[');
+ }
sb.append(host.getHostName());
+ if (ipv6HostName) {
+ sb.append(']');
+ }
sb.append(COLON_DELIMITER);
sb.append(host.getPortNumber());
if (iter.hasNext()) {
Modified: trunk/client/src/main/java/org/teiid/net/socket/SocketServerConnection.java
===================================================================
--- trunk/client/src/main/java/org/teiid/net/socket/SocketServerConnection.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/client/src/main/java/org/teiid/net/socket/SocketServerConnection.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -49,10 +49,10 @@
import org.teiid.client.util.ResultsFuture;
import org.teiid.core.TeiidComponentException;
import org.teiid.core.TeiidException;
+import org.teiid.jdbc.JDBCPlugin;
import org.teiid.net.CommunicationException;
import org.teiid.net.ConnectionException;
import org.teiid.net.HostInfo;
-import org.teiid.net.NetPlugin;
import org.teiid.net.ServerConnection;
import org.teiid.net.TeiidURL;
@@ -103,7 +103,7 @@
public synchronized SocketServerInstance selectServerInstance()
throws CommunicationException, ConnectionException {
if (closed) {
- throw new CommunicationException(NetPlugin.Util.getString("SocketServerConnection.closed")); //$NON-NLS-1$
+ throw new CommunicationException(JDBCPlugin.Util.getString("SocketServerConnection.closed")); //$NON-NLS-1$
}
if (this.serverInstance != null && (!failOver || this.serverInstance.isOpen())) {
return this.serverInstance;
@@ -145,7 +145,7 @@
if (e.getCause() instanceof CommunicationException) {
throw (CommunicationException)e.getCause();
}
- throw new CommunicationException(e, NetPlugin.Util.getString("PlatformServerConnectionFactory.Unable_to_find_a_component_used_in_logging_on_to")); //$NON-NLS-1$
+ throw new CommunicationException(e, JDBCPlugin.Util.getString("PlatformServerConnectionFactory.Unable_to_find_a_component_used_in_logging_on_to")); //$NON-NLS-1$
}
}
return this.serverInstance;
@@ -157,13 +157,13 @@
this.serverDiscovery.markInstanceAsBad(hostInfo);
if (knownHosts == 1) { //just a single host, use the exception
if (ex instanceof UnknownHostException) {
- throw new SingleInstanceCommunicationException(ex, NetPlugin.Util.getString("SocketServerInstance.Connection_Error.Unknown_Host", hostInfo.getHostName())); //$NON-NLS-1$
+ throw new SingleInstanceCommunicationException(ex, JDBCPlugin.Util.getString("SocketServerInstance.Connection_Error.Unknown_Host", hostInfo.getHostName())); //$NON-NLS-1$
}
- throw new SingleInstanceCommunicationException(ex,NetPlugin.Util.getString("SocketServerInstance.Connection_Error.Connect_Failed", hostInfo.getHostName(), String.valueOf(hostInfo.getPortNumber()), ex.getMessage())); //$NON-NLS-1$
+ throw new SingleInstanceCommunicationException(ex,JDBCPlugin.Util.getString("SocketServerInstance.Connection_Error.Connect_Failed", hostInfo.getHostName(), String.valueOf(hostInfo.getPortNumber()), ex.getMessage())); //$NON-NLS-1$
}
log.log(Level.FINE, "Unable to connect to host", ex); //$NON-NLS-1$
}
- throw new CommunicationException(NetPlugin.Util.getString("SocketServerInstancePool.No_valid_host_available", hostCopy.toString())); //$NON-NLS-1$
+ throw new CommunicationException(JDBCPlugin.Util.getString("SocketServerInstancePool.No_valid_host_available", hostCopy.toString())); //$NON-NLS-1$
}
private ILogon connect(HostInfo hostInfo) throws CommunicationException,
Modified: trunk/client/src/main/java/org/teiid/net/socket/SocketServerInstanceImpl.java
===================================================================
--- trunk/client/src/main/java/org/teiid/net/socket/SocketServerInstanceImpl.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/client/src/main/java/org/teiid/net/socket/SocketServerInstanceImpl.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -52,9 +52,9 @@
import org.teiid.core.crypto.Cryptor;
import org.teiid.core.crypto.DhKeyGenerator;
import org.teiid.core.crypto.NullCryptor;
+import org.teiid.jdbc.JDBCPlugin;
import org.teiid.net.CommunicationException;
import org.teiid.net.HostInfo;
-import org.teiid.net.NetPlugin;
/**
@@ -112,7 +112,7 @@
Object obj = this.socketChannel.read();
if (!(obj instanceof Handshake)) {
- throw new CommunicationException(NetPlugin.Util.getString("SocketServerInstanceImpl.handshake_error")); //$NON-NLS-1$
+ throw new CommunicationException(JDBCPlugin.Util.getString("SocketServerInstanceImpl.handshake_error")); //$NON-NLS-1$
}
handshake = (Handshake)obj;
break;
Modified: trunk/client/src/main/java/org/teiid/net/socket/SocketUtil.java
===================================================================
--- trunk/client/src/main/java/org/teiid/net/socket/SocketUtil.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/client/src/main/java/org/teiid/net/socket/SocketUtil.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -43,7 +43,8 @@
import javax.net.ssl.TrustManagerFactory;
import org.teiid.core.util.Assertion;
-import org.teiid.net.NetPlugin;
+import org.teiid.core.util.PropertiesUtils;
+import org.teiid.jdbc.JDBCPlugin;
@@ -61,14 +62,12 @@
static final String KEYSTORE_TYPE = "org.teiid.ssl.keyStoreType"; //$NON-NLS-1$
static final String KEYSTORE_PASSWORD = "org.teiid.ssl.keyStorePassword"; //$NON-NLS-1$
static final String KEYSTORE_FILENAME = "org.teiid.ssl.keyStore"; //$NON-NLS-1$
+ public static final String ALLOW_ANON = "org.teiid.ssl.allowAnon"; //$NON-NLS-1$
- static final String DEFAULT_KEYSTORE_PROTOCOL = "SSLv3"; //$NON-NLS-1$
static final String DEFAULT_KEYSTORE_TYPE = "JKS"; //$NON-NLS-1$
- public static final String NONE = "none"; //$NON-NLS-1$
-
public static final String ANON_CIPHER_SUITE = "TLS_DH_anon_WITH_AES_128_CBC_SHA"; //$NON-NLS-1$
- public static final String ANON_PROTOCOL = "TLS"; //$NON-NLS-1$
+ public static final String DEFAULT_PROTOCOL = "TLSv1"; //$NON-NLS-1$
public static class SSLSocketFactory {
private boolean isAnon;
@@ -93,23 +92,20 @@
String keystore = props.getProperty(KEYSTORE_FILENAME);
String keystorePassword = props.getProperty(KEYSTORE_PASSWORD);
String keystoreType = props.getProperty(KEYSTORE_TYPE, DEFAULT_KEYSTORE_TYPE);
- String keystoreProtocol = props.getProperty(PROTOCOL, DEFAULT_KEYSTORE_PROTOCOL);
+ String keystoreProtocol = props.getProperty(PROTOCOL, DEFAULT_PROTOCOL);
String keystoreAlgorithm = props.getProperty(KEYSTORE_ALGORITHM);
String truststore = props.getProperty(TRUSTSTORE_FILENAME, keystore);
String truststorePassword = props.getProperty(TRUSTSTORE_PASSWORD, keystorePassword);
- boolean anon = NONE.equalsIgnoreCase(truststore);
+ boolean anon = PropertiesUtils.getBooleanProperty(props, ALLOW_ANON, true);
SSLContext result = null;
- // 0) anon
// 1) keystore != null = 2 way SSL (can define a separate truststore too)
// 2) truststore != null = 1 way SSL (here we can define custom properties for truststore; useful when
// client like a appserver have to define multiple certs without importing
// all the certificates into one single certificate
// 3) else = javax properties; this is default way to define the SSL anywhere.
- if (anon) {
- result = getAnonSSLContext();
- } else if (keystore != null) {
+ if (keystore != null) {
// 2 way SSL
result = getClientSSLContext(keystore, keystorePassword, truststore, truststorePassword, keystoreAlgorithm, keystoreType, keystoreProtocol);
} else if(truststore != null) {
@@ -149,7 +145,7 @@
}
public static SSLContext getAnonSSLContext() throws IOException, GeneralSecurityException {
- return getSSLContext(null, null, null, null, null, null, ANON_PROTOCOL);
+ return getSSLContext(null, null, null, null, null, null, DEFAULT_PROTOCOL);
}
public static SSLContext getSSLContext(String keystore,
@@ -208,7 +204,7 @@
try {
stream = new FileInputStream(name);
} catch (FileNotFoundException e) {
- IOException exception = new IOException(NetPlugin.Util.getString("SocketHelper.keystore_not_found", name)); //$NON-NLS-1$
+ IOException exception = new IOException(JDBCPlugin.Util.getString("SocketHelper.keystore_not_found", name)); //$NON-NLS-1$
exception.initCause(e);
throw exception;
}
Modified: trunk/client/src/main/resources/org/teiid/jdbc/i18n.properties
===================================================================
--- trunk/client/src/main/resources/org/teiid/jdbc/i18n.properties 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/client/src/main/resources/org/teiid/jdbc/i18n.properties 2010-09-24 18:51:07 UTC (rev 2603)
@@ -1,4 +1,3 @@
-#
# 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
@@ -18,70 +17,38 @@
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301 USA.
-#
# ==========================================
# Error Messages for the JDBC Package
# ==========================================
DataTypeTransformer.Err_converting=Unable to transform the column value {0} to a {1}.
-DataTypeTransformer.Runtime_err_converting=Unable to transform {0} to a {1} value: {2}.
-DataTypeTransformer.Err_converting_boolean=Unable to transform the column value {0} to Boolean. Expected 0 or 1.
-DataTypeTransformer.Err_converting_date=Failed to transform String to Date. Expected format = yyyy-mm-dd for {0}.
-DataTypeTransformer.Err_converting_time=Failed to transform String to Time. Expected format = hh:mm:ss for {0}.
-DataTypeTransformer.Err_converting_timestamp=Failed to transform String to Timestamp. Expected format = yyyy-mm-dd hh:mm:ss.fffffffff for {0}.
JDBC.Method_not_supported=This method is not supported.
-MMCallableStatement.Unable_to_transform=The parameter value {0} could not be transformed into a {1} value.
-MMCallableStatement.SQL3_types_not_supported=SQL3 data types are not supported.
MMPreparedStatement.Err_transform_obj=Unable to transform the object into the target JDBC type.
MMCallableStatement.Param_not_found=Parameter is not found at index {0}.
-MMCallableStatement.parse_error=Parsing error: The required escape syntax is {[?=]call procedure_name[(?,?,...)]}
-MMConnection.Err_closing_conn=Error trying to close connection.
MMConnection.Err_closing_stmts=Error trying to close statements on this connection.
-MMConnection.Err_committing=Unable to commit the current transaction: {0}.
-MMConnection.Err_rollingback=Error while trying to roll back the transaction: {0}.
MMConnection.Cant_use_closed_connection=Cannot perform operations on a closed connection.
MMConnection.Scrollable_type_not_supported=Scrollable type {0} is not supported.
MMConnection.Concurrency_type_not_supported=Concurrency type {0} is not supported.
MMConnection.SQL_cannot_be_null=SQL cannot be null for CallableStatement or PreparedStatement.
MMDatabaseMetadata.Err_getting_primary_keys=Error trying to get metadata information about primary/foreign keys.
-MMDataSource.Cant_load_driver=Unable to load JDBC driver - check class path for jar files.
MMDataSource.Err_connecting=Error while connecting: {0}.
-MMDataSource.Err_creating_XAConn=JDBC XADataSource failed to create XAConnection: {0}
-MMDriver.Invalid_log_name=Invalid file name for the log file : {0}
MMPreparedStatement.Err_prep_sql=Error preparing sql for MMPreparedStatement as the sql is null.
MMPreparedStatement.Invalid_param_index=The index of a parameter must be a positive integer.
-MMPreparedStatement.No_param_value=No value is set for parameter {0}.
MMResultSet.Cant_call_closed_resultset=Error trying to operate on a closed ResultSet object.
-MMResultSet.cannot_convert_to_character_stream=Cannot convert to character stream
MMResultSet.cannot_convert_to_binary_stream=Cannot convert to binary stream
-MMStatement.Err_getting_update_row=Unable to get the current row in this ResultSet.
MMStatement.Error_executing_stmt=Error trying to execute a statement {0}.
-ResultsImpl.Metadata_null=ResultSetMetadata shouldn''t be null.
-MMStatement.Timeout_before_execute=Request timed out before it could execute, change the timeout value and re-execute the request.
MMStatement.Cancel_before_execute=Request was canceled before it could finish executing.
MMStatement.Invalid_fetch_size=Fetch size should always be a value of 0 <= fetch size <= max rows.
-MMStatement.Invalid_feild_size=Field size should be >= 0.
-MMStatement.Err_start_auto_txn=Failed automatically creating a transaction for request {0}.
-MMStatement.Err_end_auto_txn=Failed ending automatically started transaction.
-MMStatement.Cancel_before_complete=Statement was canceled before operation completed.
MMStatement.Timeout_before_complete=Operation timed out before completion.
-MMStatement.Stmt_closed_before_complete=Statement was closed before operation completed.
-ResultsImpl.Fwd_only=This method cannot be called on a TYPE_FORWARD_ONLY resultSet.
-CursorResultsImpl.Moving_back_on_fwd_only=Unable to move back on a TYPE_FORWARD_ONLY resultSet.
MMResultsImpl.Col_doesnt_exist=Column name "{0}" does not exist.
ResultsImpl.Op_invalid_fwd_only=This operation cannot be executed on TYPE_FORWARD_ONLY ResultSets.
-ResultsImpl.Null_results=Unable to execute this operation because the results are null.
ResultsImpl.Invalid_col_index=Column index {0} is invalid. Index must be >= 0 and <= column count.
-ResultsImpl.Cant_check_method=Cannot check {0} - no results are available.
-CursorResultsImpl.Exception_during_processing=Exception occured during results processing. Use getException() for a more detailed exception and information.
MMConnection.Session_success=Successfully obtained a session.
MMConnection.Connection_close_success=Connection successfully closed.
MMConnection.Err_connection_close=Error trying to close driver connection: {0}
MMConnection.Commit_success=Successfully committed transactions on all open statements on this connection.
-MMConnection.Commit_failed=Unable to commit the present transaction: {0}.
MMConnection.Rollback_success=Successfully rolled back transactions on all open statements on this connection.
-MMConnection.Rollback_failed=Unable to rollback the present transaction: {0}.
MMDatabaseMetadata.Best_row_sucess=Successfully obtained best row identifier information for the table {0}.
MMDatabaseMetadata.Catalog_success=Catalog metadata info successfully obtained for this connection.
MMDatabaseMetadata.getCols_error=Error trying to get metadata info for the columns that match {0} present in the tables that match {1} - {2}.
@@ -105,65 +72,27 @@
MMDatabaseMetadata.getTable_error=Error trying to obtain metadata information for the tables that match {0}: {1}.
MMDatabaseMetadata.getTable_success=Successfully obtained metadata information for the table names that match {0}.
MMDatabaseMetadata.getTableType_success=Successfully obtained metadata information for the table types.
-MMDatabaseMetadata.getTypes_error=Error trying to obtain metadata information for supported data types {0}.
MMDatabaseMetadata.getTypes_success=Successfully obtained metadata info for supported data types.
-MMDatabaseMetadata.getUserDefTypes_error=Error trying to obtain metadata information for supported user defined data types: {0}.
-MMDatabaseMetadata.getUserDefTypes_success=Successfully obtained metadata info for supported user defined data types.
MMDatabaseMetadata.getVersionCols_success=Successfully obtained version column information for this connection.
MMDatabaseMetadata.getIndex_error=Error trying to get metadata information for indexes present on the table {0} - {1}.
-MMDatabaseMetadata.getModels_error=Error trying to get metadata information for models that match {0} - {1}.
MMDriver.Err_registering=JDBC driver could not be registered with the DriverManager: {0}.
MMDriver.urlFormat=The required url format is jdbc:teiid:VDBName@mm[s]://server1:port1[,server2:port2][;optional properties]
JDBCDriver.Connection_sucess=The JDBC Driver successfully obtained a connection.
-MMDriver.Err_init_appinfo=Could not initialize ApplicationInfo (Version number): {0}.
MMStatement.Close_stmt_success=Statement closed successfully.
MMStatement.Stmt_closed=Unable to perform operations on an already closed statement.
-MMStatement.Invalid_query_type= Invalid query type, the query {0} cannot be executed.
-MMStatement.Err_query=Error trying to execute a query statement {0}: {1}
MMStatement.Success_query=Successfully executed a query {0} and obtained results
-MMStatement.Err_update=Error trying to execute an Update statement {0}: {1}
-MMStatement.Success_update= Successfully executed an update {0}.
-MMBlob.Unable_to_get_bytes_from_pos_to_length._{0}_1=Unable to get bytes from pos to length. {0}
-MMBlob.Unable_to_get_the_position_for_the_byte_array._{0}_2=Unable to get the position for the byte array. {0}
-MMClob.Unable_to_get_chars_from_pos_to_length._{0}_1=Unable to get chars from pos to length. {0}
-MMClob.Unable_to_get_the_position_of___{0}__._{1}_2=Unable to get the position of ''{0}''. {1}
-MMDataSource.Credentials_string_must_begin_with_(=Credentials string must begin with ''('' and end with '')''
+MMStatement.Invalid_field_size=Invalid MaxFieldSize {0}
MMDataSource.Port_number_must_be_positive=The port number must be a positive number
MMDataSource.serverPort_must_be_a_number=The serverPort property must be a number.
MMDataSource.Server_name_required=The server name must be specified
MMDataSource.Invalid_trans_auto_wrap_mode=The transaction auto-wrap setting must be one of \"{0}\", \"{1}\", or \"{2}\".
-MMDataSource.Name_value_pair_missing_name=The name-value pair \"{0}\" is missing a name
-MMDataSource.Name_value_pair_missing_value=The name-value pair \"{0}\" is missing a value
-MMDataSource.Name_value_pair_used=There name-value pair \"{0}\" has the same name as a previous pair in the same credential specification
-MMDataSource.Missing_system_property=Missing ''system'' property in credential specification "{0}"
MMDataSource.Sockets_per_vm_invalid=The property socketsPerVM must be a positive number.
MMDataSource.Sticky_connections_invalid=The property stickyConnections must be boolean.
MMDataSource.Alternate_Servers_format=The format for the alternateServers property is <server2>[:<port2>][,<server3>[:<port3>],...].
MMDataSource.alternateServer_is_invalid=The alternateServers property contains the following {0} error(s): {1}
-MMStatement.Unable_to_communicate_with_server_13=Unable to communicate with server
-MMStatement.Unable_to_communicate_with_server_16=Unable to communicate with server
-StreamImpl._Unable_to_initialize_the_stream_implementation_and_get_the_first_chunk_of_stream.__{0}_1=\ Unable to initialize the stream implementation and get the first chunk of stream. {0}
-StreamImpl._Unable_to_operate_on_already_closed_stream._2=\ Unable to operate on already closed stream.
StreamImpl.Unable_to_read_data_from_stream=Unable to read data from the stream: {0}
-StreamImpl.Unable_to_get_stream_length=Unable to get value chunk for valueID: {0}
-StoredProcedureCall.whitespace_in_name=The procedure name contains whitespace
-LocalTransportHandler.Failed_to_initialize_factory_1=Failed to initialize factory
-LocalTransportHandler.Invalid_config_file_extension=Invalid configuration file extension: {0}.
-LocalTransportHandler.No_configuration_file_set_in_property=No configuration file set in property: \"{0}\"
-LocalTransportHandler.Transport_shutdown=Tranport has been shutdown.
-LocalTransportHandler.session_inactive=execution denied; The session is in-active.
-MultiTransportFactory.Invalid_transport__{0}_1=Invalid transport: {0}
-MultiTransportFactory.Unable_to_find_transport_handler_class__{0}_2=Unable to find transport handler class: {0}
-MultiTransportFactory.Unable_to_instantiate_transport_handler_class,_likely_because_the_class_is_an_interface_or_abstract_class__{0}_3=Unable to instantiate transport handler class, likely because the class is an interface or abstract class: {0}
-MultiTransportFactory.Not_able_to_construct_transport_handler_class_due_to_security_restrictions__{0}_4=Not able to construct transport handler class due to security restrictions: {0}
-MultiTransportFactory.Transport_handler_class_does_not_implement_TransportHandler_interface__{0}_5=Transport handler class does not implement TransportHandler interface: {0}
-MMStatement.Time_out_for_current_request_with_ID___1=Time out for current request with ID:
-MMStatement.Request_is_cancelled_for___3=Request is cancelled for:
-MMStatement.Time_out_happened__n_1=Time out happened:
-MMStatement.Statement_is_cancelled__n_2=Statement is cancelled:
-MMStatement.Operation_Not_Supported=Update/Insert/Delete operation is not supported on read only connection state.(SQL: {0}).
+
MMStatement.Invalid_During_Transaction=Call to method {0} not valid during a transaction.
-MMStatement.Starting_transaction=Starting a transaction for this connection: {0}
StoredProcedureResultsImpl.ResultSet_cursor_is_after_the_last_row._1=ResultSet cursor is after the last row.
StoredProcedureResultsImpl.Invalid_parameter_index__{0}_2=Invalid parameter index: {0}
ResultsImpl.The_cursor_is_not_on_a_valid_row._1=The cursor is not on a valid row.
@@ -174,81 +103,49 @@
MMXAResource.FailedForgetTXN=Failed forgetting back transaction for xid "{0}".
MMXAResource.FailedEndTXN=Failed ending transaction for xid "{0}" with flag "{1}".
MMXAResource.FailedCommitTXN=Failed comitting transaction for xid "{0}" with flag "{1}".
-MMXAResource.FailedSetTXNTimeout=Failed setting timeout to "{0}". Default timeout will be used.
MMXAResource.FailedISSameRM=Failed determining isSameRM
MMXAConnection.connection_is_closed=Connection is closed and can not be reused.
-StaticMetadataProvider.No_metadata=No metadata is defined
StaticMetadataProvider.Invalid_column=Invalid column index: {0}
-StoredProcedureCall.unnecessary_paren=Unnecessary '')'' after procedure name
-StoredProcedureCall.unexpected_tokens=Unexpected token(s) between '')'' and ''}''
-ResultsMetadataWithProvider.No_provider=Unable to retrieve metadata as no metadata provider has been set.
DeferredMetadataProvider.Invalid_data=Invalid data for DeferredMetadataProvider: {0}, {1}
-MMStatement.Automatic_transaction_wrapping_failed._1=Automatic transaction wrapping failed.
FilteredResultsMetadata.Invalid_index=Invalid column index: {0}
-UserTransactionProxy.Received_exception_when_begining_transaction=Received exception when begining transaction.
-UserTransactionProxy.Received_exception_when_committing_transaction=Received exception when committing transaction.
-UserTransactionProxy.Received_exception_when_rolling_back_transaction=Received exception when rolling back transaction.
-UserTransactionProxy.Received_exception_when_setting_transaction_to_rollback_only=Received exception when setting transaction to rollback only.
-UserTransactionProxy.Received_exception_when_getting_transaction_status=Received exception when getting transaction status.
-UserTransactionProxy.Not_involved_in_transaction=Not involved in transaction.
-UserTransactionProxy.Unknown_msg_type=Unable to determine returned message type {0}
-TransactionHelper.Unable_to_check_for_required_transaction=Unable to check for required transaction.
-MMStatement.Autowrapping_request_in_transaction=Autowrapping request in transaction.
MMStatement.Timeout_ocurred_in_Statement.=Timeout ocurred in Statement.
MMStatement.Error_timing_out.=Error timing out.
MMStatement.Bad_timeout_value=Invalid timeout value supplied. Valid range is greater than or equal to zero.
-MMStatement.no_result_set=Statement does not return a result set.
-MMCallableStatement.Timeout_ocurred_in_CallableStatement.=Timeout ocurred in CallableStatement.
-MMPreparedStatement.Timeout_ocurred_in_PreparedStatement.=Timeout ocurred in PreparedStatement.
WarningUtil.Failures_occurred=Partial results failures occurred
-DQPAdminImpl.DQP_restarted=DQP already restarted.
-DataTypeTransformer.char_transform_failed=Unable to transform the parameter value {0} to a Character: {1}
DataTypeTransformer.blob_too_big=The blob value is too large for the max supported length of 2147483647 bytes
DataTypeTransformer.cannot_get_bytes=Cannot convert this value to a byte array.
-EmbeddedConnectionFactory.NoClassDefFoundError=Unable to find the following class definition: {0}
-EmbeddedConnectionFactoryImpl.connection_limit=Reached license limit of {0} connections.
-EmbeddedConnectionFactoryImpl.no_product_license=Could not find a license for the embedded query product.
-EmbeddedConnectionFactory.vdb_notactive=Failed to create connection to VDB \"{0}\" with version \"{1}\", because this VDB status is not \"active\"
-EmbeddedConnectionFactory.vdb_notavailable=Failed to create connection to newest version of VDB \"{0}\". The VDB is not active or does not exist.
-EmbeddedConnection.DQP_shutDown=Embedded service has been shutdown, restart by connecting again.
-EmbeddedConnection.txn_notsupported=Transaction support is currently not available in the EmbeddedDriver
-MMDriver.Log_level_invalid=Invalid logging level, valid logging levels are {0}, {1}, {2}, {3}.
-BatchResults.Invalid_Batch=Invalid batch: begin row "{0}", end row "{1}"
-StoredProcedureCall.curlies=The escape syntax must start with ''{'' and end with ''}''
-StoredProcedureCall.equals=Expected ''='' after ''?''
-StoredProcedureCall.call=Could not find the CALL keyword
-StoredProcedureCall.no_whitespace=Expected whitespace after the CALL keyword
-StoredProcedureCall.procname=Expected a procedure name
WrapperImpl.wrong_class=Wrapped object is not an instance of {0}
-MMSQLXML.unsupported_source=Unsupported source class {0}
MMXAConnection.rolling_back=rolling back transaction.
MMXAConnection.rolling_back_error=Error while rolling back transaction.
MMDataSource.Virtual_database_name_must_be_specified=The virtual database name must be specified.
-MMDataSource.Log_level_invalid=Invalid logging level, valid logging levels are {0}, {1}, {2}, {3}.
MMDataSource.The_partial_mode_must_be_boolean._47=The partial mode must be boolean.
MMDataSource.The_fetch_size_must_be_greater_than_zero=The fetch size must be greater than zero.
-EmbeddedDataSource.Application_name_must_be_specified=The property ''applicationName'' must be specified.
-EmbeddedDataSource.Configuration_file_must_be_specified=The Embedded Service Bootstrap file must be specified.
EmbeddedDriver.URL_must_be_specified=The JDBC URL must be specified.
-EmbeddedDriver.Invalid_URL_format=The URL is invalid. Example: jdbc:teiid:<VDB Name>@<Path to embedded service configuration File>;key=value
-EmbeddedDriver.DQP_Application_Name_Undefined=This Application Name {0} does not exist. Please use a valid Application Name.
-EmbeddedDriver.DQP_ConfigFile_Name_Already_In_Use=This Embedded Service Bootstrap File {0} is already being used in conjunction with another Application Name. Application Names and Embedded Service Boostrap Files have a one to one relationship.
-EmbeddedDriver.MMDQP_DRIVER_could_not_be_registered=Embedded driver could not be registered with the DriverManager: {0}.
-EmbeddedDriver.use_existing_transport=Embedded driver is using the existing embedded service instance to create connection.
-EmbeddedDriver.use_new_transport=Embedded driver is creating a new embedded service instance for create connection.
-EmbeddedDriver.use_classpath=Embedded driver is using the following classpath to load the embedded service.
-EmbeddedDriver.use_properties=Embedded driver is using the following properties to load the embedded service.
-EmbeddedDriver.shutdown_sucessful=Shutdown request successful.
-EmbeddedDriver.shutdown_failure=Shutdown request failed.
-EmbeddedDataSource.Unable_to_load_MMDQP_Driver=Unable to load JDBC driver - check class path for jar files.
-EmbeddedDataSource.The_configFile_property_is_null=The configFile property is null.
-EmbeddedDataSource.The_configFile_does_not_exist_or_cant_be_read=The configFile does not exist or cannot be read.
-EmbeddedTransport.no_classpath=The Embedded Service Bootstrap does not contain a dqp.classpath property. Add the dqp.classpath property or specify unifiedClassLoader=true on the DQP JDBC URL.
-EmbeddedTransport.invalid_dqpproperties_path=The path {0} is invalid. Please check your file system and correct your JDBC URL.
StatementImpl.show_update_count=SHOW does not return an update count
-StatementImpl.set_result_set=SET does not return a result set.
\ No newline at end of file
+StatementImpl.set_result_set=SET does not return a result set.
+
+StreamImpl.Unable_to_read_data_from_stream=Unable to read data from the stream: {0}
+RequestMessage.invalid_txnAutoWrap=''{0}'' is an invalid transaction autowrap mode.
+LocalTransportHandler.Transport_shutdown=Tranport has been shutdown.
+PlatformServerConnectionFactory.Unable_to_find_a_component_used_in_logging_on_to=Unable to find a component used authenticate on to Teiid
+
+admin_conn_closed = The Admin connection has been closed.
+invalid_parameter = The user parameter may not be null or empty.
+
+SocketServerInstance.Connection_Error.Unknown_Host = Error establishing socket. Unknown host: {0}
+SocketServerInstance.Connection_Error.Connect_Failed = Error establishing socket to host and port: {0}:{1}. Reason: {2}
+SocketServerInstancePool.No_valid_host_available=No valid host available. Attempted connections to: {0}
+SocketServerInstanceImpl.handshake_error=Handshake error
+
+
+SocketServerConnection.closed=Server connection is closed
+SocketHelper.keystore_not_found=Key store ''{0}'' was not found.
+
+MMURL.INVALID_FORMAT=The required url format is {0}
+
+BatchSerializer.datatype_mismatch=The modeled datatype {0} for column {1} doesn''t match the runtime type "{2}". Please ensure that the column''s modeled datatype matches the expected data.
Deleted: trunk/client/src/main/resources/org/teiid/net/i18n.properties
===================================================================
--- trunk/client/src/main/resources/org/teiid/net/i18n.properties 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/client/src/main/resources/org/teiid/net/i18n.properties 2010-09-24 18:51:07 UTC (rev 2603)
@@ -1,134 +0,0 @@
-#
-# JBoss, Home of Professional Open Source.
-# See the COPYRIGHT.txt file distributed with this work for information
-# regarding copyright ownership. Some portions may be licensed
-# to Red Hat, Inc. under one or more contributor license agreements.
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA.
-#
-
-LocalClientConnection.No_listener_found_1=No listener found
-LocalServerConnection.client_shutdown=Client connection has been terminated by the server
-SessionToken.sessionid_null=The session ID may not be null
-SessionToken.session_compare_null = Attempt to compare null to SessionToken.
-TrustedSessionToken.token_null = The trusted token for a session token may not be null.
-StreamImpl.Unable_to_read_data_from_stream=Unable to read data from the stream: {0}
-
-RequestMessage.invalid_txnAutoWrap=''{0}'' is an invalid transaction autowrap mode.
-
-LocalTransportHandler.Transport_shutdown=Tranport has been shutdown.
-
-AbstractServerConnection.Created=AbstractServerConnection created - session ID: {0}
-AbstractServerConnection.Shutdown=AbstractServerConnection shutdown - session ID: {0}
-AbstractServerConnection.Unable_to_find_resources_with_ResourceFinder_1=Unable to find resources to load Server Instances
-AbstractServerConnection.Lost_communication_with_server_-_shutting_down.=Lost communication with server - shutting down.
-AbstractServerConnection.Error_attempting_server_connection_shutdown.=Error attempting server connection shutdown.
-
-PlatformServerConnection.Unable_to_create_new_PlatformMessageReceiver_2=Unable to create new PlatformMessageReceiver
-PlatformServerConnection.Error_attempting_server_connection_shutdown.=Error attempting server connection shutdown.
-PlatformServerConnection.Cant_get_resource=Unable to obtain a remote resource of type {0}
-
-PlatformServerConnectionFactory.Missing_required_property=Missing required property:
-PlatformServerConnectionFactory.Error_encrypting_user_password=Error encrypting user password
-PlatformServerConnectionFactory.Error_communicating_with_app_server=Error communicating with app server
-PlatformServerConnectionFactory.Error_logging_on_to_MetaMatrix=Error logging on to Teiid: {0}
-PlatformServerConnectionFactory.Unable_to_find_a_component_used_in_logging_on_to=Unable to find a component used authenticate on to Teiid
-PlatformServerConnectionFactory.Unable_to_get_a_PlatformServerConnection=Unable to get a PlatformServerConnection
-PlatformServerConnectionFactory.Error_comunicating_with_LogonAPI=Error communicating with LogonAPI
-PlatformServerConnectionFactory.JNDI_library_mismatch_plugin=Client library may not match server vendor or version for server {1}. Client code loaded from plugin: {2}, initial context factory: {0}.
-PlatformServerConnectionFactory.JNDI_library_mismatch=Client library may not match server vendor or version for server {1}. Client code loaded from: bootstrap class loader, initial context factory: {0}.
-
-RemoteResourceFinder.Invalid_user_session=Unable to find resources: invalid user session.
-RemoteResourceFinder.Unable_to_find_component=Unable to find resources: Unable to find component.
-RemoteResourceFinder.Error_communicating=Unable to find resources: Error communicating.
-
-ClientHeartbeat.Pinging_server_failed_after_{0}_retries.__Notifying_connection.=Pinging server failed after {0} retries. Notifying connection.
-
-PlatformMessageReceiver.Unable_to_receive_message_[{0}],_no_listeners_for_topic_[{1}]=Unable to receive message [{0}], no listeners for topic [{1}].
-ObjectSocket.write_on_closed_socket=Attempting to write to a closed socket.
-ObjectSocket.read_on_closed_socket=Attempting to read from a closed socket.
-ObjectSocket.eof=Reached end of input stream.
-ObjectSocket.peek_failed=Exception ''{0}'' while peeking a byte. Assuming end-of-stream.
-
-ConsoleConnectionFactory.established_connection=ConsoleConnectionFactory established a connection.
-
-
-
-MSG.014.010.0010 = Usage: VMController <vm_name> <host_name> <startDeployServices> [<log_file>]
-MSG.014.010.0011 = If startDeployedServices = true, deployedServices will be started.
-
-ERR.014.001.0099 = The user parameter may not be null or empty.
-ERR.014.001.0100 = The user password may not be null or empty.
-ERR.014.001.0101 = NamingException while getting new initialcontext for LogonAPI.
-ERR.014.001.0102 = Error trying to connect to server: {0} at {1}
-ERR.014.001.0103 = CreateException while getting home interface for LogonAPI.
-ERR.014.001.0104 = RemoteException while getting home interface for LogonAPI.
-ERR.014.001.0105 = Unknown error while obtaining a reference to LogonAPI.
-ERR.014.001.0106 = NamingException while getting new initialcontext for AdminAPI.
-ERR.014.001.0107 = NamingException while getting home interface for AdminAPI.
-ERR.014.001.0108 = CreateException while getting home interface for AdminAPI.
-ERR.014.001.0109 = RemoteException while getting home interface for AdminAPI.
-ERR.014.001.0110 = Unknown error while obtaining a reference to AdminAPI for user <{0}>
-
-
-SocketServerConnection.0=Connection refused: {0}
-
-SocketServerInstance.Connection_Error.Unknown_Host = Error establishing socket. Unknown host: {0}
-SocketServerInstance.Connection_Error.Connect_Failed = Error establishing socket to host and port: {0}:{1}. Reason: {2}
-SocketServerInstance.Connection_Error.Connect_Failed_to_HostInfo_Max_Attempts = Failed to connect to {0} on try [{1}]. Maximum number of retries reached.
-
-SocketServerInstance.Connection_Warning.Connect_Failed_to_HostInfo_Will_retry = Failed to connect to {0} on try [{1}]. Will attempt up to [{2}] time(s).
-
-SocketServerInstance.Connection_Detail.Connected_to_HostInfo = Connected to {0} on attempt number [{1}].
-SocketServerInstance.Connection_Detail.Connecting_to_HostInfo = Connecting to {0}. Attempt [{1}] of [{2}].
-
-ERR.014.001.0001 = Lost communication with the AdminAPI - the connection has been closed.
-ERR.014.001.0002 = Lost communication with the AdminAPI.
-
-MSG.014.001.0001 = Starting AdminAPIConnection for session <{0}>
-
-SocketServerInstancePool.No_valid_host_available=No valid host available. Attempted connections to: {0}
-
-AdminAuthorizationInterceptor.Admin_Session_not_valid=Unable to perform the action [{0}]. Unable to validate session.
-AdminAuthorizationInterceptor.Admin_Audit_request=Administrator [{0}], session [{1}] requesting access which requires role {2} to method [{3}].
-AdminAuthorizationInterceptor.Admin_not_authorized=Administrator [{0}], session [{1}] does not have any required role {2} so is not authorized to perform the action [{3}].
-AdminAuthorizationInterceptor.Admin_granted=Administrator [{0}], session [{1}] granted access to method [{3}].
-
-
-ClientConnectionImpl.ConnectionID=ClientConnectionImpl - connectionID: {0} message receiver: {1} properties: {2}
-ClientConnectionImpl.Send=ClientConnectionImpl.send - connectionID: {0} message key: {1} message {2}
-
-RemoteResourceImpl.Send_asynch=RemoteResourceImpl.send (asynch) - ClientID: {0} Message {1}
-RemoteResourceImpl.Send_synch=RemoteResourceImpl.send (synch) - ClientID: {0} Message {1}
-RemoteResourceImpl.Set_message_receiver=RemoteResourceImpl.setMessageReceiver - ClientID: {0} Message Receiver {1} Properties {2}
-
-SocketServerInstanceImpl.version_mismatch=Handshake failed due to version mismatch -- Client Version: {0}, Server Version: {1}
-SocketServerInstanceImpl.handshake_error=Handshake error
-SocketServerInstanceImpl.handshake_timeout=Handshake timeout
-SocketServerInstanceImpl.secure_error_during_handshake=Unable to complete handshake with the server. Ensure that the server is using secure sockets.
-SocketServerInstanceImpl.error_during_handshake=Unable to complete handshake with the server. Ensure that the server is not using secure sockets.
-SocketClientInstance.invalid_sessionkey=Invalid session key used during handshake
-
-SSLAwareChannelHandler.channel_closed=Channel closed
-
-SocketServerConnection.closed=Server connection is closed
-
-SocketHelper.keystore_not_found=Key store ''{0}'' was not found.
-
-MMURL.INVALID_FORMAT=The required url format is {0}
-
-BatchSerializer.datatype_mismatch=The modeled datatype {0} for column {1} doesn''t match the runtime type "{2}". Please ensure that the column''s modeled datatype matches the expected data.
-
Modified: trunk/client/src/main/resources/teiid-client-settings.properties
===================================================================
--- trunk/client/src/main/resources/teiid-client-settings.properties 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/client/src/main/resources/teiid-client-settings.properties 2010-09-24 18:51:07 UTC (rev 2603)
@@ -44,9 +44,6 @@
# authentication that requires trust not provided
# by the system defaults.
#
-# Set to NONE for anonymous authentication using
-# the TLS_DH_anon_WITH_AES_128_CBC_SHA cipher suite
-#
#org.teiid.ssl.trustStore=
@@ -57,11 +54,19 @@
#org.teiid.ssl.trustStorePassword=
#
-# The cipher protocol, defaults to SSLv3
+# The cipher protocol, defaults to TLSv1
#
-org.teiid.ssl.protocol=SSLv3
+org.teiid.ssl.protocol=TLSv1
+#
+# Whether to allow anonymous SSL
+# (the TLS_DH_anon_WITH_AES_128_CBC_SHA cipher suite)
+# defaults to true
+#
+
+org.teiid.ssl.allowAnon=true
+
########################################
# Misc Socket Configuration
########################################
Modified: trunk/client/src/test/java/org/teiid/jdbc/TestSocketProfile.java
===================================================================
--- trunk/client/src/test/java/org/teiid/jdbc/TestSocketProfile.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/client/src/test/java/org/teiid/jdbc/TestSocketProfile.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -118,4 +118,27 @@
assertTrue(p.getProperty(BaseDataSource.APP_NAME).equals("Client")); //$NON-NLS-1$
assertEquals(7, p.size());
}
+
+ @Test
+ public void testIPV6() throws SQLException{
+ assertTrue(SocketProfile.acceptsURL("jdbc:teiid:vdb@mm://[::1]:53535,127.0.0.1:1234")); //$NON-NLS-1$
+ assertTrue(SocketProfile.acceptsURL("jdbc:teiid:vdb@mm://[3ffe:ffff:0100:f101::1]:53535,127.0.0.1:1234")); //$NON-NLS-1$
+
+ Properties p = new Properties();
+ SocketProfile.parseURL("jdbc:teiid:BQT@mms://[3ffe:ffff:0100:f101::1]:1234;version=3", p); //$NON-NLS-1$
+ assertTrue(p.getProperty(BaseDataSource.VDB_NAME).equals("BQT")); //$NON-NLS-1$
+ assertTrue(p.getProperty(BaseDataSource.VDB_VERSION).equals("3")); //$NON-NLS-1$
+ assertTrue(p.getProperty(TeiidURL.CONNECTION.SERVER_URL).equals("mms://[3ffe:ffff:0100:f101::1]:1234")); //$NON-NLS-1$
+ assertTrue(p.getProperty(BaseDataSource.VERSION).equals("3")); //$NON-NLS-1$
+ }
+
+ @Test
+ public void testIPV6MultipleHosts() throws SQLException{
+ Properties p = new Properties();
+ SocketProfile.parseURL("jdbc:teiid:BQT@mms://[3ffe:ffff:0100:f101::1]:1234,[::1]:31000,127.0.0.1:2134;version=3", p); //$NON-NLS-1$
+ assertTrue(p.getProperty(BaseDataSource.VDB_NAME).equals("BQT")); //$NON-NLS-1$
+ assertTrue(p.getProperty(BaseDataSource.VDB_VERSION).equals("3")); //$NON-NLS-1$
+ assertTrue(p.getProperty(TeiidURL.CONNECTION.SERVER_URL).equals("mms://[3ffe:ffff:0100:f101::1]:1234,[::1]:31000,127.0.0.1:2134")); //$NON-NLS-1$
+ assertTrue(p.getProperty(BaseDataSource.VERSION).equals("3")); //$NON-NLS-1$
+ }
}
Modified: trunk/client/src/test/java/org/teiid/jdbc/TestStatement.java
===================================================================
--- trunk/client/src/test/java/org/teiid/jdbc/TestStatement.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/client/src/test/java/org/teiid/jdbc/TestStatement.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -84,5 +84,18 @@
assertEquals(Boolean.TRUE.toString(), p.getProperty(ExecutionProperties.ANSI_QUOTED_IDENTIFIERS));
}
+ @Test public void testTransactionStatements() throws Exception {
+ ConnectionImpl conn = Mockito.mock(ConnectionImpl.class);
+ Properties p = new Properties();
+ Mockito.stub(conn.getExecutionProperties()).toReturn(p);
+ StatementImpl statement = new StatementImpl(conn, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
+ assertFalse(statement.execute("start transaction")); //$NON-NLS-1$
+ Mockito.verify(conn).setAutoCommit(false);
+ assertFalse(statement.execute("commit")); //$NON-NLS-1$
+ Mockito.verify(conn).setAutoCommit(true);
+ assertFalse(statement.execute("start transaction")); //$NON-NLS-1$
+ assertFalse(statement.execute("rollback")); //$NON-NLS-1$
+ Mockito.verify(conn).rollback(false);
+ }
}
Modified: trunk/client/src/test/java/org/teiid/jdbc/TestTeiidDataSource.java
===================================================================
--- trunk/client/src/test/java/org/teiid/jdbc/TestTeiidDataSource.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/client/src/test/java/org/teiid/jdbc/TestTeiidDataSource.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -483,6 +483,43 @@
"jdbc:teiid:vdbName@mm://hostname:7001;fetchSize=500;ApplicationName=JDBC;VirtualDatabaseVersion=1.2.3;partialResultsMode=true;VirtualDatabaseName=vdbName"); //$NON-NLS-1$
}
+ public void testBuildingIPv6() {
+ final String serverName = "3ffe:ffff:0100:f101::1"; //$NON-NLS-1$
+ final String vdbName = "vdbName"; //$NON-NLS-1$
+ final String vdbVersion = "1"; //$NON-NLS-1$
+ final int portNumber = 7001;
+ final String transactionAutoWrap = null;
+ final String partialMode = "true"; //$NON-NLS-1$
+ final boolean secure = false;
+ helpTestBuildingURL(vdbName,vdbVersion,serverName,portNumber,null,transactionAutoWrap, partialMode, 500, false, secure,
+ "jdbc:teiid:vdbName@mm://[3ffe:ffff:0100:f101::1]:7001;fetchSize=500;ApplicationName=JDBC;VirtualDatabaseVersion=1;partialResultsMode=true;VirtualDatabaseName=vdbName"); //$NON-NLS-1$
+ }
+
+ public void testBuildingIPv6WithBrackets() {
+ final String serverName = "[3ffe:ffff:0100:f101::1]"; //$NON-NLS-1$
+ final String vdbName = "vdbName"; //$NON-NLS-1$
+ final String vdbVersion = "1"; //$NON-NLS-1$
+ final int portNumber = 7001;
+ final String transactionAutoWrap = null;
+ final String partialMode = "true"; //$NON-NLS-1$
+ final boolean secure = false;
+ helpTestBuildingURL(vdbName,vdbVersion,serverName,portNumber,null,transactionAutoWrap, partialMode, 500, false, secure,
+ "jdbc:teiid:vdbName@mm://[3ffe:ffff:0100:f101::1]:7001;fetchSize=500;ApplicationName=JDBC;VirtualDatabaseVersion=1;partialResultsMode=true;VirtualDatabaseName=vdbName"); //$NON-NLS-1$
+ }
+
+ public void testBuildingIPv6Alternate() {
+ final String serverName = "3ffe:ffff:0100:f101::1"; //$NON-NLS-1$
+ final String vdbName = "vdbName"; //$NON-NLS-1$
+ final String vdbVersion = "1"; //$NON-NLS-1$
+ final int portNumber = 7001;
+ final String transactionAutoWrap = null;
+ final String partialMode = "true"; //$NON-NLS-1$
+ final boolean secure = false;
+ final String alternates = "[::1],127.0.0.1:1234"; //$NON-NLS-1$
+ helpTestBuildingURL(vdbName,vdbVersion,serverName,portNumber,alternates,transactionAutoWrap, partialMode, 500, false, secure,
+ "jdbc:teiid:vdbName@mm://[3ffe:ffff:0100:f101::1]:7001,[::1]:7001,127.0.0.1:1234;fetchSize=500;ApplicationName=JDBC;VirtualDatabaseVersion=1;partialResultsMode=true;VirtualDatabaseName=vdbName"); //$NON-NLS-1$
+ }
+
public void testBuildingURL2() {
final String serverName = "hostName"; //$NON-NLS-1$
final String vdbName = "vdbName"; //$NON-NLS-1$
Modified: trunk/client/src/test/java/org/teiid/jdbc/util/ResultSetUtil.java
===================================================================
--- trunk/client/src/test/java/org/teiid/jdbc/util/ResultSetUtil.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/client/src/test/java/org/teiid/jdbc/util/ResultSetUtil.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -32,9 +32,12 @@
import java.io.PrintStream;
import java.io.StringWriter;
import java.lang.reflect.Method;
+import java.sql.Blob;
+import java.sql.Clob;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
+import java.sql.SQLXML;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
@@ -279,12 +282,19 @@
int totalRows = 0;
while (rs.next()) {
for (int j = 1; j <= count; j++) {
+ Object obj = rs.getObject(j);
+ if (obj instanceof SQLXML) {
+ obj = ((SQLXML)obj).getString();
+ } else if (obj instanceof Clob) {
+ obj = "Clob[" + ((Clob)obj).length() + "]"; //$NON-NLS-1$ //$NON-NLS-2$
+ } else if (obj instanceof Blob) {
+ obj = "Blob[" + ((Blob)obj).length() + "]"; //$NON-NLS-1$ //$NON-NLS-2$
+ }
if (maxColWidth == 0) {
- Object obj = rs.getObject(j);
- out.print(obj == null ? NULL : obj); //$NON-NLS-1$
+ out.print(obj == null ? NULL : obj);
if (j != count) out.print(SPACER);
} else {
- String resizedString = resizeString(rs.getObject(j), sizes[j-1]);
+ String resizedString = resizeString(obj, sizes[j-1]);
out.print(resizedString);
if (j != count && resizedString.length() <= sizes[j-1]) {
out.print(SPACER);
@@ -346,7 +356,7 @@
try {
Method m = RSMD.getMethod(METADATA_METHODS[i], params);
Object obj = m.invoke(rsmd, columnParam);
- String stringVal = (obj == null) ? NULL : obj.toString(); //$NON-NLS-1$
+ String stringVal = (obj == null) ? NULL : obj.toString();
metadataStrings[col - 1][i] = stringVal;
if (maxColWidths[i] < stringVal.length()) {
maxColWidths[i] = stringVal.length();
@@ -378,7 +388,7 @@
private static String resizeString(Object obj, int size) {
if (obj == null) {
- return resizeString(NULL, size); //$NON-NLS-1$
+ return resizeString(NULL, size);
}
String str = obj.toString();
if (str.length() == size) {
Deleted: trunk/client/src/test/java/org/teiid/net/TestMMURL.java
===================================================================
--- trunk/client/src/test/java/org/teiid/net/TestMMURL.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/client/src/test/java/org/teiid/net/TestMMURL.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -1,262 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package org.teiid.net;
-
-import java.util.List;
-
-import org.teiid.net.HostInfo;
-import org.teiid.net.TeiidURL;
-
-import junit.framework.TestCase;
-
-
-
-/**
- * @since 4.2
- */
-public class TestMMURL extends TestCase {
-
- public static final String REQUIRED_URL = TeiidURL.FORMAT_SERVER;
-
- /**
- * Constructor for TestMMURL.
- * @param name
- */
- public TestMMURL(String name) {
- super(name);
- }
-
- public final void testMMURL() {
- String SERVER_URL = "mm://localhost:31000"; //$NON-NLS-1$
- assertTrue(TeiidURL.isValidServerURL(SERVER_URL));
-
- TeiidURL url = new TeiidURL(SERVER_URL);
- List hosts = url.getHostInfo();
- assertNotNull("MMURL should have 1 Host", hosts ); //$NON-NLS-1$
- assertEquals(1,hosts.size());
- }
-
- public final void testBogusProtocol() {
- String SERVER_URL = "foo://localhost:31000"; //$NON-NLS-1$
- assertFalse(TeiidURL.isValidServerURL(SERVER_URL));
-
- try {
- new TeiidURL(SERVER_URL);
- fail("MM URL passed non standard protocal fine"); //$NON-NLS-1$
- } catch (RuntimeException e) {
- assertEquals(TeiidURL.INVALID_FORMAT_SERVER, e.getMessage());
- }
- }
- public final void testBogusProtocol1() {
- String SERVER_URL = "foo://localhost:31000"; //$NON-NLS-1$
- assertFalse(TeiidURL.isValidServerURL(SERVER_URL));
-
- try {
- new TeiidURL(SERVER_URL);
- fail("MM URL passed non standard protocal fine"); //$NON-NLS-1$
- } catch (RuntimeException e) {
- assertEquals(TeiidURL.INVALID_FORMAT_SERVER, e.getMessage());
- }
- }
-
- public final void testMMURLSecure() {
- String SERVER_URL = "mms://localhost:31000"; //$NON-NLS-1$
- assertTrue(TeiidURL.isValidServerURL(SERVER_URL));
-
- TeiidURL url = new TeiidURL(SERVER_URL);
- List hosts = url.getHostInfo();
- assertNotNull("MMURL should have 1 Host", hosts ); //$NON-NLS-1$
- assertEquals(1,hosts.size());
- }
-
- public final void testMMURLBadProtocolMM() {
- String SERVER_URL = "mmm://localhost:31000"; //$NON-NLS-1$
- assertFalse(TeiidURL.isValidServerURL(SERVER_URL));
-
- try {
- new TeiidURL(SERVER_URL);
- fail("MMURL did not throw an exception"); //$NON-NLS-1$
- } catch( IllegalArgumentException e ) {
- assertEquals(TeiidURL.INVALID_FORMAT_SERVER,e.getMessage());
- }
- }
-
- public final void testMMURLWrongSlash() {
- String SERVER_URL = "mm:\\\\localhost:31000"; //$NON-NLS-1$
- assertFalse(TeiidURL.isValidServerURL(SERVER_URL));
-
- try {
- new TeiidURL(SERVER_URL);
- fail("MMURL did not throw an exception"); //$NON-NLS-1$
- } catch( IllegalArgumentException e ) {
- assertEquals(TeiidURL.INVALID_FORMAT_SERVER,e.getMessage());
- }
- }
-
- public final void testMMURLOneSlash() {
- String SERVER_URL = "mm:/localhost:31000"; //$NON-NLS-1$
- assertFalse(TeiidURL.isValidServerURL(SERVER_URL));
-
- try {
- new TeiidURL(SERVER_URL);
- fail("MMURL did not throw an exception"); //$NON-NLS-1$
- } catch( IllegalArgumentException e ) {
- assertEquals(TeiidURL.INVALID_FORMAT_SERVER,e.getMessage());
- }
- }
-
- public final void testMMURLNoHost() {
- String SERVER_URL = "mm://:31000"; //$NON-NLS-1$
- assertFalse(TeiidURL.isValidServerURL(SERVER_URL));
-
- try {
- new TeiidURL(SERVER_URL);
- fail("MMURL did not throw an exception"); //$NON-NLS-1$
- } catch( IllegalArgumentException e ) {
- assertEquals(TeiidURL.INVALID_FORMAT_SERVER,e.getMessage());
- }
- }
-
- public final void testMMURLNoHostAndPort() {
- String SERVER_URL = "mm://:"; //$NON-NLS-1$
- assertFalse(TeiidURL.isValidServerURL(SERVER_URL));
-
- try {
- new TeiidURL(SERVER_URL);
- fail("MMURL did not throw an exception"); //$NON-NLS-1$
- } catch( IllegalArgumentException e ) {
- assertEquals(TeiidURL.INVALID_FORMAT_SERVER,e.getMessage());
- }
- }
-
- public final void testMMURLNoHostAndPort2() {
- String SERVER_URL = "mm://"; //$NON-NLS-1$
- assertFalse(TeiidURL.isValidServerURL(SERVER_URL));
-
- try {
- new TeiidURL(SERVER_URL);
- fail("MMURL did not throw an exception"); //$NON-NLS-1$
- } catch( IllegalArgumentException e ) {
- assertEquals(TeiidURL.INVALID_FORMAT_SERVER,e.getMessage());
- }
- }
-
- public final void testMMURLBadPort() {
- String SERVER_URL = "mm://localhost:port"; //$NON-NLS-1$
- assertFalse(TeiidURL.isValidServerURL(SERVER_URL));
-
- try {
- new TeiidURL(SERVER_URL);
- fail("MMURL did not throw an Exception"); //$NON-NLS-1$
- } catch( IllegalArgumentException e ) {
- }
- }
-
- public final void testMMURL2Hosts() {
- String SERVER_URL = "mm://localhost:31000,localhost:31001"; //$NON-NLS-1$
- assertTrue(TeiidURL.isValidServerURL(SERVER_URL));
-
- TeiidURL url = new TeiidURL(SERVER_URL);
- List hosts = url.getHostInfo();
- assertNotNull("MMURL should have 2 Host", hosts ); //$NON-NLS-1$
- assertEquals(2,hosts.size());
- }
-
- public final void testMMURL3Hosts() {
- String SERVER_URL = "mm://localhost:31000,localhost:31001,localhost:31002"; //$NON-NLS-1$
- assertTrue(TeiidURL.isValidServerURL(SERVER_URL));
-
- TeiidURL url = new TeiidURL(SERVER_URL);
- List hosts = url.getHostInfo();
- assertNotNull("MMURL should have 3 Host", hosts ); //$NON-NLS-1$
- assertEquals(3,hosts.size());
- }
-
- public final void testGetHostInfo() {
- String SERVER_URL = "mm://localhost:31000"; //$NON-NLS-1$
- assertTrue(TeiidURL.isValidServerURL(SERVER_URL));
-
- TeiidURL url = new TeiidURL(SERVER_URL);
- assertNotNull(url.getHostInfo() );
- }
-
- public final void testGetProtocolStandalone() {
- TeiidURL url = new TeiidURL("mm://localhost:31000"); //$NON-NLS-1$
- assertNotNull(url);
- assertEquals("mm://localhost:31000",url.getAppServerURL()); //$NON-NLS-1$
- }
-
- public final void testHasMoreElements() {
- TeiidURL url = new TeiidURL("mm://localhost:31000,localhost:31001"); //$NON-NLS-1$
- assertNotNull(url);
- assertFalse(url.getHostInfo().isEmpty());
- }
-
- public final void testNextElement() {
- TeiidURL url = new TeiidURL("mm://localhost:31000,localhost:31001"); //$NON-NLS-1$
- assertEquals(2, url.getHostInfo().size());
- }
-
- public final void testHostInfoEquals() {
- HostInfo expectedResults = new HostInfo("localhost",31000); //$NON-NLS-1$
- TeiidURL url = new TeiidURL("mm://localhost:31000"); //$NON-NLS-1$
- HostInfo actualResults = url.getHostInfo().get(0);
- assertEquals(expectedResults,actualResults);
- }
-
- public final void testWithEmbeddedSpaces() {
- HostInfo expectedResults = new HostInfo("localhost",12345); //$NON-NLS-1$
-
- TeiidURL url = new TeiidURL("mm://localhost : 12345"); //$NON-NLS-1$
- List hosts = url.getHostInfo();
- assertNotNull("MMURL should have 1 Host", hosts ); //$NON-NLS-1$
- assertEquals(1,hosts.size());
- HostInfo actualResults = url.getHostInfo().get(0);
- assertEquals(expectedResults,actualResults);
- }
-
- public final void testHostPortConstructor() {
- HostInfo expectedResults = new HostInfo("myhost", 12345); //$NON-NLS-1$
-
- TeiidURL url = new TeiidURL("myhost", 12345, false); //$NON-NLS-1$
- List hosts = url.getHostInfo();
- assertNotNull("MMURL should have 1 Host", hosts ); //$NON-NLS-1$
- assertEquals(1,hosts.size());
- HostInfo actualResults = url.getHostInfo().get(0);
- assertEquals(expectedResults,actualResults);
- assertEquals("mm://myhost:12345", url.getAppServerURL()); //$NON-NLS-1$
- }
-
- public final void testHostPortConstructorSSL() {
- HostInfo expectedResults = new HostInfo("myhost",12345); //$NON-NLS-1$
-
- TeiidURL url = new TeiidURL("myhost", 12345, true); //$NON-NLS-1$
- List hosts = url.getHostInfo();
- assertNotNull("MMURL should have 1 Host", hosts ); //$NON-NLS-1$
- assertEquals(1,hosts.size());
- HostInfo actualResults = url.getHostInfo().get(0);
- assertEquals(expectedResults,actualResults);
- assertEquals("mms://myhost:12345", url.getAppServerURL()); //$NON-NLS-1$
- }
-
-}
Copied: trunk/client/src/test/java/org/teiid/net/TestTeiidURL.java (from rev 2599, branches/7.1.x/client/src/test/java/org/teiid/net/TestTeiidURL.java)
===================================================================
--- trunk/client/src/test/java/org/teiid/net/TestTeiidURL.java (rev 0)
+++ trunk/client/src/test/java/org/teiid/net/TestTeiidURL.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -0,0 +1,298 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.net;
+
+import java.util.List;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+
+public class TestTeiidURL {
+
+ public static final String REQUIRED_URL = TeiidURL.FORMAT_SERVER;
+
+ @Test
+ public final void testTeiidURL() {
+ String SERVER_URL = "mm://localhost:31000"; //$NON-NLS-1$
+ assertTrue(TeiidURL.isValidServerURL(SERVER_URL));
+
+ TeiidURL url = new TeiidURL(SERVER_URL);
+ List hosts = url.getHostInfo();
+ assertNotNull("MMURL should have 1 Host", hosts ); //$NON-NLS-1$
+ assertEquals(1,hosts.size());
+ }
+
+ @Test
+ public final void testTeiidURLIPv6() {
+ String SERVER_URL = "mm://[3ffe:ffff:0100:f101::1]:31000"; //$NON-NLS-1$
+ assertTrue(TeiidURL.isValidServerURL(SERVER_URL));
+
+ TeiidURL url = new TeiidURL(SERVER_URL);
+ List<HostInfo> hosts = url.getHostInfo();
+ assertNotNull("TeiidURL should have 1 Host", hosts ); //$NON-NLS-1$
+ assertEquals(1,hosts.size());
+ assertEquals("3ffe:ffff:0100:f101::1", hosts.get(0).getHostName()); //$NON-NLS-1$
+ assertEquals(31000, hosts.get(0).getPortNumber());
+ }
+
+ @Test
+ public final void testBogusProtocol() {
+ String SERVER_URL = "foo://localhost:31000"; //$NON-NLS-1$
+ assertFalse(TeiidURL.isValidServerURL(SERVER_URL));
+
+ try {
+ new TeiidURL(SERVER_URL);
+ fail("MM URL passed non standard protocal fine"); //$NON-NLS-1$
+ } catch (RuntimeException e) {
+ assertEquals(TeiidURL.INVALID_FORMAT_SERVER, e.getMessage());
+ }
+ }
+
+ @Test
+ public final void testBogusProtocol1() {
+ String SERVER_URL = "foo://localhost:31000"; //$NON-NLS-1$
+ assertFalse(TeiidURL.isValidServerURL(SERVER_URL));
+
+ try {
+ new TeiidURL(SERVER_URL);
+ fail("MM URL passed non standard protocal fine"); //$NON-NLS-1$
+ } catch (RuntimeException e) {
+ assertEquals(TeiidURL.INVALID_FORMAT_SERVER, e.getMessage());
+ }
+ }
+
+ @Test
+ public final void testTeiidURLSecure() {
+ String SERVER_URL = "mms://localhost:31000"; //$NON-NLS-1$
+ assertTrue(TeiidURL.isValidServerURL(SERVER_URL));
+
+ TeiidURL url = new TeiidURL(SERVER_URL);
+ List hosts = url.getHostInfo();
+ assertNotNull("MMURL should have 1 Host", hosts ); //$NON-NLS-1$
+ assertEquals(1,hosts.size());
+ }
+
+ @Test
+ public final void testTeiidURLBadProtocolMM() {
+ String SERVER_URL = "mmm://localhost:31000"; //$NON-NLS-1$
+ assertFalse(TeiidURL.isValidServerURL(SERVER_URL));
+
+ try {
+ new TeiidURL(SERVER_URL);
+ fail("MMURL did not throw an exception"); //$NON-NLS-1$
+ } catch( IllegalArgumentException e ) {
+ assertEquals(TeiidURL.INVALID_FORMAT_SERVER,e.getMessage());
+ }
+ }
+
+ @Test
+ public final void testTeiidURLWrongSlash() {
+ String SERVER_URL = "mm:\\\\localhost:31000"; //$NON-NLS-1$
+ assertFalse(TeiidURL.isValidServerURL(SERVER_URL));
+
+ try {
+ new TeiidURL(SERVER_URL);
+ fail("MMURL did not throw an exception"); //$NON-NLS-1$
+ } catch( IllegalArgumentException e ) {
+ assertEquals(TeiidURL.INVALID_FORMAT_SERVER,e.getMessage());
+ }
+ }
+
+ @Test
+ public final void testTeiidURLOneSlash() {
+ String SERVER_URL = "mm:/localhost:31000"; //$NON-NLS-1$
+ assertFalse(TeiidURL.isValidServerURL(SERVER_URL));
+
+ try {
+ new TeiidURL(SERVER_URL);
+ fail("MMURL did not throw an exception"); //$NON-NLS-1$
+ } catch( IllegalArgumentException e ) {
+ assertEquals(TeiidURL.INVALID_FORMAT_SERVER,e.getMessage());
+ }
+ }
+
+ @Test
+ public final void testTeiidURLNoHost() {
+ String SERVER_URL = "mm://:31000"; //$NON-NLS-1$
+ assertFalse(TeiidURL.isValidServerURL(SERVER_URL));
+
+ try {
+ new TeiidURL(SERVER_URL);
+ fail("MMURL did not throw an exception"); //$NON-NLS-1$
+ } catch( IllegalArgumentException e ) {
+ assertEquals(TeiidURL.INVALID_FORMAT_SERVER,e.getMessage());
+ }
+ }
+
+ @Test
+ public final void testTeiidURLNoHostAndPort() {
+ String SERVER_URL = "mm://:"; //$NON-NLS-1$
+ assertFalse(TeiidURL.isValidServerURL(SERVER_URL));
+
+ try {
+ new TeiidURL(SERVER_URL);
+ fail("MMURL did not throw an exception"); //$NON-NLS-1$
+ } catch( IllegalArgumentException e ) {
+ assertEquals(TeiidURL.INVALID_FORMAT_SERVER,e.getMessage());
+ }
+ }
+
+ @Test
+ public final void testTeiidURLNoHostAndPort2() {
+ String SERVER_URL = "mm://"; //$NON-NLS-1$
+ assertFalse(TeiidURL.isValidServerURL(SERVER_URL));
+
+ try {
+ new TeiidURL(SERVER_URL);
+ fail("MMURL did not throw an exception"); //$NON-NLS-1$
+ } catch( IllegalArgumentException e ) {
+ assertEquals(TeiidURL.INVALID_FORMAT_SERVER,e.getMessage());
+ }
+ }
+
+ @Test
+ public final void testTeiidURLBadPort() {
+ String SERVER_URL = "mm://localhost:port"; //$NON-NLS-1$
+ assertFalse(TeiidURL.isValidServerURL(SERVER_URL));
+
+ try {
+ new TeiidURL(SERVER_URL);
+ fail("MMURL did not throw an Exception"); //$NON-NLS-1$
+ } catch( IllegalArgumentException e ) {
+ }
+ }
+
+ @Test
+ public final void testTeiidURL2Hosts() {
+ String SERVER_URL = "mm://localhost:31000,localhost:31001"; //$NON-NLS-1$
+ assertTrue(TeiidURL.isValidServerURL(SERVER_URL));
+
+ TeiidURL url = new TeiidURL(SERVER_URL);
+ List hosts = url.getHostInfo();
+ assertNotNull("MMURL should have 2 Host", hosts ); //$NON-NLS-1$
+ assertEquals(2,hosts.size());
+ }
+
+ @Test
+ public final void testTeiidIPv6URL2Hosts() {
+ String SERVER_URL = "mm://[3ffe:ffff:0100:f101::1]:31000,[::1]:31001, 127.0.0.1:31003"; //$NON-NLS-1$
+ assertTrue(TeiidURL.isValidServerURL(SERVER_URL));
+
+ TeiidURL url = new TeiidURL(SERVER_URL);
+ List<HostInfo> hosts = url.getHostInfo();
+ assertNotNull("TeiidURL should have 3 Host", hosts ); //$NON-NLS-1$
+ assertEquals(3, hosts.size());
+
+ assertEquals("3ffe:ffff:0100:f101::1", hosts.get(0).getHostName());//$NON-NLS-1$
+ assertEquals(31001, hosts.get(1).getPortNumber());
+ assertEquals("127.0.0.1", hosts.get(2).getHostName());//$NON-NLS-1$
+ }
+
+ @Test
+ public final void testTeiidURL3Hosts() {
+ String SERVER_URL = "mm://localhost:31000,localhost:31001,localhost:31002"; //$NON-NLS-1$
+ assertTrue(TeiidURL.isValidServerURL(SERVER_URL));
+
+ TeiidURL url = new TeiidURL(SERVER_URL);
+ List hosts = url.getHostInfo();
+ assertNotNull("MMURL should have 3 Host", hosts ); //$NON-NLS-1$
+ assertEquals(3,hosts.size());
+ }
+
+ @Test
+ public final void testGetHostInfo() {
+ String SERVER_URL = "mm://localhost:31000"; //$NON-NLS-1$
+ assertTrue(TeiidURL.isValidServerURL(SERVER_URL));
+
+ TeiidURL url = new TeiidURL(SERVER_URL);
+ assertNotNull(url.getHostInfo() );
+ }
+
+ @Test
+ public final void testGetProtocolStandalone() {
+ TeiidURL url = new TeiidURL("mm://localhost:31000"); //$NON-NLS-1$
+ assertNotNull(url);
+ assertEquals("mm://localhost:31000",url.getAppServerURL()); //$NON-NLS-1$
+ }
+
+ @Test
+ public final void testHasMoreElements() {
+ TeiidURL url = new TeiidURL("mm://localhost:31000,localhost:31001"); //$NON-NLS-1$
+ assertNotNull(url);
+ assertFalse(url.getHostInfo().isEmpty());
+ }
+
+ @Test
+ public final void testNextElement() {
+ TeiidURL url = new TeiidURL("mm://localhost:31000,localhost:31001"); //$NON-NLS-1$
+ assertEquals(2, url.getHostInfo().size());
+ }
+
+ @Test
+ public final void testHostInfoEquals() {
+ HostInfo expectedResults = new HostInfo("localhost",31000); //$NON-NLS-1$
+ TeiidURL url = new TeiidURL("mm://localhost:31000"); //$NON-NLS-1$
+ HostInfo actualResults = url.getHostInfo().get(0);
+ assertEquals(expectedResults,actualResults);
+ }
+
+ @Test
+ public final void testWithEmbeddedSpaces() {
+ HostInfo expectedResults = new HostInfo("localhost",12345); //$NON-NLS-1$
+
+ TeiidURL url = new TeiidURL("mm://localhost : 12345"); //$NON-NLS-1$
+ List hosts = url.getHostInfo();
+ assertNotNull("MMURL should have 1 Host", hosts ); //$NON-NLS-1$
+ assertEquals(1,hosts.size());
+ HostInfo actualResults = url.getHostInfo().get(0);
+ assertEquals(expectedResults,actualResults);
+ }
+
+ @Test
+ public final void testHostPortConstructor() {
+ HostInfo expectedResults = new HostInfo("myhost", 12345); //$NON-NLS-1$
+
+ TeiidURL url = new TeiidURL("myhost", 12345, false); //$NON-NLS-1$
+ List hosts = url.getHostInfo();
+ assertNotNull("MMURL should have 1 Host", hosts ); //$NON-NLS-1$
+ assertEquals(1,hosts.size());
+ HostInfo actualResults = url.getHostInfo().get(0);
+ assertEquals(expectedResults,actualResults);
+ assertEquals("mm://myhost:12345", url.getAppServerURL()); //$NON-NLS-1$
+ }
+
+ @Test
+ public final void testHostPortConstructorSSL() {
+ HostInfo expectedResults = new HostInfo("myhost",12345); //$NON-NLS-1$
+
+ TeiidURL url = new TeiidURL("myhost", 12345, true); //$NON-NLS-1$
+ List hosts = url.getHostInfo();
+ assertNotNull("MMURL should have 1 Host", hosts ); //$NON-NLS-1$
+ assertEquals(1,hosts.size());
+ HostInfo actualResults = url.getHostInfo().get(0);
+ assertEquals(expectedResults,actualResults);
+ assertEquals("mms://myhost:12345", url.getAppServerURL()); //$NON-NLS-1$
+ }
+
+}
Modified: trunk/common-core/pom.xml
===================================================================
--- trunk/common-core/pom.xml 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/common-core/pom.xml 2010-09-24 18:51:07 UTC (rev 2603)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
- <artifactId>teiid</artifactId>
+ <artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
<version>7.2.0.Alpha2-SNAPSHOT</version>
</parent>
Modified: trunk/common-core/src/main/java/org/teiid/core/CoreConstants.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/CoreConstants.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/common-core/src/main/java/org/teiid/core/CoreConstants.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -52,6 +52,8 @@
public static final String SYSTEM_MODEL = "SYS"; //$NON-NLS-1$
+ public static final String SYSTEM_ADMIN_MODEL = "SYSADMIN"; //$NON-NLS-1$
+
public static final String ODBC_MODEL = "pg_catalog"; //$NON-NLS-1$
public static final String SYSTEM_VDB = "System.vdb"; //$NON-NLS-1$
Deleted: trunk/common-core/src/main/java/org/teiid/core/ErrorMessageKeys.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/ErrorMessageKeys.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/common-core/src/main/java/org/teiid/core/ErrorMessageKeys.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -1,70 +0,0 @@
-package org.teiid.core;
-
-public interface ErrorMessageKeys {
-
- /** types (029) */
- public static final String TYPES_ERR_0001 = "ERR.003.029.0001"; //$NON-NLS-1$
- public static final String TYPES_ERR_0002 = "ERR.003.029.0002"; //$NON-NLS-1$
- public static final String TYPES_ERR_0003 = "ERR.003.029.0003"; //$NON-NLS-1$
- public static final String TYPES_ERR_0004 = "ERR.003.029.0004"; //$NON-NLS-1$
- public static final String TYPES_ERR_0005 = "ERR.003.029.0005"; //$NON-NLS-1$
- public static final String TYPES_ERR_0006 = "ERR.003.029.0006"; //$NON-NLS-1$
- public static final String TYPES_ERR_0007 = "ERR.003.029.0007"; //$NON-NLS-1$
- public static final String TYPES_ERR_0008 = "ERR.003.029.0008"; //$NON-NLS-1$
- public static final String TYPES_ERR_0009 = "ERR.003.029.0009"; //$NON-NLS-1$
- public static final String TYPES_ERR_0010 = "ERR.003.029.0010"; //$NON-NLS-1$
- public static final String TYPES_ERR_0011 = "ERR.003.029.0011"; //$NON-NLS-1$
- public static final String TYPES_ERR_0012 = "ERR.003.029.0012"; //$NON-NLS-1$
- public static final String TYPES_ERR_0013 = "ERR.003.029.0013"; //$NON-NLS-1$
- public static final String TYPES_ERR_0014 = "ERR.003.029.0014"; //$NON-NLS-1$
- public static final String TYPES_ERR_0015 = "ERR.003.029.0015"; //$NON-NLS-1$
- public static final String TYPES_ERR_0016 = "ERR.003.029.0016"; //$NON-NLS-1$
- public static final String TYPES_ERR_0017 = "ERR.003.029.0017"; //$NON-NLS-1$
- public static final String TYPES_ERR_0018 = "ERR.003.029.0018"; //$NON-NLS-1$
- public static final String TYPES_ERR_0019 = "ERR.003.029.0019"; //$NON-NLS-1$
- public static final String TYPES_ERR_0020 = "ERR.003.029.0020"; //$NON-NLS-1$
- public static final String TYPES_ERR_0021 = "ERR.003.029.0021"; //$NON-NLS-1$
- public static final String TYPES_ERR_0022 = "ERR.003.029.0022"; //$NON-NLS-1$
- public static final String TYPES_ERR_0023 = "ERR.003.029.0023"; //$NON-NLS-1$
- public static final String TYPES_ERR_0024 = "ERR.003.029.0024"; //$NON-NLS-1$
- public static final String TYPES_ERR_0025 = "ERR.003.029.0025"; //$NON-NLS-1$
- public static final String TYPES_ERR_0026 = "ERR.003.029.0026"; //$NON-NLS-1$
-
- public static final String CM_UTIL_ERR_0068 = "ERR.003.030.0068"; //$NON-NLS-1$
- public static final String CM_UTIL_ERR_0062 = "ERR.003.030.0062"; //$NON-NLS-1$
- public static final String CM_UTIL_ERR_0064 = "ERR.003.030.0064"; //$NON-NLS-1$
- public static final String CM_UTIL_ERR_0066 = "ERR.003.030.0066"; //$NON-NLS-1$
- public static final String CM_UTIL_ERR_0067 = "ERR.003.030.0067"; //$NON-NLS-1$
- public static final String CM_UTIL_ERR_0071 = "ERR.003.030.0071"; //$NON-NLS-1$
- public static final String CM_UTIL_ERR_0072 = "ERR.003.030.0072"; //$NON-NLS-1$
- public static final String CM_UTIL_ERR_0073 = "ERR.003.030.0073"; //$NON-NLS-1$
-
- public static final String CM_UTIL_ERR_0074 = "ERR.003.030.0074"; //$NON-NLS-1$
- public static final String CM_UTIL_ERR_0075 = "ERR.003.030.0075"; //$NON-NLS-1$
- public static final String CM_UTIL_ERR_0076 = "ERR.003.030.0076"; //$NON-NLS-1$
- public static final String CM_UTIL_ERR_0077 = "ERR.003.030.0077"; //$NON-NLS-1$
- public static final String CM_UTIL_ERR_0078 = "ERR.003.030.0078"; //$NON-NLS-1$
- public static final String CM_UTIL_ERR_0079 = "ERR.003.030.0079"; //$NON-NLS-1$
- public static final String CM_UTIL_ERR_0081 = "ERR.003.030.0081"; //$NON-NLS-1$
-
-
- public static final String PROPERTIES_ERR_0010 = "ERR.003.021.0010"; //$NON-NLS-1$
- public static final String PROPERTIES_ERR_0011 = "ERR.003.021.0011"; //$NON-NLS-1$
-
- public static final String SEC_MEMBERSHIP_0013 = "ERR.014.407.0013"; //$NON-NLS-1$
- public static final String SEC_MEMBERSHIP_0014 = "ERR.014.407.0014"; //$NON-NLS-1$
- public static final String SEC_MEMBERSHIP_0015 = "ERR.014.407.0015"; //$NON-NLS-1$
- public static final String SEC_MEMBERSHIP_0016 = "ERR.014.407.0016"; //$NON-NLS-1$
- public static final String SEC_MEMBERSHIP_0017 = "ERR.014.407.0017"; //$NON-NLS-1$
- public static final String SEC_MEMBERSHIP_0018 = "ERR.014.407.0018"; //$NON-NLS-1$
- public static final String SEC_MEMBERSHIP_0019 = "ERR.014.407.0019"; //$NON-NLS-1$
-
-
- public static final String CM_UTIL_ERR_0176 = "ERR.003.030.0176"; //$NON-NLS-1$
- public static final String CM_UTIL_ERR_0177 = "ERR.003.030.0177"; //$NON-NLS-1$
- public static final String CM_UTIL_ERR_0178 = "ERR.003.030.0178"; //$NON-NLS-1$
- public static final String CM_UTIL_ERR_0179 = "ERR.003.030.0179"; //$NON-NLS-1$
- public static final String CM_UTIL_ERR_0180 = "ERR.003.030.0180"; //$NON-NLS-1$
- public static final String CM_UTIL_ERR_0181 = "ERR.003.030.0181"; //$NON-NLS-1$
-
-}
Modified: trunk/common-core/src/main/java/org/teiid/core/TeiidRuntimeException.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/TeiidRuntimeException.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/common-core/src/main/java/org/teiid/core/TeiidRuntimeException.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -41,7 +41,7 @@
public static final long serialVersionUID = -4035276728007979320L;
private static final String EMPTY_STRING = ""; //$NON-NLS-1$
- public static final String CAUSED_BY_STRING = CorePlugin.Util.getString("MetaMatrixRuntimeException.Caused_by"); //$NON-NLS-1$
+ public static final String CAUSED_BY_STRING = CorePlugin.Util.getString("RuntimeException.Caused_by"); //$NON-NLS-1$
//############################################################################################################################
//# Static Methods #
Modified: trunk/common-core/src/main/java/org/teiid/core/crypto/BasicCryptor.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/crypto/BasicCryptor.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/common-core/src/main/java/org/teiid/core/crypto/BasicCryptor.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -32,7 +32,6 @@
import javax.crypto.SealedObject;
import org.teiid.core.CorePlugin;
-import org.teiid.core.ErrorMessageKeys;
import org.teiid.core.util.Base64;
@@ -76,13 +75,13 @@
} catch (CryptoException err) {
//shouldn't happen
}
- throw new CryptoException( ErrorMessageKeys.CM_UTIL_ERR_0071, CorePlugin.Util.getString(ErrorMessageKeys.CM_UTIL_ERR_0071, e.getClass().getName(), e.getMessage()));
+ throw new CryptoException( "ERR.003.030.0071", CorePlugin.Util.getString("ERR.003.030.0071", e.getClass().getName(), e.getMessage())); //$NON-NLS-1$ //$NON-NLS-2$
}
}
public String decrypt( String ciphertext ) throws CryptoException {
if ( ciphertext == null ) {
- throw new CryptoException( ErrorMessageKeys.CM_UTIL_ERR_0074, CorePlugin.Util.getString(ErrorMessageKeys.CM_UTIL_ERR_0074));
+ throw new CryptoException( "ERR.003.030.0074", CorePlugin.Util.getString("ERR.003.030.0074")); //$NON-NLS-1$ //$NON-NLS-2$
}
ciphertext = stripEncryptionPrefix(ciphertext);
@@ -92,7 +91,7 @@
try {
cipherBytes = Base64.decode(ciphertext);
} catch ( IllegalArgumentException e ) {
- throw new CryptoException( ErrorMessageKeys.CM_UTIL_ERR_0075, CorePlugin.Util.getString(ErrorMessageKeys.CM_UTIL_ERR_0075, e.getMessage()));
+ throw new CryptoException( "ERR.003.030.0075", CorePlugin.Util.getString("ERR.003.030.0075", e.getMessage())); //$NON-NLS-1$ //$NON-NLS-2$
}
// Perform standard decryption
byte[] cleartext = decrypt( cipherBytes );
@@ -121,11 +120,11 @@
decryptCipher = Cipher.getInstance( cipherAlgorithm);
decryptCipher.init( Cipher.DECRYPT_MODE, decryptKey );
} catch ( NoSuchAlgorithmException e ) {
- throw new CryptoException( e, ErrorMessageKeys.CM_UTIL_ERR_0076, CorePlugin.Util.getString(ErrorMessageKeys.CM_UTIL_ERR_0076, cipherAlgorithm ));
+ throw new CryptoException( e, "ERR.003.030.0076", CorePlugin.Util.getString("ERR.003.030.0076", cipherAlgorithm )); //$NON-NLS-1$ //$NON-NLS-2$
} catch ( NoSuchPaddingException e ) {
- throw new CryptoException( ErrorMessageKeys.CM_UTIL_ERR_0077, CorePlugin.Util.getString(ErrorMessageKeys.CM_UTIL_ERR_0077, cipherAlgorithm, e.getClass().getName(), e.getMessage() ));
+ throw new CryptoException( "ERR.003.030.0077", CorePlugin.Util.getString("ERR.003.030.0077", cipherAlgorithm, e.getClass().getName(), e.getMessage() )); //$NON-NLS-1$ //$NON-NLS-2$
} catch ( InvalidKeyException e ) {
- throw new CryptoException( e, ErrorMessageKeys.CM_UTIL_ERR_0079, CorePlugin.Util.getString(ErrorMessageKeys.CM_UTIL_ERR_0079, e.getClass().getName(), e.getMessage()) );
+ throw new CryptoException( e, "ERR.003.030.0079", CorePlugin.Util.getString("ERR.003.030.0079", e.getClass().getName(), e.getMessage()) ); //$NON-NLS-1$ //$NON-NLS-2$
}
}
@@ -145,7 +144,7 @@
} catch (CryptoException err) {
//shouldn't happen
}
- throw new CryptoException( ErrorMessageKeys.CM_UTIL_ERR_0071, CorePlugin.Util.getString(ErrorMessageKeys.CM_UTIL_ERR_0071, e.getClass().getName(), e.getMessage()));
+ throw new CryptoException( "ERR.003.030.0071", CorePlugin.Util.getString("ERR.003.030.0071", e.getClass().getName(), e.getMessage())); //$NON-NLS-1$ //$NON-NLS-2$
}
}
@@ -163,17 +162,17 @@
} catch (CryptoException err) {
//shouldn't happen
}
- throw new CryptoException(ErrorMessageKeys.CM_UTIL_ERR_0081, CorePlugin.Util.getString(ErrorMessageKeys.CM_UTIL_ERR_0081, e.getMessage()));
+ throw new CryptoException("ERR.003.030.0081", CorePlugin.Util.getString("ERR.003.030.0081", e.getMessage())); //$NON-NLS-1$ //$NON-NLS-2$
}
}
public String encrypt( String cleartext ) throws CryptoException {
if ( cleartext == null ) {
- throw new CryptoException( ErrorMessageKeys.CM_UTIL_ERR_0072, CorePlugin.Util.getString(ErrorMessageKeys.CM_UTIL_ERR_0072));
+ throw new CryptoException( "ERR.003.030.0072", CorePlugin.Util.getString("ERR.003.030.0072")); //$NON-NLS-1$ //$NON-NLS-2$
}
String clearString = new String(cleartext);
if ( clearString.trim().length() == 0 && clearString.length() == 0 ) {
- throw new CryptoException( ErrorMessageKeys.CM_UTIL_ERR_0073, CorePlugin.Util.getString(ErrorMessageKeys.CM_UTIL_ERR_0073));
+ throw new CryptoException( "ERR.003.030.0073", CorePlugin.Util.getString("ERR.003.030.0073")); //$NON-NLS-1$ //$NON-NLS-2$
}
// Turn char array into string and get its bytes using "standard" encoding
byte[] clearBytes = clearString.getBytes();
@@ -197,17 +196,17 @@
encryptCipher = Cipher.getInstance( cipherAlgorithm );
encryptCipher.init( Cipher.ENCRYPT_MODE, encryptKey );
} catch ( NoSuchAlgorithmException e ) {
- throw new CryptoException( e, ErrorMessageKeys.CM_UTIL_ERR_0076, CorePlugin.Util.getString(ErrorMessageKeys.CM_UTIL_ERR_0076, cipherAlgorithm ));
+ throw new CryptoException( e, "ERR.003.030.0076", CorePlugin.Util.getString("ERR.003.030.0076", cipherAlgorithm )); //$NON-NLS-1$ //$NON-NLS-2$
} catch ( NoSuchPaddingException e ) {
- throw new CryptoException(e, ErrorMessageKeys.CM_UTIL_ERR_0072, CorePlugin.Util.getString(ErrorMessageKeys.CM_UTIL_ERR_0077, cipherAlgorithm , e.getMessage() ));
+ throw new CryptoException(e, "ERR.003.030.0072", CorePlugin.Util.getString("ERR.003.030.0077", cipherAlgorithm , e.getMessage() )); //$NON-NLS-1$ //$NON-NLS-2$
} catch ( InvalidKeyException e ) {
- throw new CryptoException( e, ErrorMessageKeys.CM_UTIL_ERR_0078, CorePlugin.Util.getString(ErrorMessageKeys.CM_UTIL_ERR_0078, e.getMessage() ));
+ throw new CryptoException( e, "ERR.003.030.0078", CorePlugin.Util.getString("ERR.003.030.0078", e.getMessage() )); //$NON-NLS-1$ //$NON-NLS-2$
}
}
public synchronized Object sealObject(Object object) throws CryptoException {
if (object != null && !(object instanceof Serializable)) {
- throw new CryptoException(ErrorMessageKeys.CM_UTIL_ERR_0081, CorePlugin.Util.getString(ErrorMessageKeys.CM_UTIL_ERR_0081, "not Serializable")); //$NON-NLS-1$
+ throw new CryptoException("ERR.003.030.0081", CorePlugin.Util.getString("ERR.003.030.0081", "not Serializable")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
try {
return new SealedObject((Serializable)object, encryptCipher);
@@ -217,7 +216,7 @@
} catch (CryptoException err) {
//shouldn't happen
}
- throw new CryptoException(ErrorMessageKeys.CM_UTIL_ERR_0081, CorePlugin.Util.getString(ErrorMessageKeys.CM_UTIL_ERR_0081, e.getMessage()));
+ throw new CryptoException("ERR.003.030.0081", CorePlugin.Util.getString("ERR.003.030.0081", e.getMessage())); //$NON-NLS-1$ //$NON-NLS-2$
}
}
Modified: trunk/common-core/src/main/java/org/teiid/core/types/DataTypeManager.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/types/DataTypeManager.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/common-core/src/main/java/org/teiid/core/types/DataTypeManager.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -41,7 +41,6 @@
import java.util.Set;
import org.teiid.core.CorePlugin;
-import org.teiid.core.ErrorMessageKeys;
import org.teiid.core.types.basic.AnyToObjectTransform;
import org.teiid.core.types.basic.AnyToStringTransform;
import org.teiid.core.types.basic.BooleanToNumberTransform;
@@ -323,7 +322,7 @@
public static Transform getTransform(Class sourceType, Class targetType) {
if (sourceType == null || targetType == null) {
throw new IllegalArgumentException(CorePlugin.Util.getString(
- ErrorMessageKeys.TYPES_ERR_0002, sourceType, targetType));
+ "ERR.003.029.0002", sourceType, targetType)); //$NON-NLS-1$
}
return getTransformFromMaps(
DataTypeManager.getDataTypeName(sourceType), DataTypeManager
@@ -345,7 +344,7 @@
String targetTypeName) {
if (sourceTypeName == null || targetTypeName == null) {
throw new IllegalArgumentException(CorePlugin.Util.getString(
- ErrorMessageKeys.TYPES_ERR_0003, sourceTypeName,
+ "ERR.003.029.0003", sourceTypeName, //$NON-NLS-1$
targetTypeName));
}
return getTransformFromMaps(sourceTypeName, targetTypeName);
@@ -363,7 +362,7 @@
public static boolean isTransformable(Class sourceType, Class targetType) {
if (sourceType == null || targetType == null) {
throw new IllegalArgumentException(CorePlugin.Util.getString(
- ErrorMessageKeys.TYPES_ERR_0002, sourceType, targetType));
+ "ERR.003.029.0002", sourceType, targetType)); //$NON-NLS-1$
}
return (getTransformFromMaps(DataTypeManager
.getDataTypeName(sourceType), DataTypeManager
@@ -385,7 +384,7 @@
String targetTypeName) {
if (sourceTypeName == null || targetTypeName == null) {
throw new IllegalArgumentException(CorePlugin.Util.getString(
- ErrorMessageKeys.TYPES_ERR_0003, sourceTypeName,
+ "ERR.003.029.0003", sourceTypeName, //$NON-NLS-1$
targetTypeName));
}
return (getTransformFromMaps(sourceTypeName, targetTypeName) != null);
Modified: trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToBigDecimalTransform.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToBigDecimalTransform.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToBigDecimalTransform.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -25,7 +25,6 @@
import java.math.BigDecimal;
import org.teiid.core.CorePlugin;
-import org.teiid.core.ErrorMessageKeys;
import org.teiid.core.types.Transform;
import org.teiid.core.types.TransformationException;
@@ -44,7 +43,7 @@
try {
return new BigDecimal(((String)value).trim());
} catch(NumberFormatException e) {
- throw new TransformationException(ErrorMessageKeys.TYPES_ERR_0014, CorePlugin.Util.getString(ErrorMessageKeys.TYPES_ERR_0014, value));
+ throw new TransformationException("ERR.003.029.0014", CorePlugin.Util.getString("ERR.003.029.0014", value)); //$NON-NLS-1$ //$NON-NLS-2$
}
}
Modified: trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToBigIntegerTransform.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToBigIntegerTransform.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToBigIntegerTransform.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -25,7 +25,6 @@
import java.math.BigInteger;
import org.teiid.core.CorePlugin;
-import org.teiid.core.ErrorMessageKeys;
import org.teiid.core.types.Transform;
import org.teiid.core.types.TransformationException;
@@ -44,7 +43,7 @@
try {
return new BigInteger(((String)value).trim());
} catch(NumberFormatException e) {
- throw new TransformationException(ErrorMessageKeys.TYPES_ERR_0015, CorePlugin.Util.getString(ErrorMessageKeys.TYPES_ERR_0015, value));
+ throw new TransformationException("ERR.003.029.0015", CorePlugin.Util.getString("ERR.003.029.0015", value)); //$NON-NLS-1$ //$NON-NLS-2$
}
}
Modified: trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToByteTransform.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToByteTransform.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToByteTransform.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -23,7 +23,6 @@
package org.teiid.core.types.basic;
import org.teiid.core.CorePlugin;
-import org.teiid.core.ErrorMessageKeys;
import org.teiid.core.types.Transform;
import org.teiid.core.types.TransformationException;
@@ -41,7 +40,7 @@
try {
return Byte.valueOf(((String)value).trim());
} catch(NumberFormatException e) {
- throw new TransformationException(ErrorMessageKeys.TYPES_ERR_0016, CorePlugin.Util.getString(ErrorMessageKeys.TYPES_ERR_0016, value));
+ throw new TransformationException("ERR.003.029.0016", CorePlugin.Util.getString("ERR.003.029.0016", value));
}
}
Modified: trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToDateTransform.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToDateTransform.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToDateTransform.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -25,7 +25,6 @@
import java.sql.Date;
import org.teiid.core.CorePlugin;
-import org.teiid.core.ErrorMessageKeys;
import org.teiid.core.types.Transform;
import org.teiid.core.types.TransformationException;
@@ -46,7 +45,7 @@
try {
result = Date.valueOf( (String) value );
} catch(Exception e) {
- throw new TransformationException(e, ErrorMessageKeys.TYPES_ERR_0018, CorePlugin.Util.getString(ErrorMessageKeys.TYPES_ERR_0018, value));
+ throw new TransformationException(e, "ERR.003.029.0018", CorePlugin.Util.getString("ERR.003.029.0018", value)); //$NON-NLS-1$ //$NON-NLS-2$
}
if (!result.toString().equals(value)) {
throw new TransformationException(CorePlugin.Util.getString("transform.invalid_string_for_date", value, getTargetType().getSimpleName())); //$NON-NLS-1$
Modified: trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToDoubleTransform.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToDoubleTransform.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToDoubleTransform.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -23,7 +23,6 @@
package org.teiid.core.types.basic;
import org.teiid.core.CorePlugin;
-import org.teiid.core.ErrorMessageKeys;
import org.teiid.core.types.Transform;
import org.teiid.core.types.TransformationException;
@@ -41,7 +40,7 @@
try {
return Double.valueOf((String)value);
} catch(NumberFormatException e) {
- throw new TransformationException(ErrorMessageKeys.TYPES_ERR_0019, CorePlugin.Util.getString(ErrorMessageKeys.TYPES_ERR_0019, value));
+ throw new TransformationException("ERR.003.029.0019", CorePlugin.Util.getString("ERR.003.029.0019", value)); //$NON-NLS-1$ //$NON-NLS-2$
}
}
Modified: trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToFloatTransform.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToFloatTransform.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToFloatTransform.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -23,7 +23,6 @@
package org.teiid.core.types.basic;
import org.teiid.core.CorePlugin;
-import org.teiid.core.ErrorMessageKeys;
import org.teiid.core.types.Transform;
import org.teiid.core.types.TransformationException;
@@ -41,7 +40,7 @@
try {
return Float.valueOf((String)value);
} catch(NumberFormatException e) {
- throw new TransformationException(ErrorMessageKeys.TYPES_ERR_0020, CorePlugin.Util.getString(ErrorMessageKeys.TYPES_ERR_0020, value));
+ throw new TransformationException("ERR.003.029.0020", CorePlugin.Util.getString("ERR.003.029.0020", value)); //$NON-NLS-1$ //$NON-NLS-2$
}
}
Modified: trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToIntegerTransform.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToIntegerTransform.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToIntegerTransform.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -23,7 +23,6 @@
package org.teiid.core.types.basic;
import org.teiid.core.CorePlugin;
-import org.teiid.core.ErrorMessageKeys;
import org.teiid.core.types.Transform;
import org.teiid.core.types.TransformationException;
@@ -41,7 +40,7 @@
try {
return Integer.valueOf(((String)value).trim());
} catch(NumberFormatException e) {
- throw new TransformationException(ErrorMessageKeys.TYPES_ERR_0021, CorePlugin.Util.getString(ErrorMessageKeys.TYPES_ERR_0021, value));
+ throw new TransformationException("ERR.003.029.0021", CorePlugin.Util.getString("ERR.003.029.0021", value)); //$NON-NLS-1$ //$NON-NLS-2$
}
}
Modified: trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToLongTransform.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToLongTransform.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToLongTransform.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -23,7 +23,6 @@
package org.teiid.core.types.basic;
import org.teiid.core.CorePlugin;
-import org.teiid.core.ErrorMessageKeys;
import org.teiid.core.types.Transform;
import org.teiid.core.types.TransformationException;
@@ -41,7 +40,7 @@
try {
return Long.valueOf(((String)value).trim());
} catch(NumberFormatException e) {
- throw new TransformationException(ErrorMessageKeys.TYPES_ERR_0022, CorePlugin.Util.getString(ErrorMessageKeys.TYPES_ERR_0022, value));
+ throw new TransformationException("ERR.003.029.0022", CorePlugin.Util.getString("ERR.003.029.0022", value)); //$NON-NLS-1$ //$NON-NLS-2$
}
}
Modified: trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToShortTransform.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToShortTransform.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToShortTransform.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -23,7 +23,6 @@
package org.teiid.core.types.basic;
import org.teiid.core.CorePlugin;
-import org.teiid.core.ErrorMessageKeys;
import org.teiid.core.types.Transform;
import org.teiid.core.types.TransformationException;
@@ -41,7 +40,7 @@
try {
return Short.valueOf(((String)value).trim());
} catch(NumberFormatException e) {
- throw new TransformationException(ErrorMessageKeys.TYPES_ERR_0023, CorePlugin.Util.getString(ErrorMessageKeys.TYPES_ERR_0023, value));
+ throw new TransformationException("ERR.003.029.0023", CorePlugin.Util.getString("ERR.003.029.0023", value)); //$NON-NLS-1$ //$NON-NLS-2$
}
}
Modified: trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToTimeTransform.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToTimeTransform.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToTimeTransform.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -25,7 +25,6 @@
import java.sql.Time;
import org.teiid.core.CorePlugin;
-import org.teiid.core.ErrorMessageKeys;
import org.teiid.core.types.Transform;
import org.teiid.core.types.TransformationException;
@@ -46,7 +45,7 @@
try {
result = Time.valueOf((String)value);
} catch(Exception e) {
- throw new TransformationException(e, ErrorMessageKeys.TYPES_ERR_0025, CorePlugin.Util.getString(ErrorMessageKeys.TYPES_ERR_0025, value));
+ throw new TransformationException(e, "ERR.003.029.0025", CorePlugin.Util.getString("ERR.003.029.0025", value)); //$NON-NLS-1$ //$NON-NLS-2$
}
if (!result.toString().equals(value)) {
throw new TransformationException(CorePlugin.Util.getString("transform.invalid_string_for_date", value, getTargetType().getSimpleName())); //$NON-NLS-1$
Modified: trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToTimestampTransform.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToTimestampTransform.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/common-core/src/main/java/org/teiid/core/types/basic/StringToTimestampTransform.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -25,7 +25,6 @@
import java.sql.Timestamp;
import org.teiid.core.CorePlugin;
-import org.teiid.core.ErrorMessageKeys;
import org.teiid.core.types.Transform;
import org.teiid.core.types.TransformationException;
@@ -46,7 +45,7 @@
try {
result = Timestamp.valueOf( (String) value );
} catch(Exception e) {
- throw new TransformationException(e, ErrorMessageKeys.TYPES_ERR_0024, CorePlugin.Util.getString(ErrorMessageKeys.TYPES_ERR_0024, value));
+ throw new TransformationException(e, "ERR.003.029.0024", CorePlugin.Util.getString("ERR.003.029.0024", value)); //$NON-NLS-1$ //$NON-NLS-2$
}
//validate everything except for fractional seconds
if (!((String)value).startsWith(result.toString().substring(0, 19))) {
Modified: trunk/common-core/src/main/java/org/teiid/core/util/StringUtil.java
===================================================================
--- trunk/common-core/src/main/java/org/teiid/core/util/StringUtil.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/common-core/src/main/java/org/teiid/core/util/StringUtil.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -549,7 +549,7 @@
// ... and the previous character is not uppercase, then insert
if ( !previousCharUppercase ) {
// ... and this is not the 'M' of 'MetaMatrix' ...
- if ( currentChar != 'M' || i < 4 || (!newName.substring(i-4).startsWith(CorePlugin.Util.getString("StringUtil.Displayable.MetaMatrix"))) ) { //$NON-NLS-1$
+ if ( currentChar != 'M' || i < 4 || (!newName.substring(i-4).startsWith(CorePlugin.Util.getString("StringUtil.Displayable"))) ) { //$NON-NLS-1$
newName.insert(i, ' ' );
++i; // skip, since we just move the character back one position
}
Modified: trunk/common-core/src/main/resources/org/teiid/core/i18n.properties
===================================================================
--- trunk/common-core/src/main/resources/org/teiid/core/i18n.properties 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/common-core/src/main/resources/org/teiid/core/i18n.properties 2010-09-24 18:51:07 UTC (rev 2603)
@@ -20,48 +20,8 @@
# 02110-1301 USA.
#
-PluginUtilities.-consoleLog_11=-consoleLog
-PluginUtilities.Could_not_find___12=Could not find "
-PluginUtilities.__folder._13=" folder.
-PluginUtilities.Make_sure_the_executable_extension_class_contains_a_public_constructor_14=Make sure the executable extension class contains a public constructor
-PluginUtilities._with_no_arguments._15=\ with no arguments.
-PluginUtilities.One_of_the_other_PluginUtilities.getApplication_methods_must_first_be_called._16=One of the other PluginUtilities.getApplication methods must first be called.
-PluginUtilities.One_of_the_other_PluginUtilities.getApplication_methods_must_first_be_called._17=One of the other PluginUtilities.getApplication methods must first be called.
-PluginUtilities.The_installation_path_must_not_be_empty._18=The installation path must not be empty.
-Argument._must_not_be_empty._1=\ must not be empty.
-Argument._must_not_be_empty._2=\ must not be empty.
-Argument._must_not_be_empty._3=\ must not be empty.
-Argument._must_not_be_null._5=\ must not be null.
-RunnableState.Unknown_state_value___7=Unknown state value:
-RunnableState.Unable_to_change_the_state_to__8=Unable to change the state to
-RunnableState.Unable_to_change_the_state_from__9=Unable to change the state from
-RunnableState._to__10=\ to
-RunnableState.Unable_to_change_the_state_from__11=Unable to change the state from
-RunnableState._to__12=\ to
-RunnableState.Unable_to_change_the_state_from__13=Unable to change the state from
-RunnableState._to__14=\ to
-RunnableState.Unable_to_change_the_state_from__15=Unable to change the state from
-RunnableState._to__16=\ to
-RunnableState.Unable_to_change_the_state_from__17=Unable to change the state from
-RunnableState._to__18=\ to
-RunnableState.Unknown_state_value___19=Unknown state value:
-StreamPipe.The_output_stream_has_been_closed._1=The output stream has been closed.
-StreamPipe.The_input_stream_has_been_closed._2=The input stream has been closed.
-PlatformLogger._NullLogEntry_exception = A null log entry was logged
-SystemLogger._NullLogEntry_exception = A null log entry was logged
-PluginUtilImpl.Error_while_running=Error while executing runnable from plugin {0}
+StringUtil.Displayable=Teiid
-Stopwatch.seconds=\ seconds
-Stopwatch.milliseconds=\ milliseconds
-Stopwatch.Stopwatch_Statistics =Stopwatch Statistics:
-Stopwatch.Statistics_Total =\ \ Total = {0}
-Stopwatch.Statistics_Previous =\ \ Previous = {0}
-Stopwatch.Statistics_Count =\ \ Count = {0}
-Stopwatch.Statistics_Average =\ \ Average = {0}
-Stopwatch.Statistics_Minimum =\ \ Minimum = {0}
-Stopwatch.Statistics_Maximum =\ \ Maximum = {0}
-StringUtil.Displayable.MetaMatrix=MetaMatrix
-
ArgCheck.isNonNegativeInt=Expected argument to be non-negative but argument= {0}
ArgCheck.isNonPositiveInt=Expected argument to be non-positive but argument= {0}
ArgCheck.isNegativeInt=Expected argument to be negative but argument= {0}
@@ -78,43 +38,13 @@
ArgCheck.containsKey=Expected map to contain key, but it did not
ReflectionHelper.errorConstructing=Unable to create a ReflectionHelper instance with a null target class.
-ReflectionHelper.nullPointer=Unable to create class instance, the object class must be specified.
-ReflectionHelper.classNotFound=Unable to create class instance, {0} class not found
-ReflectionHelper.linkageError=Unable to link the object subclass {0}
-ReflectionHelper.instantiationError=Unable to instantiate the object subclass {0}
-ReflectionHelper.illegalAccess=Unable to access the the object subclass {0} or instance
-ReflectionHelper.exception=Unable to create subclass {0}
Assertion.Assertion_failed=Assertion failed.
Assertion.invalidClassMessage={0} must be an instance of {1}, but was an instance of {2}
-Assertion.isEqual=ASSERTION FAILED: expected values to be equal but they were different ({0} and {1})
-Assertion.isNotEqual=ASSERTION FAILED: expected values to be different but they were the same ({0} and {1})
-Assertion.isNonNegative=ASSERTION FAILED: expected value to be non-negative but value={0}
-Assertion.isNonPositive=ASSERTION FAILED: expected value to be non-positive but value={0}
-Assertion.isNegative=ASSERTION FAILED: expected value to be negative but value={0}
-Assertion.isPositive=ASSERTION FAILED: expected value to be positive but value={0}
-Assertion.isNotZeroLength=ASSERTION FAILED: expected string to have at least one character
Assertion.isNull=ASSERTION FAILED: expected reference to be null
Assertion.isNotNull=ASSERTION FAILED: expected reference to be not null
-Assertion.isIdentical=ASSERTION FAILED: expected objects to be identical ({0} and {1})
-Assertion.isEqual=ASSERTION FAILED: Objects are not equal: {0} and {1}
Assertion.invalidClassMessage=ASSERTION FAILED: The object {0} was expected to be an instance of {1} but was instance of {2}
-Assertion.isNotEmpty_Collection=ASSERTION FAILED: expected collection to not be empty, but it was
-Assertion.isNotEmpty_Map=ASSERTION FAILED: expected map to not be empty, but it was
-Assertion.contains_Collection=ASSERTION FAILED: expected collection to contain value, but it did not
-Assertion.contains_Map=ASSERTION FAILED: expected map to contain key, but it did not
-IDGenerator.The_preferred_factory_reference_may_not_be_null_1=The preferred factory reference may not be null
-IDGenerator.The_protocol_reference_may_not_be_null_2=The protocol reference may not be null
-IDGenerator.No_factory_for_the_specified_protocol_3=No factory for the specified protocol "{0}"
-IDGenerator.The_factory_reference_may_not_be_null_5=The factory reference may not be null
-IDGenerator.The_protocol_reference_may_not_be_null_6=The protocol reference may not be null
-IDGenerator.The_ObjectID_protocol_reference_may_not_be_null_7=The ObjectID protocol reference may not be null
IDGenerator.The_specified_ObjectID_protocol___8=The specified ObjectID protocol "{0}" is unknown
-IDGenerator.The_ObjectID_protocol_reference_may_not_be_null_10=The ObjectID protocol reference may not be null
-IDGenerator.The_specified_ObjectID_protocol___11=The specified ObjectID protocol "{0}" is unknown
-IDGenerator.The_ObjectID_reference_may_not_be_null_13=The ObjectID reference may not be null
-IDGenerator.The_stringified_ObjectID_may_not_be_null_14=The stringified ObjectID may not be null
-IDGenerator.The_stringified_ObjectID_does_not_have_a_protocol_15=The stringified ObjectID does not have a protocol
IDGenerator.The_stringified_ObjectID_has_an_unknown_protocol___16=The stringified ObjectID has an unknown protocol:
InvalidIDException.Invalid_ID_1=Invalid ID
IntegerIDFactory.The_specified_ID_value_is_invalid=The specified ID value "{0}" is invalid for the "{1}" protocol
@@ -122,20 +52,7 @@
UUID.ID_must_be_of_type_UUID_1=ID must be of type UUID
UUID.ID_must_be_of_type_UUID_to_parse_2=ID must be of type UUID to parse
-UUID.InvalidLengthForProtocol=The length of the specified ID value "{0}" is invalid for the "{1}" protocol
UUID.InvalidFormatForProtocol=The specified ID value "{0}" is invalid for the "{1}" protocol
-AbstractEventSource.The_event_listener_may_not_be_null=The event listener may not be null
-AbstractEventSource.The_event_class_may_not_be_null=The event class may not be null
-AsynchEventBroker.DefaultName=AsynchEventBroker
-SynchEventBroker.DefaultName=SynchEventBroker
-AbstractEventBroker.CannotAddSelfAsListener=An EventBroker cannot add itself to its list of listeners
-AbstractEventBroker.The_name_of_the_event_broker_may_not_be_null=The name of the event broker may not be null
-AbstractEventBroker.The_name_of_the_event_broker_may_not_be_zero-length=The name of the event broker may not be zero-length
-AbstractEventBroker.eventFloorExceeded=\ttime={0}\thandler={1}\n
-AbstractEventBroker.Error_during_event_processing=Error during processing of event in EventBroker \"{0}"
-AbstractEventBroker.basePerformanceMessage=\tTOTAL TIME={0}, TOTAL HANDLERS={1}, EVENT={2}, SOURCE={3}
-AbstractEventBroker.targetedPerformanceMessage=, TARGET={0}
-AbstractEventBroker.No_events_can_be_processed_EventBroker_is_shutdown=No events can be processed - EventBroker \"{0}\" is shutdown
IDGenerator.No_default_id_factory_has_been_defined=No default id factory has been defined
IntegerIDFactory.Description=An identifier that is composed of an integer value
LongIDFactory.Description=An identifier that is composed of an integer value
@@ -143,68 +60,14 @@
UUIDFactory.Description=An universally unique identifier that is composed of a 36-character formatted string.
ParsedObjectID.The_stringified_ObjectID_does_not_have_a_protocol=The stringified ObjectID does not have a protocol
ParsedObjectID.The_stringified_ObjectID_does_not_have_the_required_protocol_{0}=The stringified ObjectID does not have the required protocol {0}
-UUIDFactory.UUID_Initializer_thread_running=UUID Initializer thread running
-UUIDFactory.Instantiating_the_UUID_embedded_factory=Instantiating the UUID embedded factory
-UUIDFactory.UUID_Initializer_thread_notifying_all=UUID Initializer thread notifying all
-UUIDFactory.Attempting_to_create_UUID=Attempting to create UUID ...
-ClassLoaderUtil.Error_trying_to_load_file=Error trying to load file {0}
-ClassLoaderUtil.Error_trying_to_load_class_from_file=Error trying to load class {0} from {1}
-InterceptorStackImpl.New_Interceptor_may_not_be_null._1=New Interceptor may not be null.
-InterceptorStackImpl.Existing_Interceptor_may_not_be_null._2=Existing Interceptor may not be null.
-InterceptorStackImpl.not_same_interceptor=The interceptor does not match an interceptor already in the interceptor stack
-InterceptorStackImpl.Existing_firstInterceptor_must_already_exist_in_firstInterceptor_stack._7=Existing firstInterceptor must already exist in firstInterceptor stack.
-InterceptorStackImpl.Existing_interceptor_was_not_found_in_interceptor_stack._13=Existing interceptor was not found in interceptor stack.
-InterceptorStackImpl.Interceptor_stack_may_not_be_empty_14=Interceptor stack may not be empty
-InvocationImpl.Invocation_[__1=Invocation ["
-InvocationImpl.void_7=void
-DateUtil.The_string_is_not_of_the_expected_format_1=The string \" {0} \" is not of the expected format (\"{1}\")
-DateUtil.The_string_is_not_of_the_expected_format_2=The string \" {0} \" is not of the expected format (\"{1}\")
-DebuggerImpl.conflictWarning = Debug context "{0}" is defined in both plugins "{1}" and "{2}"; context from plugin "{1}" will be ignored.
-DebuggerImpl.timerStart=TIMER STARTED | |ID = {0} | {1}
-DebuggerImpl.timerStop =TIMER STOPPED | TIME={1} ms |ID = {0} | {2}
-DebuggerImpl.timerNotFound=***Timer not found***
ObjectConverterUtil.Error_translating_results_from_data_type_to_a_byte[]._1=Error translating results from data type {0} to a byte[].
ObjectConverterUtil.Error_translating_results_from_data_type_to_a_byte[]._2=Error translating results from data type {0} to a byte[].
ObjectConverterUtil.Object_type_not_supported_for_object_conversion._3=Object type {0} not supported for object conversion.
-ObjectConverterUtil.File_is_not_found_4=File {0} is not found
-ObjectConverterUtil.DEBUG.Converting_Blob_to_byte[];_size_is_1=Converting Blob to byte[]; size is {0}
FileUtils.File_does_not_exist._1=File {0} does not exist.
FileUtils.Not_a_directory=\"{0}\" is not a directory.
-SqlResourceBundle.unable_to_find_bundle=Unable to find SQL bundle with name {0} and language {1}
-MetaMatrixRuntimeException.Caused_by=Caused by:
-InterceptorStackImpl.Interceptor_array_cannot_be_empty_1=Interceptor array cannot be empty.
-ServiceInvocation.Method_not_found_{0}.{1}=Method not found {0}.{1}
-Command.Could_not_find_method=Could not find method ''{0}.{1}''.
-Command.Argument_count_mis-match,_expected_{0}_but_received_{1}=Argument count mis-match, expected {0} but received {1}.
-Command.Error_processing_file=Error processing file: ''{0}''.
-Command.Cannot_convert_to=Cannot convert to {0}
-CommandShell.Started=Started
-CommandShell.Finished=Finished
-CommandShell.Executing=Executing: {0}
-ScriptReader.Call_goto_first=Must call gotoTest() first.
-ScriptReader.Could_not_find_test_{0}=Could not find test: ''{0}''.
-ReflectionWrapper.Could_not_find_field_{0}.{1}=Could not find field ''{0}.{1}''.
-ComponentLoader.Resource_not_found__{0}_1=Resource not found: {0}.
-SqlResourceBundle.The_name_of_the_DBMS_language_may_not_be_null=The name of the DBMS language may not be null
-SqlResourceBundle.The_class_loader_may_not_be_null=The class loader may not be null
-SqlResourceBundle.The_name_of_the_SQL_resource_bundle_may_not_be_null=The name of the SQL resource bundle may not be null
-SqlResourceBundle.The_resource_bundle_reference_may_not_be_null=The resource bundle reference may not be null
+RuntimeException.Caused_by=Caused by:
IDGenerator.The_protocol_may_not_be_null=The protocol may not be null
IDGenerator.The_stringified_ID_may_not_be_null=The stringified ID may not be null
-InterceptorImpl.The_invocation_object_may_not_be_null=The invocation object may not be null
-InterceptorImpl.The_reference_to_the_next_interceptor_may_not_be_null=The reference to the next interceptor may not be null
-InterceptorStackImpl.The_reference_to_the_first_interceptor_may_not_be_null=The reference to the first interceptor may not be null
-FileLogWriter.The_File_reference_may_not_be_null=The File reference may not be null
-ServiceInvocation.The_Method_reference_may_not_be_null=The Method reference may not be null
-ServiceInvocation.The_arguments_array_may_not_be_null=The arguments array may not be null
-ServiceInvocation.The_stack_may_not_be_null=The stack may not be null
-ClassLoaderUtil.The_Class[]_of_types_may_not_be_null=The Class[] of types may not be null
-ClassLoaderUtil.The_Class[]_of_types_may_not_contain_null_references=The Class[] of types may not contain null references
-ClassLoaderUtil.The_name_of_the_class_may_not_be_null=The name of the class may not be null
-ClassUtil.The_Class_reference_may_not_be_null=The Class reference may not be null
-ClassUtil.The_instance_may_not_be_null=The instance may not be null
-DebuggerImpl.The_name_may_not_be_null=The name may not be null
-DebuggerImpl.The_value_may_not_be_null=The value may not be null
FileUtils.The_name_of_the_file_may_not_be_null=The name of the file may not be null
FileUtils.The_file_extension_may_not_be_null=The file extension may not be null
FileUtils.Unable_to_create_file_in=Unable to create file in \"{0}\"
@@ -213,86 +76,31 @@
FileUtils.Unable_to_rename_file_in=Unable to create file in \"{0}\"
FileUtils.Unable_to_delete_file_in=Unable to create file in \"{0}\"
FileUtils.File_already_exists=File "\{0}\" already exists
-FileUtils.Unable_to_rename=Unable to rename file "\{0}\" to "\{1}\"
-I18nUtil.The_object_reference_may_not_be_null=The object reference may not be null
-UserCancelledException.User_cancelled_operation_msg=User cancelled operation
-#=================================================================================================================================
-# PluginUtilImpl
-
-PluginUtilImpl.invalidJavaVersionMessage = \
- {0} requires Java version {1} or higher. Currently executing Java version {2}.
-ConfigContext.Argument_must_not_be_null_1=Argument must not be null
-PlatformPluginRegistry.Plugin_resource_not_found_{0}_1=Plugin resource not found {0}
-ScriptCommandTarget.Tests_run__{0}_test_failures__{1}_1=Tests run: {0} test failures: {1}
-ScriptCommandTarget.Test_{0}.{1}_failed.{2}_2=Test {0}.{1} failed. {2}
-
-#=================================================================================================================================
-# AspectJ
-
-AspectPreferencePage.description=Settings used while running with aspect-enabled code.
-PreferenceTimingFloor=Timing Floor (ms)
-FileLimitSizeLogWriter.Maximum_Log_Size___8=Monitoring is done every {0} mins for maximum log size {1} kbs
-FileLimitSizeLogWriter.Error_Checking_logwriter_rollover__10=Error Checking logwriter rollover <msg>:
-
-AbstractMetaMatrixAspect.0=Unexpected exception trying to resolve method for declarative txn processing
-AbstractMetaMatrixAspect.1=Unexpected Exception processing invocation
-
-EmbeddedUUIDFactory.10=\n There were ID''s that did not match...
-EmbeddedUUIDFactory.11=\ \ \ \
-EmbeddedUUIDFactory.12=\n The string conversions of all ID''s matched\!
-EmbeddedUUIDFactory.13=\n There were ID''s that were duplicated...
-EmbeddedUUIDFactory.14=\ \ \ \
-EmbeddedUUIDFactory.15=\n All ID''s generated were unique\!
-EmbeddedUUIDFactory.16=\nCompleted
-EmbeddedUUIDFactory.17=false
-
-URLClassLoaderRegistry.UnableToCreateClassLoaderForUrl_FileDoesNotExist=Unable to create class loader for the url {0}: file does not exist
-
StringIDFactory.The_specified_ID_value_is_invalid=The specified ID value \"{0}\" is invalid for the protocol \"{1}\".
-ResourceNameUtil.invalidFileExtensionError=The file name "{0}" is invalid. It must have a "{1}" file extension.
-MetaMatrixException.deserialization_exception=Could not deserialize the exception hierarchy.
stream_closed=The stream already closed
-lob.invaliddata=Invalid type of data has been retrieved from server.
-remote_lob_access=Lob object accessed is from a remote connector; Can not stream data from remote objects;
failed_convert=Failed to convert {0} into {1}
invalid_string=Value is not valid XML
-ClobImpl.Failed_copy_clob=Failed creating a new clob from the given clob: {0}.
-ClobImpl.Invalid_substring_position=The substring position "{0}" is not valid.
-ClobImpl.Invalid_substring_length=The substring length "{0}" is not valid.
-ClobImpl.Invalid_start_position=The position to begin searching, "{0}", is not valid.
-BlobImpl.Invalid_byte_position=The first byte position "{0}" is not valid.
-BlobImpl.Invalid_bytes_length=The length of the bytes, "{0}", is not valid.
-BlobImpl.Invalid_start_position=The position to begin searching, "{0}", is not valid.
Streamable.isNUll=Streamable object argument can not be null
-Streamable.InvalidReference=Streamable contents are not available, use the Streaming interface to get the contents.
-FloatToBooleanTransform.Failed_transform=Failed to transform Float to Boolean. Expected 0 or 1 for {0}
-NullToAnyTransform.Invalid_value=Invalid value for type {0}: {1} of type {2}
ObjectToAnyTransform.Invalid_value=Invalid conversion from type {0} with value ''{2}'' to type {1}
InvalidPropertyException.message=Property ''{0}'' with value ''{1}'' is not a valid {2}.
# types (029)
-ERR.003.029.0001=Cannot transform value of invalid type {0}: expecting value of type {1}
ERR.003.029.0002=Types cannot be null: (source={0}, target={1})
ERR.003.029.0003=Type names cannot be null: (source={0}, target={1})
-ERR.003.029.0004=Transform cannot be null.
-ERR.003.029.0005=Transform source name cannot be null: {0}
-ERR.003.029.0006=Transform target name cannot be null: {0}
-ERR.003.029.0013=Failed to transform {0} to Boolean. Expected 0, 1, ''TRUE'', ''FALSE'', or ''UNKNOWN'' for ''{1}''
ERR.003.029.0014=Invalid BigDecimal format in String: {0}
ERR.003.029.0015=Invalid BigInteger format in String: {0}
ERR.003.029.0016=Invalid Byte format in String: {0}
-ERR.003.029.0017=Cannot convert string of length > 1 to character: {0}
ERR.003.029.0018=Failed to transform String to Date. Expected format = yyyy-mm-dd for {0}
ERR.003.029.0019=Invalid double format in String: {0}
ERR.003.029.0020=Invalid float format in String: {0}
@@ -301,12 +109,8 @@
ERR.003.029.0023=Invalid short format in String: {0}
ERR.003.029.0024=Failed to transform String to Timestamp. Expected format = yyyy-mm-dd hh:mm:ss.fffffffff for {0}
ERR.003.029.0025=Failed to transform String to Time. Expected format = hh:mm:ss for {0}
-ERR.003.029.0026=The {0} data type mapping may not be modified.
#CM_UTIL_ERR
-ERR.003.030.0068=Init failed: {0}
-ERR.003.030.0069=Init failed: Unable to retrieve pass key.
-ERR.003.030.0070=Encryption failed: {0} {1}
ERR.003.030.0071=Decryption failed: {0} {1}
ERR.003.030.0072=Attempt to encrypt null cleartext.
ERR.003.030.0073=Attempt to encrypt zero-length cleartext.
@@ -316,30 +120,14 @@
ERR.003.030.0077=Could not get instance of cipher for encryption, invalid padding specified: {0} {1} {2}
ERR.003.030.0078=Could not initialize cipher for decryption, invalid key specified: {0} {1}
ERR.003.030.0079=Could not get encrypt cipher''s encoded algorithm parameters due to encoding error: {0} {1}
-ERR.003.030.0080=Could not initialize cipher for decryption, invalid padding specified: {0}
ERR.003.030.0081=Encryption failed: {0}
# PROPERTIES_ERR
-ERR.003.021.0010=Unable to create an unmodifiable properties from a null original instance.
-ERR.003.021.0011=Unable to modify this Properties instance.
# security.membership
-ERR.014.407.0013 = The name of a principal may not be null or zero-length.
-ERR.014.407.0014 = The name of a principal may not be greater than {0} characters.
-ERR.014.407.0015 = The type of this principal is out of range.
-ERR.014.407.0016 = Unable to make a copy of a null principal.
-ERR.014.407.0017 = Unable to use a null principal reference for merging.
-ERR.014.407.0018 = Unable to merge a {0} principal with a {1} principal.
-ERR.014.407.0019 = The two principals ("{0}" and "{1}") cannot be merged because they are not the same principal.
#JDBCUTIL
-ERR.003.030.0176=Missing JDBC driver class name.
-ERR.003.030.0177=Missing JDBC protocol name.
-ERR.003.030.0178=Missing JDBC database name.
-ERR.003.030.0179=Unable to load the JDBC driver class {0}
-ERR.003.030.0180=Driver {0} can not load {1}
-ERR.003.030.0181=Failed to connect to the Database at {0} check connection properties.
ExceptionHolder.converted_exception=Remote {1}: {0}
PropertiesUtils.failed_to_resolve_property=failed to completely resolve the property value for key {0}
Modified: trunk/common-core/src/test/java/org/teiid/core/util/TestStringUtil.java
===================================================================
--- trunk/common-core/src/test/java/org/teiid/core/util/TestStringUtil.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/common-core/src/test/java/org/teiid/core/util/TestStringUtil.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -97,11 +97,11 @@
}
public void testComputeDisplayableForm4() {
- helpTestComputeDisplayableForm("MetaMatrix", "MetaMatrix"); //$NON-NLS-1$ //$NON-NLS-2$
+ helpTestComputeDisplayableForm("MetaMatrix", "Meta Matrix"); //$NON-NLS-1$ //$NON-NLS-2$
}
public void testComputeDisplayableForm5() {
- helpTestComputeDisplayableForm("metaMatrix", "MetaMatrix"); //$NON-NLS-1$ //$NON-NLS-2$
+ helpTestComputeDisplayableForm("metaMatrix", "Meta Matrix"); //$NON-NLS-1$ //$NON-NLS-2$
}
public void testComputeDisplayableForm6() {
@@ -109,15 +109,15 @@
}
public void testComputeDisplayableForm7() {
- helpTestComputeDisplayableForm("SomeMetaMatrixEmbedded", "Some MetaMatrix Embedded"); //$NON-NLS-1$ //$NON-NLS-2$
+ helpTestComputeDisplayableForm("SomeMetaMatrixEmbedded", "Some Meta Matrix Embedded"); //$NON-NLS-1$ //$NON-NLS-2$
}
public void testComputeDisplayableForm8() {
- helpTestComputeDisplayableForm("SomeMetaMetaMatrixMetaEmbedded", "Some Meta MetaMatrix Meta Embedded"); //$NON-NLS-1$ //$NON-NLS-2$
+ helpTestComputeDisplayableForm("SomeMetaMetaMatrixMetaEmbedded", "Some Meta Meta Matrix Meta Embedded"); //$NON-NLS-1$ //$NON-NLS-2$
}
public void testComputeDisplayableForm9() {
- helpTestComputeDisplayableForm("SomemetaMatrixMetaMatrixMetaEmbedded", "Somemeta Matrix MetaMatrix Meta Embedded"); //$NON-NLS-1$ //$NON-NLS-2$
+ helpTestComputeDisplayableForm("SomemetaMatrixMetaMatrixMetaEmbedded", "Somemeta Matrix Meta Matrix Meta Embedded"); //$NON-NLS-1$ //$NON-NLS-2$
}
public void testComputePluralForm1() {
Modified: trunk/connectors/connector-file/src/main/java/org/teiid/resource/adapter/file/FileManagedConnectionFactory.java
===================================================================
--- trunk/connectors/connector-file/src/main/java/org/teiid/resource/adapter/file/FileManagedConnectionFactory.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/connectors/connector-file/src/main/java/org/teiid/resource/adapter/file/FileManagedConnectionFactory.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -37,7 +37,7 @@
private String parentDirectory;
@Override
- public Object createConnectionFactory() throws ResourceException {
+ public BasicConnectionFactory createConnectionFactory() throws ResourceException {
if (this.parentDirectory == null) {
throw new InvalidPropertyException(UTIL.getString("parentdirectory_not_set")); //$NON-NLS-1$
}
Modified: trunk/connectors/connector-ldap/src/main/resources/org/teiid/resource/adapter/ldap/i18n.properties
===================================================================
--- trunk/connectors/connector-ldap/src/main/resources/org/teiid/resource/adapter/ldap/i18n.properties 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/connectors/connector-ldap/src/main/resources/org/teiid/resource/adapter/ldap/i18n.properties 2010-09-24 18:51:07 UTC (rev 2603)
@@ -20,64 +20,11 @@
# 02110-1301 USA.
#
-LDAPConnector.loggerNotFound=Logger not found in current environment.
-LDAPConnector.getConnectionFailed=Connection pool is not initialized properly. Cannot create a new connection.
#
LDAPConnection.urlPropNotFound=Ldap URL property not found.
LDAPConnection.adminUserDNPropNotFound=Ldap Admin User DN property not found.
LDAPConnection.adminUserPassPropNotFound=Ldap Admin password property not found.
-LDAPConnection.maxCriteriaParseError=Ldap Max Criteria property has an invalid format.
-LDAPConnection.maxCriteriaPropNotFound=Ldap Max Criteria property not found.
-LDAPConnection.contextInitFailed=LDAP context initialization failed. Please check connector properties, and verify against LDAP server.
-LDAPConnection.propertyFileParseFailed=The Properties file could not be parsed.
LDAPConnection.directoryNamingError=Initializing LDAP directory context failed. Please check LDAP connection properties, including username and password: {0}
-LDAPConnection.directoryInitError=Initializing LDAP directory context failed.
-LDAPConnection.unsupportedExecMode=LDAPConnector does not support requested execution mode.
LDAPConnection.contextCloseError=The Connection failed to close LDAP context: {0}
-#
-IQueryToLdapSearchParser.noTablesInFromError=Cannot parse query - no tables defined in FROM clause.
-IQueryToLdapSearchParser.multiItemsInFromError=Cannot parse query - multiple items in FROM clause not supported.
-IQueryToLdapSearchParser.baseContextNameError=Base context name (DN) not specified in Name In Source or connector properties.
-IQueryToLdapSearchParser.groupCountExceededError=Query contained from clause that did not have exactly and only one group. Query not supported.
-IQueryToLdapSearchParser.criteriaNotParsableError=Compound criteria operator was not parsable.
-IQueryToLdapSearchParser.timestampClassNotFoundError=Timestamp class was not found.
-IQueryToLdapSearchParser.unsupportedElementError=Encountered an element type that is not supported. Revise the capabilities.
-IQueryToLdapSearchParser.missingNISError=An element (or expression) found in the query's compare criteria was missing a NameInSource definition (or name). Please ensure the name in source is defined for each element.
-IQueryToLdapSearchParser.criteriaNotSupportedError=Encountered a criteria that is not supported.
-IQueryToLdapSearchParser.searchDetailsLoggingError=Error writing LDAP search details to log
-#
-LDAPSyncQueryExecution.execModeError=Synchronous query was called by connector, but request does not match. Cannot execute request.
-LDAPSyncQueryExecution.setControlsError=Failed to set standard sort controls. Please verify that the server supports sorting, and that the bind user has permission to use sort controls.
-LDAPSyncQueryExecution.createContextError=Failed to create LDAP search context from the specified context name. Check the table/group name in source to ensure the context exists.
-LDAPSyncQueryExecution.configAttrsError=Failed to configure attributes properly.
-LDAPSyncQueryExecution.execSearchError=Execute search failed. Please check logs for search details.
-LDAPSyncQueryExecution.nullBatchError=A null Batch was encountered.
-LDAPSyncQueryExecution.nullAttrError=Encountered null attribute name for a select symbol. Please check name in source for each column.
-LDAPSyncQueryExecution.attrValueFetchError=Failed to fetch attribute value for attribute {0}. Rowset cannot be constructed from incomplete LDAP results.
-LDAPSyncQueryExecution.supportedClassNotFoundError=Supported class not found.
-LDAPSyncQueryExecution.closeContextError=LDAP error occurred during attempt to close context : {0}
-#
-LDAPUpdateExecution.execModeError=Update was called by connector, but request does not match. Cannot execute request.
-LDAPUpdateExecution.createContextError=Failed to create copy of the initial LDAP context: {0}
-LDAPUpdateExecution.incorrectCommandError=Incorrect command type. Expecting INSERT, UPDATE, or DELETE.
-LDAPUpdateExecution.columnSourceNameDNNullError=value for column with source name DN is null - must be set to distinguishedName for new record
-LDAPUpdateExecution.columnSourceNameDNTypeError=value for column with source name DN is not a string - must be set to distinguishedName string for new record
-LDAPUpdateExecution.noInsertSourceNameDNError=no column in insert statement with source name DN - must be present and set to distinguishedName for new record
-LDAPUpdateExecution.insertFailed=Insert of {0} failed: {1}
-LDAPUpdateExecution.insertFailedUnexpected=Insert of {0} failed for unexpected reason
-LDAPUpdateExecution.deleteFailed=Delete of {0} failed: {1}
-LDAPUpdateExecution.deleteFailedUnexpected=Delete of {0} failed for unexpected reason
-LDAPUpdateExecution.updateFailed=Update of {0} failed: {1}
-LDAPUpdateExecution.updateFailedUnexpected=Update of {0} failed for unexpected reason
-LDAPUpdateExecution.valueNotLiteralError=specified value for attribute {0} is not a literal
-LDAPUpdateExecution.criteriaEmptyError=No criteria specified on update - must specify DN in WHERE clause
-LDAPUpdateExecution.criteriaNotSimpleError=criteria is not a simple comparison - expecting simple equals comparison on DN as only item in WHERE clause
-LDAPUpdateExecution.criteriaNotEqualsError=criteria is not an equals comparison - expecting simple equals comparison on DN as only item in WHERE clause
-LDAPUpdateExecution.criteriaLHSNotElementError=left side of criteria is not an element name - expecting simple equals comparison on DN as only item in WHERE clause
-LDAPUpdateExecution.criteriaSrcColumnError=criteria is on source column {0}, but should be on a source column named DN
-LDAPUpdateExecution.criteriaRHSNotLiteralError=right side of equals comparison against DN is not a literal - must be a string literal
-LDAPUpdateExecution.criteriaRHSNotStringError=right side of equals comparison against DN is not a string - must be a string literal
-LDAPUpdateExecution.closeContextError=LDAP error occurred during attempt to close context : {0}
-#
-LDAPSourceConnectionFactory.creatingConnection=LDAPSourceConnectionFactory is creating a new connection.
+
Modified: trunk/connectors/connector-salesforce/src/main/java/org/teiid/resource/adapter/salesforce/SalesForceManagedConnectionFactory.java
===================================================================
--- trunk/connectors/connector-salesforce/src/main/java/org/teiid/resource/adapter/salesforce/SalesForceManagedConnectionFactory.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/connectors/connector-salesforce/src/main/java/org/teiid/resource/adapter/salesforce/SalesForceManagedConnectionFactory.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -95,7 +95,7 @@
}
@Override
- public Object createConnectionFactory() throws ResourceException {
+ public BasicConnectionFactory createConnectionFactory() throws ResourceException {
return new BasicConnectionFactory() {
@Override
public SalesforceConnectionImpl getConnection() throws ResourceException {
Modified: trunk/connectors/connector-salesforce/src/main/java/org/teiid/resource/adapter/salesforce/SalesforceConnectionImpl.java
===================================================================
--- trunk/connectors/connector-salesforce/src/main/java/org/teiid/resource/adapter/salesforce/SalesforceConnectionImpl.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/connectors/connector-salesforce/src/main/java/org/teiid/resource/adapter/salesforce/SalesforceConnectionImpl.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -33,7 +33,6 @@
import org.teiid.logging.LogConstants;
import org.teiid.logging.LogManager;
import org.teiid.resource.spi.BasicConnection;
-import org.teiid.translator.salesforce.Messages;
import org.teiid.translator.salesforce.SalesforceConnection;
import org.teiid.translator.salesforce.execution.DataPayload;
import org.teiid.translator.salesforce.execution.DeletedObject;
@@ -115,7 +114,7 @@
} catch (com.sforce.soap.partner.UnexpectedErrorFault e) {
throw new ResourceException(e.getCause().getMessage());
}
- LogManager.logTrace(LogConstants.CTX_CONNECTOR, "Login was successful for username " + username);
+ LogManager.logTrace(LogConstants.CTX_CONNECTOR, "Login was successful for username " + username); //$NON-NLS-1$
sh = new SessionHeader();
sh.setSessionId(loginResult.getSessionId());
@@ -156,7 +155,7 @@
if(batchSize > 2000) {
batchSize = 2000;
- LogManager.logDetail(LogConstants.CTX_CONNECTOR, Messages.getString("SalesforceQueryExecutionImpl.reduced.batch.size")); //$NON-NLS-1$
+ LogManager.logDetail(LogConstants.CTX_CONNECTOR, "reduced.batch.size"); //$NON-NLS-1$
}
QueryResult qr = null;
@@ -216,7 +215,7 @@
DeleteResult result = results.get(i);
if(!result.isSuccess()) {
if(allGood) {
- errorMessages.append("Error(s) executing DELETE: ");
+ errorMessages.append("Error(s) executing DELETE: "); //$NON-NLS-1$
allGood = false;
}
List<com.sforce.soap.partner.Error> errors = result.getErrors();
Modified: trunk/connectors/pom.xml
===================================================================
--- trunk/connectors/pom.xml 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/connectors/pom.xml 2010-09-24 18:51:07 UTC (rev 2603)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
- <artifactId>teiid</artifactId>
+ <artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
<version>7.2.0.Alpha2-SNAPSHOT</version>
</parent>
Modified: trunk/connectors/sandbox/translator-yahoo/src/main/resources/org/teiid/translator/yahoo/i18n.properties
===================================================================
--- trunk/connectors/sandbox/translator-yahoo/src/main/resources/org/teiid/translator/yahoo/i18n.properties 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/connectors/sandbox/translator-yahoo/src/main/resources/org/teiid/translator/yahoo/i18n.properties 2010-09-24 18:51:07 UTC (rev 2603)
@@ -30,4 +30,3 @@
YahooExecution.Parse_date_error=Unable to parse date value: {0}, got: {1}
YahooExecution.Parse_time_value=Unable to parse time value: {0}, got: {1}
YahooExecution.Invalid_select_symbol=Yahoo connector can''t handle {0} in SELECT
-YahooConnector.proxyPortNotSet=HTTP proxy port is not set. The default port number 80 will be used.
Modified: trunk/connectors/translator-file/src/main/java/org/teiid/translator/file/FileExecutionFactory.java
===================================================================
--- trunk/connectors/translator-file/src/main/java/org/teiid/translator/file/FileExecutionFactory.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/connectors/translator-file/src/main/java/org/teiid/translator/file/FileExecutionFactory.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -221,4 +221,9 @@
param.setAnnotation("The contents to save. Can be one of CLOB, BLOB, or XML");
}
+ @Override
+ public boolean areLobsUsableAfterClose() {
+ return true;
+ }
+
}
Modified: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCExecutionException.java
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCExecutionException.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCExecutionException.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -34,7 +34,7 @@
public JDBCExecutionException(SQLException error,
TranslatedCommand... commands) {
- super(error.getErrorCode(), commands == null ? error.getMessage() : JDBCPlugin.Util.getString("JDBCQueryExecution.Error_executing_query__1", //$NON-NLS-1$
+ super(error, error.getErrorCode(), commands == null || commands.length == 0 ? error.getMessage() : JDBCPlugin.Util.getString("JDBCQueryExecution.Error_executing_query__1", //$NON-NLS-1$
error.getMessage(), Arrays.toString(commands)));
}
}
Modified: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/ModeShapeExecutionFactory.java
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/ModeShapeExecutionFactory.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/ModeShapeExecutionFactory.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -35,12 +35,16 @@
import org.teiid.language.LanguageObject;
import org.teiid.language.Literal;
import org.teiid.language.NamedTable;
+import org.teiid.logging.LogConstants;
+import org.teiid.logging.LogManager;
import org.teiid.translator.ExecutionContext;
+import org.teiid.translator.SourceSystemFunctions;
import org.teiid.translator.Translator;
import org.teiid.translator.TranslatorException;
import org.teiid.translator.jdbc.ConvertModifier;
import org.teiid.translator.jdbc.FunctionModifier;
import org.teiid.translator.jdbc.JDBCExecutionFactory;
+import org.teiid.translator.jdbc.SQLConversionVisitor;
@@ -58,28 +62,8 @@
public void start() throws TranslatorException {
super.start();
- registerFunctionModifier("PATH", new FunctionModifier() { //$NON-NLS-1$
-
- @Override
- public List<?> translate(Function function) {
- List<Object> objs = new ArrayList<Object>();
-
- List<Expression> parms = function.getParameters();
-
- for (Expression s : parms)
- {
- String v = s.toString();
- v.replace('\'', ' ');
- objs.add(v);
- }
-
- return objs;
- }
- } );
-
-
-
-
+ registerFunctionModifier("PATH", new PathFunctionModifier());
+
//add in type conversion
ConvertModifier convertModifier = new ConvertModifier();
@@ -126,32 +110,50 @@
return null;
}
}, FunctionModifier.BOOLEAN);
+
+ registerFunctionModifier(SourceSystemFunctions.CONVERT, convertModifier);
+
+
+ LogManager.logTrace(LogConstants.CTX_CONNECTOR, "Started"); //$NON-NLS-1$
+
}
+ /**
+ * Create the {@link SQLConversionVisitor} that will perform translation. Typical custom
+ * JDBC connectors will not need to create custom conversion visitors, rather implementors
+ * should override existing {@link JDBCExecutionFactory} methods.
+ * @return the {@link SQLConversionVisitor}
+ */
+ public SQLConversionVisitor getSQLConversionVisitor() {
+ return new ModeShapeSQLVisitor(this);
+ }
+
@Override
public List<?> translate(LanguageObject obj, ExecutionContext context) {
+ if (obj instanceof NamedTable) {
+ NamedTable nt = (NamedTable) obj;
+ List<String> ntlist = new ArrayList<String>(1);
+ ntlist.add(ModeShapeUtil.createJCRName(nt.getMetadataObject().getNameInSource()));
+ return ntlist;
+ } else if (obj instanceof ColumnReference) {
+ ColumnReference elem = (ColumnReference) obj;
+
+ String nameInSource = "NoNameInSource";
+ if (elem.getMetadataObject() != null) {
+ nameInSource = elem.getMetadataObject().getNameInSource();
+
+ List<String> ntlist = new ArrayList<String>(1);
+ ntlist.add(ModeShapeUtil.createJCRName(nameInSource));
- if (obj instanceof NamedTable) {
-
- NamedTable nt = (NamedTable) obj;
- List<String> ntlist = new ArrayList<String>(1);
-
- ntlist.add("[" + nt.getMetadataObject().getNameInSource() + "]"); //$NON-NLS-1$ //$NON-NLS-2$
- return ntlist;
- }
-
- if (obj instanceof ColumnReference) {
- ColumnReference elem = (ColumnReference) obj;
- List<String> ntlist = new ArrayList<String>(1);
- ntlist.add("[" + elem.getMetadataObject().getNameInSource() + "]"); //$NON-NLS-1$ //$NON-NLS-2$
- return ntlist;
-
- }
-
- return super.translate(obj, context);
- }
-
+ return ntlist;
+ }
+ }
+
+ return super.translate(obj, context);
+ }
+
+
@Override
public String translateLiteralBoolean(Boolean booleanValue) {
if(booleanValue.booleanValue()) {
@@ -182,13 +184,13 @@
@Override
public List<String> getSupportedFunctions() {
- List<String> supportedFunctions = new ArrayList<String>();
- supportedFunctions.addAll(super.getSupportedFunctions());
- supportedFunctions.add("PATH"); //$NON-NLS-1$
- supportedFunctions.add("NAME"); //$NON-NLS-1$
- supportedFunctions.add("ISCHILDNODE"); //$NON-NLS-1$
-
- return supportedFunctions;
+ List<String> supportedFunctions = new ArrayList<String>();
+ supportedFunctions.addAll(super.getSupportedFunctions());
+ supportedFunctions.add("PATH"); //$NON-NLS-1$
+ supportedFunctions.add("NAME"); //$NON-NLS-1$
+ supportedFunctions.add("ISCHILDNODE"); //$NON-NLS-1$
+
+ return supportedFunctions;
}
Copied: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/ModeShapeSQLVisitor.java (from rev 2599, branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/ModeShapeSQLVisitor.java)
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/ModeShapeSQLVisitor.java (rev 0)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/ModeShapeSQLVisitor.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -0,0 +1,95 @@
+package org.teiid.translator.jdbc.modeshape;
+
+import static org.teiid.language.SQLConstants.Reserved.BY;
+import static org.teiid.language.SQLConstants.Reserved.ORDER;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.teiid.language.ColumnReference;
+import org.teiid.language.DerivedColumn;
+import org.teiid.language.Expression;
+import org.teiid.language.OrderBy;
+import org.teiid.language.Select;
+import org.teiid.language.SortSpecification;
+import org.teiid.language.SQLConstants.Tokens;
+import org.teiid.metadata.Column;
+import org.teiid.translator.jdbc.JDBCExecutionFactory;
+import org.teiid.translator.jdbc.SQLConversionVisitor;
+
+public class ModeShapeSQLVisitor extends SQLConversionVisitor {
+
+ private Map<String, Column> columnMap = new HashMap<String, Column>();
+ private Map<String, Column> aliasMap = new HashMap<String, Column>();
+
+ public ModeShapeSQLVisitor(JDBCExecutionFactory ef) {
+ super(ef);
+
+ }
+
+ public void visit(Select query) {
+
+ // if the query has an order by, then
+ // need to cache the columns so that the
+ // order by column name can be replaced by its
+ // correlating select column that has the nameInSource
+ if (query.getOrderBy() == null) {
+ super.visit(query);
+ return;
+ }
+
+ List<DerivedColumn> selectSymbols = query.getDerivedColumns();
+ Iterator<DerivedColumn> symbolIter = selectSymbols.iterator();
+ while (symbolIter.hasNext()) {
+ DerivedColumn symbol = symbolIter.next();
+ Expression expression = symbol.getExpression();
+
+ if (symbol.getAlias() != null) {
+
+ }
+ // cache the columns so that order by
+ if (expression instanceof ColumnReference) {
+ ColumnReference colRef = (ColumnReference) expression;
+ if (colRef.getMetadataObject() != null) {
+ Column element = colRef.getMetadataObject();
+ if (symbol.getAlias() != null) {
+ aliasMap.put(symbol.getAlias(), element);
+ }
+ columnMap.put(element.getName(), element);
+ }
+ }
+ }
+
+ super.visit(query);
+ }
+
+ public void visit(OrderBy obj) {
+ buffer.append(ORDER)
+ .append(Tokens.SPACE)
+ .append(BY)
+ .append(Tokens.SPACE);
+
+ List<SortSpecification> specs = obj.getSortSpecifications();
+ for (SortSpecification spec : specs) {
+ String specName = spec.getExpression().toString();
+ Column col = null;
+
+ col = aliasMap.get(specName);
+ if (col == null) {
+ col = columnMap.get(specName);
+ }
+ if (col != null) {
+ buffer.append(ModeShapeUtil.createJCRName(col.getNameInSource()))
+ .append(" ")
+ .append(spec.getOrdering().toString());
+
+ } else {
+ buffer.append(obj.getSortSpecifications());
+ }
+ }
+
+ }
+
+}
Copied: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/ModeShapeUtil.java (from rev 2599, branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/ModeShapeUtil.java)
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/ModeShapeUtil.java (rev 0)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/ModeShapeUtil.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -0,0 +1,27 @@
+package org.teiid.translator.jdbc.modeshape;
+
+public class ModeShapeUtil {
+
+ public static final String createJCRName(String name) {
+ return "[" + ModeShapeUtil.trimTics(name) + "]";
+ }
+
+ /**
+ * Because the Teiid Designer Import from JDBC adds tic's to a nameInSource that has special characters,
+ * they have to be removed when building the sql syntax
+ * @param name
+ * @return
+ */
+ public static final String trimTics(String name) {
+ String rtn = name;
+ if (rtn.startsWith("'")) {
+ rtn = rtn.substring(1);
+ }
+
+ if (rtn.endsWith("'")) {
+ rtn = rtn.substring(0, rtn.indexOf("'"));
+ }
+ return rtn;
+ }
+
+}
Copied: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/PathFunctionModifier.java (from rev 2599, branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/PathFunctionModifier.java)
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/PathFunctionModifier.java (rev 0)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/PathFunctionModifier.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -0,0 +1,58 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.translator.jdbc.modeshape;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.teiid.language.Expression;
+import org.teiid.language.Function;
+import org.teiid.translator.jdbc.FunctionModifier;
+
+
+/**
+ * Function to translate the PATH function
+ * @since 7.1
+ */
+public class PathFunctionModifier extends FunctionModifier {
+
+ public PathFunctionModifier() {
+ super();
+ }
+
+ public List<?> translate(Function function) {
+ List<Object> objs = new ArrayList<Object>();
+
+ List<Expression> parms = function.getParameters();
+
+ for (Expression s : parms)
+ {
+ String v = s.toString();
+ v.replace('\'', ' ');
+ objs.add(v);
+ }
+
+ return objs;
+ }
+
+}
Copied: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions (from rev 2599, branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions)
Deleted: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/Cast.java
===================================================================
--- branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/Cast.java 2010-09-23 21:09:51 UTC (rev 2599)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/Cast.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -1,42 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package org.teiid.translator.jdbc.modeshape.functions;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.teiid.language.Expression;
-import org.teiid.language.Function;
-import org.teiid.translator.jdbc.FunctionModifier;
-
-/**
- * Function for Cast
- * @since 7.1
- */
-public class Cast {
-
- public Object cast(String literal, String asType) {
- return "";
- }
-
-}
Copied: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/Cast.java (from rev 2599, branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/Cast.java)
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/Cast.java (rev 0)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/Cast.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.translator.jdbc.modeshape.functions;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.teiid.language.Expression;
+import org.teiid.language.Function;
+import org.teiid.translator.jdbc.FunctionModifier;
+
+/**
+ * Function for Cast
+ * @since 7.1
+ */
+public class Cast {
+
+ public Object cast(String literal, String asType) {
+ return "";
+ }
+
+}
Deleted: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/IsChildNode.java
===================================================================
--- branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/IsChildNode.java 2010-09-23 21:09:51 UTC (rev 2599)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/IsChildNode.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -1,43 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package org.teiid.translator.jdbc.modeshape.functions;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.teiid.language.Expression;
-import org.teiid.language.Function;
-import org.teiid.translator.jdbc.FunctionModifier;
-
-
-/**
- * Function for IsChildNode
- * @since 7.1
- */
-public class IsChildNode {
-
- public boolean isChildNode(String childSelectorName, String parentSelectorName) {
- return false;
- }
-
-}
Copied: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/IsChildNode.java (from rev 2599, branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/IsChildNode.java)
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/IsChildNode.java (rev 0)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/IsChildNode.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.translator.jdbc.modeshape.functions;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.teiid.language.Expression;
+import org.teiid.language.Function;
+import org.teiid.translator.jdbc.FunctionModifier;
+
+
+/**
+ * Function for IsChildNode
+ * @since 7.1
+ */
+public class IsChildNode {
+
+ public boolean isChildNode(String childSelectorName, String parentSelectorName) {
+ return false;
+ }
+
+}
Deleted: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/IsSameNode.java
===================================================================
--- branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/IsSameNode.java 2010-09-23 21:09:51 UTC (rev 2599)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/IsSameNode.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -1,47 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package org.teiid.translator.jdbc.modeshape.functions;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.teiid.language.Expression;
-import org.teiid.language.Function;
-import org.teiid.translator.jdbc.FunctionModifier;
-
-
-/**
- * Function for IsSameNode
- * @since 7.1
- */
-public class IsSameNode {
-
- public boolean isSameNode(String selectorName, String joinSelectorName) {
- return false;
- }
-
- public boolean isSameNode(String selectorName, String joinSelectorName, String selectorPathName) {
- return false;
- }
-
-}
Copied: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/IsSameNode.java (from rev 2599, branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/IsSameNode.java)
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/IsSameNode.java (rev 0)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/IsSameNode.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.translator.jdbc.modeshape.functions;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.teiid.language.Expression;
+import org.teiid.language.Function;
+import org.teiid.translator.jdbc.FunctionModifier;
+
+
+/**
+ * Function for IsSameNode
+ * @since 7.1
+ */
+public class IsSameNode {
+
+ public boolean isSameNode(String selectorName, String joinSelectorName) {
+ return false;
+ }
+
+ public boolean isSameNode(String selectorName, String joinSelectorName, String selectorPathName) {
+ return false;
+ }
+
+}
Deleted: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/Name.java
===================================================================
--- branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/Name.java 2010-09-23 21:09:51 UTC (rev 2599)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/Name.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -1,42 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package org.teiid.translator.jdbc.modeshape.functions;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.teiid.language.Expression;
-import org.teiid.language.Function;
-import org.teiid.translator.jdbc.FunctionModifier;
-
-/**
- * Function for Name
- * @since 7.1
- */
-public class Name {
-
- public String name(String name) {
- return "";
- }
-
-}
Copied: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/Name.java (from rev 2599, branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/Name.java)
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/Name.java (rev 0)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/Name.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.translator.jdbc.modeshape.functions;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.teiid.language.Expression;
+import org.teiid.language.Function;
+import org.teiid.translator.jdbc.FunctionModifier;
+
+/**
+ * Function for Name
+ * @since 7.1
+ */
+public class Name {
+
+ public String name(String name) {
+ return "";
+ }
+
+}
Deleted: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/Path.java
===================================================================
--- branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/Path.java 2010-09-23 21:09:51 UTC (rev 2599)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/Path.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -1,48 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package org.teiid.translator.jdbc.modeshape.functions;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.teiid.language.Expression;
-import org.teiid.language.Function;
-import org.teiid.translator.jdbc.FunctionModifier;
-
-
-/**
- * Function for Path
- * @since 7.1
- */
-public class Path {
-
-
- public String path() {
- return "";
- }
-
- public String path(String name) {
- return "";
- }
-
-}
Copied: trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/Path.java (from rev 2599, branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/Path.java)
===================================================================
--- trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/Path.java (rev 0)
+++ trunk/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/Path.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -0,0 +1,48 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.translator.jdbc.modeshape.functions;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.teiid.language.Expression;
+import org.teiid.language.Function;
+import org.teiid.translator.jdbc.FunctionModifier;
+
+
+/**
+ * Function for Path
+ * @since 7.1
+ */
+public class Path {
+
+
+ public String path() {
+ return "";
+ }
+
+ public String path(String name) {
+ return "";
+ }
+
+}
Modified: trunk/connectors/translator-jdbc/src/main/resources/org/teiid/translator/jdbc/i18n.properties
===================================================================
--- trunk/connectors/translator-jdbc/src/main/resources/org/teiid/translator/jdbc/i18n.properties 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/connectors/translator-jdbc/src/main/resources/org/teiid/translator/jdbc/i18n.properties 2010-09-24 18:51:07 UTC (rev 2603)
@@ -20,57 +20,16 @@
# 02110-1301 USA.
#
-JDBCSourceConnectionFactory.Missing_JDBC_jndi_1=Missing JDBC Source JNDI Name
-JDBCSourceConnectionFactory.Missing_JDBC_protocol_name_2=Missing JDBC protocol name
-JDBCSourceConnectionFactory.Missing_JDBC_database_name_3=Missing JDBC database name
-JDBCSourceConnectionFactory.Unable_to_load_the_JDBC_driver_class_6=Unable to load the JDBC driver class "{0}".
-JDBCSourceConnectionFactory.Driver__7=Driver "{0}" can not load "{1}".
-JDBCUpdateExecution.batch_prep_stmt=Executing batched prepared statements is not supported: {0}
-JDBCUpdateExecution.batch_stored_proc=Executing batched stored procedures is not supported: {0}
-JDBCSourceConnectionFactory.til=Unsupported transaction isolation level "{0}".
-JDBCSourceConnectionFactory.MissingProp=Missing required property: {0}
-JDBCSourceXAConnecton.Connection_still_leased=Connection is still leased to connector worker. However, transaction ended, so terminating the lease.
-JDBCSourceConnectionFactory.Unable_to_find_jndi_ds=Failed to locate data source named {0} through JNDI lookup.
JDBCTranslator.Unexpected_exception_translating_results___8=Unexpected exception while translating results: {0}
-JDBCTranslator.Unknown_error_translating_results___9=Unknown error translating results: {0}
-JDBCTranslator._Unable_to_get_Blob_and_set_parameter._{0}=\ Unable to get Blob and set parameter. {0}
-JDBCTranslator._Unable_to_get_Clob_and_set_parameter._{0}=\ Unable to get Clob and set parameter. {0}
-JDBCTranslator.Unable_to_set_appropriate_output_parameter_type_of_class({0})=Unable to set the appropriate output parameter type of class({0}) to JDBC Driver
-JDBCConnector.No_license_found_for_{0}=No license found for {0}
-JDBCConnector.JDBCConnector_initialized._1=JDBCConnector initialized.
-JDBCConnector.JDBCConnector_stopped._3=JDBCConnector stopped.
-JDBCConnector.JDBCConnector_started._4=JDBCConnector started.
-JDBCConnector.JDBCConnector_is_not_started._5=JDBCConnector is not started.
-JDBCConnector.unsupported_identity_type=Unsupported identity type.
-JDBCConnector.non_xa_connection_source=Connection source does not support XA.
-JDBCConnector.invalid_source=Specified connection source {0} is not a XADataSource, DataSource, or Driver
-BlobValueReference.Unable_to_read_BLOB_data=Unable to read BLOB data from InputStream.
-ClobValueReference.Unable_to_read_CLOB_data=Unable to read CLOB data from character stream.
-BasicSQLTranslator.The_format_of_set_criteria_batch_size_is_incorrect._1=The format of set criteria batch size is incorrect.
-JDBCSynchExecution.Statement_type_not_support_for_command_1=Statement type {0} not support for command {1}
-JDBCSourceConnection.Property_{0}_is_required,_but_not_defined_1=Property {0} is required, but not defined
-DropFunctionModifier.DropFunctionModifier_can_only_be_used_on_functions_with___1=DropFunctionModifier can only be used on functions with minimum or more number of arguments:
-JDBCSourceConnection.Execution_mode_not_supported__{0}_1=Execution mode not supported: {0}
-JDBCProcedureExecution.The_parameter_direction_must_be_out_or_inout_1=The parameter direction must be out or inout
-JDBCProcedureExecution.Unexpected_exception_1=Unexpected exception
-JDBCQueryExecution.Error_executing_query__1 = {0}\n\nExecuting statement:\n\n {1}
-JDBCQueryExecution.Error_executing_query__2 = {0}\n\nAfter executing batch statements:\n
-JDBCQueryExecution.Error_executing_query__3 = {0}\n\nWhile executing batch statements:\n
+JDBCQueryExecution.Error_executing_query__1 = ''{0}'' error executing statement(s): {1}
-JDBCSingleIdentityDSConnectionFactory.Unable_to_set_DataSource_property=Unable to set DataSource property name \"{0}\" to value \"{1}"
-JDBCXAConnector.Connector_use_exclusive_mode_1=Connector uses exclusive connections for transactions.
ConnectionListener.failed_to_report_jdbc_connection_details=Failed to report the JDBC driver and connection information
-ConnectionListener.failed_to_report_oracle_connection_details=Failed to report Oracle driver and connection information, consider making the V$ tables public for providing useful information for tuning purposes
-StringToTimestampWithTimeZoneTransform=Unable to parse timestamp string: {0}
-JDBCUserIdentityConnectionFactory.Unable_to_get_credentials=Unable to extract credentials from command payload or trusted session payload for per-user connection.
-JDBCUserIdentityConnectionFactory.Connection_property_missing=Required connection property "{0}" missing for system "{1}".
-BasicResultsTranslator.Couldn__t_parse_property=Could not parse property: {0}
JDBCMetadataProcessor.cannot_find_primary=Cannot find primary key table {0}
Modified: trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/modeshape/TestModeShapeSqlTranslator.java
===================================================================
--- trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/modeshape/TestModeShapeSqlTranslator.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/modeshape/TestModeShapeSqlTranslator.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -22,15 +22,15 @@
package org.teiid.translator.jdbc.modeshape;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
import org.junit.BeforeClass;
-import org.junit.Ignore;
import org.junit.Test;
import org.mockito.Mockito;
import org.teiid.cdk.api.TranslationUtility;
import org.teiid.core.util.UnitTestUtil;
import org.teiid.language.Command;
+import org.teiid.language.LanguageFactory;
import org.teiid.translator.ExecutionContext;
import org.teiid.translator.TranslatorException;
import org.teiid.translator.jdbc.TranslatedCommand;
@@ -46,14 +46,16 @@
.getTestDataPath()
: "src/test/resources")
+ "/ModeShape.vdb";
+
+
+ @BeforeClass
+ public static void setUp() throws TranslatorException {
+ TRANSLATOR = new ModeShapeExecutionFactory();
+ TRANSLATOR.setUseBindVariables(false);
+ TRANSLATOR.start();
- @BeforeClass
- public static void setUp() throws TranslatorException {
- TRANSLATOR = new ModeShapeExecutionFactory();
- TRANSLATOR.start();
+ }
- }
-
public void helpTestVisitor(TranslationUtility util, String input,
String expectedOutput) throws TranslatorException {
// Convert from sql to objects
@@ -64,61 +66,55 @@
tc.translateCommand(obj);
assertEquals("Did not get correct sql", expectedOutput, tc.getSql()); //$NON-NLS-1$
}
-
+
@Test
- public void testSimpleSelect() throws Exception {
- String input = "select Model from Car"; //$NON-NLS-1$
- String output = "SELECT [car:Model] FROM [car:Car]"; //$NON-NLS-1$
+ public void testSelectAllFromBase() throws Exception {
+ String input = "select * from nt_base"; //$NON-NLS-1$
+ String output = "SELECT [jcr:primaryType] FROM [nt:base]"; //$NON-NLS-1$
- // FakeTranslationFactory.getInstance().getExampleTranslationUtility(),
helpTestVisitor(new TranslationUtility(MODESHAPE_VDB), input, output);
}
-
+
@Test
- public void testWhereClause() throws Exception {
+ public void testSelectColumnFromBase() throws Exception {
+ String input = "select jcr_primaryType from nt_base"; //$NON-NLS-1$
+ String output = "SELECT [jcr:primaryType] FROM [nt:base]"; //$NON-NLS-1$
- String input = "select Model from Car WHERE Make = 'Honda'"; //$NON-NLS-1$
- String output = "SELECT [car:Model] FROM [car:Car] WHERE [car:Make] = 'Honda'"; //$NON-NLS-1$
-
- // FakeTranslationFactory.getInstance().getExampleTranslationUtility(),
helpTestVisitor(new TranslationUtility(MODESHAPE_VDB), input, output);
- }
+ }
@Test
- public void testOrderBy() throws Exception {
+ public void testWhereClause() throws Exception {
- String input = "select Model from Car ORDER BY Make"; //$NON-NLS-1$
- String output = "SELECT [car:Model] FROM [car:Car] ORDER BY [car:Make]"; //$NON-NLS-1$
+ String input = "SELECT jcr_primaryType from nt_base WHERE jcr_primaryType = 'relational:column'"; //$NON-NLS-1$
+ String output = "SELECT [jcr:primaryType] FROM [nt:base] WHERE [jcr:primaryType] = 'relational:column'"; //$NON-NLS-1$
- // FakeTranslationFactory.getInstance().getExampleTranslationUtility(),
helpTestVisitor(new TranslationUtility(MODESHAPE_VDB), input, output);
}
- @Ignore
@Test
- public void testUsingAlias() throws Exception {
+ public void testOrderBy() throws Exception {
- String input = "select c.Model from Car As c"; //$NON-NLS-1$
- String output = "SELECT c.[car:Model] FROM [car:Car] As c"; //$NON-NLS-1$
+ String input = "SELECT jcr_primaryType from nt_base ORDER BY jcr_primaryType"; //$NON-NLS-1$
+ String output = "SELECT [jcr:primaryType] FROM [nt:base] ORDER BY [jcr:primaryType] ASC"; //$NON-NLS-1$
- // FakeTranslationFactory.getInstance().getExampleTranslationUtility(),
helpTestVisitor(new TranslationUtility(MODESHAPE_VDB), input, output);
}
- @Ignore
@Test
- public void testUsingNameFunction() throws Exception {
+ public void testUsingLike() throws Exception {
- String input = "select Model from Car as car WHERE PATH('car') LIKE '%/Hybrid/%'"; //$NON-NLS-1$
- String output = "SELECT [car:Model] FROM [car:Car] WHERE PATH(car:Car) LIKE '%/Hybrid/%'"; //$NON-NLS-1$
+ String input = "SELECT jcr_primaryType from nt_base WHERE jcr_primaryType LIKE '%relational%'"; //$NON-NLS-1$
+ String output = "SELECT [jcr:primaryType] FROM [nt:base] WHERE [jcr:primaryType] LIKE '%relational%'"; //$NON-NLS-1$
- // FakeTranslationFactory.getInstance().getExampleTranslationUtility(),
helpTestVisitor(new TranslationUtility(MODESHAPE_VDB), input, output);
}
+
+
}
Copied: trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/modeshape/TestPathFunctionModifier.java (from rev 2599, branches/7.1.x/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/modeshape/TestPathFunctionModifier.java)
===================================================================
--- trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/modeshape/TestPathFunctionModifier.java (rev 0)
+++ trunk/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/modeshape/TestPathFunctionModifier.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -0,0 +1,87 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.translator.jdbc.modeshape;
+
+import java.util.Arrays;
+import java.util.Collections;
+
+import junit.framework.TestCase;
+
+import org.junit.Test;
+import org.teiid.cdk.api.TranslationUtility;
+import org.teiid.language.Expression;
+import org.teiid.language.Function;
+import org.teiid.language.LanguageFactory;
+import org.teiid.language.Literal;
+import org.teiid.translator.jdbc.SQLConversionVisitor;
+
+
+/**
+ */
+public class TestPathFunctionModifier extends TestCase {
+
+ private static final LanguageFactory LANG_FACTORY = new LanguageFactory();
+
+ /**
+ * Constructor for TestMonthFunctionModifier.
+ * @param name
+ */
+ public TestPathFunctionModifier(String name) {
+ super(name);
+ }
+
+ public void helpTestMod(Expression c, String expectedStr, String target) throws Exception {
+ Function func = null;
+ if (c != null) {
+ func = LANG_FACTORY.createFunction(target,
+ Arrays.asList(c),
+ String.class);
+ } else {
+ func = LANG_FACTORY.createFunction(target,
+ Collections.EMPTY_LIST,
+ String.class);
+
+ }
+
+ ModeShapeExecutionFactory trans = new ModeShapeExecutionFactory();
+ trans.start();
+
+ SQLConversionVisitor sqlVisitor = trans.getSQLConversionVisitor();
+
+ sqlVisitor.append(func);
+ assertEquals(expectedStr, sqlVisitor.toString());
+ }
+
+
+ public void test1() throws Exception {
+ Literal arg1 = LANG_FACTORY.createLiteral("car", String.class); //$NON-NLS-1$
+ helpTestMod(arg1, "PATH('car')", "PATH"); //$NON-NLS-1$
+ }
+
+ public void test2() throws Exception {
+ helpTestMod(null, "PATH()", "PATH"); //$NON-NLS-1$
+ }
+
+
+}
+
Modified: trunk/connectors/translator-jdbc/src/test/resources/ModeShape.vdb
===================================================================
(Binary files differ)
Modified: trunk/connectors/translator-ldap/src/main/resources/org/teiid/translator/ldap/i18n.properties
===================================================================
--- trunk/connectors/translator-ldap/src/main/resources/org/teiid/translator/ldap/i18n.properties 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/connectors/translator-ldap/src/main/resources/org/teiid/translator/ldap/i18n.properties 2010-09-24 18:51:07 UTC (rev 2603)
@@ -20,18 +20,43 @@
# 02110-1301 USA.
#
+IQueryToLdapSearchParser.noTablesInFromError=Cannot parse query - no tables defined in FROM clause.
+IQueryToLdapSearchParser.multiItemsInFromError=Cannot parse query - multiple items in FROM clause not supported.
+IQueryToLdapSearchParser.baseContextNameError=Base context name (DN) not specified in Name In Source or connector properties.
+IQueryToLdapSearchParser.groupCountExceededError=Query contained from clause that did not have exactly and only one group. Query not supported.
+IQueryToLdapSearchParser.criteriaNotParsableError=Compound criteria operator was not parsable.
+IQueryToLdapSearchParser.timestampClassNotFoundError=Timestamp class was not found.
+IQueryToLdapSearchParser.unsupportedElementError=Encountered an element type that is not supported. Revise the capabilities.
+IQueryToLdapSearchParser.missingNISError=An element (or expression) found in the query's compare criteria was missing a NameInSource definition (or name). Please ensure the name in source is defined for each element.
+IQueryToLdapSearchParser.criteriaNotSupportedError=Encountered a criteria that is not supported.
+IQueryToLdapSearchParser.searchDetailsLoggingError=Error writing LDAP search details to log
#
-LDAPConnection.urlPropNotFound=Ldap URL property not found.
-LDAPConnection.adminUserDNPropNotFound=Ldap Admin User DN property not found.
-LDAPConnection.adminUserPassPropNotFound=Ldap Admin password property not found.
-LDAPConnection.maxCriteriaParseError=Ldap Max Criteria property has an invalid format.
-LDAPConnection.maxCriteriaPropNotFound=Ldap Max Criteria property not found.
-LDAPConnection.contextInitFailed=LDAP context initialization failed. Please check connector properties, and verify against LDAP server.
-LDAPConnection.propertyFileParseFailed=The Properties file could not be parsed.
-LDAPConnection.directoryNamingError=Initializing LDAP directory context failed. Please check LDAP connection properties, including username and password: {0}
-LDAPConnection.directoryInitError=Initializing LDAP directory context failed.
-LDAPConnection.unsupportedExecMode=LDAPConnector does not support requested execution mode.
-LDAPConnection.contextCloseError=The Connection failed to close LDAP context: {0}
+LDAPSyncQueryExecution.setControlsError=Failed to set standard sort controls. Please verify that the server supports sorting, and that the bind user has permission to use sort controls.
+LDAPSyncQueryExecution.createContextError=Failed to create LDAP search context from the specified context name. Check the table/group name in source to ensure the context exists.
+LDAPSyncQueryExecution.execSearchError=Execute search failed. Please check logs for search details.
+LDAPSyncQueryExecution.nullAttrError=Encountered null attribute name for a select symbol. Please check name in source for each column.
+LDAPSyncQueryExecution.attrValueFetchError=Failed to fetch attribute value for attribute {0}. Rowset cannot be constructed from incomplete LDAP results.
+LDAPSyncQueryExecution.supportedClassNotFoundError=Supported class not found.
+LDAPSyncQueryExecution.closeContextError=LDAP error occurred during attempt to close context : {0}
#
-ILDAPSourceConnectionFactory.creatingConnection=LDAPSourceConnectionFactory is creating a new connection.
+LDAPUpdateExecution.createContextError=Failed to create copy of the initial LDAP context: {0}
+LDAPUpdateExecution.incorrectCommandError=Incorrect command type. Expecting INSERT, UPDATE, or DELETE.
+LDAPUpdateExecution.columnSourceNameDNNullError=value for column with source name DN is null - must be set to distinguishedName for new record
+LDAPUpdateExecution.columnSourceNameDNTypeError=value for column with source name DN is not a string - must be set to distinguishedName string for new record
+LDAPUpdateExecution.noInsertSourceNameDNError=no column in insert statement with source name DN - must be present and set to distinguishedName for new record
+LDAPUpdateExecution.insertFailed=Insert of {0} failed: {1}
+LDAPUpdateExecution.insertFailedUnexpected=Insert of {0} failed for unexpected reason
+LDAPUpdateExecution.deleteFailed=Delete of {0} failed: {1}
+LDAPUpdateExecution.deleteFailedUnexpected=Delete of {0} failed for unexpected reason
+LDAPUpdateExecution.updateFailed=Update of {0} failed: {1}
+LDAPUpdateExecution.updateFailedUnexpected=Update of {0} failed for unexpected reason
+LDAPUpdateExecution.valueNotLiteralError=specified value for attribute {0} is not a literal
+LDAPUpdateExecution.criteriaEmptyError=No criteria specified on update - must specify DN in WHERE clause
+LDAPUpdateExecution.criteriaNotSimpleError=criteria is not a simple comparison - expecting simple equals comparison on DN as only item in WHERE clause
+LDAPUpdateExecution.criteriaNotEqualsError=criteria is not an equals comparison - expecting simple equals comparison on DN as only item in WHERE clause
+LDAPUpdateExecution.criteriaLHSNotElementError=left side of criteria is not an element name - expecting simple equals comparison on DN as only item in WHERE clause
+LDAPUpdateExecution.criteriaSrcColumnError=criteria is on source column {0}, but should be on a source column named DN
+LDAPUpdateExecution.criteriaRHSNotLiteralError=right side of equals comparison against DN is not a literal - must be a string literal
+LDAPUpdateExecution.criteriaRHSNotStringError=right side of equals comparison against DN is not a string - must be a string literal
+LDAPUpdateExecution.closeContextError=LDAP error occurred during attempt to close context : {0}
Deleted: trunk/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/Messages.java
===================================================================
--- trunk/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/Messages.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/Messages.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -1,40 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package org.teiid.translator.salesforce;
-
-import java.util.MissingResourceException;
-
-import org.teiid.core.BundleUtil;
-
-public class Messages {
-
- private static final BundleUtil RESOURCE_BUNDLE = BundleUtil.getBundleUtil(Messages.class);
-
- public static String getString(String key) {
- try {
- return RESOURCE_BUNDLE.getString(key);
- } catch (MissingResourceException e) {
- return '!' + key + '!';
- }
- }
-}
Modified: trunk/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/Util.java
===================================================================
--- trunk/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/Util.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/Util.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -30,9 +30,9 @@
public class Util {
public static String stripQutes(String id) {
- if((id.startsWith("'") && id.endsWith("'"))) {
+ if((id.startsWith("'") && id.endsWith("'"))) { //$NON-NLS-1$ //$NON-NLS-2$
id = id.substring(1,id.length()-1);
- } else if ((id.startsWith("\"") && id.endsWith("\""))) {
+ } else if ((id.startsWith("\"") && id.endsWith("\""))) { //$NON-NLS-1$ //$NON-NLS-2$
id = id.substring(1,id.length()-1);
}
return id;
@@ -40,11 +40,11 @@
public static String addSingleQuotes(String text) {
StringBuffer result = new StringBuffer();
- if(!text.startsWith("'")) {
+ if(!text.startsWith("'")) { //$NON-NLS-1$
result.append('\'');
}
result.append(text);
- if(!text.endsWith("'")) {
+ if(!text.endsWith("'")) { //$NON-NLS-1$
result.append('\'');
}
return result.toString();
@@ -52,20 +52,20 @@
public static void validateQueryLength(StringBuffer query) throws TranslatorException {
if(query.length() >= 10000) {
- throw new TranslatorException(Messages.getString("Util.query.exceeds.max.length"));
+ throw new TranslatorException(SalesForcePlugin.Util.getString("Util.query.exceeds.max.length")); //$NON-NLS-1$
}
}
public static SimpleDateFormat getSalesforceDateTimeFormat() {
- return new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
+ return new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"); //$NON-NLS-1$
}
public static SimpleDateFormat getTimeZoneOffsetFormat() {
- return new SimpleDateFormat("Z");
+ return new SimpleDateFormat("Z"); //$NON-NLS-1$
}
public static DateFormat getSalesforceDateFormat() {
- return new SimpleDateFormat("yyyy-MM-dd");
+ return new SimpleDateFormat("yyyy-MM-dd"); //$NON-NLS-1$
}
}
Modified: trunk/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/execution/QueryExecutionImpl.java
===================================================================
--- trunk/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/execution/QueryExecutionImpl.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/execution/QueryExecutionImpl.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -49,7 +49,7 @@
import org.teiid.translator.ExecutionContext;
import org.teiid.translator.ResultSetExecution;
import org.teiid.translator.TranslatorException;
-import org.teiid.translator.salesforce.Messages;
+import org.teiid.translator.salesforce.SalesForcePlugin;
import org.teiid.translator.salesforce.SalesforceConnection;
import org.teiid.translator.salesforce.Util;
import org.teiid.translator.salesforce.execution.visitors.JoinQueryVisitor;
@@ -104,11 +104,11 @@
}
public void cancel() throws TranslatorException {
- LogManager.logDetail(LogConstants.CTX_CONNECTOR, Messages.getString("SalesforceQueryExecutionImpl.cancel"));//$NON-NLS-1$
+ LogManager.logDetail(LogConstants.CTX_CONNECTOR, SalesForcePlugin.Util.getString("SalesforceQueryExecutionImpl.cancel"));//$NON-NLS-1$
}
public void close() {
- LogManager.logDetail(LogConstants.CTX_CONNECTOR, Messages.getString("SalesforceQueryExecutionImpl.close")); //$NON-NLS-1$
+ LogManager.logDetail(LogConstants.CTX_CONNECTOR, SalesForcePlugin.Util.getString("SalesforceQueryExecutionImpl.close")); //$NON-NLS-1$
}
@Override
@@ -248,7 +248,7 @@
if (element.getNameInSource().equalsIgnoreCase("id")) { //$NON-NLS-1$
setValueInColumn(j, sObject.getId(), result);
} else {
- throw new TranslatorException("SalesforceQueryExecutionImpl.missing.field"+ element.getNameInSource()); //$NON-NLS-1$
+ throw new TranslatorException(SalesForcePlugin.Util.getString("SalesforceQueryExecutionImpl.missing.field")+ element.getNameInSource()); //$NON-NLS-1$
}
} else {
Object cell;
@@ -305,7 +305,7 @@
@SuppressWarnings("unchecked")
private Object getCellDatum(Column element, Element elem) throws TranslatorException {
if(!element.getNameInSource().equals(elem.getLocalName())) {
- throw new TranslatorException("SalesforceQueryExecutionImpl.column.mismatch1" + element.getNameInSource() + "SalesforceQueryExecutionImpl.column.mismatch2" + elem.getLocalName()); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new TranslatorException(SalesForcePlugin.Util.getString("SalesforceQueryExecutionImpl.column.mismatch1") + element.getNameInSource() + SalesForcePlugin.Util.getString("SalesforceQueryExecutionImpl.column.mismatch2") + elem.getLocalName()); //$NON-NLS-1$ //$NON-NLS-2$
}
String value = elem.getTextContent();
Object result = null;
@@ -318,37 +318,31 @@
result = Boolean.valueOf(value);
} else if (type.equals(Double.class)) {
if (null != value) {
- if(value.isEmpty()) {
- result = null;
- } else {
+ if(!value.isEmpty()) {
result = Double.valueOf(value);
}
}
} else if (type.equals(Integer.class)) {
if (null != value) {
- if(value.isEmpty()) {
- result = null;
- } else {
+ if(!value.isEmpty()) {
result = Integer.valueOf(value);
}
}
} else if (type.equals(java.sql.Date.class)) {
if (null != value) {
- if(value.isEmpty()) {
- result = null;
- } else {
+ if(!value.isEmpty()) {
result = java.sql.Date.valueOf(value);
}
}
} else if (type.equals(java.sql.Timestamp.class)) {
if (null != value) {
- if(value.isEmpty()) {
- result = null;
- } else try {
- Date date = Util.getSalesforceDateTimeFormat().parse(value);
- result = new Timestamp(date.getTime());
- } catch (ParseException e) {
- throw new TranslatorException(e, "SalesforceQueryExecutionImpl.datatime.parse" + value); //$NON-NLS-1$
+ if(!value.isEmpty()) {
+ try {
+ Date date = Util.getSalesforceDateTimeFormat().parse(value);
+ result = new Timestamp(date.getTime());
+ } catch (ParseException e) {
+ throw new TranslatorException(e, SalesForcePlugin.Util.getString("SalesforceQueryExecutionImpl.datatime.parse") + value); //$NON-NLS-1$
+ }
}
}
} else {
Modified: trunk/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/execution/visitors/CriteriaVisitor.java
===================================================================
--- trunk/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/execution/visitors/CriteriaVisitor.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/execution/visitors/CriteriaVisitor.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -45,7 +45,7 @@
import org.teiid.metadata.RuntimeMetadata;
import org.teiid.metadata.Table;
import org.teiid.translator.TranslatorException;
-import org.teiid.translator.salesforce.Messages;
+import org.teiid.translator.salesforce.SalesForcePlugin;
import org.teiid.translator.salesforce.Util;
@@ -54,21 +54,21 @@
*/
public abstract class CriteriaVisitor extends HierarchyVisitor implements ICriteriaVisitor {
- private static final String RESTRICTEDMULTISELECTPICKLIST = "restrictedmultiselectpicklist";
- private static final String MULTIPICKLIST = "multipicklist";
- protected static final String SELECT = "SELECT";
- protected static final String FROM = "FROM";
- protected static final String WHERE = "WHERE";
- protected static final String ORDER_BY = "ORDER BY";
- protected static final String LIMIT = "LIMIT";
- protected static final String SPACE = " ";
- protected static final String EXCLUDES = "EXCLUDES";
- protected static final String INCLUDES = "includes";
- protected static final String COMMA = ",";
- protected static final String SEMI = ";";
- protected static final String APOS = "'";
- protected static final String OPEN = "(";
- protected static final String CLOSE = ")";
+ private static final String RESTRICTEDMULTISELECTPICKLIST = "restrictedmultiselectpicklist"; //$NON-NLS-1$
+ private static final String MULTIPICKLIST = "multipicklist"; //$NON-NLS-1$
+ protected static final String SELECT = "SELECT"; //$NON-NLS-1$
+ protected static final String FROM = "FROM"; //$NON-NLS-1$
+ protected static final String WHERE = "WHERE"; //$NON-NLS-1$
+ protected static final String ORDER_BY = "ORDER BY"; //$NON-NLS-1$
+ protected static final String LIMIT = "LIMIT"; //$NON-NLS-1$
+ protected static final String SPACE = " "; //$NON-NLS-1$
+ protected static final String EXCLUDES = "EXCLUDES"; //$NON-NLS-1$
+ protected static final String INCLUDES = "includes"; //$NON-NLS-1$
+ protected static final String COMMA = ","; //$NON-NLS-1$
+ protected static final String SEMI = ";"; //$NON-NLS-1$
+ protected static final String APOS = "'"; //$NON-NLS-1$
+ protected static final String OPEN = "("; //$NON-NLS-1$
+ protected static final String CLOSE = ")"; //$NON-NLS-1$
protected RuntimeMetadata metadata;
private HashMap<Comparison.Operator, String> comparisonOperators;
@@ -87,12 +87,12 @@
public CriteriaVisitor( RuntimeMetadata metadata ) {
this.metadata = metadata;
comparisonOperators = new HashMap<Comparison.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, "!=");
+ comparisonOperators.put(Operator.EQ, "="); //$NON-NLS-1$
+ comparisonOperators.put(Operator.GE, ">="); //$NON-NLS-1$
+ comparisonOperators.put(Operator.GT, ">"); //$NON-NLS-1$
+ comparisonOperators.put(Operator.LE, "<="); //$NON-NLS-1$
+ comparisonOperators.put(Operator.LT, "<"); //$NON-NLS-1$
+ comparisonOperators.put(Operator.NE, "!="); //$NON-NLS-1$
}
@Override
@@ -111,12 +111,11 @@
public void visit( Like criteria ) {
try {
if (isIdColumn(criteria.getLeftExpression())) {
- TranslatorException e = new TranslatorException(Messages.getString("CriteriaVisitor.LIKE.not.supported.on.Id"));
+ TranslatorException e = new TranslatorException(SalesForcePlugin.Util.getString("CriteriaVisitor.LIKE.not.supported.on.Id")); //$NON-NLS-1$
exceptions.add(e);
}
if (isMultiSelectColumn(criteria.getLeftExpression())) {
- TranslatorException e = new TranslatorException(
- Messages.getString("CriteriaVisitor.LIKE.not.supported.on.multiselect"));
+ TranslatorException e = new TranslatorException(SalesForcePlugin.Util.getString("CriteriaVisitor.LIKE.not.supported.on.multiselect")); //$NON-NLS-1$
exceptions.add(e);
}
} catch (TranslatorException e) {
@@ -187,9 +186,9 @@
public void parseFunction( Function func ) {
String functionName = func.getName();
try {
- if (functionName.equalsIgnoreCase("includes")) {
+ if (functionName.equalsIgnoreCase("includes")) { //$NON-NLS-1$
generateMultiSelect(func, INCLUDES);
- } else if (functionName.equalsIgnoreCase("excludes")) {
+ } else if (functionName.equalsIgnoreCase("excludes")) { //$NON-NLS-1$
generateMultiSelect(func, EXCLUDES);
}
} catch (TranslatorException e) {
@@ -238,13 +237,13 @@
private void validateFunction( List<Expression> expressions ) throws TranslatorException {
if (expressions.size() != 2) {
- throw new TranslatorException(Messages.getString("CriteriaVisitor.invalid.arg.count"));
+ throw new TranslatorException(SalesForcePlugin.Util.getString("CriteriaVisitor.invalid.arg.count")); //$NON-NLS-1$
}
if (!(expressions.get(0) instanceof ColumnReference)) {
- throw new TranslatorException(Messages.getString("CriteriaVisitor.function.not.column.arg"));
+ throw new TranslatorException(SalesForcePlugin.Util.getString("CriteriaVisitor.function.not.column.arg")); //$NON-NLS-1$
}
if (!(expressions.get(1) instanceof Literal)) {
- throw new TranslatorException(Messages.getString("CriteriaVisitor.function.not.literal.arg"));
+ throw new TranslatorException(SalesForcePlugin.Util.getString("CriteriaVisitor.function.not.literal.arg")); //$NON-NLS-1$
}
}
@@ -253,7 +252,7 @@
criterion.append(OPEN);
boolean first = true;
String fullParam = param.toString();
- String[] params = fullParam.split(",");
+ String[] params = fullParam.split(","); //$NON-NLS-1$
for (int i = 0; i < params.length; i++) {
String token = params[i];
if (first) {
@@ -309,7 +308,7 @@
criteriaList.add(queryString.toString());
- if (columnName.equals("IsDeleted")) {
+ if (columnName.equals("IsDeleted")) { //$NON-NLS-1$
Literal isDeletedLiteral = (Literal)compCriteria.getRightExpression();
Boolean isDeleted = (Boolean)isDeletedLiteral.getValue();
if (isDeleted) {
@@ -328,9 +327,9 @@
queryString.append(getValue(leftExp));
queryString.append(' ');
if (criteria.isNegated()) {
- queryString.append("NOT ");
+ queryString.append("NOT "); //$NON-NLS-1$
}
- queryString.append("IN");
+ queryString.append("IN"); //$NON-NLS-1$
queryString.append('(');
Column column = ((ColumnReference)criteria.getLeftExpression()).getMetadataObject();
boolean timeColumn = isTimeColumn(column);
@@ -366,17 +365,16 @@
Literal literal = (Literal)expr;
result = literal.getValue().toString();
} else {
- throw new RuntimeException("unknown type in SalesforceQueryExecution.getValue(): " + expr.toString());
+ throw new RuntimeException("unknown type in SalesforceQueryExecution.getValue(): " + expr.toString()); //$NON-NLS-1$
}
return result;
}
protected void loadColumnMetadata( NamedTable group ) throws TranslatorException {
table = group.getMetadataObject();
- String supportsQuery = table.getProperties().get("Supports Query");
+ String supportsQuery = table.getProperties().get("Supports Query"); //$NON-NLS-1$
if (!Boolean.valueOf(supportsQuery)) {
- throw new TranslatorException(table.getNameInSource() + " "
- + Messages.getString("CriteriaVisitor.query.not.supported"));
+ throw new TranslatorException(table.getNameInSource() + " " + SalesForcePlugin.Util.getString("CriteriaVisitor.query.not.supported")); //$NON-NLS-1$ //$NON-NLS-2$
}
List<Column> columnIds = table.getColumns();
for (Column element : columnIds) {
@@ -384,7 +382,7 @@
columnElementsByName.put(name, element);
// influences queryAll behavior
- if (element.getNameInSource().equals("IsDeleted")) {
+ if (element.getNameInSource().equals("IsDeleted")) { //$NON-NLS-1$
String isDeleted = element.getDefaultValue();
if (Boolean.parseBoolean(isDeleted)) {
this.queryAll = true;
@@ -398,7 +396,7 @@
if (expression instanceof ColumnReference) {
Column element = ((ColumnReference)expression).getMetadataObject();
String nameInSource = element.getNameInSource();
- if (nameInSource.equalsIgnoreCase("id")) {
+ if (nameInSource.equalsIgnoreCase("id")) { //$NON-NLS-1$
result = true;
}
}
Modified: trunk/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/execution/visitors/SelectVisitor.java
===================================================================
--- trunk/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/execution/visitors/SelectVisitor.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/connectors/translator-salesforce/src/main/java/org/teiid/translator/salesforce/execution/visitors/SelectVisitor.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -40,7 +40,7 @@
import org.teiid.metadata.Table;
import org.teiid.translator.TranslatorException;
import org.teiid.translator.salesforce.Constants;
-import org.teiid.translator.salesforce.Messages;
+import org.teiid.translator.salesforce.SalesForcePlugin;
import org.teiid.translator.salesforce.Util;
@@ -61,8 +61,7 @@
public void visit(Select query) {
super.visit(query);
if (query.isDistinct()) {
- exceptions.add(new TranslatorException(
- Messages.getString("SelectVisitor.distinct.not.supported")));
+ exceptions.add(new TranslatorException(SalesForcePlugin.Util.getString("SelectVisitor.distinct.not.supported")));
}
selectSymbols = query.getDerivedColumns();
selectSymbolCount = selectSymbols.size();
@@ -78,9 +77,7 @@
selectSymbolNameToIndex .put(element.getNameInSource(), index);
String nameInSource = element.getNameInSource();
if (null == nameInSource || nameInSource.length() == 0) {
- exceptions.add(new TranslatorException(
- "name in source is null or empty for column "
- + symbol.toString()));
+ exceptions.add(new TranslatorException("name in source is null or empty for column "+ symbol.toString()));
continue;
}
if (nameInSource.equalsIgnoreCase("id")) {
@@ -98,8 +95,7 @@
String supportsQuery = table.getProperties().get(Constants.SUPPORTS_QUERY);
objectSupportsRetrieve = Boolean.valueOf(table.getProperties().get(Constants.SUPPORTS_RETRIEVE));
if (!Boolean.valueOf(supportsQuery)) {
- throw new TranslatorException(table.getNameInSource() + " "
- + Messages.getString("CriteriaVisitor.query.not.supported"));
+ throw new TranslatorException(table.getNameInSource() + " " + SalesForcePlugin.Util.getString("CriteriaVisitor.query.not.supported"));
}
loadColumnMetadata(obj);
} catch (TranslatorException ce) {
Modified: trunk/connectors/translator-salesforce/src/main/resources/org/teiid/translator/salesforce/i18n.properties
===================================================================
--- trunk/connectors/translator-salesforce/src/main/resources/org/teiid/translator/salesforce/i18n.properties 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/connectors/translator-salesforce/src/main/resources/org/teiid/translator/salesforce/i18n.properties 2010-09-24 18:51:07 UTC (rev 2603)
@@ -19,13 +19,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301 USA.
#
-SalesforceConnection.update.not.supported=Update Execution is not supported.
-SalesforceConnection.procedures.not.supported=Procedure Execution is not supported.
-SalesforceConnection.invalid.execution.mode=Execution mode not supported.
-SalesforceConnection.bad.IN.value=Exception parsing the IN Criteria Limit value.
-SalesforceConnection.bad.ping.value=Exception parsing the Data Source Test Connect Interval value.
-SalesforceSourceConnectionFactory.Invalid.username.password.pair=Invalid credential configuration. The Username and Password binding properties must both be empty or both have values.
SalesforceQueryExecutionImpl.cancel=SynchQueryExecution.cancel() called
SalesforceQueryExecutionImpl.close=SynchQueryExecution.close() called
@@ -33,7 +27,6 @@
SalesforceQueryExecutionImpl.column.mismatch1=Error: Column mismatch, expected
SalesforceQueryExecutionImpl.column.mismatch2= received
SalesforceQueryExecutionImpl.datatime.parse=Error parsing date_time: Value =
-SalesforceQueryExecutionImpl.reduced.batch.size=Reduced batch size to 2000
SelectVisitor.distinct.not.supported=Distinct is not supported by the connector.
@@ -41,8 +34,7 @@
CriteriaVisitor.invalid.arg.count=The includes and excludes functions require two parameters.
CriteriaVisitor.function.not.column.arg=The first parameter of the includes and excludes functions must be a column name.
CriteriaVisitor.function.not.literal.arg=The second parameter of the includes and excludes functions must be a literal value.
-CriteriaVisitor.IN.not.supported.on.col=The IN criteria is not supported on multi-select columns:
CriteriaVisitor.LIKE.not.supported.on.Id=LIKE criteria are not allowed on columns of native type Id
CriteriaVisitor.LIKE.not.supported.on.multiselect=LIKE criteria are not allowed on columns of native type Multi-Select Picklist
-Util.query.exceeds.max.length=Queries cannot exceed 10,000 characters
\ No newline at end of file
+Util.query.exceeds.max.length=Queries cannot exceed 10,000 characters
Modified: trunk/connectors/translator-ws/src/main/java/org/teiid/translator/ws/WSExecutionFactory.java
===================================================================
--- trunk/connectors/translator-ws/src/main/java/org/teiid/translator/ws/WSExecutionFactory.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/connectors/translator-ws/src/main/java/org/teiid/translator/ws/WSExecutionFactory.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -159,5 +159,10 @@
metadataFactory.addProcedureParameter("result", TypeFacility.RUNTIME_NAMES.BLOB, Type.ReturnValue, p); //$NON-NLS-1$
metadataFactory.addProcedureParameter("contentType", TypeFacility.RUNTIME_NAMES.STRING, Type.Out, p); //$NON-NLS-1$
}
+
+ @Override
+ public boolean areLobsUsableAfterClose() {
+ return true;
+ }
}
Modified: trunk/console/pom.xml
===================================================================
--- trunk/console/pom.xml 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/console/pom.xml 2010-09-24 18:51:07 UTC (rev 2603)
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
- <artifactId>teiid</artifactId>
+ <artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
<version>7.2.0.Alpha2-SNAPSHOT</version>
</parent>
Copied: trunk/console/src/main/java/org/teiid/rhq/plugin/DataRoleComponent.java (from rev 2599, branches/7.1.x/console/src/main/java/org/teiid/rhq/plugin/DataRoleComponent.java)
===================================================================
--- trunk/console/src/main/java/org/teiid/rhq/plugin/DataRoleComponent.java (rev 0)
+++ trunk/console/src/main/java/org/teiid/rhq/plugin/DataRoleComponent.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -0,0 +1,287 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+package org.teiid.rhq.plugin;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.naming.NamingException;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.jboss.deployers.spi.management.ManagementView;
+import org.jboss.managed.api.ComponentType;
+import org.jboss.managed.api.ManagedComponent;
+import org.jboss.managed.api.ManagedObject;
+import org.jboss.managed.api.ManagedProperty;
+import org.jboss.managed.plugins.ManagedObjectImpl;
+import org.jboss.metatype.api.types.MetaType;
+import org.jboss.metatype.api.types.SimpleMetaType;
+import org.jboss.metatype.api.values.CollectionValueSupport;
+import org.jboss.metatype.api.values.CompositeValueSupport;
+import org.jboss.metatype.api.values.EnumValueSupport;
+import org.jboss.metatype.api.values.GenericValue;
+import org.jboss.metatype.api.values.GenericValueSupport;
+import org.jboss.metatype.api.values.MetaValue;
+import org.jboss.metatype.api.values.MetaValueFactory;
+import org.jboss.metatype.api.values.SimpleValue;
+import org.jboss.metatype.api.values.SimpleValueSupport;
+import org.mc4j.ems.connection.EmsConnection;
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.configuration.ConfigurationUpdateStatus;
+import org.rhq.core.domain.configuration.Property;
+import org.rhq.core.domain.configuration.PropertyList;
+import org.rhq.core.domain.configuration.PropertyMap;
+import org.rhq.core.domain.configuration.PropertySimple;
+import org.rhq.core.domain.measurement.AvailabilityType;
+import org.rhq.core.domain.measurement.MeasurementDataNumeric;
+import org.rhq.core.domain.measurement.MeasurementDataTrait;
+import org.rhq.core.domain.measurement.MeasurementReport;
+import org.rhq.core.domain.measurement.MeasurementScheduleRequest;
+import org.rhq.core.pluginapi.configuration.ConfigurationFacet;
+import org.rhq.core.pluginapi.configuration.ConfigurationUpdateReport;
+import org.rhq.core.pluginapi.inventory.CreateResourceReport;
+import org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails;
+import org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException;
+import org.rhq.core.pluginapi.inventory.ResourceComponent;
+import org.rhq.core.pluginapi.inventory.ResourceContext;
+import org.rhq.plugins.jbossas5.connection.ProfileServiceConnection;
+import org.rhq.plugins.jbossas5.util.ConversionUtils;
+import org.teiid.adminapi.impl.PropertyMetadata;
+import org.teiid.rhq.admin.DQPManagementView;
+import org.teiid.rhq.plugin.util.PluginConstants;
+import org.teiid.rhq.plugin.util.ProfileServiceUtil;
+import org.teiid.rhq.plugin.util.PluginConstants.Operation;
+import org.teiid.rhq.plugin.util.PluginConstants.ComponentType.Platform;
+import org.teiid.rhq.plugin.util.PluginConstants.ComponentType.VDB;
+
+/**
+ * Component class for a Teiid VDB
+ *
+ */
+public class DataRoleComponent extends Facet {
+ private final Log LOG = LogFactory
+ .getLog(PluginConstants.DEFAULT_LOGGER_CATEGORY);
+
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.teiid.rhq.plugin.Facet#start(org.rhq.core.pluginapi.inventory.
+ * ResourceContext)
+ */
+ @Override
+ public void start(ResourceContext context) {
+ this.resourceConfiguration = context.getPluginConfiguration();
+ this.componentType = PluginConstants.ComponentType.DATA_ROLE.NAME;
+ super.start(context);
+ }
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.teiid.rhq.plugin.Facet#getAvailability()
+ */
+ @Override
+ public AvailabilityType getAvailability() {
+ return ((VDBComponent)this.resourceContext.getParentResourceComponent()).getAvailability();
+ }
+
+ @Override
+ String getComponentType() {
+ return PluginConstants.ComponentType.DATA_ROLE.NAME;
+ }
+
+ @Override
+ public void getValues(MeasurementReport arg0,
+ Set<MeasurementScheduleRequest> arg1) throws Exception {
+ // TODO Auto-generated method stub
+
+ }
+
+ /**
+ * The plugin container will call this method when it has a new
+ * configuration for your managed resource. Your plugin will re-configure
+ * the managed resource in your own custom way, setting its configuration
+ * based on the new values of the given configuration.
+ *
+ * @see ConfigurationFacet#updateResourceConfiguration(ConfigurationUpdateReport)
+ */
+ public void updateResourceConfiguration(ConfigurationUpdateReport report) {
+
+ Configuration resourceConfig = report.getConfiguration();
+ resourceConfiguration = resourceConfig.deepCopy();
+
+ // Get the vdb and update date role anyAuthenticated and MappedRoleNames
+ ManagementView managementView = null;
+ ComponentType componentType = new ComponentType(
+ PluginConstants.ComponentType.VDB.TYPE,
+ PluginConstants.ComponentType.VDB.SUBTYPE);
+
+ ManagedComponent managedComponent = null;
+ ManagedProperty anyAuthenticatedMp = null;
+ report.setStatus(ConfigurationUpdateStatus.SUCCESS);
+ try {
+
+ managementView = getConnection().getManagementView();
+ managedComponent = managementView.getComponent(
+ ((VDBComponent) this.resourceContext
+ .getParentResourceComponent()).name, componentType);
+ ManagedProperty mp = managedComponent.getProperty("dataPolicies");//$NON-NLS-1$
+ List<ManagedObject> dataRolesListMp = (List<ManagedObject>) MetaValueFactory
+ .getInstance().unwrap(mp.getValue());
+ String name = resourceConfiguration.getSimpleValue("name", null); //$NON-NLS-1$
+ String anyAuthenticated = resourceConfiguration.getSimpleValue(
+ "anyAuthenticated", null); //$NON-NLS-1$
+
+ for (ManagedObject mo : dataRolesListMp) {
+
+ String pname = ProfileServiceUtil.stringValue(mo.getProperty(
+ "name").getValue()); //$NON-NLS-1$
+ if (!pname.equals(name)) {
+ continue;
+ }
+ anyAuthenticatedMp = mo.getProperty("anyAuthenticated"); //$NON-NLS-1$
+ anyAuthenticatedMp.setValue(ProfileServiceUtil.wrap(
+ SimpleMetaType.BOOLEAN, anyAuthenticated));
+ List<Property> mappedRoleNamePropertyList = resourceConfiguration
+ .getList("mappedRoleNameList").getList(); //$NON-NLS-1$
+
+ List<String> mappedRoleNameList = new ArrayList<String>();
+
+ for (Property mappedRoleNameProperty : mappedRoleNamePropertyList){
+ String mappedRoleNameString = ((PropertyMap)mappedRoleNameProperty).getSimpleValue("name", null); //$NON-NLS-1$
+ mappedRoleNameList.add(mappedRoleNameString);
+ }
+ ManagedProperty mappedRoleNameMp = mo.getProperty("mappedRoleNames"); //$NON-NLS-1$
+ mappedRoleNameMp.setValue(MetaValueFactory.getInstance().create(mappedRoleNameList));
+ }
+
+ try {
+ managementView.updateComponent(managedComponent);
+ } catch (Exception e) {
+ LOG.error("Unable to update component [" //$NON-NLS-1$
+ + managedComponent.getName() + "] of type " //$NON-NLS-1$
+ + componentType + ".", e); //$NON-NLS-1$
+ report.setStatus(ConfigurationUpdateStatus.FAILURE);
+ report.setErrorMessageFromThrowable(e);
+ }
+ } catch (Exception e) {
+ LOG.error("Unable to process update request", e); //$NON-NLS-1$
+ report.setStatus(ConfigurationUpdateStatus.FAILURE);
+ report.setErrorMessageFromThrowable(e);
+ }
+
+ }
+
+ @Override
+ public Configuration loadResourceConfiguration() {
+
+ VDBComponent parentComponent = (VDBComponent) this.resourceContext
+ .getParentResourceComponent();
+ ManagedComponent mcVdb = null;
+ Configuration configuration = resourceContext.getPluginConfiguration();
+ try {
+ mcVdb = ProfileServiceUtil.getManagedComponent(getConnection(),
+ new ComponentType(PluginConstants.ComponentType.VDB.TYPE,
+ PluginConstants.ComponentType.VDB.SUBTYPE),
+ parentComponent.name);
+ } catch (NamingException e) {
+ final String msg = "NamingException in loadResourceConfiguration(): " + e.getMessage(); //$NON-NLS-1$
+ LOG.error(msg, e);
+ } catch (Exception e) {
+ final String msg = "Exception in loadResourceConfiguration(): " + e.getMessage(); //$NON-NLS-1$
+ LOG.error(msg, e);
+ }
+
+ // Get data roles from VDB
+ ManagedProperty property = mcVdb.getProperty("dataPolicies"); //$NON-NLS-1$
+ if (property != null) {
+ CollectionValueSupport valueSupport = (CollectionValueSupport) property
+ .getValue();
+ MetaValue[] metaValues = valueSupport.getElements();
+
+ for (MetaValue value : metaValues) {
+ GenericValueSupport genValueSupport = (GenericValueSupport) value;
+ ManagedObjectImpl managedObject = (ManagedObjectImpl) genValueSupport
+ .getValue();
+
+ String dataRoleName = ProfileServiceUtil.getSimpleValue(
+ managedObject, "name", String.class); //$NON-NLS-1$
+ Boolean anyAuthenticated = ProfileServiceUtil.getSimpleValue(
+ managedObject, "anyAuthenticated", Boolean.class); //$NON-NLS-1$
+ String description = ProfileServiceUtil.getSimpleValue(
+ managedObject, "description", String.class); //$NON-NLS-1$
+
+ configuration.put(new PropertySimple("name", dataRoleName)); //$NON-NLS-1$
+ configuration.put(new PropertySimple("anyAuthenticated", //$NON-NLS-1$
+ anyAuthenticated));
+ configuration
+ .put(new PropertySimple("description", description)); //$NON-NLS-1$
+
+ PropertyList mappedRoleNameList = new PropertyList(
+ "mappedRoleNameList"); //$NON-NLS-1$
+ configuration.put(mappedRoleNameList);
+ ManagedProperty mappedRoleNames = managedObject
+ .getProperty("mappedRoleNames"); //$NON-NLS-1$
+ if (mappedRoleNames != null) {
+ List<String> props = (List<String>) MetaValueFactory
+ .getInstance().unwrap(mappedRoleNames.getValue());
+ for (String mappedRoleName : props) {
+ PropertyMap mappedRoleNameMap = null;
+
+ mappedRoleNameMap = new PropertyMap("map", //$NON-NLS-1$
+ new PropertySimple("name", mappedRoleName)); //$NON-NLS-1$
+ mappedRoleNameList.add(mappedRoleNameMap);
+ }
+ }
+ }
+ }
+
+ return configuration;
+
+ }
+
+ @Override
+ public CreateResourceReport createResource(
+ CreateResourceReport createResourceReport) {
+
+ createContentBasedResource(createResourceReport);
+ return createResourceReport;
+ }
+
+ @Override
+ public ProfileServiceConnection getConnection() {
+ return ((VDBComponent) this.resourceContext
+ .getParentResourceComponent()).getConnection();
+ }
+
+ @Override
+ public EmsConnection getEmsConnection() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
Copied: trunk/console/src/main/java/org/teiid/rhq/plugin/DataRoleDiscoveryComponent.java (from rev 2599, branches/7.1.x/console/src/main/java/org/teiid/rhq/plugin/DataRoleDiscoveryComponent.java)
===================================================================
--- trunk/console/src/main/java/org/teiid/rhq/plugin/DataRoleDiscoveryComponent.java (rev 0)
+++ trunk/console/src/main/java/org/teiid/rhq/plugin/DataRoleDiscoveryComponent.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -0,0 +1,139 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+package org.teiid.rhq.plugin;
+
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.jboss.managed.api.ComponentType;
+import org.jboss.managed.api.ManagedComponent;
+import org.jboss.managed.api.ManagedObject;
+import org.jboss.managed.api.ManagedProperty;
+import org.jboss.managed.plugins.ManagedObjectImpl;
+import org.jboss.metatype.api.values.CollectionValueSupport;
+import org.jboss.metatype.api.values.GenericValueSupport;
+import org.jboss.metatype.api.values.MetaValue;
+import org.jboss.metatype.api.values.MetaValueFactory;
+import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.configuration.PropertyList;
+import org.rhq.core.domain.configuration.PropertyMap;
+import org.rhq.core.domain.configuration.PropertySimple;
+import org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails;
+import org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException;
+import org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent;
+import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
+import org.rhq.plugins.jbossas5.connection.ProfileServiceConnection;
+import org.teiid.rhq.plugin.util.PluginConstants;
+import org.teiid.rhq.plugin.util.ProfileServiceUtil;
+
+/**
+ * Discovery component for Data Roles of a VDB
+ *
+ */
+public class DataRoleDiscoveryComponent implements ResourceDiscoveryComponent {
+
+ private final Log log = LogFactory
+ .getLog(PluginConstants.DEFAULT_LOGGER_CATEGORY);
+
+ public Set<DiscoveredResourceDetails> discoverResources(
+ ResourceDiscoveryContext discoveryContext)
+ throws InvalidPluginConfigurationException, Exception {
+ Set<DiscoveredResourceDetails> discoveredResources = new HashSet<DiscoveredResourceDetails>();
+ VDBComponent parenComponent = (VDBComponent) discoveryContext
+ .getParentResourceComponent();
+ ProfileServiceConnection connection = parenComponent.getConnection();
+
+ ManagedComponent mcVdb = ProfileServiceUtil.getManagedComponent(
+ connection, new ComponentType(
+ PluginConstants.ComponentType.VDB.TYPE,
+ PluginConstants.ComponentType.VDB.SUBTYPE),
+ parenComponent.name);
+
+ // Get data roles from VDB
+ ManagedProperty property = mcVdb.getProperty("dataPolicies");
+ if (property != null) {
+ CollectionValueSupport valueSupport = (CollectionValueSupport) property
+ .getValue();
+ MetaValue[] metaValues = valueSupport.getElements();
+
+ for (MetaValue value : metaValues) {
+ GenericValueSupport genValueSupport = (GenericValueSupport) value;
+ ManagedObjectImpl managedObject = (ManagedObjectImpl) genValueSupport
+ .getValue();
+
+ String dataRoleName = ProfileServiceUtil.getSimpleValue(
+ managedObject, "name", String.class);
+ Boolean anyAuthenticated = ProfileServiceUtil.getSimpleValue(
+ managedObject, "anyAuthenticated", Boolean.class);
+ String description = ProfileServiceUtil.getSimpleValue(
+ managedObject, "description", String.class);
+
+ /**
+ *
+ * A discovered resource must have a unique key, that must stay
+ * the same when the resource is discovered the next time
+ */
+ DiscoveredResourceDetails detail = new DiscoveredResourceDetails(
+ discoveryContext.getResourceType(), // ResourceType
+ dataRoleName, // Resource Key
+ dataRoleName, // Resource Name
+ null, // Version
+ PluginConstants.ComponentType.DATA_ROLE.DESCRIPTION, // Description
+ discoveryContext.getDefaultPluginConfiguration(), // Plugin
+ // Config
+ null // Process info from a process scan
+ );
+
+ Configuration configuration = detail.getPluginConfiguration();
+
+ configuration.put(new PropertySimple("name", dataRoleName));
+ configuration.put(new PropertySimple("anyAuthenticated",
+ anyAuthenticated));
+ configuration
+ .put(new PropertySimple("description", description));
+
+ PropertyList mappedRoleNameList = new PropertyList(
+ "mappedRoleNameList");
+ configuration.put(mappedRoleNameList);
+ ManagedProperty mappedRoleNames = managedObject
+ .getProperty("mappedRoleNames");
+ if (mappedRoleNames != null) {
+ List<String> props = (List<String>) MetaValueFactory
+ .getInstance().unwrap(mappedRoleNames.getValue());
+ for (String mappedRoleName : props) {
+ mappedRoleNameList.add(new PropertySimple("name", mappedRoleName));
+ }
+
+ }
+ // Add to return values
+ discoveredResources.add(detail);
+ log.debug("Discovered Teiid VDB Data Role: " + dataRoleName);
+ }
+ }
+
+ return discoveredResources;
+
+ }
+}
\ No newline at end of file
Modified: trunk/console/src/main/java/org/teiid/rhq/plugin/Facet.java
===================================================================
--- trunk/console/src/main/java/org/teiid/rhq/plugin/Facet.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/console/src/main/java/org/teiid/rhq/plugin/Facet.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -21,17 +21,19 @@
*/
package org.teiid.rhq.plugin;
+import java.io.BufferedOutputStream;
import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
import java.io.InputStream;
-import java.util.Collections;
+import java.io.OutputStream;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
-import javax.naming.NamingException;
-
+import org.apache.commons.io.FileUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jboss.deployers.spi.management.ManagementView;
@@ -49,6 +51,8 @@
import org.rhq.core.domain.configuration.definition.ConfigurationTemplate;
import org.rhq.core.domain.content.PackageDetailsKey;
import org.rhq.core.domain.content.PackageType;
+import org.rhq.core.domain.content.transfer.ContentResponseResult;
+import org.rhq.core.domain.content.transfer.DeployIndividualPackageResponse;
import org.rhq.core.domain.content.transfer.DeployPackageStep;
import org.rhq.core.domain.content.transfer.DeployPackagesResponse;
import org.rhq.core.domain.content.transfer.RemovePackagesResponse;
@@ -72,6 +76,7 @@
import org.rhq.core.pluginapi.measurement.MeasurementFacet;
import org.rhq.core.pluginapi.operation.OperationFacet;
import org.rhq.core.pluginapi.operation.OperationResult;
+import org.rhq.core.util.exception.ThrowableUtil;
import org.rhq.plugins.jbossas5.ProfileServiceComponent;
import org.rhq.plugins.jbossas5.connection.ProfileServiceConnection;
import org.teiid.rhq.admin.DQPManagementView;
@@ -85,11 +90,13 @@
* This class implements required RHQ interfaces and provides common logic used
* by all MetaMatrix components.
*/
-public abstract class Facet implements ProfileServiceComponent<ResourceComponent>, MeasurementFacet,
+public abstract class Facet implements
+ ProfileServiceComponent<ResourceComponent>, MeasurementFacet,
OperationFacet, ConfigurationFacet, ContentFacet, DeleteResourceFacet,
CreateChildResourceFacet {
- protected final Log LOG = LogFactory.getLog(PluginConstants.DEFAULT_LOGGER_CATEGORY);
+ protected final Log LOG = LogFactory
+ .getLog(PluginConstants.DEFAULT_LOGGER_CATEGORY);
/**
* Represents the resource configuration of the custom product being
@@ -113,11 +120,15 @@
private final Log log = LogFactory.getLog(this.getClass());
+ private File deploymentFile;
+ private static final String BACKUP_FILE_EXTENSION = ".rej"; //$NON-NLS-1$
+
/**
* The name of the ManagedDeployment (e.g.:
* C:/opt/jboss-5.0.0.GA/server/default/deploy/foo.vdb).
*/
protected String deploymentName;
+ protected String deploymentUrl;
private PackageVersions versions = null;
@@ -128,12 +139,12 @@
* "vdb". This is still unique within the context of the parent resource
* type and lets this class use the same package type name in both cases.
*/
- private static final String PKG_TYPE_VDB = "vdb";
+ private static final String PKG_TYPE_VDB = "vdb"; //$NON-NLS-1$
/**
* Architecture string used in describing discovered packages.
*/
- private static final String ARCHITECTURE = "noarch";
+ private static final String ARCHITECTURE = "noarch"; //$NON-NLS-1$
abstract String getComponentType();
@@ -149,8 +160,6 @@
deploymentName = context.getResourceKey();
}
-
-
/**
* This is called when the component is being stopped, usually due to the
* plugin container shutting down. You can perform some cleanup here; though
@@ -176,7 +185,7 @@
public void setResourceConfiguration(Configuration resourceConfiguration) {
this.resourceConfiguration = resourceConfiguration;
}
-
+
public String componentType() {
return name;
}
@@ -197,8 +206,8 @@
Configuration configuration, Map<String, Object> argumentMap) {
// moved this logic up to the associated implemented class
throw new InvalidPluginConfigurationException(
- "Not implemented on component type " + this.getComponentType()
- + " named " + this.name);
+ "Not implemented on component type " + this.getComponentType() //$NON-NLS-1$
+ + " named " + this.name); //$NON-NLS-1$
}
@@ -206,12 +215,13 @@
Map<String, Object> argumentMap) {
// moved this logic up to the associated implemented class
throw new InvalidPluginConfigurationException(
- "Not implemented on component type " + this.getComponentType()
- + " named " + this.name);
+ "Not implemented on component type " + this.getComponentType() //$NON-NLS-1$
+ + " named " + this.name); //$NON-NLS-1$
}
- protected void execute(final ProfileServiceConnection connection, final ExecutedResult result, final Map valueMap) {
+ protected void execute(final ProfileServiceConnection connection,
+ final ExecutedResult result, final Map<String, Object> valueMap) {
DQPManagementView dqp = new DQPManagementView();
dqp.executeOperation(connection, result, valueMap);
@@ -262,7 +272,7 @@
*/
public OperationResult invokeOperation(String name,
Configuration configuration) {
- Map valueMap = new HashMap();
+ Map<String, Object> valueMap = new HashMap<String, Object>();
Set operationDefinitionSet = this.resourceContext.getResourceType()
.getOperationDefinitions();
@@ -317,24 +327,27 @@
resourceConfiguration = report.getConfiguration().deepCopy();
Configuration resourceConfig = report.getConfiguration();
-
- ManagementView managementView = null;
+
+ ManagementView managementView = null;
ComponentType componentType = null;
- if (this.getComponentType().equals(PluginConstants.ComponentType.VDB.NAME)) {
+ if (this.getComponentType().equals(
+ PluginConstants.ComponentType.VDB.NAME)) {
componentType = new ComponentType(
PluginConstants.ComponentType.VDB.TYPE,
PluginConstants.ComponentType.VDB.SUBTYPE);
} else {
report.setStatus(ConfigurationUpdateStatus.FAILURE);
- report.setErrorMessage("Update not implemented for the component type.");
+ report
+ .setErrorMessage("Update not implemented for the component type."); //$NON-NLS-1$
}
ManagedComponent managedComponent = null;
report.setStatus(ConfigurationUpdateStatus.SUCCESS);
try {
-
+
managementView = getConnection().getManagementView();
- managedComponent = managementView.getComponent(this.name, componentType);
+ managedComponent = managementView.getComponent(this.name,
+ componentType);
Map<String, ManagedProperty> managedProperties = managedComponent
.getProperties();
@@ -343,16 +356,16 @@
.getResourceType());
try {
- managementView.updateComponent(managedComponent);
+ managementView.updateComponent(managedComponent);
} catch (Exception e) {
- LOG.error("Unable to update component ["
- + managedComponent.getName() + "] of type "
- + componentType + ".", e);
+ LOG.error("Unable to update component [" //$NON-NLS-1$
+ + managedComponent.getName() + "] of type " //$NON-NLS-1$
+ + componentType + ".", e); //$NON-NLS-1$
report.setStatus(ConfigurationUpdateStatus.FAILURE);
report.setErrorMessageFromThrowable(e);
}
} catch (Exception e) {
- LOG.error("Unable to process update request", e);
+ LOG.error("Unable to process update request", e); //$NON-NLS-1$
report.setStatus(ConfigurationUpdateStatus.FAILURE);
report.setErrorMessageFromThrowable(e);
}
@@ -373,11 +386,11 @@
*/
protected void updateComponent(ManagedComponent managedComponent)
throws Exception {
- log.trace("Updating " + this.name + " with component "
- + managedComponent.toString() + "...");
+ log.trace("Updating " + this.name + " with component " //$NON-NLS-1$ //$NON-NLS-2$
+ + managedComponent.toString() + "..."); //$NON-NLS-1$
ManagementView managementView = getConnection().getManagementView();
managementView.updateComponent(managedComponent);
-
+
}
@Override
@@ -386,25 +399,25 @@
DeploymentManager deploymentManager = getConnection()
.getDeploymentManager();
- log.debug("Stopping deployment [" + this.deploymentName + "]...");
+ log.debug("Stopping deployment [" + this.deploymentName + "]..."); //$NON-NLS-1$ //$NON-NLS-2$
DeploymentProgress progress = deploymentManager
.stop(this.deploymentName);
DeploymentStatus stopStatus = DeploymentUtils.run(progress);
if (stopStatus.isFailed()) {
- log.error("Failed to stop deployment '" + this.deploymentName
- + "'.", stopStatus.getFailure());
- throw new Exception("Failed to stop deployment '"
- + this.deploymentName + "' - cause: "
+ log.error("Failed to stop deployment '" + this.deploymentName //$NON-NLS-1$
+ + "'.", stopStatus.getFailure()); //$NON-NLS-1$
+ throw new Exception("Failed to stop deployment '" //$NON-NLS-1$
+ + this.deploymentName + "' - cause: " //$NON-NLS-1$
+ stopStatus.getFailure());
}
- log.debug("Removing deployment [" + this.deploymentName + "]...");
+ log.debug("Removing deployment [" + this.deploymentName + "]..."); //$NON-NLS-1$ //$NON-NLS-2$
progress = deploymentManager.remove(this.deploymentName);
DeploymentStatus removeStatus = DeploymentUtils.run(progress);
if (removeStatus.isFailed()) {
- log.error("Failed to remove deployment '" + this.deploymentName
- + "'.", removeStatus.getFailure());
- throw new Exception("Failed to remove deployment '"
- + this.deploymentName + "' - cause: "
+ log.error("Failed to remove deployment '" + this.deploymentName //$NON-NLS-1$
+ + "'.", removeStatus.getFailure()); //$NON-NLS-1$
+ throw new Exception("Failed to remove deployment '" //$NON-NLS-1$
+ + this.deploymentName + "' - cause: " //$NON-NLS-1$
+ removeStatus.getFailure());
}
@@ -414,13 +427,257 @@
public DeployPackagesResponse deployPackages(
Set<ResourcePackageDetails> packages,
ContentServices contentServices) {
- return null;
+ // You can only update the one application file referenced by this
+ // resource, so punch out if multiple are
+ // specified.
+ if (packages.size() != 1) {
+ log
+ .warn("Request to update a VDB file contained multiple packages: " //$NON-NLS-1$
+ + packages);
+ DeployPackagesResponse response = new DeployPackagesResponse(
+ ContentResponseResult.FAILURE);
+ response
+ .setOverallRequestErrorMessage("When updating a VDB, only one VDB can be updated at a time."); //$NON-NLS-1$
+ return response;
+ }
+
+ ResourcePackageDetails packageDetails = packages.iterator().next();
+
+ log.debug("Updating VDB file '" + this.deploymentFile + "' using [" //$NON-NLS-1$ //$NON-NLS-2$
+ + packageDetails + "]..."); //$NON-NLS-1$
+
+ log.debug("Writing new VDB bits to temporary file..."); //$NON-NLS-1$
+ File tempFile;
+ try {
+ tempFile = writeNewAppBitsToTempFile(contentServices,
+ packageDetails);
+ } catch (Exception e) {
+ return failApplicationDeployment(
+ "Error writing new application bits to temporary file - cause: " //$NON-NLS-1$
+ + e, packageDetails);
+ }
+ log.debug("Wrote new VDB bits to temporary file '" + tempFile //$NON-NLS-1$
+ + "'."); //$NON-NLS-1$
+
+ boolean deployExploded = this.deploymentFile.isDirectory();
+
+ // Backup the original app file/dir to <filename>.rej.
+ File backupOfOriginalFile = new File(this.deploymentFile.getPath()
+ + BACKUP_FILE_EXTENSION);
+ log.debug("Backing up existing VDB '" + this.deploymentFile //$NON-NLS-1$
+ + "' to '" + backupOfOriginalFile + "'..."); //$NON-NLS-1$ //$NON-NLS-2$
+ try {
+ if (backupOfOriginalFile.exists())
+ FileUtils.forceDelete(backupOfOriginalFile);
+ if (this.deploymentFile.isDirectory())
+ FileUtils.copyDirectory(this.deploymentFile,
+ backupOfOriginalFile, true);
+ else
+ FileUtils.copyFile(this.deploymentFile, backupOfOriginalFile,
+ true);
+ } catch (Exception e) {
+ throw new RuntimeException("Failed to backup existing EAR/WAR '" //$NON-NLS-1$
+ + this.deploymentFile + "' to '" + backupOfOriginalFile //$NON-NLS-1$
+ + "'."); //$NON-NLS-1$
+ }
+
+ // Now stop the original app.
+ try {
+ DeploymentManager deploymentManager = getConnection()
+ .getDeploymentManager();
+ DeploymentProgress progress = deploymentManager
+ .stop(this.deploymentUrl);
+ DeploymentUtils.run(progress);
+ } catch (Exception e) {
+ throw new RuntimeException("Failed to stop deployment [" //$NON-NLS-1$
+ + this.deploymentUrl + "].", e); //$NON-NLS-1$
+ }
+
+ // And then remove it (this will delete the physical file/dir from the
+ // deploy dir).
+ try {
+ DeploymentManager deploymentManager = getConnection()
+ .getDeploymentManager();
+ DeploymentProgress progress = deploymentManager
+ .remove(this.deploymentUrl);
+ DeploymentUtils.run(progress);
+ } catch (Exception e) {
+ throw new RuntimeException("Failed to remove deployment [" //$NON-NLS-1$
+ + this.deploymentUrl + "].", e); //$NON-NLS-1$
+ }
+
+ // Deploy away!
+ log.debug("Deploying '" + tempFile + "'..."); //$NON-NLS-1$ //$NON-NLS-2$
+ DeploymentManager deploymentManager = getConnection()
+ .getDeploymentManager();
+ try {
+ DeploymentUtils.deployArchive(deploymentManager, tempFile,
+ deployExploded);
+ } catch (Exception e) {
+ // Deploy failed - rollback to the original app file...
+ log.debug("Redeploy failed - rolling back to original archive...", //$NON-NLS-1$
+ e);
+ String errorMessage = ThrowableUtil.getAllMessages(e);
+ try {
+ // Delete the new app, which failed to deploy.
+ FileUtils.forceDelete(this.deploymentFile);
+ // Need to re-deploy the original file - this generally should
+ // succeed.
+ DeploymentUtils.deployArchive(deploymentManager,
+ backupOfOriginalFile, deployExploded);
+ errorMessage += " ***** ROLLED BACK TO ORIGINAL APPLICATION FILE. *****"; //$NON-NLS-1$
+ } catch (Exception e1) {
+ log.debug("Rollback failed!", e1); //$NON-NLS-1$
+ errorMessage += " ***** FAILED TO ROLLBACK TO ORIGINAL APPLICATION FILE. *****: " //$NON-NLS-1$
+ + ThrowableUtil.getAllMessages(e1);
+ }
+ log.info("Failed to update VDB file '" + this.deploymentFile //$NON-NLS-1$
+ + "' using [" + packageDetails + "]."); //$NON-NLS-1$ //$NON-NLS-2$
+ return failApplicationDeployment(errorMessage, packageDetails);
+ }
+
+ // Deploy was successful!
+
+ deleteBackupOfOriginalFile(backupOfOriginalFile);
+ persistApplicationVersion(packageDetails, this.deploymentFile);
+
+ DeployPackagesResponse response = new DeployPackagesResponse(
+ ContentResponseResult.SUCCESS);
+ DeployIndividualPackageResponse packageResponse = new DeployIndividualPackageResponse(
+ packageDetails.getKey(), ContentResponseResult.SUCCESS);
+ response.addPackageResponse(packageResponse);
+
+ log.debug("Updated VDB file '" + this.deploymentFile //$NON-NLS-1$
+ + "' successfully - returning response [" + response + "]..."); //$NON-NLS-1$ //$NON-NLS-2$
+
+ return response;
}
+ private void deleteBackupOfOriginalFile(File backupOfOriginalFile) {
+ log.debug("Deleting backup of original file '" + backupOfOriginalFile //$NON-NLS-1$
+ + "'..."); //$NON-NLS-1$
+ try {
+ FileUtils.forceDelete(backupOfOriginalFile);
+ } catch (Exception e) {
+ // not critical.
+ log.warn("Failed to delete backup of original file: " //$NON-NLS-1$
+ + backupOfOriginalFile);
+ }
+ }
+
+ private void persistApplicationVersion(ResourcePackageDetails packageDetails, File appFile)
+ {
+ String packageName = appFile.getName();
+ log.debug("Persisting application version '" + packageDetails.getVersion() + "' for package '" + packageName //$NON-NLS-1$ //$NON-NLS-2$
+ + "'"); //$NON-NLS-1$
+ PackageVersions versions = loadPackageVersions();
+ versions.putVersion(packageName, packageDetails.getVersion());
+ }
+
+ private File writeNewAppBitsToTempFile(ContentServices contentServices,
+ ResourcePackageDetails packageDetails) throws Exception {
+ File tempDir = this.resourceContext.getTemporaryDirectory();
+ File tempFile = new File(tempDir, this.deploymentFile.getName());
+
+ OutputStream tempOutputStream = null;
+ try {
+ tempOutputStream = new BufferedOutputStream(new FileOutputStream(
+ tempFile));
+ long bytesWritten = contentServices.downloadPackageBits(
+ this.resourceContext.getContentContext(), packageDetails
+ .getKey(), tempOutputStream, true);
+ log
+ .debug("Wrote " + bytesWritten + " bytes to '" + tempFile //$NON-NLS-1$ //$NON-NLS-2$
+ + "'."); //$NON-NLS-1$
+ } catch (IOException e) {
+ log.error(
+ "Error writing updated application bits to temporary location: " //$NON-NLS-1$
+ + tempFile, e);
+ throw e;
+ } finally {
+ if (tempOutputStream != null) {
+ try {
+ tempOutputStream.close();
+ } catch (IOException e) {
+ log.error("Error closing temporary output stream", e); //$NON-NLS-1$
+ }
+ }
+ }
+ if (!tempFile.exists()) {
+ log.error("Temporary file for application update not written to: " //$NON-NLS-1$
+ + tempFile);
+ throw new Exception();
+ }
+ return tempFile;
+ }
+
+ /**
+ * Creates the necessary transfer objects to report a failed application
+ * deployment (update).
+ *
+ * @param errorMessage
+ * reason the deploy failed
+ * @param packageDetails
+ * describes the update being made
+ * @return response populated to reflect a failure
+ */
+ private DeployPackagesResponse failApplicationDeployment(
+ String errorMessage, ResourcePackageDetails packageDetails) {
+ DeployPackagesResponse response = new DeployPackagesResponse(
+ ContentResponseResult.FAILURE);
+
+ DeployIndividualPackageResponse packageResponse = new DeployIndividualPackageResponse(
+ packageDetails.getKey(), ContentResponseResult.FAILURE);
+ packageResponse.setErrorMessage(errorMessage);
+
+ response.addPackageResponse(packageResponse);
+
+ return response;
+ }
+
@Override
public Set<ResourcePackageDetails> discoverDeployedPackages(PackageType arg0) {
- // Teiid does not support the versions yet.
- return Collections.EMPTY_SET;
+
+ // PLEASE DO NOT REMOVE THIS METHOD. IT IS REQUIRED FOR THE CONTENT TAB.
+
+ Configuration pluginConfig = this.resourceContext
+ .getPluginConfiguration();
+ this.deploymentUrl = pluginConfig.getSimple("url").getStringValue(); //$NON-NLS-1$
+
+ if (this.deploymentUrl != null) {
+ this.deploymentFile = new File(this.deploymentUrl
+ .substring(deploymentUrl.indexOf(":/") + 1)); //$NON-NLS-1$
+ }
+
+ if (!deploymentFile.exists())
+ throw new IllegalStateException("Deployment file '" //$NON-NLS-1$
+ + this.deploymentFile + "' for " + this.getComponentType() //$NON-NLS-1$
+ + " does not exist."); //$NON-NLS-1$
+
+ String fileName = deploymentFile.getName();
+ org.rhq.core.pluginapi.content.version.PackageVersions packageVersions = loadPackageVersions();
+ String version = packageVersions.getVersion(fileName);
+ if (version == null) {
+ // This is either the first time we've discovered this VDB, or
+ // someone purged the PC's data dir.
+ version = "1.0"; //$NON-NLS-1$
+ packageVersions.putVersion(fileName, version);
+ packageVersions.saveToDisk();
+ }
+
+ // Package name is the deployment's file name (e.g. foo.ear).
+ PackageDetailsKey key = new PackageDetailsKey(fileName, version,
+ PKG_TYPE_VDB, ARCHITECTURE);
+ ResourcePackageDetails packageDetails = new ResourcePackageDetails(key);
+ packageDetails.setFileName(fileName);
+ packageDetails.setLocation(deploymentFile.getPath());
+ if (!deploymentFile.isDirectory())
+ packageDetails.setFileSize(deploymentFile.length());
+ packageDetails.setFileCreatedDate(null);
+ Set<ResourcePackageDetails> packages = new HashSet<ResourcePackageDetails>();
+ packages.add(packageDetails);
+
+ return packages;
}
@Override
@@ -459,11 +716,11 @@
@Override
public CreateResourceReport createResource(CreateResourceReport report) {
ResourceType resourceType = report.getResourceType();
-// if (resourceType.getName().equals("Translators")) {
-// createConfigurationBasedResource(report);
-// } else {
- createContentBasedResource(report);
-// }
+ // if (resourceType.getName().equals("Translators")) {
+ // createConfigurationBasedResource(report);
+ // } else {
+ createContentBasedResource(report);
+ // }
return report;
}
@@ -481,12 +738,12 @@
ManagementView managementView = null;
;
managementView = getConnection().getManagementView();
-
- if (ProfileServiceUtil.isManagedComponent(getConnection(), resourceName,
- componentType)) {
+
+ if (ProfileServiceUtil.isManagedComponent(getConnection(),
+ resourceName, componentType)) {
createResourceReport.setStatus(CreateResourceStatus.FAILURE);
- createResourceReport.setErrorMessage("A " + resourceType.getName()
- + " named '" + resourceName + "' already exists.");
+ createResourceReport.setErrorMessage("A " + resourceType.getName() //$NON-NLS-1$
+ + " named '" + resourceName + "' already exists."); //$NON-NLS-1$ //$NON-NLS-2$
return createResourceReport;
}
@@ -499,7 +756,6 @@
String templateName = templateNameProperty.getStringValue();
DeploymentTemplateInfo template;
- Set templateNamesSet = managementView.getTemplateNames();
try {
template = managementView.getTemplate(templateName);
Map<String, ManagedProperty> managedProperties = template
@@ -508,26 +764,26 @@
ProfileServiceUtil.convertConfigurationToManagedProperties(
managedProperties, resourceConfig, resourceType);
- LOG.debug("Applying template [" + templateName
- + "] to create ManagedComponent of type [" + componentType
- + "]...");
+ LOG.debug("Applying template [" + templateName //$NON-NLS-1$
+ + "] to create ManagedComponent of type [" + componentType //$NON-NLS-1$
+ + "]..."); //$NON-NLS-1$
try {
managementView.applyTemplate(resourceName, template);
managementView.process();
createResourceReport.setStatus(CreateResourceStatus.SUCCESS);
} catch (Exception e) {
- LOG.error("Unable to apply template [" + templateName
- + "] to create ManagedComponent of type "
- + componentType + ".", e);
+ LOG.error("Unable to apply template [" + templateName //$NON-NLS-1$
+ + "] to create ManagedComponent of type " //$NON-NLS-1$
+ + componentType + ".", e); //$NON-NLS-1$
createResourceReport.setStatus(CreateResourceStatus.FAILURE);
createResourceReport.setException(e);
}
} catch (NoSuchDeploymentException e) {
- LOG.error("Unable to find template [" + templateName + "].", e);
+ LOG.error("Unable to find template [" + templateName + "].", e); //$NON-NLS-1$ //$NON-NLS-2$
createResourceReport.setStatus(CreateResourceStatus.FAILURE);
createResourceReport.setException(e);
} catch (Exception e) {
- LOG.error("Unable to process create request", e);
+ LOG.error("Unable to process create request", e); //$NON-NLS-1$
createResourceReport.setStatus(CreateResourceStatus.FAILURE);
createResourceReport.setException(e);
}
@@ -551,8 +807,8 @@
resourceContext.getResourceType())) {
createResourceReport.setStatus(CreateResourceStatus.FAILURE);
createResourceReport
- .setErrorMessage("Incorrect extension specified on filename ["
- + archivePath + "]");
+ .setErrorMessage("Incorrect extension specified on filename [" //$NON-NLS-1$
+ + archivePath + "]"); //$NON-NLS-1$
}
@@ -567,7 +823,7 @@
createResourceReport.setStatus(CreateResourceStatus.SUCCESS);
} catch (Throwable t) {
- log.error("Error deploying application for report: "
+ log.error("Error deploying application for report: " //$NON-NLS-1$
+ createResourceReport, t);
createResourceReport.setStatus(CreateResourceStatus.FAILURE);
createResourceReport.setException(t);
@@ -581,15 +837,15 @@
.getSimple(TranslatorComponent.Config.RESOURCE_NAME);
if (resourceNameProp == null
|| resourceNameProp.getStringValue() == null)
- throw new IllegalStateException("Property ["
+ throw new IllegalStateException("Property [" //$NON-NLS-1$
+ TranslatorComponent.Config.RESOURCE_NAME
- + "] is not defined in the default plugin configuration.");
+ + "] is not defined in the default plugin configuration."); //$NON-NLS-1$
String resourceNamePropName = resourceNameProp.getStringValue();
PropertySimple propToUseAsResourceName = resourceConfig
.getSimple(resourceNamePropName);
if (propToUseAsResourceName == null)
- throw new IllegalStateException("Property [" + resourceNamePropName
- + "] is not defined in initial Resource configuration.");
+ throw new IllegalStateException("Property [" + resourceNamePropName //$NON-NLS-1$
+ + "] is not defined in initial Resource configuration."); //$NON-NLS-1$
return propToUseAsResourceName.getStringValue();
}
@@ -597,9 +853,9 @@
ComponentType componentType = ProfileServiceUtil
.getComponentType(resourceType);
if (componentType == null)
- throw new IllegalStateException("Unable to map " + resourceType
- + " to a ComponentType.");
- return componentType.getType() + ":" + componentType.getSubtype() + ":"
+ throw new IllegalStateException("Unable to map " + resourceType //$NON-NLS-1$
+ + " to a ComponentType."); //$NON-NLS-1$
+ return componentType.getType() + ":" + componentType.getSubtype() + ":" //$NON-NLS-1$ //$NON-NLS-2$
+ resourceName;
}
@@ -615,9 +871,9 @@
File dataDirectoryFile = resourceContext.getDataDirectory();
dataDirectoryFile.mkdirs();
String dataDirectory = dataDirectoryFile.getAbsolutePath();
- log.trace("Creating application versions store with plugin name ["
- + pluginName + "] and data directory [" + dataDirectory
- + "]");
+ log.trace("Creating application versions store with plugin name [" //$NON-NLS-1$
+ + pluginName + "] and data directory [" + dataDirectory //$NON-NLS-1$
+ + "]"); //$NON-NLS-1$
this.versions = new PackageVersions(pluginName, dataDirectory);
this.versions.loadFromDisk();
}
Modified: trunk/console/src/main/java/org/teiid/rhq/plugin/util/PluginConstants.java
===================================================================
--- trunk/console/src/main/java/org/teiid/rhq/plugin/util/PluginConstants.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/console/src/main/java/org/teiid/rhq/plugin/util/PluginConstants.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -118,7 +118,20 @@
}
}
+
+ public interface DATA_ROLE {
+ public final static String NAME = "VDB Data Role"; //$NON-NLS-1$
+ public final static String DESCRIPTION = "Data/Security Role for a Teiid Virtual Database (VDB)"; //$NON-NLS-1$
+
+ public static interface Operations {
+ }
+
+ public static interface Metrics {
+ }
+
+ }
+
public interface Translator {
public final static String TYPE = "teiid"; //$NON-NLS-1$
Modified: trunk/console/src/main/resources/META-INF/rhq-plugin.xml
===================================================================
--- trunk/console/src/main/resources/META-INF/rhq-plugin.xml 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/console/src/main/resources/META-INF/rhq-plugin.xml 2010-09-24 18:51:07 UTC (rev 2603)
@@ -154,20 +154,22 @@
</c:list-property>
</results>
</operation>
-
+
<operation name="deployVdbByUrl" displayName="Deploy a VDB via URL"
description="Deploy a VDB using a URL">
<parameters>
<c:simple-property displayName="VDB URL" name="vdbUrl"
type="file" required="true" description="The URL of the VDB to deploy" />
- <c:simple-property displayName="VDB Deploy File Name" name="vdbDeployName"
- type="string" required="true" description="The deployment file name to use. Must match the VDB Name you are deploying." />
+ <c:simple-property displayName="VDB Deploy File Name"
+ name="vdbDeployName" type="string" required="true"
+ description="The deployment file name to use. Must match the VDB Name you are deploying." />
<c:simple-property displayName="VDB Version" name="vdbVersion"
- type="integer" required="false" description="The version to use for the deployed VDB (leave blank for overwrite of version one)" />
+ type="integer" required="false"
+ description="The version to use for the deployed VDB (leave blank for overwrite of version one)" />
</parameters>
</operation>
-
+
<operation name="terminateSession" displayName="Terminate Session"
description="Terminate a specified session">
<parameters>
@@ -269,30 +271,30 @@
displayType="detail" category="throughput" property="userBufferSpace"
description="The currently used file buffer space in MB." />
- <metric displayName="Prepared Plan Cache Hit Ratio %" defaultOn="true"
- displayType="detail" category="performance" property="PREPARED_PLAN_CACHE.hitRatio"
- description="Percentage of positive cache hits" />
+ <metric displayName="Prepared Plan Cache Hit Ratio %"
+ defaultOn="true" displayType="detail" category="performance"
+ property="PREPARED_PLAN_CACHE.hitRatio" description="Percentage of positive cache hits" />
- <metric displayName="Prepared Plan Cache Size" defaultOn="true"
- displayType="detail" category="performance" property="PREPARED_PLAN_CACHE.totalEntries"
- description="Current number of entries in cache" />
+ <metric displayName="Prepared Plan Cache Size" defaultOn="true"
+ displayType="detail" category="performance" property="PREPARED_PLAN_CACHE.totalEntries"
+ description="Current number of entries in cache" />
- <metric displayName="Prepared Plan Cache # of Requests" defaultOn="true"
- displayType="detail" category="performance" property="PREPARED_PLAN_CACHE.requestCount"
- description="Total number of requests made against cache" />
-
- <metric displayName="ResultSet Cache Hit Ratio %" defaultOn="true"
- displayType="detail" category="performance" property="QUERY_SERVICE_RESULT_SET_CACHE.hitRatio"
- description="Percentage of positive cache hits" />
+ <metric displayName="Prepared Plan Cache # of Requests"
+ defaultOn="true" displayType="detail" category="performance"
+ property="PREPARED_PLAN_CACHE.requestCount" description="Total number of requests made against cache" />
- <metric displayName="ResultSet Cache Size" defaultOn="true"
- displayType="detail" category="performance" property="QUERY_SERVICE_RESULT_SET_CACHE.totalEntries"
- description="Current number of entries in cache" />
+ <metric displayName="ResultSet Cache Hit Ratio %" defaultOn="true"
+ displayType="detail" category="performance"
+ property="QUERY_SERVICE_RESULT_SET_CACHE.hitRatio" description="Percentage of positive cache hits" />
- <metric displayName="ResultSet Cache # of Requests" defaultOn="true"
- displayType="detail" category="performance" property="QUERY_SERVICE_RESULT_SET_CACHE.requestCount"
- description="Total number of requests made against cache" />
+ <metric displayName="ResultSet Cache Size" defaultOn="true"
+ displayType="detail" category="performance"
+ property="QUERY_SERVICE_RESULT_SET_CACHE.totalEntries" description="Current number of entries in cache" />
+ <metric displayName="ResultSet Cache # of Requests" defaultOn="true"
+ displayType="detail" category="performance"
+ property="QUERY_SERVICE_RESULT_SET_CACHE.requestCount" description="Total number of requests made against cache" />
+
<resource-configuration>
<c:group name="teiidProperties" displayName="Runtime Engine Properties"
hiddenByDefault="false">
@@ -498,7 +500,7 @@
<c:option value="INACTIVE" name="DOWN" default="true" />
</c:property-options>
</c:simple-property>
- <c:simple-property name="connectionType" type="string"
+ <c:simple-property name="connectionType" type="string"
description="Allowable Connections: 1) NONE - disallow new connections 2) BY VERSION - allow connections only if the version is specified or if this is the earliest 'BY VERSION' vdb and there are no vdbs marked as 'ANY'
3) ANY - allow connections with or without a version specified. If multiple versions of same VDB are deployed, connect to one specified with ANY, or if there are multiple VDBs with ANY then connect to the latest version with ANY "
required="false">
@@ -598,6 +600,32 @@
</c:group>
</resource-configuration>
+ <service name="Data Roles" description="Data Roles for this VDB"
+ class="DataRoleComponent" discovery="DataRoleDiscoveryComponent">
+
+ <resource-configuration>
+ <c:simple-property name="name" displayName="Name"
+ description="Name of the data role" readOnly="true" required="false" />
+ <c:simple-property name="anyAuthenticated"
+ displayName="Any Authenticated" type="boolean"
+ description="Indicates if the role is mapped to any authenticated user"
+ readOnly="false" required="false" />
+ <c:simple-property name="description"
+ displayName="Description" type="string"
+ description="Description of this data role"
+ readOnly="true" required="false" />
+ <c:list-property name="mappedRoleNameList"
+ readOnly="false" required="false" displayName="Mapped Role Names"
+ description="Mapped role names for this data role">
+ <c:map-property name="map" readOnly="false">
+ <c:simple-property name="name" displayName="Name"
+ description="Name of this mapped role" readOnly="true" />
+ </c:map-property>
+ </c:list-property>
+ </resource-configuration>
+
+ </service>
+
</service>
<service name="Translators" description="Teiid Translators"
Modified: trunk/documentation/admin-guide/src/main/docbook/en-US/admin_guide.xml
===================================================================
--- trunk/documentation/admin-guide/src/main/docbook/en-US/admin_guide.xml 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/documentation/admin-guide/src/main/docbook/en-US/admin_guide.xml 2010-09-24 18:51:07 UTC (rev 2603)
@@ -50,6 +50,7 @@
<xi:include href="content/security.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="content/logging.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="content/clustering.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="content/performance.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="content/admin-console.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="content/adminshell.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="content/appendix-a.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
Modified: trunk/documentation/admin-guide/src/main/docbook/en-US/content/adminshell.xml
===================================================================
--- trunk/documentation/admin-guide/src/main/docbook/en-US/content/adminshell.xml 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/documentation/admin-guide/src/main/docbook/en-US/content/adminshell.xml 2010-09-24 18:51:07 UTC (rev 2603)
@@ -274,5 +274,21 @@
// close the connection in the "conn1"
disconnectAll();]]></programlisting>
</section>
-
+ <section>
+ <title>Interactive Shell Nuances</title>
+ <para>The interactive shell uses a special shell interpretter and therefore has different behavior than just writting a script in Groovy.
+ See the <ulink url="http://groovy.codehaus.org/Groovy+Shell">Groovy Shell Documentation</ulink> for more on its usage. Notable differences:
+ <itemizedlist>
+ <listitem>
+ <para>Def statements do not define a variable in the context of the Shell, e.g. do not use <code>def x = 1</code>, use <code>x = 1</code></para>
+ </listitem>
+ <listitem>
+ <para>Shell commands (as seen through <code>help</code>) using the non-functional shell syntax are only available in the shell.</para>
+ </listitem>
+ <listitem>
+ <para>Groovy classes using annotations cannot be parsed in the Shell.</para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ </section>
</chapter>
\ No newline at end of file
Modified: trunk/documentation/admin-guide/src/main/docbook/en-US/content/appendix-b.xml
===================================================================
--- trunk/documentation/admin-guide/src/main/docbook/en-US/content/appendix-b.xml 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/documentation/admin-guide/src/main/docbook/en-US/content/appendix-b.xml 2010-09-24 18:51:07 UTC (rev 2603)
@@ -16,6 +16,7 @@
that would work in Java,
BeanShell, Groovy, etc.</para>
<programlisting><![CDATA[import static org.teiid.adminshell.AdminShell.*;
+import static org.teiid.adminshell.GroovySqlExtensions.*;
import org.teiid.adminapi.*;]]></programlisting>
<para>Note that the provided shell and console executables
automatically have the proper class path set and inject the proper
Modified: trunk/documentation/admin-guide/src/main/docbook/en-US/content/clustering.xml
===================================================================
--- trunk/documentation/admin-guide/src/main/docbook/en-US/content/clustering.xml 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/documentation/admin-guide/src/main/docbook/en-US/content/clustering.xml 2010-09-24 18:51:07 UTC (rev 2603)
@@ -6,12 +6,12 @@
To cluster JBoss AS instances use these <ulink url="http://www.jboss.org/jbossas/docs/5-x.html">instructions</ulink> then Teiid instances
are clustered as well. Just make sure that you installed Teiid in every JBoss AS node before starting the cluster.
There is one specific configuration that needs to be done for enabling the replicated (distributed) cache in Teiid.
- To enable distributed cache rename "<jboss-as>/server/<profile>/deploy/teiid/teiid-cache-manager-jboss-beans-rename-me.xml" file
- to "<jboss-as>/server/<profile>/deploy/teiid/teiid-cache-manager-jboss-beans.xml".
+ To enable distributed caching, rename the "<jboss-as>/server/<profile>/deploy/teiid/teiid-cache-manager-jboss-beans-rename-me.xml" file
+ to "<jboss-as>/server/<profile>/deploy/teiid/teiid-cache-manager-jboss-beans.xml".
</para>
<para>
- Typically users create clusters to improve the performance of the system through
+ Typically users create clusters to improve the performance of the system through:
<orderedlist>
<listitem> <para>Load Balancing: Take look at the Client developers guide on how to use load balancing between multiple nodes.</para> </listitem>
<listitem> <para>Fail Over: Take look at the Client developers guide on how to use fail over between multiple nodes.</para> </listitem>
Modified: trunk/documentation/admin-guide/src/main/docbook/en-US/content/performance.xml
===================================================================
--- trunk/documentation/admin-guide/src/main/docbook/en-US/content/performance.xml 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/documentation/admin-guide/src/main/docbook/en-US/content/performance.xml 2010-09-24 18:51:07 UTC (rev 2603)
@@ -1,28 +1,127 @@
-<!--
-TODO: incorporate a performance chapter.
-
-The information about document materialization belongs in the reference though. And is not completely correct
-w.r.t. the use of document projection.
-
- <para>Your application can use a statement object to execute queries that return XML documents.
- The query must specify a valid document in VDB, or should have used SQL XML functions
- to create a XMl document.</para>
- <section>
- <title>XML Streaming</title>
- <para>XML documents are streamed from Teiid Server to the Teiid JDBC API.
- Normally, the document never materializes in the server memory, avoiding potential
- out-of-memory issues and improving the first response time for large documents.
- When using style sheets, or XQuery, the whole document
- must be materialized on the server. Therefore memory issues may occur for large documents.
- A result document can be obtained from the JDBC resultset using <code>getSQLXML</code> method.
- </para>
- <para>The document is broken into pieces when being created and streamed.
- The maximum size of each piece in the stream can be configured with the
- <code>"lobChunkSizeInKB"</code> system property on the Server. The default value is 100 KB.
- At any given time, this is the maximum amount of memory that can be held by a particular
- XML query against the system. In heavily loaded or memory-constrained scenarios,
- this value can decrease the amount of memory used. As a side effect, streaming will occur in smaller pieces, reducing initial document response time while
- increasing full response time (as this is less efficient).</para>
- </section>
-
- -->
\ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % CustomDTD SYSTEM "../../../../../../docbook/custom.dtd">
+%CustomDTD;
+]>
+<chapter id="performance">
+ <title>Performance Tuning</title>
+ <section id="memory_management">
+ <title>Memory Management</title>
+ <para>The BufferManager is responsible for tracking both memory and disk usage
+ by Teiid. Configuring the BufferManager properly is one of the most
+ important parts of ensuring high performance. See the &jboss-beans;
+ file for all BufferManager settings.
+ </para>
+ <para>
+ The Teiid engine uses batching to reduce the number of memory
+ rows processed at a given time. The batch sizes may be adjusted to larger values if few clients will be
+ accessing the Teiid server simultaneously.
+ </para>
+ <para>
+ The <code>maxReserveBatchColumns</code>
+ setting determines the total number of batches (with a max of
+ <code>processorBatchSize</code> rows) multiplied by their column width
+ that can be held in memory directly by the BufferManager.
+ This number does not include persistent batches held by soft (such as
+ index pages) or weak references. When your installation can dedicate
+ more memory to Teiid, consider increasing this value in proportion to the number of gigabytes you
+ wish Teiid to use - e.g. 2GB on a 32 bit VM would double the value to
+ 32768. For 64 bit VMs you should use a value of approximately 11000
+ per GB.
+ The BufferManager automatically triggers the use of a canonical
+ value cache when more than 25% of the reserve is in use.
+ This can dramatically cut the memory usage in situations where similar
+ value sets are being read through Teiid, but does introduce a lookup cost.
+ If you are processing large (100s of MBs) of highly unique datasets
+ through Teiid, you should consider <link linkend="system_properties">disabling value caching</link> since it
+ will not significantly reduce memory consumption.
+ </para>
+ <para>
+ Each intermediate result buffer, temporary LOB, and temporary table
+ is stored in its own set of buffer files,
+ where an individual file is
+ limited to <code>maxFileSize</code> megabytes.
+ Consider increasing the storage space available to all such
+ files <code>maxBufferSpace</code>
+ if your installation makes use of internal materialization, makes
+ heavy use of SQL/XML, or processes large row counts.
+ </para>
+ </section>
+ <section>
+ <title>Threading</title>
+ <para>Socket threads are configured for each <link linkend="socket_transport">transport</link>.
+ They handle NIO non-blocking IO operations as well as directly servicing any operation that can run without blocking.</para>
+ <para>For longer running operations, the socket threads queue with work the query engine.
+ The query engine has two settings that determine its thread utilization.
+ <code>maxThreads</code> sets the total number of threads available for query engine work (processing plans, transaction control operations, processing source queries, etc.).
+ You should consider increasing the maximum threads on systems with a large number of available processors and/or when it's common to issue non-transactional queries with that
+ issue a large number of concurrent source requests.
+ <code>maxActivePlans</code>, which should always be smaller than maxThreads, sets the number of the maxThreads
+ that should be used for user query processing. Increasing the maxActivePlans should be considered for workloads with a high number of long
+ running queries and/or systems with a large number of available processors. If memory issues arise from increasing the max threads and the
+ max active plans, then consider decreasing the processor/connector batch sizes to limit the base number of memory rows consumed by each plan.</para>
+ </section>
+ <section>
+ <title>Cache Tuning</title>
+ <para>Caching can be tuned for cached result (including user query results and procedure results) and prepared plans (including user and stored procedure plans).
+ Even though it is possible to disable or otherwise severely constrain these caches, this would probably never be done in practice as it would lead to poor performance.
+ </para><para>Cache statistics can be obtained through the Admin Console or Adminshell. The statistics can be used to help tune cache parameters and ensure a hit ratio.</para>
+ <para>Plans are currently fully held in memory and may have a significant memory footprint. When making extensive use of prepared statements and/or virtual procedures,
+ the size of the plan cache may be increased proportionally to number of GB intended for use by Teiid.
+ </para><para>While the result cache parameters control the cache result entries (max number, eviction, etc.), the result batches themselves are accessed through the <link linkend="memory_management">BufferManager</link>.
+ If the size of the result cache is increased, you may need to tune the BufferManager configuration to ensure there is enough buffer space.
+ </para>
+ </section>
+ <section id="socket_transport">
+ <title>Socket Transports</title>
+ <para>Teiid separates the configuration of its socket transports for
+ JDBC, ODBC, and Admin access.
+ Typical installations will not need to
+ adjust the default thread and buffer
+ size settings. At this time, ODBC
+ queries are executed synchronously from the socket thread.
+ Simultaneous long-running queries may exhaust the available threads.
+ Consider increasing the default max threads (15) for ODBC if you
+ expect a higher concurrent load of long-running queries.</para>
+ </section>
+ <section>
+ <title>LOBs</title>
+ <para>LOBs and XML documents are streamed from the Teiid Server to the
+ Teiid JDBC API.
+ Normally, these values are not materialized in the
+ server memory - avoiding potential out-of-memory issues.
+ When using style sheets, or XQuery, whole XML documents must be
+ materialized on the server.
+ Even when using the XMLQuery or XMLTable functions and
+ document projection is applied, memory issues may occur for large
+ documents.
+ </para>
+ <para>
+ LOBs are broken into pieces when being created and streamed.
+ The maximum size of each piece when fetched by the client can be
+ configured with the <code>"lobChunkSizeInKB"</code>
+ property in the &jboss-beans; file. The default value is 100 KB.
+ When dealing with extremely large LOBs, you may consider increasing this
+ value to decrease the amount of round-trips to stream the result.
+ Setting the value too high may cause the server or client to have
+ memory issues.
+ </para>
+ <para>Source LOB values are typically accessed by reference, rather
+ than having the value copied to a temporary location.
+ Thus care must be taken to ensure that source LOBs are returned in a
+ memory-safe manner.
+ </para>
+ </section>
+ <section>
+ <title>Other Considerations</title>
+ <para>When
+ using Teiid in a development environment, you may consider setting
+ the maxSourceRows property in the &jboss-beans;
+ file to reasonably small level value (e.g. 10000) to prevent large
+ amounts of data from being pulled from sources.
+ Leaving the exceptionOnMaxSourceRows set to true will alert the developer
+ through an exception that an attempt was made to retrieve more than
+ the specified number of rows.
+ </para>
+ </section>
+</chapter>
\ No newline at end of file
Modified: trunk/documentation/admin-guide/src/main/docbook/en-US/content/security.xml
===================================================================
--- trunk/documentation/admin-guide/src/main/docbook/en-US/content/security.xml 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/documentation/admin-guide/src/main/docbook/en-US/content/security.xml 2010-09-24 18:51:07 UTC (rev 2603)
@@ -29,7 +29,7 @@
application's security domain name in the "teiid-jboss-beans.xml" file in the SessionService section.
Please note that for this to work, the security-domain
must be a JAAS based Login Module and your client application MUST obtain Teiid connection
- using <emphasis>Local</emphasis> Connection.</para>
+ using <emphasis>Local</emphasis> Connection, with <emphasis>PassthroughAuthentication=true</emphasis> flag set.</para>
</section>
</section>
<section>
@@ -74,7 +74,7 @@
successfully or unsuccessfully authenticates the
user.
</para>
- <para>If no domain can authenticate the user, the logon
+ <para>If no domain can authenticate the user, the login
attempt will fail.
Details of the failed attempt including invalid users, which
domains were consulted, etc. will be in the server log with appropriate
@@ -102,19 +102,20 @@
</section>
- <section id="connfigure_server">
+ <section id="ssl_config">
<title>Configuring SSL</title>
<para>The Teiid's configuration file
<code><jboss-install>/server/<profile>/deploy/teiid/teiid-jboss-beans.xml</code>,
- contains the properties to configure SSL.</para>
+ contains the properties to configure SSL per socket transport.</para>
<itemizedlist>
- <para>There are two separate connection profiles:</para>
- <listitem><para>JDBC Connection - The <code>JdbcSslConfiguration</code> bean configuration defines this.</para></listitem>
- <listitem><para>Admin Connection - The <code>AdminSslConfiguration</code> bean configuration defines this.</para></listitem>
+ <para>There are three socket transports, each with it's own SSL configuration:</para>
+ <listitem><para>JDBC Connections - uses the <code>JdbcSslConfiguration</code> bean configuration. Defaults to only encrypt login traffic, none of the other properties are used.</para></listitem>
+ <listitem><para>Admin Connections - uses the <code>AdminSslConfiguration</code> bean configuration. Defaults to encrypting all traffic with anonymous SSL, none of the other properties are used.</para></listitem>
+ <listitem><para>ODBC Connections - uses the <code>OdbcSslConfiguration</code> bean configuration. Defaults to no SSL.</para></listitem>
</itemizedlist>
<example><title>Example Configuration</title>
<programlisting><![CDATA[<bean name="JdbcSslConfiguration" class="org.teiid.transport.SSLConfiguration">
- <property name="sslEnabled">false</property>
+ <property name="mode">login</property>
<property name="keystoreFilename">cert.keystore</property>
<property name="keystorePassword">passwd</property>
<property name="keystoreType">JKS</property>
@@ -124,27 +125,50 @@
<property name="truststorePassword">passwd</property>
<!-- 1-way, 2-way, anonymous -->
<property name="authenticationMode">1-way</property>
- <property name="clientEncryptionEnabled">true</property>
</bean>]]></programlisting>
</example>
- <orderedlist>
+ <itemizedlist>
<title>Properties</title>
- <listitem><para>sslEnabled - true|false, SSL usage either turned ON or OFF </para></listitem>
- <listitem><para>sslProtocol- Type of SSL protocol to be used. Default is SSLv3</para></listitem>
+ <listitem><para>mode - diabled|login|enabled, disabled = no transport or message level security will be used.
+ login = only the login traffic will be encrypted at a message level using 128 bit AES with an ephemerial DH key exchange. No other config values are needed in this mode.
+ enabled = traffic will be secured using the other configuration properties.</para></listitem>
+ <listitem><para>sslProtocol- Type of SSL protocol to be used. Default is TLSv1</para></listitem>
<listitem><para>keystoreType - Keystore type created by the keytool. Default "JKS" is used.</para></listitem>
- <listitem><para>authenticationMode - anonymous|1-way|2-way, Type of SSL mode, see
- above about different <link linkend="ssl_modes">SSL modes</link> available.</para></listitem>
+ <listitem><para>authenticationMode - anonymous|1-way|2-way, Type of <link linkend="ssl_aut">SSL Authentication Mode</link>.</para></listitem>
<listitem><para>keymanagementAlgorithm - Type of key algorithm used. Default
is based upon the VM, e.g. "SunX509"</para></listitem>
<listitem><para>keystoreFilename - The file name of the keystore, which contains the
- private key of the Server. This must be available in the classpath of Teiid Server</para></listitem>
+ private key of the Server. This must be available in the classpath of Teiid Server.</para></listitem>
<listitem><para>keystorePassword - password for the keystore.</para></listitem>
<listitem><para>truststoreFilename - if "authenticationMode" is chosen
as "2-way", then this property must be provided. This is the truststore that contains the
public key for the client. Depending upon how you created the keystore and truststores,
this may be same file as defined under "keystoreFilename" property.</para></listitem>
<listitem><para>truststorePassword - password for the truststore. </para></listitem>
- </orderedlist>
-
+ </itemizedlist>
+ <section id="ssl_auth">
+ <title>SSL Authentication Modes</title>
+ <para>SSL supports multiple authentication modes. In most secure intranet environments, anonymous is suitable to just bulk encrypt traffic without the need
+ to setup SSL certificates.
+ </para>
+ <itemizedlist>
+ <listitem><para><emphasis>anonymous</emphasis> - no certificates are exchanged, settings are not needed for the keystore and truststore properties.
+ Client must have <code>org.teiid.ssl.allowAnon</code> set to true (the default) to connect to an anonymous server.
+ </para></listitem>
+ <listitem><para><emphasis>1-way</emphasis> - the server will present a certificate, which is obtained from the keystore related properties.
+ The client should have a truststore configured to accept the server certificate.
+ </para></listitem>
+ <listitem><para><emphasis>2-way</emphasis> - the server will present a certificate, which is obtained from the keystore related properties.
+ The client should have a truststore configured to accept the server certificate. The client is also expected to present a certificate, which is obtained from its
+ keystore. The client certificate should be accepted by the trust store configured by the truststore related properties.
+ </para></listitem>
+ </itemizedlist>
+ </section>
+ <section id="encryption_strength">
+ <title>Encryption Strength</title>
+ <para>Both anonymous SSL and login only encryption are configured to use 128 bit AES encryption.
+ 1-way and 2-way SSL allow for cipher suite negotiation based upon the default cipher suites supported by the respective Java platforms of the client and server.
+ </para>
+ </section>
</section>
</chapter>
\ No newline at end of file
Modified: trunk/documentation/admin-guide/src/main/docbook/en-US/content/vdb-deployment.xml
===================================================================
--- trunk/documentation/admin-guide/src/main/docbook/en-US/content/vdb-deployment.xml 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/documentation/admin-guide/src/main/docbook/en-US/content/vdb-deployment.xml 2010-09-24 18:51:07 UTC (rev 2603)
@@ -11,8 +11,15 @@
<section>
<title>Deploying a VDB</title>
- <para>Once you have a "VDB" built it can be deployed in Teiid runtime in different ways.</para>
+ <para>Once you have a "VDB" built it can be deployed/removed in Teiid runtime in different ways.</para>
+ <warning><para>If <link linkend="vdb-versioning">VDB versioning</link> is not used to give distinct version numbers, overwriting a VDB of the same name
+ will terminate all connections to the old VDB. It is recommended that VDB versioning be used for production systems.
+ </para></warning>
+
+ <note><para>Removing an existing VDB will immediately clean up VDB file resources, but will not automatically terminate existing sessions.
+ </para></note>
+
<section>
<title>Direct File Deployment</title>
<para>Copy the VDB file into the "<jboss-install>/server/<profile>/deploy" directory.
@@ -47,7 +54,7 @@
deploy a VDB use this method. This method is preferable for OEM users, who are trying to extend the
Teiid's capabilities through their applications.</para>
</section>
-
+
</section>
<section>
Modified: trunk/documentation/caching-guide/src/main/docbook/en-US/content/matviews.xml
===================================================================
--- trunk/documentation/caching-guide/src/main/docbook/en-US/content/matviews.xml 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/documentation/caching-guide/src/main/docbook/en-US/content/matviews.xml 2010-09-24 18:51:07 UTC (rev 2603)
@@ -108,22 +108,23 @@
<title>Loading And Refreshing</title>
<para>An internal materialized view table is initially in an invalid state (there is no data). The first user query will trigger an implicit loading of the data.
All other queries against the materialized view will block until the load completes.
- In some situations administrators may wish to better control when the cache is loaded with a call to <code>SYS.refreshMatView</code>. The initial load may itself trigger the initial load
+ In some situations administrators may wish to better control when the cache is loaded with a call to <code>SYSADMIN.refreshMatView</code>. The initial load may itself trigger the initial load
of dependent materialized views. After the initial load user queries against the materialized view table will only block if it is in an invalid state.
- The valid state may also be controled through the <code>SYS.refreshMatView</code> procedure.
+ The valid state may also be controled through the <code>SYSADMIN.refreshMatView</code> procedure.
<example>
<title>Invalidating Refresh</title>
- <programlisting>CALL SYS.refreshMatView(viewname=>'schema.matview', invalidate=>true)</programlisting>
+ <programlisting>CALL SYSADMIN.refreshMatView(viewname=>'schema.matview', invalidate=>true)</programlisting>
<para>matview will be refreshed and user queries will block until the refresh is complete (or fails).</para>
</example>
While the initial load may trigger a transitive loading of dependent materialized views,
subsequent refreshes performed with <code>refreshMatView</code> will use dependent materialized view tables if they exist. Only one load may occur at a time. If a load is already in progress when
- the <code>SYS.refreshMatView</code> procedure is called, it will return -1 immediately rather than preempting the current load.
+ the <code>SYSADMIN.refreshMatView</code> procedure is called, it will return -1 immediately rather than preempting the current load.
</para>
<section>
<title>TTL Snapshot Refresh</title>
- <para>The <link linkend="cache-hint">cache hint</link> may be used to automatically trigger a full snapshot refresh after a specified time to live.
- The refresh is equivalent to <code>CALL SYS.refreshMatView('view name', false)</code>, but performed asynchronously so that user queries do not block on the load.</para>
+ <para>The <link linkend="cache-hint">cache hint</link> may be used to automatically trigger a full snapshot refresh after a specified time to live (ttl).
+ The ttl starts from the time the table is finished loading.
+ The refresh is equivalent to <code>CALL SYSADMIN.refreshMatView('view name', false)</code>, but performed asynchronously so that user queries do not block on the load.</para>
<example>
<title>Auto-refresh Transformation Query</title>
<programlisting>/*+ cache(ttl:3600000) */ select t.col, t1.col from t, t1 where t.id = t1.id</programlisting>
@@ -143,13 +144,13 @@
<section>
<title>Updatable</title>
<para>In advanced use-cases the <link linkend="cache-hint">cache hint</link> may also be used to mark an internal materialized view as updatable.
- An updatable internal materialized view may use the <code>SYS.refreshMatViewRow</code> procedure to update a single row in the materialized table.
+ An updatable internal materialized view may use the <code>SYSADMIN.refreshMatViewRow</code> procedure to update a single row in the materialized table.
If the source row exists, the materialized view table row will be updated. If the source row does not exist, the correpsonding materialized row will be deleted.
- To be updatable the materialized view must have a single column primary key. Composite keys are not yet supported by <code>SYS.refreshMatViewRow</code>.
+ To be updatable the materialized view must have a single column primary key. Composite keys are not yet supported by <code>SYSADMIN.refreshMatViewRow</code>.
<example>
<title>Updatable Transformation Query</title>
<para>Transofrmation Query: <programlisting>/*+ cache(updatable) */ select t.col, t1.col from t, t1 where t.id = t1.id</programlisting></para>
- <para>Update SQL: <programlisting>CALL SYS.updateMatViewRow(viewname=>'schema.matview', key=>5)</programlisting></para>
+ <para>Update SQL: <programlisting>CALL SYSADMIN.updateMatViewRow(viewname=>'schema.matview', key=>5)</programlisting></para>
<para>Given that the schema.matview defines an interger column col as it's primary key, the update will check the live source(s) for the row values.</para>
</example>
The update query will not use dependent materialized view tables, so care should be taken to ensure that getting a single
@@ -178,5 +179,16 @@
</itemizedlist>
</para>
</section>
+ <section>
+ <title>Clustering Considerations</title>
+ <para>Each member in a cluster maintains its own copy of each materialized table and associated indexes.
+ With cache clustering enabled, an additional snapshot copy of the table is maintained for loading by other members.
+ An attempt is made to ensure each member receives the same full refresh events as the others.
+ Full consistency for updatable materialized views however is not guarenteed.
+ Periodic full refreshes of updatable materialized view tables helps ensure consistency among members.
+ <note><para>Loads of materialized tables are not coordinated across the cluster. It is possible for the same ttl expiration to trigger a load at each member.</para></note>
+ In many clustered scenarios using external materialization is advantagious to fully control the loading of the tables and to have materialized data that is durable.
+ </para>
+ </section>
</section>
</chapter>
Modified: trunk/documentation/client-developers-guide/src/main/docbook/en-US/content/jdbc-connection.xml
===================================================================
--- trunk/documentation/client-developers-guide/src/main/docbook/en-US/content/jdbc-connection.xml 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/documentation/client-developers-guide/src/main/docbook/en-US/content/jdbc-connection.xml 2010-09-24 18:51:07 UTC (rev 2603)
@@ -53,7 +53,7 @@
the "version" property at the same time is not allowed.
</para></listitem>
<listitem><para>mm - defines Teiid JDBC protocol, mms defines a secure channel (see the <link linkend="ssl">SSL chapter</link> for more)</para></listitem>
- <listitem><para><host> - defines the server where the Teiid Server is installed</para></listitem>
+ <listitem><para><host> - defines the server where the Teiid Server is installed. If you are using IPv6 binding address as the host name, place it in square brackets. ex:[::1]</para></listitem>
<listitem><para><port> - defines the port on which the Teiid Server is listening for incoming JDBC connections.</para></listitem>
<listitem><para>[prop-name=prop-value] - additionally you can supply any number of name value pairs separated by semi-colon
[;]. All supported URL properties are defined in the <link linkend="connection_properties">connection properties section</link>. Property values should be URL encoded if they contain reserved characters, e.g. ('?', '=', ';', etc.)</para></listitem>
@@ -218,7 +218,7 @@
<entry>
<code>boolean</code>
</entry>
- <entry>Only applies to embedded connections. When this option is set to "true", then Teiid looks for
+ <entry>Only applies to "local" connections. When this option is set to "true", then Teiid looks for
already authenticated security context on the calling thread. If one found it uses that users credentials
to create session. Teiid also verifies that the same user is using this connection during the life of the connection.
if it finds a different security context on the calling thread, it switches the identity on the connection,
@@ -276,7 +276,8 @@
<entry>
<code>String</code>
</entry>
- <entry>Server where the Teiid runtime installed</entry>
+ <entry>Server hostname where the Teiid runtime installed. If you are using IPv6 binding address as the host name,
+ place it in square brackets. ex:[::1]</entry>
</row>
<row>
<entry>
@@ -285,7 +286,9 @@
<entry>
<code>String</code>
</entry>
- <entry>Optional delimited list of host:port entries. See the <link linkend="multiple_hosts">multiple hosts</link> section for more information.</entry>
+ <entry>Optional delimited list of host:port entries. See the <link linkend="multiple_hosts">multiple hosts</link>
+ section for more information. If you are using IPv6 binding address as the host name,
+ place them in square brackets. ex:[::1]</entry>
</row>
<row>
<entry>
@@ -339,7 +342,7 @@
<entry>
<code>boolean</code>
</entry>
- <entry>Only applies to embedded connections. When this option is set to "true", then Teiid looks for
+ <entry>Only applies to "local" connections. When this option is set to "true", then Teiid looks for
already authenticated security context on the calling thread. If one found it uses that users credentials
to create session. Teiid also verifies that the same user is using this connection during the life of the connection.
if it finds a different security context on the calling thread, it switches the identity on the connection,
Modified: trunk/documentation/client-developers-guide/src/main/docbook/en-US/content/jdbc-extensions.xml
===================================================================
--- trunk/documentation/client-developers-guide/src/main/docbook/en-US/content/jdbc-extensions.xml 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/documentation/client-developers-guide/src/main/docbook/en-US/content/jdbc-extensions.xml 2010-09-24 18:51:07 UTC (rev 2603)
@@ -253,6 +253,19 @@
</itemizedlist>
<para>The SHOW statement is most commonly used to retrieve the query plan, see the plan <link linkend="plan_debug">debug example</link>.</para>
</section>
+
+ <section id="transaction_statement">
+ <title>Transaction Statements</title>
+ <para>In situations where the direct use of the JDBC connection is not possible, transaction statements can be used to control a local transaction.</para>
+ <itemizedlist>
+ <listitem><para><emphasis>START TRANSACTION</emphasis> - synonym for <code>connection.setAutoCommit(false)</code></para>
+ </listitem>
+ <listitem><para><emphasis>COMMIT</emphasis> - synonym for <code>connection.setAutoCommit(true)</code></para>
+ </listitem>
+ <listitem><para><emphasis>ROLLBACK</emphasis> - synonym for <code>connection.rollback()</code> and returning to auto commit mode.</para>
+ </listitem>
+ </itemizedlist>
+ </section>
<section id="partial_results">
<title>Partial Results Mode</title>
@@ -279,26 +292,53 @@
<para>For each source that is excluded from the query, a warning will be generated
describing the source and the failure. These warnings can be obtained from the
- <code>ResultSet.getWarnings()</code> method. This method returns a <code>SQLWarning</code> object but
+ <code>Statement.getWarnings()</code> method. This method returns a <code>SQLWarning</code> object but
in the case of "partial results" warnings, this will be an object of
type <code>org.teiid.jdbc.PartialResultsWarning</code> class. This class can be
used to obtain a list of all the failed sources by name and to obtain
the specific exception thrown by each resource adaptor. </para>
- <para>Below is an example of printing the list of failed sources:</para>
- <programlisting><![CDATA[statement.setExecutionProperty(ExecutionProperties.PROP_PARTIAL_RESULTS_MODE, “true”);
-ResultSet results = statement.executeQuery(“SELECT Name FROM Accounts”);
-SQLWarning warning = results.getWarnings();
-if(warning instanceof PartialResultsWarning) {
- PartialResultsWarning partialWarning = (PartialResultsWarning) warning;
- Collection failedConnectors = partialWarning.getFailedConnectors();
- Iterator iter = failedConnectors.iterator();
- while(iter.hasNext()) {
- String connectorName = (String) iter.next();
- SQLException connectorException = partialWarning.getConnectorException(connectorName);
- System.out.println(connectorName + “: “ +ConnectorException.getMessage();
- }
-}]]></programlisting>
+ <note>
+ <para> Since Teiid supports cursoring before the entire result is formed, it is
+ possible that a data source failure will not
+ be determined until after the first batch of results have
+ been returned to the client. This can happen in the case of
+ unions, but not joins. To ensure that all warnings have been accumulated, the
+ statement should be checked after the entire result set has been read.</para>
+ </note>
+
+ <para>
+ Partial results mode is off by default but can be turned on for all queries in a Connection with either
+ setPartialResultsMode("true") on a DataSource or
+ partialResultsMode=true on a JDBC URL. In either case, partial
+ results mode may be toggled later with a <link linkend="set_statement">set statement</link>.
+ </para>
+ <example>
+ <title>Setting Partial Results Mode</title>
+ <programlisting>Statement statement = ...obtain statement from Connection...
+statement.execute("set partialResultsMode true");</programlisting>
+ </example>
+
+ <example>
+ <title>Getting Partial Results Warnings
+ </title>
+ <programlisting>statement.execute("set partialResultsMode true");
+ResultSet results = statement.executeQuery("SELECT Name FROM Accounts");
+while (results.next()) {
+ ... //process the result set
+}
+SQLWarning warning = statement.getWarnings();
+if(warning instanceof PartialResultsWarning) {
+ PartialResultsWarning partialWarning = (PartialResultsWarning)warning;
+ Collection failedConnectors = partialWarning.getFailedConnectors();
+ Iterator iter = failedConnectors.iterator();
+ while(iter.hasNext()) {
+ String connectorName = (String) iter.next();
+ SQLException connectorException = partialWarning.getConnectorException(connectorName);
+ System.out.println(connectorName + ": " + ConnectorException.getMessage();
+ }
+}</programlisting>
+ </example>
</section>
<section>
Modified: trunk/documentation/client-developers-guide/src/main/docbook/en-US/content/ssl.xml
===================================================================
--- trunk/documentation/client-developers-guide/src/main/docbook/en-US/content/ssl.xml 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/documentation/client-developers-guide/src/main/docbook/en-US/content/ssl.xml 2010-09-24 18:51:07 UTC (rev 2603)
@@ -149,9 +149,6 @@
# authentication that requires trust not provided
# by the system defaults.
#
-# Set to NONE for anonymous authentication using
-# the TLS_DH_anon_WITH_AES_128_CBC_SHA cipher suite
-#
#org.teiid.ssl.trustStore=
@@ -165,7 +162,15 @@
# The cipher protocol, defaults to SSLv3
#
-org.teiid.ssl.protocol=SSLv3]]></programlisting>
+org.teiid.ssl.protocol=SSLv3
+
+#
+# Whether to allow anonymous SSL
+# (the TLS_DH_anon_WITH_AES_128_CBC_SHA cipher suite)
+# defaults to true
+#
+
+org.teiid.ssl.allowAnon=true]]></programlisting>
<example>
<title>1-way SSL</title>
Modified: trunk/documentation/developer-guide/src/main/docbook/en-US/content/translator-api.xml
===================================================================
--- trunk/documentation/developer-guide/src/main/docbook/en-US/content/translator-api.xml 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/documentation/developer-guide/src/main/docbook/en-US/content/translator-api.xml 2010-09-24 18:51:07 UTC (rev 2603)
@@ -680,10 +680,10 @@
<title>Translator Capabilities</title>
<para>The <code>ExecutionFactory</code> class defines all the methods that describe the capabilities of a Translator.
These are used by the Connector Manager to determine what kinds of commands the translator is
- capable of executing. A base <code>ExecutionFactory</code> class implements all the basic capabilities, which says
- your translator does not support any cpabilities. Your extended
+ capable of executing. A base <code>ExecutionFactory</code> class implements all the basic capabilities methods, which says
+ your translator does not support any capabilities. Your extended
<code>ExecutionFactory</code> class must override the the necessary methods to specify which
- capabilities your translator supports. </para>
+ capabilities your translator supports. You should consult the debug log of query planning (set showplan debug) to see if desired pushdown requires additional capabilities.</para>
<section>
<title>Capability Scope</title>
<para>
Modified: trunk/documentation/pom.xml
===================================================================
--- trunk/documentation/pom.xml 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/documentation/pom.xml 2010-09-24 18:51:07 UTC (rev 2603)
@@ -1,6 +1,6 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
- <artifactId>teiid</artifactId>
+ <artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
<version>7.2.0.Alpha2-SNAPSHOT</version>
</parent>
Modified: trunk/documentation/reference/src/main/docbook/en-US/content/dataroles.xml
===================================================================
--- trunk/documentation/reference/src/main/docbook/en-US/content/dataroles.xml 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/documentation/reference/src/main/docbook/en-US/content/dataroles.xml 2010-09-24 18:51:07 UTC (rev 2603)
@@ -43,6 +43,9 @@
<warning><para>Unlike previous versions of Teiid, non-visible models are accessible by user queries.
To restrict user access at a model level, at least one data role should be created to enable data role checking.
In turn that role can be mapped to any authenticated user and should not grant permissions to models that should be inaccessable.</para></warning>
+
+ <para>Permissions are not applicable to the SYS and pg_catalog schemas. These metadata reporting schemas are always accessible regardless of the user.
+ The SYSADMIN schema however may need permissions as applicable.</para>
<orderedlist>
<para>To process a <emphasis>SELECT</emphasis> statement or a stored procedure execution, the user account requires the following access rights:</para>
Modified: trunk/documentation/reference/src/main/docbook/en-US/content/federated_planning.xml
===================================================================
--- trunk/documentation/reference/src/main/docbook/en-US/content/federated_planning.xml 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/documentation/reference/src/main/docbook/en-US/content/federated_planning.xml 2010-09-24 18:51:07 UTC (rev 2603)
@@ -284,80 +284,17 @@
<section>
<title>Partial Results</title>
<para>Teiid provides the capability to obtain "partial
- results" in the event of data source unavailability. This is
+ results" in the event of data source unavailability or failure. This is
especially useful when unioning information from multiple
sources, or when doing a left outer join, where you are
'appending' columns to a master record but still want the record
- if the extra info is not available.</para>
- <para> If one or more data sources are unavailable to return
- results, then the result set obtained from the remaining
- available sources will be returned. In the case of joins, an
- unavailable data source essentially contributes zero tuples to
- the result set.</para>
- <section>
- <title>Setting Partial Results Mode</title>
- <para>
- Partial results mode is off by default but can be turned on by
- default for all queries in a Connection with either
- setPartialResultsMode("true") on a DataSource or
- partialResultsMode=true on a JDBC URL. In either case, partial
- results mode may be overridden with a set statement.
- </para>
- <example>
- <title>Example - Setting Partial Results Mode</title>
- <programlisting>Statement statement = ...obtain statement from Connection...
-statement.execute("set partialResultsMode true");</programlisting>
- </example>
- </section>
- <section>
- <title>Source Unavailability</title>
+ if the extra information is not available.</para>
+
<para>A source is considered to be 'unavailable' if the
connection factory associated with the source issues an
exception in response to a query. The exception will be
propagated to the query processor, where it will become a
- warning in the result set.</para>
- <warning>
- <para> Since Teiid supports multi-source cursoring, it is
- possible that the unavailability of a data source will not
- be determined until after the first batch of results have
- been returned to the client. This can happen in the case of
- unions, but not joins. In this situation, there will be no
- warnings in the result set when the client is processing the
- first batch of results. The client will be responsible for
- periodically checking the status of warnings in the results
- object as results are being processed, to see if a new
- warning has been added due to the detection of an
- unavailable source. [Note that client applications have no
- notion of ‘batches’, which are purely a server-side entity.
- Client apps deal only with records.]</para>
- </warning>
- <para> For each source that is excluded from a query, a warning
- will be generated describing the source and the failure. These
- warnings can be obtained from the Statement.getWarnings()
- method. This method returns a SQLWarning object but in the
- case of "partial results" warnings, this will be an object of
- type org.teiid.jdbc.PartialResultsWarning. This class
- can be used to obtain a list of all the failed connectors by
- name and to obtain the specific exception thrown by each
- connector.</para>
- <example>
- <title>Example - Printing List of Failed Sources
- </title>
- <programlisting>statement.execute("set partialResultsMode true");
-ResultSet results = statement.executeQuery("SELECT Name FROM Accounts");
-SQLWarning warning = statement.getWarnings();
-if(warning instanceof PartialResultsWarning) {
- PartialResultsWarning partialWarning = (PartialResultsWarning)warning;
- Collection failedConnectors = partialWarning.getFailedConnectors();
- Iterator iter = failedConnectors.iterator();
- while(iter.hasNext()) {
- String connectorName = (String) iter.next();
- SQLException connectorException = partialWarning.getConnectorException(connectorName);
- System.out.println(connectorName + ": " + ConnectorException.getMessage();
- }
-}</programlisting>
- </example>
- </section>
+ warning on the statement. See the Client Guide for more on Partial Results Mode and SQLWarnings.</para>
</section>
</section>
<section id="query_plan">
Modified: trunk/documentation/reference/src/main/docbook/en-US/content/scalar_functions.xml
===================================================================
--- trunk/documentation/reference/src/main/docbook/en-US/content/scalar_functions.xml 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/documentation/reference/src/main/docbook/en-US/content/scalar_functions.xml 2010-09-24 18:51:07 UTC (rev 2603)
@@ -1968,7 +1968,8 @@
<para>xquery in string. Return value is xml.</para>
<para>XMLQUERY is part of the SQL/XML 2006 specification.</para>
<para>See also <link linkend="xmltable">XMLTABLE</link></para>
- <note><para>A technique known as document projection is used to reduce the memory footprint of the context item document. Only the parts of the document needed by the xquery will be loaded into memory.</para></note>
+ <note><para>A technique known as document projection is used to reduce the memory footprint of the context item document.
+ Only the parts of the document needed by the XQuery path expressions will be loaded into memory. Since document projection analysis uses all relevant path expressions, even 1 expression that could potentially use many nodes, e.g. //x rather than /a/b/x will cause a larger memory footprint.</para></note>
</section>
<section id="xmlserialize">
Modified: trunk/documentation/reference/src/main/docbook/en-US/content/system_schema.xml
===================================================================
--- trunk/documentation/reference/src/main/docbook/en-US/content/system_schema.xml 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/documentation/reference/src/main/docbook/en-US/content/system_schema.xml 2010-09-24 18:51:07 UTC (rev 2603)
@@ -2,11 +2,57 @@
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="system_schema">
<title>System Schema</title>
+ <para>The built-in SYS and SYSADMIN schemas provide metadata tables and procedures against the current VDB.</para>
<section id="system_tables">
<title>System Tables</title>
<section>
<title>VDB, Schema, and Properties</title>
<section>
+ <title>SYSADMIN.VDBResources</title>
+ <para>This table provides the current VDB contents.</para>
+ <informaltable frame="all">
+ <tgroup cols="3">
+ <thead>
+ <row>
+ <entry>
+ <para>Column Name</para>
+ </entry>
+ <entry>
+ <para>Type</para>
+ </entry>
+ <entry>
+ <para>Description</para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>resourcePath</para>
+ </entry>
+ <entry>
+ <para>string</para>
+ </entry>
+ <entry>
+ <para>The path to the contents.</para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>contents</para>
+ </entry>
+ <entry>
+ <para>blob</para>
+ </entry>
+ <entry>
+ <para>The contents as a blob.</para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </section>
+ <section>
<title>SYS.VirtualDatabases</title>
<para>This table supplies information about the currently
connected
@@ -393,7 +439,7 @@
</informaltable>
</section>
<section>
- <title>SYS.MatViews</title>
+ <title>SYSADMIN.MatViews</title>
<para>This table supplies information about all the materailized views in the virtual database.</para>
<informaltable frame="all">
<tgroup cols="3">
@@ -1726,42 +1772,9 @@
<tbody>
<row>
<entry>
- <para>getCharacterVDBResource</para>
+ <para>SYS.getXMLSchemas</para>
</entry>
<entry>
- <para>(string resourcePath)</para>
- </entry>
- <entry>
- <para>A single column containing the resource as a clob.</para>
- </entry>
- </row>
- <row>
- <entry>
- <para>getBinaryVDBResource</para>
- </entry>
- <entry>
- <para>(sting resourcePath)</para>
- </entry>
- <entry>
- <para>A single column containing the resource as a blob.</para>
- </entry>
- </row>
- <row>
- <entry>
- <para>getVDBResourcePaths</para>
- </entry>
- <entry>
- <para>()</para>
- </entry>
- <entry>
- <para>A single column containing the resource paths as strings.</para>
- </entry>
- </row>
- <row>
- <entry>
- <para>getXMLSchemas</para>
- </entry>
- <entry>
<para>(string document)</para>
</entry>
<entry>
@@ -1770,7 +1783,7 @@
</row>
<row>
<entry>
- <para>refreshMatView</para>
+ <para>SYSADMIN.refreshMatView</para>
</entry>
<entry>
<para>(string ViewName, boolean Invalidate)</para>
@@ -1781,7 +1794,7 @@
</row>
<row>
<entry>
- <para>refreshMatViewRow</para>
+ <para>SYSADMIN.refreshMatViewRow</para>
</entry>
<entry>
<para>(string ViewName, object Key)</para>
Modified: trunk/documentation/reference/src/main/docbook/en-US/content/transaction_support.xml
===================================================================
--- trunk/documentation/reference/src/main/docbook/en-US/content/transaction_support.xml 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/documentation/reference/src/main/docbook/en-US/content/transaction_support.xml 2010-09-24 18:51:07 UTC (rev 2603)
@@ -175,9 +175,7 @@
Global - the XAResource interface provided by an XAConnection is
used to control the transaction. Note that XAConnections are
available only if Teiid is consumed through its XADataSource,
- <classname>org.teiid.jdbc.TeiidDataSource
- </classname>
- . JEE containers or data access APIs typically control XA
+ <classname>org.teiid.jdbc.TeiidDataSource</classname>. JEE containers or data access APIs typically control XA
transactions on behalf of application code.
</para>
</listitem>
@@ -211,6 +209,129 @@
portable fashion requires some kind of transaction support.</para>
</section>
</section>
+ <section>
+ <title>Transactional Behavior with JBoss Data Source Types</title>
+ <para>JBoss AS allows creation of different types of data sources, based on their transactional capabilities. The type
+ of data source you create for your VDB's sources also dictates if that data source will be participating the
+ distributed transaction or not, irrespective of the transaction scope you selected from above. Here are different types of data sources</para>
+ <itemizedlist>
+ <listitem>
+ <para>xa-datasource: Capable of participating in the distributed transaction using XA. This is recommended
+ type be used with any Teiid sources.</para>
+ </listitem>
+ <listitem>
+ <para>local-datasource: Does not participate in XA, unless this is the <emphasis>only</emphasis> source that is
+ local-datasource that is participating among other xa-datasources in the current distributed transaction. This technique is
+ called last commit optimization. However, if you have more then one local-datasources participating in a transaction, then
+ the transaction manager will end up with <emphasis>"Could not enlist in transaction on entering meta-aware object!;"</emphasis>
+ exception.</para>
+ </listitem>
+ <listitem>
+ <para>no-tx-datasource: Does not participate in distributed transaction at all. In the scope of Teiid command over multiple sources,
+ you can include this type of datasource in the same distributed transaction context, however this source will be it
+ will not be subject to any transactional participation. Any changes done on this source as part of the transaction scope,
+ can not be rolled back.</para>
+ </listitem>
+ </itemizedlist>
+ <para>If you have three different sources A, B, C and they are being used in Teiid. Here are some variations
+ on how they behave with different types of data sources. The suffixes "xa", "local", "no-tx" define different type of sources used.</para>
+ <itemizedlist>
+ <listitem>
+ <para>A-xa B-xa, C-xa : Can participate in all transactional scopes. No restrictions.</para>
+ </listitem>
+ <listitem>
+ <para>A-xa, B-xa, c-local: Can participate in all transactional scopes. Note that there is only one single source
+ is "local". It is assumed that in the Global scope, the third party datasource, other than Teiid Datasource is also XA.</para>
+ </listitem>
+ <listitem>
+ <para>A-xa, B-xa, C-no-tx : Can participate in all transactional scopes. Note "C" is not a
+ really bound by any transactional contract. A and B are the only participents in XA transaction.</para>
+ </listitem>
+ <listitem>
+ <para>A-xa, B-local, C-no-tx : Can participate in all transactional scopes. Note "C" is not a
+ really bound by any transactional contract, and there is only single "local" source.</para>
+ </listitem>
+ <listitem>
+ <para>If any two or more sources are "local" : They can only participate in Command mode with "autoCommitTxn=OFF".
+ Otherwise will end with exception as "Could not enlist in transaction on entering meta-aware object!;" exception, as it is
+ not possible to do a XA transaction with "local" datasources.</para>
+ </listitem>
+ <listitem>
+ <para>A-no-tx, B-no-tx, C-no-tx : Can participate in all transaction scopes, but none of the sources will be
+ bound by transactional terms. This is equivalent to not using transactions or setting Command mode with "autoCommitTxn=OFF".</para>
+ </listitem>
+ </itemizedlist>
+ <note><para>Teiid Designer creates "local" data source by default which is not optimal for the XA transactions.
+ Teiid would like this to be creating a XA data sources, however with current limitations with DTP that feature is
+ currently not available. To create XA data source, look in JBoss AS "doc" directory for example templates,
+ or use the "admin-console" to create the XA data sources.</para></note>
+
+ <para>If your datasource is not XA, and not the only local source and can not use "no-tx", then you can look into
+ extending the source to implement the compensating XA implementation. i.e. define your own resource manager for
+ your source and manage the transaction the way you want it to behave. Note that this could be complicated if not
+ impossible if your source natively does not support distributed XA protocol. In summay</para>
+ <itemizedlist>
+ <listitem>
+ <para>Use XA datasource if possible</para>
+ </listitem>
+ <listitem>
+ <para>Use no-tx datasource if applicable</para>
+ </listitem>
+ <listitem>
+ <para>Use autoCommitTxn = OFF, and let go distributed transactions, though not recommended</para>
+ </listitem>
+ <listitem>
+ <para>Write a compensating XA based implementation.</para>
+ </listitem>
+ </itemizedlist>
+
+ <table>
+ <title>Teiid Transaction Participation</title>
+ <tgroup cols="4">
+ <thead>
+ <row>
+ <entry>Teiid-Tx-Scope</entry>
+ <entry>XA source</entry>
+ <entry>Local Source</entry>
+ <entry>No-Tx SOurce</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>Local</entry>
+ <entry>always</entry>
+ <entry>Only If Single Source</entry>
+ <entry>never</entry>
+ </row>
+ <row>
+ <entry>Global</entry>
+ <entry>always</entry>
+ <entry>Only If Single Source</entry>
+ <entry>never</entry>
+ </row>
+ <row>
+ <entry>Auto-commit=true, AutoCommitTxn=ON</entry>
+ <entry>always</entry>
+ <entry>Only If Single Source</entry>
+ <entry>never</entry>
+ </row>
+ <row>
+ <entry>Auto-commit=true, AutoCommitTxn=OFF</entry>
+ <entry>never</entry>
+ <entry>never</entry>
+ <entry>never</entry>
+ </row>
+ <row>
+ <entry>Auto-commit=true, AutoCommitTxn=DETECT</entry>
+ <entry>always</entry>
+ <entry>Only If Single Source</entry>
+ <entry>never</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ </section>
<section>
<title>Limitations and Workarounds</title>
<itemizedlist>
Modified: trunk/documentation/reference/src/main/docbook/en-US/content/translators.xml
===================================================================
--- trunk/documentation/reference/src/main/docbook/en-US/content/translators.xml 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/documentation/reference/src/main/docbook/en-US/content/translators.xml 2010-09-24 18:51:07 UTC (rev 2603)
@@ -1,568 +1,779 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="translators">
-<title>Translators</title>
-<section>
-<title>Introduction to the Teiid Connector Architecture</title>
-<para>The TCA (Teiid Connector Architecture) provides Teiid with a robust mechanism for integrating with external systems. The TCA defines a common client interface between Teiid and an external system that includes metadata as to what SQL constructs are supported for pushdown and the ability to import metadata from the external system.</para>
-<para>>A Translator is the heart of the TCA and acts as the bridge logic between Teiid and an external system, which is most commonly accessed through a JCA resource adapter. See the Teiid Developers Guide for details on developing custom Translators and JCA resource adapters for use with Teiid.</para>
-<note>
-<para>The TCA is not the same as the JCA, the JavaEE Connector Architecture, although the TCA is designed for use with JCA resource adapters.</para>
-</note>
-<note>
-<para>The import capabilities of Teiid Translators is currently only used in <link linkend="dynamic_vdbs">dynamic VDBs</link> and not by the Teiid Designer.</para>
-</note>
-</section>
-<section>
-<title>Translators</title>
-<para>A Translator is typically paired with a particular JCA resource adapter. In instances where pooling, environment dependent configuration management, advanced security handling, etc. are not needed, then a JCA resource adapter is not needed. The configuration of JCA ConnectionFactories for needed resource adapters is not part of this guide, please see the Teiid Admin Guide and the kit examples for configuring resource adapters for use in JBossAS.</para>
-<para>Translators can have a number of configurable properties. These are broken down into execution properties, which determine aspects of how data is retrieved, and import settings, which determine what metadata is read for import.</para>
-<para>The execution properties for a translator typically have reasonable defaults. For specific translator types, e.g. the Derby translator, base execution properties are already tuned to match the source. In most cases the user will not need to adjust their values.</para>
-<table>
-<title>Base Execution Properties - shared by all translators</title>
-<tgroup cols="3">
-<colspec colwidth=".75*" />
-<colspec colwidth="1.5*" />
-<colspec colwidth=".5*" />
-<thead>
-<row>
-<entry>Name</entry>
-<entry>Description</entry>
-<entry>Default</entry>
-</row>
-</thead>
-<tbody>
-<row>
-<entry>Immutable</entry>
-<entry>Set to true to indicate that the source never changes.</entry>
-<entry>false</entry>
-</row>
-<row>
-<entry>RequiresCriteria</entry>
-<entry>Set to true to indicate that source SELECT/UPDATE/DELETE queries require a where clause.</entry>
-<entry>false</entry>
-</row>
-<row>
-<entry>SupportsOrderBy</entry>
-<entry>Set to true to indicate that the ORDER BY clause is supported.</entry>
-<entry>false</entry>
-</row>
-<row>
-<entry>SupportsOuterJoins</entry>
-<entry>Set to true to indicate that OUTER JOINs are supported.</entry>
-<entry>false</entry>
-</row>
-<row>
-<entry>SupportsFullOuterJoins</entry>
-<entry>If outer joins are supported, true indicates that FULL OUTER JOINs are supported.</entry>
-<entry>false</entry>
-</row>
-<row>
-<entry>SupportsInnerJoins</entry>
-<entry>Set to true to indicate that INNER JOINs are supported.</entry>
-<entry>false</entry>
-</row>
-<row>
-<entry>SupportedJoinCriteria</entry>
-<entry>If joins are supported, defines what criteria may be used as the join criteria. May be one of (ANY, THETA, EQUI, or KEY).</entry>
-<entry>ANY</entry>
-</row>
-</tbody>
-</tgroup>
-</table>
-<note>
-<para>Only a subset of the metadata as to what SQL constructs the source supports can be set through execution properties. If more control is needed, please consult the Teiid Developers Guide.</para>
-</note>
-<para>There are no base importer settings.</para>
-<section>
-<title>File Translator</title>
-<para>The file translator, known by the type name <emphasis>file</emphasis>, exposes stored procedures to leverage file system resources exposed by the file resource adapter.
-It will commonly be used with the <link linkend="texttable">TEXTTABLE</link> or <link linkend="xmltable">XMLTABLE</link> table functions to use CSV or XML formated data.</para>
-<table>
-<title>Execution Properties</title>
-<tgroup cols="3">
-<thead>
-<row>
-<entry>Name</entry>
-<entry>Description</entry>
-<entry>Default</entry>
-</row>
-</thead>
-<tbody>
-<row>
-<entry>Encoding</entry>
-<entry>The encoding that should be used for CLOBs returned by the getTextFiles procedure</entry>
-<entry>The system default encoding</entry>
-</row>
-</tbody>
-</tgroup>
-</table>
-<para>There are file importer settings, but it does provide metadata for dynamic vdbs.</para>
-<section><title>Usage</title>
-<para>Retrieve all files as BLOBs with the given extension at the given path. <programlisting>call getFiles('path/*.ext')</programlisting>
-If the extension pattern is not specified and the path is a directory, then all files in the directory will be returned. If the path or filename doesn't exist, then no results will be returned.
-</para>
-<para>Retrieve all files as CLOBs with the given extension at the given path. <programlisting>call getTextFiles('path/*.ext')</programlisting></para>
-<para>Save the CLOB, BLOB, or XML file to given path <programlisting>call saveFile('path', value)</programlisting></para>
-<para>See the database metadata for full descriptions of the getFiles, getTextFiles, and saveFile procedures.</para>
-</section>
-</section>
-<section>
-<title>JDBC Translator</title>
-<para>The JDBC translator bridges between SQL semantic and data type difference between Teiid and a target RDBMS. Teiid has a range of specific translators that target the most popular open source and proprietary databases.</para>
-<itemizedlist>
-<para>Type names</para>
-<listitem>
-<para><emphasis>jdbc-ansi</emphasis> - declares support for most SQL constructs supported by Teiid, except for row limit/offset and EXCEPT/INTERCECT. Translates source SQL into ANSI compliant syntax. This translator should be used when another more specific type is not available.</para>
-</listitem>
-<listitem>
-<para><emphasis>jdbc-simple</emphasis> - same as jdbc-ansi, except disables support for function, UNION, and aggregate pushdown.</para>
-</listitem>
-<listitem>
-<para><emphasis>db2</emphasis> - for use with DB2 8 or later.</para>
-</listitem>
-<listitem>
-<para><emphasis>derby</emphasis> - for use with Derby 10.1 or later.</para>
-</listitem>
-<listitem>
-<para><emphasis>h2</emphasis> - for use with H2 version 1.1 or later.</para>
-</listitem>
-<listitem>
-<para><emphasis>hsql</emphasis> - for use with HSQLDB 1.7 or later.</para>
-</listitem>
-<listitem>
-<para><emphasis>informix</emphasis> - for use with any version.</para>
-</listitem>
-<listitem>
-<para><emphasis>metamatrix</emphasis> - for use with MetaMatrix 5.5.0 or later.</para>
-</listitem>
-<listitem>
-<para><emphasis>mysql</emphasis>/<emphasis>mysql5</emphasis> - for use with MySQL version 4.x and 5 or later respectively. <note><para>The MySQL Translators expect the database or session to be using ANSI mode. If the database is not using ANSI mode, an initialization query should be used on the pool to set ANSI mode: <programlisting>set SESSION sql_mode = 'ANSI'</programlisting></para></note></para>
-</listitem>
-<listitem>
-<para><emphasis>oracle</emphasis> - for use with Oracle 9i or later. Sequences may be used with the Oracle translator.
-A sequence may be modeled as a table with a name in source of DUAL and columns with the name in source set to <sequencesequence name>.[nextval|currentval].
-You can use a sequence as the default value for insert columns by setting the column to autoincrement and the name in source to <element name>:SEQUENCE=<sequence name>.<sequence value>.</para>
-</listitem>
-<listitem>
-<para><emphasis>postgresql</emphasis> - for use with 8.0 or later clients and 7.1 or later server.</para>
-</listitem>
-<listitem>
-<para><emphasis>sybase</emphasis> - for use with Sybase version 12.5 or later.</para>
-</listitem>
-<listitem>
-<para><emphasis>teiid</emphasis> - for use with Teiid 6.0 or later.</para>
-</listitem>
-<listitem>
-<para><emphasis>teradata</emphasis> - for use with Teradata V2R5.1 or later.</para>
-</listitem>
-</itemizedlist>
-<table>
-<title>Execution Properties - shared by all JDBC Translators</title>
-<tgroup cols="3">
-<colspec colwidth=".75*" />
-<colspec colwidth="1.5*" />
-<colspec colwidth=".5*" />
-<thead>
-<row>
-<entry>Name</entry>
-<entry>Description</entry>
-<entry>Default</entry>
-</row>
-</thead>
-<tbody>
-<row>
-<entry>DatabaseTimeZone</entry>
-<entry>The time zone of the database. Used when fetchings date, time, or timestamp values.</entry>
-<entry>The system default time zone</entry>
-</row>
-<row>
-<entry>DatabaseVersion</entry>
-<entry>The specific database version. Used to further tune pushdown support.</entry>
-<entry>The base supported version</entry>
-</row>
-<row>
-<entry>TrimStrings</entry>
-<entry>true to trim trailing whitespace from fixed length character strings. Note that Teiid only has a string, or varchar, type that treats trailing whitespace as meaningful.</entry>
-<entry>false</entry>
-</row>
-<row>
-<entry>UseBindVariables</entry>
-<entry>true to indicate that PreparedStatements should be used and that literal values in the source query should be replace with bind variables. If false only LOB values will trigger the use of PreparedStatements.</entry>
-<entry>true</entry>
-</row>
-<row>
-<entry>UseCommentsInSourceQuery</entry>
-<entry>This will embed a /*comment*/ leading comment with session/request id in source SQL query for informational purposes</entry>
-<entry>false</entry>
-</row>
-<row>
-<entry>MaxPreparedInsertBatchSize</entry>
-<entry>The max size of a prepared insert batch.</entry>
-<entry>2048</entry>
-</row>
-</tbody>
-</tgroup>
-</table>
-<table>
-<title>Importer Properties - shared by all JDBC Translators</title>
-<tgroup cols="3">
-<colspec colwidth=".75*" />
-<colspec colwidth="1.5*" />
-<colspec colwidth=".3*" />
-<thead>
-<row>
-<entry>Name</entry>
-<entry>Description</entry>
-<entry>Default</entry>
-</row>
-</thead>
-<tbody>
-<row>
-<entry>catalog</entry>
-<entry>See DatabaseMetaData.getTables<footnote label="1" id="dbmd"><para>Full JavaDoc for <ulink url="http://java.sun.com/javase/6/docs/api/java/sql/DatabaseMetaData.html">DatabaseMetaData</ulink></para></footnote></entry>
-<entry>null</entry>
-</row>
-<row>
-<entry>schemaPattern</entry>
-<entry>See DatabaseMetaData.getTables<footnoteref linkend="dbmd"/></entry>
-<entry>null</entry>
-</row>
-<row>
-<entry>tableNamePattern</entry>
-<entry>See DatabaseMetaData.getTables<footnoteref linkend="dbmd"/></entry>
-<entry>null</entry>
-</row>
-<row>
-<entry>procedurePatternName</entry>
-<entry>See DatabaseMetaData.getProcedures<footnoteref linkend="dbmd"/></entry>
-<entry>null</entry>
-</row>
-<row>
-<entry>tableTypes</entry>
-<entry>Comma separated list - without spaces - of imported table types. See DatabaseMetaData.getTables<footnoteref linkend="dbmd"/></entry>
-<entry>null</entry>
-</row>
-<row>
-<entry>useFullSchemaName</entry>
-<entry>When false, directs the importer to drop the source catalog/schema from the Teiid object name, so that the Teiid fully qualified name will be in the form of <model name>.<table name> - Note: that this may lead to objects with duplicate names when importing from multiple schemas, which results in an exception</entry>
-<entry>true</entry>
-</row>
-<row>
-<entry>importKeys</entry>
-<entry>true to import primary and foriegn keys</entry>
-<entry>true</entry>
-</row>
-<row>
-<entry>importIndexes</entry>
-<entry>true to import index/unique key/cardinality information</entry>
-<entry>true</entry>
-</row>
-<row>
-<entry>importApproximateIndexes</entry>
-<entry>true to import approximate index information. See DatabaseMetaData.getIndexInfo<footnoteref linkend="dbmd"/></entry>
-<entry>true</entry>
-</row>
-<row>
-<entry>importProcedures</entry>
-<entry>true to import procedures and procedure columns - Note that it is not always possible to import procedure result set columns due to database limitations. It is also not currently possible to import overloaded procedures.</entry>
-<entry>true</entry>
-</row>
-<row>
-<entry>widenUnsignedTypes</entry>
-<entry>true to convert unsigned types to the next widest type. For example SQL Server reports tinyint as an unsigned type. With this option enabled, tinyint would be imported as a short instead of a byte.</entry>
-<entry>true</entry>
-</row>
-<row>
-<entry>quoteNameInSource</entry>
-<entry>false will override the default and direct Teiid to create source queries using unquoted identifiers.</entry>
-<entry>true</entry>
-</row>
-</tbody>
-</tgroup>
-</table>
-<warning>
-<para>The default import settings will crawl all available metadata. This import process is time consuming and full metadata import is not needed in most situations. Most commonly you'll want to limit import by schemaPattern and tableTypes.</para></warning>
-<para>Example importer settings to only import tables and views from my-schema.<programlisting><![CDATA[...
-<property name="importer.tableTypes" value="TABLE,VIEW"/>
-<property name="importer.schemaPattern" value="my-schema"/>
-...]]></programlisting></para>
-<section><title>Usage</title>
-<para>Usage of a JDBC source is straight-forward. Using Teiid SQL, the source ma be queried as if the tables and procedures were local to the Teiid system.
-</para>
-</section>
-</section>
-<section>
-<title>LDAP Translator</title>
-<para>The LDAP translator, known by the type name <emphasis>ldap</emphasis>, exposes an LDAP directory tree relationally with pusdown support for filtering via criteria. This is typically coupled with the LDAP resource adapter.</para>
-<table>
-<title>Execution Properties</title>
-<tgroup cols="3">
-<thead>
-<row>
-<entry>Name</entry>
-<entry>Description</entry>
-<entry>Default</entry>
-</row>
-</thead>
-<tbody>
-<row>
-<entry>SearchDerfaultBaseDN</entry>
-<entry>Default Base DN for LDAP Searches</entry>
-<entry>null</entry>
-</row>
-<row>
-<entry>SearchDefaultScope</entry>
-<entry>Default Scope for LDAP Searches. Can be one of SUBTREE_SCOPE, OBJECT_SCOPE, ONELEVEL_SCOPE.</entry>
-<entry>ONELEVEL_SCOPE</entry>
-</row>
-<row>
-<entry>RestrictToObjectClass</entry>
-<entry>Restrict Searches to objectClass named in the Name field for a table</entry>
-<entry>false</entry>
-</row>
-</tbody>
-</tgroup>
-</table>
-</section>
-<section>
-<title>Loopback Translator</title>
-<para>The Loopback translator, known by the type name <emphasis>loopback</emphasis>, provides a quick testing solution. It supports all SQL constructs and returns default results, with configurable behavior.</para>
-<table>
-<title>Execution Properties</title>
-<tgroup cols="3">
-<colspec colwidth=".75*" />
-<colspec colwidth="1.5*" />
-<colspec colwidth=".5*" />
-<thead>
-<row>
-<entry>Name</entry>
-<entry>Description</entry>
-<entry>Default</entry>
-</row>
-</thead>
-<tbody>
-<row>
-<entry>ThrowError</entry>
-<entry>true to always throw an error</entry>
-<entry>false</entry>
-</row>
-<row>
-<entry>RowCount</entry>
-<entry>Rows returned for non-update queries.</entry>
-<entry>1</entry>
-</row>
-<row>
-<entry>WaitTime</entry>
-<entry>Wait randomly up to this number of milliseconds with each sourc query.</entry>
-<entry>0</entry>
-</row>
-<row>
-<entry>PollIntervalInMilli</entry>
-<entry>if positive results will be "asynchronusly" returned - that is a DataNotAvailableException will be thrown initially and the engine will wait the poll interval before polling for the results.</entry>
-<entry>-1</entry>
-</row>
-</tbody>
-</tgroup>
-</table>
-<para>There are no import settings for the Loopback translator; it also does not provide metadata - it should be used as a testing stub.</para>
-</section>
-<section>
-<title>Salesforce Translator</title>
-<para>The Salesforce translator, known by the type name <emphasis>salesforce</emphasis> supports the SELECT, DELETE, INSERT and UPDATE operations against a Salesforce.com account. It is designed for use with the Teiid Salesforce resource adapter.</para>
-<table>
-<title>Execution Properties</title>
-<tgroup cols="3">
-<colspec colwidth=".75*" />
-<colspec colwidth="1.5*" />
-<colspec colwidth=".5*" />
-<thead>
-<row>
-<entry>Name</entry>
-<entry>Description</entry>
-<entry>Default</entry>
-</row>
-</thead>
-<tbody>
-<row>
-<entry>ModelAuditFeilds</entry>
-<entry>Audit Model Fields</entry>
-<entry>false</entry>
-</row>
-</tbody>
-</tgroup>
-</table>
-<para>The Salesforce translator can import metadata, but does not currently have import settings.</para>
-<section>
-<title>Usage</title>
-<section>
-<title>SQL Processing</title>
-<para>Salesforce does not provide the same set of
- functionality as a relational database. For example, Salesforce does
- not support arbitrary joins between tables. However, working in
- combination with the Teiid Query Planner, the Salesforce
- connector
- supports nearly all of the SQL syntax supported by the
- Teiid.
+ <title>Translators</title>
+
+ <section>
+ <title>Introduction to the Teiid Connector Architecture</title>
+ <para>
+ The Teiid Connector Architecture (TCA) provides Teiid with a robust mechanism
+ for integrating with external systems. The TCA defines a common client interface
+ between Teiid and an external system that includes metadata as to what SQL
+ constructs are supported for pushdown and the ability to import metadata from
+ the external system.
</para>
- <para>The Salesforce Connector executes SQL commands by “pushing
- down” the command to Salesforce whenever possible, based on the
- supported capabilities. Teiid will automatically provide
- additional database functionality when the Salesforce Connector does
- not explicitly provide support for a given SQL construct. In these
- cases, the SQL construct cannot be “pushed down” to the data source,
- so it will be evaluated in Teiid, in order to ensure that the
- operation is performed.
+
+ <para>
+ A Translator is the heart of the TCA and acts as the bridge logic between Teiid
+ and an external system, which is most commonly accessed through a JCA resource
+ adapter. Refer to the Teiid Developers Guide for details on developing custom
+ Translators and JCA resource adapters for use with Teiid.
</para>
- <para>In cases where certain SQL capabilities cannot be pushed down
- to Salesforce, Teiid will push down the capabilities that are
- supported, and fetch a set of data from Salesforce. Then, Teiid
- will evaluate the additional capabilities, creating a subset of the
- original data set. Finally, Teiid will pass the result to the
- client.
- </para>
+
+ <note>
+ <para>
+ The TCA is not the same as the JCA, the JavaEE Connector Architecture, although
+ the TCA is designed for use with JCA resource adapters.
+ </para>
+ </note>
+
+ <note>
+ <para>
+ The import capabilities of Teiid Translators is currently only used in
+ <link linkend="dynamic_vdbs">dynamic VDBs</link> and not by the Teiid Designer.
+ </para>
+ </note>
+
+ </section>
- <programlisting><![CDATA[SELECT sum(Reports) FROM Supervisor where Division = 'customer support';]]></programlisting>
- <para>Neither Salesforce nor the Salesforce Connector support
- the sum() scalar function, but they do support CompareCriteriaEquals,
- so the query that is passed to Salesforce by the connector will be
- transformed to this query.
+ <section>
+ <title>Translators</title>
+ <para>
+ A Translator is typically paired with a particular JCA resource adapter. In
+ instances where pooling, environment dependent configuration management, advanced
+ security handling, etc. are not needed, then a JCA resource adapter is not needed.
+ The configuration of JCA ConnectionFactories for needed resource adapters is not
+ part of this guide, please see the Teiid Administrator Guide and the kit examples
+ for configuring resource adapters for use in JBossAS.
</para>
- <programlisting><![CDATA[SELECT Reports FROM Supervisor where Division = 'customer support';]]></programlisting>
- <para>The sum() scalar function will be applied by the Teiid
- Query Engine to the result set returned by the connector.
+
+ <para>
+ Translators can have a number of configurable properties. These are broken down
+ into execution properties, which determine aspects of how data is retrieved, and
+ import settings, which determine what metadata is read for import.
</para>
- <para>In some cases multiple calls to the Salesforce application
- will be made to support the SQL passed to the connector.
- </para>
- <programlisting><![CDATA[DELETE From Case WHERE Status = 'Closed';]]></programlisting>
- <para>The API in Salesforce to delete objects only supports
- deleting by ID. In order to accomplish this the Salesforce connector
- will first execute a query to get the IDs of the correct objects, and
- then delete those objects. So the above DELETE command will result in
- the following two commands.
- </para>
- <programlisting><![CDATA[SELECT ID From Case WHERE Status = 'Closed';
-DELETE From Case where ID IN (<result of query>);*]]></programlisting>
- <para>*The Salesforce API DELETE call is not expressed in SQL, but
- the above is an SQL equivalent expression.
- </para>
- <para>It's useful to be aware of unsupported capabilities, in
- order
- to avoid fetching large data sets from Salesforce and making you
- queries as performant as possible. See all <link linkend="sf_supported">Supported Capabilities</link>.
- </para>
- </section>
- <section>
- <title>Selecting from Multi-Select Picklists</title>
+
<para>
- A multi-select picklist is a field type in Salesforce that can
- contain multiple values in a single field. Query criteria operators
- for fields of this type in SOQL are limited to EQ, NE, includes and
- excludes. The full Salesforce documentation for selecting from
- mullti-select picklists can be found at the following link.
- <ulink
- url="http://www.salesforce.com/us/developer/docs/api/index_Left.htm#StartTopic...">Querying Mulit-select Picklists
- </ulink>
+ The execution properties for a translator typically have reasonable defaults. For
+ specific translator types, e.g. the Derby translator, base execution properties are
+ already tuned to match the source. In most cases the user will not need to adjust
+ their values.
</para>
- <para>Teiid SQL does not support the includes or
- excludes operators, but the Salesforce connector provides user
- defined function definitions for these operators that provided
- equivalent functionality for fields of type multi-select. The
- definition for the functions is:
- </para>
- <programlisting><![CDATA[boolean includes(Column column, String param)
-boolean excludes(Column column, String param)]]></programlisting>
- <para>For example, take a single multi-select picklist column
- called Status that contains all of these values.
- </para>
- <itemizedlist mark='opencircle'>
- <listitem>
+
+ <table>
+ <title>Base Execution Properties - shared by all translators</title>
+ <tgroup cols="3">
+ <colspec colwidth="3*" />
+ <colspec colwidth="6*" />
+ <colspec colwidth="2*" />
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Description</entry>
+ <entry>Default</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>Immutable</entry>
+ <entry>Set to true to indicate that the source never changes.</entry>
+ <entry>false</entry>
+ </row>
+ <row>
+ <entry>RequiresCriteria</entry>
+ <entry>Set to true to indicate that source SELECT/UPDATE/DELETE queries require a where clause.</entry>
+ <entry>false</entry>
+ </row>
+ <row>
+ <entry>SupportsOrderBy</entry>
+ <entry>Set to true to indicate that the ORDER BY clause is supported.</entry>
+ <entry>false</entry>
+ </row>
+ <row>
+ <entry>SupportsOuterJoins</entry>
+ <entry>Set to true to indicate that OUTER JOINs are supported.</entry>
+ <entry>false</entry>
+ </row>
+ <row>
+ <entry>SupportsFullOuterJoins</entry>
+ <entry>If outer joins are supported, true indicates that FULL OUTER JOINs are supported.</entry>
+ <entry>false</entry>
+ </row>
+ <row>
+ <entry>SupportsInnerJoins</entry>
+ <entry>Set to true to indicate that INNER JOINs are supported.</entry>
+ <entry>false</entry>
+ </row>
+ <row>
+ <entry>SupportedJoinCriteria</entry>
+ <entry>If joins are supported, defines what criteria may be used as the join criteria. May be one of (ANY, THETA, EQUI, or KEY).</entry>
+ <entry>ANY</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <note>
+ <para>
+ Only a subset of the metadata as to what SQL constructs the source supports
+ can be set through execution properties. If more control is needed, please
+ consult the Teiid Developers Guide.
+ </para>
+ </note>
+
+ <para>There are no base importer settings.</para>
+
+ <section>
+ <title>File Translator</title>
+ <para>
+ The file translator, known by the type name <emphasis>file</emphasis>, exposes
+ stored procedures to leverage file system resources exposed by the file resource
+ adapter. It will commonly be used with the <link linkend="texttable">TEXTTABLE</link>
+ or <link linkend="xmltable">XMLTABLE</link> table functions to use CSV or XML
+ formated data.
+ </para>
+
+ <table>
+ <title>Execution Properties</title>
+ <tgroup cols="3">
+ <colspec colwidth="1*" />
+ <colspec colwidth="4*" />
+ <colspec colwidth="1*" />
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Description</entry>
+ <entry>Default</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>Encoding</entry>
+ <entry>The encoding that should be used for CLOBs returned by the getTextFiles procedure</entry>
+ <entry>The system default encoding</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <para>There are file importer settings, but it does provide metadata for dynamic vdbs.</para>
+
+ <section>
+ <title>Usage</title>
<para>
- current
+ Retrieve all files as BLOBs with the given extension at the given path.
</para>
- </listitem>
- <listitem>
+
+ <programlisting>call getFiles('path/*.ext')</programlisting>
+
<para>
- working
+ If the extension pattern is not specified and the path is a directory,
+ then all files in the directory will be returned. If the path or filename
+ doesn't exist, then no results will be returned.
</para>
- </listitem>
- <listitem>
+
<para>
- critical
+ Retrieve all files as CLOBs with the given extension at the given path.
</para>
- </listitem>
- </itemizedlist>
- <para>For that column, all of the below are valid queries:</para>
- <programlisting><![CDATA[SELECT * FROM Issue WHERE true = includes (Status, 'current, working' );
-SELECT * FROM Issue WHERE true = excludes (Status, 'current, working' );
-SELECT * FROM Issue WHERE true = includes (Status, 'current;working, critical' );]]></programlisting>
- <para>EQ and NE criteria will pass to Salesforce as supplied. For
- example, these queries will not be modified by the connector.
+ <programlisting>call getTextFiles('path/*.ext')</programlisting>
+
+ <para>
+ Save the CLOB, BLOB, or XML file to given path
+ </para>
+ <programlisting>call saveFile('path', value)</programlisting>
+
+ <para>
+ See the database metadata for full descriptions of the getFiles,
+ getTextFiles, and saveFile procedures.
+ </para>
+ </section>
+
+ </section>
+
+ <section>
+ <title>JDBC Translator</title>
+ <para>
+ The JDBC translator bridges between SQL semantic and data type difference
+ between Teiid and a target RDBMS. Teiid has a range of specific translators
+ that target the most popular open source and proprietary databases.
+ </para>
+
+ <itemizedlist>
+ <title>Type names:</title>
+ <listitem>
+ <para>
+ <emphasis>jdbc-ansi</emphasis> - declares support for most SQL
+ constructs supported by Teiid, except for row limit/offset and
+ EXCEPT/INTERCECT. Translates source SQL into ANSI compliant syntax.
+ This translator should be used when another more specific type is
+ not available.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>jdbc-simple</emphasis> - same as jdbc-ansi, except disables
+ support for function, UNION, and aggregate pushdown.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>db2</emphasis> - for use with DB2 8 or later.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>derby</emphasis> - for use with Derby 10.1 or later.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>h2</emphasis> - for use with H2 version 1.1 or later.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>hsql</emphasis> - for use with HSQLDB 1.7 or later.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>informix</emphasis> - for use with any version.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>metamatrix</emphasis> - for use with MetaMatrix 5.5.0 or later.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>mysql</emphasis>/<emphasis>mysql5</emphasis> - for use with
+ MySQL version 4.x and 5 or later respectively.
+ </para>
+ <para>
+ The MySQL Translators expect the database or session to be using ANSI
+ mode. If the database is not using ANSI mode, an initialization query
+ should be used on the pool to set ANSI mode:
+ </para>
+ <programlisting>set SESSION sql_mode = 'ANSI'</programlisting>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>oracle</emphasis> - for use with Oracle 9i or later.
+ Sequences may be used with the Oracle translator. A sequence may be
+ modeled as a table with a name in source of DUAL and columns with the
+ name in source set to <code><sequencesequence name>.[nextval|currentval].</code>
+ You can use a sequence as the default value for insert columns by
+ setting the column to autoincrement and the name in source to
+ <code><element name>:SEQUENCE=<sequence name>.<sequence value></code>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>postgresql</emphasis> - for use with 8.0 or later clients
+ and 7.1 or later server.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>sybase</emphasis> - for use with Sybase version 12.5 or later.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>teiid</emphasis> - for use with Teiid 6.0 or later.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>teradata</emphasis> - for use with Teradata V2R5.1 or later.
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <table>
+ <title>Execution Properties - shared by all JDBC Translators</title>
+ <tgroup cols="3">
+ <colspec colwidth="3*" />
+ <colspec colwidth="6*" />
+ <colspec colwidth="2*" />
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Description</entry>
+ <entry>Default</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>DatabaseTimeZone</entry>
+ <entry>The time zone of the database. Used when fetchings date, time, or timestamp values.</entry>
+ <entry>The system default time zone</entry>
+ </row>
+ <row>
+ <entry>DatabaseVersion</entry>
+ <entry>The specific database version. Used to further tune pushdown support.</entry>
+ <entry>The base supported version</entry>
+ </row>
+ <row>
+ <entry>TrimStrings</entry>
+ <entry>true to trim trailing whitespace from fixed length character strings. Note that Teiid only has a string, or varchar, type that treats trailing whitespace as meaningful.</entry>
+ <entry>false</entry>
+ </row>
+ <row>
+ <entry>UseBindVariables</entry>
+ <entry>true to indicate that PreparedStatements should be used and that literal values in the source query should be replace with bind variables. If false only LOB values will trigger the use of PreparedStatements.</entry>
+ <entry>true</entry>
+ </row>
+ <row>
+ <entry>UseCommentsInSourceQuery</entry>
+ <entry>This will embed a /*comment*/ leading comment with session/request id in source SQL query for informational purposes</entry>
+ <entry>false</entry>
+ </row>
+ <row>
+ <entry>MaxPreparedInsertBatchSize</entry>
+ <entry>The max size of a prepared insert batch.</entry>
+ <entry>2048</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table>
+ <title>Importer Properties - shared by all JDBC Translators</title>
+ <tgroup cols="3">
+ <colspec colwidth="3*" />
+ <colspec colwidth="6*" />
+ <colspec colwidth="2*" />
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Description</entry>
+ <entry>Default</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>catalog</entry>
+ <entry>See DatabaseMetaData.getTables<footnote label="1" id="dbmd"><para>Full JavaDoc for <ulink url="http://java.sun.com/javase/6/docs/api/java/sql/DatabaseMetaData.html">DatabaseMetaData</ulink></para></footnote></entry>
+ <entry>null</entry>
+ </row>
+ <row>
+ <entry>schemaPattern</entry>
+ <entry>See DatabaseMetaData.getTables<footnoteref linkend="dbmd"/></entry>
+ <entry>null</entry>
+ </row>
+ <row>
+ <entry>tableNamePattern</entry>
+ <entry>See DatabaseMetaData.getTables<footnoteref linkend="dbmd"/></entry>
+ <entry>null</entry>
+ </row>
+ <row>
+ <entry>procedurePatternName</entry>
+ <entry>See DatabaseMetaData.getProcedures<footnoteref linkend="dbmd"/></entry>
+ <entry>null</entry>
+ </row>
+ <row>
+ <entry>tableTypes</entry>
+ <entry>Comma separated list - without spaces - of imported table types. See DatabaseMetaData.getTables<footnoteref linkend="dbmd"/></entry>
+ <entry>null</entry>
+ </row>
+ <row>
+ <entry>useFullSchemaName</entry>
+ <entry>When false, directs the importer to drop the source catalog/schema from the Teiid object name, so that the Teiid fully qualified name will be in the form of <model name>.<table name> - Note: that this may lead to objects with duplicate names when importing from multiple schemas, which results in an exception</entry>
+ <entry>true</entry>
+ </row>
+ <row>
+ <entry>importKeys</entry>
+ <entry>true to import primary and foriegn keys</entry>
+ <entry>true</entry>
+ </row>
+ <row>
+ <entry>importIndexes</entry>
+ <entry>true to import index/unique key/cardinality information</entry>
+ <entry>true</entry>
+ </row>
+ <row>
+ <entry>importApproximateIndexes</entry>
+ <entry>true to import approximate index information. See DatabaseMetaData.getIndexInfo<footnoteref linkend="dbmd"/></entry>
+ <entry>true</entry>
+ </row>
+ <row>
+ <entry>importProcedures</entry>
+ <entry>true to import procedures and procedure columns - Note that it is not always possible to import procedure result set columns due to database limitations. It is also not currently possible to import overloaded procedures.</entry>
+ <entry>true</entry>
+ </row>
+ <row>
+ <entry>widenUnsignedTypes</entry>
+ <entry>true to convert unsigned types to the next widest type. For example SQL Server reports tinyint as an unsigned type. With this option enabled, tinyint would be imported as a short instead of a byte.</entry>
+ <entry>true</entry>
+ </row>
+ <row>
+ <entry>quoteNameInSource</entry>
+ <entry>false will override the default and direct Teiid to create source queries using unquoted identifiers.</entry>
+ <entry>true</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <warning>
+ <para>
+ The default import settings will crawl all available metadata. This import
+ process is time consuming and full metadata import is not needed in most
+ situations. Most commonly you'll want to limit import by schemaPattern
+ and tableTypes.
+ </para>
+ </warning>
+
+ <para>
+ Example importer settings to only import tables and views from my-schema.
</para>
- <programlisting><![CDATA[SELECT * FROM Issue WHERE Status = 'current';
-SELECT * FROM Issue WHERE Status = 'current;critical';
-SELECT * FROM Issue WHERE Status != 'current;working';]]></programlisting>
- </section>
+ <programlisting language="XML" role="XML"><![CDATA[...
+<property name="importer.tableTypes" value="TABLE,VIEW"/>
+<property name="importer.schemaPattern" value="my-schema"/>
+...]]></programlisting>
+
+ <section>
+ <title>Usage</title>
+ <para>
+ Usage of a JDBC source is straight-forward. Using Teiid SQL, the source may be
+ queried as if the tables and procedures were local to the Teiid system.
+ </para>
+ </section>
+
+ </section>
+
<section>
- <title>Selecting All Objects</title>
+ <title>LDAP Translator</title>
<para>
- The Salesforce connector supports the calling the queryAll operation
- from the Salesforce API. The queryAll operation is equivalent
- to the query operation with the exception that it returns data about
- <emphasis role="strong">all current and deleted</emphasis>
- objects in the system.
+ The LDAP translator, known by the type name <emphasis>ldap</emphasis>, exposes an
+ LDAP directory tree relationally with pushdown support for filtering via criteria.
+ This is typically coupled with the LDAP resource adapter.
</para>
- <para>The connector determines if it will call the
- query or queryAll operation via reference to the
- isDeleted property present on each Salesforce object,
- and modeled as a column on each table generated by
- the importer. By default this value is set to
- False when the model is generated and thus the connector calls
- query. Users are free to change the value in the model to True,
- changing the default behavior of the connector to be queryAll.
+
+ <table>
+ <title>Execution Properties</title>
+ <tgroup cols="3">
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Description</entry>
+ <entry>Default</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>SearchDerfaultBaseDN</entry>
+ <entry>Default Base DN for LDAP Searches</entry>
+ <entry>null</entry>
+ </row>
+ <row>
+ <entry>SearchDefaultScope</entry>
+ <entry>Default Scope for LDAP Searches. Can be one of SUBTREE_SCOPE, OBJECT_SCOPE, ONELEVEL_SCOPE.</entry>
+ <entry>ONELEVEL_SCOPE</entry>
+ </row>
+ <row>
+ <entry>RestrictToObjectClass</entry>
+ <entry>Restrict Searches to objectClass named in the Name field for a table</entry>
+ <entry>false</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+
+ <section>
+ <title>Loopback Translator</title>
+ <para>
+ The Loopback translator, known by the type name <emphasis>loopback</emphasis>,
+ provides a quick testing solution. It supports all SQL constructs and returns
+ default results, with configurable behavior.
</para>
- <para>The behavior is different if isDeleted is used as a parameter
- in the query. If the isDeleted column is used as a parameter
- in the query, and the value is 'true' the connector will call queryAll.
+
+ <table>
+ <title>Execution Properties</title>
+ <tgroup cols="3">
+ <colspec colwidth="3*" />
+ <colspec colwidth="6*" />
+ <colspec colwidth="2*" />
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Description</entry>
+ <entry>Default</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>ThrowError</entry>
+ <entry>true to always throw an error</entry>
+ <entry>false</entry>
+ </row>
+ <row>
+ <entry>RowCount</entry>
+ <entry>Rows returned for non-update queries.</entry>
+ <entry>1</entry>
+ </row>
+ <row>
+ <entry>WaitTime</entry>
+ <entry>Wait randomly up to this number of milliseconds with each sourc query.</entry>
+ <entry>0</entry>
+ </row>
+ <row>
+ <entry>PollIntervalInMilli</entry>
+ <entry>if positive results will be "asynchronously" returned - that is a DataNotAvailableException will be thrown initially and the engine will wait the poll interval before polling for the results.</entry>
+ <entry>-1</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <para>
+ There are no import settings for the Loopback translator; it also does not
+ provide metadata - it should be used as a testing stub.
</para>
- <programlisting><![CDATA[select * from Contact where isDeleted = true;]]></programlisting>
- <para>If the isDeleted column is used as a parameter in the query,
- and the value is 'false' the connector perform the default behavior
- will call query.
- </para>
- <programlisting><![CDATA[
- select * from Contact where isDeleted = false;
- ]]>
- </programlisting>
+
</section>
+
<section>
- <title>Selecting Updated Objects</title>
- <para>If the option is selected when importing metadata from
- Salesforce, a GetUpdated procedure is generated in the model with
- the following sturcture:
+ <title>Salesforce Translator</title>
+ <para>
+ The Salesforce translator, known by the type name <emphasis>salesforce</emphasis>
+ supports the SELECT, DELETE, INSERT and UPDATE operations against a Salesforce.com
+ account. It is designed for use with the Teiid Salesforce resource adapter.
</para>
- <programlisting><![CDATA[GetUpdated (ObjectName IN string,
+
+ <table>
+ <title>Execution Properties</title>
+ <tgroup cols="3">
+ <colspec colwidth="3*" />
+ <colspec colwidth="6*" />
+ <colspec colwidth="2*" />
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Description</entry>
+ <entry>Default</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>ModelAuditFeilds</entry>
+ <entry>Audit Model Fields</entry>
+ <entry>false</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <para>
+ The Salesforce translator can import metadata, but does not currently
+ have import settings.
+ </para>
+
+ <section>
+ <title>Usage</title>
+ <section>
+ <title>SQL Processing</title>
+ <para>
+ Salesforce does not provide the same set of
+ functionality as a relational database. For example, Salesforce does
+ not support arbitrary joins between tables. However, working in
+ combination with the Teiid Query Planner, the Salesforce
+ connector supports nearly all of the SQL syntax supported by the
+ Teiid.
+ </para>
+ <para>
+ The Salesforce Connector executes SQL commands by “pushing
+ down” the command to Salesforce whenever possible, based on the
+ supported capabilities. Teiid will automatically provide
+ additional database functionality when the Salesforce Connector does
+ not explicitly provide support for a given SQL construct. In these
+ cases, the SQL construct cannot be “pushed down” to the data source,
+ so it will be evaluated in Teiid, in order to ensure that the
+ operation is performed.
+ </para>
+ <para>
+ In cases where certain SQL capabilities cannot be pushed down
+ to Salesforce, Teiid will push down the capabilities that are
+ supported, and fetch a set of data from Salesforce. Then, Teiid
+ will evaluate the additional capabilities, creating a subset of the
+ original data set. Finally, Teiid will pass the result to the
+ client.
+ </para>
+
+ <programlisting language="SQL"><![CDATA[SELECT sum(Reports) FROM Supervisor where Division = 'customer support';]]></programlisting>
+
+ <para>
+ Neither Salesforce nor the Salesforce Connector support
+ the sum() scalar function, but they do support CompareCriteriaEquals,
+ so the query that is passed to Salesforce by the connector will be
+ transformed to this query.
+ </para>
+
+ <programlisting language="SQL"><![CDATA[SELECT Reports FROM Supervisor where Division = 'customer support';]]></programlisting>
+
+ <para>
+ The sum() scalar function will be applied by the Teiid Query Engine to
+ the result set returned by the connector.
+ </para>
+
+ <para>
+ In some cases multiple calls to the Salesforce application
+ will be made to support the SQL passed to the connector.
+ </para>
+
+ <programlisting language="SQL"><![CDATA[DELETE From Case WHERE Status = 'Closed';]]></programlisting>
+
+ <para>
+ The API in Salesforce to delete objects only supports
+ deleting by ID. In order to accomplish this the Salesforce connector
+ will first execute a query to get the IDs of the correct objects, and
+ then delete those objects. So the above DELETE command will result in
+ the following two commands.
+ </para>
+
+ <programlisting language="SQL"><![CDATA[SELECT ID From Case WHERE Status = 'Closed';
+DELETE From Case where ID IN (<result of query>);]]></programlisting>
+
+ <para>
+ *The Salesforce API DELETE call is not expressed in SQL, but
+ the above is an SQL equivalent expression.
+ </para>
+
+ <para>
+ It's useful to be aware of unsupported capabilities, in order
+ to avoid fetching large data sets from Salesforce and making you
+ queries as performant as possible.
+ See all <link linkend="sf_supported">Supported Capabilities</link>.
+ </para>
+
+ </section>
+
+ <section>
+ <title>Selecting from Multi-Select Picklists</title>
+ <para>
+ A multi-select picklist is a field type in Salesforce that can
+ contain multiple values in a single field. Query criteria operators
+ for fields of this type in SOQL are limited to EQ, NE, includes and
+ excludes. The full Salesforce documentation for selecting from
+ mullti-select picklists can be found at the following link.
+ <ulink url="http://www.salesforce.com/us/developer/docs/api/index_Left.htm#StartTopic...">Querying Mulit-select Picklists</ulink>
+ </para>
+
+ <para>
+ Teiid SQL does not support the includes or
+ excludes operators, but the Salesforce connector provides user
+ defined function definitions for these operators that provided
+ equivalent functionality for fields of type multi-select. The
+ definition for the functions is:
+ </para>
+
+ <programlisting>boolean includes(Column column, String param)
+boolean excludes(Column column, String param)</programlisting>
+
+ <para>
+ For example, take a single multi-select picklist column
+ called Status that contains all of these values.
+ </para>
+
+ <itemizedlist mark='opencircle'>
+ <listitem>
+ <para>current</para>
+ </listitem>
+ <listitem>
+ <para>working</para>
+ </listitem>
+ <listitem>
+ <para>critical</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>
+ For that column, all of the below are valid queries:
+ </para>
+
+ <programlisting language="SQL"><![CDATA[SELECT * FROM Issue WHERE true = includes (Status, 'current, working' );
+SELECT * FROM Issue WHERE true = excludes (Status, 'current, working' );
+SELECT * FROM Issue WHERE true = includes (Status, 'current;working, critical' );]]></programlisting>
+
+ <para>
+ EQ and NE criteria will pass to Salesforce as supplied. For
+ example, these queries will not be modified by the connector.
+ </para>
+
+ <programlisting language="SQL"><![CDATA[SELECT * FROM Issue WHERE Status = 'current';
+SELECT * FROM Issue WHERE Status = 'current;critical';
+SELECT * FROM Issue WHERE Status != 'current;working';]]></programlisting>
+
+ </section>
+ <section>
+ <title>Selecting All Objects</title>
+ <para>
+ The Salesforce connector supports the calling the queryAll operation
+ from the Salesforce API. The queryAll operation is equivalent
+ to the query operation with the exception that it returns data about
+ <emphasis role="strong">all current and deleted</emphasis>
+ objects in the system.
+ </para>
+ <para>
+ The connector determines if it will call the
+ query or queryAll operation via reference to the
+ isDeleted property present on each Salesforce object,
+ and modeled as a column on each table generated by
+ the importer. By default this value is set to
+ False when the model is generated and thus the connector calls
+ query. Users are free to change the value in the model to True,
+ changing the default behavior of the connector to be queryAll.
+ </para>
+ <para>
+ The behavior is different if isDeleted is used as a parameter
+ in the query. If the isDeleted column is used as a parameter
+ in the query, and the value is 'true' the connector will call queryAll.
+ </para>
+
+ <programlisting language="SQL"><![CDATA[select * from Contact where isDeleted = true;</programlisting>
+
+ <para>
+ If the isDeleted column is used as a parameter in the query,
+ and the value is 'false' the connector perform the default behavior
+ will call query.
+ </para>
+
+ <programlisting language="SQL"><![CDATA[select * from Contact where isDeleted = false;]]></programlisting>
+ </section>
+ <section>
+ <title>Selecting Updated Objects</title>
+ <para>
+ If the option is selected when importing metadata from
+ Salesforce, a GetUpdated procedure is generated in the model with
+ the following structure:
+ </para>
+
+ <programlisting language="SQL"><![CDATA[GetUpdated (ObjectName IN string,
StartDate IN datetime,
EndDate IN datetime,
LatestDateCovered OUT datetime)
returns
ID string]]></programlisting>
- <para>
- See the description of the
- <ulink
- url="http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_...">GetUpdated
- </ulink>
- operation in the Salesforce documentation for usage details.
- </para>
- </section>
- <section>
- <title>Selecting Deleted Objects</title>
- <para>If the option is selected when importing metadata from
- Salesforce, a GetDeleted procedure is generated in the model with
- the following sturcture:
- </para>
- <programlisting><![CDATA[GetDeleted (ObjectName IN string,
+
+ <para>
+ See the description of the
+ <ulink url="http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_...">GetUpdated</ulink>
+ operation in the Salesforce documentation for usage details.
+ </para>
+
+ </section>
+ <section>
+ <title>Selecting Deleted Objects</title>
+ <para>
+ If the option is selected when importing metadata from
+ Salesforce, a GetDeleted procedure is generated in the model with
+ the following structure:
+ </para>
+
+ <programlisting language="SQL"><![CDATA[GetDeleted (ObjectName IN string,
StartDate IN datetime,
EndDate IN datetime,
EarliestDateAvailable OUT datetime,
@@ -570,174 +781,257 @@
returns
ID string,
DeletedDate datetime]]></programlisting>
- <para>
- See the description of the
- <ulink
- url="http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_...">GetDeleted
- </ulink>
- operation in the Salesforce documentation for usage details.
- </para>
- </section>
- <section>
- <title>Relationship Queries</title>
- <para>Salesforce does not support joins like a relational database,
- but it does have support for queries that include parent-to-child
- or child-to-parent relationships between objects. These are termed
- Relationship Queries. The SalesForce connector supports Relationship
- Queries through Outer Join syntax.
- </para>
- <programlisting><![CDATA[SELECT Account.name, Contact.Name from Contact LEFT OUTER JOIN Account
+
+ <para>
+ See the description of the
+ <ulink url="http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_...">GetDeleted</ulink>
+ operation in the Salesforce documentation for usage details.
+ </para>
+
+ </section>
+ <section>
+ <title>Relationship Queries</title>
+ <para>
+ Salesforce does not support joins like a relational database,
+ but it does have support for queries that include parent-to-child
+ or child-to-parent relationships between objects. These are termed
+ Relationship Queries. The SalesForce connector supports Relationship
+ Queries through Outer Join syntax.
+ </para>
+
+ <programlisting language="SQL"><![CDATA[SELECT Account.name, Contact.Name from Contact LEFT OUTER JOIN Account
on Contact.Accountid = Account.id]]></programlisting>
- <para>This query shows the correct syntax to query a SalesForce model with
- to produce a relationship query from child to parent. It resolves to the
- following query to SalesForce.
- </para>
- <programlisting><![CDATA[SELECT Contact.Account.Name, Contact.Name FROM Contact]]>
- </programlisting>
- <programlisting><![CDATA[select Contact.Name, Account.Name from Account Left outer Join Contact
+
+ <para>
+ This query shows the correct syntax to query a SalesForce model with
+ to produce a relationship query from child to parent. It resolves to the
+ following query to SalesForce.
+ </para>
+
+ <programlisting language="SQL"><![CDATA[SELECT Contact.Account.Name, Contact.Name FROM Contact]]></programlisting>
+
+ <programlisting language="SQL"><![CDATA[select Contact.Name, Account.Name from Account Left outer Join Contact
on Contact.Accountid = Account.id]]></programlisting>
- <para>This query shows the correct syntax to query a SalesForce model with
- to produce a relationship query from parent to child. It resolves to the
- following query to SalesForce.
- </para>
- <programlisting><![CDATA[SELECT Account.Name, (SELECT Contact.Name FROM
+
+ <para>
+ This query shows the correct syntax to query a SalesForce model with
+ to produce a relationship query from parent to child. It resolves to the
+ following query to SalesForce.
+ </para>
+
+ <programlisting language="SQL"><![CDATA[SELECT Account.Name, (SELECT Contact.Name FROM
Account.Contacts) FROM Account]]></programlisting>
+
+ <para>
+ See the description of the
+ <ulink url="http://www.salesforce.com/us/developer/docs/api/index_Left.htm#StartTopic...">Relationship Queries</ulink>
+ operation in the SalesForce documentation for limitations.
+ </para>
+ </section>
+
+ <section id="sf_supported">
+ <title>Supported Capabilities</title>
+ <para>
+ The following are the the connector capabilities supported by
+ the Salesforce Connector. These SQL constructs will be pushed down to
+ Salesforce.
+ </para>
+
+ <itemizedlist mark='opencircle'>
+ <listitem>
+ <para>SELECT command</para>
+ </listitem>
+ <listitem>
+ <para>INSERT Command</para>
+ </listitem>
+ <listitem>
+ <para>UPDATE Command</para>
+ </listitem>
+ <listitem>
+ <para>DELETE Command</para>
+ </listitem>
+ <listitem>
+ <para>CompareCriteriaEquals</para>
+ </listitem>
+ <listitem>
+ <para>InCriteria</para>
+ </listitem>
+ <listitem>
+ <para>LikeCriteria - Supported for String fields only.</para>
+ </listitem>
+ <listitem>
+ <para>RowLimit</para>
+ </listitem>
+ <listitem>
+ <para>AggregatesCountStar</para>
+ </listitem>
+ <listitem>
+ <para>NotCriteria</para>
+ </listitem>
+ <listitem>
+ <para>OrCriteria</para>
+ </listitem>
+ <listitem>
+ <para>CompareCriteriaOrdered</para>
+ </listitem>
+ <listitem>
+ <para>OuterJoins with join criteria KEY</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ </section>
+ </section>
+
+ <section>
+ <title>Web Services Translator</title>
+ <para>
+ The Web Services translator, known by the type name <emphasis>ws</emphasis>,
+ exposes stored procedures for calling web services backed by a Teiid WS
+ resource adapter. It will commonly be used with the
+ <link linkend="texttable">TEXTTABLE</link> or
+ <link linkend="xmltable">XMLTABLE</link> table functions to use CSV or XML
+ formated data.
+ </para>
+
+ <table>
+ <title>Execution Properties</title>
+ <tgroup cols="3">
+ <colspec colwidth="3*" />
+ <colspec colwidth="6*" />
+ <colspec colwidth="2*" />
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Description</entry>
+ <entry>Default</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>DefaultBinding</entry>
+ <entry>The binding that should be used if one is not specified. Can be one of HTTP, SOAP11, or SOAP12</entry>
+ <entry>SOAP12</entry>
+ </row>
+ <row>
+ <entry>DefaultServiceMode</entry>
+ <entry>The default service mode. For SOAP, MESSAGE mode indicates that the request will contain the entire SOAP envelope and not just the contents of the SOAP body. Can be one of MESSAGE or PAYLOAD</entry>
+ <entry>PAYLOAD</entry>
+ </row>
+ <row>
+ <entry>XMLParamName</entry>
+ <entry>Used with the HTTP binding (typically with the GET method) to indicate that the request document should be part of the query string.</entry>
+ <entry>null - unused</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <para>
+ There are ws importer settings, but it does provide metadata for dynamic VDBs.
+ </para>
+
+ <section>
+ <title>Usage</title>
+ <para>
+ The WS translator exposes low level procedures for accessing web services.
+ See also the ws-weather example in the kit.
+ </para>
+
+ <section>
+ <title>Invoke Procedure</title>
+ <para>
+ Invoke allows for multiple binding, or protocol modes, including
+ HTTP, SOAP11, and SOAP12.
+ </para>
+ <programlisting>Procedure invoke(binding in STRING, action in STRING, request in XML, endpoint in STRING) returns XML</programlisting>
+
+ <para>
+ The binding may be one of null (to use the default) HTTP, SOAP11, or
+ SOAP12. Action with a SOAP binding indicates the SOAPAction value.
+ Action with a HTTP binding indicates the HTTP method (GET, POST, etc.),
+ which defaults to POST.
+ </para>
+
+ <para>
+ A null value for the binding or endpoint will use the default value.
+ The default endpoint is specified in the WS resource adapter
+ configuration. The endpoint URL may be absolute or relative. If it's
+ relative then it will be combined with the default endpoint.
+ </para>
+
+ <para>
+ Since multiple parameters are not required to have values, it is often
+ more clear to call the invoke procedure with named parameter syntax.
+ </para>
+ <programlisting>call invoke(binding=>'HTTP', action=>'GET')</programlisting>
+ <para>The request XML should be a valid XML document or root element.</para>
+ </section>
+
+ <section>
+ <title>InvokeHTTP Procedure</title>
+ <para>
+ <methodname>invokeHttp</methodname> can return the byte contents of an HTTP(S) call.
+ </para>
+ <programlisting>Procedure invokeHttp(action in STRING, request in OBJECT, endpoint in STRING, contentType out STRING) returns BLOB</programlisting>
+
+ <para>
+ Action indicates the HTTP method (GET, POST, etc.), which defaults to POST.
+ </para>
+ <para>
+ A null value for endpoint will use the default value. The default endpoint
+ is specified in the WS resource adapter configuration. The endpoint URL may
+ be absolute or relative. If it's relative then it will be combined with the
+ default endpoint.
+ </para>
+ <para>
+ Since multiple parameters are not required to have values, it is often more
+ clear to call the invoke procedure with named parameter syntax.
+ </para>
+ <programlisting>call invokeHttp(action=>'GET')</programlisting>
+
+ <para>
+ The request can be one of SQLXML, STRING, BLOB, or CLOB. The request will be
+ sent as the POST payload in byte form. For STRING/CLOB values this will
+ default to the UTF-8 encoding. To control the byte encoding, see the
+ <link linkend="to_bytes">to_bytes</link> function.
+ </para>
+ </section>
+ </section>
+ </section>
+ </section>
+
+ <section id="dynamic_vdbs">
+ <title>Dynamic VDBs</title>
<para>
- See the description of the
- <ulink
- url="http://www.salesforce.com/us/developer/docs/api/index_Left.htm#StartTopic...">Relationship Queries
- </ulink>
- operation in the SalesForce documentation for limitations.
+ Teiid integration is available via a "Dynamic VDB" without the need for Teiid Designer
+ tooling. While this mode of operation does not yet allow for the creation of view
+ layers, the underlying sources can still be queried as if they are a single source. See
+ the kit's "teiid-example/dynamicvdb-*" for working examples.
</para>
- </section>
- <section id="sf_supported">
- <title>Supported Capabilities</title>
- <para>The following are the the connector capabilities supported by
- the Salesforce Connector. These SQL constructs will be pushed down to
- Salesforce.</para>
- <itemizedlist mark='opencircle'>
- <listitem><para>
- SELECT command
- </para></listitem>
- <listitem><para>
- INSERT Command
- </para></listitem>
- <listitem><para>
- UPDATE Command
- </para></listitem>
- <listitem><para>
- DELETE Command
- </para></listitem>
- <listitem><para>
- CompareCriteriaEquals
- </para></listitem>
- <listitem><para>
- InCriteria
- </para></listitem>
- <listitem><para>
- LikeCriteria - Supported for String fields only.
- </para></listitem>
- <listitem><para>
- RowLimit
- </para></listitem>
- <listitem><para>
- AggregatesCountStar
- </para></listitem>
- <listitem><para>
- NotCriteria
- </para></listitem>
- <listitem><para>
- OrCriteria
- </para></listitem>
- <listitem><para>
- CompareCriteriaOrdered
- </para></listitem>
- <listitem><para>
- OuterJoins with join criteria KEY
- </para></listitem>
- </itemizedlist>
- </section>
-</section>
-</section>
-<section>
-<title>Web Services Translator</title>
-<para>The Web Services translator, known by the type name <emphasis>ws</emphasis>, exposes stored procedures for calling web services backed by a Teiid WS resource adapter.
-It will commonly be used with the <link linkend="texttable">TEXTTABLE</link> or <link linkend="xmltable">XMLTABLE</link> table functions to use CSV or XML formated data.</para>
-<table>
-<title>Execution Properties</title>
-<tgroup cols="3">
-<thead>
-<row>
-<entry>Name</entry>
-<entry>Description</entry>
-<entry>Default</entry>
-</row>
-</thead>
-<tbody>
-<row>
-<entry>DefaultBinding</entry>
-<entry>The binding that should be used if one is not specified. Can be one of HTTP, SOAP11, or SOAP12</entry>
-<entry>SOAP12</entry>
-</row>
-<row>
-<entry>DefaultServiceMode</entry>
-<entry>The default service mode. For SOAP, MESSAGE mode indicates that the request will contain the entire SOAP envelope and not just the contents of the SOAP body. Can be one of MESSAGE or PAYLOAD</entry>
-<entry>PAYLOAD</entry>
-</row>
-<row>
-<entry>XMLParamName</entry>
-<entry>Used with the HTTP binding (typically with the GET method) to indicate that the request document should be part of the query string.</entry>
-<entry>null - unused</entry>
-</row>
-</tbody>
-</tgroup>
-</table>
-<para>There are ws importer settings, but it does provide metadata for dynamic vdbs.</para>
-<section><title>Usage</title>
-<para>The WS translator exposes low level procedures for accessing web services. See also the ws-weather example in the kit.</para>
-<section>
-<title>Invoke Procedure</title>
-<para>invoke allows for multiple binding, or protocol modes, including HTTP, SOAP11, and SOAP12.
-<programlisting>Procedure invoke(binding in STRING, action in STRING, request in XML, endpoint in STRING) returns XML</programlisting>
-</para>
-<para>The binding may be one of null (to use the default) HTTP, SOAP11, or SOAP12. Action with a SOAP binding indicates the SOAPAction value. Action with a HTTP binding indicates the HTTP method (GET, POST, etc.), which defaults to POST.</para>
-<para>A null value for the binding or endpoint will use the default value. The default endpoint is specified in the WS resource adapter configuration. The endpoint URL may be absolute or relative. If it's relative then it will be combined with the default endpoint.</para>
-<para>Since multiple parameters are not required to have values, it is often more clear to call the invoke procedure with named parameter syntax. e.g. <programlisting>call invoke(binding=>'HTTP', action=>'GET')</programlisting></para>
-<para>The request XML should be a valid XML document or root element.</para>
-</section>
-<section>
-<title>InvokeHTTP Procedure</title>
-<para>invokeHttp can return the byte contents of an HTTP(S) call.
-<programlisting>Procedure invokeHttp(action in STRING, request in OBJECT, endpoint in STRING, contentType out STRING) returns BLOB</programlisting>
-</para>
-<para>Action indicates the HTTP method (GET, POST, etc.), which defaults to POST.</para>
-<para>A null value for endpoint will use the default value. The default endpoint is specified in the WS resource adapter configuration. The endpoint URL may be absolute or relative. If it's relative then it will be combined with the default endpoint.</para>
-<para>Since multiple parameters are not required to have values, it is often more clear to call the invoke procedure with named parameter syntax. e.g. <programlisting>call invokeHttp(action=>'GET')</programlisting></para>
-<para>The request can be one of SQLXML, STRING, BLOB, or CLOB. The request will be sent as the POST payload in byte form. For STRING/CLOB values this will default to the UTF-8 encoding. To control the byte encoding, see the <link linkend="to_bytes">to_bytes</link> function.</para>
-</section>
-</section>
-</section>
-</section>
-<section id="dynamic_vdbs">
-<title>Dynamic VDBs</title>
-<para>
-Teiid integration is available via a "Dynamic VDB" without the need for Teiid Designer tooling. While this mode of operation does not yet allow for the creation of view layers, the underlying sources can still be queried as if they are a single source. See the kit's "teiid-example/dynamicvdb-*" for working examples.
-</para>
-<para>
-To build a dynamic vdb, you'll need to create a "<some-name>-vdb.xml" file. The XML file captures information about the VDB, the sources it integrate, and preferences for importing metadata.
-</para>
-<note>
-<para>
-VDB name pattern must adhere to "-vdb.xml" for the Teiid VDB deployer to recognize this file as a dynamic VDB.
-</para>
-</note>
-<para>
-my-vdb.xml: (The vdb-deployer.xml schema for this file is available in the schema folder under the docs with the Teiid distribution.)
-</para>
-<programlisting><![CDATA[<vdb name="${vdb-name}" version=${vdb-version}>
- <property name="UseConnectorMetadata" value="..."/>
+ <para>
+ To build a dynamic VDB, you'll need to create a
+ <filename><replaceable>SOME-NAME</replaceable>-vdb.xml</filename> file. The XML file captures
+ information about the VDB, the sources it integrate, and preferences for importing metadata.
+ </para>
+
+ <note>
+ <para>
+ VDB name pattern must adhere to "-vdb.xml" for the Teiid VDB deployer to
+ recognize this file as a dynamic VDB.
+ </para>
+ </note>
+
+ <para>
+ my-vdb.xml: (The vdb-deployer.xml schema for this file is available in the schema
+ folder under the docs with the Teiid distribution.)
+ </para>
+
+ <programlisting role="XML" language="XML"><![CDATA[<vdb name="${vdb-name}" version="${vdb-version}">
+ <property name="UseConnectorMetadata" value="..." />
+
<!-- define a model fragment for each data source -->
<model name="${model-name}">
@@ -751,68 +1045,238 @@
<!-- create translator instances that override default properties -->
- <translator name="${translator-name}" type="${translator-type}"/>
+ <translator name="${translator-name}" type="${translator-type}" />
- <property name="..." value="..."/>
+ <property name="..." value="..." />
...
</translator>
-</vdb>
-]]></programlisting>
-<section>
-<title>VDB Element</title>
-<itemizedlist>
- <title>Attributes</title>
- <listitem><para><emphasis>name</emphasis> - The name of the VDB. The VDB name referenced through the driver or datasource during the connection time.</para>
- </listitem>
- <listitem><para><emphasis>version</emphasis> - The version of the VDB (should be an positive integer). This determines the deployed directory location (see Name), and provides an explicit versioning mechanism to the VDB name.</para>
- </listitem>
-</itemizedlist>
-<itemizedlist>
- <title>Property Elements</title>
- <listitem><para><emphasis>UseConnectorMetadata</emphasis> - Setting to use connector supplied metadata. Can be "true" or "cached". "true" will obtain metadata once for every launch of Teiid. "cached" will save a file containing the metadata into the <jboss-install>/server/<profile>/data/teiid directory</para>
- </listitem>
-</itemizedlist>
-</section>
-<section>
-<title>Model Element</title>
-<itemizedlist>
- <title>Attributes</title>
- <listitem><para><emphasis>name</emphasis> - The name of the model is used as a top level schema name for all of the metadata imported from the connector. The name should be unique among all Models in the VDB and should not contain the '.' character.</para>
- </listitem>
- <listitem><para><emphasis>version</emphasis> - The version of the VDB (should be an positive integer). This determines the deployed directory location (see Name), and provides an explicit versioning mechanism to the VDB name.</para>
- </listitem>
-</itemizedlist>
-<itemizedlist>
- <title>Source Element</title>
- <listitem><para><emphasis>name</emphasis> - The name of the source to use for this model. This can be any name you like, but will typically be the same as the model name. Having a name different than the model name is only useful in multi-source scenarios.
- </para></listitem>
- <listitem><para><emphasis>translator-name</emphasis> - The name or type of the Teiid Translator to use. Possible values include the built-in types (ws, file, ldap, oracle, sqlserver, db2, derby, etc.) and translators defined in the translators section.
- </para></listitem>
- <listitem><para><emphasis>connection-jndi-name</emphasis> - The JNDI name of this source's connection factory. There should be a corresponding "-ds.xml" file that defines the connection factory in the JBoss AS. Check out the deploying vdb dependencies section for info. You also need to deploy these connection factories before you can deploy the vdb.
- </para></listitem>
-</itemizedlist>
-<itemizedlist>
- <title>Property Elements</title>
- <listitem><para><emphasis>importer.<propertyname></emphasis> - Property to be used by the connector importer for the model for purposes importing metadata. See possible property name/values in the Translator specific section. Note that using these properties you can narrow or widen the data elements available for integration.
- </para></listitem>
-</itemizedlist>
-</section>
-<section>
-<title>Translator Element</title>
-<itemizedlist>
- <title>Attributes</title>
- <listitem><para><emphasis>name</emphasis> - The name of the the Translator. Referenced by the source element.</para>
- </listitem>
- <listitem><para><emphasis>type</emphasis> - The base type of the Translator. Can be one of the built-in types (ws, file, ldap, oracle, sqlserver, db2, derby, etc.).
- </para>
- </listitem>
-</itemizedlist>
-<itemizedlist>
- <title>Property Elements</title>
- <listitem><para>Set a value that overrides a translator default property. See possible property name/values in the Translator specific section.
- </para></listitem>
-</itemizedlist>
-</section>
-</section>
+</vdb>]]></programlisting>
+
+ <section>
+ <title>VDB Element</title>
+ <itemizedlist>
+ <title>Attributes</title>
+ <listitem>
+ <para>
+ <emphasis>name</emphasis>
+ </para>
+ <para>
+ The name of the VDB. The VDB name
+ referenced through the driver or datasource during the connection time.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>version</emphasis>
+ </para>
+ <para>
+ The version of the VDB (should be an
+ positive integer). This determines the deployed directory location
+ (see Name), and provides an explicit versioning mechanism to the VDB
+ name.
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <itemizedlist>
+ <title>Property Elements</title>
+ <listitem>
+ <para>
+ <emphasis>UseConnectorMetadata</emphasis>
+ </para>
+ <para>
+ Setting to use connector
+ supplied metadata. Can be "true" or "cached". "true" will obtain
+ metadata once for every launch of Teiid. "cached" will save a file
+ containing the metadata into the
+ <filename><replaceable>PROFILE</replaceable>/data/teiid</filename> directory
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ </section>
+
+ <section>
+ <title>Model Element</title>
+ <itemizedlist>
+ <title>Attributes</title>
+ <listitem>
+ <para>
+ <emphasis>name</emphasis>
+ </para>
+ <para>
+ The name of the model is used as a
+ top level schema name for all of the metadata imported from the
+ connector. The name should be unique among all Models in the VDB and
+ should not contain the '.' character.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>version</emphasis>
+ </para>
+ <para>
+ The version of the VDB (should be an
+ positive integer). This determines the deployed directory location
+ (see Name), and provides an explicit versioning mechanism to the VDB
+ name.
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <itemizedlist>
+ <title>Source Element</title>
+ <listitem>
+ <para>
+ <emphasis>name</emphasis>
+ </para>
+ <para>
+ The name of the source to use for this
+ model. This can be any name you like, but will typically be the same
+ as the model name. Having a name different than the model name is
+ only useful in multi-source scenarios.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>translator-name</emphasis>
+ </para>
+ <para>
+ The name or type of the Teiid Translator to use. Possible values include
+ the built-in types (ws, file, ldap, oracle, sqlserver, db2, derby, etc.)
+ and translators defined in the translators section.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>connection-jndi-name</emphasis>
+ </para>
+ <para>
+ The JNDI name of this source's connection factory. There should be a
+ corresponding "-ds.xml" file that defines the connection factory in
+ the JBoss AS. Check out the deploying VDB dependencies section for
+ info. You also need to deploy these connection factories before you
+ can deploy the VDB.
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <itemizedlist>
+ <title>Property Elements</title>
+ <listitem>
+ <para>
+ <emphasis>importer.<propertyname></emphasis>
+ </para>
+ <para>
+ Property to be used by the connector importer for the model for purposes
+ importing metadata. See possible property name/values in the
+ Translator specific section. Note that using these properties you
+ can narrow or widen the data elements available for integration.
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ </section>
+ <section>
+ <title>Translator Element</title>
+ <itemizedlist>
+ <title>Attributes</title>
+ <listitem>
+ <para>
+ <emphasis>name</emphasis>
+ </para>
+ <para>
+ The name of the the Translator. Referenced by the source element.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>type</emphasis>
+ </para>
+ <para>
+ The base type of the Translator. Can be one of the built-in types (ws,
+ file, ldap, oracle, sqlserver, db2, derby, etc.).
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <itemizedlist>
+ <title>Property Elements</title>
+ <listitem>
+ <para>
+ Set a value that overrides a translator default property. See
+ possible property name/values in the Translator specific section.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ </section>
+ <section>
+ <title>Multi-Source Models and VDB</title>
+ <para>
+ When you have multiple instances of data that are using identical schema
+ (horizontal sharding), Teiid can help you aggregate data across all the
+ instances, using "multi-source" models. In this scenario, instead of
+ creating/importing a model for every data source, user needs to define one
+ source model that represents the schema and configure multiple data "sources"
+ underneath it. During runtime, when a query issued against this model, the query
+ engine analyzes the information and gathers the required data from all the
+ sources configured and aggregates the results and provides in a single result set.
+ </para>
+
+ <para>
+ To mark a model as multi-source, the user needs to supply property called
+ <property>supports-multi-source-bindings</property>, in the "vdb.xml" file.
+ Also, the user needs to define multiple sources. Here is code example showing single model with
+ multiple sources defined.
+ </para>
+
+ <programlisting role="XML" language="XML"><![CDATA[<vdb name="vdbname" version="1">
+ <model visible="true" type="PHYSICAL" name="Customers" path="/Test/Customers.xmi">
+ <property name="supports-multi-source-bindings" value="true"/>
+ <source name="chicago"
+ translator-name="oracle" connection-jndi-name="chicago-customers"/>
+ <source name="newyork"
+ translator-name="oracle" connection-jndi-name="newyork-customers"/>
+ <source name="la"
+ translator-name="oracle" connection-jndi-name="la-customers"/>
+ </model>
+</vdb>]]></programlisting>
+
+ <para>
+ In the above example, the VDB defined has single model called <literal>Customers</literal>,
+ that has multiple sources (<literal>chicago</literal>, <literal>newyork</literal>,
+ and <literal>la</literal>) that define different instances of data. Every
+ time a model is marked as "multi-source", the
+ runtime engine adds a additional column called "SOURCE_NAME" to every table in
+ that model. This column maps to the source's name from the XML. In
+ the above XML code that would be <literal>chicago</literal>, <literal>la</literal>,
+ <literal>newyork</literal>. This allows queries like the following:
+ </para>
+
+ <programlisting language="SQL"><![CDATA[select * from table where SOURCE_NAME = 'newyork'
+update table column=value where SOURCE_NAME='chicago'
+delete from table where column = x and SOURCE_NAME='la']]></programlisting>
+
+ <para>
+ Note that when user do not supply the "SOURCE_NAME" in the criteria, it applies
+ to all the sources. Unfortunately Teiid currently does not support INSERT, this
+ planned for future releases. Another useful feature along with this feature is
+ "partial results" to skip unavailable sources if they are down.
+ </para>
+
+ <note>
+ <para>
+ Currently the tooling support for managing the multi-source feature is
+ limited, so if you need to use this feature build the VDB as usual in
+ the Teiid Designer and then edit the "vdb.xml" file in the VDB archive
+ using a Text editor to add the additional sources as defined above.
+ You must deploy a data source for each source defined.
+ </para>
+ </note>
+
+ </section>
+
</chapter>
\ No newline at end of file
Modified: trunk/engine/pom.xml
===================================================================
--- trunk/engine/pom.xml 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/pom.xml 2010-09-24 18:51:07 UTC (rev 2603)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
- <artifactId>teiid</artifactId>
+ <artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
<version>7.2.0.Alpha2-SNAPSHOT</version>
</parent>
Modified: trunk/engine/src/main/java/org/teiid/cache/Cache.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/cache/Cache.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/cache/Cache.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -22,15 +22,19 @@
package org.teiid.cache;
+import java.util.Set;
+
/**
* Abstraction over cache providers
*/
public interface Cache<K, V> {
- public enum Type {SESSION("Session"), //$NON-NLS-1$
- RESULTSET("ResultSet"), //$NON-NLS-1$
- RESULTSET_BATCHES(RESULTSET, "batches"), //$NON-NLS-1$
- PREPAREDPLAN("PreparaedPlan"); //$NON-NLS-1$
+ public enum Type {
+ MATTABLES("MatTables"), //$NON-NLS-1$
+ MATTABLEUPDATES("MatTableUpdates"), //$NON-NLS-1$
+ RESULTSET("ResultSet"), //$NON-NLS-1$
+ RESULTSET_BATCHES(RESULTSET, "batches"), //$NON-NLS-1$
+ PREPAREDPLAN("PreparaedPlan"); //$NON-NLS-1$
private String location;
@@ -94,4 +98,10 @@
* @return
*/
String getName();
+
+ /**
+ * Return all the keys
+ * @return
+ */
+ Set<K> keys();
}
Modified: trunk/engine/src/main/java/org/teiid/cache/CacheFactory.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/cache/CacheFactory.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/cache/CacheFactory.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -36,4 +36,10 @@
* Destroy the cache factory and any caches underneath.
*/
void destroy();
+
+ /**
+ * Return true if replicated caches are created by this factory
+ * @return
+ */
+ boolean isReplicated();
}
Modified: trunk/engine/src/main/java/org/teiid/cache/DefaultCache.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/cache/DefaultCache.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/cache/DefaultCache.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -217,5 +217,10 @@
public String getName() {
return name;
}
+
+ @Override
+ public Set<K> keys() {
+ return map.keySet();
+ }
}
\ No newline at end of file
Modified: trunk/engine/src/main/java/org/teiid/cache/DefaultCacheFactory.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/cache/DefaultCacheFactory.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/cache/DefaultCacheFactory.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -49,9 +49,13 @@
@Override
public <K, V> Cache<K, V> get(Type type, CacheConfiguration config) {
if (!destroyed) {
- Cache node = cacheRoot.addChild(type.location());
- return node;
+ return cacheRoot.addChild(type.location());
}
throw new TeiidRuntimeException("Cache system has been shutdown"); //$NON-NLS-1$
}
+
+ @Override
+ public boolean isReplicated() {
+ return false;
+ }
}
Modified: trunk/engine/src/main/java/org/teiid/common/buffer/LobManager.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/common/buffer/LobManager.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/common/buffer/LobManager.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -30,7 +30,7 @@
import org.teiid.core.TeiidComponentException;
import org.teiid.core.types.DataTypeManager;
import org.teiid.core.types.Streamable;
-import org.teiid.dqp.DQPPlugin;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.sql.symbol.Expression;
/**
@@ -64,7 +64,7 @@
lob = this.lobReferences.get(id);
}
if (lob == null) {
- throw new TeiidComponentException(DQPPlugin.Util.getString("ProcessWorker.wrongdata")); //$NON-NLS-1$
+ throw new TeiidComponentException(QueryPlugin.Util.getString("ProcessWorker.wrongdata")); //$NON-NLS-1$
}
return lob;
}
Modified: trunk/engine/src/main/java/org/teiid/common/buffer/TupleBuffer.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/common/buffer/TupleBuffer.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/common/buffer/TupleBuffer.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -32,10 +32,10 @@
import org.teiid.core.types.DataTypeManager;
import org.teiid.core.types.Streamable;
import org.teiid.core.util.Assertion;
-import org.teiid.dqp.DQPPlugin;
import org.teiid.logging.LogConstants;
import org.teiid.logging.LogManager;
import org.teiid.logging.MessageLevel;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.sql.symbol.Expression;
@@ -259,7 +259,7 @@
public Streamable<?> getLobReference(String id) throws TeiidComponentException {
if (lobManager == null) {
- throw new TeiidComponentException(DQPPlugin.Util.getString("ProcessWorker.wrongdata")); //$NON-NLS-1$
+ throw new TeiidComponentException(QueryPlugin.Util.getString("ProcessWorker.wrongdata")); //$NON-NLS-1$
}
return lobManager.getLobReference(id);
}
Modified: trunk/engine/src/main/java/org/teiid/common/buffer/impl/BufferManagerImpl.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/common/buffer/impl/BufferManagerImpl.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/common/buffer/impl/BufferManagerImpl.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -63,7 +63,7 @@
import org.teiid.core.util.Assertion;
import org.teiid.logging.LogConstants;
import org.teiid.logging.LogManager;
-import org.teiid.query.execution.QueryExecPlugin;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.processor.relational.ListNestedSortComparator;
@@ -291,9 +291,9 @@
}
return batch;
} catch(IOException e) {
- throw new TeiidComponentException(e, QueryExecPlugin.Util.getString("FileStoreageManager.error_reading", batchManager.id)); //$NON-NLS-1$
+ throw new TeiidComponentException(e, QueryPlugin.Util.getString("FileStoreageManager.error_reading", batchManager.id)); //$NON-NLS-1$
} catch (ClassNotFoundException e) {
- throw new TeiidComponentException(e, QueryExecPlugin.Util.getString("FileStoreageManager.error_reading", batchManager.id)); //$NON-NLS-1$
+ throw new TeiidComponentException(e, QueryPlugin.Util.getString("FileStoreageManager.error_reading", batchManager.id)); //$NON-NLS-1$
} finally {
this.batchManager.compactionLock.readLock().unlock();
}
Modified: trunk/engine/src/main/java/org/teiid/common/buffer/impl/FileStorageManager.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/common/buffer/impl/FileStorageManager.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/common/buffer/impl/FileStorageManager.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -38,7 +38,7 @@
import org.teiid.core.util.Assertion;
import org.teiid.logging.LogManager;
import org.teiid.logging.MessageLevel;
-import org.teiid.query.execution.QueryExecPlugin;
+import org.teiid.query.QueryPlugin;
/**
@@ -116,7 +116,7 @@
fileAccess.seek(fileOffset - entry.getKey());
return fileAccess.read(b, offSet, length);
} catch (IOException e) {
- throw new TeiidComponentException(e, QueryExecPlugin.Util.getString("FileStoreageManager.error_reading", fileInfo.file.getAbsoluteFile())); //$NON-NLS-1$
+ throw new TeiidComponentException(e, QueryPlugin.Util.getString("FileStoreageManager.error_reading", fileInfo.file.getAbsoluteFile())); //$NON-NLS-1$
} finally {
fileInfo.close();
}
@@ -130,7 +130,7 @@
long used = usedBufferSpace.addAndGet(length);
if (used > maxBufferSpace) {
usedBufferSpace.addAndGet(-length);
- throw new TeiidComponentException(QueryExecPlugin.Util.getString("FileStoreageManager.space_exhausted", maxBufferSpace)); //$NON-NLS-1$
+ throw new TeiidComponentException(QueryPlugin.Util.getString("FileStoreageManager.space_exhausted", maxBufferSpace)); //$NON-NLS-1$
}
Map.Entry<Long, FileInfo> entry = this.storageFiles.lastEntry();
boolean createNew = false;
@@ -159,7 +159,7 @@
fileAccess.seek(pointer);
fileAccess.write(bytes, offset, length);
} catch(IOException e) {
- throw new TeiidComponentException(e, QueryExecPlugin.Util.getString("FileStoreageManager.error_reading", fileInfo.file.getAbsoluteFile())); //$NON-NLS-1$
+ throw new TeiidComponentException(e, QueryPlugin.Util.getString("FileStoreageManager.error_reading", fileInfo.file.getAbsoluteFile())); //$NON-NLS-1$
} finally {
fileInfo.close();
}
@@ -202,17 +202,17 @@
*/
public void initialize() throws TeiidComponentException {
if(this.directory == null) {
- throw new TeiidComponentException(QueryExecPlugin.Util.getString("FileStoreageManager.no_directory")); //$NON-NLS-1$
+ throw new TeiidComponentException(QueryPlugin.Util.getString("FileStoreageManager.no_directory")); //$NON-NLS-1$
}
dirFile = new File(this.directory);
if(dirFile.exists()) {
if(! dirFile.isDirectory()) {
- throw new TeiidComponentException(QueryExecPlugin.Util.getString("FileStoreageManager.not_a_directory", dirFile.getAbsoluteFile())); //$NON-NLS-1$
+ throw new TeiidComponentException(QueryPlugin.Util.getString("FileStoreageManager.not_a_directory", dirFile.getAbsoluteFile())); //$NON-NLS-1$
}
} else if(! dirFile.mkdirs()) {
- throw new TeiidComponentException(QueryExecPlugin.Util.getString("FileStoreageManager.error_creating", dirFile.getAbsoluteFile())); //$NON-NLS-1$
+ throw new TeiidComponentException(QueryPlugin.Util.getString("FileStoreageManager.error_creating", dirFile.getAbsoluteFile())); //$NON-NLS-1$
}
}
@@ -240,7 +240,7 @@
}
return storageFile;
} catch(IOException e) {
- throw new TeiidComponentException(e, QueryExecPlugin.Util.getString("FileStoreageManager.error_creating", name + "_" + fileNumber)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new TeiidComponentException(e, QueryPlugin.Util.getString("FileStoreageManager.error_creating", name + "_" + fileNumber)); //$NON-NLS-1$ //$NON-NLS-2$
}
}
Deleted: trunk/engine/src/main/java/org/teiid/dqp/DQPPlugin.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/DQPPlugin.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/dqp/DQPPlugin.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -1,39 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package org.teiid.dqp;
-
-import java.util.ResourceBundle;
-
-import org.teiid.core.BundleUtil;
-
-
-/**
- * DQPPlugin
- */
-public class DQPPlugin {
-
- public static final String PLUGIN_ID = DQPPlugin.class.getPackage().getName();
- public static final BundleUtil Util = new BundleUtil(PLUGIN_ID,
- PLUGIN_ID + ".i18n", ResourceBundle.getBundle(PLUGIN_ID + ".i18n")); //$NON-NLS-1$ //$NON-NLS-2$
-
-}
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/ConnectorManager.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/ConnectorManager.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/ConnectorManager.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -33,10 +33,10 @@
import javax.naming.InitialContext;
import javax.naming.NamingException;
+import javax.resource.ResourceException;
import org.teiid.core.TeiidComponentException;
import org.teiid.core.util.Assertion;
-import org.teiid.dqp.DQPPlugin;
import org.teiid.dqp.message.AtomicRequestID;
import org.teiid.dqp.message.AtomicRequestMessage;
import org.teiid.logging.CommandLogMessage;
@@ -47,10 +47,12 @@
import org.teiid.metadata.Datatype;
import org.teiid.metadata.MetadataFactory;
import org.teiid.metadata.MetadataStore;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.optimizer.capabilities.BasicSourceCapabilities;
import org.teiid.query.optimizer.capabilities.SourceCapabilities;
import org.teiid.query.optimizer.capabilities.SourceCapabilities.Scope;
import org.teiid.query.sql.lang.Command;
+import org.teiid.resource.spi.WrappedConnection;
import org.teiid.translator.ExecutionContext;
import org.teiid.translator.ExecutionFactory;
import org.teiid.translator.TranslatorException;
@@ -86,14 +88,21 @@
if(ef != null) {
if (ef.isSourceRequired()) {
- Object conn = getConnectionFactory();
+
+ Object conn = null;
+ try {
+ conn = getConnectionFactory();
+ } catch (TranslatorException e) {
+ // treat this as connection not found.
+ }
+
if (conn == null) {
- sb.append(DQPPlugin.Util.getString("datasource_not_found", this.connectionName)); //$NON-NLS-1$
+ sb.append(QueryPlugin.Util.getString("datasource_not_found", this.connectionName)); //$NON-NLS-1$
}
}
}
else {
- sb.append(DQPPlugin.Util.getString("translator_not_found", this.translatorName)); //$NON-NLS-1$
+ sb.append(QueryPlugin.Util.getString("translator_not_found", this.translatorName)); //$NON-NLS-1$
}
return sb.toString();
}
@@ -102,8 +111,18 @@
MetadataFactory factory = new MetadataFactory(modelName, datatypes, importProperties);
Object connectionFactory = getConnectionFactory();
Object connection = executionFactory.getConnection(connectionFactory);
+ Object unwrapped = null;
+
+ if (connection instanceof WrappedConnection) {
+ try {
+ unwrapped = ((WrappedConnection)connection).unwrap();
+ } catch (ResourceException e) {
+ throw new TranslatorException(QueryPlugin.Util.getString("failed_to_unwrap_connection")); //$NON-NLS-1$
+ }
+ }
+
try {
- executionFactory.getMetadata(factory, connection);
+ executionFactory.getMetadata(factory, (unwrapped == null) ? connection:unwrapped);
} finally {
executionFactory.closeConnection(connection, connectionFactory);
}
@@ -124,7 +143,6 @@
}
public ConnectorWork registerRequest(AtomicRequestMessage message) throws TeiidComponentException {
- // Set the connector ID to be used; if not already set.
checkStatus();
AtomicRequestID atomicRequestId = message.getAtomicRequestID();
LogManager.logDetail(LogConstants.CTX_CONNECTOR, new Object[] {atomicRequestId, "Create State"}); //$NON-NLS-1$
@@ -144,7 +162,7 @@
*/
void removeState(AtomicRequestID id) {
LogManager.logDetail(LogConstants.CTX_CONNECTOR, new Object[] {id, "Remove State"}); //$NON-NLS-1$
- ConnectorWorkItem cwi = requestStates.remove(id);
+ requestStates.remove(id);
}
int size() {
@@ -156,7 +174,7 @@
* @throws TranslatorException
*/
public void start() {
- LogManager.logDetail(LogConstants.CTX_CONNECTOR, DQPPlugin.Util.getString("ConnectorManagerImpl.Initializing_connector", translatorName)); //$NON-NLS-1$
+ LogManager.logDetail(LogConstants.CTX_CONNECTOR, QueryPlugin.Util.getString("ConnectorManagerImpl.Initializing_connector", translatorName)); //$NON-NLS-1$
}
/**
@@ -221,7 +239,7 @@
* Get the ConnectionFactory object required by this manager
* @return
*/
- protected Object getConnectionFactory() {
+ protected Object getConnectionFactory() throws TranslatorException {
if (this.connectionName != null) {
String jndiName = this.connectionName;
if (!this.connectionName.startsWith(JAVA_CONTEXT)) {
@@ -238,14 +256,15 @@
}
}
} catch (NamingException e) {
- }
+ throw new TranslatorException(e, QueryPlugin.Util.getString("connection_factory_not_found", this.connectionName)); //$NON-NLS-1$
+ }
}
return null;
}
private void checkStatus() throws TeiidComponentException {
if (stopped) {
- throw new TeiidComponentException(DQPPlugin.Util.getString("ConnectorManager.not_in_valid_state", this.translatorName)); //$NON-NLS-1$
+ throw new TeiidComponentException(QueryPlugin.Util.getString("ConnectorManager.not_in_valid_state", this.translatorName)); //$NON-NLS-1$
}
}
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/ConnectorWorkItem.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/ConnectorWorkItem.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/ConnectorWorkItem.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -27,12 +27,13 @@
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
+import javax.resource.ResourceException;
+
import org.teiid.adminapi.impl.VDBMetaData;
import org.teiid.common.buffer.BlockedException;
import org.teiid.common.buffer.TupleBuffer;
import org.teiid.core.TeiidProcessingException;
import org.teiid.core.util.Assertion;
-import org.teiid.dqp.DQPPlugin;
import org.teiid.dqp.message.AtomicRequestID;
import org.teiid.dqp.message.AtomicRequestMessage;
import org.teiid.dqp.message.AtomicResultsMessage;
@@ -42,11 +43,13 @@
import org.teiid.logging.LogManager;
import org.teiid.logging.CommandLogMessage.Event;
import org.teiid.metadata.RuntimeMetadata;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.metadata.QueryMetadataInterface;
import org.teiid.query.metadata.TempMetadataAdapter;
import org.teiid.query.metadata.TempMetadataStore;
import org.teiid.query.sql.lang.Command;
import org.teiid.query.sql.lang.StoredProcedure;
+import org.teiid.resource.spi.WrappedConnection;
import org.teiid.translator.DataNotAvailableException;
import org.teiid.translator.Execution;
import org.teiid.translator.ExecutionFactory;
@@ -117,10 +120,10 @@
if(execution != null) {
execution.cancel();
}
- LogManager.logDetail(LogConstants.CTX_CONNECTOR, DQPPlugin.Util.getString("DQPCore.The_atomic_request_has_been_cancelled", this.id)); //$NON-NLS-1$
+ LogManager.logDetail(LogConstants.CTX_CONNECTOR, QueryPlugin.Util.getString("DQPCore.The_atomic_request_has_been_cancelled", this.id)); //$NON-NLS-1$
}
} catch (TranslatorException e) {
- LogManager.logWarning(LogConstants.CTX_CONNECTOR, e, DQPPlugin.Util.getString("Cancel_request_failed", this.id)); //$NON-NLS-1$
+ LogManager.logWarning(LogConstants.CTX_CONNECTOR, e, QueryPlugin.Util.getString("Cancel_request_failed", this.id)); //$NON-NLS-1$
}
}
@@ -167,7 +170,7 @@
}
manager.logSRCCommand(this.requestMsg, this.securityContext, Event.ERROR, null);
- String msg = DQPPlugin.Util.getString("ConnectorWorker.process_failed", this.id); //$NON-NLS-1$
+ String msg = QueryPlugin.Util.getString("ConnectorWorker.process_failed", this.id); //$NON-NLS-1$
if (isCancelled.get()) {
LogManager.logDetail(LogConstants.CTX_CONNECTOR, msg);
} else if (t instanceof TranslatorException || t instanceof TeiidProcessingException) {
@@ -193,6 +196,16 @@
try {
this.connectionFactory = this.manager.getConnectionFactory();
this.connection = this.connector.getConnection(this.connectionFactory);
+
+ Object unwrapped = null;
+ if (connection instanceof WrappedConnection) {
+ try {
+ unwrapped = ((WrappedConnection)connection).unwrap();
+ } catch (ResourceException e) {
+ throw new TranslatorException(QueryPlugin.Util.getString("failed_to_unwrap_connection")); //$NON-NLS-1$
+ }
+ }
+
// Translate the command
Command command = this.requestMsg.getCommand();
this.expectedColumns = command.getProjectedSymbols().size();
@@ -202,7 +215,7 @@
RuntimeMetadata rmd = new RuntimeMetadataImpl(queryMetadata);
// Create the execution based on mode
- final Execution exec = connector.createExecution(this.translatedCommand, this.securityContext, rmd, this.connection);
+ final Execution exec = connector.createExecution(this.translatedCommand, this.securityContext, rmd, (unwrapped == null) ? this.connection:unwrapped);
if (this.translatedCommand instanceof Call) {
this.execution = Assertion.isInstanceOf(exec, ProcedureExecution.class, "Call Executions are expected to be ProcedureExecutions"); //$NON-NLS-1$
StoredProcedure proc = (StoredProcedure)command;
@@ -287,7 +300,7 @@
this.lastBatch = true;
break;
} else if (this.rowCount > this.requestMsg.getMaxResultRows() && this.requestMsg.isExceptionOnMaxRows()) {
- String msg = DQPPlugin.Util.getString("ConnectorWorker.MaxResultRowsExceed", this.requestMsg.getMaxResultRows()); //$NON-NLS-1$
+ String msg = QueryPlugin.Util.getString("ConnectorWorker.MaxResultRowsExceed", this.requestMsg.getMaxResultRows()); //$NON-NLS-1$
throw new TranslatorException(msg);
}
}
@@ -313,7 +326,7 @@
if ( !lastBatch && currentRowCount == 0 ) {
// Defect 13366 - Should send all batches, even if they're zero size.
// Log warning if received a zero-size non-last batch from the connector.
- LogManager.logWarning(LogConstants.CTX_CONNECTOR, DQPPlugin.Util.getString("ConnectorWorker.zero_size_non_last_batch", requestMsg.getConnectorName())); //$NON-NLS-1$
+ LogManager.logWarning(LogConstants.CTX_CONNECTOR, QueryPlugin.Util.getString("ConnectorWorker.zero_size_non_last_batch", requestMsg.getConnectorName())); //$NON-NLS-1$
}
AtomicResultsMessage response = createResultsMessage(rows.toArray(new List[currentRowCount]), requestMsg.getCommand().getProjectedSymbols());
@@ -322,6 +335,7 @@
response.setSupportsImplicitClose(!this.securityContext.keepExecutionAlive());
response.setTransactional(this.securityContext.isTransactional());
response.setWarnings(this.securityContext.getWarnings());
+ response.setSupportsCloseWithLobs(this.connector.areLobsUsableAfterClose());
if ( lastBatch ) {
response.setFinalRow(rowCount);
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/ProcedureBatchHandler.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/ProcedureBatchHandler.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/ProcedureBatchHandler.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -30,12 +30,12 @@
import java.util.Collections;
import java.util.List;
-import org.teiid.dqp.DQPPlugin;
import org.teiid.language.Argument;
import org.teiid.language.Call;
import org.teiid.language.Argument.Direction;
+import org.teiid.query.QueryPlugin;
+import org.teiid.translator.ProcedureExecution;
import org.teiid.translator.TranslatorException;
-import org.teiid.translator.ProcedureExecution;
class ProcedureBatchHandler {
@@ -67,7 +67,7 @@
List padRow(List row) throws TranslatorException {
if (row.size() != resultSetCols) {
- throw new TranslatorException(DQPPlugin.Util.getString("ConnectorWorker.ConnectorWorker_result_set_unexpected_columns", new Object[] {proc, new Integer(resultSetCols), new Integer(row.size())})); //$NON-NLS-1$
+ throw new TranslatorException(QueryPlugin.Util.getString("ConnectorWorker.ConnectorWorker_result_set_unexpected_columns", new Object[] {proc, new Integer(resultSetCols), new Integer(row.size())})); //$NON-NLS-1$
}
if (paramCols == 0) {
return row;
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/AuthorizationValidationVisitor.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/AuthorizationValidationVisitor.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/AuthorizationValidationVisitor.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -25,7 +25,6 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
-import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
@@ -37,14 +36,15 @@
import org.teiid.adminapi.DataPolicy;
import org.teiid.adminapi.impl.DataPolicyMetadata;
import org.teiid.api.exception.query.QueryMetadataException;
+import org.teiid.core.CoreConstants;
import org.teiid.core.TeiidComponentException;
import org.teiid.core.TeiidProcessingException;
-import org.teiid.dqp.DQPPlugin;
import org.teiid.dqp.internal.process.multisource.MultiSourceElement;
import org.teiid.logging.AuditMessage;
import org.teiid.logging.LogConstants;
import org.teiid.logging.LogManager;
import org.teiid.logging.MessageLevel;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.function.FunctionLibrary;
import org.teiid.query.metadata.TempMetadataID;
import org.teiid.query.resolver.util.ResolverUtil;
@@ -242,6 +242,11 @@
}
}
fullName = getMetadata().getFullName(metadataID);
+ Object modelId = getMetadata().getModelID(metadataID);
+ String modelName = getMetadata().getFullName(modelId);
+ if (CoreConstants.SYSTEM_MODEL.equals(modelName) || CoreConstants.ODBC_MODEL.equals(modelName)) {
+ continue;
+ }
nameToSymbolMap.put(fullName, symbol);
} catch(QueryMetadataException e) {
handleException(e);
@@ -262,7 +267,7 @@
// is not authorized in the exception message
handleValidationError(
- DQPPlugin.Util.getString("ERR.018.005.0095", new Object[]{DQPWorkContext.getWorkContext().getSessionId(), getActionLabel(actionCode)}), //$NON-NLS-1$
+ QueryPlugin.Util.getString("ERR.018.005.0095", userName, getActionLabel(actionCode)), //$NON-NLS-1$
inaccessibleSymbols);
}
}
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/CachedFinder.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/CachedFinder.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/CachedFinder.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -30,9 +30,9 @@
import org.teiid.core.CoreConstants;
import org.teiid.core.TeiidComponentException;
import org.teiid.core.TeiidRuntimeException;
-import org.teiid.dqp.DQPPlugin;
import org.teiid.dqp.internal.datamgr.ConnectorManager;
import org.teiid.dqp.internal.datamgr.ConnectorManagerRepository;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.optimizer.capabilities.BasicSourceCapabilities;
import org.teiid.query.optimizer.capabilities.CapabilitiesFinder;
import org.teiid.query.optimizer.capabilities.SourceCapabilities;
@@ -59,6 +59,7 @@
this.vdb = vdb;
userCache.put(CoreConstants.SYSTEM_MODEL, SYSTEM_CAPS);
userCache.put(CoreConstants.ODBC_MODEL, SYSTEM_CAPS);
+ userCache.put(CoreConstants.SYSTEM_ADMIN_MODEL, SYSTEM_CAPS);
}
/**
@@ -75,7 +76,7 @@
try {
ConnectorManager mgr = this.connectorRepo.getConnectorManager(sourceName);
if (mgr == null) {
- throw new TranslatorException(DQPPlugin.Util.getString("CachedFinder.no_connector_found", sourceName, modelName, sourceName)); //$NON-NLS-1$
+ throw new TranslatorException(QueryPlugin.Util.getString("CachedFinder.no_connector_found", sourceName, modelName, sourceName)); //$NON-NLS-1$
}
caps = mgr.getCapabilities();
break;
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/CachedResults.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/CachedResults.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/CachedResults.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -37,9 +37,9 @@
import org.teiid.core.TeiidComponentException;
import org.teiid.core.types.DataTypeManager;
import org.teiid.core.util.Assertion;
-import org.teiid.dqp.DQPPlugin;
import org.teiid.logging.LogConstants;
import org.teiid.logging.LogManager;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.analysis.AnalysisRecord;
import org.teiid.query.metadata.QueryMetadataInterface;
import org.teiid.query.parser.ParseInfo;
@@ -143,7 +143,7 @@
}
return true;
} catch (TeiidComponentException e) {
- LogManager.logDetail(LogConstants.CTX_DQP, DQPPlugin.Util.getString("not_found_cache")); //$NON-NLS-1$
+ LogManager.logDetail(LogConstants.CTX_DQP, QueryPlugin.Util.getString("not_found_cache")); //$NON-NLS-1$
}
return false;
}
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -61,7 +61,6 @@
import org.teiid.core.TeiidComponentException;
import org.teiid.core.TeiidProcessingException;
import org.teiid.core.types.Streamable;
-import org.teiid.dqp.DQPPlugin;
import org.teiid.dqp.internal.process.ThreadReuseExecutor.PrioritizedRunnable;
import org.teiid.dqp.message.AtomicRequestMessage;
import org.teiid.dqp.message.RequestID;
@@ -74,6 +73,7 @@
import org.teiid.logging.LogManager;
import org.teiid.logging.MessageLevel;
import org.teiid.logging.CommandLogMessage.Event;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.processor.ProcessorDataManager;
import org.teiid.query.tempdata.TempTableDataManager;
import org.teiid.query.tempdata.TempTableStore;
@@ -211,6 +211,8 @@
private int currentlyActivePlans;
private LinkedList<RequestWorkItem> waitingPlans = new LinkedList<RequestWorkItem>();
private CacheFactory cacheFactory;
+
+ private SessionAwareCache<CachedResults> matTables;
/**
* perform a full shutdown and wait for 10 seconds for all threads to finish
@@ -461,7 +463,7 @@
RequestWorkItem getRequestWorkItem(RequestID reqID) throws TeiidProcessingException {
RequestWorkItem result = this.requests.get(reqID);
if (result == null) {
- throw new TeiidProcessingException(DQPPlugin.Util.getString("DQPCore.The_request_has_been_closed.", reqID));//$NON-NLS-1$
+ throw new TeiidProcessingException(QueryPlugin.Util.getString("DQPCore.The_request_has_been_closed.", reqID));//$NON-NLS-1$
}
return result;
}
@@ -514,7 +516,7 @@
if (markCancelled) {
logMMCommand(workItem, Event.CANCEL, null);
} else {
- LogManager.logDetail(LogConstants.CTX_DQP, DQPPlugin.Util.getString("DQPCore.failed_to_cancel")); //$NON-NLS-1$
+ LogManager.logDetail(LogConstants.CTX_DQP, QueryPlugin.Util.getString("DQPCore.failed_to_cancel")); //$NON-NLS-1$
}
return markCancelled;
}
@@ -544,7 +546,7 @@
}
private void clearPlanCache(){
- LogManager.logInfo(LogConstants.CTX_DQP, DQPPlugin.Util.getString("DQPCore.Clearing_prepared_plan_cache")); //$NON-NLS-1$
+ LogManager.logInfo(LogConstants.CTX_DQP, QueryPlugin.Util.getString("DQPCore.Clearing_prepared_plan_cache")); //$NON-NLS-1$
this.prepPlanCache.clearAll();
}
@@ -555,6 +557,18 @@
}
}
+ private void clearPlanCache(String vdbName, int version){
+ LogManager.logInfo(LogConstants.CTX_DQP, QueryPlugin.Util.getString("DQPCore.Clearing_prepared_plan_cache")); //$NON-NLS-1$
+ this.prepPlanCache.clearForVDB(vdbName, version);
+ }
+
+ private void clearResultSetCache(String vdbName, int version) {
+ //clear cache in server
+ if(rsCache != null){
+ rsCache.clearForVDB(vdbName, version);
+ }
+ }
+
public CacheStatisticsMetadata getCacheStatistics(String cacheType) {
if (cacheType.equalsIgnoreCase(Admin.Cache.PREPARED_PLAN_CACHE.toString())) {
return buildCacheStats(Admin.Cache.PREPARED_PLAN_CACHE.toString(), this.prepPlanCache);
@@ -592,6 +606,21 @@
break;
}
}
+
+ public void clearCache(String cacheType, String vdbName, int version) {
+ Admin.Cache cache = Admin.Cache.valueOf(cacheType);
+ switch (cache) {
+ case PREPARED_PLAN_CACHE:
+ clearPlanCache(vdbName, version);
+ break;
+ case QUERY_SERVICE_RESULT_SET_CACHE:
+ clearResultSetCache(vdbName, version);
+ break;
+ }
+ if (this.matTables != null) {
+ this.matTables.clearForVDB(vdbName, version);
+ }
+ }
public Collection<org.teiid.adminapi.Transaction> getTransactions() {
return this.transactionService.getTransactions();
@@ -676,8 +705,12 @@
this.processWorkerPool = new ThreadReuseExecutor(DQPConfiguration.PROCESS_PLAN_QUEUE_NAME, config.getMaxThreads());
+ if (cacheFactory.isReplicated()) {
+ matTables = new SessionAwareCache<CachedResults>();
+ }
+
dataTierMgr = new TempTableDataManager(new DataTierManagerImpl(this,
- this.bufferService), this.bufferManager, this.processWorkerPool, this.rsCache);
+ this.bufferService), this.bufferManager, this.processWorkerPool, this.rsCache, matTables, this.cacheFactory);
}
public void setBufferService(BufferService service) {
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPWorkContext.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPWorkContext.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPWorkContext.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -82,6 +82,7 @@
public void setSession(SessionMetadata session) {
this.session = session;
+ this.policies = null;
}
public void setSecurityHelper(SecurityHelper securityHelper) {
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/DataTierManagerImpl.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/DataTierManagerImpl.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/DataTierManagerImpl.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -43,14 +43,11 @@
import org.teiid.core.CoreConstants;
import org.teiid.core.TeiidComponentException;
import org.teiid.core.TeiidProcessingException;
-import org.teiid.core.types.BlobImpl;
import org.teiid.core.types.BlobType;
-import org.teiid.core.types.ClobImpl;
-import org.teiid.core.types.ClobType;
import org.teiid.core.types.SQLXMLImpl;
import org.teiid.core.types.XMLType;
import org.teiid.core.util.Assertion;
-import org.teiid.dqp.DQPPlugin;
+import org.teiid.core.util.StringUtil;
import org.teiid.dqp.internal.datamgr.ConnectorManager;
import org.teiid.dqp.internal.datamgr.ConnectorManagerRepository;
import org.teiid.dqp.internal.datamgr.ConnectorWork;
@@ -66,6 +63,7 @@
import org.teiid.metadata.ProcedureParameter;
import org.teiid.metadata.Schema;
import org.teiid.metadata.Table;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.metadata.CompositeMetadataStore;
import org.teiid.query.metadata.TempMetadataID;
import org.teiid.query.metadata.TransformationMetadata;
@@ -99,14 +97,15 @@
KEYCOLUMNS,
PROCEDUREPARAMS,
REFERENCEKEYCOLUMNS,
- PROPERTIES,
- MATVIEWS
+ PROPERTIES
}
+ private enum SystemAdminTables {
+ MATVIEWS,
+ VDBRESOURCES
+ }
+
private enum SystemProcs {
- GETCHARACTERVDBRESOURCE,
- GETBINARYVDBRESOURCE,
- GETVDBRESOURCEPATHS,
GETXMLSCHEMAS
}
@@ -122,7 +121,7 @@
public TupleSource registerRequest(CommandContext context, Command command, String modelName, String connectorBindingId, int nodeID) throws TeiidComponentException, TeiidProcessingException {
RequestWorkItem workItem = requestMgr.getRequestWorkItem((RequestID)context.getProcessorID());
- if(CoreConstants.SYSTEM_MODEL.equals(modelName)) {
+ if(CoreConstants.SYSTEM_MODEL.equals(modelName) || CoreConstants.SYSTEM_ADMIN_MODEL.equals(modelName)) {
return processSystemQuery(context, command, workItem.getDqpWorkContext());
}
@@ -147,12 +146,58 @@
int vdbVersion = workContext.getVdbVersion();
VDBMetaData vdb = workContext.getVDB();
CompositeMetadataStore metadata = vdb.getAttachment(TransformationMetadata.class).getMetadataStore();
+ TransformationMetadata indexMetadata = vdb.getAttachment(TransformationMetadata.class);
Collection rows = new ArrayList();
int oid = 0;
if (command instanceof Query) {
Query query = (Query)command;
UnaryFromClause ufc = (UnaryFromClause)query.getFrom().getClauses().get(0);
GroupSymbol group = ufc.getGroup();
+ if (StringUtil.startsWithIgnoreCase(group.getNonCorrelationName(), (CoreConstants.SYSTEM_ADMIN_MODEL))) {
+ final SystemAdminTables sysTable = SystemAdminTables.valueOf(group.getNonCorrelationName().substring(CoreConstants.SYSTEM_ADMIN_MODEL.length() + 1).toUpperCase());
+ switch (sysTable) {
+ case MATVIEWS:
+ for (Schema schema : getVisibleSchemas(vdb, metadata)) {
+ for (Table table : schema.getTables().values()) {
+ if (!table.isMaterialized()) {
+ continue;
+ }
+ String targetSchema = null;
+ String matTableName = null;
+ String state = null;
+ Timestamp updated = null;
+ Integer cardinaltity = null;
+ Boolean valid = null;
+ if (table.getMaterializedTable() == null) {
+ TempTableStore globalStore = context.getGlobalTableStore();
+ matTableName = RelationalPlanner.MAT_PREFIX+table.getFullName().toUpperCase();
+ MatTableInfo info = globalStore.getMatTableInfo(matTableName);
+ valid = info.isValid();
+ state = info.getState().name();
+ updated = info.getUpdateTime()==-1?null:new Timestamp(info.getUpdateTime());
+ TempMetadataID id = globalStore.getMetadataStore().getTempGroupID(matTableName);
+ if (id != null) {
+ cardinaltity = id.getCardinality();
+ }
+ //ttl, pref_mem - not part of proper metadata
+ } else {
+ Table t = table.getMaterializedTable();
+ matTableName = t.getName();
+ targetSchema = t.getParent().getName();
+ }
+ rows.add(Arrays.asList(vdbName, schema.getName(), table.getName(), targetSchema, matTableName, valid, state, updated, cardinaltity));
+ }
+ }
+ break;
+ case VDBRESOURCES:
+ String[] filePaths = indexMetadata.getVDBResourcePaths();
+ for (String filePath : filePaths) {
+ rows.add(Arrays.asList(filePath, new BlobType(indexMetadata.getVDBResourceAsBlob(filePath))));
+ }
+ break;
+ }
+ return new CollectionTupleSource(rows.iterator());
+ }
final SystemTables sysTable = SystemTables.valueOf(group.getNonCorrelationName().substring(CoreConstants.SYSTEM_MODEL.length() + 1).toUpperCase());
switch (sysTable) {
case DATATYPES:
@@ -263,65 +308,15 @@
}
}
break;
- case MATVIEWS:
- if (!table.isMaterialized()) {
- continue;
- }
- String targetSchema = null;
- String matTableName = null;
- String state = null;
- Timestamp updated = null;
- Integer cardinaltity = null;
- Boolean valid = null;
- if (table.getMaterializedTable() == null) {
- TempTableStore globalStore = context.getGlobalTableStore();
- matTableName = RelationalPlanner.MAT_PREFIX+table.getFullName().toUpperCase();
- MatTableInfo info = globalStore.getMatTableInfo(matTableName);
- valid = info.isValid();
- state = info.getState().name();
- updated = info.getUpdateTime()==-1?null:new Timestamp(info.getUpdateTime());
- TempMetadataID id = globalStore.getMetadataStore().getTempGroupID(matTableName);
- if (id != null) {
- cardinaltity = id.getCardinality();
- }
- //ttl, pref_mem - not part of proper metadata
- } else {
- Table t = table.getMaterializedTable();
- matTableName = t.getName();
- targetSchema = t.getParent().getName();
- }
- rows.add(Arrays.asList(vdbName, schema.getName(), table.getName(), targetSchema, matTableName, valid, state, updated, cardinaltity));
- break;
}
}
}
break;
}
} else {
- TransformationMetadata indexMetadata = vdb.getAttachment(TransformationMetadata.class);
StoredProcedure proc = (StoredProcedure)command;
final SystemProcs sysTable = SystemProcs.valueOf(proc.getProcedureCallableName().substring(CoreConstants.SYSTEM_MODEL.length() + 1).toUpperCase());
switch (sysTable) {
- case GETVDBRESOURCEPATHS:
- String[] filePaths = indexMetadata.getVDBResourcePaths();
- for (String filePath : filePaths) {
- rows.add(Arrays.asList(filePath, filePath.endsWith(".INDEX"))); //$NON-NLS-1$
- }
- break;
- case GETBINARYVDBRESOURCE:
- String filePath = (String)((Constant)proc.getParameter(1).getExpression()).getValue();
- BlobImpl contents = indexMetadata.getVDBResourceAsBlob(filePath);
- if (contents != null) {
- rows.add(Arrays.asList(new BlobType(contents)));
- }
- break;
- case GETCHARACTERVDBRESOURCE:
- filePath = (String)((Constant)proc.getParameter(1).getExpression()).getValue();
- ClobImpl filecontents = indexMetadata.getVDBResourceAsClob(filePath);
- if (filecontents != null) {
- rows.add(Arrays.asList(new ClobType(filecontents)));
- }
- break;
case GETXMLSCHEMAS:
try {
Object groupID = indexMetadata.getGroupID((String)((Constant)proc.getParameter(1).getExpression()).getValue());
@@ -341,8 +336,7 @@
private List<Schema> getVisibleSchemas(VDBMetaData vdb, CompositeMetadataStore metadata) {
ArrayList<Schema> result = new ArrayList<Schema>();
for (Schema schema : metadata.getSchemas().values()) {
- ModelMetaData model = vdb.getModel(schema.getName());
- if(model.isVisible()) {
+ if(vdb.isVisible(schema.getName())) {
result.add(schema);
}
}
@@ -372,7 +366,7 @@
List<String> bindings = model.getSourceNames();
if (bindings == null || bindings.size() != 1) {
// this should not happen, but it did occur when setting up the SystemAdmin models
- throw new TeiidComponentException(DQPPlugin.Util.getString("DataTierManager.could_not_obtain_connector_binding", new Object[]{modelName, workItem.getDqpWorkContext().getVdbName(), workItem.getDqpWorkContext().getVdbVersion() })); //$NON-NLS-1$
+ throw new TeiidComponentException(QueryPlugin.Util.getString("DataTierManager.could_not_obtain_connector_binding", new Object[]{modelName, workItem.getDqpWorkContext().getVdbName(), workItem.getDqpWorkContext().getVdbVersion() })); //$NON-NLS-1$
}
connectorBindingId = bindings.get(0);
Assertion.isNotNull(connectorBindingId, "could not obtain connector id"); //$NON-NLS-1$
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/DataTierTupleSource.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/DataTierTupleSource.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/DataTierTupleSource.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -23,7 +23,6 @@
package org.teiid.dqp.internal.process;
import java.io.IOException;
-import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.Callable;
@@ -70,21 +69,21 @@
* notify the parent plan and just schedule the next poll.
*/
public class DataTierTupleSource implements TupleSource {
-
+
// Construction state
private final AtomicRequestMessage aqr;
private final RequestWorkItem workItem;
private final ConnectorWork cwi;
private final DataTierManagerImpl dtm;
- private List<Integer> convertToRuntimeType;
+ private boolean[] convertToRuntimeType;
private boolean[] convertToDesiredRuntimeType;
private Class<?>[] schema;
// Data state
private int index;
private int rowsProcessed;
- private volatile AtomicResultsMessage arm;
+ private AtomicResultsMessage arm;
private boolean closed;
private volatile boolean canceled;
private boolean executed;
@@ -102,12 +101,12 @@
List<SingleElementSymbol> symbols = this.aqr.getCommand().getProjectedSymbols();
this.schema = new Class[symbols.size()];
this.convertToDesiredRuntimeType = new boolean[symbols.size()];
- this.convertToRuntimeType = new ArrayList<Integer>(symbols.size());
+ this.convertToRuntimeType = new boolean[symbols.size()];
for (int i = 0; i < symbols.size(); i++) {
SingleElementSymbol symbol = symbols.get(i);
this.schema[i] = symbol.getType();
this.convertToDesiredRuntimeType[i] = true;
- this.convertToRuntimeType.add(i);
+ this.convertToRuntimeType[i] = true;
}
Assertion.isNull(workItem.getConnectorRequest(aqr.getAtomicRequestID()));
@@ -132,25 +131,26 @@
}
private List correctTypes(List row) throws TransformationException {
- for (int i = convertToRuntimeType.size() - 1; i >= 0; i--) {
- int idx = convertToRuntimeType.get(i);
- Object value = row.get(idx);
- if (value != null) {
- Object result = convertToRuntimeType(value, this.schema[idx]);
- if (DataTypeManager.isLOB(result.getClass())) {
- explicitClose = true;
+ //TODO: add a proper intermediate schema
+ for (int i = 0; i < row.size(); i++) {
+ Object value = row.get(i);
+ if (value == null) {
+ continue;
+ }
+ if (convertToRuntimeType[i]) {
+ boolean lob = !arm.supportsCloseWithLobs() && DataTypeManager.isLOB(value.getClass());
+ Object result = convertToRuntimeType(value, this.schema[i]);
+ if (value == result && !DataTypeManager.DefaultDataClasses.OBJECT.equals(this.schema[i])) {
+ convertToRuntimeType[i] = false;
+ } else {
+ if (lob && DataTypeManager.isLOB(result.getClass()) && DataTypeManager.isLOB(this.schema[i])) {
+ explicitClose = true;
+ }
+ row.set(i, result);
+ value = result;
}
- if (value == result && !DataTypeManager.DefaultDataClasses.OBJECT.equals(this.schema[idx])) {
- convertToRuntimeType.remove(i);
- continue;
- }
- row.set(idx, result);
}
- }
- //TODO: add a proper intermediate schema
- for (int i = 0; i < row.size(); i++) {
if (convertToDesiredRuntimeType[i]) {
- Object value = row.get(i);
if (value != null) {
Object result = DataTypeManager.transformValue(value, value.getClass(), this.schema[i]);
if (value == result) {
@@ -160,7 +160,7 @@
row.set(i, result);
}
} else {
- row.set(i, DataTypeManager.getCanonicalValue(row.get(i)));
+ row.set(i, DataTypeManager.getCanonicalValue(value));
}
}
return row;
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/LobWorkItem.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/LobWorkItem.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/LobWorkItem.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -37,8 +37,8 @@
import org.teiid.core.types.XMLType;
import org.teiid.core.util.Assertion;
import org.teiid.core.util.ReaderInputStream;
-import org.teiid.dqp.DQPPlugin;
import org.teiid.logging.LogManager;
+import org.teiid.query.QueryPlugin;
public class LobWorkItem implements Work {
@@ -75,7 +75,7 @@
chunk = stream.getNextChunk();
shouldClose = chunk.isLast();
} catch (TeiidComponentException e) {
- LogManager.logWarning(org.teiid.logging.LogConstants.CTX_DQP, e, DQPPlugin.Util.getString("ProcessWorker.LobError")); //$NON-NLS-1$
+ LogManager.logWarning(org.teiid.logging.LogConstants.CTX_DQP, e, QueryPlugin.Util.getString("ProcessWorker.LobError")); //$NON-NLS-1$
ex = e;
} catch (IOException e) {
ex = e;
@@ -102,7 +102,7 @@
stream.close();
}
} catch (IOException e) {
- LogManager.logWarning(org.teiid.logging.LogConstants.CTX_DQP, e, DQPPlugin.Util.getString("ProcessWorker.LobError")); //$NON-NLS-1$
+ LogManager.logWarning(org.teiid.logging.LogConstants.CTX_DQP, e, QueryPlugin.Util.getString("ProcessWorker.LobError")); //$NON-NLS-1$
}
parent.removeLobStream(streamRequestId);
}
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/PreparedStatementRequest.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/PreparedStatementRequest.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/PreparedStatementRequest.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -135,13 +135,8 @@
//if prepared plan does not exist, create one
prepPlan = new PreparedPlan();
LogManager.logTrace(LogConstants.CTX_DQP, new Object[] { "Query does not exist in cache: ", sqlQuery}); //$NON-NLS-1$
- }
-
- ProcessorPlan cachedPlan = prepPlan.getPlan();
-
- if (cachedPlan == null) {
- super.generatePlan();
- if (!this.addedLimit) { //TODO: this is a little problematic
+ super.generatePlan();
+ if (!this.addedLimit) { //TODO: this is a little problematic
prepPlan.setCommand(this.userCommand);
// Defect 13751: Clone the plan in its current state (i.e. before processing) so that it can be used for later queries
prepPlan.setPlan(processPlan.clone());
@@ -149,15 +144,17 @@
this.prepPlanCache.put(id, this.context.getDeterminismLevel(), prepPlan, userCommand.getCacheHint() != null?userCommand.getCacheHint().getTtl():null);
}
} else {
+ ProcessorPlan cachedPlan = prepPlan.getPlan();
+ this.userCommand = prepPlan.getCommand();
+ validateAccess(userCommand);
LogManager.logTrace(LogConstants.CTX_DQP, new Object[] { "Query exist in cache: ", sqlQuery }); //$NON-NLS-1$
processPlan = cachedPlan.clone();
//already in cache. obtain the values from cache
analysisRecord = prepPlan.getAnalysisRecord();
- this.userCommand = prepPlan.getCommand();
createCommandContext();
}
-
+
if (requestMsg.isBatchedUpdate()) {
handlePreparedBatchUpdate();
} else {
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/Request.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/Request.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/Request.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -24,6 +24,7 @@
import java.sql.Connection;
import java.util.ArrayList;
+import java.util.Collection;
import java.util.List;
import java.util.Properties;
import java.util.Set;
@@ -45,7 +46,6 @@
import org.teiid.core.id.IntegerIDFactory;
import org.teiid.core.types.DataTypeManager;
import org.teiid.core.util.Assertion;
-import org.teiid.dqp.DQPPlugin;
import org.teiid.dqp.internal.datamgr.ConnectorManagerRepository;
import org.teiid.dqp.internal.process.multisource.MultiSourceCapabilitiesFinder;
import org.teiid.dqp.internal.process.multisource.MultiSourceMetadataWrapper;
@@ -57,8 +57,10 @@
import org.teiid.logging.LogConstants;
import org.teiid.logging.LogManager;
import org.teiid.logging.MessageLevel;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.analysis.AnalysisRecord;
import org.teiid.query.eval.SecurityFunctionEvaluator;
+import org.teiid.query.function.metadata.FunctionMethod;
import org.teiid.query.metadata.QueryMetadataInterface;
import org.teiid.query.metadata.TempCapabilitiesFinder;
import org.teiid.query.metadata.TempMetadataAdapter;
@@ -81,7 +83,9 @@
import org.teiid.query.sql.lang.SetQuery;
import org.teiid.query.sql.lang.StoredProcedure;
import org.teiid.query.sql.symbol.Constant;
+import org.teiid.query.sql.symbol.GroupSymbol;
import org.teiid.query.sql.symbol.Reference;
+import org.teiid.query.sql.visitor.GroupCollectorVisitor;
import org.teiid.query.sql.visitor.ReferenceCollectorVisitor;
import org.teiid.query.tempdata.TempTableStore;
import org.teiid.query.util.CommandContext;
@@ -185,7 +189,7 @@
globalTables = vdbMetadata.getAttachment(TempTableStore.class);
if (metadata == null) {
- throw new TeiidComponentException(DQPPlugin.Util.getString("DQPCore.Unable_to_load_metadata_for_VDB_name__{0},_version__{1}", this.vdbName, this.vdbVersion)); //$NON-NLS-1$
+ throw new TeiidComponentException(QueryPlugin.Util.getString("DQPCore.Unable_to_load_metadata_for_VDB_name__{0},_version__{1}", this.vdbName, this.vdbVersion)); //$NON-NLS-1$
}
this.metadata = new TempMetadataAdapter(metadata, new TempMetadataStore());
@@ -215,7 +219,7 @@
}
if ((this.requestMsg.getResultsMode() == ResultsMode.UPDATECOUNT && !returnsUpdateCount)
|| (this.requestMsg.getResultsMode() == ResultsMode.RESULTSET && !returnsResultSet)) {
- throw new QueryValidatorException(DQPPlugin.Util.getString(this.requestMsg.getResultsMode()==ResultsMode.RESULTSET?"Request.no_result_set":"Request.result_set")); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new QueryValidatorException(QueryPlugin.Util.getString(this.requestMsg.getResultsMode()==ResultsMode.RESULTSET?"Request.no_result_set":"Request.result_set")); //$NON-NLS-1$ //$NON-NLS-2$
}
// Create command context, used in rewriting, planning, and processing
@@ -274,7 +278,7 @@
static void referenceCheck(List<Reference> references) throws QueryValidatorException {
if (references != null && !references.isEmpty()) {
- throw new QueryValidatorException(DQPPlugin.Util.getString("Request.Invalid_character_in_query")); //$NON-NLS-1$
+ throw new QueryValidatorException(QueryPlugin.Util.getString("Request.Invalid_character_in_query")); //$NON-NLS-1$
}
}
@@ -380,15 +384,24 @@
List<Reference> references = ReferenceCollectorVisitor.getReferences(command);
- //there should be no reference (?) for query/update executed as statement
checkReferences(references);
this.analysisRecord = new AnalysisRecord(requestMsg.getShowPlan() != ShowPlan.OFF, requestMsg.getShowPlan() == ShowPlan.DEBUG);
resolveCommand(command);
+ validateAccess(userCommand);
+
createCommandContext();
-
+
+ Collection<GroupSymbol> groups = GroupCollectorVisitor.getGroups(command, true);
+ for (GroupSymbol groupSymbol : groups) {
+ if (groupSymbol.isTempTable()) {
+ this.context.setDeterminismLevel(FunctionMethod.SESSION_DETERMINISTIC);
+ break;
+ }
+ }
+
validateQuery(command);
command = QueryRewriter.rewrite(command, metadata, context);
@@ -431,9 +444,9 @@
LogManager.logDetail(LogConstants.CTX_QUERY_PLANNER, analysisRecord.getAnnotations());
}
}
- LogManager.logDetail(LogConstants.CTX_DQP, new Object[] { DQPPlugin.Util.getString("BasicInterceptor.ProcessTree_for__4"), requestId, processPlan }); //$NON-NLS-1$
+ LogManager.logDetail(LogConstants.CTX_DQP, new Object[] { QueryPlugin.Util.getString("BasicInterceptor.ProcessTree_for__4"), requestId, processPlan }); //$NON-NLS-1$
} catch (QueryMetadataException e) {
- throw new QueryPlannerException(e, DQPPlugin.Util.getString("DQPCore.Unknown_query_metadata_exception_while_registering_query__{0}.", requestId)); //$NON-NLS-1$
+ throw new QueryPlannerException(e, QueryPlugin.Util.getString("DQPCore.Unknown_query_metadata_exception_while_registering_query__{0}.", requestId)); //$NON-NLS-1$
}
}
@@ -448,8 +461,6 @@
postProcessXML();
- validateAccess(userCommand);
-
createProcessor();
}
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/RequestWorkItem.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -45,7 +45,6 @@
import org.teiid.core.TeiidException;
import org.teiid.core.TeiidProcessingException;
import org.teiid.core.types.DataTypeManager;
-import org.teiid.dqp.DQPPlugin;
import org.teiid.dqp.internal.process.SessionAwareCache.CacheID;
import org.teiid.dqp.internal.process.ThreadReuseExecutor.PrioritizedRunnable;
import org.teiid.dqp.message.AtomicRequestID;
@@ -57,8 +56,8 @@
import org.teiid.logging.LogManager;
import org.teiid.logging.MessageLevel;
import org.teiid.logging.CommandLogMessage.Event;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.analysis.AnalysisRecord;
-import org.teiid.query.execution.QueryExecPlugin;
import org.teiid.query.function.metadata.FunctionMethod;
import org.teiid.query.parser.ParseInfo;
import org.teiid.query.processor.BatchCollector;
@@ -173,7 +172,7 @@
state = ProcessingState.PROCESSING;
processNew();
if (isCanceled) {
- this.processingException = new TeiidProcessingException(QueryExecPlugin.Util.getString("QueryProcessor.request_cancelled", this.requestID)); //$NON-NLS-1$
+ this.processingException = new TeiidProcessingException(QueryPlugin.Util.getString("QueryProcessor.request_cancelled", this.requestID)); //$NON-NLS-1$
state = ProcessingState.CLOSE;
}
}
@@ -205,9 +204,9 @@
cause = cause.getCause();
}
StackTraceElement elem = cause.getStackTrace()[0];
- LogManager.logWarning(LogConstants.CTX_DQP, DQPPlugin.Util.getString("ProcessWorker.processing_error", e.getMessage(), requestID, e.getClass().getName(), elem)); //$NON-NLS-1$
+ LogManager.logWarning(LogConstants.CTX_DQP, QueryPlugin.Util.getString("ProcessWorker.processing_error", e.getMessage(), requestID, e.getClass().getName(), elem)); //$NON-NLS-1$
}else {
- LogManager.logError(LogConstants.CTX_DQP, e, DQPPlugin.Util.getString("ProcessWorker.error", requestID)); //$NON-NLS-1$
+ LogManager.logError(LogConstants.CTX_DQP, e, QueryPlugin.Util.getString("ProcessWorker.error", requestID)); //$NON-NLS-1$
}
}
@@ -314,7 +313,7 @@
try {
this.transactionService.rollback(transactionContext);
} catch (XATransactionException e1) {
- LogManager.logWarning(LogConstants.CTX_DQP, e1, DQPPlugin.Util.getString("ProcessWorker.failed_rollback")); //$NON-NLS-1$
+ LogManager.logWarning(LogConstants.CTX_DQP, e1, QueryPlugin.Util.getString("ProcessWorker.failed_rollback")); //$NON-NLS-1$
}
} else {
suspend();
@@ -376,7 +375,7 @@
cr.setAnalysisRecord(analysisRecord);
cr.setResults(resultsBuffer);
if (determinismLevel > FunctionMethod.SESSION_DETERMINISTIC) {
- LogManager.logInfo(LogConstants.CTX_DQP, DQPPlugin.Util.getString("RequestWorkItem.cache_nondeterministic", originalCommand)); //$NON-NLS-1$
+ LogManager.logInfo(LogConstants.CTX_DQP, QueryPlugin.Util.getString("RequestWorkItem.cache_nondeterministic", originalCommand)); //$NON-NLS-1$
}
dqpCore.getRsCache().put(cid, determinismLevel, cr, originalCommand.getCacheHint() != null?originalCommand.getCacheHint().getTtl():null);
}
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/SessionAwareCache.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/SessionAwareCache.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/SessionAwareCache.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -25,6 +25,7 @@
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
+import java.util.Set;
import java.util.concurrent.atomic.AtomicInteger;
import org.teiid.cache.Cachable;
@@ -174,6 +175,21 @@
this.distributedCache.clear();
}
+ public void clearForVDB(String vdbName, int version) {
+ clearCache(this.localCache, vdbName, version);
+ clearCache(this.distributedCache, vdbName, version);
+ }
+
+ private void clearCache(Cache<CacheID, T> cache, String vdbName, int version) {
+ Set<CacheID> keys = cache.keys();
+ VDBKey vdbKey = new VDBKey(vdbName, version);
+ for (CacheID key:keys) {
+ if (key.vdbInfo.equals(vdbKey)) {
+ cache.remove(key);
+ }
+ }
+ }
+
public static class CacheID implements Serializable {
private static final long serialVersionUID = 8261905111156764744L;
private String sql;
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/TransactionServerImpl.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/TransactionServerImpl.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/TransactionServerImpl.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -53,11 +53,11 @@
import org.teiid.client.xa.XATransactionException;
import org.teiid.client.xa.XidImpl;
import org.teiid.core.util.Assertion;
-import org.teiid.dqp.DQPPlugin;
import org.teiid.dqp.internal.process.DQPCore.FutureWork;
import org.teiid.dqp.service.TransactionContext;
import org.teiid.dqp.service.TransactionService;
import org.teiid.dqp.service.TransactionContext.Scope;
+import org.teiid.query.QueryPlugin;
public class TransactionServerImpl implements TransactionService {
@@ -136,7 +136,7 @@
public int prepare(final String threadId, XidImpl xid, boolean singleTM) throws XATransactionException {
TransactionContext tc = checkXAState(threadId, xid, true, false);
if (!tc.getSuspendedBy().isEmpty()) {
- throw new XATransactionException(XAException.XAER_PROTO, DQPPlugin.Util.getString("TransactionServer.suspended_exist", xid)); //$NON-NLS-1$
+ throw new XATransactionException(XAException.XAER_PROTO, QueryPlugin.Util.getString("TransactionServer.suspended_exist", xid)); //$NON-NLS-1$
}
// In the container this pass though
@@ -232,7 +232,7 @@
checkXAState(threadId, xid, false, false);
tc = transactions.getOrCreateTransactionContext(threadId);
if (tc.getTransactionType() != TransactionContext.Scope.NONE) {
- throw new XATransactionException(XAException.XAER_PROTO, DQPPlugin.Util.getString("TransactionServer.existing_transaction")); //$NON-NLS-1$
+ throw new XATransactionException(XAException.XAER_PROTO, QueryPlugin.Util.getString("TransactionServer.existing_transaction")); //$NON-NLS-1$
}
tc.setTransactionTimeout(timeout);
tc.setXid(xid);
@@ -268,16 +268,16 @@
tc = checkXAState(threadId, xid, true, false);
TransactionContext threadContext = transactions.getOrCreateTransactionContext(threadId);
if (threadContext.getTransactionType() != TransactionContext.Scope.NONE) {
- throw new XATransactionException(XAException.XAER_PROTO, DQPPlugin.Util.getString("TransactionServer.existing_transaction")); //$NON-NLS-1$
+ throw new XATransactionException(XAException.XAER_PROTO, QueryPlugin.Util.getString("TransactionServer.existing_transaction")); //$NON-NLS-1$
}
if (flags == XAResource.TMRESUME && !tc.getSuspendedBy().remove(threadId)) {
- throw new XATransactionException(XAException.XAER_PROTO, DQPPlugin.Util.getString("TransactionServer.resume_failed", new Object[] {xid, threadId})); //$NON-NLS-1$
+ throw new XATransactionException(XAException.XAER_PROTO, QueryPlugin.Util.getString("TransactionServer.resume_failed", new Object[] {xid, threadId})); //$NON-NLS-1$
}
break;
}
default:
- throw new XATransactionException(XAException.XAER_INVAL, DQPPlugin.Util.getString("TransactionServer.unknown_flags")); //$NON-NLS-1$
+ throw new XATransactionException(XAException.XAER_INVAL, QueryPlugin.Util.getString("TransactionServer.unknown_flags")); //$NON-NLS-1$
}
tc.setThreadId(threadId);
@@ -304,7 +304,7 @@
break;
}
default:
- throw new XATransactionException(XAException.XAER_INVAL, DQPPlugin.Util.getString("TransactionServer.unknown_flags")); //$NON-NLS-1$
+ throw new XATransactionException(XAException.XAER_INVAL, QueryPlugin.Util.getString("TransactionServer.unknown_flags")); //$NON-NLS-1$
}
} finally {
tc.setThreadId(null);
@@ -316,15 +316,15 @@
TransactionContext tc = transactions.getTransactionContext(xid);
if (transactionExpected && tc == null) {
- throw new XATransactionException(XAException.XAER_NOTA, DQPPlugin.Util.getString("TransactionServer.no_global_transaction", xid)); //$NON-NLS-1$
+ throw new XATransactionException(XAException.XAER_NOTA, QueryPlugin.Util.getString("TransactionServer.no_global_transaction", xid)); //$NON-NLS-1$
} else if (!transactionExpected) {
if (tc != null) {
- throw new XATransactionException(XAException.XAER_DUPID, DQPPlugin.Util.getString("TransactionServer.existing_global_transaction", new Object[] {xid})); //$NON-NLS-1$
+ throw new XATransactionException(XAException.XAER_DUPID, QueryPlugin.Util.getString("TransactionServer.existing_global_transaction", new Object[] {xid})); //$NON-NLS-1$
}
if (!threadBound) {
tc = transactions.getOrCreateTransactionContext(threadId);
if (tc.getTransactionType() != TransactionContext.Scope.NONE) {
- throw new XATransactionException(XAException.XAER_PROTO, DQPPlugin.Util.getString("TransactionServer.existing_transaction", new Object[] {xid, threadId})); //$NON-NLS-1$
+ throw new XATransactionException(XAException.XAER_PROTO, QueryPlugin.Util.getString("TransactionServer.existing_transaction", new Object[] {xid, threadId})); //$NON-NLS-1$
}
}
return null;
@@ -332,10 +332,10 @@
if (threadBound) {
if (!threadId.equals(tc.getThreadId())) {
- throw new XATransactionException(XAException.XAER_PROTO, DQPPlugin.Util.getString("TransactionServer.wrong_transaction", xid)); //$NON-NLS-1$
+ throw new XATransactionException(XAException.XAER_PROTO, QueryPlugin.Util.getString("TransactionServer.wrong_transaction", xid)); //$NON-NLS-1$
}
} else if (tc.getThreadId() != null) {
- throw new XATransactionException(XAException.XAER_PROTO, DQPPlugin.Util.getString("TransactionServer.concurrent_transaction", xid)); //$NON-NLS-1$
+ throw new XATransactionException(XAException.XAER_PROTO, QueryPlugin.Util.getString("TransactionServer.concurrent_transaction", xid)); //$NON-NLS-1$
}
return tc;
@@ -349,14 +349,14 @@
try {
if (tc.getTransactionType() != TransactionContext.Scope.NONE) {
if (tc.getTransactionType() != TransactionContext.Scope.LOCAL) {
- throw new InvalidTransactionException(DQPPlugin.Util.getString("TransactionServer.existing_transaction")); //$NON-NLS-1$
+ throw new InvalidTransactionException(QueryPlugin.Util.getString("TransactionServer.existing_transaction")); //$NON-NLS-1$
}
if (!transactionExpected) {
- throw new InvalidTransactionException(DQPPlugin.Util.getString("TransactionServer.existing_transaction")); //$NON-NLS-1$
+ throw new InvalidTransactionException(QueryPlugin.Util.getString("TransactionServer.existing_transaction")); //$NON-NLS-1$
}
transactionManager.resume(tc.getTransaction());
} else if (transactionExpected) {
- throw new InvalidTransactionException(DQPPlugin.Util.getString("TransactionServer.no_transaction", threadId)); //$NON-NLS-1$
+ throw new InvalidTransactionException(QueryPlugin.Util.getString("TransactionServer.no_transaction", threadId)); //$NON-NLS-1$
}
} catch (InvalidTransactionException e) {
throw new XATransactionException(e);
@@ -464,7 +464,7 @@
*/
public TransactionContext begin(TransactionContext context) throws XATransactionException{
if (context.getTransactionType() != TransactionContext.Scope.NONE) {
- throw new XATransactionException(DQPPlugin.Util.getString("TransactionServer.existing_transaction")); //$NON-NLS-1$
+ throw new XATransactionException(QueryPlugin.Util.getString("TransactionServer.existing_transaction")); //$NON-NLS-1$
}
beginDirect(context);
context.setTransactionType(TransactionContext.Scope.REQUEST);
Modified: trunk/engine/src/main/java/org/teiid/dqp/message/AtomicResultsMessage.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/message/AtomicResultsMessage.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/dqp/message/AtomicResultsMessage.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -42,6 +42,8 @@
// by default we support implicit close.
private boolean supportsImplicitClose = true;
+
+ private boolean supportsCloseWithLobs;
private boolean isTransactional;
@@ -60,6 +62,14 @@
return this.supportsImplicitClose;
}
+ public boolean supportsCloseWithLobs() {
+ return supportsCloseWithLobs;
+ }
+
+ public void setSupportsCloseWithLobs(boolean supportsCloseWithLobs) {
+ this.supportsCloseWithLobs = supportsCloseWithLobs;
+ }
+
public void setSupportsImplicitClose(boolean supportsImplicitClose) {
this.supportsImplicitClose = supportsImplicitClose;
}
@@ -83,6 +93,7 @@
supportsImplicitClose = in.readBoolean();
warnings = (List<Exception>)in.readObject();
isTransactional = in.readBoolean();
+ supportsCloseWithLobs = in.readBoolean();
}
public void writeExternal(ObjectOutput out) throws IOException {
@@ -92,6 +103,7 @@
out.writeBoolean(supportsImplicitClose);
out.writeObject(warnings);
out.writeBoolean(isTransactional);
+ out.writeBoolean(supportsCloseWithLobs);
}
public boolean isTransactional() {
Modified: trunk/engine/src/main/java/org/teiid/query/eval/Evaluator.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/eval/Evaluator.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/eval/Evaluator.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -109,7 +109,6 @@
import org.teiid.query.sql.util.ValueIterator;
import org.teiid.query.sql.util.ValueIteratorSource;
import org.teiid.query.util.CommandContext;
-import org.teiid.query.util.ErrorMessageKeys;
import org.teiid.query.xquery.saxon.SaxonXQueryExpression;
import org.teiid.translator.WSConnection.Util;
@@ -224,7 +223,7 @@
} else if (criteria instanceof ExpressionCriteria) {
return (Boolean)evaluate(((ExpressionCriteria)criteria).getExpression(), tuple);
} else {
- throw new ExpressionEvaluationException(ErrorMessageKeys.PROCESSOR_0010, QueryPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0010, criteria));
+ throw new ExpressionEvaluationException("ERR.015.006.0010", QueryPlugin.Util.getString("ERR.015.006.0010", criteria)); //$NON-NLS-1$ //$NON-NLS-2$
}
}
@@ -274,7 +273,7 @@
try {
leftValue = evaluate(criteria.getLeftExpression(), tuple);
} catch(ExpressionEvaluationException e) {
- throw new ExpressionEvaluationException(e, ErrorMessageKeys.PROCESSOR_0011, QueryPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0011, new Object[] {"left", criteria})); //$NON-NLS-1$
+ throw new ExpressionEvaluationException(e, "ERR.015.006.0011", QueryPlugin.Util.getString("ERR.015.006.0011", new Object[] {"left", criteria})); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
// Shortcut if null
@@ -287,7 +286,7 @@
try {
rightValue = evaluate(criteria.getRightExpression(), tuple);
} catch(ExpressionEvaluationException e) {
- throw new ExpressionEvaluationException(e, ErrorMessageKeys.PROCESSOR_0011, QueryPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0011, new Object[]{"right", criteria})); //$NON-NLS-1$
+ throw new ExpressionEvaluationException(e, "ERR.015.006.0011", QueryPlugin.Util.getString("ERR.015.006.0011", new Object[]{"right", criteria})); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
// Shortcut if null
@@ -310,7 +309,7 @@
case CompareCriteria.GE:
return Boolean.valueOf((compareValues(leftValue, rightValue) >= 0));
default:
- throw new ExpressionEvaluationException(ErrorMessageKeys.PROCESSOR_0012, QueryPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0012, criteria.getOperator()));
+ throw new ExpressionEvaluationException("ERR.015.006.0012", QueryPlugin.Util.getString("ERR.015.006.0012", criteria.getOperator())); //$NON-NLS-1$ //$NON-NLS-2$
}
}
@@ -332,7 +331,7 @@
try {
value = evaluate(criteria.getLeftExpression(), tuple);
} catch(ExpressionEvaluationException e) {
- throw new ExpressionEvaluationException(e, ErrorMessageKeys.PROCESSOR_0011, QueryPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0011, new Object[]{"left", criteria})); //$NON-NLS-1$
+ throw new ExpressionEvaluationException(e, "ERR.015.006.0011", QueryPlugin.Util.getString("ERR.015.006.0011", new Object[]{"left", criteria})); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
// Shortcut if null
@@ -357,7 +356,7 @@
try {
rightValue = (String) evaluate(criteria.getRightExpression(), tuple);
} catch(ExpressionEvaluationException e) {
- throw new ExpressionEvaluationException(e, ErrorMessageKeys.PROCESSOR_0011, QueryPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0011, new Object[]{"right", criteria})); //$NON-NLS-1$
+ throw new ExpressionEvaluationException(e, "ERR.015.006.0011", QueryPlugin.Util.getString("ERR.015.006.0011", new Object[]{"right", criteria})); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
// Shortcut if null
@@ -384,7 +383,7 @@
Matcher matcher = patternRegex.matcher(search);
return matcher.matches();
} catch(PatternSyntaxException e) {
- throw new ExpressionEvaluationException(e, ErrorMessageKeys.PROCESSOR_0014, QueryPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0014, new Object[]{pattern, e.getMessage()}));
+ throw new ExpressionEvaluationException(e, "ERR.015.006.0014", QueryPlugin.Util.getString("ERR.015.006.0014", new Object[]{pattern, e.getMessage()})); //$NON-NLS-1$ //$NON-NLS-2$
}
}
@@ -396,7 +395,7 @@
try {
leftValue = evaluate(criteria.getExpression(), tuple);
} catch(ExpressionEvaluationException e) {
- throw new ExpressionEvaluationException(e, ErrorMessageKeys.PROCESSOR_0015, QueryPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0015, criteria));
+ throw new ExpressionEvaluationException(e, "ERR.015.006.0015", QueryPlugin.Util.getString("ERR.015.006.0015", criteria)); //$NON-NLS-1$ //$NON-NLS-2$
}
// Shortcut if null
@@ -450,7 +449,7 @@
try {
value = evaluate((Expression) possibleValue, tuple);
} catch(ExpressionEvaluationException e) {
- throw new ExpressionEvaluationException(e, ErrorMessageKeys.PROCESSOR_0015, QueryPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0015, possibleValue));
+ throw new ExpressionEvaluationException(e, "ERR.015.006.0015", QueryPlugin.Util.getString("ERR.015.006.0015", possibleValue)); //$NON-NLS-1$ //$NON-NLS-2$
}
} else {
value = possibleValue;
@@ -480,7 +479,7 @@
try {
value = evaluate(criteria.getExpression(), tuple);
} catch(ExpressionEvaluationException e) {
- throw new ExpressionEvaluationException(e, ErrorMessageKeys.PROCESSOR_0015, QueryPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0015, criteria));
+ throw new ExpressionEvaluationException(e, "ERR.015.006.0015", QueryPlugin.Util.getString("ERR.015.006.0015", criteria)); //$NON-NLS-1$ //$NON-NLS-2$
}
return (value == null ^ criteria.isNegated());
@@ -494,7 +493,7 @@
try {
leftValue = evaluate(criteria.getLeftExpression(), tuple);
} catch(ExpressionEvaluationException e) {
- throw new ExpressionEvaluationException(e, ErrorMessageKeys.PROCESSOR_0015, QueryPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0015, criteria));
+ throw new ExpressionEvaluationException(e, "ERR.015.006.0015", QueryPlugin.Util.getString("ERR.015.006.0015", criteria)); //$NON-NLS-1$ //$NON-NLS-2$
}
// Shortcut if null
@@ -544,7 +543,7 @@
result = Boolean.valueOf(compare >= 0);
break;
default:
- throw new ExpressionEvaluationException(ErrorMessageKeys.PROCESSOR_0012, QueryPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0012, criteria.getOperator()));
+ throw new ExpressionEvaluationException("ERR.015.006.0012", QueryPlugin.Util.getString("ERR.015.006.0012", criteria.getOperator())); //$NON-NLS-1$ //$NON-NLS-2$
}
switch(criteria.getPredicateQuantifier()) {
@@ -559,7 +558,7 @@
}
break;
default:
- throw new ExpressionEvaluationException(ErrorMessageKeys.PROCESSOR_0057, QueryPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0057, criteria.getPredicateQuantifier()));
+ throw new ExpressionEvaluationException("ERR.015.006.0057", QueryPlugin.Util.getString("ERR.015.006.0057", criteria.getPredicateQuantifier())); //$NON-NLS-1$ //$NON-NLS-2$
}
} else { // value is null
@@ -572,7 +571,7 @@
result = null;
break;
default:
- throw new ExpressionEvaluationException(ErrorMessageKeys.PROCESSOR_0057, QueryPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0057, criteria.getPredicateQuantifier()));
+ throw new ExpressionEvaluationException("ERR.015.006.0057", QueryPlugin.Util.getString("ERR.015.006.0057", criteria.getPredicateQuantifier())); //$NON-NLS-1$ //$NON-NLS-2$
}
}
@@ -661,7 +660,7 @@
} else if (expression instanceof XMLParse){
return evaluateXMLParse(tuple, (XMLParse)expression);
} else {
- throw new TeiidComponentException(ErrorMessageKeys.PROCESSOR_0016, QueryPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0016, expression.getClass().getName()));
+ throw new TeiidComponentException("ERR.015.006.0016", QueryPlugin.Util.getString("ERR.015.006.0016", expression.getClass().getName())); //$NON-NLS-1$ //$NON-NLS-2$
}
}
@@ -906,7 +905,7 @@
return internalEvaluate(expr.getThenExpression(i), tuple);
}
} catch (ExpressionEvaluationException e) {
- throw new ExpressionEvaluationException(e, ErrorMessageKeys.PROCESSOR_0033, QueryPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0033, "CASE", expr.getWhenCriteria(i))); //$NON-NLS-1$
+ throw new ExpressionEvaluationException(e, "ERR.015.006.0033", QueryPlugin.Util.getString("ERR.015.006.0033", "CASE", expr.getWhenCriteria(i))); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
}
if (expr.getElseExpression() != null) {
@@ -947,7 +946,7 @@
// Check for special lookup function
if(fd.getName().equalsIgnoreCase(FunctionLibrary.LOOKUP)) {
if(dataMgr == null) {
- throw new ComponentNotFoundException(ErrorMessageKeys.PROCESSOR_0055, QueryPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0055));
+ throw new ComponentNotFoundException("ERR.015.006.0055", QueryPlugin.Util.getString("ERR.015.006.0055")); //$NON-NLS-1$ //$NON-NLS-2$
}
String codeTableName = (String) values[0];
@@ -981,7 +980,7 @@
if(valueIter.hasNext()) {
// The subquery should be scalar, but has produced
// more than one result value - this is an exception case
- throw new ExpressionEvaluationException(ErrorMessageKeys.PROCESSOR_0058, QueryPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0058, scalarSubquery.getCommand()));
+ throw new ExpressionEvaluationException("ERR.015.006.0058", QueryPlugin.Util.getString("ERR.015.006.0058", scalarSubquery.getCommand())); //$NON-NLS-1$ //$NON-NLS-2$
}
}
return result;
@@ -994,7 +993,7 @@
private CommandContext getContext(LanguageObject expression) throws TeiidComponentException {
if (context == null) {
- throw new TeiidComponentException(ErrorMessageKeys.PROCESSOR_0033, QueryPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0033, expression, "No value was available")); //$NON-NLS-1$
+ throw new TeiidComponentException("ERR.015.006.0033", QueryPlugin.Util.getString("ERR.015.006.0033", expression, "No value was available")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
return context;
}
Deleted: trunk/engine/src/main/java/org/teiid/query/execution/QueryExecPlugin.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/execution/QueryExecPlugin.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/execution/QueryExecPlugin.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -1,46 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package org.teiid.query.execution;
-
-import java.util.ResourceBundle;
-
-import org.teiid.core.BundleUtil;
-
-/**
- * QueryPlugin
- * <p>Used here in <code>query</code> to have access to the new
- * logging framework for <code>LogManager</code>.</p>
- */
-public class QueryExecPlugin { // extends Plugin {
-
- /**
- * The plug-in identifier of this plugin
- */
- public static final String PLUGIN_ID = QueryExecPlugin.class.getPackage().getName();
-
- /**
- * Provides access to the plugin's log and to it's resources.
- */
- public static final BundleUtil Util = new BundleUtil(PLUGIN_ID,
- PLUGIN_ID + ".i18n", ResourceBundle.getBundle(PLUGIN_ID + ".i18n")); //$NON-NLS-1$ //$NON-NLS-2$
-}
Modified: trunk/engine/src/main/java/org/teiid/query/function/FunctionDescriptor.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/function/FunctionDescriptor.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/function/FunctionDescriptor.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -37,7 +37,6 @@
import org.teiid.query.QueryPlugin;
import org.teiid.query.function.metadata.FunctionMethod;
import org.teiid.query.util.CommandContext;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -236,7 +235,7 @@
// give name and types from fd
Method method = getInvocationMethod();
if(method == null) {
- throw new FunctionExecutionException(ErrorMessageKeys.FUNCTION_0002, QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0002, getName()));
+ throw new FunctionExecutionException("ERR.015.001.0002", QueryPlugin.Util.getString("ERR.015.001.0002", getName())); //$NON-NLS-1$ //$NON-NLS-2$
}
if (getDeterministic() >= FunctionMethod.USER_DETERMINISTIC && values.length > 0 && values[0] instanceof CommandContext) {
@@ -255,11 +254,11 @@
Object result = method.invoke(null, values);
return importValue(result, getReturnType());
} catch(ArithmeticException e) {
- throw new FunctionExecutionException(e, ErrorMessageKeys.FUNCTION_0003, QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0003, getName()));
+ throw new FunctionExecutionException(e, "ERR.015.001.0003", QueryPlugin.Util.getString("ERR.015.001.0003", getName())); //$NON-NLS-1$ //$NON-NLS-2$
} catch(InvocationTargetException e) {
- throw new FunctionExecutionException(e.getTargetException(), ErrorMessageKeys.FUNCTION_0003, QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0003, getName()));
+ throw new FunctionExecutionException(e.getTargetException(), "ERR.015.001.0003", QueryPlugin.Util.getString("ERR.015.001.0003", getName())); //$NON-NLS-1$ //$NON-NLS-2$
} catch(IllegalAccessException e) {
- throw new FunctionExecutionException(e, ErrorMessageKeys.FUNCTION_0004, QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0004, method.toString()));
+ throw new FunctionExecutionException(e, "ERR.015.001.0004", QueryPlugin.Util.getString("ERR.015.001.0004", method.toString())); //$NON-NLS-1$ //$NON-NLS-2$
} catch (TransformationException e) {
throw new FunctionExecutionException(e, e.getMessage());
}
Modified: trunk/engine/src/main/java/org/teiid/query/function/FunctionMethods.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/function/FunctionMethods.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/function/FunctionMethods.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -56,7 +56,6 @@
import org.teiid.language.SQLConstants.NonReserved;
import org.teiid.query.QueryPlugin;
import org.teiid.query.util.CommandContext;
-import org.teiid.query.util.ErrorMessageKeys;
/**
* Static method hooks for most of the function library.
@@ -236,14 +235,14 @@
return new Double(context.getNextRand(((Integer)seed).longValue()));
}
}
- throw new FunctionExecutionException(ErrorMessageKeys.FUNCTION_0069, QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0069, "rand", seed)); //$NON-NLS-1$
+ throw new FunctionExecutionException("ERR.015.001.0069", QueryPlugin.Util.getString("ERR.015.001.0069", "rand", seed)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
public static Object rand(CommandContext context) throws FunctionExecutionException {
if(context != null) {
return new Double(context.getNextRand());
}
- throw new FunctionExecutionException(ErrorMessageKeys.FUNCTION_0069, QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0069, "rand")); //$NON-NLS-1$
+ throw new FunctionExecutionException("ERR.015.001.0069", QueryPlugin.Util.getString("ERR.015.001.0069", "rand")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
// ================== Function = mod =====================
@@ -450,7 +449,7 @@
int month = getField(date, Calendar.MONTH);
if (month > 11) {
- throw new FunctionExecutionException(ErrorMessageKeys.FUNCTION_0066, QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0066,
+ throw new FunctionExecutionException("ERR.015.001.0066", QueryPlugin.Util.getString("ERR.015.001.0066", //$NON-NLS-1$ //$NON-NLS-2$
new Object[] {"quarter", date.getClass().getName()})); //$NON-NLS-1$
}
return Integer.valueOf(month/3 + 1);
@@ -637,7 +636,7 @@
throws FunctionExecutionException {
int countValue = count.intValue();
if(countValue < 0) {
- throw new FunctionExecutionException(ErrorMessageKeys.FUNCTION_0017, QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0017, countValue));
+ throw new FunctionExecutionException("ERR.015.001.0017", QueryPlugin.Util.getString("ERR.015.001.0017", countValue)); //$NON-NLS-1$ //$NON-NLS-2$
}
if(string.length() < countValue) {
return string;
@@ -651,7 +650,7 @@
throws FunctionExecutionException {
int countValue = count.intValue();
if(countValue < 0) {
- throw new FunctionExecutionException(ErrorMessageKeys.FUNCTION_0017, QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0017, countValue));
+ throw new FunctionExecutionException("ERR.015.001.0017", QueryPlugin.Util.getString("ERR.015.001.0017", countValue)); //$NON-NLS-1$ //$NON-NLS-2$
} else if(string.length() < countValue) {
return string;
} else {
@@ -767,11 +766,11 @@
// Check some invalid cases
if(startValue < 1 || (startValue-1) > string1.length()) {
- throw new FunctionExecutionException(ErrorMessageKeys.FUNCTION_0061, QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0061, start, string1));
+ throw new FunctionExecutionException("ERR.015.001.0061", QueryPlugin.Util.getString("ERR.015.001.0061", start, string1)); //$NON-NLS-1$ //$NON-NLS-2$
} else if (len < 0) {
- throw new FunctionExecutionException(ErrorMessageKeys.FUNCTION_0062, QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0062, len));
+ throw new FunctionExecutionException("ERR.015.001.0062", QueryPlugin.Util.getString("ERR.015.001.0062", len)); //$NON-NLS-1$ //$NON-NLS-2$
} else if (string1.length() == 0 && (startValue > 1 || len >0) ) {
- throw new FunctionExecutionException(ErrorMessageKeys.FUNCTION_0063, QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0063));
+ throw new FunctionExecutionException("ERR.015.001.0063", QueryPlugin.Util.getString("ERR.015.001.0063")); //$NON-NLS-1$ //$NON-NLS-2$
}
StringBuffer result = new StringBuffer();
@@ -853,7 +852,7 @@
throws FunctionExecutionException {
int length = padLength.intValue();
if(length < 1) {
- throw new FunctionExecutionException(ErrorMessageKeys.FUNCTION_0025, QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0025));
+ throw new FunctionExecutionException("ERR.015.001.0025", QueryPlugin.Util.getString("ERR.015.001.0025")); //$NON-NLS-1$ //$NON-NLS-2$
}
if(length < str.length()) {
return str.substring(0, length);
@@ -863,7 +862,7 @@
}
// Get pad character
if(padStr.length() == 0) {
- throw new FunctionExecutionException(ErrorMessageKeys.FUNCTION_0027, QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0027));
+ throw new FunctionExecutionException("ERR.015.001.0027", QueryPlugin.Util.getString("ERR.015.001.0027")); //$NON-NLS-1$ //$NON-NLS-2$
}
// Pad string
StringBuffer outStr = new StringBuffer(str);
@@ -908,7 +907,7 @@
public static Object translate(String str, String in, String out)
throws FunctionExecutionException {
if(in.length() != out.length()) {
- throw new FunctionExecutionException(ErrorMessageKeys.FUNCTION_0031, QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0031));
+ throw new FunctionExecutionException("ERR.015.001.0031", QueryPlugin.Util.getString("ERR.015.001.0031")); //$NON-NLS-1$ //$NON-NLS-2$
}
if(in.length() == 0 || str.length() == 0) {
@@ -942,7 +941,7 @@
try {
return DataTypeManager.transformValue(src, DataTypeManager.getDataTypeClass(type));
} catch(TransformationException e) {
- throw new FunctionExecutionException(e, ErrorMessageKeys.FUNCTION_0033, QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0033, new Object[]{src, DataTypeManager.getDataTypeName(src.getClass()), type}));
+ throw new FunctionExecutionException(e, "ERR.015.001.0033", QueryPlugin.Util.getString("ERR.015.001.0033", new Object[]{src, DataTypeManager.getDataTypeName(src.getClass()), type})); //$NON-NLS-1$ //$NON-NLS-2$
}
}
@@ -959,7 +958,7 @@
public static Object context(Object context, Object expression)
throws FunctionExecutionException {
- throw new FunctionExecutionException(ErrorMessageKeys.FUNCTION_0035, QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0035));
+ throw new FunctionExecutionException("ERR.015.001.0035", QueryPlugin.Util.getString("ERR.015.001.0035")); //$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -973,7 +972,7 @@
public static Object rowlimit(Object expression)
throws FunctionExecutionException {
- throw new FunctionExecutionException(ErrorMessageKeys.FUNCTION_0035a, QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0035a));
+ throw new FunctionExecutionException("ERR.015.001.0035a", QueryPlugin.Util.getString("ERR.015.001.0035a")); //$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -987,7 +986,7 @@
public static Object rowlimitexception(Object expression)
throws FunctionExecutionException {
- throw new FunctionExecutionException(ErrorMessageKeys.FUNCTION_0035a, QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0035a));
+ throw new FunctionExecutionException("ERR.015.001.0035a", QueryPlugin.Util.getString("ERR.015.001.0035a")); //$NON-NLS-1$ //$NON-NLS-2$
}
// ================== Function = lookup =====================
@@ -1033,7 +1032,7 @@
SimpleDateFormat sdf = new SimpleDateFormat(format);
return sdf.format(date);
} catch (IllegalArgumentException iae) {
- throw new FunctionExecutionException(ErrorMessageKeys.FUNCTION_0042, QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0042 ,
+ throw new FunctionExecutionException("ERR.015.001.0042", QueryPlugin.Util.getString("ERR.015.001.0042" , //$NON-NLS-1$ //$NON-NLS-2$
iae.getMessage()));
}
}
@@ -1045,7 +1044,7 @@
try {
return df.parse(date);
} catch (ParseException e) {
- throw new FunctionExecutionException(ErrorMessageKeys.FUNCTION_0043, QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0043 ,
+ throw new FunctionExecutionException("ERR.015.001.0043", QueryPlugin.Util.getString("ERR.015.001.0043" , //$NON-NLS-1$ //$NON-NLS-2$
date, format));
}
}
@@ -1062,7 +1061,7 @@
DecimalFormat df = new DecimalFormat(format);
return df.format(number);
} catch (IllegalArgumentException iae) {
- throw new FunctionExecutionException(ErrorMessageKeys.FUNCTION_0042, QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0042 ,
+ throw new FunctionExecutionException("ERR.015.001.0042", QueryPlugin.Util.getString("ERR.015.001.0042" , //$NON-NLS-1$ //$NON-NLS-2$
iae.getMessage()));
}
}
@@ -1112,7 +1111,7 @@
try {
return df.parse(number);
} catch (ParseException e) {
- throw new FunctionExecutionException(ErrorMessageKeys.FUNCTION_0043, QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0043 ,
+ throw new FunctionExecutionException("ERR.015.001.0043", QueryPlugin.Util.getString("ERR.015.001.0043" , //$NON-NLS-1$ //$NON-NLS-2$
number,format));
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/function/FunctionTree.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/function/FunctionTree.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/function/FunctionTree.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -46,7 +46,6 @@
import org.teiid.query.function.metadata.FunctionMethod;
import org.teiid.query.function.metadata.FunctionParameter;
import org.teiid.query.util.CommandContext;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -107,7 +106,7 @@
if(sourceObj instanceof FunctionMetadataSource) {
addSource((FunctionMetadataSource) sourceObj);
} else {
- Assertion.failed(QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0044, sourceObj.getClass().getName()));
+ Assertion.failed(QueryPlugin.Util.getString("ERR.015.001.0044", sourceObj.getClass().getName())); //$NON-NLS-1$
}
}
}
@@ -127,7 +126,7 @@
while(functionIter.hasNext()) {
Object functionObj = functionIter.next();
if(! (functionObj instanceof FunctionMethod)) {
- Assertion.failed(QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0045, functionObj.getClass().getName()));
+ Assertion.failed(QueryPlugin.Util.getString("ERR.015.001.0045", functionObj.getClass().getName())); //$NON-NLS-1$
}
FunctionMethod method = (FunctionMethod) functionObj;
@@ -138,7 +137,7 @@
// Add to tree
addFunction(source, method);
} else {
- LogManager.logWarning(LogConstants.CTX_FUNCTION_TREE, QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0046, new Object[]{method}));
+ LogManager.logWarning(LogConstants.CTX_FUNCTION_TREE, QueryPlugin.Util.getString("ERR.015.001.0046", new Object[]{method})); //$NON-NLS-1$
}
}
}
@@ -310,10 +309,10 @@
// not have the function jar files. The modeler never invokes, so this isn't a
// problem.
} catch (Exception e) {
- throw new TeiidRuntimeException(e, ErrorMessageKeys.FUNCTION_0047, QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0047, new Object[]{method.getInvocationClass(), invocationMethod, inputTypes}));
+ throw new TeiidRuntimeException(e, "ERR.015.001.0047", QueryPlugin.Util.getString("ERR.015.001.0047", new Object[]{method.getInvocationClass(), invocationMethod, inputTypes})); //$NON-NLS-1$ //$NON-NLS-2$
}
if(invocationMethod != null && !FunctionTree.isValidMethod(invocationMethod)) {
- throw new TeiidRuntimeException(ErrorMessageKeys.FUNCTION_0047, QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0047, new Object[]{method.getInvocationClass(), invocationMethod, inputTypes}));
+ throw new TeiidRuntimeException("ERR.015.001.0047", QueryPlugin.Util.getString("ERR.015.001.0047", new Object[]{method.getInvocationClass(), invocationMethod, inputTypes})); //$NON-NLS-1$ //$NON-NLS-2$
}
} else {
inputTypes.add(0, CommandContext.class);
Modified: trunk/engine/src/main/java/org/teiid/query/function/SystemFunctionManager.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/function/SystemFunctionManager.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/function/SystemFunctionManager.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -28,7 +28,6 @@
import org.teiid.query.function.metadata.FunctionMetadataValidator;
import org.teiid.query.function.source.SystemSource;
import org.teiid.query.report.ActivityReport;
-import org.teiid.query.util.ErrorMessageKeys;
public class SystemFunctionManager {
@@ -44,7 +43,7 @@
validateSource(systemSource, report);
if(report.hasItems()) {
// Should never happen as SystemSource doesn't change
- System.err.println(QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0005, report));
+ System.err.println(QueryPlugin.Util.getString("ERR.015.001.0005", report)); //$NON-NLS-1$
}
systemFunctionTree = new FunctionTree(systemSource);
Modified: trunk/engine/src/main/java/org/teiid/query/function/aggregate/Avg.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/function/aggregate/Avg.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/function/aggregate/Avg.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -30,7 +30,6 @@
import org.teiid.core.TeiidComponentException;
import org.teiid.core.types.DataTypeManager;
import org.teiid.query.QueryPlugin;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -90,7 +89,7 @@
try {
return ((BigDecimal)sum).divide(new BigDecimal(count), AVG_SCALE, BigDecimal.ROUND_HALF_UP);
} catch(ArithmeticException e) {
- throw new FunctionExecutionException(e, ErrorMessageKeys.FUNCTION_0048, QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0048, sum, new Integer(count)));
+ throw new FunctionExecutionException(e, "ERR.015.001.0048", QueryPlugin.Util.getString("ERR.015.001.0048", sum, new Integer(count))); //$NON-NLS-1$ //$NON-NLS-2$
}
default:
throw new AssertionError("unknown accumulator type"); //$NON-NLS-1$
Modified: trunk/engine/src/main/java/org/teiid/query/function/aggregate/Max.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/function/aggregate/Max.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/function/aggregate/Max.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -28,7 +28,6 @@
import org.teiid.api.exception.query.FunctionExecutionException;
import org.teiid.core.TeiidComponentException;
import org.teiid.query.QueryPlugin;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -57,7 +56,7 @@
maxValue = valueComp;
}
} else {
- throw new FunctionExecutionException(ErrorMessageKeys.FUNCTION_0050, QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0050, "MAX", value.getClass().getName())); //$NON-NLS-1$
+ throw new FunctionExecutionException("ERR.015.001.0050", QueryPlugin.Util.getString("ERR.015.001.0050", "MAX", value.getClass().getName())); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/function/aggregate/Min.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/function/aggregate/Min.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/function/aggregate/Min.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -28,7 +28,6 @@
import org.teiid.api.exception.query.FunctionExecutionException;
import org.teiid.core.TeiidComponentException;
import org.teiid.query.QueryPlugin;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -57,7 +56,7 @@
minValue = valueComp;
}
} else {
- throw new FunctionExecutionException(ErrorMessageKeys.FUNCTION_0050, QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0050, "MIN", value.getClass().getName())); //$NON-NLS-1$
+ throw new FunctionExecutionException("ERR.015.001.0050", QueryPlugin.Util.getString("ERR.015.001.0050", "MIN", value.getClass().getName())); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/function/metadata/FunctionMetadataValidator.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/function/metadata/FunctionMetadataValidator.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/function/metadata/FunctionMetadataValidator.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -29,7 +29,6 @@
import org.teiid.core.types.DataTypeManager;
import org.teiid.query.QueryPlugin;
import org.teiid.query.report.ActivityReport;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -79,7 +78,7 @@
*/
public static final void validateFunctionMethod(FunctionMethod method, ActivityReport report) {
if(method == null) {
- updateReport(report, method, QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0052, "FunctionMethod")); //$NON-NLS-1$
+ updateReport(report, method, QueryPlugin.Util.getString("ERR.015.001.0052", "FunctionMethod")); //$NON-NLS-1$ //$NON-NLS-2$
return; // can't validate
}
@@ -127,7 +126,7 @@
*/
public static final void validateFunctionParameter(FunctionParameter param) throws FunctionMetadataException {
if(param == null) {
- throw new FunctionMetadataException(ErrorMessageKeys.FUNCTION_0053, QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0053));
+ throw new FunctionMetadataException("ERR.015.001.0053", QueryPlugin.Util.getString("ERR.015.001.0053")); //$NON-NLS-1$ //$NON-NLS-2$
}
// Validate attributes
@@ -166,7 +165,7 @@
validateIsNotNull(type, "Type"); //$NON-NLS-1$
if(DataTypeManager.getDataTypeClass(type) == null) {
- throw new FunctionMetadataException(ErrorMessageKeys.FUNCTION_0054, QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0054, type));
+ throw new FunctionMetadataException("ERR.015.001.0054", QueryPlugin.Util.getString("ERR.015.001.0054", type)); //$NON-NLS-1$ //$NON-NLS-2$
}
}
@@ -227,7 +226,7 @@
*/
private static final void validateIsNotNull(Object object, String objName) throws FunctionMetadataException {
if(object == null) {
- throw new FunctionMetadataException(ErrorMessageKeys.FUNCTION_0052, QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0052, objName));
+ throw new FunctionMetadataException("ERR.015.001.0052", QueryPlugin.Util.getString("ERR.015.001.0052", objName)); //$NON-NLS-1$ //$NON-NLS-2$
}
}
@@ -241,7 +240,7 @@
*/
private static final void validateLength(String string, int maxLength, String strName) throws FunctionMetadataException {
if(string.length() > maxLength) {
- throw new FunctionMetadataException(ErrorMessageKeys.FUNCTION_0055, QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0055,strName, new Integer(maxLength)));
+ throw new FunctionMetadataException("ERR.015.001.0055", QueryPlugin.Util.getString("ERR.015.001.0055",strName, new Integer(maxLength))); //$NON-NLS-1$ //$NON-NLS-2$
}
}
@@ -262,14 +261,14 @@
char firstChar = name.charAt(0);
if(! Character.isLetter(firstChar)) {
- throw new FunctionMetadataException(ErrorMessageKeys.FUNCTION_0056, QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0056,strName, new Character(firstChar)));
+ throw new FunctionMetadataException("ERR.015.001.0056", QueryPlugin.Util.getString("ERR.015.001.0056",strName, new Character(firstChar))); //$NON-NLS-1$ //$NON-NLS-2$
}
// Then check the rest of the characters
for(int i=1; i<name.length(); i++) {
char ch = name.charAt(i);
if(! (Character.isLetterOrDigit(ch) || ch == '_')) {
- throw new FunctionMetadataException(ErrorMessageKeys.FUNCTION_0057, QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0057,strName, new Character(ch)));
+ throw new FunctionMetadataException("ERR.015.001.0057", QueryPlugin.Util.getString("ERR.015.001.0057",strName, new Character(ch))); //$NON-NLS-1$ //$NON-NLS-2$
}
}
}
@@ -288,7 +287,7 @@
if(identifier.length() > 0) {
char firstChar = identifier.charAt(0);
if(! Character.isJavaIdentifierStart(firstChar)) {
- throw new FunctionMetadataException(ErrorMessageKeys.FUNCTION_0056, QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0056,strName, new Character(firstChar)));
+ throw new FunctionMetadataException("ERR.015.001.0056", QueryPlugin.Util.getString("ERR.015.001.0056",strName, new Character(firstChar))); //$NON-NLS-1$ //$NON-NLS-2$
}
// Then check the rest of the characters
@@ -296,13 +295,13 @@
char ch = identifier.charAt(i);
if(! Character.isJavaIdentifierPart(ch)) {
if(! allowMultiple || ! (ch == '.')) {
- throw new FunctionMetadataException(ErrorMessageKeys.FUNCTION_0057, QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0057,strName, new Character(ch)));
+ throw new FunctionMetadataException("ERR.015.001.0057", QueryPlugin.Util.getString("ERR.015.001.0057",strName, new Character(ch))); //$NON-NLS-1$ //$NON-NLS-2$
}
}
}
if(identifier.charAt(identifier.length()-1) == '.') {
- throw new FunctionMetadataException(ErrorMessageKeys.FUNCTION_0058, QueryPlugin.Util.getString(ErrorMessageKeys.FUNCTION_0058,strName));
+ throw new FunctionMetadataException("ERR.015.001.0058", QueryPlugin.Util.getString("ERR.015.001.0058",strName)); //$NON-NLS-1$ //$NON-NLS-2$
}
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/mapping/xml/MappingNode.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/mapping/xml/MappingNode.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/mapping/xml/MappingNode.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -33,7 +33,6 @@
import org.teiid.query.QueryPlugin;
import org.teiid.query.sql.symbol.ElementSymbol;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -386,7 +385,7 @@
}
return traverseDownForFirstNodeWithPropertyString(propertyKey, value, isStringValue, node, true);
} else {
- throw new IllegalArgumentException(QueryPlugin.Util.getString(ErrorMessageKeys.MAPPING_0009, searchDirection ));
+ throw new IllegalArgumentException(QueryPlugin.Util.getString("ERR.015.002.0009", searchDirection )); //$NON-NLS-1$
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/mapping/xml/MappingOutputter.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/mapping/xml/MappingOutputter.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/mapping/xml/MappingOutputter.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -35,7 +35,6 @@
import javax.xml.stream.XMLStreamWriter;
import org.teiid.query.QueryPlugin;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -147,7 +146,7 @@
*/
void addElementProperty(String name, Object value ) throws XMLStreamException {
if ( value == null ) {
- throw new IllegalArgumentException( QueryPlugin.Util.getString(ErrorMessageKeys.MAPPING_0010, name) );
+ throw new IllegalArgumentException( QueryPlugin.Util.getString("ERR.015.002.0010", name) ); //$NON-NLS-1$
}
if (value instanceof Collection){
Iterator i = ((Collection)value).iterator();
@@ -172,7 +171,7 @@
} else if ( obj instanceof Boolean ) {
return getXMLText( (Boolean)obj );
} else {
- throw new IllegalArgumentException( QueryPlugin.Util.getString(ErrorMessageKeys.MAPPING_0011, obj.getClass().getName() ));
+ throw new IllegalArgumentException( QueryPlugin.Util.getString("ERR.015.002.0011", obj.getClass().getName() )); //$NON-NLS-1$
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/metadata/TransformationMetadata.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/metadata/TransformationMetadata.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/metadata/TransformationMetadata.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -49,7 +49,6 @@
import org.teiid.core.util.LRUCache;
import org.teiid.core.util.ObjectConverterUtil;
import org.teiid.core.util.StringUtil;
-import org.teiid.dqp.DQPPlugin;
import org.teiid.metadata.AbstractMetadataRecord;
import org.teiid.metadata.Column;
import org.teiid.metadata.ColumnSet;
@@ -126,7 +125,7 @@
public static final String DELIMITER_STRING = String.valueOf(DELIMITER_CHAR);
// error message cached to avoid i18n lookup each time
- public static String NOT_EXISTS_MESSAGE = StringUtil.Constants.SPACE+DQPPlugin.Util.getString("TransformationMetadata.does_not_exist._1"); //$NON-NLS-1$
+ public static String NOT_EXISTS_MESSAGE = StringUtil.Constants.SPACE+QueryPlugin.Util.getString("TransformationMetadata.does_not_exist._1"); //$NON-NLS-1$
private static Properties EMPTY_PROPS = new Properties();
@@ -204,7 +203,7 @@
Collection<String> filteredResult = new ArrayList<String>(matches.size());
for (Table table : matches) {
- if (vdbMetaData == null || vdbMetaData.getModel(table.getParent().getName()).isVisible()) {
+ if (vdbMetaData == null || vdbMetaData.isVisible(table.getParent().getName())) {
filteredResult.add(table.getFullName());
}
}
@@ -221,7 +220,7 @@
if (parent == null) {
throw createInvalidRecordTypeException(groupOrElementID);
}
- parent = metadataRecord.getParent();
+ parent = parent.getParent();
if (parent instanceof Schema) {
return parent;
}
@@ -355,7 +354,7 @@
for (StoredProcedureInfo storedProcedureInfo : results) {
Schema schema = (Schema)storedProcedureInfo.getModelID();
- if(vdbMetaData == null || vdbMetaData.getModel(schema.getName()).isVisible()){
+ if(vdbMetaData == null || vdbMetaData.isVisible(schema.getName())){
if (result != null) {
throw new QueryMetadataException(QueryPlugin.Util.getString("ambiguous_procedure", fullyQualifiedProcedureName)); //$NON-NLS-1$
}
@@ -457,7 +456,7 @@
Table tableRecord = (Table) groupID;
if (!tableRecord.isVirtual()) {
- throw new QueryMetadataException(DQPPlugin.Util.getString("TransformationMetadata.QueryPlan_could_not_be_found_for_physical_group__6")+tableRecord.getFullName()); //$NON-NLS-1$
+ throw new QueryMetadataException(QueryPlugin.Util.getString("TransformationMetadata.QueryPlan_could_not_be_found_for_physical_group__6")+tableRecord.getFullName()); //$NON-NLS-1$
}
String transQuery = tableRecord.getSelectTransformation();
QueryNode queryNode = new QueryNode(tableRecord.getFullName(), transQuery);
@@ -477,7 +476,7 @@
ArgCheck.isInstanceOf(Table.class, groupID);
Table tableRecordImpl = (Table)groupID;
if (!tableRecordImpl.isVirtual()) {
- throw new QueryMetadataException(DQPPlugin.Util.getString("TransformationMetadata.InsertPlan_could_not_be_found_for_physical_group__8")+tableRecordImpl.getFullName()); //$NON-NLS-1$
+ throw new QueryMetadataException(QueryPlugin.Util.getString("TransformationMetadata.InsertPlan_could_not_be_found_for_physical_group__8")+tableRecordImpl.getFullName()); //$NON-NLS-1$
}
return ((Table)groupID).getInsertPlan();
}
@@ -486,7 +485,7 @@
ArgCheck.isInstanceOf(Table.class, groupID);
Table tableRecordImpl = (Table)groupID;
if (!tableRecordImpl.isVirtual()) {
- throw new QueryMetadataException(DQPPlugin.Util.getString("TransformationMetadata.InsertPlan_could_not_be_found_for_physical_group__10")+tableRecordImpl.getFullName()); //$NON-NLS-1$
+ throw new QueryMetadataException(QueryPlugin.Util.getString("TransformationMetadata.InsertPlan_could_not_be_found_for_physical_group__10")+tableRecordImpl.getFullName()); //$NON-NLS-1$
}
return ((Table)groupID).getUpdatePlan();
}
@@ -495,7 +494,7 @@
ArgCheck.isInstanceOf(Table.class, groupID);
Table tableRecordImpl = (Table)groupID;
if (!tableRecordImpl.isVirtual()) {
- throw new QueryMetadataException(DQPPlugin.Util.getString("TransformationMetadata.DeletePlan_could_not_be_found_for_physical_group__12")+tableRecordImpl.getFullName()); //$NON-NLS-1$
+ throw new QueryMetadataException(QueryPlugin.Util.getString("TransformationMetadata.DeletePlan_could_not_be_found_for_physical_group__12")+tableRecordImpl.getFullName()); //$NON-NLS-1$
}
return ((Table)groupID).getDeletePlan();
}
@@ -506,7 +505,7 @@
switch(modelConstant) {
default:
- throw new UnsupportedOperationException(DQPPlugin.Util.getString("TransformationMetadata.Unknown_support_constant___12") + modelConstant); //$NON-NLS-1$
+ throw new UnsupportedOperationException(QueryPlugin.Util.getString("TransformationMetadata.Unknown_support_constant___12") + modelConstant); //$NON-NLS-1$
}
}
@@ -519,7 +518,7 @@
case SupportConstants.Group.UPDATE:
return tableRecord.supportsUpdate();
default:
- throw new UnsupportedOperationException(DQPPlugin.Util.getString("TransformationMetadata.Unknown_support_constant___12") + groupConstant); //$NON-NLS-1$
+ throw new UnsupportedOperationException(QueryPlugin.Util.getString("TransformationMetadata.Unknown_support_constant___12") + groupConstant); //$NON-NLS-1$
}
}
@@ -554,7 +553,7 @@
case SupportConstants.Element.SIGNED:
return columnRecord.isSigned();
default:
- throw new UnsupportedOperationException(DQPPlugin.Util.getString("TransformationMetadata.Unknown_support_constant___12") + elementConstant); //$NON-NLS-1$
+ throw new UnsupportedOperationException(QueryPlugin.Util.getString("TransformationMetadata.Unknown_support_constant___12") + elementConstant); //$NON-NLS-1$
}
} else if(elementID instanceof ProcedureParameter) {
ProcedureParameter columnRecord = (ProcedureParameter) elementID;
@@ -583,7 +582,7 @@
case SupportConstants.Element.SIGNED:
return true;
default:
- throw new UnsupportedOperationException(DQPPlugin.Util.getString("TransformationMetadata.Unknown_support_constant___12") + elementConstant); //$NON-NLS-1$
+ throw new UnsupportedOperationException(QueryPlugin.Util.getString("TransformationMetadata.Unknown_support_constant___12") + elementConstant); //$NON-NLS-1$
}
} else {
@@ -592,7 +591,7 @@
}
private IllegalArgumentException createInvalidRecordTypeException(Object elementID) {
- return new IllegalArgumentException(DQPPlugin.Util.getString("TransformationMetadata.Invalid_type", elementID.getClass().getName())); //$NON-NLS-1$
+ return new IllegalArgumentException(QueryPlugin.Util.getString("TransformationMetadata.Invalid_type", elementID.getClass().getName())); //$NON-NLS-1$
}
public int getMaxSetSize(final Object modelID) throws TeiidComponentException, QueryMetadataException {
@@ -717,7 +716,7 @@
mappingDoc = reader.loadDocument(inputStream);
mappingDoc.setName(groupName);
} catch (Exception e){
- throw new TeiidComponentException(e, DQPPlugin.Util.getString("TransformationMetadata.Error_trying_to_read_virtual_document_{0},_with_body__n{1}_1", groupName, mappingDoc)); //$NON-NLS-1$
+ throw new TeiidComponentException(e, QueryPlugin.Util.getString("TransformationMetadata.Error_trying_to_read_virtual_document_{0},_with_body__n{1}_1", groupName, mappingDoc)); //$NON-NLS-1$
} finally {
try {
inputStream.close();
@@ -792,7 +791,7 @@
}
if (schema == null) {
- throw new QueryMetadataException(DQPPlugin.Util.getString("TransformationMetadata.Error_trying_to_read_schemas_for_the_document/table____1")+groupName); //$NON-NLS-1$
+ throw new QueryMetadataException(QueryPlugin.Util.getString("TransformationMetadata.Error_trying_to_read_schemas_for_the_document/table____1")+groupName); //$NON-NLS-1$
}
schemas.add(schema);
}
@@ -949,7 +948,7 @@
return null;
}
Resource r = this.vdbEntries.get(resourcePath);
- if (r != null && r.visible) {
+ if (r != null) {
return r.file;
}
return null;
@@ -982,10 +981,8 @@
public String[] getVDBResourcePaths() throws TeiidComponentException, QueryMetadataException {
LinkedList<String> paths = new LinkedList<String>();
for (Map.Entry<String, Resource> entry : this.vdbEntries.entrySet()) {
- if (entry.getValue().visible) {
- paths.add(entry.getKey());
- }
- }
+ paths.add(entry.getKey());
+ }
return paths.toArray(new String[paths.size()]);
}
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/BatchedUpdatePlanner.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/BatchedUpdatePlanner.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/BatchedUpdatePlanner.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -31,8 +31,8 @@
import org.teiid.core.TeiidRuntimeException;
import org.teiid.core.id.IDGenerator;
import org.teiid.core.id.IntegerID;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.analysis.AnalysisRecord;
-import org.teiid.query.execution.QueryExecPlugin;
import org.teiid.query.metadata.QueryMetadataInterface;
import org.teiid.query.optimizer.capabilities.CapabilitiesFinder;
import org.teiid.query.optimizer.capabilities.SourceCapabilities;
@@ -195,7 +195,7 @@
} else if (type == Command.TYPE_DELETE) {
return ((Delete)command).getGroup();
}
- throw new TeiidRuntimeException(QueryExecPlugin.Util.getString("BatchedUpdatePlanner.unrecognized_command", command)); //$NON-NLS-1$
+ throw new TeiidRuntimeException(QueryPlugin.Util.getString("BatchedUpdatePlanner.unrecognized_command", command)); //$NON-NLS-1$
}
/**
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/ProcedurePlanner.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/ProcedurePlanner.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/ProcedurePlanner.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -27,8 +27,8 @@
import org.teiid.core.TeiidComponentException;
import org.teiid.core.id.IDGenerator;
import org.teiid.core.util.Assertion;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.analysis.AnalysisRecord;
-import org.teiid.query.execution.QueryExecPlugin;
import org.teiid.query.metadata.QueryMetadataInterface;
import org.teiid.query.optimizer.capabilities.CapabilitiesFinder;
import org.teiid.query.processor.ProcessorPlan;
@@ -288,7 +288,7 @@
break;
}
default:
- throw new QueryPlannerException(QueryExecPlugin.Util.getString("ProcedurePlanner.bad_stmt", stmtType)); //$NON-NLS-1$
+ throw new QueryPlannerException(QueryPlugin.Util.getString("ProcedurePlanner.bad_stmt", stmtType)); //$NON-NLS-1$
}
return instruction;
}
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/relational/PlanToProcessConverter.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/relational/PlanToProcessConverter.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/relational/PlanToProcessConverter.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -36,8 +36,8 @@
import org.teiid.core.id.IntegerID;
import org.teiid.core.id.IntegerIDFactory;
import org.teiid.core.util.Assertion;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.analysis.AnalysisRecord;
-import org.teiid.query.execution.QueryExecPlugin;
import org.teiid.query.metadata.QueryMetadataInterface;
import org.teiid.query.metadata.TempMetadataID;
import org.teiid.query.optimizer.capabilities.CapabilitiesFinder;
@@ -95,7 +95,6 @@
import org.teiid.query.sql.util.SymbolMap;
import org.teiid.query.sql.visitor.EvaluatableVisitor;
import org.teiid.query.sql.visitor.GroupCollectorVisitor;
-import org.teiid.query.util.ErrorMessageKeys;
public class PlanToProcessConverter {
@@ -447,7 +446,7 @@
break;
default:
- throw new QueryPlannerException(QueryExecPlugin.Util.getString(ErrorMessageKeys.OPTIMIZER_0007, NodeConstants.getNodeTypeString(node.getType())));
+ throw new QueryPlannerException(QueryPlugin.Util.getString("ERR.015.004.0007", NodeConstants.getNodeTypeString(node.getType()))); //$NON-NLS-1$
}
if(processNode != null) {
@@ -472,7 +471,8 @@
return aNode;
}
GroupSymbol group = node.getGroups().iterator().next();
- if (!CoreConstants.SYSTEM_MODEL.equals(metadata.getFullName(metadata.getModelID(group.getMetadataID())))) {
+ if (!CoreConstants.SYSTEM_MODEL.equals(metadata.getFullName(metadata.getModelID(group.getMetadataID())))
+ && !CoreConstants.SYSTEM_ADMIN_MODEL.equals(metadata.getFullName(metadata.getModelID(group.getMetadataID())))) {
return aNode;
}
List projectSymbols = (List) node.getProperty(NodeConstants.Info.OUTPUT_COLS);
@@ -538,7 +538,7 @@
String cbName = metadata.getFullName(modelID);
return cbName;
} catch(QueryMetadataException e) {
- throw new QueryPlannerException(e, QueryExecPlugin.Util.getString(ErrorMessageKeys.OPTIMIZER_0009));
+ throw new QueryPlannerException(e, QueryPlugin.Util.getString("ERR.015.004.0009")); //$NON-NLS-1$
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/relational/RelationalPlanner.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/relational/RelationalPlanner.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/relational/RelationalPlanner.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -46,7 +46,6 @@
import org.teiid.language.SQLConstants;
import org.teiid.query.QueryPlugin;
import org.teiid.query.analysis.AnalysisRecord;
-import org.teiid.query.execution.QueryExecPlugin;
import org.teiid.query.mapping.relational.QueryNode;
import org.teiid.query.metadata.QueryMetadataInterface;
import org.teiid.query.metadata.TempMetadataAdapter;
@@ -105,7 +104,6 @@
import org.teiid.query.sql.visitor.GroupsUsedByElementsVisitor;
import org.teiid.query.sql.visitor.ValueIteratorProviderCollectorVisitor;
import org.teiid.query.util.CommandContext;
-import org.teiid.query.util.ErrorMessageKeys;
import org.teiid.query.validator.ValidationVisitor;
@@ -261,7 +259,7 @@
}
if(! appliedHint) {
- String msg = QueryExecPlugin.Util.getString(ErrorMessageKeys.OPTIMIZER_0010, groupName);
+ String msg = QueryPlugin.Util.getString("ERR.015.004.0010", groupName); //$NON-NLS-1$
if (this.analysisRecord.recordAnnotations()) {
this.analysisRecord.addAnnotation(new Annotation(Annotation.HINTS, msg, "ignoring hint", Priority.MEDIUM)); //$NON-NLS-1$
}
@@ -1036,7 +1034,7 @@
try {
result = QueryParser.getQueryParser().parseCommand(qnode.getQuery());
} catch(QueryParserException e) {
- throw new QueryResolverException(e, ErrorMessageKeys.RESOLVER_0011, QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0011, qnode.getGroupName()));
+ throw new QueryResolverException(e, "ERR.015.008.0011", QueryPlugin.Util.getString("ERR.015.008.0011", qnode.getGroupName())); //$NON-NLS-1$ //$NON-NLS-2$
}
//Handle bindings and references
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/relational/plantree/PlanNode.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/relational/plantree/PlanNode.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/relational/plantree/PlanNode.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -378,5 +378,13 @@
}
return ValueIteratorProviderCollectorVisitor.getValueIteratorProviders(toSearch);
}
+
+ public float getCardinality() {
+ Float cardinality = (Float) this.getProperty(NodeConstants.Info.EST_CARDINALITY);
+ if (cardinality == null) {
+ return -1f;
+ }
+ return cardinality;
+ }
}
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/CriteriaCapabilityValidatorVisitor.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/CriteriaCapabilityValidatorVisitor.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/CriteriaCapabilityValidatorVisitor.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -27,7 +27,8 @@
import org.teiid.api.exception.query.QueryMetadataException;
import org.teiid.core.TeiidComponentException;
-import org.teiid.query.execution.QueryExecPlugin;
+import org.teiid.query.QueryPlugin;
+import org.teiid.query.analysis.AnalysisRecord;
import org.teiid.query.function.metadata.FunctionMethod;
import org.teiid.query.metadata.QueryMetadataInterface;
import org.teiid.query.metadata.SupportConstants;
@@ -83,6 +84,7 @@
private Object modelID;
private QueryMetadataInterface metadata;
private CapabilitiesFinder capFinder;
+ private AnalysisRecord analysisRecord;
// Retrieved during initialization and cached
private SourceCapabilities caps;
@@ -105,48 +107,48 @@
@Override
public void visit(XMLAttributes obj) {
- markInvalid();
+ markInvalid(obj, "Pushdown of XMLAttributes not allowed"); //$NON-NLS-1$
}
@Override
public void visit(XMLNamespaces obj) {
- markInvalid();
+ markInvalid(obj, "Pushdown of XMLNamespaces not allowed"); //$NON-NLS-1$
}
@Override
public void visit(XMLForest obj) {
- markInvalid();
+ markInvalid(obj, "Pushdown of XMLForest not allowed"); //$NON-NLS-1$
}
@Override
public void visit(XMLElement obj) {
- markInvalid();
+ markInvalid(obj, "Pushdown of XMLElement not allowed"); //$NON-NLS-1$
}
@Override
public void visit(XMLSerialize obj) {
- markInvalid();
+ markInvalid(obj, "Pushdown of XMLSerialize not allowed"); //$NON-NLS-1$
}
@Override
public void visit(XMLParse obj) {
- markInvalid();
+ markInvalid(obj, "Pushdown of XMLParse not allowed"); //$NON-NLS-1$
}
@Override
public void visit(XMLQuery obj) {
- markInvalid();
+ markInvalid(obj, "Pushdown of XMLQuery not allowed"); //$NON-NLS-1$
}
@Override
public void visit(QueryString obj) {
- markInvalid();
+ markInvalid(obj, "Pushdown of QueryString not allowed"); //$NON-NLS-1$
}
public void visit(AggregateSymbol obj) {
try {
if(! CapabilitiesUtil.supportsAggregateFunction(modelID, obj, metadata, capFinder)) {
- markInvalid();
+ markInvalid(obj, "Aggregate function pushdown not supported by source"); //$NON-NLS-1$
}
} catch(QueryMetadataException e) {
handleException(new TeiidComponentException(e));
@@ -157,7 +159,7 @@
public void visit(CaseExpression obj) {
if(! this.caps.supportsCapability(Capability.QUERY_CASE)) {
- markInvalid();
+ markInvalid(obj, "CaseExpression pushdown not supported by source"); //$NON-NLS-1$
}
}
@@ -186,10 +188,12 @@
// Check if compares are allowed
if(! this.caps.supportsCapability(operatorCap)) {
- markInvalid();
+ markInvalid(obj, "ordered CompareCriteria not supported by source"); //$NON-NLS-1$
+ return;
}
if (negated && !this.caps.supportsCapability(Capability.CRITERIA_NOT)) {
- markInvalid();
+ markInvalid(obj, "Negation is not supported by source"); //$NON-NLS-1$
+ return;
}
// Check capabilities of the elements
@@ -206,12 +210,8 @@
int operator = crit.getOperator();
// Verify capabilities are supported
- if(operator == CompoundCriteria.OR) {
- // Check if OR is allowed
- if(! this.caps.supportsCapability(Capability.CRITERIA_OR)) {
- markInvalid();
- return;
- }
+ if(operator == CompoundCriteria.OR && !this.caps.supportsCapability(Capability.CRITERIA_OR)) {
+ markInvalid(crit, "OR criteria not supported by source"); //$NON-NLS-1$
}
}
@@ -221,9 +221,13 @@
if (EvaluatableVisitor.willBecomeConstant(obj, true)) {
return;
}
- if(obj.getFunctionDescriptor().getPushdown() == FunctionMethod.CANNOT_PUSHDOWN || ! CapabilitiesUtil.supportsScalarFunction(modelID, obj, metadata, capFinder)) {
- markInvalid();
+ if(obj.getFunctionDescriptor().getPushdown() == FunctionMethod.CANNOT_PUSHDOWN) {
+ markInvalid(obj, "Function metadata indicates it cannot be pusheddown."); //$NON-NLS-1$
+ return;
}
+ if (! CapabilitiesUtil.supportsScalarFunction(modelID, obj, metadata, capFinder)) {
+ markInvalid(obj, obj.isImplicit()?"":"(implicit) convert" + " Function not supported by source"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
} catch(QueryMetadataException e) {
handleException(new TeiidComponentException(e));
} catch(TeiidComponentException e) {
@@ -234,12 +238,12 @@
public void visit(IsNullCriteria obj) {
// Check if compares are allowed
if(! this.caps.supportsCapability(Capability.CRITERIA_ISNULL)) {
- markInvalid();
+ markInvalid(obj, "IsNull not supported by source"); //$NON-NLS-1$
return;
}
if (obj.isNegated() && !this.caps.supportsCapability(Capability.CRITERIA_NOT)) {
- markInvalid();
+ markInvalid(obj, "Negation is not supported by source"); //$NON-NLS-1$
return;
}
}
@@ -247,21 +251,21 @@
public void visit(MatchCriteria obj) {
// Check if compares are allowed
if(! this.caps.supportsCapability(Capability.CRITERIA_LIKE)) {
- markInvalid();
+ markInvalid(obj, "Like is not supported by source"); //$NON-NLS-1$
return;
}
// Check ESCAPE char if necessary
if(obj.getEscapeChar() != MatchCriteria.NULL_ESCAPE_CHAR) {
if(! this.caps.supportsCapability(Capability.CRITERIA_LIKE_ESCAPE)) {
- markInvalid();
+ markInvalid(obj, "Like escape is not supported by source"); //$NON-NLS-1$
return;
}
}
//check NOT
if(obj.isNegated() && ! this.caps.supportsCapability(Capability.CRITERIA_NOT)) {
- markInvalid();
+ markInvalid(obj, "Negation is not supported by source"); //$NON-NLS-1$
return;
}
@@ -278,18 +282,14 @@
public void visit(NotCriteria obj) {
// Check if compares are allowed
if(! this.caps.supportsCapability(Capability.CRITERIA_NOT)) {
- markInvalid();
+ markInvalid(obj, "Negation is not supported by source"); //$NON-NLS-1$
return;
}
}
public void visit(SearchedCaseExpression obj) {
- if (this.caps == null) {
- return;
- }
-
if(! this.caps.supportsCapability(Capability.QUERY_SEARCHED_CASE)) {
- markInvalid();
+ markInvalid(obj, "SearchedCase is not supported by source"); //$NON-NLS-1$
}
}
@@ -299,7 +299,7 @@
int maxSize = CapabilitiesUtil.getMaxInCriteriaSize(modelID, metadata, capFinder);
if (maxSize > 0 && crit.getValues().size() > maxSize) {
- markInvalid();
+ markInvalid(crit, "SetCriteria size exceeds maximum for source"); //$NON-NLS-1$
return;
}
} catch(QueryMetadataException e) {
@@ -315,13 +315,13 @@
public void visit(ExistsCriteria crit) {
// Check if exists criteria are allowed
if(! this.caps.supportsCapability(Capability.CRITERIA_EXISTS)) {
- markInvalid();
+ markInvalid(crit, "Exists is not supported by source"); //$NON-NLS-1$
return;
}
try {
- if (validateSubqueryPushdown(crit, modelID, metadata, capFinder) == null) {
- markInvalid();
+ if (validateSubqueryPushdown(crit, modelID, metadata, capFinder, analysisRecord) == null) {
+ markInvalid(crit.getCommand(), "Subquery cannot be pushed down"); //$NON-NLS-1$
}
} catch (TeiidComponentException e) {
handleException(e);
@@ -346,7 +346,7 @@
break;
}
if(! this.caps.supportsCapability(capability)) {
- markInvalid();
+ markInvalid(crit, "SubqueryCompare not supported by source"); //$NON-NLS-1$
return;
}
@@ -354,8 +354,8 @@
// Check capabilities of the elements
try {
- if (validateSubqueryPushdown(crit, modelID, metadata, capFinder) == null) {
- markInvalid();
+ if (validateSubqueryPushdown(crit, modelID, metadata, capFinder, analysisRecord) == null) {
+ markInvalid(crit.getCommand(), "Subquery cannot be pushed down"); //$NON-NLS-1$
}
} catch(QueryMetadataException e) {
handleException(new TeiidComponentException(e));
@@ -368,11 +368,12 @@
public void visit(ScalarSubquery obj) {
try {
if(!this.caps.supportsCapability(Capability.QUERY_SUBQUERIES_SCALAR)
- || validateSubqueryPushdown(obj, modelID, metadata, capFinder) == null) {
+ || validateSubqueryPushdown(obj, modelID, metadata, capFinder, analysisRecord) == null) {
if (obj.getCommand().getCorrelatedReferences() == null) {
obj.setShouldEvaluate(true);
} else {
- markInvalid();
+ markInvalid(obj.getCommand(), !this.caps.supportsCapability(Capability.QUERY_SUBQUERIES_SCALAR)?
+ "Correlated ScalarSubquery is not supported":"Subquery cannot be pushed down"); //$NON-NLS-1$ //$NON-NLS-2$
}
}
} catch(QueryMetadataException e) {
@@ -387,12 +388,12 @@
try {
// Check if compares with subqueries are allowed
if(! this.caps.supportsCapability(Capability.CRITERIA_IN_SUBQUERY)) {
- markInvalid();
+ markInvalid(crit, "SubqueryIn is not supported by source"); //$NON-NLS-1$
return;
}
- if (validateSubqueryPushdown(crit, modelID, metadata, capFinder) == null) {
- markInvalid();
+ if (validateSubqueryPushdown(crit, modelID, metadata, capFinder, analysisRecord) == null) {
+ markInvalid(crit.getCommand(), "Subquery cannot be pushed down"); //$NON-NLS-1$
}
} catch(QueryMetadataException e) {
handleException(new TeiidComponentException(e));
@@ -405,12 +406,12 @@
try {
// Check if compares are allowed
if(! this.caps.supportsCapability(Capability.CRITERIA_IN)) {
- markInvalid();
+ markInvalid(crit, "In is not supported by source"); //$NON-NLS-1$
return;
}
if (crit.isNegated() && !this.caps.supportsCapability(Capability.CRITERIA_NOT)) {
- markInvalid();
+ markInvalid(crit, "Negation is not supported by source"); //$NON-NLS-1$
return;
}
// Check capabilities of the elements
@@ -431,7 +432,7 @@
private void checkElementsAreSearchable(LanguageObject crit, int searchableType)
throws QueryMetadataException, TeiidComponentException {
if (!CapabilitiesUtil.checkElementsAreSearchable(Arrays.asList(crit), metadata, searchableType)) {
- markInvalid();
+ markInvalid(crit, "not all source columns support search type"); //$NON-NLS-1$
}
}
@@ -445,7 +446,7 @@
* @return
* @throws TeiidComponentException
*/
- static Object validateSubqueryPushdown(SubqueryContainer subqueryContainer, Object critNodeModelID, QueryMetadataInterface metadata, CapabilitiesFinder capFinder) throws TeiidComponentException {
+ static Object validateSubqueryPushdown(SubqueryContainer subqueryContainer, Object critNodeModelID, QueryMetadataInterface metadata, CapabilitiesFinder capFinder, AnalysisRecord analysisRecord) throws TeiidComponentException {
ProcessorPlan plan = subqueryContainer.getCommand().getProcessorPlan();
if (plan != null) {
if(!(plan instanceof RelationalPlan)) {
@@ -482,7 +483,7 @@
return null;
}
} catch(QueryMetadataException e) {
- throw new TeiidComponentException(e, QueryExecPlugin.Util.getString("RulePushSelectCriteria.Error_getting_modelID")); //$NON-NLS-1$
+ throw new TeiidComponentException(e, QueryPlugin.Util.getString("RulePushSelectCriteria.Error_getting_modelID")); //$NON-NLS-1$
}
}
if (critNodeModelID == null) {
@@ -497,7 +498,7 @@
}
//TODO: this check sees as correlated references as coming from the containing scope
//but this is only an issue with deeply nested subqueries
- if (!CriteriaCapabilityValidatorVisitor.canPushLanguageObject(subqueryContainer.getCommand(), critNodeModelID, metadata, capFinder)) {
+ if (!CriteriaCapabilityValidatorVisitor.canPushLanguageObject(subqueryContainer.getCommand(), critNodeModelID, metadata, capFinder, analysisRecord )) {
return null;
}
}
@@ -519,16 +520,19 @@
return this.exception;
}
- private void markInvalid() {
+ private void markInvalid(LanguageObject object, String reason) {
this.valid = false;
setAbort(true);
+ if (analysisRecord != null && analysisRecord.recordDebug()) {
+ analysisRecord.println(reason + " " + object); //$NON-NLS-1$
+ }
}
public boolean isValid() {
return this.valid;
}
- public static boolean canPushLanguageObject(LanguageObject obj, Object modelID, QueryMetadataInterface metadata, CapabilitiesFinder capFinder) throws QueryMetadataException, TeiidComponentException {
+ public static boolean canPushLanguageObject(LanguageObject obj, Object modelID, QueryMetadataInterface metadata, CapabilitiesFinder capFinder, AnalysisRecord analysisRecord) throws QueryMetadataException, TeiidComponentException {
if(obj == null) {
return true;
}
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/FrameUtil.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/FrameUtil.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/FrameUtil.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -40,7 +40,7 @@
import org.teiid.core.TeiidRuntimeException;
import org.teiid.core.types.DataTypeManager;
import org.teiid.core.util.Assertion;
-import org.teiid.query.execution.QueryExecPlugin;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.metadata.QueryMetadataInterface;
import org.teiid.query.optimizer.relational.plantree.NodeConstants;
import org.teiid.query.optimizer.relational.plantree.NodeEditor;
@@ -67,7 +67,6 @@
import org.teiid.query.sql.visitor.ElementCollectorVisitor;
import org.teiid.query.sql.visitor.ExpressionMappingVisitor;
import org.teiid.query.sql.visitor.GroupsUsedByElementsVisitor;
-import org.teiid.query.util.ErrorMessageKeys;
public class FrameUtil {
@@ -300,7 +299,7 @@
try {
return QueryRewriter.rewriteCriteria(criteria, null, null, metadata);
} catch(TeiidProcessingException e) {
- throw new QueryPlannerException(e, QueryExecPlugin.Util.getString(ErrorMessageKeys.OPTIMIZER_0023, criteria));
+ throw new QueryPlannerException(e, QueryPlugin.Util.getString("ERR.015.004.0023", criteria)); //$NON-NLS-1$
} catch (TeiidComponentException e) {
throw new TeiidRuntimeException(e);
}
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/JoinRegion.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/JoinRegion.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/JoinRegion.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -42,6 +42,7 @@
import org.teiid.query.optimizer.relational.plantree.PlanNode;
import org.teiid.query.resolver.util.AccessPattern;
import org.teiid.query.sql.lang.CompareCriteria;
+import org.teiid.query.sql.lang.CompoundCriteria;
import org.teiid.query.sql.lang.Criteria;
import org.teiid.query.sql.symbol.ElementSymbol;
import org.teiid.query.sql.symbol.Expression;
@@ -233,8 +234,10 @@
* @param joinOrder
* @param metadata
* @return
+ * @throws TeiidComponentException
+ * @throws QueryMetadataException
*/
- public double scoreRegion(Object[] joinOrder, QueryMetadataInterface metadata) {
+ public double scoreRegion(Object[] joinOrder, QueryMetadataInterface metadata) throws QueryMetadataException, TeiidComponentException {
List<Map.Entry<PlanNode, PlanNode>> joinSourceEntries = new ArrayList<Map.Entry<PlanNode, PlanNode>>(joinSourceNodes.entrySet());
double totalIntermediatCost = 0;
double cost = 1;
@@ -263,17 +266,35 @@
float sourceCost = ((Float)joinSourceRoot.getProperty(NodeConstants.Info.EST_CARDINALITY)).floatValue();
- if (sourceCost == NewCalculateCostUtil.UNKNOWN_VALUE) {
- sourceCost = UNKNOWN_TUPLE_EST;
+ List<PlanNode> applicableCriteria = null;
+
+ if (!criteria.isEmpty() && i > 0) {
+ applicableCriteria = getJoinCriteriaForGroups(groups, criteria);
+ }
+
+ if (sourceCost == NewCalculateCostUtil.UNKNOWN_VALUE) {
+ sourceCost = UNKNOWN_TUPLE_EST;
+ if (applicableCriteria != null && !applicableCriteria.isEmpty()) {
+ CompoundCriteria cc = new CompoundCriteria();
+ for (PlanNode planNode : applicableCriteria) {
+ cc.addCriteria((Criteria) planNode.getProperty(NodeConstants.Info.SELECT_CRITERIA));
+ }
+ sourceCost = (float)cost;
+ criteria.removeAll(applicableCriteria);
+ applicableCriteria = null;
+ if (NewCalculateCostUtil.usesKey(cc, metadata)) {
+ sourceCost = Math.min(UNKNOWN_TUPLE_EST, sourceCost * Math.min(NewCalculateCostUtil.UNKNOWN_JOIN_SCALING, sourceCost));
+ } else {
+ sourceCost = Math.min(UNKNOWN_TUPLE_EST, sourceCost * Math.min(NewCalculateCostUtil.UNKNOWN_JOIN_SCALING * 2, sourceCost));
+ }
+ }
} else if (Double.isInfinite(sourceCost) || Double.isNaN(sourceCost)) {
- sourceCost = UNKNOWN_TUPLE_EST * 10;
+ return Double.MAX_VALUE;
}
-
+
cost *= sourceCost;
- if (!criteria.isEmpty() && i > 0) {
- List<PlanNode> applicableCriteria = getJoinCriteriaForGroups(groups, criteria);
-
+ if (applicableCriteria != null) {
for (PlanNode criteriaNode : applicableCriteria) {
float filter = ((Float)criteriaNode.getProperty(NodeConstants.Info.EST_SELECTIVITY)).floatValue();
@@ -282,7 +303,6 @@
criteria.removeAll(applicableCriteria);
}
-
totalIntermediatCost += cost;
}
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/NewCalculateCostUtil.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/NewCalculateCostUtil.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/NewCalculateCostUtil.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -76,7 +76,8 @@
*/
public class NewCalculateCostUtil {
- public static final float UNKNOWN_VALUE = -1;
+ public static final int UNKNOWN_JOIN_SCALING = 20;
+ public static final float UNKNOWN_VALUE = -1;
// the following variables are used to hold cost estimates (roughly in milliseconds)
private final static float compareTime = .05f; //TODO: a better estimate would be based upon the number of conjuncts
@@ -181,13 +182,13 @@
case NodeConstants.Types.TUPLE_LIMIT:
{
PlanNode child = node.getFirstChild();
- Float childCost = (Float)child.getProperty(NodeConstants.Info.EST_CARDINALITY);
+ float childCost = child.getCardinality();
Expression offset = (Expression)node.getProperty(NodeConstants.Info.OFFSET_TUPLE_COUNT);
Float cost = childCost;
- if (childCost.floatValue() != UNKNOWN_VALUE && offset instanceof Constant) {
- float offsetCost = childCost.floatValue() - ((Number)((Constant)offset).getValue()).floatValue();
+ if (childCost != UNKNOWN_VALUE && offset instanceof Constant) {
+ float offsetCost = childCost - ((Number)((Constant)offset).getValue()).floatValue();
cost = new Float((offsetCost < 0) ? 0 : offsetCost);
}
@@ -277,39 +278,43 @@
private static void estimateJoinNodeCost(PlanNode node, QueryMetadataInterface metadata)
throws QueryMetadataException, TeiidComponentException {
- Iterator children = node.getChildren().iterator();
- PlanNode child1 = (PlanNode)children.next();
- Float childCost1 = (Float)child1.getProperty(NodeConstants.Info.EST_CARDINALITY);
- PlanNode child2 = (PlanNode)children.next();
- Float childCost2 = (Float)child2.getProperty(NodeConstants.Info.EST_CARDINALITY);
- if (childCost1 != null && childCost2 != null && childCost1.floatValue() != UNKNOWN_VALUE && childCost2.floatValue() != UNKNOWN_VALUE){
+ Iterator<PlanNode> children = node.getChildren().iterator();
+ PlanNode child1 = children.next();
+ float childCost1 = child1.getCardinality();
+ PlanNode child2 = children.next();
+ float childCost2 = child2.getCardinality();
+
+ if (childCost1 == UNKNOWN_VALUE || childCost2 == UNKNOWN_VALUE) {
+ setCardinalityEstimate(node, null);
+ return;
+ }
- JoinType joinType = (JoinType)node.getProperty(NodeConstants.Info.JOIN_TYPE);
- List joinCriteria = (List) node.getProperty(NodeConstants.Info.JOIN_CRITERIA);
-
- float baseCost = childCost1.floatValue() * childCost2.floatValue();
- if (joinCriteria != null && !joinCriteria.isEmpty()) {
- Criteria crit = Criteria.combineCriteria(joinCriteria);
- baseCost = recursiveEstimateCostOfCriteria(baseCost, node, crit, metadata);
- }
-
- Float cost = null;
- if (JoinType.JOIN_CROSS.equals(joinType)){
- cost = new Float(baseCost);
- } else if (JoinType.JOIN_FULL_OUTER.equals(joinType)) {
- cost = new Float(Math.max((childCost1.floatValue()+childCost2.floatValue()),baseCost));
- } else if (JoinType.JOIN_LEFT_OUTER.equals(joinType)) {
- cost = new Float(Math.max(childCost1.floatValue(),baseCost));
- } else if (JoinType.JOIN_RIGHT_OUTER.equals(joinType)) {
- cost = new Float(Math.max(childCost2.floatValue(),baseCost));
- } else if (JoinType.JOIN_INNER.equals(joinType)) {
- cost = new Float(baseCost);
- }
-
- setCardinalityEstimate(node, cost);
- } else {
- setCardinalityEstimate(node, null);
+ JoinType joinType = (JoinType)node.getProperty(NodeConstants.Info.JOIN_TYPE);
+ List joinCriteria = (List) node.getProperty(NodeConstants.Info.JOIN_CRITERIA);
+
+ float baseCost = childCost1 * childCost2;
+
+ if (joinCriteria != null && !joinCriteria.isEmpty()) {
+ Criteria crit = Criteria.combineCriteria(joinCriteria);
+ //TODO: we may be able to get a fairly accurate join estimate if the
+ //unknown side is being joined with a key
+ baseCost = recursiveEstimateCostOfCriteria(baseCost, node, crit, metadata);
}
+
+ Float cost = null;
+ if (JoinType.JOIN_CROSS.equals(joinType)){
+ cost = new Float(baseCost);
+ } else if (JoinType.JOIN_FULL_OUTER.equals(joinType)) {
+ cost = new Float(Math.max((childCost1+childCost2),baseCost));
+ } else if (JoinType.JOIN_LEFT_OUTER.equals(joinType)) {
+ cost = new Float(Math.max(childCost1,baseCost));
+ } else if (JoinType.JOIN_RIGHT_OUTER.equals(joinType)) {
+ cost = new Float(Math.max(childCost2,baseCost));
+ } else if (JoinType.JOIN_INNER.equals(joinType)) {
+ cost = new Float(baseCost);
+ }
+
+ setCardinalityEstimate(node, cost);
}
/**
@@ -321,11 +326,7 @@
throws QueryMetadataException, TeiidComponentException {
PlanNode child = node.getFirstChild();
- Float childCostFloat = (Float)child.getProperty(NodeConstants.Info.EST_CARDINALITY);
- float childCost = UNKNOWN_VALUE;
- if (childCostFloat != null){
- childCost = childCostFloat.floatValue();
- }
+ float childCost = child.getCardinality();
//Get list of conjuncts
Criteria selectCriteria = (Criteria)node.getProperty(NodeConstants.Info.SELECT_CRITERIA);
@@ -350,10 +351,7 @@
//only cost non-correlated TODO: a better estimate for correlated
if (references == null) {
PlanNode child = node.getFirstChild();
- Float childCostFloat = (Float)child.getProperty(NodeConstants.Info.EST_CARDINALITY);
- if (childCostFloat != null) {
- cost = childCostFloat.floatValue();
- }
+ cost = child.getCardinality();
}
}else {
GroupSymbol group = node.getGroups().iterator().next();
@@ -379,7 +377,7 @@
throws QueryMetadataException, TeiidComponentException {
PlanNode child = node.getFirstChild();
- float childCost = ((Float)child.getProperty(NodeConstants.Info.EST_CARDINALITY)).floatValue();
+ float childCost = child.getCardinality();
if(childCost == UNKNOWN_VALUE) {
setCardinalityEstimate(node, null);
@@ -421,12 +419,9 @@
if (compCrit.getOperator() == CompoundCriteria.OR) {
cost = 0;
}
- HashSet<ElementSymbol> elements = new HashSet<ElementSymbol>();
- collectElementsOfValidCriteria(compCrit, elements);
- if (usesKey(elements, metadata)) {
+ if (usesKey(compCrit, metadata)) {
return 1;
}
-
for (Criteria critPart : compCrit.getCriteria()) {
float nextCost = recursiveEstimateCostOfCriteria(childCost, currentNode, critPart, metadata);
@@ -497,7 +492,7 @@
if(criteria instanceof CompoundCriteria) {
CompoundCriteria compCrit = (CompoundCriteria) criteria;
- Iterator iter = compCrit.getCriteria().iterator();
+ Iterator<Criteria> iter = compCrit.getCriteria().iterator();
boolean first = true;
Collection<ElementSymbol> savedElements = elements;
if(compCrit.getOperator() == CompoundCriteria.OR) {
@@ -505,11 +500,11 @@
}
while(iter.hasNext()) {
if(compCrit.getOperator() == CompoundCriteria.AND || first) {
- collectElementsOfValidCriteria((Criteria) iter.next(), elements);
+ collectElementsOfValidCriteria(iter.next(), elements);
first = false;
} else {
HashSet<ElementSymbol> other = new HashSet<ElementSymbol>();
- collectElementsOfValidCriteria((Criteria) iter.next(), other);
+ collectElementsOfValidCriteria(iter.next(), other);
elements.retainAll(other);
}
}
@@ -532,7 +527,6 @@
if (!setCriteria.isNegated()) {
ElementCollectorVisitor.getElements(setCriteria.getExpression(), elements);
}
-
} else if(criteria instanceof IsNullCriteria) {
IsNullCriteria isNullCriteria = (IsNullCriteria)criteria;
if (!isNullCriteria.isNegated()) {
@@ -769,6 +763,12 @@
&& usesKey(allElements, metadata);
}
+ public static boolean usesKey(Criteria crit, QueryMetadataInterface metadata) throws QueryMetadataException, TeiidComponentException {
+ HashSet<ElementSymbol> elements = new HashSet<ElementSymbol>();
+ collectElementsOfValidCriteria(crit, elements);
+ return usesKey(elements, metadata);
+ }
+
/**
* TODO: this uses key check is not really accurate, it doesn't take into consideration where
* we are in the plan.
@@ -849,8 +849,8 @@
}
} else if (cardinality != UNKNOWN_VALUE) {
int groupCardinality = metadata.getCardinality(elementSymbol.getGroupSymbol().getMetadataID());
- if (groupCardinality != UNKNOWN_VALUE) {
- ndv *= cardinality / Math.max(1, groupCardinality);
+ if (groupCardinality != UNKNOWN_VALUE && groupCardinality > cardinality) {
+ ndv *= cardinality / Math.max(1, groupCardinality);
}
}
result = Math.max(result, ndv);
@@ -948,7 +948,7 @@
/**
* Computes the cost of a Dependent Join
*
- * The worst possible cost will arise from a high independent ndv (many dependent sets) and a low depenendent ndv (possibly many matches per set)
+ * The worst possible cost will arise from a high independent ndv (many dependent sets) and a low dependent ndv (possibly many matches per set)
*
* This logic uses the same assumption as criteria in that ndv is used as a divisor of cardinality.
*
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleAccessPatternValidation.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleAccessPatternValidation.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleAccessPatternValidation.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -27,8 +27,8 @@
import java.util.List;
import org.teiid.api.exception.query.QueryPlannerException;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.analysis.AnalysisRecord;
-import org.teiid.query.execution.QueryExecPlugin;
import org.teiid.query.metadata.QueryMetadataInterface;
import org.teiid.query.optimizer.capabilities.CapabilitiesFinder;
import org.teiid.query.optimizer.relational.OptimizerRule;
@@ -41,7 +41,6 @@
import org.teiid.query.sql.lang.Update;
import org.teiid.query.sql.visitor.ElementCollectorVisitor;
import org.teiid.query.util.CommandContext;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -116,7 +115,7 @@
}
Object groups = node.getGroups();
- throw new QueryPlannerException(QueryExecPlugin.Util.getString(ErrorMessageKeys.OPTIMIZER_0012, new Object[] {groups, accessPatterns}));
+ throw new QueryPlannerException(QueryPlugin.Util.getString("ERR.015.004.0012", new Object[] {groups, accessPatterns})); //$NON-NLS-1$
}
public String toString() {
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleImplementJoinStrategy.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleImplementJoinStrategy.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleImplementJoinStrategy.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -150,7 +150,7 @@
if (NewCalculateCostUtil.usesKey(sourceNode, expressions, metadata)) {
joinNode.setProperty(joinNode.getFirstChild() == childNode ? NodeConstants.Info.IS_LEFT_DISTINCT : NodeConstants.Info.IS_RIGHT_DISTINCT, true);
}
- if (attemptPush && RuleRaiseAccess.canRaiseOverSort(sourceNode, metadata, capFinder, sortNode)) {
+ if (attemptPush && RuleRaiseAccess.canRaiseOverSort(sourceNode, metadata, capFinder, sortNode, null)) {
sourceNode.getFirstChild().addAsParent(sortNode);
if (needsCorrection) {
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePlanJoins.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePlanJoins.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePlanJoins.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -36,8 +36,8 @@
import org.teiid.api.exception.query.QueryMetadataException;
import org.teiid.api.exception.query.QueryPlannerException;
import org.teiid.core.TeiidComponentException;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.analysis.AnalysisRecord;
-import org.teiid.query.execution.QueryExecPlugin;
import org.teiid.query.metadata.QueryMetadataInterface;
import org.teiid.query.optimizer.capabilities.CapabilitiesFinder;
import org.teiid.query.optimizer.relational.OptimizerRule;
@@ -141,7 +141,7 @@
//quick check for satisfiability
if (!joinRegion.isSatisfiable()) {
- throw new QueryPlannerException(QueryExecPlugin.Util.getString("RulePlanJoins.cantSatisfy", joinRegion.getUnsatisfiedAccessPatterns())); //$NON-NLS-1$
+ throw new QueryPlannerException(QueryPlugin.Util.getString("RulePlanJoins.cantSatisfy", joinRegion.getUnsatisfiedAccessPatterns())); //$NON-NLS-1$
}
planForDependencies(joinRegion);
@@ -237,7 +237,7 @@
* Ideally we should be a little smarter in case 2
* - pushing down a same source cross join can be done if we know that a dependent join will be performed
*/
- boolean hasJoinCriteria = false;
+ //boolean hasJoinCriteria = false;
LinkedList<Criteria> joinCriteria = new LinkedList<Criteria>();
Object modelId = RuleRaiseAccess.getModelIDFromAccess(accessNode1, metadata);
SupportedJoinCriteria sjc = CapabilitiesUtil.getSupportedJoinCriteria(modelId, metadata, capFinder);
@@ -250,25 +250,27 @@
if (sources.contains(accessNode1)) {
if (sources.contains(accessNode2) && sources.size() == 2) {
- hasJoinCriteria = true;
+ //hasJoinCriteria = true;
Criteria crit = (Criteria)critNode.getProperty(NodeConstants.Info.SELECT_CRITERIA);
- if (RuleRaiseAccess.isSupportedJoinCriteria(sjc, crit, modelId, metadata, capFinder)) {
+ if (RuleRaiseAccess.isSupportedJoinCriteria(sjc, crit, modelId, metadata, capFinder, null)) {
joinCriteriaNodes.add(critNode);
joinCriteria.add(crit);
}
} else if (!accessNodes.containsAll(sources)) {
- hasJoinCriteria = true;
+ //hasJoinCriteria = true;
}
} else if (sources.contains(accessNode2) && !accessNodes.containsAll(sources)) {
- hasJoinCriteria = true;
+ //hasJoinCriteria = true;
}
}
/*
- * If we failed to find direct criteria, but still have non-pushable or criteria to
- * other groups we'll use additional checks
+ * If we failed to find direct criteria, a cross join may still be acceptable
*/
- if ((!hasJoinCriteria || joinCriteriaNodes.isEmpty()) && !canPushCrossJoin(metadata, context, accessNode1, accessNode2)) {
+ if (joinCriteriaNodes.isEmpty() && !canPushCrossJoin(metadata, context, accessNode1, accessNode2)) {
+ //if (hasJoinCriteria) {
+ //a cross join would still be a good idea given that a dependent join can be used
+ //}
continue;
}
@@ -277,7 +279,7 @@
JoinType joinType = joinCriteria.isEmpty()?JoinType.JOIN_CROSS:JoinType.JOIN_INNER;
//try to push to the source
- if (RuleRaiseAccess.canRaiseOverJoin(toTest, metadata, capFinder, joinCriteria, joinType) == null) {
+ if (RuleRaiseAccess.canRaiseOverJoin(toTest, metadata, capFinder, joinCriteria, joinType, null) == null) {
continue;
}
@@ -378,7 +380,7 @@
private void planForDependencies(JoinRegion joinRegion) throws QueryPlannerException {
if (joinRegion.getJoinSourceNodes().isEmpty()) {
- throw new QueryPlannerException(QueryExecPlugin.Util.getString("RulePlanJoins.cantSatisfy", joinRegion.getUnsatisfiedAccessPatterns())); //$NON-NLS-1$
+ throw new QueryPlannerException(QueryPlugin.Util.getString("RulePlanJoins.cantSatisfy", joinRegion.getUnsatisfiedAccessPatterns())); //$NON-NLS-1$
}
HashSet<GroupSymbol> currentGroups = new HashSet<GroupSymbol>();
@@ -437,7 +439,7 @@
}
if (!dependentNodes.isEmpty()) {
- throw new QueryPlannerException(QueryExecPlugin.Util.getString("RulePlanJoins.cantSatisfy", joinRegion.getUnsatisfiedAccessPatterns())); //$NON-NLS-1$
+ throw new QueryPlannerException(QueryPlugin.Util.getString("RulePlanJoins.cantSatisfy", joinRegion.getUnsatisfiedAccessPatterns())); //$NON-NLS-1$
}
}
@@ -521,7 +523,7 @@
* @param metadata
* @return
*/
- Object[] findBestJoinOrder(JoinRegion region, QueryMetadataInterface metadata) {
+ Object[] findBestJoinOrder(JoinRegion region, QueryMetadataInterface metadata) throws QueryMetadataException, TeiidComponentException {
int regionCount = region.getJoinSourceNodes().size();
List<Integer> orderList = new ArrayList<Integer>(regionCount);
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePlanProcedures.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePlanProcedures.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePlanProcedures.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -32,8 +32,8 @@
import org.teiid.api.exception.query.QueryMetadataException;
import org.teiid.api.exception.query.QueryPlannerException;
import org.teiid.core.TeiidComponentException;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.analysis.AnalysisRecord;
-import org.teiid.query.execution.QueryExecPlugin;
import org.teiid.query.metadata.QueryMetadataInterface;
import org.teiid.query.optimizer.capabilities.CapabilitiesFinder;
import org.teiid.query.optimizer.relational.OptimizerRule;
@@ -118,7 +118,7 @@
defaults.add(defaultValue);
if (defaultValue == null && !coveredParams.contains(symbol)) {
- throw new QueryPlannerException(QueryExecPlugin.Util.getString("RulePlanProcedures.no_values", symbol)); //$NON-NLS-1$
+ throw new QueryPlannerException(QueryPlugin.Util.getString("RulePlanProcedures.no_values", symbol)); //$NON-NLS-1$
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePushAggregates.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePushAggregates.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePushAggregates.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -386,7 +386,7 @@
projectPlanNode.setProperty(NodeConstants.Info.PROJECT_COLS, projectedViewSymbols);
projectPlanNode.addGroup(group);
if (pushdown) {
- while (RuleRaiseAccess.raiseAccessNode(root, originalNode, metadata, capFinder, true) != null) {
+ while (RuleRaiseAccess.raiseAccessNode(root, originalNode, metadata, capFinder, true, null) != null) {
//continue to raise
}
}
@@ -487,7 +487,7 @@
//check for push down
if (stageGroup.getFirstChild().getType() == NodeConstants.Types.ACCESS
- && RuleRaiseAccess.canRaiseOverGroupBy(stageGroup, stageGroup.getFirstChild(), aggregates, metadata, capFinder)) {
+ && RuleRaiseAccess.canRaiseOverGroupBy(stageGroup, stageGroup.getFirstChild(), aggregates, metadata, capFinder, null)) {
RuleRaiseAccess.performRaise(null, stageGroup.getFirstChild(), stageGroup);
if (stagedGroupingSymbols.isEmpty()) {
RuleRaiseAccess.performRaise(null, stageGroup.getParent(), stageGroup.getParent().getParent());
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePushSelectCriteria.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePushSelectCriteria.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePushSelectCriteria.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -34,8 +34,8 @@
import org.teiid.api.exception.query.QueryPlannerException;
import org.teiid.core.TeiidComponentException;
import org.teiid.core.util.Assertion;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.analysis.AnalysisRecord;
-import org.teiid.query.execution.QueryExecPlugin;
import org.teiid.query.metadata.QueryMetadataInterface;
import org.teiid.query.optimizer.capabilities.CapabilitiesFinder;
import org.teiid.query.optimizer.relational.OptimizerRule;
@@ -57,7 +57,6 @@
import org.teiid.query.sql.visitor.ElementCollectorVisitor;
import org.teiid.query.sql.visitor.ValueIteratorProviderCollectorVisitor;
import org.teiid.query.util.CommandContext;
-import org.teiid.query.util.ErrorMessageKeys;
public final class RulePushSelectCriteria implements OptimizerRule {
@@ -95,7 +94,7 @@
continue;
}
- PlanNode sourceNode = findOriginatingNode(metadata, capFinder, critNode);
+ PlanNode sourceNode = findOriginatingNode(metadata, capFinder, critNode, analysisRecord);
if(sourceNode == null) {
deadNodes.add(critNode);
@@ -138,7 +137,7 @@
}
private PlanNode findOriginatingNode(QueryMetadataInterface metadata,
- CapabilitiesFinder capFinder, PlanNode critNode)
+ CapabilitiesFinder capFinder, PlanNode critNode, AnalysisRecord record)
throws TeiidComponentException, QueryMetadataException {
if (critNode.getGroups().isEmpty()) {
//check to see if pushing may impact cardinality
@@ -147,7 +146,7 @@
return groupNode;
}
- Object modelId = getSubqueryModelId(metadata, capFinder, critNode);
+ Object modelId = getSubqueryModelId(metadata, capFinder, critNode, record);
if (modelId != null) {
for (PlanNode node : NodeEditor.findAllNodes(critNode, NodeConstants.Types.SOURCE)) {
GroupSymbol group = node.getGroups().iterator().next();
@@ -162,11 +161,11 @@
}
private Object getSubqueryModelId(QueryMetadataInterface metadata,
- CapabilitiesFinder capFinder, PlanNode critNode)
+ CapabilitiesFinder capFinder, PlanNode critNode, AnalysisRecord record)
throws TeiidComponentException, QueryMetadataException {
Object modelId = null;
for (SubqueryContainer subqueryContainer : critNode.getSubqueryContainers()) {
- Object validId = CriteriaCapabilityValidatorVisitor.validateSubqueryPushdown(subqueryContainer, null, metadata, capFinder);
+ Object validId = CriteriaCapabilityValidatorVisitor.validateSubqueryPushdown(subqueryContainer, null, metadata, capFinder, record);
if (validId == null) {
return null;
}
@@ -283,7 +282,7 @@
// Look for situations where we don't allow SELECT to be pushed
if(currentNode.getType() == NodeConstants.Types.ACCESS) {
try {
- if (!RuleRaiseAccess.canRaiseOverSelect(currentNode, metadata, capFinder, critNode)) {
+ if (!RuleRaiseAccess.canRaiseOverSelect(currentNode, metadata, capFinder, critNode, null)) {
return currentNode;
}
@@ -298,7 +297,7 @@
return currentNode.getFirstChild();
}
} catch(QueryMetadataException e) {
- throw new QueryPlannerException(e, QueryExecPlugin.Util.getString(ErrorMessageKeys.OPTIMIZER_0020, currentNode.getGroups()));
+ throw new QueryPlannerException(e, QueryPlugin.Util.getString("ERR.015.004.0020", currentNode.getGroups())); //$NON-NLS-1$
}
} else if(currentNode.getType() == NodeConstants.Types.JOIN) {
//pushing below a join is not necessary under an access node
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleRaiseAccess.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleRaiseAccess.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleRaiseAccess.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -73,7 +73,7 @@
raisedNode = false;
for (PlanNode accessNode : NodeEditor.findAllNodes(plan, NodeConstants.Types.ACCESS)) {
- PlanNode newRoot = raiseAccessNode(plan, accessNode, metadata, capFinder, afterJoinPlanning);
+ PlanNode newRoot = raiseAccessNode(plan, accessNode, metadata, capFinder, afterJoinPlanning, analysisRecord);
if(newRoot != null) {
raisedNode = true;
plan = newRoot;
@@ -87,7 +87,8 @@
/**
* @return null if nothing changed, and a new plan root if something changed
*/
- static PlanNode raiseAccessNode(PlanNode rootNode, PlanNode accessNode, QueryMetadataInterface metadata, CapabilitiesFinder capFinder, boolean afterJoinPlanning)
+ static PlanNode raiseAccessNode(PlanNode rootNode, PlanNode accessNode, QueryMetadataInterface metadata,
+ CapabilitiesFinder capFinder, boolean afterJoinPlanning, AnalysisRecord record)
throws QueryPlannerException, QueryMetadataException, TeiidComponentException {
PlanNode parentNode = accessNode.getParent();
@@ -103,7 +104,7 @@
switch(parentNode.getType()) {
case NodeConstants.Types.JOIN:
{
- modelID = canRaiseOverJoin(modelID, parentNode, metadata, capFinder, afterJoinPlanning);
+ modelID = canRaiseOverJoin(modelID, parentNode, metadata, capFinder, afterJoinPlanning, record);
if(modelID != null) {
raiseAccessOverJoin(parentNode, modelID, true);
return rootNode;
@@ -117,7 +118,7 @@
for (int i = 0; i < projectCols.size(); i++) {
SingleElementSymbol symbol = (SingleElementSymbol)projectCols.get(i);
- if(! canPushSymbol(symbol, true, modelID, metadata, capFinder)) {
+ if(! canPushSymbol(symbol, true, modelID, metadata, capFinder, record)) {
return null;
}
}
@@ -138,10 +139,13 @@
{
// If model supports the support constant parameter, then move access node
if(!CapabilitiesUtil.supportsSelectDistinct(modelID, metadata, capFinder)) {
+ recordDebug("cannot push dupremove, since distinct is not supported by source", parentNode, record); //$NON-NLS-1$
return null;
}
+ //TODO: this check is too specific the columns could be used in expressions that are comparable
if (!CapabilitiesUtil.checkElementsAreSearchable((List)NodeEditor.findNodePreOrder(parentNode, NodeConstants.Types.PROJECT).getProperty(NodeConstants.Info.PROJECT_COLS), metadata, SupportConstants.Element.SEARCHABLE_COMPARE)) {
+ recordDebug("cannot push dupremove, since not all columns are comparable at the source", parentNode, record); //$NON-NLS-1$
return null;
}
@@ -149,7 +153,7 @@
}
case NodeConstants.Types.SORT:
{
- if (canRaiseOverSort(accessNode, metadata, capFinder, parentNode)) {
+ if (canRaiseOverSort(accessNode, metadata, capFinder, parentNode, record)) {
return performRaise(rootNode, accessNode, parentNode);
}
return null;
@@ -157,7 +161,7 @@
case NodeConstants.Types.GROUP:
{
Set<AggregateSymbol> aggregates = RulePushAggregates.collectAggregates(parentNode);
- if (canRaiseOverGroupBy(parentNode, accessNode, aggregates, metadata, capFinder)) {
+ if (canRaiseOverGroupBy(parentNode, accessNode, aggregates, metadata, capFinder, record)) {
return performRaise(rootNode, accessNode, parentNode);
}
return null;
@@ -180,7 +184,7 @@
if (parentNode.hasBooleanProperty(NodeConstants.Info.IS_DEPENDENT_SET)) {
return null;
}
- if (canRaiseOverSelect(accessNode, metadata, capFinder, parentNode)) {
+ if (canRaiseOverSelect(accessNode, metadata, capFinder, parentNode, record)) {
RulePushSelectCriteria.satisfyAccessPatterns(parentNode, accessNode);
return performRaise(rootNode, accessNode, parentNode);
}
@@ -212,7 +216,7 @@
}
PlanNode newParent = grandParent.getParent();
//TODO: use costing or heuristics instead of always raising
- PlanNode newRoot = raiseAccessNode(rootNode, accessNode, metadata, capFinder, afterJoinPlanning);
+ PlanNode newRoot = raiseAccessNode(rootNode, accessNode, metadata, capFinder, afterJoinPlanning, record);
if (newRoot == null) {
//return the tree to its original state
parentNode.addFirstChild(accessNode);
@@ -291,7 +295,7 @@
PlanNode accessNode,
Collection<? extends SingleElementSymbol> aggregates,
QueryMetadataInterface metadata,
- CapabilitiesFinder capFinder) throws QueryMetadataException,
+ CapabilitiesFinder capFinder, AnalysisRecord record) throws QueryMetadataException,
TeiidComponentException {
Object modelID = getModelIDFromAccess(accessNode, metadata);
if(modelID == null) {
@@ -299,29 +303,36 @@
}
List<SingleElementSymbol> groupCols = (List<SingleElementSymbol>)groupNode.getProperty(NodeConstants.Info.GROUP_COLS);
if(!CapabilitiesUtil.supportsAggregates(groupCols, modelID, metadata, capFinder)) {
+ recordDebug("cannot push group by, since group by is not supported by source", groupNode, record); //$NON-NLS-1$
return false;
}
if (groupCols != null) {
for (SingleElementSymbol singleElementSymbol : groupCols) {
- if (!canPushSymbol(singleElementSymbol, false, modelID, metadata, capFinder)) {
+ if (!canPushSymbol(singleElementSymbol, false, modelID, metadata, capFinder, record)) {
return false;
}
}
}
if (aggregates != null) {
for (SingleElementSymbol aggregateSymbol : aggregates) {
- if(! CriteriaCapabilityValidatorVisitor.canPushLanguageObject(aggregateSymbol, modelID, metadata, capFinder)) {
+ if(! CriteriaCapabilityValidatorVisitor.canPushLanguageObject(aggregateSymbol, modelID, metadata, capFinder, record)) {
return false;
}
}
}
return CapabilitiesUtil.checkElementsAreSearchable(groupCols, metadata, SupportConstants.Element.SEARCHABLE_COMPARE);
}
+
+ private static void recordDebug(String message, PlanNode node, AnalysisRecord record) {
+ if (record != null && record.recordDebug()) {
+ record.println(message + " " + node.nodeToString()); //$NON-NLS-1$
+ }
+ }
static boolean canRaiseOverSort(PlanNode accessNode,
QueryMetadataInterface metadata,
CapabilitiesFinder capFinder,
- PlanNode parentNode) throws QueryMetadataException,
+ PlanNode parentNode, AnalysisRecord record) throws QueryMetadataException,
TeiidComponentException {
// Find the model for this node by getting ACCESS node's model
Object modelID = getModelIDFromAccess(accessNode, metadata);
@@ -333,7 +344,7 @@
List<OrderByItem> sortCols = ((OrderBy)parentNode.getProperty(NodeConstants.Info.SORT_ORDER)).getOrderByItems();
for (OrderByItem symbol : sortCols) {
//TODO: this check shouldn't be necessary, since the order by is not introducing new expressions
- if(! canPushSymbol(symbol.getSymbol(), true, modelID, metadata, capFinder)) {
+ if(! canPushSymbol(symbol.getSymbol(), true, modelID, metadata, capFinder, record)) {
return false;
}
boolean supportsNullOrdering = CapabilitiesUtil.supports(Capability.QUERY_ORDERBY_NULL_ORDERING, modelID, metadata, capFinder);
@@ -407,7 +418,7 @@
static boolean canRaiseOverSelect(PlanNode accessNode,
QueryMetadataInterface metadata,
CapabilitiesFinder capFinder,
- PlanNode parentNode) throws QueryMetadataException,
+ PlanNode parentNode, AnalysisRecord record) throws QueryMetadataException,
TeiidComponentException,
QueryPlannerException {
if (parentNode.hasBooleanProperty(NodeConstants.Info.IS_PHANTOM)) {
@@ -422,6 +433,7 @@
}
if (parentNode.hasBooleanProperty(NodeConstants.Info.IS_HAVING) && !CapabilitiesUtil.supports(Capability.QUERY_HAVING, modelID, metadata, capFinder)) {
+ recordDebug("cannot push having, since having is not supported by source", parentNode, record); //$NON-NLS-1$
return false;
}
@@ -433,7 +445,7 @@
Criteria crit = (Criteria) parentNode.getProperty(NodeConstants.Info.SELECT_CRITERIA);
- if(!CriteriaCapabilityValidatorVisitor.canPushLanguageObject(crit, modelID, metadata, capFinder) ) {
+ if(!CriteriaCapabilityValidatorVisitor.canPushLanguageObject(crit, modelID, metadata, capFinder, record) ) {
return false;
}
@@ -456,13 +468,14 @@
* @throws QueryMetadataException
* @since 4.1.2
*/
- private static boolean canPushSymbol(SingleElementSymbol symbol, boolean inSelectClause, Object modelID, QueryMetadataInterface metadata, CapabilitiesFinder capFinder)
+ private static boolean canPushSymbol(SingleElementSymbol symbol, boolean inSelectClause, Object modelID,
+ QueryMetadataInterface metadata, CapabilitiesFinder capFinder, AnalysisRecord record)
throws TeiidComponentException, QueryMetadataException {
Expression expr = SymbolMap.getExpression(symbol);
// Do the normal checks
- if(! CriteriaCapabilityValidatorVisitor.canPushLanguageObject(expr, modelID, metadata, capFinder)) {
+ if(! CriteriaCapabilityValidatorVisitor.canPushLanguageObject(expr, modelID, metadata, capFinder, record)) {
return false;
}
@@ -499,7 +512,8 @@
* @return The modelID if the raise can proceed and what common model these combined
* nodes will be sent to
*/
- private static Object canRaiseOverJoin(Object modelId, PlanNode joinNode, QueryMetadataInterface metadata, CapabilitiesFinder capFinder, boolean afterJoinPlanning)
+ private static Object canRaiseOverJoin(Object modelId, PlanNode joinNode, QueryMetadataInterface metadata,
+ CapabilitiesFinder capFinder, boolean afterJoinPlanning, AnalysisRecord record)
throws QueryMetadataException, TeiidComponentException {
List crits = (List) joinNode.getProperty(NodeConstants.Info.JOIN_CRITERIA);
@@ -536,14 +550,14 @@
}
}
- return canRaiseOverJoin(joinNode.getChildren(), metadata, capFinder, crits, type);
+ return canRaiseOverJoin(joinNode.getChildren(), metadata, capFinder, crits, type, record);
}
static Object canRaiseOverJoin(List<PlanNode> children,
QueryMetadataInterface metadata,
CapabilitiesFinder capFinder,
List<Criteria> crits,
- JoinType type) throws QueryMetadataException,
+ JoinType type, AnalysisRecord record) throws QueryMetadataException,
TeiidComponentException {
//we only want to consider binary joins
if (children.size() != 2) {
@@ -602,7 +616,7 @@
List<Object> rightIds = null;
GroupSymbol leftGroup = null;
for (Criteria crit : crits) {
- if (!isSupportedJoinCriteria(sjc, crit, accessModelID, metadata, capFinder)) {
+ if (!isSupportedJoinCriteria(sjc, crit, accessModelID, metadata, capFinder, record)) {
return null;
}
if (sjc != SupportedJoinCriteria.KEY) {
@@ -663,9 +677,10 @@
/**
* Checks criteria one predicate at a time. Only tests up to the equi restriction.
*/
- static boolean isSupportedJoinCriteria(SupportedJoinCriteria sjc, Criteria crit, Object accessModelID, QueryMetadataInterface metadata, CapabilitiesFinder capFinder)
+ static boolean isSupportedJoinCriteria(SupportedJoinCriteria sjc, Criteria crit, Object accessModelID,
+ QueryMetadataInterface metadata, CapabilitiesFinder capFinder, AnalysisRecord record)
throws QueryMetadataException, TeiidComponentException {
- if(!CriteriaCapabilityValidatorVisitor.canPushLanguageObject(crit, accessModelID, metadata, capFinder) ) {
+ if(!CriteriaCapabilityValidatorVisitor.canPushLanguageObject(crit, accessModelID, metadata, capFinder, record) ) {
return false;
}
if (sjc == SupportedJoinCriteria.ANY) {
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleValidateWhereAll.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleValidateWhereAll.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleValidateWhereAll.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -25,8 +25,8 @@
import org.teiid.api.exception.query.QueryMetadataException;
import org.teiid.api.exception.query.QueryPlannerException;
import org.teiid.core.TeiidComponentException;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.analysis.AnalysisRecord;
-import org.teiid.query.execution.QueryExecPlugin;
import org.teiid.query.metadata.QueryMetadataInterface;
import org.teiid.query.optimizer.capabilities.CapabilitiesFinder;
import org.teiid.query.optimizer.relational.OptimizerRule;
@@ -40,7 +40,6 @@
import org.teiid.query.sql.lang.SetQuery;
import org.teiid.query.sql.lang.Update;
import org.teiid.query.util.CommandContext;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -72,7 +71,7 @@
if(CapabilitiesUtil.requiresCriteria(modelID, metadata, capFinder)
&& hasNoCriteria((Command) node.getProperty(NodeConstants.Info.ATOMIC_REQUEST))) {
String modelName = metadata.getFullName(modelID);
- throw new QueryPlannerException(QueryExecPlugin.Util.getString(ErrorMessageKeys.OPTIMIZER_0024, modelName));
+ throw new QueryPlannerException(QueryPlugin.Util.getString("ERR.015.004.0024", modelName)); //$NON-NLS-1$
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/xml/CriteriaPlanner.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/xml/CriteriaPlanner.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/xml/CriteriaPlanner.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -30,7 +30,7 @@
import org.teiid.api.exception.query.QueryMetadataException;
import org.teiid.api.exception.query.QueryPlannerException;
import org.teiid.core.TeiidComponentException;
-import org.teiid.query.execution.QueryExecPlugin;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.function.FunctionLibrary;
import org.teiid.query.mapping.xml.MappingDocument;
import org.teiid.query.mapping.xml.MappingNode;
@@ -44,7 +44,6 @@
import org.teiid.query.sql.symbol.Function;
import org.teiid.query.sql.symbol.GroupSymbol;
import org.teiid.query.sql.visitor.ElementCollectorVisitor;
-import org.teiid.query.util.ErrorMessageKeys;
public class CriteriaPlanner {
@@ -89,7 +88,7 @@
if (context == null) {
context = otherContext;
} else if (context != otherContext){
- throw new QueryPlannerException(ErrorMessageKeys.OPTIMIZER_0068, QueryExecPlugin.Util.getString(ErrorMessageKeys.OPTIMIZER_0068, criteria));
+ throw new QueryPlannerException("ERR.015.004.0068", QueryPlugin.Util.getString("ERR.015.004.0068", criteria)); //$NON-NLS-1$ //$NON-NLS-2$
}
}
@@ -137,7 +136,7 @@
MappingNode elementRsNode = node.getSourceNode();
if (elementRsNode == null) {
- throw new QueryPlannerException(QueryExecPlugin.Util.getString("CriteriaPlanner.invalid_element", elementSymbol)); //$NON-NLS-1$
+ throw new QueryPlannerException(QueryPlugin.Util.getString("CriteriaPlanner.invalid_element", elementSymbol)); //$NON-NLS-1$
}
String elementRsFullName = elementRsNode.getFullyQualifiedName().toUpperCase();
@@ -154,7 +153,7 @@
continue;
}
- throw new QueryPlannerException(QueryExecPlugin.Util.getString("CriteriaPlanner.invalid_context", elementSymbol, context.getFullyQualifiedName())); //$NON-NLS-1$
+ throw new QueryPlannerException(QueryPlugin.Util.getString("CriteriaPlanner.invalid_context", elementSymbol, context.getFullyQualifiedName())); //$NON-NLS-1$
}
return resultSets;
}
@@ -186,7 +185,7 @@
if (criteriaResultSets.size() != 1) {
//TODO: this assumption could be relaxed if we allow context to be from a document perspective, rather than from a result set
- throw new QueryPlannerException(QueryExecPlugin.Util.getString("CriteriaPlanner.no_context", criteria)); //$NON-NLS-1$
+ throw new QueryPlannerException(QueryPlugin.Util.getString("CriteriaPlanner.no_context", criteria)); //$NON-NLS-1$
}
return (MappingSourceNode)criteriaResultSets.iterator().next();
}
@@ -259,7 +258,7 @@
MappingNode node = MappingNode.findNode(planEnv.mappingDoc, fullyQualifiedNodeName.toUpperCase());
MappingSourceNode sourceNode = node.getSourceNode();
if (sourceNode == null) {
- String msg = QueryExecPlugin.Util.getString("XMLPlanner.The_rowlimit_parameter_{0}_is_not_in_the_scope_of_any_mapping_class", fullyQualifiedNodeName); //$NON-NLS-1$
+ String msg = QueryPlugin.Util.getString("XMLPlanner.The_rowlimit_parameter_{0}_is_not_in_the_scope_of_any_mapping_class", fullyQualifiedNodeName); //$NON-NLS-1$
throw new QueryPlannerException(msg);
}
@@ -268,7 +267,7 @@
// Check for conflicting row limits on the same mapping class
int existingLimit = criteriaRsInfo.getUserRowLimit();
if (existingLimit > 0 && existingLimit != rowLimit) {
- String msg = QueryExecPlugin.Util.getString("XMLPlanner.Criteria_{0}_contains_conflicting_row_limits", wholeCrit); //$NON-NLS-1$
+ String msg = QueryPlugin.Util.getString("XMLPlanner.Criteria_{0}_contains_conflicting_row_limits", wholeCrit); //$NON-NLS-1$
throw new QueryPlannerException(msg);
}
@@ -301,13 +300,13 @@
//assumes that all non-xml group elements are temp elements
boolean hasTempElement = !metadata.isXMLGroup(group.getMetadataID());
if(!first && hasTempElement && resultSet == null) {
- throw new QueryPlannerException(ErrorMessageKeys.OPTIMIZER_0035, QueryExecPlugin.Util.getString(ErrorMessageKeys.OPTIMIZER_0035, conjunct));
+ throw new QueryPlannerException("ERR.015.004.0035", QueryPlugin.Util.getString("ERR.015.004.0035", conjunct)); //$NON-NLS-1$ //$NON-NLS-2$
}
if (hasTempElement) {
String currentResultSet = metadata.getFullName(element.getGroupSymbol().getMetadataID());
if (resultSet != null && !resultSet.equalsIgnoreCase(currentResultSet)) {
- throw new QueryPlannerException(QueryExecPlugin.Util.getString("CriteriaPlanner.multiple_staging", conjunct)); //$NON-NLS-1$
+ throw new QueryPlannerException(QueryPlugin.Util.getString("CriteriaPlanner.multiple_staging", conjunct)); //$NON-NLS-1$
}
resultSet = currentResultSet;
}
@@ -317,7 +316,7 @@
if (resultSet != null) {
Collection functions = ContextReplacerVisitor.replaceContextFunctions(conjunct);
if (!functions.isEmpty()) {
- throw new QueryPlannerException(QueryExecPlugin.Util.getString("CriteriaPlanner.staging_context")); //$NON-NLS-1$
+ throw new QueryPlannerException(QueryPlugin.Util.getString("CriteriaPlanner.staging_context")); //$NON-NLS-1$
}
//should also throw an exception if it contains a row limit function
@@ -336,7 +335,7 @@
MappingNode contextNode = MappingNode.findNode(planEnv.mappingDoc, targetContext.getCanonicalName());
if (contextNode == null){
- throw new QueryPlannerException(ErrorMessageKeys.OPTIMIZER_0037, QueryExecPlugin.Util.getString(ErrorMessageKeys.OPTIMIZER_0037, targetContext));
+ throw new QueryPlannerException("ERR.015.004.0037", QueryPlugin.Util.getString("ERR.015.004.0037", targetContext)); //$NON-NLS-1$ //$NON-NLS-2$
}
return contextNode;
}
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/xml/QueryUtil.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/xml/QueryUtil.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/xml/QueryUtil.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -36,8 +36,8 @@
import org.teiid.api.exception.query.QueryResolverException;
import org.teiid.core.TeiidComponentException;
import org.teiid.core.TeiidProcessingException;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.analysis.AnalysisRecord;
-import org.teiid.query.execution.QueryExecPlugin;
import org.teiid.query.mapping.relational.QueryNode;
import org.teiid.query.metadata.QueryMetadataInterface;
import org.teiid.query.metadata.TempMetadataAdapter;
@@ -58,7 +58,6 @@
import org.teiid.query.sql.symbol.Reference;
import org.teiid.query.sql.visitor.ReferenceCollectorVisitor;
import org.teiid.query.util.CommandContext;
-import org.teiid.query.util.ErrorMessageKeys;
@@ -84,7 +83,7 @@
try {
query = QueryParser.getQueryParser().parseCommand(queryNode.getQuery());
} catch (QueryParserException e) {
- throw new QueryPlannerException(e, QueryExecPlugin.Util.getString(ErrorMessageKeys.OPTIMIZER_0054, new Object[]{queryNode.getGroupName(), queryNode.getQuery()}));
+ throw new QueryPlannerException(e, QueryPlugin.Util.getString("ERR.015.004.0054", new Object[]{queryNode.getGroupName(), queryNode.getQuery()})); //$NON-NLS-1$
}
}
return query;
@@ -144,7 +143,7 @@
ResolverUtil.resolveGroup(gs, metadata);
queryNode = metadata.getVirtualPlan(gs.getMetadataID());
} catch (QueryResolverException e) {
- throw new QueryPlannerException(e, ErrorMessageKeys.OPTIMIZER_0029, QueryExecPlugin.Util.getString(ErrorMessageKeys.OPTIMIZER_0029, groupName));
+ throw new QueryPlannerException(e, "ERR.015.004.0029", QueryPlugin.Util.getString("ERR.015.004.0029", groupName)); //$NON-NLS-1$ //$NON-NLS-2$
}
return queryNode;
}
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/xml/XMLNodeMappingVisitor.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/xml/XMLNodeMappingVisitor.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/xml/XMLNodeMappingVisitor.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -27,7 +27,7 @@
import org.teiid.api.exception.query.QueryPlannerException;
import org.teiid.core.TeiidComponentException;
import org.teiid.core.TeiidRuntimeException;
-import org.teiid.query.execution.QueryExecPlugin;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.mapping.xml.MappingDocument;
import org.teiid.query.mapping.xml.MappingNode;
import org.teiid.query.metadata.QueryMetadataInterface;
@@ -37,7 +37,6 @@
import org.teiid.query.sql.symbol.ElementSymbol;
import org.teiid.query.sql.symbol.Symbol;
import org.teiid.query.sql.visitor.AbstractSymbolMappingVisitor;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -124,7 +123,7 @@
Collection unmappedSymbols = mappingVisitor.getUnmappedSymbols();
if (unmappedSymbols != null && unmappedSymbols.size() > 0){
- throw new QueryPlannerException(ErrorMessageKeys.OPTIMIZER_0046, QueryExecPlugin.Util.getString(ErrorMessageKeys.OPTIMIZER_0046, new Object[] {unmappedSymbols, object}));
+ throw new QueryPlannerException("ERR.015.004.0046", QueryPlugin.Util.getString("ERR.015.004.0046", new Object[] {unmappedSymbols, object})); //$NON-NLS-1$ //$NON-NLS-2$
}
return copy;
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/xml/XMLPlanner.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/xml/XMLPlanner.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/xml/XMLPlanner.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -33,8 +33,8 @@
import org.teiid.core.id.IDGenerator;
import org.teiid.logging.LogConstants;
import org.teiid.logging.LogManager;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.analysis.AnalysisRecord;
-import org.teiid.query.execution.QueryExecPlugin;
import org.teiid.query.mapping.xml.MappingDocument;
import org.teiid.query.mapping.xml.MappingNode;
import org.teiid.query.mapping.xml.MappingNodeLogger;
@@ -290,7 +290,7 @@
// in the orderby. static nodes do not qualify for ordering.
if (elementNode.getNameInSource() == null){
Object[] params = new Object[] {elementNode, orderBy};
- String msg = QueryExecPlugin.Util.getString("XMLPlanner.The_XML_document_element_{0}_is_not_mapped_to_data_and_cannot_be_used_in_the_ORDER_BY_clause__{1}_1", params); //$NON-NLS-1$
+ String msg = QueryPlugin.Util.getString("XMLPlanner.The_XML_document_element_{0}_is_not_mapped_to_data_and_cannot_be_used_in_the_ORDER_BY_clause__{1}_1", params); //$NON-NLS-1$
throw new QueryPlannerException(msg);
}
Modified: trunk/engine/src/main/java/org/teiid/query/optimizer/xml/XMLQueryPlanner.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/optimizer/xml/XMLQueryPlanner.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/optimizer/xml/XMLQueryPlanner.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -37,7 +37,7 @@
import org.teiid.api.exception.query.QueryResolverException;
import org.teiid.core.TeiidComponentException;
import org.teiid.core.TeiidRuntimeException;
-import org.teiid.query.execution.QueryExecPlugin;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.mapping.relational.QueryNode;
import org.teiid.query.mapping.xml.MappingBaseNode;
import org.teiid.query.mapping.xml.MappingDocument;
@@ -335,7 +335,7 @@
}
if (!singleParentage) {
- throw new QueryPlannerException(QueryExecPlugin.Util.getString("XMLQueryPlanner.cannot_plan", rsInfo.getCriteria())); //$NON-NLS-1$
+ throw new QueryPlannerException(QueryPlugin.Util.getString("XMLQueryPlanner.cannot_plan", rsInfo.getCriteria())); //$NON-NLS-1$
}
QueryUtil.handleBindings(command, planNode, planEnv);
Modified: trunk/engine/src/main/java/org/teiid/query/processor/QueryProcessor.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/processor/QueryProcessor.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/processor/QueryProcessor.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -38,7 +38,7 @@
import org.teiid.logging.LogConstants;
import org.teiid.logging.LogManager;
import org.teiid.logging.MessageLevel;
-import org.teiid.query.execution.QueryExecPlugin;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.processor.BatchCollector.BatchProducer;
import org.teiid.query.util.CommandContext;
@@ -142,7 +142,7 @@
while(currentTime < context.getTimeSliceEnd() || context.isNonBlocking()) {
if (requestCanceled) {
- throw new TeiidProcessingException(QueryExecPlugin.Util.getString("QueryProcessor.request_cancelled", getProcessID())); //$NON-NLS-1$
+ throw new TeiidProcessingException(QueryPlugin.Util.getString("QueryProcessor.request_cancelled", getProcessID())); //$NON-NLS-1$
}
if (currentTime > context.getTimeoutEnd()) {
throw new TeiidProcessingException("Query timed out"); //$NON-NLS-1$
Modified: trunk/engine/src/main/java/org/teiid/query/processor/proc/ExecDynamicSqlInstruction.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/processor/proc/ExecDynamicSqlInstruction.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/processor/proc/ExecDynamicSqlInstruction.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -22,7 +22,7 @@
package org.teiid.query.processor.proc;
-import static org.teiid.query.analysis.AnalysisRecord.*;
+import static org.teiid.query.analysis.AnalysisRecord.PROP_SQL;
import java.util.Collections;
import java.util.HashMap;
@@ -41,8 +41,8 @@
import org.teiid.dqp.internal.process.Request;
import org.teiid.language.SQLConstants.Reserved;
import org.teiid.logging.LogManager;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.analysis.AnalysisRecord;
-import org.teiid.query.execution.QueryExecPlugin;
import org.teiid.query.metadata.QueryMetadataInterface;
import org.teiid.query.metadata.TempMetadataStore;
import org.teiid.query.optimizer.QueryOptimizer;
@@ -129,7 +129,7 @@
Object value = procEnv.evaluateExpression(dynamicCommand.getSql());
if (value == null) {
- throw new QueryProcessingException(QueryExecPlugin.Util
+ throw new QueryProcessingException(QueryPlugin.Util
.getString("ExecDynamicSqlInstruction.0")); //$NON-NLS-1$
}
@@ -214,7 +214,7 @@
procEnv.push(dynamicProgram);
} catch (TeiidProcessingException e) {
Object[] params = {dynamicCommand, dynamicCommand.getSql(), e.getMessage()};
- throw new QueryProcessingException(e, QueryExecPlugin.Util.getString("ExecDynamicSqlInstruction.couldnt_execute", params)); //$NON-NLS-1$
+ throw new QueryProcessingException(e, QueryPlugin.Util.getString("ExecDynamicSqlInstruction.couldnt_execute", params)); //$NON-NLS-1$
}
}
@@ -274,7 +274,7 @@
if (dynamicExpectedColumns != null && !dynamicExpectedColumns.isEmpty()) {
if (dynamicExpectedColumns.size() != sourceProjectedSymbolList.size()) {
- throw new QueryProcessingException(QueryExecPlugin.Util
+ throw new QueryProcessingException(QueryPlugin.Util
.getString("ExecDynamicSqlInstruction.4")); //$NON-NLS-1$
}
// If there is only one project symbol, we won't validate the name.
@@ -305,7 +305,7 @@
Object[] params = new Object[] { sourceTypeName,
dynamicSymbol.getShortCanonicalName(),
dynamicTypeName };
- throw new QueryProcessingException(QueryExecPlugin.Util
+ throw new QueryProcessingException(QueryPlugin.Util
.getString("ExecDynamicSqlInstruction.6", params)); //$NON-NLS-1$
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/processor/proc/ProcedurePlan.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/processor/proc/ProcedurePlan.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/processor/proc/ProcedurePlan.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -22,7 +22,7 @@
package org.teiid.query.processor.proc;
-import static org.teiid.query.analysis.AnalysisRecord.*;
+import static org.teiid.query.analysis.AnalysisRecord.PROP_OUTPUT_COLS;
import java.util.ArrayList;
import java.util.Collections;
@@ -46,8 +46,8 @@
import org.teiid.core.TeiidComponentException;
import org.teiid.core.TeiidProcessingException;
import org.teiid.logging.LogManager;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.analysis.AnalysisRecord;
-import org.teiid.query.execution.QueryExecPlugin;
import org.teiid.query.metadata.QueryMetadataInterface;
import org.teiid.query.metadata.SupportConstants;
import org.teiid.query.processor.BatchIterator;
@@ -64,7 +64,6 @@
import org.teiid.query.sql.util.VariableContext;
import org.teiid.query.tempdata.TempTableStore;
import org.teiid.query.util.CommandContext;
-import org.teiid.query.util.ErrorMessageKeys;
/**
*/
@@ -190,7 +189,7 @@
//check constraint
if (value == null && !metadata.elementSupports(param.getMetadataID(), SupportConstants.Element.NULL)) {
- throw new QueryValidatorException(QueryExecPlugin.Util.getString("ProcedurePlan.nonNullableParam", expr)); //$NON-NLS-1$
+ throw new QueryValidatorException(QueryPlugin.Util.getString("ProcedurePlan.nonNullableParam", expr)); //$NON-NLS-1$
}
setParameterValue(param, context, value);
}
@@ -532,7 +531,7 @@
private CursorState getCursorState(String rsKey) throws TeiidComponentException {
CursorState state = this.cursorStates.get(rsKey);
if (state == null) {
- throw new TeiidComponentException(QueryExecPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0037, rsKey));
+ throw new TeiidComponentException(QueryPlugin.Util.getString("ERR.015.006.0037", rsKey)); //$NON-NLS-1$
}
return state;
}
Modified: trunk/engine/src/main/java/org/teiid/query/processor/relational/AccessNode.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/processor/relational/AccessNode.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/processor/relational/AccessNode.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -22,7 +22,8 @@
package org.teiid.query.processor.relational;
-import static org.teiid.query.analysis.AnalysisRecord.*;
+import static org.teiid.query.analysis.AnalysisRecord.PROP_MODEL_NAME;
+import static org.teiid.query.analysis.AnalysisRecord.PROP_SQL;
import java.util.ArrayList;
import java.util.Collections;
@@ -36,8 +37,8 @@
import org.teiid.common.buffer.TupleSource;
import org.teiid.core.TeiidComponentException;
import org.teiid.core.TeiidProcessingException;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.eval.Evaluator;
-import org.teiid.query.execution.QueryExecPlugin;
import org.teiid.query.metadata.QueryMetadataInterface;
import org.teiid.query.rewriter.QueryRewriter;
import org.teiid.query.sql.lang.Command;
@@ -138,7 +139,7 @@
// Defect 16059 - Rewrite the command once the references have been replaced with values.
QueryRewriter.evaluateAndRewrite(atomicCommand, eval, context, metadata);
} catch (QueryValidatorException e) {
- throw new TeiidProcessingException(e, QueryExecPlugin.Util.getString("AccessNode.rewrite_failed", atomicCommand)); //$NON-NLS-1$
+ throw new TeiidProcessingException(e, QueryPlugin.Util.getString("AccessNode.rewrite_failed", atomicCommand)); //$NON-NLS-1$
}
return RelationalNodeUtil.shouldExecute(atomicCommand, true);
Modified: trunk/engine/src/main/java/org/teiid/query/processor/relational/BatchedUpdateNode.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/processor/relational/BatchedUpdateNode.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/processor/relational/BatchedUpdateNode.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -34,8 +34,8 @@
import org.teiid.common.buffer.TupleSource;
import org.teiid.core.TeiidComponentException;
import org.teiid.core.TeiidProcessingException;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.eval.Evaluator;
-import org.teiid.query.execution.QueryExecPlugin;
import org.teiid.query.sql.lang.BatchedUpdateCommand;
import org.teiid.query.sql.lang.Command;
import org.teiid.query.sql.util.VariableContext;
@@ -136,7 +136,7 @@
addBatchRow(Arrays.asList(new Object[] {tuple.get(0)}));
} else {
// Should never happen since the number of expected results is known
- throw new TeiidComponentException(QueryExecPlugin.Util.getString("BatchedUpdateNode.unexpected_end_of_batch", commandCount, numExpectedCounts)); //$NON-NLS-1$
+ throw new TeiidComponentException(QueryPlugin.Util.getString("BatchedUpdateNode.unexpected_end_of_batch", commandCount, numExpectedCounts)); //$NON-NLS-1$
}
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/processor/relational/ProjectNode.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/processor/relational/ProjectNode.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/processor/relational/ProjectNode.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -22,7 +22,7 @@
package org.teiid.query.processor.relational;
-import static org.teiid.query.analysis.AnalysisRecord.*;
+import static org.teiid.query.analysis.AnalysisRecord.PROP_SELECT_COLS;
import java.util.ArrayList;
import java.util.Arrays;
@@ -38,8 +38,8 @@
import org.teiid.core.TeiidComponentException;
import org.teiid.core.TeiidProcessingException;
import org.teiid.core.util.Assertion;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.analysis.AnalysisRecord;
-import org.teiid.query.execution.QueryExecPlugin;
import org.teiid.query.processor.ProcessorDataManager;
import org.teiid.query.sql.symbol.AggregateSymbol;
import org.teiid.query.sql.symbol.AliasSymbol;
@@ -48,7 +48,6 @@
import org.teiid.query.sql.symbol.ExpressionSymbol;
import org.teiid.query.sql.symbol.SelectSymbol;
import org.teiid.query.util.CommandContext;
-import org.teiid.query.util.ErrorMessageKeys;
public class ProjectNode extends SubqueryAwareRelationalNode {
@@ -218,7 +217,7 @@
Expression expression = ((ExpressionSymbol)symbol).getExpression();
tuple.add(getEvaluator(this.elementMap).evaluate(expression, values));
} else {
- Assertion.failed(QueryExecPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0034, symbol.getClass().getName()));
+ Assertion.failed(QueryPlugin.Util.getString("ERR.015.006.0034", symbol.getClass().getName())); //$NON-NLS-1$
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/processor/relational/TextTableNode.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/processor/relational/TextTableNode.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/processor/relational/TextTableNode.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -42,7 +42,7 @@
import org.teiid.core.types.ClobType;
import org.teiid.core.types.DataTypeManager;
import org.teiid.core.types.TransformationException;
-import org.teiid.query.execution.QueryExecPlugin;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.processor.ProcessorDataManager;
import org.teiid.query.sql.lang.TextTable;
import org.teiid.query.sql.lang.TextTable.TextColumn;
@@ -179,13 +179,13 @@
index = nameIndexes.get(col.getName());
}
if (index >= vals.size()) {
- throw new TeiidProcessingException(QueryExecPlugin.Util.getString("TextTableNode.no_value", col.getName(), textLine, systemId)); //$NON-NLS-1$
+ throw new TeiidProcessingException(QueryPlugin.Util.getString("TextTableNode.no_value", col.getName(), textLine, systemId)); //$NON-NLS-1$
}
val = vals.get(index);
try {
tuple.add(DataTypeManager.transformValue(val, table.getColumns().get(output).getSymbol().getType()));
} catch (TransformationException e) {
- throw new TeiidProcessingException(e, QueryExecPlugin.Util.getString("TextTableNode.conversion_error", col.getName(), textLine, systemId)); //$NON-NLS-1$
+ throw new TeiidProcessingException(e, QueryPlugin.Util.getString("TextTableNode.conversion_error", col.getName(), textLine, systemId)); //$NON-NLS-1$
}
}
addBatchRow(tuple);
@@ -267,7 +267,7 @@
for (TextColumn col : table.getColumns()) {
Integer index = nameIndexes.get(col.getName().toUpperCase());
if (index == null) {
- throw new TeiidProcessingException(QueryExecPlugin.Util.getString("TextTableNode.header_missing", col.getName(), systemId)); //$NON-NLS-1$
+ throw new TeiidProcessingException(QueryPlugin.Util.getString("TextTableNode.header_missing", col.getName(), systemId)); //$NON-NLS-1$
}
nameIndexes.put(col.getName(), index);
}
@@ -301,7 +301,7 @@
}
line = readLine();
if (line == null) {
- throw new TeiidProcessingException(QueryExecPlugin.Util.getString("TextTableNode.unclosed", systemId)); //$NON-NLS-1$
+ throw new TeiidProcessingException(QueryPlugin.Util.getString("TextTableNode.unclosed", systemId)); //$NON-NLS-1$
}
}
char[] chars = line.toCharArray();
@@ -331,7 +331,7 @@
builder.append(chr);
} else {
if (builder.toString().trim().length() != 0) {
- throw new TeiidProcessingException(QueryExecPlugin.Util.getString("TextTableNode.character_not_allowed", textLine, systemId)); //$NON-NLS-1$
+ throw new TeiidProcessingException(QueryPlugin.Util.getString("TextTableNode.character_not_allowed", textLine, systemId)); //$NON-NLS-1$
}
qualified = true;
builder = new StringBuilder(); //start the entry over
@@ -342,11 +342,11 @@
} else {
if (escaped) {
//don't understand other escape sequences yet
- throw new TeiidProcessingException(QueryExecPlugin.Util.getString("TextTableNode.unknown_escape", chr, textLine, systemId)); //$NON-NLS-1$
+ throw new TeiidProcessingException(QueryPlugin.Util.getString("TextTableNode.unknown_escape", chr, textLine, systemId)); //$NON-NLS-1$
}
if (wasQualified && !qualified) {
if (!Character.isWhitespace(chr)) {
- throw new TeiidProcessingException(QueryExecPlugin.Util.getString("TextTableNode.character_not_allowed", textLine, systemId)); //$NON-NLS-1$
+ throw new TeiidProcessingException(QueryPlugin.Util.getString("TextTableNode.character_not_allowed", textLine, systemId)); //$NON-NLS-1$
}
//else just ignore
} else {
@@ -371,7 +371,7 @@
private List<String> parseFixedWidth(String line)
throws TeiidProcessingException {
if (line.length() < lineWidth) {
- throw new TeiidProcessingException(QueryExecPlugin.Util.getString("TextTableNode.invalid_width", line.length(), lineWidth, textLine, systemId)); //$NON-NLS-1$
+ throw new TeiidProcessingException(QueryPlugin.Util.getString("TextTableNode.invalid_width", line.length(), lineWidth, textLine, systemId)); //$NON-NLS-1$
}
ArrayList<String> result = new ArrayList<String>();
int beginIndex = 0;
Modified: trunk/engine/src/main/java/org/teiid/query/processor/relational/XMLTableNode.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/processor/relational/XMLTableNode.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/processor/relational/XMLTableNode.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -46,7 +46,7 @@
import org.teiid.core.TeiidProcessingException;
import org.teiid.core.types.DataTypeManager;
import org.teiid.core.types.XMLType;
-import org.teiid.query.execution.QueryExecPlugin;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.function.FunctionDescriptor;
import org.teiid.query.sql.lang.XMLTable;
import org.teiid.query.sql.lang.XMLTable.XMLColumn;
@@ -132,7 +132,7 @@
try {
item = result.next();
} catch (XPathException e) {
- throw new TeiidProcessingException(e, QueryExecPlugin.Util.getString("XMLTableNode.error", e.getMessage())); //$NON-NLS-1$
+ throw new TeiidProcessingException(e, QueryPlugin.Util.getString("XMLTableNode.error", e.getMessage())); //$NON-NLS-1$
}
rowCount++;
if (item == null) {
@@ -164,7 +164,7 @@
continue;
}
if (pathIter.next() != null) {
- throw new TeiidProcessingException(QueryExecPlugin.Util.getString("XMLTableName.multi_value", proColumn.getName())); //$NON-NLS-1$
+ throw new TeiidProcessingException(QueryPlugin.Util.getString("XMLTableName.multi_value", proColumn.getName())); //$NON-NLS-1$
}
Object value = Value.convertToJava(colItem);
if (value instanceof Item) {
@@ -184,7 +184,7 @@
value = FunctionDescriptor.importValue(value, proColumn.getSymbol().getType());
tuple.add(value);
} catch (XPathException e) {
- throw new TeiidProcessingException(e, QueryExecPlugin.Util.getString("XMLTableNode.path_error", proColumn.getName())); //$NON-NLS-1$
+ throw new TeiidProcessingException(e, QueryPlugin.Util.getString("XMLTableNode.path_error", proColumn.getName())); //$NON-NLS-1$
}
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/processor/xml/AbortProcessingInstruction.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/processor/xml/AbortProcessingInstruction.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/processor/xml/AbortProcessingInstruction.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -27,8 +27,7 @@
import org.teiid.core.TeiidComponentException;
import org.teiid.core.TeiidProcessingException;
import org.teiid.logging.LogManager;
-import org.teiid.query.execution.QueryExecPlugin;
-import org.teiid.query.util.ErrorMessageKeys;
+import org.teiid.query.QueryPlugin;
/**
@@ -43,7 +42,7 @@
* Default message included in the RuntimeException thrown from
* {@link #process}
*/
- public static final String DEFAULT_MESSAGE = QueryExecPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0054);
+ public static final String DEFAULT_MESSAGE = QueryPlugin.Util.getString("ERR.015.006.0054"); //$NON-NLS-1$
/**
* Constructor for AbortProcessingInstruction.
Modified: trunk/engine/src/main/java/org/teiid/query/processor/xml/AddNodeInstruction.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/processor/xml/AddNodeInstruction.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/processor/xml/AddNodeInstruction.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -22,7 +22,12 @@
package org.teiid.query.processor.xml;
-import static org.teiid.query.analysis.AnalysisRecord.*;
+import static org.teiid.query.analysis.AnalysisRecord.PROP_DATA_COL;
+import static org.teiid.query.analysis.AnalysisRecord.PROP_DEFAULT;
+import static org.teiid.query.analysis.AnalysisRecord.PROP_NAMESPACE;
+import static org.teiid.query.analysis.AnalysisRecord.PROP_NAMESPACE_DECL;
+import static org.teiid.query.analysis.AnalysisRecord.PROP_OPTIONAL;
+import static org.teiid.query.analysis.AnalysisRecord.PROP_TAG;
import java.util.ArrayList;
import java.util.Enumeration;
@@ -34,7 +39,7 @@
import org.teiid.core.TeiidComponentException;
import org.teiid.core.TeiidProcessingException;
import org.teiid.logging.LogManager;
-import org.teiid.query.execution.QueryExecPlugin;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.sql.symbol.ElementSymbol;
@@ -139,9 +144,9 @@
}
if (!success){
- String elem = (isElement ? QueryExecPlugin.Util.getString("AddNodeInstruction.element__1" ) : QueryExecPlugin.Util.getString("AddNodeInstruction.attribute__2")); //$NON-NLS-1$ //$NON-NLS-2$
+ String elem = (isElement ? QueryPlugin.Util.getString("AddNodeInstruction.element__1" ) : QueryPlugin.Util.getString("AddNodeInstruction.attribute__2")); //$NON-NLS-1$ //$NON-NLS-2$
Object[] params = new Object[]{elem, this.descriptor.getQName(), this.descriptor.getNamespaceURI(), this.descriptor.getNamespaceURIs()};
- String msg = QueryExecPlugin.Util.getString("AddNodeInstruction.Unable_to_add_xml_{0}_{1},_namespace_{2},_namespace_declarations_{3}_3", params); //$NON-NLS-1$
+ String msg = QueryPlugin.Util.getString("AddNodeInstruction.Unable_to_add_xml_{0}_{1},_namespace_{2},_namespace_declarations_{3}_3", params); //$NON-NLS-1$
throw new TeiidComponentException(msg);
}
Modified: trunk/engine/src/main/java/org/teiid/query/processor/xml/MoveDocInstruction.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/processor/xml/MoveDocInstruction.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/processor/xml/MoveDocInstruction.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -28,8 +28,7 @@
import org.teiid.core.TeiidProcessingException;
import org.teiid.core.util.Assertion;
import org.teiid.logging.LogManager;
-import org.teiid.query.execution.QueryExecPlugin;
-import org.teiid.query.util.ErrorMessageKeys;
+import org.teiid.query.QueryPlugin;
import org.xml.sax.SAXException;
@@ -71,7 +70,7 @@
doc.moveToLastChild();
break;
default:
- Assertion.failed(QueryExecPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0051, direction));
+ Assertion.failed(QueryPlugin.Util.getString("ERR.015.006.0051", direction)); //$NON-NLS-1$
break;
}
Modified: trunk/engine/src/main/java/org/teiid/query/processor/xml/NodeDescriptor.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/processor/xml/NodeDescriptor.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/processor/xml/NodeDescriptor.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -25,7 +25,7 @@
import java.util.Properties;
import org.teiid.core.TeiidComponentException;
-import org.teiid.query.execution.QueryExecPlugin;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.mapping.xml.MappingAttribute;
import org.teiid.query.mapping.xml.MappingElement;
import org.teiid.query.mapping.xml.MappingNode;
@@ -287,7 +287,7 @@
} else if(namespacePrefix.equals(MappingNodeConstants.INSTANCES_NAMESPACE_PREFIX)) {
uri = MappingNodeConstants.INSTANCES_NAMESPACE;
}else {
- String msg = QueryExecPlugin.Util.getString("XMLPlanner.no_uri", new Object[] {namespacePrefix, name}); //$NON-NLS-1$
+ String msg = QueryPlugin.Util.getString("XMLPlanner.no_uri", new Object[] {namespacePrefix, name}); //$NON-NLS-1$
throw new TeiidComponentException(msg);
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/processor/xml/RecurseProgramCondition.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/processor/xml/RecurseProgramCondition.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/processor/xml/RecurseProgramCondition.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -27,9 +27,8 @@
import org.teiid.core.TeiidComponentException;
import org.teiid.core.TeiidProcessingException;
-import org.teiid.query.execution.QueryExecPlugin;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.sql.lang.Criteria;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -93,7 +92,7 @@
//handle the case of exception on recursion limit reached
if (terminate && this.exceptionOnRecursionLimit){
- throw new TeiidComponentException(ErrorMessageKeys.PROCESSOR_0039, QueryExecPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0039));
+ throw new TeiidComponentException("ERR.015.006.0039", QueryPlugin.Util.getString("ERR.015.006.0039")); //$NON-NLS-1$ //$NON-NLS-2$
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/processor/xml/RelationalPlanExecutor.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/processor/xml/RelationalPlanExecutor.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/processor/xml/RelationalPlanExecutor.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -31,7 +31,7 @@
import org.teiid.core.TeiidComponentException;
import org.teiid.core.TeiidProcessingException;
import org.teiid.logging.LogManager;
-import org.teiid.query.execution.QueryExecPlugin;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.mapping.xml.ResultSetInfo;
import org.teiid.query.processor.BatchIterator;
import org.teiid.query.processor.ProcessorDataManager;
@@ -123,7 +123,7 @@
// check if we walked over the row limit
if (this.currentRow != null && this.resultInfo.getUserRowLimit() > 0 && this.currentRowNumber > this.resultInfo.getUserRowLimit()) {
if (this.resultInfo.exceptionOnRowlimit()) {
- throw new TeiidProcessingException(QueryExecPlugin.Util.getString("row_limit_passed", new Object[] { new Integer(this.resultInfo.getUserRowLimit()), this.resultInfo.getResultSetName()})); //$NON-NLS-1$
+ throw new TeiidProcessingException(QueryPlugin.Util.getString("row_limit_passed", new Object[] { new Integer(this.resultInfo.getUserRowLimit()), this.resultInfo.getResultSetName()})); //$NON-NLS-1$
}
// well, we did not throw a exception, that means we need to limit it to current row
this.currentRow = null;
Modified: trunk/engine/src/main/java/org/teiid/query/processor/xml/XMLContext.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/processor/xml/XMLContext.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/processor/xml/XMLContext.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -28,7 +28,7 @@
import org.teiid.core.TeiidComponentException;
import org.teiid.core.TeiidProcessingException;
-import org.teiid.query.execution.QueryExecPlugin;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.sql.symbol.ElementSymbol;
import org.teiid.query.sql.util.VariableContext;
@@ -83,7 +83,7 @@
if (this.parentContext != null) {
return this.parentContext.getCurrentRow(aliasResultName);
}
- throw new TeiidComponentException(QueryExecPlugin.Util.getString("results_not_found", aliasResultName)); //$NON-NLS-1$
+ throw new TeiidComponentException(QueryPlugin.Util.getString("results_not_found", aliasResultName)); //$NON-NLS-1$
}
return executor.currentRow();
}
@@ -100,7 +100,7 @@
if (this.parentContext != null) {
return this.parentContext.getNextRow(aliasResultName);
}
- throw new TeiidComponentException(QueryExecPlugin.Util.getString("results_not_found", aliasResultName)); //$NON-NLS-1$
+ throw new TeiidComponentException(QueryPlugin.Util.getString("results_not_found", aliasResultName)); //$NON-NLS-1$
}
return executor.nextRow();
}
@@ -138,7 +138,7 @@
if (this.parentContext != null) {
return this.parentContext.getOutputElements(resultName);
}
- throw new TeiidComponentException(QueryExecPlugin.Util.getString("results_not_found", resultName)); //$NON-NLS-1$
+ throw new TeiidComponentException(QueryPlugin.Util.getString("results_not_found", resultName)); //$NON-NLS-1$
}
return executor.getOutputElements();
}
Modified: trunk/engine/src/main/java/org/teiid/query/processor/xml/XMLPlan.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/processor/xml/XMLPlan.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/processor/xml/XMLPlan.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -22,7 +22,7 @@
package org.teiid.query.processor.xml;
-import static org.teiid.query.analysis.AnalysisRecord.*;
+import static org.teiid.query.analysis.AnalysisRecord.PROP_OUTPUT_COLS;
import java.io.IOException;
import java.io.InputStream;
@@ -53,15 +53,14 @@
import org.teiid.core.types.XMLType;
import org.teiid.logging.LogConstants;
import org.teiid.logging.LogManager;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.analysis.AnalysisRecord;
-import org.teiid.query.execution.QueryExecPlugin;
import org.teiid.query.processor.ProcessorDataManager;
import org.teiid.query.processor.ProcessorPlan;
import org.teiid.query.sql.symbol.ElementSymbol;
import org.teiid.query.sql.symbol.GroupSymbol;
import org.teiid.query.tempdata.TempTableStore;
import org.teiid.query.util.CommandContext;
-import org.teiid.query.util.ErrorMessageKeys;
import org.xml.sax.Attributes;
import org.xml.sax.EntityResolver;
import org.xml.sax.ErrorHandler;
@@ -226,7 +225,7 @@
if (xmlSchemas == null || xmlSchemas.isEmpty()){
// if there is no schema no need to validate
// return a warning saying there is no schema
- TeiidException noSchema = new TeiidComponentException(ErrorMessageKeys.PROCESSOR_0042, QueryExecPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0042));
+ TeiidException noSchema = new TeiidComponentException("ERR.015.006.0042", QueryPlugin.Util.getString("ERR.015.006.0042")); //$NON-NLS-1$ //$NON-NLS-2$
addWarning(noSchema);
return;
}
@@ -389,7 +388,7 @@
} catch (Exception e){
e.printStackTrace();
LogManager.logWarning(LogConstants.CTX_XML_PLAN, e,
- QueryExecPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0001));
+ QueryPlugin.Util.getString("ERR.015.006.0001")); //$NON-NLS-1$
}
return "XMLPlan"; //$NON-NLS-1$
}
@@ -440,13 +439,13 @@
}
public void error(SAXParseException ex){
- addException(new TeiidComponentException(ErrorMessageKeys.PROCESSOR_0049, QueryExecPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0048, ex.getMessage())));
+ addException(new TeiidComponentException("ERR.015.006.0049", QueryPlugin.Util.getString("ERR.015.006.0048", ex.getMessage()))); //$NON-NLS-1$ //$NON-NLS-2$
}
public void fatalError(SAXParseException ex){
- addException(new TeiidComponentException(ErrorMessageKeys.PROCESSOR_0048, QueryExecPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0048, ex.getMessage())));
+ addException(new TeiidComponentException("ERR.015.006.0048", QueryPlugin.Util.getString("ERR.015.006.0048", ex.getMessage()))); //$NON-NLS-1$ //$NON-NLS-2$
}
public void warning(SAXParseException ex){
- addException(new TeiidComponentException(ErrorMessageKeys.PROCESSOR_0049, QueryExecPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0048, ex.getMessage())));
+ addException(new TeiidComponentException("ERR.015.006.0049", QueryPlugin.Util.getString("ERR.015.006.0048", ex.getMessage()))); //$NON-NLS-1$ //$NON-NLS-2$
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/report/ActivityReport.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/report/ActivityReport.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/report/ActivityReport.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -28,7 +28,6 @@
import java.util.Iterator;
import org.teiid.query.QueryPlugin;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -74,7 +73,7 @@
*/
public void addItem(ReportItem item) {
if(item == null) {
- throw new IllegalArgumentException(QueryPlugin.Util.getString(ErrorMessageKeys.REPORT_0001));
+ throw new IllegalArgumentException(QueryPlugin.Util.getString("ERR.015.007.0001")); //$NON-NLS-1$
}
this.items.add(item);
@@ -87,7 +86,7 @@
*/
public void addItems(Collection items) {
if(items == null) {
- throw new IllegalArgumentException(QueryPlugin.Util.getString(ErrorMessageKeys.REPORT_0001));
+ throw new IllegalArgumentException(QueryPlugin.Util.getString("ERR.015.007.0001")); //$NON-NLS-1$
}
Iterator iter = items.iterator();
Modified: trunk/engine/src/main/java/org/teiid/query/resolver/ProcedureContainerResolver.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/resolver/ProcedureContainerResolver.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/resolver/ProcedureContainerResolver.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -46,7 +46,6 @@
import org.teiid.query.sql.proc.CreateUpdateProcedureCommand;
import org.teiid.query.sql.symbol.ElementSymbol;
import org.teiid.query.sql.symbol.GroupSymbol;
-import org.teiid.query.util.ErrorMessageKeys;
public abstract class ProcedureContainerResolver implements CommandResolver {
@@ -88,7 +87,7 @@
try {
subCommand = parser.parseCommand(plan);
} catch(QueryParserException e) {
- throw new QueryResolverException(e, ErrorMessageKeys.RESOLVER_0045, QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0045, group));
+ throw new QueryResolverException(e, "ERR.015.008.0045", QueryPlugin.Util.getString("ERR.015.008.0045", group)); //$NON-NLS-1$ //$NON-NLS-2$
}
if(subCommand instanceof CreateUpdateProcedureCommand){
@@ -204,7 +203,7 @@
String plan = getPlan(metadata, procCommand.getGroup());
if(plan == null) {
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0009, QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0009, procCommand.getGroup(), procCommand.getClass().getSimpleName()));
+ throw new QueryResolverException("ERR.015.008.0009", QueryPlugin.Util.getString("ERR.015.008.0009", procCommand.getGroup(), procCommand.getClass().getSimpleName())); //$NON-NLS-1$ //$NON-NLS-2$
}
return plan;
}
Modified: trunk/engine/src/main/java/org/teiid/query/resolver/command/ExecResolver.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/resolver/command/ExecResolver.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/resolver/command/ExecResolver.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -57,7 +57,6 @@
import org.teiid.query.sql.symbol.Expression;
import org.teiid.query.sql.symbol.GroupSymbol;
import org.teiid.query.sql.visitor.ValueIteratorProviderCollectorVisitor;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -154,7 +153,7 @@
}
if(!namedParameters && (inputParams != inputExpressions.size())) {
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0007, QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0007, new Object[] {new Integer(inputParams), new Integer(inputExpressions.size()), storedProcedureCommand.getGroup().toString()}));
+ throw new QueryResolverException("ERR.015.008.0007", QueryPlugin.Util.getString("ERR.015.008.0007", new Object[] {new Integer(inputParams), new Integer(inputExpressions.size()), storedProcedureCommand.getGroup().toString()})); //$NON-NLS-1$ //$NON-NLS-2$
}
// Walk through the resolved parameters and set the expressions from the
@@ -268,7 +267,7 @@
// and add implicit conversion if necessary
Class exprType = expr.getType();
if(paramType == null || exprType == null) {
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0061, QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0061, storedProcedureCommand.getProcedureName(), param.getName()));
+ throw new QueryResolverException("ERR.015.008.0061", QueryPlugin.Util.getString("ERR.015.008.0061", storedProcedureCommand.getProcedureName(), param.getName())); //$NON-NLS-1$ //$NON-NLS-2$
}
String tgtType = DataTypeManager.getDataTypeName(paramType);
String srcType = DataTypeManager.getDataTypeName(exprType);
Modified: trunk/engine/src/main/java/org/teiid/query/resolver/command/InsertResolver.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/resolver/command/InsertResolver.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/resolver/command/InsertResolver.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -57,7 +57,6 @@
import org.teiid.query.sql.symbol.GroupSymbol;
import org.teiid.query.sql.symbol.Reference;
import org.teiid.query.sql.symbol.SingleElementSymbol;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -151,7 +150,7 @@
try {
resolveList(insert.getVariables(), metadata, null, groups);
} catch (QueryResolverException e) {
- throw new QueryResolverException(e, QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0054, insert.getGroup(), e.getUnresolvedSymbols()));
+ throw new QueryResolverException(e, QueryPlugin.Util.getString("ERR.015.012.0054", insert.getGroup(), e.getUnresolvedSymbols())); //$NON-NLS-1$
}
}
@@ -176,7 +175,7 @@
// check that # of variables == # of values
if(values.size() != insert.getVariables().size()) {
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0010, QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0010, insert.getVariables().size(), values.size()));
+ throw new QueryResolverException("ERR.015.008.0010", QueryPlugin.Util.getString("ERR.015.008.0010", insert.getVariables().size(), values.size())); //$NON-NLS-1$ //$NON-NLS-2$
}
Iterator valueIter = values.iterator();
Modified: trunk/engine/src/main/java/org/teiid/query/resolver/command/SetQueryResolver.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/resolver/command/SetQueryResolver.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/resolver/command/SetQueryResolver.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -45,7 +45,6 @@
import org.teiid.query.sql.lang.QueryCommand;
import org.teiid.query.sql.lang.SetQuery;
import org.teiid.query.sql.symbol.SingleElementSymbol;
-import org.teiid.query.util.ErrorMessageKeys;
public class SetQueryResolver implements CommandResolver {
@@ -76,7 +75,7 @@
QueryResolver.resolveCommand(rightCommand, Collections.EMPTY_MAP, metadata.getMetadata(), analysis, false);
if (firstProject.size() != rightCommand.getProjectedSymbols().size()) {
- throw new QueryResolverException(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0035, setQuery.getOperation()));
+ throw new QueryResolverException(QueryPlugin.Util.getString("ERR.015.012.0035", setQuery.getOperation())); //$NON-NLS-1$
}
checkSymbolTypes(firstProjectTypes, rightCommand.getProjectedSymbols());
Modified: trunk/engine/src/main/java/org/teiid/query/resolver/command/SimpleQueryResolver.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/resolver/command/SimpleQueryResolver.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/resolver/command/SimpleQueryResolver.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -84,7 +84,6 @@
import org.teiid.query.sql.symbol.ScalarSubquery;
import org.teiid.query.sql.symbol.SingleElementSymbol;
import org.teiid.query.sql.visitor.ElementCollectorVisitor;
-import org.teiid.query.util.ErrorMessageKeys;
public class SimpleQueryResolver implements CommandResolver {
@@ -140,7 +139,7 @@
String groupAlias = name.substring(0, index);
List<GroupSymbol> groupSymbols = ResolverUtil.findMatchingGroups(groupAlias.toUpperCase(), groups, metadata);
if(groupSymbols.isEmpty() || groupSymbols.size() > 1) {
- String msg = QueryPlugin.Util.getString(groupSymbols.isEmpty()?ErrorMessageKeys.RESOLVER_0047:"SimpleQueryResolver.ambiguous_all_in_group", allInGroupSymbol); //$NON-NLS-1$
+ String msg = QueryPlugin.Util.getString(groupSymbols.isEmpty()?"ERR.015.008.0047":"SimpleQueryResolver.ambiguous_all_in_group", allInGroupSymbol); //$NON-NLS-1$ //$NON-NLS-2$
QueryResolverException qre = new QueryResolverException(msg);
qre.addUnresolvedSymbol(new UnresolvedSymbolDescription(allInGroupSymbol.toString(), msg));
throw qre;
@@ -374,7 +373,7 @@
visitNode(group);
try {
if (!group.isProcedure() && metadata.isXMLGroup(group.getMetadataID())) {
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0003, QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0003));
+ throw new QueryResolverException("ERR.015.008.0003", QueryPlugin.Util.getString("ERR.015.008.0003")); //$NON-NLS-1$ //$NON-NLS-2$
}
discoveredGroup(group);
if (group.isProcedure()) {
@@ -506,8 +505,8 @@
private void addDiscoveredGroups() {
for (GroupSymbol group : discoveredGroups) {
if (!this.currentGroups.add(group)) {
- String msg = QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0046, group.getName());
- QueryResolverException qre = new QueryResolverException(ErrorMessageKeys.RESOLVER_0046, msg);
+ String msg = QueryPlugin.Util.getString("ERR.015.008.0046", group.getName()); //$NON-NLS-1$
+ QueryResolverException qre = new QueryResolverException("ERR.015.008.0046", msg); //$NON-NLS-1$
qre.addUnresolvedSymbol(new UnresolvedSymbolDescription(group.toString(), msg));
throw new TeiidRuntimeException(qre);
}
Modified: trunk/engine/src/main/java/org/teiid/query/resolver/command/UpdateProcedureResolver.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/resolver/command/UpdateProcedureResolver.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/resolver/command/UpdateProcedureResolver.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -72,7 +72,6 @@
import org.teiid.query.sql.symbol.GroupSymbol;
import org.teiid.query.sql.util.SymbolMap;
import org.teiid.query.sql.visitor.ValueIteratorProviderCollectorVisitor;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -105,7 +104,7 @@
// If still haven't found virtual group, the external metadata is bad
if(virtualGroup == null) {
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0012, QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0012));
+ throw new QueryResolverException("ERR.015.008.0012", QueryPlugin.Util.getString("ERR.015.008.0012")); //$NON-NLS-1$ //$NON-NLS-2$
}
ResolveVirtualGroupCriteriaVisitor.resolveCriteria(procCommand, virtualGroup, metadata);
@@ -132,7 +131,7 @@
try {
transformCmd = QueryParser.getQueryParser().parseCommand(transformQuery);
} catch(QueryParserException e) {
- throw new QueryResolverException(e, ErrorMessageKeys.RESOLVER_0013, QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0013, virtualGroup));
+ throw new QueryResolverException(e, "ERR.015.008.0013", QueryPlugin.Util.getString("ERR.015.008.0013", virtualGroup)); //$NON-NLS-1$ //$NON-NLS-2$
}
QueryResolver.resolveCommand(transformCmd, metadata);
@@ -289,7 +288,7 @@
String groupName = loopStmt.getCursorName();
if (metadata.getMetadataStore().getTempGroupID(groupName) != null) {
- throw new QueryResolverException(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0065));
+ throw new QueryResolverException(QueryPlugin.Util.getString("ERR.015.012.0065")); //$NON-NLS-1$
}
//check - cursor name should not start with #
@@ -314,7 +313,7 @@
case Statement.TYPE_CONTINUE:
break;
default:
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0015, QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0015, statement.getType()));
+ throw new QueryResolverException("ERR.015.008.0015", QueryPlugin.Util.getString("ERR.015.008.0015", statement.getType())); //$NON-NLS-1$ //$NON-NLS-2$
}
}
@@ -340,7 +339,7 @@
sepIndex = varName.lastIndexOf(ElementSymbol.SEPARATOR);
String groupName = varName.substring(0, sepIndex);
if(!groupName.equals(ProcedureReservedWords.VARIABLES)) {
- handleUnresolvableDeclaration(variable, QueryPlugin.Util.getString(ErrorMessageKeys.SQL_0031, new Object[]{ProcedureReservedWords.VARIABLES, variable}));
+ handleUnresolvableDeclaration(variable, QueryPlugin.Util.getString("ERR.015.010.0031", new Object[]{ProcedureReservedWords.VARIABLES, variable})); //$NON-NLS-1$
}
}
boolean exists = false;
@@ -351,7 +350,7 @@
//ignore, not already defined
}
if (exists) {
- handleUnresolvableDeclaration(variable, QueryPlugin.Util.getString(ErrorMessageKeys.SQL_0032, variable.getOutputName()));
+ handleUnresolvableDeclaration(variable, QueryPlugin.Util.getString("ERR.015.010.0032", variable.getOutputName())); //$NON-NLS-1$
}
variable.setType(DataTypeManager.getDataTypeClass(typeName));
variable.setGroupSymbol(variables);
Modified: trunk/engine/src/main/java/org/teiid/query/resolver/command/XMLQueryResolver.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/resolver/command/XMLQueryResolver.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/resolver/command/XMLQueryResolver.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -56,7 +56,6 @@
import org.teiid.query.sql.visitor.CommandCollectorVisitor;
import org.teiid.query.sql.visitor.ElementCollectorVisitor;
import org.teiid.query.sql.visitor.GroupCollectorVisitor;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -113,11 +112,11 @@
//we throw exceptions in these cases, since the clauses will not be resolved
if (query.getGroupBy() != null) {
- throw new QueryResolverException(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0031));
+ throw new QueryResolverException(QueryPlugin.Util.getString("ERR.015.012.0031")); //$NON-NLS-1$
}
if (query.getHaving() != null) {
- throw new QueryResolverException(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0032));
+ throw new QueryResolverException(QueryPlugin.Util.getString("ERR.015.012.0032")); //$NON-NLS-1$
}
}
@@ -200,7 +199,7 @@
} else if (ss instanceof ExpressionSymbol) {
throw new QueryResolverException(QueryPlugin.Util.getString("XMLQueryResolver.no_expressions_in_select")); //$NON-NLS-1$
} else if (ss instanceof AliasSymbol) {
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0070, QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0070));
+ throw new QueryResolverException("ERR.015.008.0070", QueryPlugin.Util.getString("ERR.015.008.0070")); //$NON-NLS-1$ //$NON-NLS-2$
}
}
@@ -388,11 +387,11 @@
try {
ResolverVisitor.resolveLanguageObject(elem, Collections.EMPTY_LIST, externalGroups, metadata);
} catch (QueryResolverException e) {
- throw new QueryResolverException(e, ErrorMessageKeys.RESOLVER_0019, QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0019, critElemName));
+ throw new QueryResolverException(e, "ERR.015.008.0019", QueryPlugin.Util.getString("ERR.015.008.0019", critElemName)); //$NON-NLS-1$ //$NON-NLS-2$
}
} else {
// Found multiple matches
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0020, QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0020, critElemName));
+ throw new QueryResolverException("ERR.015.008.0020", QueryPlugin.Util.getString("ERR.015.008.0020", critElemName)); //$NON-NLS-1$ //$NON-NLS-2$
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/resolver/util/BindVariableVisitor.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/resolver/util/BindVariableVisitor.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/resolver/util/BindVariableVisitor.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -44,7 +44,6 @@
import org.teiid.query.sql.symbol.Expression;
import org.teiid.query.sql.symbol.GroupSymbol;
import org.teiid.query.sql.symbol.Reference;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -75,7 +74,7 @@
* @param metadata source of metadata
*/
public BindVariableVisitor(List bindings, QueryMetadataInterface metadata) {
- ArgCheck.isNotNull(bindings, QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0049));
+ ArgCheck.isNotNull(bindings, QueryPlugin.Util.getString("ERR.015.008.0049")); //$NON-NLS-1$
this.bindings = bindings;
this.metadata = metadata;
@@ -118,7 +117,7 @@
try {
bindReference(obj, binding);
} catch(QueryParserException e) {
- handleException(new QueryResolverException(QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0022), e.getMessage()));
+ handleException(new QueryResolverException(QueryPlugin.Util.getString("ERR.015.008.0022"), e.getMessage())); //$NON-NLS-1$
} catch(QueryMetadataException e) {
handleException(new TeiidComponentException(e, e.getMessage()));
} catch(QueryResolverException e) {
@@ -149,7 +148,7 @@
Expression expr = QueryParser.getQueryParser().parseExpression(binding);
if(!(expr instanceof ElementSymbol)) {
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0025, QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0025, expr));
+ throw new QueryResolverException("ERR.015.008.0025", QueryPlugin.Util.getString("ERR.015.008.0025", expr)); //$NON-NLS-1$ //$NON-NLS-2$
}
ElementSymbol element = (ElementSymbol) expr;
Modified: trunk/engine/src/main/java/org/teiid/query/resolver/util/ResolverUtil.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/resolver/util/ResolverUtil.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/resolver/util/ResolverUtil.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -72,7 +72,6 @@
import org.teiid.query.sql.symbol.SingleElementSymbol;
import org.teiid.query.sql.util.SymbolMap;
import org.teiid.query.sql.visitor.ElementCollectorVisitor;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -214,7 +213,7 @@
}
//Expression is wrong type and can't convert
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0041, QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0041, new Object[] {targetTypeName, sourceExpression, sourceTypeName}));
+ throw new QueryResolverException("ERR.015.008.0041", QueryPlugin.Util.getString("ERR.015.008.0041", new Object[] {targetTypeName, sourceExpression, sourceTypeName})); //$NON-NLS-1$ //$NON-NLS-2$
}
public static Constant convertConstant(String sourceTypeName,
@@ -288,7 +287,7 @@
Reference ref = (Reference)expression;
if (ref.isPositional() && ref.getType() == null) {
if (targetType == null) {
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0026, QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0026, surroundingExpression));
+ throw new QueryResolverException("ERR.015.008.0026", QueryPlugin.Util.getString("ERR.015.008.0026", surroundingExpression)); //$NON-NLS-1$ //$NON-NLS-2$
}
ref.setType(targetType);
}
@@ -351,13 +350,38 @@
for (int i = 0; i < orderBy.getVariableCount(); i++) {
SingleElementSymbol sortKey = orderBy.getVariable(i);
if (sortKey instanceof ElementSymbol) {
- int index = resolveSortKey(fromClauseGroups, knownElements, metadata, isSimpleQuery,
- knownShortNames, (ElementSymbol)sortKey);
- if (index == -1) {
- index = expressions.indexOf(SymbolMap.getExpression(sortKey));
- }
- orderBy.setExpressionPosition(i, index);
- continue;
+ ElementSymbol symbol = (ElementSymbol)sortKey;
+ String groupPart = metadata.getGroupName(symbol.getName());
+ String symbolName = symbol.getName();
+ String shortName = symbol.getShortName();
+ if (groupPart == null) {
+ int position = -1;
+ SingleElementSymbol matchedSymbol = null;
+ // walk the SELECT col short names, looking for a match on the current ORDER BY 'short name'
+ for(int j=0; j<knownShortNames.length; j++) {
+ if( !shortName.equalsIgnoreCase( knownShortNames[j] )) {
+ continue;
+ }
+ // if we already have a matched symbol, matching again here means it is duplicate/ambiguous
+ if(matchedSymbol != null) {
+ if (!matchedSymbol.equals(knownElements.get(j))) {
+ throw new QueryResolverException("ERR.015.008.0042", QueryPlugin.Util.getString("ERR.015.008.0042", symbolName)); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ continue;
+ }
+ matchedSymbol = knownElements.get(j);
+ position = j;
+ }
+ if (matchedSymbol != null) {
+ TempMetadataID tempMetadataID = new TempMetadataID(symbol.getName(), matchedSymbol.getType());
+ symbol.setMetadataID(tempMetadataID);
+ symbol.setType(matchedSymbol.getType());
+ }
+ if (position != -1) {
+ orderBy.setExpressionPosition(i, position);
+ continue;
+ }
+ }
} else if (sortKey instanceof ExpressionSymbol) {
// check for legacy positional
ExpressionSymbol es = (ExpressionSymbol)sortKey;
@@ -377,75 +401,22 @@
throw new QueryResolverException(QueryPlugin.Util.getString("ResolverUtil.setquery_order_expression", sortKey)); //$NON-NLS-1$
}
for (ElementSymbol symbol : ElementCollectorVisitor.getElements(sortKey, false)) {
- resolveSortKey(fromClauseGroups, null, metadata, isSimpleQuery, null, symbol);
+ try {
+ ResolverVisitor.resolveLanguageObject(symbol, fromClauseGroups, command.getExternalGroupContexts(), metadata);
+ } catch(QueryResolverException e) {
+ throw new QueryResolverException(e, "ERR.015.008.0043", QueryPlugin.Util.getString("ERR.015.008.0043", symbol.getName()) );//$NON-NLS-1$ //$NON-NLS-2$
+ }
}
ResolverVisitor.resolveLanguageObject(sortKey, metadata);
int index = expressions.indexOf(SymbolMap.getExpression(sortKey));
+ if (index == -1 && !isSimpleQuery) {
+ throw new QueryResolverException(QueryPlugin.Util.getString("ResolverUtil.invalid_unrelated", sortKey)); //$NON-NLS-1$
+ }
orderBy.setExpressionPosition(i, index);
}
}
- private static int resolveSortKey(List fromClauseGroups, List knownElements,
- QueryMetadataInterface metadata, boolean isSimpleQuery,
- String[] knownShortNames, ElementSymbol symbol) throws TeiidComponentException,
- QueryMetadataException, QueryResolverException {
- SingleElementSymbol matchedSymbol = null;
- String symbolName = symbol.getName();
- String groupPart = metadata.getGroupName(symbolName);
- String shortName = symbol.getShortName();
-
- //check for union order by
- if (fromClauseGroups.isEmpty() && groupPart != null && !shortName.equals(symbolName)) {
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0043, QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0043, symbolName));
- }
-
- if (knownShortNames != null) {
- // walk the SELECT col short names, looking for a match on the current ORDER BY 'short name'
- for(int i=0; i<knownShortNames.length; i++) {
- if( shortName.equalsIgnoreCase( knownShortNames[i] )) {
- if (groupPart != null) {
- Object knownSymbol = knownElements.get(i);
- if(knownSymbol instanceof ElementSymbol) {
- ElementSymbol knownElement = (ElementSymbol) knownSymbol;
- GroupSymbol group = knownElement.getGroupSymbol();
-
- // skip this one if the two short names are not from the same group
- if (!nameMatchesGroup(groupPart.toUpperCase(), group.getCanonicalName())) {
- continue;
- }
- }
- }
-
- // if we already have a matched symbol, matching again here means it is duplicate/ambiguous
- if(matchedSymbol != null) {
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0042, QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0042, symbolName));
- }
- matchedSymbol = (SingleElementSymbol)knownElements.get(i);
- }
- }
- if (matchedSymbol != null) {
- TempMetadataID tempMetadataID = new TempMetadataID(symbol.getName(), matchedSymbol.getType());
- int position = knownElements.indexOf(matchedSymbol);
- symbol.setMetadataID(tempMetadataID);
- symbol.setType(matchedSymbol.getType());
- return position;
- }
- }
-
- if (!isSimpleQuery) {
- throw new QueryResolverException(QueryPlugin.Util.getString("ResolverUtil.invalid_unrelated", symbol.getName())); //$NON-NLS-1$
- }
- // Didn't find it by full name or short name, so try resolving
- try {
- ResolverVisitor.resolveLanguageObject(symbol, fromClauseGroups, metadata);
- } catch(QueryResolverException e) {
- throw new QueryResolverException(e, ErrorMessageKeys.RESOLVER_0043, QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0043, symbol.getName()) );
- }
- return -1;
- }
-
-
/**
* Get the default value for the parameter, which could be null
* if the parameter is set to NULLABLE. If no default is available,
@@ -786,13 +757,13 @@
// single projected symbol of the subquery
Class exprType = expression.getType();
if(exprType == null) {
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0030, QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0030, expression));
+ throw new QueryResolverException("ERR.015.008.0030", QueryPlugin.Util.getString("ERR.015.008.0030", expression)); //$NON-NLS-1$ //$NON-NLS-2$
}
String exprTypeName = DataTypeManager.getDataTypeName(exprType);
Collection projectedSymbols = crit.getCommand().getProjectedSymbols();
if (projectedSymbols.size() != 1){
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0032, QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0032, crit.getCommand()));
+ throw new QueryResolverException("ERR.015.008.0032", QueryPlugin.Util.getString("ERR.015.008.0032", crit.getCommand())); //$NON-NLS-1$ //$NON-NLS-2$
}
Class subqueryType = ((Expression)projectedSymbols.iterator().next()).getType();
String subqueryTypeName = DataTypeManager.getDataTypeName(subqueryType);
@@ -800,7 +771,7 @@
try {
result = convertExpression(expression, exprTypeName, subqueryTypeName, metadata);
} catch (QueryResolverException qre) {
- throw new QueryResolverException(qre, ErrorMessageKeys.RESOLVER_0033, QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0033, crit));
+ throw new QueryResolverException(qre, "ERR.015.008.0033", QueryPlugin.Util.getString("ERR.015.008.0033", crit)); //$NON-NLS-1$ //$NON-NLS-2$
}
return result;
}
@@ -810,17 +781,17 @@
ResolvedLookup result = new ResolvedLookup();
// Special code to handle setting return type of the lookup function to match the type of the return element
if( !(args[0] instanceof Constant) || !(args[1] instanceof Constant) || !(args[2] instanceof Constant)) {
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0063, QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0063));
+ throw new QueryResolverException("ERR.015.008.0063", QueryPlugin.Util.getString("ERR.015.008.0063")); //$NON-NLS-1$ //$NON-NLS-2$
}
// If code table name in lookup function refers to temp group throw exception
GroupSymbol groupSym = new GroupSymbol((String) ((Constant)args[0]).getValue());
try {
groupSym.setMetadataID(metadata.getGroupID((String) ((Constant)args[0]).getValue()));
if (groupSym.getMetadataID() instanceof TempMetadataID) {
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0065, QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0065, ((Constant)args[0]).getValue()));
+ throw new QueryResolverException("ERR.015.008.0065", QueryPlugin.Util.getString("ERR.015.008.0065", ((Constant)args[0]).getValue())); //$NON-NLS-1$ //$NON-NLS-2$
}
} catch(QueryMetadataException e) {
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0062, QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0062, ((Constant)args[0]).getValue()));
+ throw new QueryResolverException("ERR.015.008.0062", QueryPlugin.Util.getString("ERR.015.008.0062", ((Constant)args[0]).getValue())); //$NON-NLS-1$ //$NON-NLS-2$
}
result.setGroup(groupSym);
@@ -831,7 +802,7 @@
try {
ResolverVisitor.resolveLanguageObject(returnElement, groups, metadata);
} catch(QueryMetadataException e) {
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0062, QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0062, returnElementName));
+ throw new QueryResolverException("ERR.015.008.0062", QueryPlugin.Util.getString("ERR.015.008.0062", returnElementName)); //$NON-NLS-1$ //$NON-NLS-2$
}
result.setReturnElement(returnElement);
@@ -840,7 +811,7 @@
try {
ResolverVisitor.resolveLanguageObject(keyElement, groups, metadata);
} catch(QueryMetadataException e) {
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0062, QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0062, keyElementName));
+ throw new QueryResolverException("ERR.015.008.0062", QueryPlugin.Util.getString("ERR.015.008.0062", keyElementName)); //$NON-NLS-1$ //$NON-NLS-2$
}
result.setKeyElement(keyElement);
args[3] = convertExpression(args[3], DataTypeManager.getDataTypeName(keyElement.getType()), metadata);
@@ -919,7 +890,7 @@
// didn't find this group ID
}
} else if(matches > 1) {
- throw handleUnresolvedGroup(symbol, QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0055));
+ throw handleUnresolvedGroup(symbol, QueryPlugin.Util.getString("ERR.015.008.0055")); //$NON-NLS-1$
}
}
}
@@ -936,7 +907,7 @@
}
if(groupID == null) {
- throw handleUnresolvedGroup(symbol, QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0056));
+ throw handleUnresolvedGroup(symbol, QueryPlugin.Util.getString("ERR.015.008.0056")); //$NON-NLS-1$
}
// set real metadata ID in the symbol
symbol.setMetadataID(groupID);
Modified: trunk/engine/src/main/java/org/teiid/query/resolver/util/ResolverVisitor.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/resolver/util/ResolverVisitor.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/resolver/util/ResolverVisitor.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -70,7 +70,6 @@
import org.teiid.query.sql.symbol.SearchedCaseExpression;
import org.teiid.query.sql.symbol.XMLQuery;
import org.teiid.query.sql.symbol.XMLSerialize;
-import org.teiid.query.util.ErrorMessageKeys;
public class ResolverVisitor extends LanguageVisitor {
@@ -184,7 +183,7 @@
resolveAgainstGroups(shortCanonicalName, matchedGroups, matches);
if (matches.size() > 1) {
- handleUnresolvedElement(elementSymbol, QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0053, elementSymbol));
+ handleUnresolvedElement(elementSymbol, QueryPlugin.Util.getString("ERR.015.008.0053", elementSymbol)); //$NON-NLS-1$
return;
}
@@ -199,9 +198,9 @@
if (matches.isEmpty()) {
if (groupMatched) {
- handleUnresolvedElement(elementSymbol, QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0054, elementSymbol));
+ handleUnresolvedElement(elementSymbol, QueryPlugin.Util.getString("ERR.015.008.0054", elementSymbol)); //$NON-NLS-1$
} else {
- handleUnresolvedElement(elementSymbol, QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0051, elementSymbol));
+ handleUnresolvedElement(elementSymbol, QueryPlugin.Util.getString("ERR.015.008.0051", elementSymbol)); //$NON-NLS-1$
}
return;
}
@@ -307,7 +306,7 @@
try {
resolveFunction(obj, this.metadata.getFunctionLibrary());
} catch(QueryResolverException e) {
- if (ErrorMessageKeys.RESOLVER_0036.equals(e.getCode()) || ErrorMessageKeys.RESOLVER_0035.equals(e.getCode())) {
+ if ("ERR.015.008.0036".equals(e.getCode()) || "ERR.015.008.0035".equals(e.getCode())) { //$NON-NLS-1$ //$NON-NLS-2$
if (unresolvedFunctions == null) {
unresolvedFunctions = new LinkedHashMap<Function, QueryResolverException>();
}
@@ -442,7 +441,7 @@
types[i] = args[i].getType();
if(types[i] == null) {
if(!(args[i] instanceof Reference)){
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0035, QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0035, new Object[] {args[i], function}));
+ throw new QueryResolverException("ERR.015.008.0035", QueryPlugin.Util.getString("ERR.015.008.0035", new Object[] {args[i], function})); //$NON-NLS-1$ //$NON-NLS-2$
}
hasArgWithoutType = true;
}
@@ -466,14 +465,14 @@
FunctionForm form = library.findFunctionForm(function.getName(), args.length);
if(form == null) {
// Unknown function form
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0039, QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0039, function));
+ throw new QueryResolverException("ERR.015.008.0039", QueryPlugin.Util.getString("ERR.015.008.0039", function)); //$NON-NLS-1$ //$NON-NLS-2$
}
// Known function form - but without type information
if (hasArgWithoutType) {
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0036, QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0036, function));
+ throw new QueryResolverException("ERR.015.008.0036", QueryPlugin.Util.getString("ERR.015.008.0036", function)); //$NON-NLS-1$ //$NON-NLS-2$
}
// Known function form - unable to find implicit conversions
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0040, QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0040, function));
+ throw new QueryResolverException("ERR.015.008.0040", QueryPlugin.Util.getString("ERR.015.008.0040", function)); //$NON-NLS-1$ //$NON-NLS-2$
}
if(fd.getName().equalsIgnoreCase(FunctionLibrary.CONVERT) || fd.getName().equalsIgnoreCase(FunctionLibrary.CAST)) {
@@ -487,7 +486,7 @@
!srcTypeClass.equals(dataTypeClass) &&
!DataTypeManager.isTransformable(srcTypeClass, dataTypeClass)) {
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0037, QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0037, new Object[] {DataTypeManager.getDataTypeName(srcTypeClass), dataType}));
+ throw new QueryResolverException("ERR.015.008.0037", QueryPlugin.Util.getString("ERR.015.008.0037", new Object[] {DataTypeManager.getDataTypeName(srcTypeClass), dataType})); //$NON-NLS-1$ //$NON-NLS-2$
}
} else if(fd.getName().equalsIgnoreCase(FunctionLibrary.LOOKUP)) {
ResolverUtil.ResolvedLookup lookup = ResolverUtil.resolveLookup(function, metadata);
@@ -588,7 +587,7 @@
criteria.setUpperExpression(ResolverUtil.convertExpression(upper, upperTypeName, commonType, metadata));
} else {
// Couldn't find a common type to implicitly convert to
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0027, QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0027, expTypeName, lowerTypeName, criteria));
+ throw new QueryResolverException("ERR.015.008.0027", QueryPlugin.Util.getString("ERR.015.008.0027", expTypeName, lowerTypeName, criteria)); //$NON-NLS-1$ //$NON-NLS-2$
}
// invariants: exp.getType() == lower.getType() == upper.getType()
}
@@ -649,7 +648,7 @@
if (commonType == null) {
// Neither are aggs, but types can't be reconciled
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0027, QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0027, new Object[] { leftTypeName, rightTypeName, ccrit }));
+ throw new QueryResolverException("ERR.015.008.0027", QueryPlugin.Util.getString("ERR.015.008.0027", new Object[] { leftTypeName, rightTypeName, ccrit })); //$NON-NLS-1$ //$NON-NLS-2$
}
ccrit.setLeftExpression(ResolverUtil.convertExpression(leftExpression, leftTypeName, commonType, metadata) );
ccrit.setRightExpression(ResolverUtil.convertExpression(rightExpression, rightTypeName, commonType, metadata) );
@@ -690,7 +689,7 @@
result = ResolverUtil.convertExpression(expr, type, DataTypeManager.DefaultDataTypes.CLOB, metadata);
} else {
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0029, QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0029, mcrit));
+ throw new QueryResolverException("ERR.015.008.0029", QueryPlugin.Util.getString("ERR.015.008.0029", mcrit)); //$NON-NLS-1$ //$NON-NLS-2$
}
}
}
@@ -703,7 +702,7 @@
// Check that each of the values are the same type as expression
Class exprType = scrit.getExpression().getType();
if(exprType == null) {
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0030, QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0030, scrit.getExpression()));
+ throw new QueryResolverException("ERR.015.008.0030", QueryPlugin.Util.getString("ERR.015.008.0030", scrit.getExpression())); //$NON-NLS-1$ //$NON-NLS-2$
}
String exprTypeName = DataTypeManager.getDataTypeName(exprType);
@@ -744,9 +743,9 @@
while(valIter.hasNext()) {
Expression value = (Expression) valIter.next();
if(value.getType() == null) {
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0030, QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0030, value));
+ throw new QueryResolverException("ERR.015.008.0030", QueryPlugin.Util.getString("ERR.015.008.0030", value)); //$NON-NLS-1$ //$NON-NLS-2$
} else if(! value.getType().equals(setType)) {
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0031, QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0031, scrit));
+ throw new QueryResolverException("ERR.015.008.0031", QueryPlugin.Util.getString("ERR.015.008.0031", scrit)); //$NON-NLS-1$ //$NON-NLS-2$
}
}
@@ -754,7 +753,7 @@
scrit.setExpression(ResolverUtil.convertExpression(scrit.getExpression(), exprTypeName, setTypeName, metadata));
} else {
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0031, QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0031, scrit));
+ throw new QueryResolverException("ERR.015.008.0031", QueryPlugin.Util.getString("ERR.015.008.0031", scrit)); //$NON-NLS-1$ //$NON-NLS-2$
}
}
@@ -828,11 +827,11 @@
// 3. Perform implicit type conversions
String whenTypeName = ResolverUtil.getCommonType((String[])whenTypeNames.toArray(new String[whenTypeNames.size()]));
if (whenTypeName == null) {
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0068, QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0068, "WHEN", obj)); //$NON-NLS-1$
+ throw new QueryResolverException("ERR.015.008.0068", QueryPlugin.Util.getString("ERR.015.008.0068", "WHEN", obj)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
String thenTypeName = ResolverUtil.getCommonType((String[])thenTypeNames.toArray(new String[thenTypeNames.size()]));
if (thenTypeName == null) {
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0068, QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0068, "THEN/ELSE", obj)); //$NON-NLS-1$
+ throw new QueryResolverException("ERR.015.008.0068", QueryPlugin.Util.getString("ERR.015.008.0068", "THEN/ELSE", obj)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
obj.setExpression(ResolverUtil.convertExpression(obj.getExpression(), whenTypeName, metadata));
ArrayList whens = new ArrayList(whenCount);
@@ -918,7 +917,7 @@
// 3. Perform implicit type conversions
String thenTypeName = ResolverUtil.getCommonType((String[])thenTypeNames.toArray(new String[thenTypeNames.size()]));
if (thenTypeName == null) {
- throw new QueryResolverException(ErrorMessageKeys.RESOLVER_0068, QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0068, "THEN/ELSE", obj)); //$NON-NLS-1$
+ throw new QueryResolverException("ERR.015.008.0068", QueryPlugin.Util.getString("ERR.015.008.0068", "THEN/ELSE", obj)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
ArrayList thens = new ArrayList(whenCount);
for (int i = 0; i < whenCount; i++) {
Modified: trunk/engine/src/main/java/org/teiid/query/rewriter/QueryRewriter.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/rewriter/QueryRewriter.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/rewriter/QueryRewriter.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -55,8 +55,8 @@
import org.teiid.core.util.Assertion;
import org.teiid.core.util.TimestampWithTimezone;
import org.teiid.language.SQLConstants.NonReserved;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.eval.Evaluator;
-import org.teiid.query.execution.QueryExecPlugin;
import org.teiid.query.function.FunctionDescriptor;
import org.teiid.query.function.FunctionLibrary;
import org.teiid.query.function.FunctionMethods;
@@ -150,7 +150,6 @@
import org.teiid.query.sql.visitor.PredicateCollectorVisitor;
import org.teiid.query.sql.visitor.EvaluatableVisitor.EvaluationLevel;
import org.teiid.query.util.CommandContext;
-import org.teiid.query.util.ErrorMessageKeys;
import org.teiid.translator.SourceSystemFunctions;
@@ -395,7 +394,7 @@
whileStatement.setCondition(crit);
if(crit.equals(TRUE_CRITERIA)) {
- throw new QueryValidatorException(QueryExecPlugin.Util.getString("QueryRewriter.infinite_while")); //$NON-NLS-1$
+ throw new QueryValidatorException(QueryPlugin.Util.getString("QueryRewriter.infinite_while")); //$NON-NLS-1$
} else if(crit.equals(FALSE_CRITERIA) || crit.equals(UNKNOWN_CRITERIA)) {
return null;
}
@@ -590,7 +589,7 @@
try {
ResolverVisitor.resolveLanguageObject(translatedCriteria, metadata);
} catch(TeiidException ex) {
- throw new QueryValidatorException(ex, ErrorMessageKeys.REWRITER_0002, QueryExecPlugin.Util.getString(ErrorMessageKeys.REWRITER_0002, translatedCriteria));
+ throw new QueryValidatorException(ex, "ERR.015.009.0002", QueryPlugin.Util.getString("ERR.015.009.0002", translatedCriteria)); //$NON-NLS-1$ //$NON-NLS-2$
}
return translatedCriteria;
@@ -851,17 +850,20 @@
for (int i = 0; i < orderBy.getVariableCount(); i++) {
SingleElementSymbol querySymbol = orderBy.getVariable(i);
int index = orderBy.getExpressionPosition(i);
+ boolean isUnrelated = false;
if (index == -1) {
unrelatedItems.add(orderBy.getOrderByItems().get(i));
- hasUnrelatedExpression |= (querySymbol instanceof ExpressionSymbol);
- continue; // must be unrelated
+ isUnrelated = (querySymbol instanceof ExpressionSymbol);
+ } else {
+ querySymbol = (SingleElementSymbol)projectedSymbols.get(index);
}
- querySymbol = (SingleElementSymbol)projectedSymbols.get(index);
Expression expr = SymbolMap.getExpression(querySymbol);
- if (!previousExpressions.add(expr) || (queryCommand instanceof Query && EvaluatableVisitor.isFullyEvaluatable(expr, true))) {
+ if (!previousExpressions.add(expr) || (queryCommand instanceof Query && EvaluatableVisitor.willBecomeConstant(expr))) {
orderBy.removeOrderByItem(i--);
+ } else if (!isUnrelated) {
+ orderBy.getOrderByItems().get(i).setSymbol((SingleElementSymbol)querySymbol.clone());
} else {
- orderBy.getOrderByItems().get(i).setSymbol((SingleElementSymbol)querySymbol.clone());
+ hasUnrelatedExpression = true;
}
}
if (orderBy.getVariableCount() == 0) {
@@ -1165,7 +1167,7 @@
return FALSE_CRITERIA;
} catch(ExpressionEvaluationException e) {
- throw new QueryValidatorException(e, ErrorMessageKeys.REWRITER_0001, QueryExecPlugin.Util.getString(ErrorMessageKeys.REWRITER_0001, crit));
+ throw new QueryValidatorException(e, "ERR.015.009.0001", QueryPlugin.Util.getString("ERR.015.009.0001", crit)); //$NON-NLS-1$ //$NON-NLS-2$
}
}
@@ -1380,7 +1382,7 @@
Object result = descriptor.invokeFunction(new Object[] { const2.getValue(), const1.getValue() } );
combinedConst = new Constant(result, descriptor.getReturnType());
} catch(FunctionExecutionException e) {
- throw new QueryValidatorException(e, ErrorMessageKeys.REWRITER_0003, QueryExecPlugin.Util.getString(ErrorMessageKeys.REWRITER_0003, e.getMessage()));
+ throw new QueryValidatorException(e, "ERR.015.009.0003", QueryPlugin.Util.getString("ERR.015.009.0003", e.getMessage())); //$NON-NLS-1$ //$NON-NLS-2$
}
} else {
Function conversion = new Function(descriptor.getName(), new Expression[] { rightExpr, const1 });
@@ -2493,7 +2495,7 @@
if (result == null) {
result = changingValue;
} else if (!result.equals(changingValue)) {
- throw new QueryValidatorException(QueryExecPlugin.Util.getString("VariableSubstitutionVisitor.Input_vars_should_have_same_changing_state", expr)); //$NON-NLS-1$
+ throw new QueryValidatorException(QueryPlugin.Util.getString("VariableSubstitutionVisitor.Input_vars_should_have_same_changing_state", expr)); //$NON-NLS-1$
}
}
}
Modified: trunk/engine/src/main/java/org/teiid/query/sql/lang/AbstractCompareCriteria.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/sql/lang/AbstractCompareCriteria.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/sql/lang/AbstractCompareCriteria.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -24,7 +24,6 @@
import org.teiid.query.QueryPlugin;
import org.teiid.query.sql.symbol.Expression;
-import org.teiid.query.util.ErrorMessageKeys;
/**
* <p>The common functionality of a {@link CompareCriteria} and a
@@ -79,7 +78,7 @@
*/
public void setOperator( int operator ) {
if (operator < EQ || operator > GE) {
- throw new IllegalArgumentException(QueryPlugin.Util.getString(ErrorMessageKeys.SQL_0001, operator));
+ throw new IllegalArgumentException(QueryPlugin.Util.getString("ERR.015.010.0001", operator)); //$NON-NLS-1$
}
this.operator = operator;
}
Modified: trunk/engine/src/main/java/org/teiid/query/sql/lang/CompoundCriteria.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/sql/lang/CompoundCriteria.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/sql/lang/CompoundCriteria.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -30,7 +30,6 @@
import org.teiid.core.util.HashCodeUtil;
import org.teiid.query.QueryPlugin;
import org.teiid.query.sql.LanguageVisitor;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -128,7 +127,7 @@
*/
public void setOperator(int operator) {
if (!isValidOperator(operator)) {
- throw new IllegalArgumentException(QueryPlugin.Util.getString(ErrorMessageKeys.SQL_0002, operator));
+ throw new IllegalArgumentException(QueryPlugin.Util.getString("ERR.015.010.0002", operator)); //$NON-NLS-1$
}
this.operator = operator;
}
Modified: trunk/engine/src/main/java/org/teiid/query/sql/lang/GroupBy.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/sql/lang/GroupBy.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/sql/lang/GroupBy.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -34,7 +34,6 @@
import org.teiid.query.sql.LanguageVisitor;
import org.teiid.query.sql.symbol.Expression;
import org.teiid.query.sql.visitor.SQLStringVisitor;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -105,7 +104,7 @@
*/
public void replaceSymbols( Collection symbols ) {
if(symbols == null) {
- throw new IllegalArgumentException(QueryPlugin.Util.getString(ErrorMessageKeys.SQL_0003));
+ throw new IllegalArgumentException(QueryPlugin.Util.getString("ERR.015.010.0003")); //$NON-NLS-1$
}
this.symbols = new ArrayList(symbols);
Modified: trunk/engine/src/main/java/org/teiid/query/sql/lang/SPParameter.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/sql/lang/SPParameter.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/sql/lang/SPParameter.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -33,7 +33,6 @@
import org.teiid.query.QueryPlugin;
import org.teiid.query.sql.symbol.ElementSymbol;
import org.teiid.query.sql.symbol.Expression;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -126,7 +125,7 @@
public void setParameterType(int parameterType){
// validate against above types
if(parameterType < ParameterInfo.IN || parameterType > ParameterInfo.RESULT_SET) {
- throw new IllegalArgumentException(QueryPlugin.Util.getString(ErrorMessageKeys.SQL_0006, parameterType));
+ throw new IllegalArgumentException(QueryPlugin.Util.getString("ERR.015.010.0006", parameterType)); //$NON-NLS-1$
}
this.parameterType = parameterType;
}
@@ -244,7 +243,7 @@
*/
public ElementSymbol getResultSetColumn(int position){
if(resultSetColumns == null){
- throw new IllegalArgumentException(QueryPlugin.Util.getString(ErrorMessageKeys.SQL_0009));
+ throw new IllegalArgumentException(QueryPlugin.Util.getString("ERR.015.010.0009")); //$NON-NLS-1$
}
//position is 1 based
@@ -252,7 +251,7 @@
if(position >= 0 && position < resultSetColumns.size()) {
return (ElementSymbol) resultSetColumns.get(position);
}
- throw new IllegalArgumentException(QueryPlugin.Util.getString(ErrorMessageKeys.SQL_0010, new Integer(position + 1)));
+ throw new IllegalArgumentException(QueryPlugin.Util.getString("ERR.015.010.0010", new Integer(position + 1))); //$NON-NLS-1$
}
/**
Modified: trunk/engine/src/main/java/org/teiid/query/sql/lang/StoredProcedure.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/sql/lang/StoredProcedure.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/sql/lang/StoredProcedure.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -39,7 +39,6 @@
import org.teiid.query.sql.symbol.Expression;
import org.teiid.query.sql.symbol.GroupSymbol;
import org.teiid.query.sql.visitor.SQLStringVisitor;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -149,7 +148,7 @@
*/
public void setParameter(SPParameter parameter){
if(parameter == null){
- throw new IllegalArgumentException(QueryPlugin.Util.getString(ErrorMessageKeys.SQL_0011));
+ throw new IllegalArgumentException(QueryPlugin.Util.getString("ERR.015.010.0011")); //$NON-NLS-1$
}
Integer key = new Integer(parameter.getIndex());
Modified: trunk/engine/src/main/java/org/teiid/query/sql/symbol/AliasSymbol.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/sql/symbol/AliasSymbol.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/sql/symbol/AliasSymbol.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -25,7 +25,6 @@
import org.teiid.core.util.Assertion;
import org.teiid.query.QueryPlugin;
import org.teiid.query.sql.LanguageVisitor;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -74,7 +73,7 @@
*/
public void setSymbol(SingleElementSymbol symbol) {
if(symbol instanceof AliasSymbol || symbol == null){
- Assertion.failed(QueryPlugin.Util.getString(ErrorMessageKeys.SQL_0029));
+ Assertion.failed(QueryPlugin.Util.getString("ERR.015.010.0029")); //$NON-NLS-1$
}
this.symbol = symbol;
}
Modified: trunk/engine/src/main/java/org/teiid/query/sql/symbol/CaseExpression.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/sql/symbol/CaseExpression.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/sql/symbol/CaseExpression.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -28,7 +28,6 @@
import org.teiid.query.QueryPlugin;
import org.teiid.query.sql.LanguageVisitor;
-import org.teiid.query.util.ErrorMessageKeys;
public class CaseExpression extends AbstractCaseExpression {
@@ -68,7 +67,7 @@
*/
public void setExpression(Expression expr) {
if (expr == null) {
- throw new IllegalArgumentException(QueryPlugin.Util.getString(ErrorMessageKeys.SQL_0035));
+ throw new IllegalArgumentException(QueryPlugin.Util.getString("ERR.015.010.0035")); //$NON-NLS-1$
}
this.expression = expr;
}
@@ -106,18 +105,18 @@
*/
public void setWhen(List when, List then) {
if (when == null || then == null) {
- throw new IllegalArgumentException(QueryPlugin.Util.getString(ErrorMessageKeys.SQL_0036));
+ throw new IllegalArgumentException(QueryPlugin.Util.getString("ERR.015.010.0036")); //$NON-NLS-1$
}
if (when.size() != then.size() ||
when.size() < 1) {
- throw new IllegalArgumentException(QueryPlugin.Util.getString(ErrorMessageKeys.SQL_0036));
+ throw new IllegalArgumentException(QueryPlugin.Util.getString("ERR.015.010.0036")); //$NON-NLS-1$
}
for (int i = 0 ; i < when.size(); i++) {
if (!(when.get(i) instanceof Expression)) {
- throw new IllegalArgumentException(QueryPlugin.Util.getString(ErrorMessageKeys.SQL_0037));
+ throw new IllegalArgumentException(QueryPlugin.Util.getString("ERR.015.010.0037")); //$NON-NLS-1$
}
if (!(then.get(i) instanceof Expression)) {
- throw new IllegalArgumentException(QueryPlugin.Util.getString(ErrorMessageKeys.SQL_0038));
+ throw new IllegalArgumentException(QueryPlugin.Util.getString("ERR.015.010.0038")); //$NON-NLS-1$
}
}
if (this.when != when) {
Modified: trunk/engine/src/main/java/org/teiid/query/sql/symbol/Constant.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/sql/symbol/Constant.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/sql/symbol/Constant.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -28,7 +28,6 @@
import org.teiid.query.QueryPlugin;
import org.teiid.query.sql.LanguageVisitor;
import org.teiid.query.sql.visitor.SQLStringVisitor;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -58,10 +57,10 @@
// Check that type is valid, then set it
if(type == null) {
- throw new IllegalArgumentException(QueryPlugin.Util.getString(ErrorMessageKeys.SQL_0014));
+ throw new IllegalArgumentException(QueryPlugin.Util.getString("ERR.015.010.0014")); //$NON-NLS-1$
}
if(! DataTypeManager.getAllDataTypeClasses().contains(type)) {
- throw new IllegalArgumentException(QueryPlugin.Util.getString(ErrorMessageKeys.SQL_0015, type.getName()));
+ throw new IllegalArgumentException(QueryPlugin.Util.getString("ERR.015.010.0015", type.getName())); //$NON-NLS-1$
}
assert value == null || type.isAssignableFrom(value.getClass()) : "Invalid value for specified type."; //$NON-NLS-1$
this.type = type;
Modified: trunk/engine/src/main/java/org/teiid/query/sql/symbol/GroupSymbol.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/sql/symbol/GroupSymbol.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/sql/symbol/GroupSymbol.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -24,7 +24,6 @@
import org.teiid.query.QueryPlugin;
import org.teiid.query.sql.LanguageVisitor;
-import org.teiid.query.util.ErrorMessageKeys;
/**
* <p>This is the server's representation of a metadata group symbol. The group
@@ -132,7 +131,7 @@
*/
public void setMetadataID(Object metadataID) {
if(metadataID == null) {
- throw new IllegalArgumentException(QueryPlugin.Util.getString(ErrorMessageKeys.SQL_0016));
+ throw new IllegalArgumentException(QueryPlugin.Util.getString("ERR.015.010.0016")); //$NON-NLS-1$
}
this.metadataID = metadataID;
}
Modified: trunk/engine/src/main/java/org/teiid/query/sql/symbol/SearchedCaseExpression.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/sql/symbol/SearchedCaseExpression.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/sql/symbol/SearchedCaseExpression.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -29,7 +29,6 @@
import org.teiid.query.QueryPlugin;
import org.teiid.query.sql.LanguageVisitor;
import org.teiid.query.sql.lang.Criteria;
-import org.teiid.query.util.ErrorMessageKeys;
public class SearchedCaseExpression extends AbstractCaseExpression {
@@ -81,18 +80,18 @@
*/
public void setWhen(List when, List then) {
if (when == null || then == null) {
- throw new IllegalArgumentException(QueryPlugin.Util.getString(ErrorMessageKeys.SQL_0036));
+ throw new IllegalArgumentException(QueryPlugin.Util.getString("ERR.015.010.0036")); //$NON-NLS-1$
}
if (when.size() != then.size() ||
when.size() < 1) {
- throw new IllegalArgumentException(QueryPlugin.Util.getString(ErrorMessageKeys.SQL_0036));
+ throw new IllegalArgumentException(QueryPlugin.Util.getString("ERR.015.010.0036")); //$NON-NLS-1$
}
for (int i = 0 ; i < when.size(); i++) {
if (!(when.get(i) instanceof Criteria)) {
- throw new IllegalArgumentException(QueryPlugin.Util.getString(ErrorMessageKeys.SQL_0039));
+ throw new IllegalArgumentException(QueryPlugin.Util.getString("ERR.015.010.0039")); //$NON-NLS-1$
}
if (!(then.get(i) instanceof Expression)) {
- throw new IllegalArgumentException(QueryPlugin.Util.getString(ErrorMessageKeys.SQL_0038));
+ throw new IllegalArgumentException(QueryPlugin.Util.getString("ERR.015.010.0038")); //$NON-NLS-1$
}
}
if (this.when != when) {
Modified: trunk/engine/src/main/java/org/teiid/query/sql/symbol/Symbol.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/sql/symbol/Symbol.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/sql/symbol/Symbol.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -26,7 +26,6 @@
import org.teiid.query.QueryPlugin;
import org.teiid.query.sql.LanguageObject;
import org.teiid.query.sql.visitor.SQLStringVisitor;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -91,7 +90,7 @@
*/
public void setName(String name) {
if(name == null) {
- throw new IllegalArgumentException(QueryPlugin.Util.getString(ErrorMessageKeys.SQL_0017));
+ throw new IllegalArgumentException(QueryPlugin.Util.getString("ERR.015.010.0017")); //$NON-NLS-1$
}
this.name = name;
this.outputName = null;
Modified: trunk/engine/src/main/java/org/teiid/query/sql/util/UpdateProcedureGenerator.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/sql/util/UpdateProcedureGenerator.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/sql/util/UpdateProcedureGenerator.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -35,7 +35,6 @@
import org.teiid.query.sql.navigator.PreOrderNavigator;
import org.teiid.query.sql.proc.*;
import org.teiid.query.sql.symbol.*;
-import org.teiid.query.util.ErrorMessageKeys;
import org.teiid.query.validator.UpdateValidationVisitor;
import org.teiid.query.validator.ValidatorReport;
@@ -164,7 +163,7 @@
throws TeiidComponentException, QueryMetadataException{
if(physicalElements.size()!= virtualElements.size()) {
- throw new QueryMetadataException(ErrorMessageKeys.SQL_0018, QueryPlugin.Util.getString(ErrorMessageKeys.SQL_0018));
+ throw new QueryMetadataException("ERR.015.010.0018", QueryPlugin.Util.getString("ERR.015.010.0018")); //$NON-NLS-1$ //$NON-NLS-2$
}
//match the physical group elements to the virtual group elements
Modified: trunk/engine/src/main/java/org/teiid/query/sql/util/VariableContext.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/sql/util/VariableContext.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/sql/util/VariableContext.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -28,7 +28,6 @@
import org.teiid.core.TeiidComponentException;
import org.teiid.query.QueryPlugin;
import org.teiid.query.sql.symbol.ElementSymbol;
-import org.teiid.query.util.ErrorMessageKeys;
public class VariableContext {
@@ -66,7 +65,7 @@
}
Object value = variableMap.get(variable);
if (value == null && !variableMap.containsKey(variable)) {
- throw new TeiidComponentException(ErrorMessageKeys.PROCESSOR_0033, QueryPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0033, variable, "No value was available")); //$NON-NLS-1$
+ throw new TeiidComponentException("ERR.015.006.0033", QueryPlugin.Util.getString("ERR.015.006.0033", variable, "No value was available")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
return value;
}
Modified: trunk/engine/src/main/java/org/teiid/query/sql/visitor/ElementCollectorVisitor.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/sql/visitor/ElementCollectorVisitor.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/sql/visitor/ElementCollectorVisitor.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -35,7 +35,6 @@
import org.teiid.query.sql.symbol.AllInGroupSymbol;
import org.teiid.query.sql.symbol.AllSymbol;
import org.teiid.query.sql.symbol.ElementSymbol;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -60,7 +59,7 @@
*/
public ElementCollectorVisitor(Collection<ElementSymbol> elements) {
if(elements == null) {
- throw new IllegalArgumentException(QueryPlugin.Util.getString(ErrorMessageKeys.SQL_0021));
+ throw new IllegalArgumentException(QueryPlugin.Util.getString("ERR.015.010.0021")); //$NON-NLS-1$
}
this.elements = elements;
}
Modified: trunk/engine/src/main/java/org/teiid/query/sql/visitor/FunctionCollectorVisitor.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/sql/visitor/FunctionCollectorVisitor.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/sql/visitor/FunctionCollectorVisitor.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -32,7 +32,6 @@
import org.teiid.query.sql.navigator.DeepPreOrderNavigator;
import org.teiid.query.sql.navigator.PreOrderNavigator;
import org.teiid.query.sql.symbol.Function;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -71,7 +70,7 @@
*/
public FunctionCollectorVisitor(Collection functions, String functionName) {
if(functions == null) {
- throw new IllegalArgumentException(QueryPlugin.Util.getString(ErrorMessageKeys.SQL_0022));
+ throw new IllegalArgumentException(QueryPlugin.Util.getString("ERR.015.010.0022")); //$NON-NLS-1$
}
this.functions = functions;
this.functionName = functionName;
Modified: trunk/engine/src/main/java/org/teiid/query/sql/visitor/GroupCollectorVisitor.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/sql/visitor/GroupCollectorVisitor.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/sql/visitor/GroupCollectorVisitor.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -35,7 +35,6 @@
import org.teiid.query.sql.navigator.DeepPreOrderNavigator;
import org.teiid.query.sql.navigator.PreOrderNavigator;
import org.teiid.query.sql.symbol.GroupSymbol;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -66,7 +65,7 @@
*/
public GroupCollectorVisitor(Collection<GroupSymbol> groups) {
if(groups == null) {
- throw new IllegalArgumentException(QueryPlugin.Util.getString(ErrorMessageKeys.SQL_0023));
+ throw new IllegalArgumentException(QueryPlugin.Util.getString("ERR.015.010.0023")); //$NON-NLS-1$
}
this.groups = groups;
}
Modified: trunk/engine/src/main/java/org/teiid/query/tempdata/TempTableDataManager.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/tempdata/TempTableDataManager.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/tempdata/TempTableDataManager.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -22,6 +22,7 @@
package org.teiid.query.tempdata;
+import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
@@ -36,6 +37,10 @@
import org.teiid.api.exception.query.QueryProcessingException;
import org.teiid.api.exception.query.QueryResolverException;
import org.teiid.api.exception.query.QueryValidatorException;
+import org.teiid.cache.Cache;
+import org.teiid.cache.CacheConfiguration;
+import org.teiid.cache.CacheFactory;
+import org.teiid.cache.CacheConfiguration.Policy;
import org.teiid.common.buffer.BlockedException;
import org.teiid.common.buffer.BufferManager;
import org.teiid.common.buffer.TupleBuffer;
@@ -44,6 +49,7 @@
import org.teiid.core.TeiidComponentException;
import org.teiid.core.TeiidProcessingException;
import org.teiid.core.types.DataTypeManager;
+import org.teiid.core.util.HashCodeUtil;
import org.teiid.core.util.StringUtil;
import org.teiid.dqp.internal.process.CachedResults;
import org.teiid.dqp.internal.process.SessionAwareCache;
@@ -51,9 +57,10 @@
import org.teiid.language.SQLConstants.Reserved;
import org.teiid.logging.LogConstants;
import org.teiid.logging.LogManager;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.analysis.AnalysisRecord;
import org.teiid.query.eval.Evaluator;
-import org.teiid.query.execution.QueryExecPlugin;
+import org.teiid.query.function.metadata.FunctionMethod;
import org.teiid.query.mapping.relational.QueryNode;
import org.teiid.query.metadata.QueryMetadataInterface;
import org.teiid.query.metadata.TempMetadataID;
@@ -87,6 +94,7 @@
import org.teiid.query.tempdata.TempTableStore.MatState;
import org.teiid.query.tempdata.TempTableStore.MatTableInfo;
import org.teiid.query.util.CommandContext;
+import org.teiid.vdb.runtime.VDBKey;
/**
* This proxy ProcessorDataManager is used to handle temporary tables.
@@ -104,15 +112,52 @@
private BufferManager bufferManager;
private SessionAwareCache<CachedResults> cache;
private Executor executor;
+
+ private static class MatTableKey implements Serializable {
+ private static final long serialVersionUID = 5481692896572663992L;
+ String name;
+ VDBKey vdb;
+
+ @Override
+ public int hashCode() {
+ return HashCodeUtil.hashCode(name.hashCode(), vdb);
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof MatTableKey)) {
+ return false;
+ }
+ MatTableKey other = (MatTableKey)obj;
+ return this.name.equals(other.name) && this.vdb.equals(other.vdb);
+ }
+ }
+
+ private static class MatTableEntry implements Serializable {
+ private static final long serialVersionUID = 8559613701442751579L;
+ long lastUpdate = System.currentTimeMillis();
+ boolean valid;
+ }
+
+ private Cache<MatTableKey, MatTableEntry> tables;
+ private SessionAwareCache<CachedResults> distributedCache;
public TempTableDataManager(ProcessorDataManager processorDataManager, BufferManager bufferManager,
- Executor executor, SessionAwareCache<CachedResults> cache){
+ Executor executor, SessionAwareCache<CachedResults> cache, SessionAwareCache<CachedResults> distibutedCache, CacheFactory cacheFactory){
this.processorDataManager = processorDataManager;
this.bufferManager = bufferManager;
this.executor = executor;
this.cache = cache;
+ this.distributedCache = distibutedCache;
+ if (distibutedCache != null) {
+ CacheConfiguration cc = new CacheConfiguration(Policy.LRU, -1, -1);
+ tables = cacheFactory.get(Cache.Type.MATTABLES, cc);
+ }
}
-
+
public TupleSource registerRequest(
CommandContext context,
Command command,
@@ -139,7 +184,7 @@
if (command instanceof ProcedureContainer) {
if (command instanceof StoredProcedure) {
StoredProcedure proc = (StoredProcedure)command;
- if (CoreConstants.SYSTEM_MODEL.equals(modelName)) {
+ if (CoreConstants.SYSTEM_ADMIN_MODEL.equals(modelName)) {
TupleSource result = handleSystemProcedures(context, proc);
if (result != null) {
return result;
@@ -188,7 +233,7 @@
Create create = (Create)command;
String tempTableName = create.getTable().getCanonicalName();
if (contextStore.hasTempTable(tempTableName)) {
- throw new QueryProcessingException(QueryExecPlugin.Util.getString("TempTableStore.table_exist_error", tempTableName));//$NON-NLS-1$
+ throw new QueryProcessingException(QueryPlugin.Util.getString("TempTableStore.table_exist_error", tempTableName));//$NON-NLS-1$
}
contextStore.addTempTable(tempTableName, create, bufferManager, true);
return CollectionTupleSource.createUpdateCountTupleSource(0);
@@ -259,7 +304,10 @@
LogManager.logDetail(LogConstants.CTX_MATVIEWS, "processing refreshmatview for", matViewName); //$NON-NLS-1$
MatTableInfo info = globalStore.getMatTableInfo(matTableName);
boolean invalidate = Boolean.TRUE.equals(((Constant)proc.getParameter(1).getExpression()).getValue());
- MatState oldState = info.setState(MatState.NEEDS_LOADING, invalidate?Boolean.FALSE:null);
+ if (invalidate) {
+ touchTable(context, matTableName, false);
+ }
+ MatState oldState = info.setState(MatState.NEEDS_LOADING, invalidate?Boolean.FALSE:null, null);
if (oldState == MatState.LOADING) {
return CollectionTupleSource.createUpdateCountTupleSource(-1);
}
@@ -268,18 +316,18 @@
Object matTableId = RelationalPlanner.getGlobalTempTableMetadataId(group, matTableName, context, metadata, AnalysisRecord.createNonRecordingRecord());
GroupSymbol matTable = new GroupSymbol(matTableName);
matTable.setMetadataID(matTableId);
- int rowCount = loadGlobalTable(context, matTable, matTableName, globalStore, info);
+ int rowCount = loadGlobalTable(context, matTable, matTableName, globalStore, info, null);
return CollectionTupleSource.createUpdateCountTupleSource(rowCount);
} else if (StringUtil.endsWithIgnoreCase(proc.getProcedureCallableName(), REFRESHMATVIEWROW)) {
Object groupID = validateMatView(metadata, proc);
Object pk = metadata.getPrimaryKey(groupID);
String matViewName = metadata.getFullName(groupID);
if (pk == null) {
- throw new QueryProcessingException(QueryExecPlugin.Util.getString("TempTableDataManager.row_refresh_pk", matViewName)); //$NON-NLS-1$
+ throw new QueryProcessingException(QueryPlugin.Util.getString("TempTableDataManager.row_refresh_pk", matViewName)); //$NON-NLS-1$
}
List<?> ids = metadata.getElementIDsInKey(pk);
if (ids.size() > 1) {
- throw new QueryProcessingException(QueryExecPlugin.Util.getString("TempTableDataManager.row_refresh_composite", matViewName)); //$NON-NLS-1$
+ throw new QueryProcessingException(QueryPlugin.Util.getString("TempTableDataManager.row_refresh_composite", matViewName)); //$NON-NLS-1$
}
String matTableName = RelationalPlanner.MAT_PREFIX+matViewName.toUpperCase();
MatTableInfo info = globalStore.getMatTableInfo(matTableName);
@@ -288,10 +336,10 @@
}
TempTable tempTable = globalStore.getOrCreateTempTable(matTableName, new Query(), bufferManager, false);
if (!tempTable.isUpdatable()) {
- throw new QueryProcessingException(QueryExecPlugin.Util.getString("TempTableDataManager.row_refresh_updatable", matViewName)); //$NON-NLS-1$
+ throw new QueryProcessingException(QueryPlugin.Util.getString("TempTableDataManager.row_refresh_updatable", matViewName)); //$NON-NLS-1$
}
Constant key = (Constant)proc.getParameter(2).getExpression();
- LogManager.logInfo(LogConstants.CTX_MATVIEWS, QueryExecPlugin.Util.getString("TempTableDataManager.row_refresh", matViewName, key)); //$NON-NLS-1$
+ LogManager.logInfo(LogConstants.CTX_MATVIEWS, QueryPlugin.Util.getString("TempTableDataManager.row_refresh", matViewName, key)); //$NON-NLS-1$
String queryString = Reserved.SELECT + " * " + Reserved.FROM + ' ' + matViewName + ' ' + Reserved.WHERE + ' ' + //$NON-NLS-1$
metadata.getFullName(ids.iterator().next()) + " = ?" + ' ' + Reserved.OPTION + ' ' + Reserved.NOCACHE; //$NON-NLS-1$
QueryProcessor qp = context.getQueryProcessorFactory().createQueryProcessor(queryString, matViewName.toUpperCase(), context, key.getValue());
@@ -305,6 +353,7 @@
tuple = Arrays.asList(key.getValue());
}
List<?> result = tempTable.updateTuple(tuple, delete);
+ //TODO: maintain a table log and distribute the events
return CollectionTupleSource.createUpdateCountTupleSource(result != null ? 1 : 0);
}
return null;
@@ -317,7 +366,7 @@
try {
Object groupID = metadata.getGroupID(name);
if (!metadata.hasMaterialization(groupID) || metadata.getMaterialization(groupID) != null) {
- throw new QueryProcessingException(QueryExecPlugin.Util.getString("TempTableDataManager.not_implicit_matview", name)); //$NON-NLS-1$
+ throw new QueryProcessingException(QueryPlugin.Util.getString("TempTableDataManager.not_implicit_matview", name)); //$NON-NLS-1$
}
return groupID;
} catch (QueryMetadataException e) {
@@ -340,20 +389,27 @@
if (group.isGlobalTable()) {
final TempTableStore globalStore = context.getGlobalTableStore();
final MatTableInfo info = globalStore.getMatTableInfo(tableName);
+ Long loadTime = null;
+ if (this.distributedCache != null) {
+ MatTableKey key = new MatTableKey();
+ key.name = tableName;
+ key.vdb = new VDBKey(context.getVdbName(), context.getVdbVersion());
+
+ MatTableEntry entry = this.tables.get(key);
+ if (entry != null && entry.lastUpdate > info.getUpdateTime()
+ && info.getState() != MatState.LOADING) {
+ //remote load
+ info.setState(MatState.NEEDS_LOADING, entry.valid, null);
+ loadTime = entry.lastUpdate;
+ }
+ }
boolean load = info.shouldLoad();
if (load) {
if (!info.isValid()) {
//blocking load
- loadGlobalTable(context, group, tableName, globalStore, info);
+ loadGlobalTable(context, group, tableName, globalStore, info, loadTime);
} else {
- Callable<Integer> toCall = new Callable<Integer>() {
- @Override
- public Integer call() throws Exception {
- return loadGlobalTable(context, group, tableName, globalStore, info);
- }
- };
- FutureTask<Integer> task = new FutureTask<Integer>(toCall);
- executor.execute(task);
+ loadAsynch(context, group, tableName, globalStore, info, loadTime);
}
}
table = globalStore.getOrCreateTempTable(tableName, query, bufferManager, false);
@@ -377,11 +433,25 @@
return table.createTupleSource(query.getProjectedSymbols(), query.getCriteria(), query.getOrderBy());
}
+ private void loadAsynch(final CommandContext context,
+ final GroupSymbol group, final String tableName,
+ final TempTableStore globalStore, final MatTableInfo info,
+ final Long loadTime) {
+ Callable<Integer> toCall = new Callable<Integer>() {
+ @Override
+ public Integer call() throws Exception {
+ return loadGlobalTable(context, group, tableName, globalStore, info, loadTime);
+ }
+ };
+ FutureTask<Integer> task = new FutureTask<Integer>(toCall);
+ executor.execute(task);
+ }
+
private int loadGlobalTable(CommandContext context,
GroupSymbol group, final String tableName,
- TempTableStore globalStore, MatTableInfo info)
+ TempTableStore globalStore, MatTableInfo info, Long loadTime)
throws TeiidComponentException, TeiidProcessingException {
- LogManager.logInfo(LogConstants.CTX_MATVIEWS, QueryExecPlugin.Util.getString("TempTableDataManager.loading", tableName)); //$NON-NLS-1$
+ LogManager.logInfo(LogConstants.CTX_MATVIEWS, QueryPlugin.Util.getString("TempTableDataManager.loading", tableName)); //$NON-NLS-1$
QueryMetadataInterface metadata = context.getMetadata();
Create create = new Create();
create.setTable(group);
@@ -408,12 +478,37 @@
int rowCount = -1;
try {
String fullName = metadata.getFullName(group.getMetadataID());
- //TODO: order by primary key nulls first - then have an insert ordered optimization
- //TODO: use the getCommand logic in RelationalPlanner to reuse commands for this.
- String transformation = metadata.getVirtualPlan(group.getMetadataID()).getQuery();
- QueryProcessor qp = context.getQueryProcessorFactory().createQueryProcessor(transformation, fullName, context);
- qp.setNonBlocking(true);
- TupleSource ts = new BatchCollector.BatchProducerTupleSource(qp);
+ TupleSource ts = null;
+ CacheID cid = null;
+ if (distributedCache != null) {
+ cid = new CacheID(new ParseInfo(), fullName, context.getVdbName(),
+ context.getVdbVersion(), context.getConnectionID(), context.getUserName());
+ CachedResults cr = this.distributedCache.get(cid);
+ if (cr != null) {
+ ts = cr.getResults().createIndexedTupleSource();
+ }
+ }
+
+ if (ts == null) {
+ //TODO: coordinate a distributed load
+ //TODO: order by primary key nulls first - then have an insert ordered optimization
+ String transformation = metadata.getVirtualPlan(group.getMetadataID()).getQuery();
+ QueryProcessor qp = context.getQueryProcessorFactory().createQueryProcessor(transformation, fullName, context);
+ qp.setNonBlocking(true);
+
+ if (distributedCache != null) {
+ CachedResults cr = new CachedResults();
+ BatchCollector bc = qp.createBatchCollector();
+ TupleBuffer tb = bc.collectTuples();
+ cr.setResults(tb);
+ touchTable(context, fullName, true);
+ this.distributedCache.put(cid, FunctionMethod.VDB_DETERMINISTIC, cr, info.getTtl());
+ ts = tb.createIndexedTupleSource();
+ } else {
+ ts = new BatchCollector.BatchProducerTupleSource(qp);
+ }
+ }
+
//TODO: if this insert fails, it's unnecessary to do the undo processing
table.insert(ts, table.getColumns());
rowCount = table.getRowCount();
@@ -428,23 +523,32 @@
}
table.setUpdatable(updatable);
} catch (TeiidComponentException e) {
- LogManager.logError(LogConstants.CTX_MATVIEWS, e, QueryExecPlugin.Util.getString("TempTableDataManager.failed_load", tableName)); //$NON-NLS-1$
+ LogManager.logError(LogConstants.CTX_MATVIEWS, e, QueryPlugin.Util.getString("TempTableDataManager.failed_load", tableName)); //$NON-NLS-1$
throw e;
} catch (TeiidProcessingException e) {
- LogManager.logError(LogConstants.CTX_MATVIEWS, e, QueryExecPlugin.Util.getString("TempTableDataManager.failed_load", tableName)); //$NON-NLS-1$
+ LogManager.logError(LogConstants.CTX_MATVIEWS, e, QueryPlugin.Util.getString("TempTableDataManager.failed_load", tableName)); //$NON-NLS-1$
throw e;
} finally {
if (rowCount == -1) {
- info.setState(MatState.FAILED_LOAD, null);
+ info.setState(MatState.FAILED_LOAD, null, null);
} else {
globalStore.swapTempTable(tableName, table);
- info.setState(MatState.LOADED, true);
- LogManager.logInfo(LogConstants.CTX_MATVIEWS, QueryExecPlugin.Util.getString("TempTableDataManager.loaded", tableName, rowCount)); //$NON-NLS-1$
+ info.setState(MatState.LOADED, true, loadTime);
+ LogManager.logInfo(LogConstants.CTX_MATVIEWS, QueryPlugin.Util.getString("TempTableDataManager.loaded", tableName, rowCount)); //$NON-NLS-1$
}
}
return rowCount;
}
+ private void touchTable(CommandContext context, String fullName, boolean valid) {
+ MatTableKey key = new MatTableKey();
+ key.name = fullName;
+ key.vdb = new VDBKey(context.getVdbName(), context.getVdbVersion());
+ MatTableEntry matTableEntry = new MatTableEntry();
+ matTableEntry.valid = valid;
+ tables.put(key, matTableEntry, null);
+ }
+
/**
* Return a list of ElementSymbols for the given index/key object
*/
Modified: trunk/engine/src/main/java/org/teiid/query/tempdata/TempTableStore.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/tempdata/TempTableStore.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/tempdata/TempTableStore.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -32,7 +32,7 @@
import org.teiid.api.exception.query.QueryProcessingException;
import org.teiid.common.buffer.BufferManager;
import org.teiid.core.TeiidComponentException;
-import org.teiid.query.execution.QueryExecPlugin;
+import org.teiid.query.QueryPlugin;
import org.teiid.query.metadata.TempMetadataID;
import org.teiid.query.metadata.TempMetadataStore;
import org.teiid.query.resolver.command.TempTableResolver;
@@ -84,16 +84,19 @@
}
}
- public synchronized MatState setState(MatState state, Boolean valid) {
+ public synchronized MatState setState(MatState state, Boolean valid, Long timestamp) {
MatState oldState = this.state;
if (valid != null) {
this.valid = valid;
}
setState(state);
+ if (timestamp != null) {
+ this.updateTime = timestamp;
+ }
notifyAll();
return oldState;
}
-
+
private void setState(MatState state) {
this.state = state;
this.updateTime = System.currentTimeMillis();
@@ -115,6 +118,10 @@
return valid;
}
+ public synchronized long getTtl() {
+ return ttl;
+ }
+
}
private ConcurrentHashMap<String, MatTableInfo> matTables = new ConcurrentHashMap<String, MatTableInfo>();
@@ -210,7 +217,7 @@
}
}
if (columns == null) {
- throw new QueryProcessingException(QueryExecPlugin.Util.getString("TempTableStore.table_doesnt_exist_error", tempTableID)); //$NON-NLS-1$
+ throw new QueryProcessingException(QueryPlugin.Util.getString("TempTableStore.table_doesnt_exist_error", tempTableID)); //$NON-NLS-1$
}
Create create = new Create();
create.setTable(new GroupSymbol(tempTableID));
Modified: trunk/engine/src/main/java/org/teiid/query/util/CommandContext.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/util/CommandContext.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/util/CommandContext.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -38,7 +38,6 @@
import org.teiid.dqp.internal.process.SessionAwareCache.CacheID;
import org.teiid.query.QueryPlugin;
import org.teiid.query.eval.SecurityFunctionEvaluator;
-import org.teiid.query.execution.QueryExecPlugin;
import org.teiid.query.function.metadata.FunctionMethod;
import org.teiid.query.metadata.QueryMetadataInterface;
import org.teiid.query.optimizer.relational.PlanToProcessConverter;
@@ -325,7 +324,7 @@
if (recursionStack == null) {
recursionStack = new LinkedList<String>();
} else if (recursionStack.contains(value)) {
- throw new QueryProcessingException(QueryExecPlugin.Util.getString("ExecDynamicSqlInstruction.3", value)); //$NON-NLS-1$
+ throw new QueryProcessingException(QueryPlugin.Util.getString("ExecDynamicSqlInstruction.3", value)); //$NON-NLS-1$
}
recursionStack.push(value);
@@ -401,11 +400,11 @@
public Object getFromContext(Expression expression) throws TeiidComponentException {
if (variableContext == null || !(expression instanceof ElementSymbol)) {
- throw new TeiidComponentException(ErrorMessageKeys.PROCESSOR_0033, QueryPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0033, expression, "No value was available")); //$NON-NLS-1$
+ throw new TeiidComponentException("ERR.015.006.0033", QueryPlugin.Util.getString("ERR.015.006.0033", expression, "No value was available")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
Object value = variableContext.getValue((ElementSymbol)expression);
if (value == null && !variableContext.containsVariable((ElementSymbol)expression)) {
- throw new TeiidComponentException(ErrorMessageKeys.PROCESSOR_0033, QueryPlugin.Util.getString(ErrorMessageKeys.PROCESSOR_0033, expression, "No value was available")); //$NON-NLS-1$
+ throw new TeiidComponentException("ERR.015.006.0033", QueryPlugin.Util.getString("ERR.015.006.0033", expression, "No value was available")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
return value;
}
Deleted: trunk/engine/src/main/java/org/teiid/query/util/ErrorMessageKeys.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/util/ErrorMessageKeys.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/util/ErrorMessageKeys.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -1,409 +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.
- */
-
-/*
- * Date: Apr 3, 2003
- * Time: 11:01:10 AM
- */
-package org.teiid.query.util;
-
-/**
- * LogMessageKeys.
- *
- * <p>Error messages for query project (015) to address internationalization.</p>
- *
- */
-public class ErrorMessageKeys {
-
- /** function package (001) */
- public static final String FUNCTION_0001 = "ERR.015.001.0001"; //$NON-NLS-1$
- public static final String FUNCTION_0002 = "ERR.015.001.0002"; //$NON-NLS-1$
- public static final String FUNCTION_0003 = "ERR.015.001.0003"; //$NON-NLS-1$
- public static final String FUNCTION_0004 = "ERR.015.001.0004"; //$NON-NLS-1$
- public static final String FUNCTION_0005 = "ERR.015.001.0005"; //$NON-NLS-1$
- public static final String FUNCTION_0006 = "ERR.015.001.0006"; //$NON-NLS-1$
- public static final String FUNCTION_0007 = "ERR.015.001.0007"; //$NON-NLS-1$
- public static final String FUNCTION_0008 = "ERR.015.001.0008"; //$NON-NLS-1$
- public static final String FUNCTION_0009 = "ERR.015.001.0009"; //$NON-NLS-1$
- public static final String FUNCTION_0010 = "ERR.015.001.0010"; //$NON-NLS-1$
- public static final String FUNCTION_0011 = "ERR.015.001.0011"; //$NON-NLS-1$
- public static final String FUNCTION_0012 = "ERR.015.001.0012"; //$NON-NLS-1$
- public static final String FUNCTION_0013 = "ERR.015.001.0013"; //$NON-NLS-1$
- public static final String FUNCTION_0014 = "ERR.015.001.0014"; //$NON-NLS-1$
- public static final String FUNCTION_0015 = "ERR.015.001.0015"; //$NON-NLS-1$
- public static final String FUNCTION_0016 = "ERR.015.001.0016"; //$NON-NLS-1$
- public static final String FUNCTION_0017 = "ERR.015.001.0017"; //$NON-NLS-1$
- public static final String FUNCTION_0018 = "ERR.015.001.0018"; //$NON-NLS-1$
- public static final String FUNCTION_0019 = "ERR.015.001.0019"; //$NON-NLS-1$
- public static final String FUNCTION_0020 = "ERR.015.001.0020"; //$NON-NLS-1$
- public static final String FUNCTION_0021 = "ERR.015.001.0021"; //$NON-NLS-1$
- public static final String FUNCTION_0022 = "ERR.015.001.0022"; //$NON-NLS-1$
- public static final String FUNCTION_0024 = "ERR.015.001.0024"; //$NON-NLS-1$
- public static final String FUNCTION_0025 = "ERR.015.001.0025"; //$NON-NLS-1$
- public static final String FUNCTION_0026 = "ERR.015.001.0026"; //$NON-NLS-1$
- public static final String FUNCTION_0027 = "ERR.015.001.0027"; //$NON-NLS-1$
- public static final String FUNCTION_0028 = "ERR.015.001.0028"; //$NON-NLS-1$
- public static final String FUNCTION_0029 = "ERR.015.001.0029"; //$NON-NLS-1$
- public static final String FUNCTION_0030 = "ERR.015.001.0030"; //$NON-NLS-1$
- public static final String FUNCTION_0031 = "ERR.015.001.0031"; //$NON-NLS-1$
- public static final String FUNCTION_0032 = "ERR.015.001.0032"; //$NON-NLS-1$
- public static final String FUNCTION_0033 = "ERR.015.001.0033"; //$NON-NLS-1$
- public static final String FUNCTION_0034 = "ERR.015.001.0034"; //$NON-NLS-1$
- public static final String FUNCTION_0035 = "ERR.015.001.0035"; //$NON-NLS-1$
- public static final String FUNCTION_0035a = "ERR.015.001.0035a"; //$NON-NLS-1$
- public static final String FUNCTION_0036 = "ERR.015.001.0036"; //$NON-NLS-1$
- public static final String FUNCTION_0037 = "ERR.015.001.0037"; //$NON-NLS-1$
- public static final String FUNCTION_0038 = "ERR.015.001.0038"; //$NON-NLS-1$
- public static final String FUNCTION_0039 = "ERR.015.001.0039"; //$NON-NLS-1$
- public static final String FUNCTION_0040 = "ERR.015.001.0040"; //$NON-NLS-1$
- public static final String FUNCTION_0041 = "ERR.015.001.0041"; //$NON-NLS-1$
- public static final String FUNCTION_0042 = "ERR.015.001.0042"; //$NON-NLS-1$
- public static final String FUNCTION_0043 = "ERR.015.001.0043"; //$NON-NLS-1$
- public static final String FUNCTION_0044 = "ERR.015.001.0044"; //$NON-NLS-1$
- public static final String FUNCTION_0045 = "ERR.015.001.0045"; //$NON-NLS-1$
- public static final String FUNCTION_0046 = "ERR.015.001.0046"; //$NON-NLS-1$
- public static final String FUNCTION_0047 = "ERR.015.001.0047"; //$NON-NLS-1$
- public static final String FUNCTION_0048 = "ERR.015.001.0048"; //$NON-NLS-1$
- public static final String FUNCTION_0050 = "ERR.015.001.0050"; //$NON-NLS-1$
- public static final String FUNCTION_0051 = "ERR.015.001.0051"; //$NON-NLS-1$
- public static final String FUNCTION_0052 = "ERR.015.001.0052"; //$NON-NLS-1$
- public static final String FUNCTION_0053 = "ERR.015.001.0053"; //$NON-NLS-1$
- public static final String FUNCTION_0054 = "ERR.015.001.0054"; //$NON-NLS-1$
- public static final String FUNCTION_0055 = "ERR.015.001.0055"; //$NON-NLS-1$
- public static final String FUNCTION_0056 = "ERR.015.001.0056"; //$NON-NLS-1$
- public static final String FUNCTION_0057 = "ERR.015.001.0057"; //$NON-NLS-1$
- public static final String FUNCTION_0058 = "ERR.015.001.0058"; //$NON-NLS-1$
- public static final String FUNCTION_0059 = "ERR.015.001.0059"; //$NON-NLS-1$
- public static final String FUNCTION_0060 = "ERR.015.001.0060"; //$NON-NLS-1$
- public static final String FUNCTION_0061 = "ERR.015.001.0061"; //$NON-NLS-1$
- public static final String FUNCTION_0062 = "ERR.015.001.0062"; //$NON-NLS-1$
- public static final String FUNCTION_0063 = "ERR.015.001.0063"; //$NON-NLS-1$
- public static final String FUNCTION_0064 = "ERR.015.001.0064"; //$NON-NLS-1$
- public static final String FUNCTION_0065 = "ERR.015.001.0065"; //$NON-NLS-1$
- public static final String FUNCTION_0066 = "ERR.015.001.0066"; //$NON-NLS-1$
- public static final String FUNCTION_0067 = "ERR.015.001.0067"; //$NON-NLS-1$
- public static final String FUNCTION_0068 = "ERR.015.001.0068"; //$NON-NLS-1$
- public static final String FUNCTION_0069 = "ERR.015.001.0069"; //$NON-NLS-1$
- public static final String FUNCTION_0070 = "ERR.015.001.0070"; //$NON-NLS-1$
- public static final String FUNCTION_0071 = "ERR.015.001.0071"; //$NON-NLS-1$
-
- /** mapping package (002) */
- public static final String MAPPING_0008 = "ERR.015.002.0008"; //$NON-NLS-1$
- public static final String MAPPING_0009 = "ERR.015.002.0009"; //$NON-NLS-1$
- public static final String MAPPING_0010 = "ERR.015.002.0010"; //$NON-NLS-1$
- public static final String MAPPING_0011 = "ERR.015.002.0011"; //$NON-NLS-1$
- public static final String MAPPING_0012 = "ERR.015.002.0012"; //$NON-NLS-1$
-
- /** optimizer package (004) */
- public static final String OPTIMIZER_0002 = "ERR.015.004.0002"; //$NON-NLS-1$
- public static final String OPTIMIZER_0005 = "ERR.015.004.0005"; //$NON-NLS-1$
- public static final String OPTIMIZER_0006 = "ERR.015.004.0006"; //$NON-NLS-1$
- public static final String OPTIMIZER_0007 = "ERR.015.004.0007"; //$NON-NLS-1$
- public static final String OPTIMIZER_0008 = "ERR.015.004.0008"; //$NON-NLS-1$
- public static final String OPTIMIZER_0009 = "ERR.015.004.0009"; //$NON-NLS-1$
- public static final String OPTIMIZER_0010 = "ERR.015.004.0010"; //$NON-NLS-1$
- public static final String OPTIMIZER_0011 = "ERR.015.004.0011"; //$NON-NLS-1$
- public static final String OPTIMIZER_0012 = "ERR.015.004.0012"; //$NON-NLS-1$
- public static final String OPTIMIZER_0014 = "ERR.015.004.0014"; //$NON-NLS-1$
- public static final String OPTIMIZER_0015 = "ERR.015.004.0015"; //$NON-NLS-1$
- public static final String OPTIMIZER_0016 = "ERR.015.004.0016"; //$NON-NLS-1$
- public static final String OPTIMIZER_0017 = "ERR.015.004.0017"; //$NON-NLS-1$
- public static final String OPTIMIZER_0019 = "ERR.015.004.0019"; //$NON-NLS-1$
- public static final String OPTIMIZER_0020 = "ERR.015.004.0020"; //$NON-NLS-1$
- public static final String OPTIMIZER_0021 = "ERR.015.004.0021"; //$NON-NLS-1$
- public static final String OPTIMIZER_0023 = "ERR.015.004.0023"; //$NON-NLS-1$
- public static final String OPTIMIZER_0024 = "ERR.015.004.0024"; //$NON-NLS-1$
- public static final String OPTIMIZER_0026 = "ERR.015.004.0026"; //$NON-NLS-1$
- public static final String OPTIMIZER_0029 = "ERR.015.004.0029"; //$NON-NLS-1$
- public static final String OPTIMIZER_0033 = "ERR.015.004.0033"; //$NON-NLS-1$
- public static final String OPTIMIZER_0034 = "ERR.015.004.0034"; //$NON-NLS-1$
- public static final String OPTIMIZER_0035 = "ERR.015.004.0035"; //$NON-NLS-1$
- public static final String OPTIMIZER_0036 = "ERR.015.004.0036"; //$NON-NLS-1$
- public static final String OPTIMIZER_0037 = "ERR.015.004.0037"; //$NON-NLS-1$
- public static final String OPTIMIZER_0038 = "ERR.015.004.0038"; //$NON-NLS-1$
- public static final String OPTIMIZER_0040 = "ERR.015.004.0040"; //$NON-NLS-1$
- public static final String OPTIMIZER_0041 = "ERR.015.004.0041"; //$NON-NLS-1$
- public static final String OPTIMIZER_0042 = "ERR.015.004.0042"; //$NON-NLS-1$
- public static final String OPTIMIZER_0043 = "ERR.015.004.0043"; //$NON-NLS-1$
- public static final String OPTIMIZER_0044 = "ERR.015.004.0044"; //$NON-NLS-1$
- public static final String OPTIMIZER_0045 = "ERR.015.004.0045"; //$NON-NLS-1$
- public static final String OPTIMIZER_0046 = "ERR.015.004.0046"; //$NON-NLS-1$
- public static final String OPTIMIZER_0047 = "ERR.015.004.0047"; //$NON-NLS-1$
- public static final String OPTIMIZER_0048 = "ERR.015.004.0048"; //$NON-NLS-1$
- public static final String OPTIMIZER_0051 = "ERR.015.004.0051"; //$NON-NLS-1$
- public static final String OPTIMIZER_0053 = "ERR.015.004.0053"; //$NON-NLS-1$
- public static final String OPTIMIZER_0054 = "ERR.015.004.0054"; //$NON-NLS-1$
- public static final String OPTIMIZER_0055 = "ERR.015.004.0055"; //$NON-NLS-1$
- public static final String OPTIMIZER_0056 = "ERR.015.004.0056"; //$NON-NLS-1$
- public static final String OPTIMIZER_0057 = "ERR.015.004.0057"; //$NON-NLS-1$
- public static final String OPTIMIZER_0058 = "ERR.015.004.0058"; //$NON-NLS-1$
- public static final String OPTIMIZER_0059 = "ERR.015.004.0059"; //$NON-NLS-1$
- public static final String OPTIMIZER_0060 = "ERR.015.004.0060"; //$NON-NLS-1$
- public static final String OPTIMIZER_0061 = "ERR.015.004.0061"; //$NON-NLS-1$
- public static final String OPTIMIZER_0063 = "ERR.015.004.0063"; //$NON-NLS-1$
- public static final String OPTIMIZER_0064 = "ERR.015.004.0064"; //$NON-NLS-1$
- public static final String OPTIMIZER_0066 = "ERR.015.004.0066"; //$NON-NLS-1$
- public static final String OPTIMIZER_0067 = "ERR.015.004.0067"; //$NON-NLS-1$
- public static final String OPTIMIZER_0068 = "ERR.015.004.0068"; //$NON-NLS-1$
- public static final String OPTIMIZER_0069 = "ERR.015.004.0069"; //$NON-NLS-1$
- public static final String OPTIMIZER_0070 = "ERR.015.004.0070"; //$NON-NLS-1$
- public static final String OPTIMIZER_0071 = "ERR.015.004.0071"; //$NON-NLS-1$
-
- /** processor package (006) */
- public static final String PROCESSOR_0001 = "ERR.015.006.0001"; //$NON-NLS-1$
- public static final String PROCESSOR_0003 = "ERR.015.006.0003"; //$NON-NLS-1$
- public static final String PROCESSOR_0010 = "ERR.015.006.0010"; //$NON-NLS-1$
- public static final String PROCESSOR_0011 = "ERR.015.006.0011"; //$NON-NLS-1$
- public static final String PROCESSOR_0012 = "ERR.015.006.0012"; //$NON-NLS-1$
- public static final String PROCESSOR_0014 = "ERR.015.006.0014"; //$NON-NLS-1$
- public static final String PROCESSOR_0015 = "ERR.015.006.0015"; //$NON-NLS-1$
- public static final String PROCESSOR_0016 = "ERR.015.006.0016"; //$NON-NLS-1$
- public static final String PROCESSOR_0017 = "ERR.015.006.0017"; //$NON-NLS-1$
- public static final String PROCESSOR_0019 = "ERR.015.006.0019"; //$NON-NLS-1$
- public static final String PROCESSOR_0020 = "ERR.015.006.0020"; //$NON-NLS-1$
- public static final String PROCESSOR_0021 = "ERR.015.006.0021"; //$NON-NLS-1$
- public static final String PROCESSOR_0022 = "ERR.015.006.0022"; //$NON-NLS-1$
- public static final String PROCESSOR_0023 = "ERR.015.006.0023"; //$NON-NLS-1$
- public static final String PROCESSOR_0024 = "ERR.015.006.0024"; //$NON-NLS-1$
- public static final String PROCESSOR_0025 = "ERR.015.006.0025"; //$NON-NLS-1$
- public static final String PROCESSOR_0026 = "ERR.015.006.0026"; //$NON-NLS-1$
- public static final String PROCESSOR_0027 = "ERR.015.006.0027"; //$NON-NLS-1$
- public static final String PROCESSOR_0029 = "ERR.015.006.0029"; //$NON-NLS-1$
- public static final String PROCESSOR_0032 = "ERR.015.006.0032"; //$NON-NLS-1$
- public static final String PROCESSOR_0033 = "ERR.015.006.0033"; //$NON-NLS-1$
- public static final String PROCESSOR_0034 = "ERR.015.006.0034"; //$NON-NLS-1$
- public static final String PROCESSOR_0035 = "ERR.015.006.0035"; //$NON-NLS-1$
- public static final String PROCESSOR_0037 = "ERR.015.006.0037"; //$NON-NLS-1$
- public static final String PROCESSOR_0038 = "ERR.015.006.0038"; //$NON-NLS-1$
- public static final String PROCESSOR_0039 = "ERR.015.006.0039"; //$NON-NLS-1$
- public static final String PROCESSOR_0040 = "ERR.015.006.0040"; //$NON-NLS-1$
- public static final String PROCESSOR_0041 = "ERR.015.006.0041"; //$NON-NLS-1$
- public static final String PROCESSOR_0042 = "ERR.015.006.0042"; //$NON-NLS-1$
- public static final String PROCESSOR_0046 = "ERR.015.006.0046"; //$NON-NLS-1$
- public static final String PROCESSOR_0047 = "ERR.015.006.0047"; //$NON-NLS-1$
- public static final String PROCESSOR_0048 = "ERR.015.006.0048"; //$NON-NLS-1$
- public static final String PROCESSOR_0049 = "ERR.015.006.0049"; //$NON-NLS-1$
- public static final String PROCESSOR_0050 = "ERR.015.006.0050"; //$NON-NLS-1$
- public static final String PROCESSOR_0051 = "ERR.015.006.0051"; //$NON-NLS-1$
- public static final String PROCESSOR_0052 = "ERR.015.006.0052"; //$NON-NLS-1$
- public static final String PROCESSOR_0054 = "ERR.015.006.0054"; //$NON-NLS-1$
- public static final String PROCESSOR_0055 = "ERR.015.006.0055"; //$NON-NLS-1$
- public static final String PROCESSOR_0056 = "ERR.015.006.0056"; //$NON-NLS-1$
- public static final String PROCESSOR_0057 = "ERR.015.006.0057"; //$NON-NLS-1$
- public static final String PROCESSOR_0058 = "ERR.015.006.0058"; //$NON-NLS-1$
- public static final String PROCESSOR_0060 = "ERR.015.006.0060"; //$NON-NLS-1$
- public static final String PROCESSOR_0061 = "ERR.015.006.0061"; //$NON-NLS-1$
-
- /** report package (007) */
- public static final String REPORT_0001 = "ERR.015.007.0001"; //$NON-NLS-1$
-
- /** resolver package (008) */
- public static final String RESOLVER_0001 = "ERR.015.008.0001"; //$NON-NLS-1$
- public static final String RESOLVER_0002 = "ERR.015.008.0002"; //$NON-NLS-1$
- public static final String RESOLVER_0003 = "ERR.015.008.0003"; //$NON-NLS-1$
- public static final String RESOLVER_0004 = "ERR.015.008.0004"; //$NON-NLS-1$
- public static final String RESOLVER_0005 = "ERR.015.008.0005"; //$NON-NLS-1$
- public static final String RESOLVER_0006 = "ERR.015.008.0006"; //$NON-NLS-1$
- public static final String RESOLVER_0007 = "ERR.015.008.0007"; //$NON-NLS-1$
- public static final String RESOLVER_0008 = "ERR.015.008.0008"; //$NON-NLS-1$
- public static final String RESOLVER_0009 = "ERR.015.008.0009"; //$NON-NLS-1$
- public static final String RESOLVER_0010 = "ERR.015.008.0010"; //$NON-NLS-1$
- public static final String RESOLVER_0011 = "ERR.015.008.0011"; //$NON-NLS-1$
- public static final String RESOLVER_0012 = "ERR.015.008.0012"; //$NON-NLS-1$
- public static final String RESOLVER_0013 = "ERR.015.008.0013"; //$NON-NLS-1$
- public static final String RESOLVER_0014 = "ERR.015.008.0014"; //$NON-NLS-1$
- public static final String RESOLVER_0015 = "ERR.015.008.0015"; //$NON-NLS-1$
- public static final String RESOLVER_0016 = "ERR.015.008.0016"; //$NON-NLS-1$
- public static final String RESOLVER_0017 = "ERR.015.008.0017"; //$NON-NLS-1$
- public static final String RESOLVER_0018 = "ERR.015.008.0018"; //$NON-NLS-1$
- public static final String RESOLVER_0019 = "ERR.015.008.0019"; //$NON-NLS-1$
- public static final String RESOLVER_0020 = "ERR.015.008.0020"; //$NON-NLS-1$
- public static final String RESOLVER_0021 = "ERR.015.008.0021"; //$NON-NLS-1$
- public static final String RESOLVER_0022 = "ERR.015.008.0022"; //$NON-NLS-1$
- public static final String RESOLVER_0023 = "ERR.015.008.0023"; //$NON-NLS-1$
- public static final String RESOLVER_0024 = "ERR.015.008.0024"; //$NON-NLS-1$
- public static final String RESOLVER_0025 = "ERR.015.008.0025"; //$NON-NLS-1$
- public static final String RESOLVER_0026 = "ERR.015.008.0026"; //$NON-NLS-1$
- public static final String RESOLVER_0027 = "ERR.015.008.0027"; //$NON-NLS-1$
- public static final String RESOLVER_0028 = "ERR.015.008.0028"; //$NON-NLS-1$
- public static final String RESOLVER_0029 = "ERR.015.008.0029"; //$NON-NLS-1$
- public static final String RESOLVER_0030 = "ERR.015.008.0030"; //$NON-NLS-1$
- public static final String RESOLVER_0031 = "ERR.015.008.0031"; //$NON-NLS-1$
- public static final String RESOLVER_0032 = "ERR.015.008.0032"; //$NON-NLS-1$
- public static final String RESOLVER_0033 = "ERR.015.008.0033"; //$NON-NLS-1$
- public static final String RESOLVER_0034 = "ERR.015.008.0034"; //$NON-NLS-1$
- public static final String RESOLVER_0035 = "ERR.015.008.0035"; //$NON-NLS-1$
- public static final String RESOLVER_0036 = "ERR.015.008.0036"; //$NON-NLS-1$
- public static final String RESOLVER_0037 = "ERR.015.008.0037"; //$NON-NLS-1$
- public static final String RESOLVER_0038 = "ERR.015.008.0038"; //$NON-NLS-1$
- public static final String RESOLVER_0039 = "ERR.015.008.0039"; //$NON-NLS-1$
- public static final String RESOLVER_0040 = "ERR.015.008.0040"; //$NON-NLS-1$
- public static final String RESOLVER_0041 = "ERR.015.008.0041"; //$NON-NLS-1$
- public static final String RESOLVER_0042 = "ERR.015.008.0042"; //$NON-NLS-1$
- public static final String RESOLVER_0043 = "ERR.015.008.0043"; //$NON-NLS-1$
- public static final String RESOLVER_0044 = "ERR.015.008.0044"; //$NON-NLS-1$
- public static final String RESOLVER_0045 = "ERR.015.008.0045"; //$NON-NLS-1$
- public static final String RESOLVER_0046 = "ERR.015.008.0046"; //$NON-NLS-1$
- public static final String RESOLVER_0047 = "ERR.015.008.0047"; //$NON-NLS-1$
- public static final String RESOLVER_0048 = "ERR.015.008.0048"; //$NON-NLS-1$
- public static final String RESOLVER_0049 = "ERR.015.008.0049"; //$NON-NLS-1$
- public static final String RESOLVER_0050 = "ERR.015.008.0050"; //$NON-NLS-1$
- public static final String RESOLVER_0051 = "ERR.015.008.0051"; //$NON-NLS-1$
- public static final String RESOLVER_0052 = "ERR.015.008.0052"; //$NON-NLS-1$
- public static final String RESOLVER_0053 = "ERR.015.008.0053"; //$NON-NLS-1$
- public static final String RESOLVER_0054 = "ERR.015.008.0054"; //$NON-NLS-1$
- public static final String RESOLVER_0055 = "ERR.015.008.0055"; //$NON-NLS-1$
- public static final String RESOLVER_0056 = "ERR.015.008.0056"; //$NON-NLS-1$
- public static final String RESOLVER_0057 = "ERR.015.008.0057"; //$NON-NLS-1$
- public static final String RESOLVER_0058 = "ERR.015.008.0058"; //$NON-NLS-1$
- public static final String RESOLVER_0059 = "ERR.015.008.0059"; //$NON-NLS-1$
- public static final String RESOLVER_0060 = "ERR.015.008.0060"; //$NON-NLS-1$
- public static final String RESOLVER_0061 = "ERR.015.008.0061"; //$NON-NLS-1$
- public static final String RESOLVER_0062 = "ERR.015.008.0062"; //$NON-NLS-1$
- public static final String RESOLVER_0063 = "ERR.015.008.0063"; //$NON-NLS-1$
- public static final String RESOLVER_0064 = "ERR.015.008.0064"; //$NON-NLS-1$
- public static final String RESOLVER_0065 = "ERR.015.008.0065"; //$NON-NLS-1$
- public static final String RESOLVER_0066 = "ERR.015.008.0066"; //$NON-NLS-1$
- public static final String RESOLVER_0067 = "ERR.015.008.0067"; //$NON-NLS-1$
- public static final String RESOLVER_0068 = "ERR.015.008.0068"; //$NON-NLS-1$
- public static final String RESOLVER_0069 = "ERR.015.008.0069"; //$NON-NLS-1$
- public static final String RESOLVER_0070 = "ERR.015.008.0070"; //$NON-NLS-1$
-
- /** rewriter package (009) */
- public static final String REWRITER_0001 = "ERR.015.009.0001"; //$NON-NLS-1$
- public static final String REWRITER_0002 = "ERR.015.009.0002"; //$NON-NLS-1$
- public static final String REWRITER_0003 = "ERR.015.009.0003"; //$NON-NLS-1$
- public static final String REWRITER_0004 = "ERR.015.009.0004"; //$NON-NLS-1$
- public static final String REWRITER_0005 = "ERR.015.009.0005"; //$NON-NLS-1$
-
- /** sql package (010) */
- public static final String SQL_0001 = "ERR.015.010.0001"; //$NON-NLS-1$
- public static final String SQL_0002 = "ERR.015.010.0002"; //$NON-NLS-1$
- public static final String SQL_0003 = "ERR.015.010.0003"; //$NON-NLS-1$
- public static final String SQL_0004 = "ERR.015.010.0004"; //$NON-NLS-1$
- public static final String SQL_0005 = "ERR.015.010.0005"; //$NON-NLS-1$
- public static final String SQL_0006 = "ERR.015.010.0006"; //$NON-NLS-1$
- public static final String SQL_0007 = "ERR.015.010.0007"; //$NON-NLS-1$
- public static final String SQL_0008 = "ERR.015.010.0008"; //$NON-NLS-1$
- public static final String SQL_0009 = "ERR.015.010.0009"; //$NON-NLS-1$
- public static final String SQL_0010 = "ERR.015.010.0010"; //$NON-NLS-1$
- public static final String SQL_0011 = "ERR.015.010.0011"; //$NON-NLS-1$
- public static final String SQL_0012 = "ERR.015.010.0012"; //$NON-NLS-1$
- public static final String SQL_0013 = "ERR.015.010.0013"; //$NON-NLS-1$
- public static final String SQL_0014 = "ERR.015.010.0014"; //$NON-NLS-1$
- public static final String SQL_0015 = "ERR.015.010.0015"; //$NON-NLS-1$
- public static final String SQL_0016 = "ERR.015.010.0016"; //$NON-NLS-1$
- public static final String SQL_0017 = "ERR.015.010.0017"; //$NON-NLS-1$
- public static final String SQL_0018 = "ERR.015.010.0018"; //$NON-NLS-1$
- public static final String SQL_0019 = "ERR.015.010.0019"; //$NON-NLS-1$
- public static final String SQL_0020 = "ERR.015.010.0020"; //$NON-NLS-1$
- public static final String SQL_0021 = "ERR.015.010.0021"; //$NON-NLS-1$
- public static final String SQL_0022 = "ERR.015.010.0022"; //$NON-NLS-1$
- public static final String SQL_0023 = "ERR.015.010.0023"; //$NON-NLS-1$
- public static final String SQL_0024 = "ERR.015.010.0024"; //$NON-NLS-1$
- public static final String SQL_0025 = "ERR.015.010.0025"; //$NON-NLS-1$
- public static final String SQL_0026 = "ERR.015.010.0026"; //$NON-NLS-1$
- public static final String SQL_0027 = "ERR.015.010.0027"; //$NON-NLS-1$
- public static final String SQL_0028 = "ERR.015.010.0028"; //$NON-NLS-1$
- public static final String SQL_0029 = "ERR.015.010.0029"; //$NON-NLS-1$
- public static final String SQL_0030 = "ERR.015.010.0030"; //$NON-NLS-1$
- public static final String SQL_0031 = "ERR.015.010.0031"; //$NON-NLS-1$
- public static final String SQL_0032 = "ERR.015.010.0032"; //$NON-NLS-1$
- public static final String SQL_0034 = "ERR.015.010.0034"; //$NON-NLS-1$
- public static final String SQL_0035 = "ERR.015.010.0035"; //$NON-NLS-1$
- public static final String SQL_0036 = "ERR.015.010.0036"; //$NON-NLS-1$
- public static final String SQL_0037 = "ERR.015.010.0037"; //$NON-NLS-1$
- public static final String SQL_0038 = "ERR.015.010.0038"; //$NON-NLS-1$
- public static final String SQL_0039 = "ERR.015.010.0039"; //$NON-NLS-1$
-
- /** util package (011) */
- public static final String UTIL_0001 = "ERR.015.011.0001"; //$NON-NLS-1$
-
- /** validator package (012) */
- public static final String VALIDATOR_0001 = "ERR.015.012.0001"; //$NON-NLS-1$
- public static final String VALIDATOR_0002 = "ERR.015.012.0002"; //$NON-NLS-1$
- public static final String VALIDATOR_0003 = "ERR.015.012.0003"; //$NON-NLS-1$
- public static final String VALIDATOR_0004 = "ERR.015.012.0004"; //$NON-NLS-1$
- public static final String VALIDATOR_0005 = "ERR.015.012.0005"; //$NON-NLS-1$
- public static final String VALIDATOR_0006 = "ERR.015.012.0006"; //$NON-NLS-1$
- public static final String VALIDATOR_0007 = "ERR.015.012.0007"; //$NON-NLS-1$
- public static final String VALIDATOR_0008 = "ERR.015.012.0008"; //$NON-NLS-1$
- public static final String VALIDATOR_0009 = "ERR.015.012.0009"; //$NON-NLS-1$
- public static final String VALIDATOR_0010 = "ERR.015.012.0010"; //$NON-NLS-1$
- public static final String VALIDATOR_0011 = "ERR.015.012.0011"; //$NON-NLS-1$
- public static final String VALIDATOR_0012 = "ERR.015.012.0012"; //$NON-NLS-1$
- public static final String VALIDATOR_0013 = "ERR.015.012.0013"; //$NON-NLS-1$
- public static final String VALIDATOR_0014 = "ERR.015.012.0014"; //$NON-NLS-1$
- public static final String VALIDATOR_0015 = "ERR.015.012.0015"; //$NON-NLS-1$
- public static final String VALIDATOR_0016 = "ERR.015.012.0016"; //$NON-NLS-1$
- public static final String VALIDATOR_0017 = "ERR.015.012.0017"; //$NON-NLS-1$
- public static final String VALIDATOR_0018 = "ERR.015.012.0018"; //$NON-NLS-1$
- public static final String VALIDATOR_0019 = "ERR.015.012.0019"; //$NON-NLS-1$
- public static final String VALIDATOR_0020 = "ERR.015.012.0020"; //$NON-NLS-1$
- public static final String VALIDATOR_0021 = "ERR.015.012.0021"; //$NON-NLS-1$
- public static final String VALIDATOR_0022 = "ERR.015.012.0022"; //$NON-NLS-1$
- public static final String VALIDATOR_0023 = "ERR.015.012.0023"; //$NON-NLS-1$
- public static final String VALIDATOR_0024 = "ERR.015.012.0024"; //$NON-NLS-1$
- public static final String VALIDATOR_0025 = "ERR.015.012.0025"; //$NON-NLS-1$
- public static final String VALIDATOR_0026 = "ERR.015.012.0026"; //$NON-NLS-1$
- public static final String VALIDATOR_0027 = "ERR.015.012.0027"; //$NON-NLS-1$
- public static final String VALIDATOR_0028 = "ERR.015.012.0028"; //$NON-NLS-1$
- public static final String VALIDATOR_0029 = "ERR.015.012.0029"; //$NON-NLS-1$
- public static final String VALIDATOR_0030 = "ERR.015.012.0030"; //$NON-NLS-1$
- public static final String VALIDATOR_0031 = "ERR.015.012.0031"; //$NON-NLS-1$
- public static final String VALIDATOR_0032 = "ERR.015.012.0032"; //$NON-NLS-1$
- public static final String VALIDATOR_0033 = "ERR.015.012.0033"; //$NON-NLS-1$
- public static final String VALIDATOR_0034 = "ERR.015.012.0034"; //$NON-NLS-1$
- public static final String VALIDATOR_0035 = "ERR.015.012.0035"; //$NON-NLS-1$
- public static final String VALIDATOR_0036 = "ERR.015.012.0036"; //$NON-NLS-1$
- public static final String VALIDATOR_0037 = "ERR.015.012.0037"; //$NON-NLS-1$
- public static final String VALIDATOR_0038 = "ERR.015.012.0038"; //$NON-NLS-1$
- public static final String VALIDATOR_0039 = "ERR.015.012.0039"; //$NON-NLS-1$
- public static final String VALIDATOR_0040 = "ERR.015.012.0040"; //$NON-NLS-1$
- public static final String VALIDATOR_0041 = "ERR.015.012.0041"; //$NON-NLS-1$
- public static final String VALIDATOR_0042 = "ERR.015.012.0042"; //$NON-NLS-1$
- public static final String VALIDATOR_0045 = "ERR.015.012.0045"; //$NON-NLS-1$
- public static final String VALIDATOR_0046 = "ERR.015.012.0046"; //$NON-NLS-1$
- public static final String VALIDATOR_0047 = "ERR.015.012.0047"; //$NON-NLS-1$
- public static final String VALIDATOR_0048 = "ERR.015.012.0048"; //$NON-NLS-1$
- public static final String VALIDATOR_0049 = "ERR.015.012.0049"; //$NON-NLS-1$
- public static final String VALIDATOR_0050 = "ERR.015.012.0050"; //$NON-NLS-1$
- public static final String VALIDATOR_0051 = "ERR.015.012.0051"; //$NON-NLS-1$
- public static final String VALIDATOR_0052 = "ERR.015.012.0052"; //$NON-NLS-1$
- public static final String VALIDATOR_0053 = "ERR.015.012.0053"; //$NON-NLS-1$
- public static final String VALIDATOR_0054 = "ERR.015.012.0054"; //$NON-NLS-1$
- public static final String VALIDATOR_0055 = "ERR.015.012.0055"; //$NON-NLS-1$
- public static final String VALIDATOR_0056 = "ERR.015.012.0056"; //$NON-NLS-1$
- public static final String VALIDATOR_0057 = "ERR.015.012.0057"; //$NON-NLS-1$
- public static final String VALIDATOR_0058 = "ERR.015.012.0058"; //$NON-NLS-1$
- public static final String VALIDATOR_0059 = "ERR.015.012.0059"; //$NON-NLS-1$
- public static final String VALIDATOR_0060 = "ERR.015.012.0060"; //$NON-NLS-1$
- public static final String VALIDATOR_0061 = "ERR.015.012.0061"; //$NON-NLS-1$
- public static final String VALIDATOR_0062 = "ERR.015.012.0062"; //$NON-NLS-1$
- public static final String VALIDATOR_0063 = "ERR.015.012.0063"; //$NON-NLS-1$
- public static final String VALIDATOR_0064 = "ERR.015.012.0064"; //$NON-NLS-1$
- public static final String VALIDATOR_0065 = "ERR.015.012.0065"; //$NON-NLS-1$
- public static final String VALIDATOR_0066 = "ERR.015.012.0066"; //$NON-NLS-1$
- public static final String VALIDATOR_0067 = "ERR.015.012.0067"; //$NON-NLS-1$
- public static final String VALIDATOR_0069 = "ERR.015.012.0069"; //$NON-NLS-1$
- public static final String VALIDATOR_0070 = "ERR.015.012.0070"; //$NON-NLS-1$
-}
Modified: trunk/engine/src/main/java/org/teiid/query/validator/AggregateValidationVisitor.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/validator/AggregateValidationVisitor.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/validator/AggregateValidationVisitor.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -39,7 +39,6 @@
import org.teiid.query.sql.symbol.AggregateSymbol.Type;
import org.teiid.query.sql.visitor.AggregateSymbolCollectorVisitor;
import org.teiid.query.sql.visitor.ElementCollectorVisitor;
-import org.teiid.query.util.ErrorMessageKeys;
/**
* Validate that all ElementSymbol and ExpressionSymbols used in the HAVING
@@ -64,14 +63,14 @@
if(aggExp != null) {
Collection<AggregateSymbol> nestedAggs = AggregateSymbolCollectorVisitor.getAggregates(aggExp, true);
if(nestedAggs.size() > 0) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0039, nestedAggs), nestedAggs);
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0039", nestedAggs), nestedAggs); //$NON-NLS-1$
}
}
// Verify data type of aggregate expression
Type aggregateFunction = obj.getAggregateFunction();
if((aggregateFunction == Type.SUM || aggregateFunction == Type.AVG) && obj.getType() == null) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0041, new Object[] {aggregateFunction, obj}), obj);
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0041", new Object[] {aggregateFunction, obj}), obj); //$NON-NLS-1$
} else if (obj.getType() != DataTypeManager.DefaultDataClasses.NULL) {
if (aggregateFunction == Type.XMLAGG && aggExp.getType() != DataTypeManager.DefaultDataClasses.XML) {
handleValidationError(QueryPlugin.Util.getString("AggregateValidationVisitor.non_xml", new Object[] {aggregateFunction, obj}), obj); //$NON-NLS-1$
@@ -84,7 +83,7 @@
}
if(obj.isEnhancedNumeric()) {
if (!Number.class.isAssignableFrom(aggExp.getType())) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0041, new Object[] {aggregateFunction, obj}), obj);
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0041", new Object[] {aggregateFunction, obj}), obj); //$NON-NLS-1$
}
if (obj.isDistinct()) {
handleValidationError(QueryPlugin.Util.getString("AggregateValidationVisitor.invalid_distinct", new Object[] {aggregateFunction, obj}), obj); //$NON-NLS-1$
@@ -121,11 +120,11 @@
if(groupExpressions == null) {
if (symbol instanceof ElementSymbol) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0037, symbol), symbol);
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0037", symbol), symbol); //$NON-NLS-1$
}
} else if(! groupExpressions.contains(symbol)) {
if (symbol instanceof ElementSymbol) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0038, symbol), symbol);
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0038", symbol), symbol); //$NON-NLS-1$
}
} else {
validateBelow = false;
Modified: trunk/engine/src/main/java/org/teiid/query/validator/UpdateValidationVisitor.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/validator/UpdateValidationVisitor.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/validator/UpdateValidationVisitor.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -35,7 +35,6 @@
import org.teiid.query.sql.symbol.*;
import org.teiid.query.sql.util.SymbolMap;
import org.teiid.query.sql.visitor.ElementCollectorVisitor;
-import org.teiid.query.util.ErrorMessageKeys;
/**
@@ -80,7 +79,7 @@
* @param obj The <code>SetQuery</code> object to be visited for validation
*/
public void visit(SetQuery obj) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0001));
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0001")); //$NON-NLS-1$
}
/**
@@ -89,7 +88,7 @@
* @param obj The <code>StoredProcedure</code> object to be visited for validation
*/
public void visit(StoredProcedure obj) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0002));
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0002")); //$NON-NLS-1$
}
/**
@@ -98,7 +97,7 @@
* @param obj The <code>Insert</code> object to be visited for validation
*/
public void visit(Insert obj) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0003));
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0003")); //$NON-NLS-1$
}
/**
@@ -107,7 +106,7 @@
* @param obj The <code>Update</code> object to be visited for validation
*/
public void visit(Update obj) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0004));
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0004")); //$NON-NLS-1$
}
/**
@@ -116,7 +115,7 @@
* @param obj The <code>Delete</code> object to be visited for validation
*/
public void visit(Delete obj) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0005));
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0005")); //$NON-NLS-1$
}
/**
@@ -126,7 +125,7 @@
*/
public void visit(Query obj) {
if((obj.getGroupBy() != null) || (obj.getHaving() != null)) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0006));
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0006")); //$NON-NLS-1$
}
}
@@ -149,7 +148,7 @@
Expression ex = SymbolMap.getExpression(symbol);
if (!(ex instanceof ElementSymbol || ex instanceof Constant)) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0007, symbol));
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0007", symbol)); //$NON-NLS-1$
}
}
@@ -170,12 +169,12 @@
GroupSymbol group = (GroupSymbol) groupIter.next();
if(groupIter.hasNext()) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0009, obj.getGroups()));
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0009", obj.getGroups())); //$NON-NLS-1$
} else {
try {
Object groupID = group.getMetadataID();
if(groupID instanceof TempMetadataID) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0002));
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0002")); //$NON-NLS-1$
} else {
Iterator elementsInGroupIter = getMetadata().getElementIDsInGroupID(groupID).iterator();
// walk through all the elements in the physical group
@@ -218,7 +217,7 @@
// this method should only be executed if the element is a required element
// and none of cases above are true
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0010, element));
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0010", element)); //$NON-NLS-1$
} catch(TeiidException e) {
handleException(e);
}
Modified: trunk/engine/src/main/java/org/teiid/query/validator/ValidationVisitor.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/validator/ValidationVisitor.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/validator/ValidationVisitor.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -124,7 +124,6 @@
import org.teiid.query.sql.visitor.PredicateCollectorVisitor;
import org.teiid.query.sql.visitor.SQLStringVisitor;
import org.teiid.query.sql.visitor.ValueIteratorProviderCollectorVisitor;
-import org.teiid.query.util.ErrorMessageKeys;
import org.teiid.query.xquery.saxon.SaxonXQueryExpression;
import org.teiid.translator.SourceSystemFunctions;
@@ -238,7 +237,7 @@
if(isXMLCommand(obj)) {
//no temp table (Select Into) allowed
if(obj.getInto() != null){
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0069),obj);
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0069"),obj); //$NON-NLS-1$
}
this.isXML = true;
@@ -249,7 +248,7 @@
//if it is select with no from, should not have ScalarSubQuery
if(obj.getSelect() != null && obj.getFrom() == null){
if(!ValueIteratorProviderCollectorVisitor.getValueIteratorProviders(obj.getSelect()).isEmpty()){
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0067),obj);
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0067"),obj); //$NON-NLS-1$
}
}
@@ -268,7 +267,7 @@
public void visit(SubquerySetCriteria obj) {
if (isNonComparable(obj.getExpression())) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0027, obj),obj);
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0027", obj),obj); //$NON-NLS-1$
}
this.validateRowLimitFunctionNotInInvalidCriteria(obj);
@@ -277,7 +276,7 @@
//Subcommand should have one projected symbol (query with one expression
//in SELECT or stored procedure execution that returns a single value).
if(projSymbols.size() != 1) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0011),obj);
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0011"),obj); //$NON-NLS-1$
}
}
@@ -320,7 +319,7 @@
handleValidationError(QueryPlugin.Util.getString("ValidationVisitor.The_context_function_cannot_be_used_in_a_non-XML_command"), obj); //$NON-NLS-1$
} else {
if (!(obj.getArg(0) instanceof ElementSymbol)){
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.OPTIMIZER_0036), obj);
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.004.0036"), obj); //$NON-NLS-1$
}
for (Iterator functions = FunctionCollectorVisitor.getFunctions(obj.getArg(1), false).iterator(); functions.hasNext();) {
@@ -370,7 +369,7 @@
String groupName = variable.getGroupSymbol().getCanonicalName();
if(groupName.equals(ProcedureReservedWords.CHANGING) || groupName.equals(ProcedureReservedWords.INPUTS)) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0012, ProcedureReservedWords.INPUTS, ProcedureReservedWords.CHANGING), obj);
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0012", ProcedureReservedWords.INPUTS, ProcedureReservedWords.CHANGING), obj); //$NON-NLS-1$
}
}
@@ -382,7 +381,7 @@
//Scalar subquery should have one projected symbol (query with one expression
//in SELECT or stored procedure execution that returns a single value).
if(projSymbols.size() != 1) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.RESOLVER_0032, obj.getCommand()), obj.getCommand());
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.008.0032", obj.getCommand()), obj.getCommand()); //$NON-NLS-1$
}
}
@@ -412,7 +411,7 @@
// varible cannot be one of the special variables
if(elementname.equals(ProcedureReservedWords.ROWS_UPDATED)) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0017, new Object[] {ProcedureReservedWords.ROWS_UPDATED}), obj);
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0017", new Object[] {ProcedureReservedWords.ROWS_UPDATED}), obj); //$NON-NLS-1$
}
visit((AssignmentStatement)obj);
@@ -441,12 +440,12 @@
Criteria predicateCriteria = (Criteria) criteriaIter.next();
Iterator elmntIter = ElementCollectorVisitor.getElements(predicateCriteria, true).iterator();
if(predicateCriteria instanceof TranslateCriteria) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0019), obj);
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0019"), obj); //$NON-NLS-1$
} else if(!(predicateCriteria instanceof HasCriteria)) {
while(elmntIter.hasNext()) {
ElementSymbol element = (ElementSymbol) elmntIter.next();
if(!element.isExternalReference()) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0020), obj);
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0020"), obj); //$NON-NLS-1$
}
}
}
@@ -468,7 +467,7 @@
ElementSymbol leftExpr = (ElementSymbol)leftElmnts.iterator().next();
if(selectElmnts != null && !selectElmnts.contains(leftExpr)) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0021), leftExpr);
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0021"), leftExpr); //$NON-NLS-1$
}
}
}
@@ -589,7 +588,7 @@
if(transleElmnts.contains(criteriaElement)) {
Expression mappedExpr = (Expression) symbolMap.get(criteriaElement);
if(mappedExpr instanceof AggregateSymbol) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0022, criteriaElement), criteriaElement);
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0022", criteriaElement), criteriaElement); //$NON-NLS-1$
}
Iterator mapElmntIter = ElementCollectorVisitor.getElements(mappedExpr, true).iterator();
@@ -602,7 +601,7 @@
}
}
if(!groupMatch) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0023, criteriaElement), criteriaElement);
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0023", criteriaElement), criteriaElement); //$NON-NLS-1$
}
}
}
@@ -621,13 +620,13 @@
SupportConstants.Element.SELECT );
if(cantSelect != null) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0024, cantSelect), cantSelect);
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0024", cantSelect), cantSelect); //$NON-NLS-1$
}
}
protected void validateHasProjectedSymbols(Command obj) {
if(obj.getProjectedSymbols().size() == 0) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0025), obj);
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0025"), obj); //$NON-NLS-1$
}
}
@@ -646,7 +645,7 @@
private void validateSortable(SingleElementSymbol symbol) {
if (isNonComparable(symbol)) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0026, symbol), symbol);
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0026", symbol), symbol); //$NON-NLS-1$
}
}
@@ -660,7 +659,7 @@
*/
protected void validateNoXMLUpdates(Command obj) {
if(isXMLCommand(obj)) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0029), obj);
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0029"), obj); //$NON-NLS-1$
}
}
@@ -670,16 +669,16 @@
*/
protected void validateNoXMLProcedures(Command obj) {
if(isXMLCommand(obj)) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0030), obj);
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0030"), obj); //$NON-NLS-1$
}
}
private void validateXMLQuery(Query obj) {
if(obj.getGroupBy() != null) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0031), obj);
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0031"), obj); //$NON-NLS-1$
}
if(obj.getHaving() != null) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0032), obj);
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0032"), obj); //$NON-NLS-1$
}
if(obj.getLimit() != null) {
handleValidationError(QueryPlugin.Util.getString("ValidationVisitor.limit_not_valid_for_xml"), obj); //$NON-NLS-1$
@@ -697,7 +696,7 @@
protected void validateGroupSupportsUpdate(GroupSymbol groupSymbol) {
try {
if(! getMetadata().groupSupports(groupSymbol.getMetadataID(), SupportConstants.Group.UPDATE)) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0033, SQLStringVisitor.getSQLString(groupSymbol)), groupSymbol);
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0033", SQLStringVisitor.getSQLString(groupSymbol)), groupSymbol); //$NON-NLS-1$
}
} catch (TeiidComponentException e) {
handleException(e, groupSymbol);
@@ -709,7 +708,7 @@
// also check the columns of each for comparability
for (QueryCommand subQuery : query.getQueryCommands()) {
if(isXMLCommand(subQuery)) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0034), query);
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0034"), query); //$NON-NLS-1$
}
if (subQuery instanceof Query && ((Query)subQuery).getInto() != null) {
handleValidationError(QueryPlugin.Util.getString("ValidationVisitor.union_insert"), query); //$NON-NLS-1$
@@ -774,7 +773,7 @@
while(elementIter.hasNext()) {
ElementSymbol insertElem = (ElementSymbol) elementIter.next();
if(! getMetadata().elementSupports(insertElem.getMetadataID(), SupportConstants.Element.UPDATE)) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0052, insertElem), insertElem);
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0052", insertElem), insertElem); //$NON-NLS-1$
}
}
@@ -790,7 +789,7 @@
if(!getMetadata().elementSupports(nextElmnt.getMetadataID(), SupportConstants.Element.DEFAULT_VALUE) &&
!getMetadata().elementSupports(nextElmnt.getMetadataID(), SupportConstants.Element.NULL) &&
!getMetadata().elementSupports(nextElmnt.getMetadataID(), SupportConstants.Element.AUTO_INCREMENT)) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0053, new Object[] {insertGroup, nextElmnt}), nextElmnt);
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0053", new Object[] {insertGroup, nextElmnt}), nextElmnt); //$NON-NLS-1$
}
}
@@ -805,7 +804,7 @@
// If nextValue is an expression, evaluate it before checking for null
Object evaluatedValue = Evaluator.evaluate(nextValue);
if(evaluatedValue == null && ! getMetadata().elementSupports(nextVar.getMetadataID(), SupportConstants.Element.NULL)) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0055, SQLStringVisitor.getSQLString(nextVar)), nextVar);
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0055", SQLStringVisitor.getSQLString(nextVar)), nextVar); //$NON-NLS-1$
}
} catch(ExpressionEvaluationException e) {
//ignore for now, we don't have the context which could be the problem
@@ -827,7 +826,7 @@
}
}
if(!dups.isEmpty()) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0062, dups), dups);
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0062", dups), dups); //$NON-NLS-1$
}
}
@@ -837,12 +836,12 @@
for (SetClause entry : update.getChangeList().getClauses()) {
ElementSymbol elementID = entry.getSymbol();
if(elementID.isExternalReference()) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0058, SQLStringVisitor.getSQLString(elementID)), elementID);
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0058", SQLStringVisitor.getSQLString(elementID)), elementID); //$NON-NLS-1$
}
// Check that left side element is updatable
if(! getMetadata().elementSupports(elementID.getMetadataID(), SupportConstants.Element.UPDATE)) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0059, elementID), elementID);
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0059", elementID), elementID); //$NON-NLS-1$
}
// Check that right expression is a constant and is non-null
@@ -858,7 +857,7 @@
if(value instanceof Constant) {
// If value is null, check that element supports this as a nullable column
if(((Constant)value).isNull() && ! getMetadata().elementSupports(elementID.getMetadataID(), SupportConstants.Element.NULL)) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0060, SQLStringVisitor.getSQLString(elementID)), elementID);
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0060", SQLStringVisitor.getSQLString(elementID)), elementID); //$NON-NLS-1$
}// end of if
} else if (!EvaluatableVisitor.willBecomeConstant(value)) {
// If this is an update on a virtual group, verify that no elements are in the right side
@@ -870,7 +869,7 @@
while(iter.hasNext()) {
ElementSymbol element = (ElementSymbol) iter.next();
if(! element.isExternalReference()) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0061, SQLStringVisitor.getSQLString(value)), value);
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0061", SQLStringVisitor.getSQLString(value)), value); //$NON-NLS-1$
}
}
}
@@ -955,7 +954,7 @@
}
}
if(!foundVar) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0016, ProcedureReservedWords.ROWS_UPDATED), obj);
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0016", ProcedureReservedWords.ROWS_UPDATED), obj); //$NON-NLS-1$
}
}
@@ -977,7 +976,7 @@
*/
public void visit(BetweenCriteria obj) {
if (isNonComparable(obj.getExpression())) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0027, obj),obj);
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0027", obj),obj); //$NON-NLS-1$
}
this.validateRowLimitFunctionNotInInvalidCriteria(obj);
}
@@ -1012,7 +1011,7 @@
*/
public void visit(SetCriteria obj) {
if (isNonComparable(obj.getExpression())) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0027, obj),obj);
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0027", obj),obj); //$NON-NLS-1$
}
this.validateRowLimitFunctionNotInInvalidCriteria(obj);
}
@@ -1023,7 +1022,7 @@
*/
public void visit(SubqueryCompareCriteria obj) {
if (isNonComparable(obj.getLeftExpression())) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0027, obj),obj);
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0027", obj),obj); //$NON-NLS-1$
}
this.validateRowLimitFunctionNotInInvalidCriteria(obj);
}
@@ -1079,7 +1078,7 @@
@Override
public void visit(CompareCriteria obj) {
if (isNonComparable(obj.getLeftExpression())) {
- handleValidationError(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0027, obj),obj);
+ handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0027", obj),obj); //$NON-NLS-1$
}
// Validate use of 'rowlimit' and 'rowlimitexception' pseudo-functions - they cannot be nested within another
Modified: trunk/engine/src/main/java/org/teiid/query/validator/ValidatorReport.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/query/validator/ValidatorReport.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/java/org/teiid/query/validator/ValidatorReport.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -27,7 +27,6 @@
import org.teiid.query.QueryPlugin;
import org.teiid.query.report.ActivityReport;
-import org.teiid.query.util.ErrorMessageKeys;
public class ValidatorReport extends ActivityReport {
@@ -51,12 +50,12 @@
public String getFailureMessage() {
Collection failures = getItemsByType(ValidatorFailure.VALIDATOR_FAILURE);
if(failures.size() == 0) {
- return QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0064);
+ return QueryPlugin.Util.getString("ERR.015.012.0064"); //$NON-NLS-1$
} else if(failures.size() == 1) {
return failures.iterator().next().toString();
} else {
StringBuffer err = new StringBuffer();
- err.append(QueryPlugin.Util.getString(ErrorMessageKeys.VALIDATOR_0063));
+ err.append(QueryPlugin.Util.getString("ERR.015.012.0063")); //$NON-NLS-1$
Iterator iter = failures.iterator();
ValidatorFailure failure = (ValidatorFailure) iter.next();
Deleted: trunk/engine/src/main/resources/org/teiid/dqp/i18n.properties
===================================================================
--- trunk/engine/src/main/resources/org/teiid/dqp/i18n.properties 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/resources/org/teiid/dqp/i18n.properties 2010-09-24 18:51:07 UTC (rev 2603)
@@ -1,527 +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.
-#
-
-BasicInterceptor.ProcessTree_for__4=ProcessTree for
-Connector.Loaded_capabilities_class__none_1=Loaded capabilities class: none
-Connector.Loaded_capabilities_class___2=Loaded capabilities class: {0}
-Connector.Failed_to_load_capabilities_class._3=Failed to load capabilities class. {0}
-ConnectorProcessor.Cache_statistics_5=Cache statistics: {0}
-ConnectorStateManager.invalid_state_1=Request {0} should have been in IDLE state but was PROCESSING.
-ConnectorStateManager.invalid_state_2=Request {0} should have been in an IDLE state but was in UNKNOWN.
-ConnectorStateManager.invalid_state_3=Could not find the state of request {0}
-ConnectorStateManager.invalid_state_4=Request {0} should have been in PROCESSING state but was IDLE
-ConnectorStateManager.invalid_state_5=Request {0} should have been in PROCESSING state but was UNKNOWN
-
-AtomicRequestID.Unable_to_create_ID_for_null_AtomicRequestMessage=Unable to create an ID for a null AtomicRequestMessage.
-AtomicRequestID.Unable_to_create_ID_for_AtomicRequestMessage_with_null_RequestID=Unable to create an ID for an AtomicRequestMessage with null RequestID.
-
-ConnectorManager.failed_to_lookup_connector=Failed to look up Connector instance {0}
-ConnectorManager.xa_capbility_not_supported=XA support by the Connector {0} is not possible when "SyncWorkers" is set to false
-ConnectorManager.not_in_valid_state=Connector is not in OPEN state
-
-ConnectorManagerImpl.Initializing_connector=Initializing connector {0}
-ConnectorManagerImpl.Couldn__t_parse_property=Could not parse property: {0}
-Error_closing_client_connection=Error closing client connection in ConnectorManager
-failed_legacy=The specified connector class {0} is not an instance of a Teiid connector. This may be due to an inappropriate classpath entry. An attempt was also made to treat the class as a legacy MetaMatrix connector, however this was not successful either.
-failed_instantiate_Connector_class=Could not instantiate Connector class {0}
-failed_start_Connector=Could not start Connector {0}. {1}
-ConnectorManagerImpl.request_inactive_for_cancel=RequestID {0} is not active and the cancel request will not be processed.
-failed_access_Connector_class=Could not access Connector class {0}
-failed_to_initialize=Could not initialize Connector class {0}
-Failed_to_find_service=Can not not find instance of service \"{0}\" in ConnectorManager: {1}
-received_null_message=ConnectorManager \"{0}\" received null message.
-Unknown_incoming_request_type=Unknown incoming request type \"{0}\" for request \"{1}\" in ConnectorManager {2}
-Unable_to_parse_required_property=Unable to parse \"{0}\" to use for required property {1} in ConnectorManager {2}
-using_default_value=Missing property: \"{0}\". Using default of: {1} in ConnectorManager {2}
-Unable_to_notify_client_of_failure=Unable to notify client \"{0}\" of failure: {1}
-wrong_message_type=ConnectorManager {0} recieved message {1} of unexpected type
-Connector_Shutting_down=Unable to service request {0} in connector {1} - Shutting down.
-Cancel_request_failed=AtomicRequest {0} failed to cancel.
-RequestMessage_failed_Cause=RequestMessage {0} failed. Cause: {1}
-ConnectorManagerImpl.Err_get_conn=Error getting connection for cancellation: {0}
-ConnectorManager.cannot_restart=Cannot restart ConnectorManager
-ConnectorManager.cannot_add_to_recovery=Connector ''{0}'' does not support single identity connections, it cannot participate in recovery
-ConnectorManager.asynch_worker_warning=Setting ''{0}'' to false with pooling enabled is not recommended. If connector threads become exhausted normal execution closure will not be possible.
-ConnectorManager.useClassloader=Connector ''{0}'' using post delegation = {1} and classpath {2}
-non_xa_connector=Connector \"{0}\" was configured to support XA transactions, but the connector is not an XAConnector
-no_txn_manager=No Transaction Manger found in the configuration, Failed to start connector \"{0}\"
-Connector_State_not_active=Connector request state is not active for request {0} in Connector {1}
-Missing_required_property=Connector is missing required property {0} or wrong value supplied {1}
-Cancel_failed=Request {0} failed to cancel.
-
-ConnectorWorker.Can__t_communicate_error_to_client=Can not not communicate error to client
-ConnectorWorker.Command_null=Command is null.
-ConnectorWorker.Unable_to_open_connector_execution=Unable to open connector execution
-ConnectorWorker.ConnectorWorker_expecting_an_Execution_of_type_SynchExecution,_got=ConnectorWorker expecting an Execution of type SynchExecution, got {0}
-ConnectorWorker.Error_communicating_results_to_client=Error communicating results to client: {0}
-ConnectorWorker.transactionNotSupported=Transaction is not supported by the connector.
-ConnectorWorker.canNotRollBack=Faild to roll back transaction for "{0}".
-ConnectorWorker.MaxResultRowsExceed=The number of result rows has exceeded the maximum result rows "{0}"
-ConnectorWorker.invalidAtomicType=Invalid atomic request message type: {0}.
-ConnectorWorker.zero_size_non_last_batch=Connector returned a 0 row non-last batch: {0}.
-ConnectorWorker.requestID_does_not_exist=RequestID {0} does not exist or has been canceled. The request will not be processed.
-ConnectorWorker.could_not_retrieve_execution=Could not retrieve the execution for atomic requestID {0}. The request may have been canceled.
-ConnectorWorker.process_failed=Connector worker process failed for atomic-request={0}
-ConnectorWorker.ConnectorWorker_result_set_unexpected_columns=Could not process stored procedure results for {0}. Expected {1} result set columns, but was {2}. Please update your models to allow for stored procedure results batching.
-ConnectorWorker.error_occurred=Error occurred on connector {0} - {1}
-
-ConnectorRequestState.invalidConnectionType=Connection must be of type XAConnection.
-ConnectorRequestState.invalidConnectorType=Connector must be of type XAConnector.
-
-ConnectorStateManager.Unable_to_create_connection_for_request=Unable to create a connection for request {0}
-ConnectorStateManager.Can__t_create_request_state_with_null_RequestMessage=Can not create request state with null RequestMessage.
-ConnectorStateManager.The_request_has_been_cancelled.=The request {0} has been canceled.
-ConnectorStateManager.The_request_has_been_closed.=The request {0} has been closed.
-DataTierManager.Could_not_register_the_request_for_{0}_as_request_has_been_removed_from_QueryService.=Could not register the request for {0} as request has been removed from QueryService.
-DataTierManager.Could_not_deliver_response_for_{0}_as_request_has_been_removed_from_QueryService.=Could not deliver response for {0} as request has been removed from QueryService.
-DataTierManager.Could_not_deliver_partial_results_for_{0}_as_the_atomic_query_request_could_not_be_obtained_for_nodeID_{1}=Could not deliver partial results for {0} as the atomic query request could not be obtained for nodeID {1}
-DataTierManager.Unable_to_load_code_table_for_requestID_{0}_of_and_nodeID_of_{1}_because_result_sizes_exceeds_the_allowed_parameter_-_MaxCodeTableRecords.=Unable to load code table for requestID {0} of and nodeID of {1} because result sizes exceeds the allowed parameter - MaxCodeTableRecords.
-DataTierManager.Failed_to_register_request.=Failed to register request.
-DataTierManager.could_not_obtain_connector_id=Could not obtain a connection factory ID or a connector ID from the atomic request.
-DataTierManager.Could_not_deliver_response_for_{0}_as_a_matching_atomic_request_could_not_be_found.=Could not deliver response for {0} as a matching atomic request could not be found.
-DataTierManager.Could_not_deliver_response_for_{0}_as_the_QueryProcessor_could_not_be_obtained.=Could not deliver response for {0} as the QueryProcessor could not be obtained.
-DataTierManager.Unable_to_load_code_table_because_code_table_entries_exceeds_the_allowed_parameter_-_MaxCodeTables.=Unable to load code table because code table entries exceeds the allowed parameter - MaxCodeTables.
-DataTierManager.Unable_to_get_metadata.=Unable to get metadata.
-DataTierManager.cannot_register_request=Could not register a request on connector "{0}" with connector ID "{1}". Please ensure that the connector is running. Cause: {2}
-DataTierManager.Unable_to_resolve_query.=Unable to resolve query.
-DataTierManager.Unable_to_add_txn_result_for_request_{0}=Unable to add txn result for request {0}.
-DataTierManager.could_not_obtain_connector_binding=Could not obtain connection factory for model {0} in VDB name= {1}, version {2}
-DataTierManager.Error_lob=Error during fetching the chunks of data for lob with value id {0}
-
-DQPBufferService.Error_initializing_buffer_manager__missing_required_property_7=Error initializing buffer manager: missing required property {0}
-DQPBufferService.Failed_initializing_buffer_manager._8=Failed initializing buffer manager.
-
-DQPCore.Exception_trying_to_determine_processor_timeslice_from_{0}=Exception trying to determine processor timeslice from {0}
-DQPCore.Unable_to_retrieve_metadata=Unable to retrieve metadata
-DQPCore.Unable_to_parse_command=Unable to parse command: {0}
-DQPCore.Unable_to_load_metadata_for_VDB_name__{0},_version__{1}=Unable to load metadata for VDB name= {0}, version= {1}
-DQPCore.Unable_to_resolve_command.=Unable to resolve command.
-DQPCore.Unable_to_rewrite_command.=Unable to rewrite command.
-DQPCore.Unknown_query_metadata_exception_while_registering_query__{0}.=Unknown query metadata exception while registering query: {0}.
-DQPCore.Exception_trying_to_determine_min_fetch_size.=Exception trying to determine min fetch size.
-DQPCore.Exception_trying_to_determine_max_fetch_size.=Exception trying to determine max fetch size.
-DQPCore.Exception_trying_to_determine_maximum_number_of_code_tables.=Exception trying to determine maximum number of code tables.
-DQPCore.Exception_trying_to_determine_maximum_record_size_of_a_code_table.=Exception trying to determine maximum record size of a code table.
-DQPCore.wrong_number_of_values=The number of bound values ''{0}'' does not match the number of parameters ''{1}'' in the prepared statement.
-DQPCore.Error_executing_conversion_function_to_convert_value.=Error converting parameter number {0} with value "{1}" to expected type {2}.
-DQPCore.Can__t_communicate_error_to_client=Cannot communicate error to client.
-DQPCore.Clearing_prepared_plan_cache=Clearing prepared plan cache
-DQPCore.Clearing_code_table_cache=Clearing code table cache
-DQPCore.Unable_to_check_license_for_update_capability._Updates_will_not_be_allowed_3=Unable to check license for update capability. Updates will not be allowed
-DQPCore.The_request_has_been_closed.=The request {0} has been closed.
-DQPCore.The_atomic_request_has_been_cancelled=The atomic request {0} has been canceled.
-DQPCore.The_atomic_request_cancelled_not_closed=The atomic request {0}.{1} has been canceled, but closed yet.
-DQPCore.The_atomic_request_closed_queued=The atomic request {0} has queued to close, another request in progress.
-DQPCore.failed_to_cancel=Failed to Cancel request, as request already finished processing
-
-DQPComponent.DQPComponent.receive__Unable_to_deliver_message_to_client_[{0}].=DQPComponent.receive: Unable to deliver message to client [{0}].
-DQPComponent.DQPComponent.receive__Unable_to_deliver_message_to_client_[{0}]._Original_exception_was__{1}=DQPComponent.receive: Unable to deliver message to client [{0}]. Original exception was: {1}
-DQPComponent.DQPComponent.processInternal__Received_exception_processing_request=Received exception processing request:
-
-IndexMetadataService.VDB_Service_is_not_available._1=VDB Service is not available.
-QueryMetadataCache.Failed_creating_Runtime_Index_Selector._4=Failed creating Runtime Index Selector for {0}.
-IndexMetadataService.Invalid_System_VDB_URL=System VDB URL is not valid: {0}.
-
-LanguageBridgeFactory.Unable_to_set_the_metadata_ID_for_element_{0}._10=Unable to set the metadata ID for element {0}.
-LanguageBridgeFactory.Unable_to_set_the_metadata_ID_for_group_{0}._11=Unable to set the metadata ID for group {0}.
-LanguageBridgeFactory.cant_translate_union=Unable to translate union where first branch is a union
-
-ProcessWorker.request_was_null=request was null
-ProcessWorker.Could_not_deliver_response_as_request_has_been_removed.=Could not deliver response as request has been removed.
-ProcessWorker.Failed_getting_first_batch_for_{0}.=Failed getting first batch for {0}.
-ProcessWorker.send_error=Sending error from process worker for request {0}.
-ProcessWorker.Failed_to_deliver_response_for_{0}=Failed to deliver response for {0}. Client connection may have been closed.
-ProcessWorker.ProcessWorker.Failed_starting_processing._1=ProcessWorker.Failed_starting_processing.
-ProcessWorker.failed_rollback=Failed to properly rollback autowrap transaction properly
-ProcessWorker.error=Unexpected exception for request {0}
-ProcessWorker.processing_error=Processing exception ''{0}'' for request {1}. Exception type {2} thrown from {3}. Enable more detailed logging to see the entire stacktrace.
-
-SharedCacheFinder.Didnt_find_caps=Unable to find capabilities for {0}
-
-MessageHandler.Transactions_not_allowed=Transactions are not allowed due non-availablity of the transaction service.
-# ==========================================
-# Error Messages for the dqp Package
-# ==========================================
-#
-# example ERR.022.001.0001=Test Error Message for dqp Package
-
-# application (000)
-ERR.022.000.0001=
-
-# interceptor (001)
-ERR.022.001.0001=
-
-# internal (002)
-ERR.022.002.0001=The configuration file for the embedded DQP could not be found.
-ERR.022.002.0002=Could not deliver response for {0} as request has been removed.
-ERR.022.002.0003=Failed getting first batch for {0}.
-
-# from server package of last release
-# #datatier (018.003)
-ERR.018.003.0001 = Unexpected processor shutdown. {0} {1}
-ERR.018.003.0002 = Retrieved Blob is too large, Blobs have a max size of {0} bytes.
-ERR.018.003.0003 = Retrieved Clob is too large, Clobs have a max size of {0} characters.
-ERR.018.003.0004 = There was an error translating results.
-ERR.018.003.0005 = There was an error translating results for data type {0}
-ERR.018.003.0006 = Data type {0} could not be converted to {1}
-ERR.018.003.0007 = No connector configuration properties are specified for this connector.
-ERR.018.003.0008 = Connector:initService: The maximum result rows connector configuration property is invalid. Its value is {0}
-ERR.018.003.0009 = Connector:initService: Data Connector max threads value not specified in properties: {0}
-ERR.018.003.0010 = Connector:initService: Data Connector thread TTL value not specified in properties: {0}
-ERR.018.003.0011 = Could not construct ConnectorProcessorPool.
-ERR.018.003.0012 = Connector:initService: The maximum processor idle time connector configuration property is invalid. Its value is {0}
-ERR.018.003.0013 = Connector:initService: The cleanup interval connector configuration property is invalid. Its value is {0}
-ERR.018.003.0014 = Connector:initService: The Connector Service {0} could not be started. A processor could not be obtained from the processor pool.
-ERR.018.003.0015 = Connector:initService: The maximum threads connector configuration property is invalid. Its value is {0}
-ERR.018.003.0016 = Connector:initService: The thread TTL connector configuration property is invalid. Its value is {0}
-ERR.018.003.0017 = Unable to instantiate the VirtualDatabaseLoader class using the "{0}" loader class.
-ERR.018.003.0018 = Caching cannot be enabled for connectors that support cursor batching.
-ERR.018.003.0019 = Error creating cache for {0} with factory: {1}
-ERR.018.003.0020 = Failed to decrypt the database connection password.
-ERR.018.003.0021 = ConnectorWorker cannot process object of type other than AtomicQueryRequest.
-ERR.018.003.0022 = {0} {1} Unable to import transaction: {2}
-ERR.018.003.0023 = Unable to import transaction: {0}
-ERR.018.003.0024 = {0} {1} Unable to suspend transaction: {2}
-ERR.018.003.0025 = Unable to suspend transaction: {0}
-ERR.018.003.0026 = {0} {1} Unable to resume transaction: {2}
-ERR.018.003.0027 = Unable to resume transaction: {0}
-ERR.018.003.0028 = Could not get processor {0} for request: {1}
-ERR.018.003.0029 = Processor pool not set.
-ERR.018.003.0030 = connectorID cannot be null.
-ERR.018.003.0031 = serviceID cannot be null.
-ERR.018.003.0032 = ConnectorProcessor:init(): No configuration properties are specified for this processor.
-ERR.018.003.0033 = ConnectorProcessor:init():Connector translator class name not specified {0}
-ERR.018.003.0034 = ConnectorProcessor:init(): Connection class name not specified {0}
-ERR.018.003.0035 = ConnectorProcessor:init():The cache stats log Interval property was not defined correctly. It could not be parsed into an integer. Its value: {0}
-ERR.018.003.0036 = ConnectorProcessor:init():The Translator class name specified is not valid or was not found in the classpath. Class Name: {0}
-ERR.018.003.0037 = ConnectorProcessor:init():The Connection class name specified is not valid or was not found in the classpath. Class Name: {0}
-ERR.018.003.0038 = Unable to find class ''{0}'' - unexpected error message: {1}
-ERR.018.003.0039 = {0} {1} Could not deliver response.
-ERR.018.003.0040 = ConnectorProcessorPool:create:A ConnectorProcessor could not be created. An id could not be obtained from the DBIDGenerator for a new processor.
-ERR.018.003.0041 = No connector service properties specified.
-ERR.018.003.0042 = No connector processor class specified in properties.
-ERR.018.003.0043 = Could not init Connector processor: {0}
-ERR.018.003.0044 = {0} Heartbeat thread write error: {1}
-ERR.018.003.0045 = Connector connection returned EOF.
-ERR.018.003.0046 = Connector connection to the server lost.
-ERR.018.003.0047 = Unexpected exception in connector read worker while reading results.
-ERR.018.003.0048 = Connector read worker produced null results key for results: {0}
-ERR.018.003.0049 = Parameter cannot be null.
-ERR.018.003.0050 = Cannot add records after result set is closed.
-ERR.018.003.0051 = Error reading results from the connector : {0}. Exceeded maximum rows allowed to be read: {1}
-ERR.018.003.0052 = Unable to {0} transaction: {1}
-ERR.018.003.0053 = {0} {1} Unable to {2} transaction: {3}
-ERR.018.003.0054 = {0} {1} Unable to close XA connection.
-ERR.018.003.0055 = {0} {1} Error occurred while collecting results.
-ERR.018.003.0056 = {0} {1} Unable to rollback transaction: {2}
-ERR.018.003.0057 = {0} {1} Error in cleaning up tuple source storage after error.
-ERR.018.003.0058 = {0} {1} Could not obtain current configuration information, while trying to obtain connection factory name.
-ERR.018.003.0059 = {0} Unable to rollback transaction: {1}
-ERR.018.003.0060 = Unable to start subtxn.
-ERR.018.003.0061 = {0} Unable to start subtxn.
-ERR.018.003.0062 = {0} Error translating results for request id: {1}
-ERR.018.003.0063 = The class type: {0} is not a valid class name for a metadata element.
-ERR.018.003.0064 = The VirtualDatabaseMetadata reference is null for this BasicMetadataFacade.
-ERR.018.003.0065 = Unable to obtain Element for id: {0}
-ERR.018.003.0066 = Unable to obtain Group for id: {0}
-ERR.018.003.0067 = No Element id was found for name in source ''{0}'' in the Query: {1}
-ERR.018.003.0068 = Could not register request for {0}. No connectors exist for this database.
-ERR.018.003.0069 = RMI Error with ConnectorServiceProxy communication with service.
-ERR.018.003.0070 = Invalid service state while obtaining connectorID.
-ERR.018.003.0071 = Could not create SingeSourceRouter for {0}
-ERR.018.003.0072 = No single source router found for connectorBindingID = {0}
-ERR.018.003.0073 = Could not register request with connector as the connectors request queue is suspended.
-ERR.018.003.0074 = Connector service is not in valid state.
-ERR.018.003.0075 = Communication error between DataRouter and Connector service.
-ERR.018.003.0076 = Could not find Connector: {0} in registry.
-ERR.018.003.0077 = Error trying to get the SAPMetadataLoader. Sessiontoken should be a trusted token from which credential info is obtained.
-ERR.018.003.0078 = Error trying to get the connector proxy for the model: {0}
-ERR.018.003.0079 = Attempts to parse String: ''{0}'' to a java.util.Date failed for the following reasons:
-ERR.018.003.0080 = There were no format Strings found in this formatter object.
-ERR.018.003.0081 = Parse Attempt #{0} using format: ''{1}'' failed for the following reason: {2}
-ERR.018.003.0082 = Failed to convert String: ''{0}'' to a Date using one of the following format Strings that are specified in the properties for this Connector: {1}
-ERR.018.003.0083 = Could not get connectorID for {0}. No connectors available to handle request.
-ERR.018.003.0084 = Unknown transaction isolation level: {0}.
-
-# #query (018.005)
-ERR.018.005.0001 = Invalid Type. Allowed values are NEW, UPDATE, CANCEL.
-ERR.018.005.0002 = Could not deliver exception response, originating exception preceeds.
-ERR.018.005.0003 = Could not register the request for {0} as request has been removed from QueryService.
-ERR.018.005.0004 = Could not deliver response for {0} as request has been removed from QueryService.
-ERR.018.005.0005 = Could not deliver response for {0} as the QueryProcessor could not be obtained.
-ERR.018.005.0006 = Could not deliver partial results for {0} as the atomic query request could not be obtained for nodeID {1}
-ERR.018.005.0007 = Could not deliver response for {0} as a matching atomic request could not be found.
-ERR.018.005.0008 = Could not obtain current configuration information, while trying to obtain connection factory name.
-ERR.018.005.0009 = Request {0} does not have a response receiver.
-ERR.018.005.0010 = Message for {0} could not be deliver.
-ERR.018.005.0011 = Unable to listen for extension source cache reload events.
-ERR.018.005.0012 = Unable to invoke user defined function in: {0}
-ERR.018.005.0013 = Failed to load class from ExtensionSourceManager: {0}
-ERR.018.005.0014 = Unexpected exception while processing XML data for user functions: {0}
-ERR.018.005.0015 = Failed getting first batch for {0}
-ERR.018.005.0016 = Failed to deliver response for {0}
-ERR.018.005.0017 = null QueryServiceInterface implmentation.
-ERR.018.005.0018 = Cannot deliver null response.
-ERR.018.005.0019 = Message or requestID cannot be null.
-ERR.018.005.0020 = Exception trying to determine processor timeslice from {0}
-ERR.018.005.0021 = Detected invalid user defined functions.
-ERR.018.005.0022 = Invalid function ''{0}'': {1}
-ERR.018.005.0023 = Exception trying to register metadata source.
-ERR.018.005.0024 = Exception trying to determine min fetch size.
-ERR.018.005.0025 = Exception trying to determine max fetch size.
-ERR.018.005.0026 = Transactions not allowed due to license restriction.
-ERR.018.005.0027 = Updates not allowed due to license restriction.
-ERR.018.005.0028 = Unable to set transaction timeout.
-ERR.018.005.0029 = Unable to create transaction for query {0}
-ERR.018.005.0030 = Unable to resume transaction.
-ERR.018.005.0031 = Unknown query metadata exception while register query
-ERR.018.005.0032 = Transaction is needed for this query, {0}, but none is started.
-ERR.018.005.0033 = Unable to export transaction for query {0}
-ERR.018.005.0034 = Unable to suspend transaction for query {0}
-ERR.018.005.0035 = RuntimeException caught while submitting query: {0}
-ERR.018.005.0036 = The number of the values does not match that of the parameters in the prepared statement.
-ERR.018.005.0037 = The type of the value does not match that of parameter {0}
-ERR.018.005.0038 = Error executing conversion function to convert value.
-ERR.018.005.0039 = Problem getting cursor batch for {0}
-ERR.018.005.0040 = The request {0} has been canceled by the administrator.
-ERR.018.005.0041 = The request {0} has been canceled.
-ERR.018.005.0042 = Failed to deliver cancellation error response for {0} as it does not have a response receiver.
-ERR.018.005.0043 = Error loading configuration while trying to load metadata for system queries.
-ERR.018.005.0044 = Error trying to access metadata for loading metadata for elements/keys of the group :{0}
-ERR.018.005.0045 = Error evaluating references while loading metadata for elements/keys of the group :{0}
-ERR.018.005.0046 = Failed checking whether the query requires a transaction.
-ERR.018.005.0047 = Unable to locate required QueryService instance: {0}
-ERR.018.005.0048 = Could not create a UserTransaction. No QueryServices available.
-ERR.018.005.0049 = RMI error with QueryServiceProxy communications with service.
-ERR.018.005.0050 = Error: Could not create a UserTransaction in Query Service, service is not initialized.
-ERR.018.005.0051 = Error: Could not create a UserTransaction in Query Service, service is closed.
-ERR.018.005.0052 = QueryServiceProxy could not create UserTransaction - No services were available (Dead: {0}, suspended: {1})
-ERR.018.005.0053 = Could not register query: {0}. No QueryServices available.
-ERR.018.005.0054 = Error: Could not register request with Query Service, service is not initialized.
-ERR.018.005.0055 = Error: Could not register request with Query Service, service is closed.
-ERR.018.005.0056 = QueryServiceProxy could not register query: {0} - No services were available (Dead: {1}, suspended: {2})
-ERR.018.005.0057 = Could not get cursor batch: {0}. No QueryServices available.
-ERR.018.005.0058 = Error: Could not get cursor batch from Query Service, service is not initialized.
-ERR.018.005.0059 = Error: Could not get cursor batch from Query Service, service is closed.
-ERR.018.005.0060 = QueryServiceProxy could not get cursor batch: {0} - No services were available (Dead: {1}, suspended: {2})
-ERR.018.005.0061 = Could not cancel query: {0}. No QueryServices available.
-ERR.018.005.0062 = Error: Could not cancel query with Query Service, service is not initialized.
-ERR.018.005.0063 = Error: Could not cancel query with Query Service, service is closed.
-ERR.018.005.0064 = QueryServiceProxy could not cancel query: {0} - No services were available to find request.
-ERR.018.005.0065 = Could not cancel queries for: {0}. No QueryServices available.
-ERR.018.005.0066 = Error: Could not cancel queries with Query Service, service is not initialized.
-ERR.018.005.0067 = Error: Could not cancel queries with Query Service, service is closed.
-ERR.018.005.0068 = Error: Could not get all queries from Query Service, service is not initialized.
-ERR.018.005.0069 = Error: Could not get all queries from Query Service, service is closed.
-ERR.018.005.0070 = Error: Could not get queries for session from Query Service, service is not initialized.
-ERR.018.005.0071 = Error: Could not get queries for session from Query Service, service is closed.
-ERR.018.005.0072 = Could not clear cache for: {0}. No QueryServices available.
-ERR.018.005.0073 = Error: Could not clear cache in Query Service, service is not initialized.
-ERR.018.005.0074 = Error: Could not clear cache in Query Service, service is closed.
-ERR.018.005.0075 = Could not forget transaction. No QueryServices available.
-ERR.018.005.0076 = Error: Could not forget transaction, service is not initialized.
-ERR.018.005.0077 = Error: Could not forget transaction, service is closed.
-ERR.018.005.0078 = Error: Could not recover transaction, service is not initialized.
-ERR.018.005.0079 = Error: Could not recover transaction, service is closed.
-ERR.018.005.0080 = Error: Could not rollback transaction, service is not initialized.
-ERR.018.005.0081 = Error: Could not rollback transaction, service is closed.
-ERR.018.005.0082 = Error: Could not start transaction, service is not initialized.
-ERR.018.005.0083 = Error: Could not start transaction, service is closed.
-ERR.018.005.0084 = Could not check if the query requires a transaction. No QueryServices are available.
-ERR.018.005.0085 = Error: Could not check if the query requires a transaction in Query Service, service is not initialized.
-ERR.018.005.0086 = Error: Could not check if the query requires a transaction in Query Service, service is closed.
-ERR.018.005.0087 = QueryServiceProxy could not check if the query requires a transaction - No services were available (Dead: {0}, suspended: {1})
-ERR.018.005.0088 = Group does not exist: {0}
-ERR.018.005.0089 = INSERT, UPDATE, and DELETE are not allowed on subscriptions.
-ERR.018.005.0090 = Subscription cannot contain work on multiple groups: {0}
-ERR.018.005.0091 = "The following data elements are not marked as subscribable and cannot be used in a subscription: {0}
-ERR.018.005.0092 = The session for user <{0}> is invalid.
-ERR.018.005.0093 = An error occured in the Authorization service.
-ERR.018.005.0094 = Unable to find Authorization service.
-ERR.018.005.0095 = User <{0}> is not entitled to action <{1}> for 1 or more of the groups/elements/procedures.
-ERR.018.005.0096 = There was an error in the response.
-ERR.018.005.0097 = Exception trying to determine maximum number of code tables.
-ERR.018.005.0098 = Exception trying to determine maximum record size of a code table.
-ERR.018.005.0100 = Unable to load code table for because result sizes exceeds the allowed parameter - {0}.
-
-# services (003)
-ERR.022.003.0001=
-CodeTableCache.No_code_table=Failed to find code table {0} with key={1} and value={2}
-CodeTableCache.Cleared_code_tables=Cleared {0} cached code tables containing {1} records
-Request.Updates_not_allowed_due_to_license_restriction._1=Updates not allowed due to license restriction.
-Request.txn.err.resume=Unable to resume transaction for request "{0}".
-Request.txn.err.export=Unable to export transaction for request "{0}".
-Request.xml_restricted=Executing XML or XQuery commands is not allowed due to license restriction.
-Request.txn.err.suspend=Unable to suspend transaction for request "{0}".
-Request.txn.info.resume=Resumed transaction "{0}".
-Request.txn.info.export=Exported transaction "{0}".
-Request.txn.info.suspend=Suspended transaction "{0}".
-Request.transaction_not_supported=Autowrap transaction required, but transaction support is disabled
-Request.potentially_unsafe=The request is modifying more than 1 model without any containing transaction (autoCommitTxn = OFF). This is potentially unsafe as the updates cannot be rolled back as a single unit.
-Request.no_result_set=Statement does not return a result set.
-Request.result_set=Statement returns a result set, not an update count.
-Request.wsdl_user_not_authorized=The anonymous user is not authorized for this action.
-
-ParameterImpl.Invalid_direction=Invalid parameter direction: {0}
-DQPCORE.6=Unable to create ResulSet cache.
-ResultSetCache.1=Result batches are not contiguous in cache.
-DQPLauncher.InstallService_ServiceIsNull=Service "{0}" is null. Can not install it in DQP.
-DQPLauncher.InstallService_ServiceInstalled=Service "{0}" is installed in DQP.
-DQPLauncher.LicenseFailed=License file not found or failed to load in DQP.
-Request.MetadataServiceIsNull=Can not get metadata service.
-ResultBatch.invalid_paramtype=Invalid parameter type: {0}
-Request.Cant_query_staging_table=XML staging table {0} cannot be queried directly.
-DQPCore.Processor_debug_allowed_{0}=Processor debug allowed: {0}
-Request.Invalid_character_in_query=Bind variables (represented as "?") were found but are allowed only in prepared or callable statements.
-RequestManager.Invalid_starting_position=The starting position of the document chunk, {0}, is not valid.
-
-RequestContext.invalid_context=Invalid portable context string. Unable to reinstantiate a request context from the string :{0}
-RequestContext.null_context=The portable request context should not be null.
-Request.virtual_restricted=Executing commands with virtual groups or virtual procedures is not allowed due to license restriction.
-ResultBatch.no_rows=The row count for this batch is 0 and it contains no values.
-ResultBatch.invalid_row=Invalid row {0}: begin row <= row value <= end row.
-ResultBatch.invalid_column=Invalid column {0}: 1 <= column <= column count
-ResultBatch.null_result=Unexpected null result from the server when requesting a LOB chunk.
-ResultBatch.no_params=This result batch contains no parameters.
-ResultBatch.invalid_paramindex=Invalid parameter index {0}: 1 <= parameter index <= parameter count.
-ResultBatch.not_update=This result batch does not represent an update result.
-ResultBatch.exception_exists=The update count is invalid: this result contains an exception.
-ResultBatch.update_count_unavailable=Unable to retrieve an update count from this batch.
-ServerConnectionInfo.invalid_context=Invalid portable context string. Unable to reinstantiate a ServerConnectionInfo from the string :{0}
-ServerConnectionInfo.invalid_url=The url "{0}" is invalid and could not be parsed. The url should be of the form mm[s]://host[,host2,host3...]:port[,port2,port3...]
-ServerSessionContext.invalid_context=Invalid portable context string. Unable to reinstantiate a server session context from the string :{0}
-ServerSessionContext.null_context=The portable session context should not be null.
-ServerConnectionInfo.invalid_encoding=Invalid encoded object within the portable string. Unable to reinstantiate an object from the encoded string :{0}
-ResultBatch.not_last_batch=This method can only be called on the last batch of results.
-ResultBatch.not_out_param=The parameter at index {0} must be of type RETURN, OUT, or INOUT
-CacheResults.Trying_to_cache_unexpected_results=Trying to cache unexpected results. Expected request ID "{0}"; Got request ID "{1}"
-QueryMetadataCache.cache_not_valid=The query metadata cache may have been cleared and is no longer valid, create a new cache.
-DQPCore.virtual_allowed=License allows virtual layer: {0}
-DQPCore.xml_allowed=License allows XML queries and XQuery: {0}
-CustomizableTrackingService.not_started=The custom tracking service has not been started, so command logging is inactive, and messages will be ignored.
-CustomizableTrackingService.unknown_message=Unknown custom tracking message type
-Request.failed_deliver_message=Error delivering results to client for request {0}
-LobStream.noreference=LOB can not be reached; reference is null for streaming.
-ProcessWorker.wrongdata=Wrong type of data found or no data found; expecting streamable object from the buffer manager.
-ProcessWorker.LobError=An error occurred during streaming of Lob Chunks to Client.
-Unable_to_read_data_from_stream=Unable to read data from the stream: {0}
-no_response_server=No response received from server.
-Request.query_plan_not_allowed=Query Plan not allowed in this context. Please remove the SHOWPLAN or PLANONLY option.
-
-TransactionServer.existing_transaction=Client thread already involved in a transaction. Transaction nesting is not supported. The current transaction must be completed first.
-TransactionServer.no_transaction=No transaction found for client {0}.
-TransactionServer.concurrent_transaction=Concurrent enlistment in global transaction {0} is not supported.
-TransactionServer.no_global_transaction=Expected an existing global transaction {0} but there was none for client {1}
-TransactionServer.unknown_flags=Unknown flags
-TransactionServer.no_global_transaction=No global transaction found for {0}.
-TransactionServer.wrong_transaction=Client is not currently enlisted in transaction {0}.
-TransactionServer.resume_failed=Cannot resume, transaction {0} was not suspended by client {1}.
-TransactionServer.existing_global_transaction=Global transaction {0} already exists.
-TransactionServer.suspended_exist=Suspended work still exists on transaction {0}.
-TransactionServer.failed_to_enlist=Failed to enlist the XAResource in Transaction.
-TransactionServer.failed_to_delist=Failed to delist the XAResource from Transaction.
-TransactionServer.rollback_set=Rollback Only has been set on transaction {0}. This may be result of a cancel request.
-TransactionContextImpl.remote_not_supported=Remote connector calls under a transaction are not supported
-
-CodeTableCache.duplicate_key=Duplicate code table ''{0}'' key ''{1}'' value ''{2}''
-connector_cache_closed=Connector cache has been already closed.
-ConnectorEnvironmentImpl.request_scope_error=CacheScope.REQUEST not support on this interface. Use methods on ExecutionContext for REQUEST scoped cache.
-ConnectorEnvironmentImpl.session_scope_error=Session information is not available; SESSION scoped cache can not be accessed.
-ConnectorEnvironmentImpl.vdb_scope_error=VDB information is not available; VDB scoped cache can not be accessed.
-
-BufferManagerLobChunkStream.no_tuple_source=Lob chunk is not found in the Buffer Manager with tuple id {0}
-BufferManagerLobChunkStream.error_processing=Error occurred during the fetching of the lob chunk from buffer manager with tuple id {0}
-
-TransformationMetadata.does_not_exist._1=does not exist.
-TransformationMetadata.0={0} ambiguous, more than one entity matching the same name
-TransformationMetadata.Group(0}_does_not_have_elements=Group ''{0}'' does not have any elements.
-TransformationMetadata.Error_trying_to_read_virtual_document_{0},_with_body__n{1}_1=Error trying to read virtual document {0}, with body \n{1}
-TransformationMetadata.Unknown_support_constant___12=Unknown support constant:
-TransformationMetadata.error_intialize_selector=Error trying to initialize the index selector.
-TransformationMetadata.Error_trying_to_obtain_index_file_using_IndexSelector_1=Error trying to obtain index file using IndexSelector {0}
-TransformationMetadata.Model_name_ambiguous,more_than_one_model_exist_with_the_name__2=Model name ambiguous, more than one model exists with the name
-TransformationMetadata.The_metadataID_passed_does_not_match_a_index_record._1=The metadataID passed does not match an index record
-TransformationMetadata.Expected_id_of_the_type_key_record_as_the_argument_2=Expected ID of the type key record as the argument
-TransformationMetadata.Expected_id_of_the_type_accesspattern_record_as_the_argument_3=Expected ID of the type accesspattern record as the argument
-TransformationMetadata.No_known_index_file_type_associated_with_the_recordType_1=No known index file type associated with the recordType
-TransformationMetadata.GroupID_ambiguous_there_are_multiple_virtual_plans_available_for_this_groupID__1=GroupID ambiguous, there are multiple virtual plans available for this groupID
-TransformationMetadata.GroupID_ambiguous_there_are_multiple_insert_plans_available_for_this_groupID__2=GroupID ambiguous, there are multiple insert plans available for this groupID
-TransformationMetadata.GroupID_ambiguous_there_are_multiple_update_plans_available_for_this_groupID__3=GroupID ambiguous, there are multiple update plans available for this groupID
-TransformationMetadata.GroupID_ambiguous_there_are_multiple_delete_plans_available_for_this_groupID__4=GroupID ambiguous, there are multiple delete plans available for this groupID
-TransformationMetadata.Failed_to_create_index_files_for_non-indexed_model_resources__1=Failed to create index files for non-indexed model resources :
-TransformationMetadata.Procedure_ambiguous_there_are_multiple_procedure_plans_available_for_this_name___4=Procedure ambiguous, there are multiple procedure plans available for this name:
-TransformationMetadata.Could_not_find_query_plan_for_the_group__5=Could not find query plan for the group
-TransformationMetadata.QueryPlan_could_not_be_found_for_physical_group__6=QueryPlan could not be found for physical group
-TransformationMetadata.InsertPlan_could_not_be_found_for_physical_group__8=InsertPlan could not be found for physical group
-TransformationMetadata.InsertPlan_could_not_be_found_for_physical_group__10=InsertPlan could not be found for physical group
-TransformationMetadata.DeletePlan_could_not_be_found_for_physical_group__12=DeletePlan could not be found for physical group
-TransformationMetadata.Could_not_find_transformation_record_for_the_group__1=Could not find transformation record for the group
-TransformationMetadata.Error_trying_to_read_schemas_for_the_document/table____1=Error trying to read schemas for the document/table :
-TransformationMetadata.Multiple_transformation_records_found_for_the_group___1=Multiple transformation records found for the group:
-TransformationMetadata.Multiple_annotation_records_found_for_the_entity_{0}_1=Multiple annotation records found for the entity {0}
-TransformationMetadata.No_metadata_info_available_for_the_index_with_UUID_{0}._1=No metadata info available for the index with UUID {0}.
-TransformationMetadata.Ambiguous_index_with_UUID_{0},_found_multiple_indexes_with_the_given_UUID._2=Ambiguous index with UUID {0}, found multiple indexes with the given UUID.
-TransformationMetadata.Invalid_type=Invalid type: {0}.
-TransformationMetadata.Unable_to_determine_fullname_for_element__1=Unable to determine fullname for element
-TransformationMetadata.does_not_exist._1=does not exist.
-TransformationMetadata.0={0} ambiguous, more than one entity matching the same name
-TransformationMetadata.Group(0}_does_not_have_elements=Group ''{0}'' does not have any elements.
-TransformationMetadata.Error_trying_to_read_virtual_document_{0},_with_body__n{1}_1=Error trying to read virtual document {0}, with body \n{1}
-TransformationMetadata.Unknown_support_constant___12=Unknown support constant:
-TransformationMetadata.error_intialize_selector=Error trying to initialize the index selector.
-TransformationMetadata.Error_trying_to_obtain_index_file_using_IndexSelector_1=Error trying to obtain index file using IndexSelector {0}
-TransformationMetadata.Model_name_ambiguous,more_than_one_model_exist_with_the_name__2=Model name ambiguous, more than one model exists with the name
-TransformationMetadata.The_metadataID_passed_does_not_match_a_index_record._1=The metadataID passed does not match an index record
-TransformationMetadata.Expected_id_of_the_type_key_record_as_the_argument_2=Expected ID of the type key record as the argument
-TransformationMetadata.Expected_id_of_the_type_accesspattern_record_as_the_argument_3=Expected ID of the type accesspattern record as the argument
-TransformationMetadata.No_known_index_file_type_associated_with_the_recordType_1=No known index file type associated with the recordType
-TransformationMetadata.GroupID_ambiguous_there_are_multiple_virtual_plans_available_for_this_groupID__1=GroupID ambiguous, there are multiple virtual plans available for this groupID
-TransformationMetadata.GroupID_ambiguous_there_are_multiple_insert_plans_available_for_this_groupID__2=GroupID ambiguous, there are multiple insert plans available for this groupID
-TransformationMetadata.GroupID_ambiguous_there_are_multiple_update_plans_available_for_this_groupID__3=GroupID ambiguous, there are multiple update plans available for this groupID
-TransformationMetadata.GroupID_ambiguous_there_are_multiple_delete_plans_available_for_this_groupID__4=GroupID ambiguous, there are multiple delete plans available for this groupID
-TransformationMetadata.Failed_to_create_index_files_for_non-indexed_model_resources__1=Failed to create index files for non-indexed model resources :
-TransformationMetadata.Procedure_ambiguous_there_are_multiple_procedure_plans_available_for_this_name___4=Procedure ambiguous, there are multiple procedure plans available for this name:
-TransformationMetadata.Could_not_find_query_plan_for_the_group__5=Could not find query plan for the group
-TransformationMetadata.QueryPlan_could_not_be_found_for_physical_group__6=QueryPlan could not be found for physical group
-TransformationMetadata.InsertPlan_could_not_be_found_for_physical_group__8=InsertPlan could not be found for physical group
-TransformationMetadata.InsertPlan_could_not_be_found_for_physical_group__10=InsertPlan could not be found for physical group
-TransformationMetadata.DeletePlan_could_not_be_found_for_physical_group__12=DeletePlan could not be found for physical group
-TransformationMetadata.Could_not_find_transformation_record_for_the_group__1=Could not find transformation record for the group
-TransformationMetadata.Error_trying_to_read_schemas_for_the_document/table____1=Error trying to read schemas for the document/table :
-TransformationMetadata.Multiple_transformation_records_found_for_the_group___1=Multiple transformation records found for the group:
-TransformationMetadata.Multiple_annotation_records_found_for_the_entity_{0}_1=Multiple annotation records found for the entity {0}
-TransformationMetadata.No_metadata_info_available_for_the_index_with_UUID_{0}._1=No metadata info available for the index with UUID {0}.
-TransformationMetadata.Ambiguous_index_with_UUID_{0},_found_multiple_indexes_with_the_given_UUID._2=Ambiguous index with UUID {0}, found multiple indexes with the given UUID.
-TransformationMetadata.Invalid_type=Invalid type: {0}.
-TransformationMetadata.Unable_to_determine_fullname_for_element__1=Unable to determine fullname for element
-
-CachedFinder.no_connector_found=No connector with jndi-name {0} found for Model {1} with source name {2}
-failed_to_get_connection= Failed to get connection for translator {0}
-failed_to_close_connection=Failed to close the connection for translator {0}
-translator_not_found=Translator {0} not accessible.
-datasource_not_found=Data Source {0} not accessible.
-failed_to_bind_translator=Failed to bind the translator {0} on the jndi tree
-failed_to_unbind_translator=Failed to un-bind the translator {0} from the jndi tree.
-
-RequestWorkItem.cache_nondeterministic=Caching command '{0}'' at a session level, but less deterministic functions were evaluated.
-not_found_cache=Results not found in cache
-failed_to_put_in_cache=Failed to put results in the cache
\ No newline at end of file
Deleted: trunk/engine/src/main/resources/org/teiid/query/execution/i18n.properties
===================================================================
--- trunk/engine/src/main/resources/org/teiid/query/execution/i18n.properties 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/resources/org/teiid/query/execution/i18n.properties 2010-09-24 18:51:07 UTC (rev 2603)
@@ -1,232 +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.
-#
-
-# Error messages for query (015) project to address internationalization
-# Format:
-# ERR.015.001.0001=Doh! You blew it!
-#
-
-# optimizer (004)
-ERR.015.004.0002= Current program shouldn''t equal recursive program in recursive block: {0}
-ERR.015.004.0005= Unknown command type: {0}
-ERR.015.004.0006= Error finding max set size for model containing {0}
-ERR.015.004.0007= Can''t convert plan node of type {0}
-ERR.015.004.0008= Error determining if command is accessing staging table: {0}
-ERR.015.004.0009= Error finding connectorBindingID for command
-ERR.015.004.0010= Unknown group specified in OPTION MAKEDEP/MAKENOTDEP: {0}
-ERR.015.004.0011= Unknown type ({0}) for Node
-ERR.015.004.0012= Group has an access pattern which has not been met: group(s) {0}; access pattern(s) {1}
-ERR.015.004.0014= Could not find a valid join plan for this query.
-ERR.015.004.0015= The groups {0} and {1} have both an inner and outer join, which cannot be computed.
-ERR.015.004.0016= Unable to join between groups {0} and {1} as join contains both outer and inner joins.
-ERR.015.004.0017= Unexpected error evaluating no element criteria: {0}
-ERR.015.004.0019= Unknown criteria type: {0}
-ERR.015.004.0020= Error getting model for {0}
-ERR.015.004.0021= Error checking model''s abilities for {0}
-ERR.015.004.0023= Error rewriting criteria: {0}
-ERR.015.004.0024= Unable to create a query plan that sends a criteria to \"{0}\". This connection factory requires criteria set to true indicating that a query against this model requires criteria.
-ERR.015.004.0029= Could not resolve group symbol {0}
-ERR.015.004.0030= Could not parse query transformation {0}
-ERR.015.004.0033= Found two different contexts with {0}: {1} and {2}
-ERR.015.004.0034= Found two different criteria result sets for {0}: {1} and {2}
-ERR.015.004.0035= The criteria {0} has elements from the root staging table and the document nodes which is not allowed.
-ERR.015.004.0037= No mapping node found named, ''{0}', in use of ''context''
-ERR.015.004.0038= The criteria result set {0} is not in the scope of the context result set {1}
-ERR.015.004.0040= Couldn''t parse binding symbol {0}
-ERR.015.004.0041= Couldn''t resolve binding symbol {0}
-ERR.015.004.0042= The context argument, ''{0}'', is not in the scope of any mapping class of the XML document model.
-ERR.015.004.0043= Could not map symbols in ''context'' criteria: {0}
-ERR.015.004.0044= Could not combine criteria when processing context criteria: {0}
-ERR.015.004.0045= Could not find ancestor node with result set
-ERR.015.004.0046= The XML document element(s) {0} are not mapped to data and cannot be used in the criteria \"{1}\".
-ERR.015.004.0047= The criteria: ''{0}'' maps to more than one source result set.
-ERR.015.004.0048= The criteria: ''{0}'' maps to no source result set.
-ERR.015.004.0051= Could not bind references of staging table {0}: {1}
-ERR.015.004.0053= Could not resolve staging table criteria {0}: {1}
-ERR.015.004.0054= Could not parse query transformation for {0}: {1}
-ERR.015.004.0055= Planner cannot parse criteria string {0}
-ERR.015.004.0056= Planner cannot resolve criteria string {0}
-ERR.015.004.0057= Parent has more than 2 children
-ERR.015.004.0058= Unable to find a symbol with matching short name {0}
-ERR.015.004.0059= Node with no elements has no children
-ERR.015.004.0060= Failed to find a clause path to {0}
-ERR.015.004.0061= Found recursive node {0} without recursive root node.
-ERR.015.004.0063= No mapping node found in mapping document with result set name {0}
-ERR.015.004.0064= Metadata doesn''t have corresponding full name for element {0}
-ERR.015.004.0066= Cannot get fully resolved select elements.
-ERR.015.004.0067= The context mapping node argument cannot be null.
-ERR.015.004.0068= Context functions within the same conjunct refer to different contexts: {0}
-ERR.015.004.0070= Could not resolve correlated reference symbol during planning.
-ERR.015.004.0071= Error checking if group is physical or virtual: {0}
-
-# processor (006)
-ERR.015.006.0001= XMLPlan toString couldn''t print entire Program.
-ERR.015.006.0003= ProcedurePlan toString couldn''t print entire Program.
-ERR.015.006.0010= Unknown criteria type: {0}
-ERR.015.006.0011= Unable to evaluate {0} expression of {1}
-ERR.015.006.0012= Unknown compare criteria operator: {0}
-ERR.015.006.0014= Failed to create regular expression from match pattern: {0}. {1}
-ERR.015.006.0015= Unable to evaluate expression of {0}
-ERR.015.006.0016= Unknown expression type: {0}
-ERR.015.006.0017= Error trying to substitute the reference element :{0} with its value, unable to find the element in the variable context.
-ERR.015.006.0019= Error processing the AssignmentStatement in stored procedure language, expected to get a single row of data to be assigned to the variable {0} but got more.
-ERR.015.006.0020= Error trying to evaluate the criteria used on the IF statement.
-ERR.015.006.0021= Tuple Source not found for result set named {0}
-ERR.015.006.0022= Unable to remove tuple source for result set named {0}
-ERR.015.006.0023= Unexpected exception processing plan: {0}
-ERR.015.006.0024= Failed to evaluate expressions in atomic command
-ERR.015.006.0025= Unexpected error evaluating no element criteria: {0}
-ERR.015.006.0026= Error evaluating join expression while producing dependent join values
-ERR.015.006.0027= Unable to process this query without a criteria.
-ERR.015.006.0029= Exception finding temporary tuple source for subquery processor plan {0}
-ERR.015.006.0032= No input symbol was found for the output symbol: {0}
-ERR.015.006.0033= Unable to evaluate {0}: {1}
-ERR.015.006.0034= Unexpected symbol type while updating tuple: {0}
-ERR.015.006.0035= Failed attempting to project {0} from {1}
-ERR.015.006.0037= Tuple source does not exist: {0}
-ERR.015.006.0038= Unable to get schema from the tuple source
-ERR.015.006.0039= Instructed to abort processing when recursion limit reached.
-ERR.015.006.0040= Validation features of xerces parser are not recognized, please make sure the xerces parser supports validation ({0})
-ERR.015.006.0041= Validation features of xerces parser are not supported, please make sure the xerces parser supports validation ({0})
-ERR.015.006.0042= No xml schema to validate document against
-ERR.015.006.0046= Error while performing XSLT transformation on the XML results
-ERR.015.006.0047= Unexpected exception processing plan: {0}
-ERR.015.006.0048= Fatal Error: {0}
-ERR.015.006.0049= Error: {0}
-ERR.015.006.0050= Got invalid command type - expected processor plan {0}
-ERR.015.006.0051= Invalid direction for MoveDocInstruction: {0}
-ERR.015.006.0052= Got invalid command type - expected processor plan
-ERR.015.006.0054= Instructed to abort processing as default of choice.
-ERR.015.006.0056= The subquery of this compare criteria has to be scalar, but returned more than one value: {0}
-ERR.015.006.0057= Unknown subquery comparison predicate quantifier: {0}
-ERR.015.006.0058= The command of this scalar subquery returned more than one value: {0}
-ERR.015.006.0060= The query for the virtual document {0} produced more than one result document; each virtual document or virtual document query used by an XQuery may only return exactly one result document.
-ERR.015.006.0061= The query for the virtual document {0} produced zero result documents; each virtual document or virtual document query used by an XQuery must return exactly one result document.
-
-# rewriter (009)
-ERR.015.009.0001= Error evaluating criteria: {0}
-ERR.015.009.0002= Error translating criteria on the user''s command, the criteria translated to {0} is not valid
-ERR.015.009.0003= Error simplifying mathematical expression: {0}
-ERR.015.009.0004= Unable to {0} {1} of type [{2}] to the expected type [{3}].
-ERR.015.009.0005= Unexpected error evaluating {0}
-QueryRewriter.criteriaError= Error simplifying criteria: {0}
-QueryRewriter.infinite_while=Infinite loop detected, procedure will not be executed.
-
-BatchedUpdatePlanner.unrecognized_command=The batch contained an unrecognized command: {0}
-CacheFinder.Didnt_find_caps=Unable to find capabilities for {0}
-ProcedurePlanner.wrong_type=The ProcedurePlanner could not be used for planning commands of the type: {0}
-ProcedurePlanner.bad_stmt=Error while planning update procedure, unknown statement type encountered: {0}
-RuleBreakMultiJoin.Unable_find_join_plan=Unable to find join plan for join region
-RulePushSelectCriteria.Error_getting_modelID=Error getting modelID
-RelatePlanner.mixed_wrappers=Criteria conjunct uses a mixture of source and target wrappers, which is invalid: ''{0}''.
-RelatePlanner.misapplied_wrapper=Criteria conjunct is applied against the {0} entity fragment but uses the {1} function wrapper: ''{2}''.
-RelatePlanner.misapplied_relateSource=Function relateSource refers to a fragment in only the target entity: {0}
-RelatePlanner.misapplied_relateTarget=Function relateTarget refers to a fragment in only the source entity: {0}
-RelatePlanner.misapplied_ToMappingEntity=Function relateSource or relateTarget refers to a mapping entity fragment: {0}
-RelatePlanner.bad_mapping_rs_for_relate=When using the relate() function, the relationship mapping class {0} must include INPUT set criteria referring back to the entity mapping classes {1} and {2}
-XMLPlanner.no_uri=Cannot find namespace URI for namespace {0} of element {1}
-
-XMLPlanner.The_XML_document_element_{0}_is_not_mapped_to_data_and_cannot_be_used_in_the_ORDER_BY_clause__{1}_1=The XML document element {0} is not mapped to data and cannot be used in the ORDER BY clause: {1}
-XMLPlanner.The_rowlimit_parameter_{0}_is_not_in_the_scope_of_any_mapping_class=The ''rowlimit'' or ''rowlimitexception'' function parameter ''{0}'' is not an XML node within the scope of any mapping class.
-XMLPlanner.Criteria_{0}_contains_conflicting_row_limits=The criteria ''{0}'' contains conflicting row limits for an XML mapping class.
-BatchedUpdatePlan.cannot_connect_tuplesource=Unable to deliver results for nodeID {0}
-AccessNode.rewrite_failed=Failed to rewrite the command: {0}
-BatchedUpdateNode.unexpected_end_of_batch=Unexpectedly reached the end of the batched update counts at {0}, expected {1}.
-DependentAccessNode.Cannot_apply_required_criteria=Cannot apply required criteria to meet the access pattern because the number of values exceeds the "Set Criteria Max Size" property of model "{0}".
-DuplicateFilter.remoteException=Received RemoteException from BufferManager, but shouldn''t have: {0}
-AbstractProcessorEnvironment.No_ts_found=No tuple source {0} found during processing
-AbstractProcessorEnvironment.row_limit_passed=More then expected number rows found in resultset {1}. The limit is set at {0} rows.
-row_limit_passed=The row limit {0} has been exceeded for XML mapping class {1}.
-row_limit_low=The minimum row limit {0} has not been met for XML mapping class {1}.
-AddNodeInstruction.element__1=element
-AddNodeInstruction.attribute__2=attribute
-AddNodeInstruction.Unable_to_add_xml_{0}_{1},_namespace_{2},_namespace_declarations_{3}_3=Unable to add xml {0} {1}, namespace {2}, namespace declarations {3}
-MappingNodeConstants.XMLSchemaInstance_Prefix=xsi
-ProxyDataManager.Proxy_Data_Manager_connected_tuple_source_for_group_symbol_2=Proxy Data Manager connected tuple source for group symbol
-ProxyDataManager.Proxy_Data_Manager,_group_symbol_3=Proxy Data Manager, group symbol
-ProxyDataManager.is_not_temp_group_symbol_4=is not temp group symbol
-XMLPlan.Validation_feature=http://xml.org/sax/features/validation
-XMLPlan.Schema_validation_feature=http://apache.org/xml/features/validation/schema
-XMLPlan.Namespaces_features=http://xml.org/sax/features/namespaces
-XMLPlan.No_namespace_property=http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation
-XMLPlan.External_schema_location=http://apache.org/xml/properties/schema/external-schemaLocation
-QueryProcessor.request_cancelled=The request {0} has been cancelled.
-VariableSubstitutionVisitor.Error_lookup_default_value=Error trying to lookup the default value for the element
-VariableSubstitutionVisitor.Input_vars_should_have_same_changing_state=INPUT variables used in the expression should all have same CHANGING state: {0}
-SqlEval.Dynamic_sql_doesnt_return_xml=Dynamic sql does not return XML: {0}
-
-ExecDynamicSqlInstruction.0=Evaluated dynamic SQL expression value was null.
-ExecDynamicSqlInstruction.1=The actual model update count ''{0}'' is greater than the expected value of ''{1}''. This is potentially unsafe in OPTIMISTIC transaction mode. Please adjust the UPDATE clause of the dynamic SQL statement.
-ExecDynamicSqlInstruction.3=There is a recursive invocation of group ''{0}''. Please correct the SQL.
-ExecDynamicSqlInstruction.4=The dynamic sql string contains an incorrect number of elements.
-ExecDynamicSqlInstruction.5=No match found for expected symbol ''{0}'' in the dynamic SQL.
-ExecDynamicSqlInstruction.6=The datatype ''{0}'' for element ''{1}'' in the dynamic SQL cannot be implicitly converted to ''{2}''.
-ExecDynamicSqlInstruction.couldnt_execute=Couldn''t execute the dynamic SQL command "{0}" with the SQL statement "{1}" due to: {2}
-
-RulePlanJoins.cantSatisfy=Join region with unsatisfied access patterns cannot be satisfied by the join criteria, Access patterns: {0}
-TempTableStore.table_exist_error=Temporary table "{0}" already exists.
-TempTableStore.table_doesnt_exist_error=Temporary table "{0}" does not exist.
-
-XMLQueryPlanner.cannot_plan=Cannot create a query for MappingClass with user criteria {0}
-XMLQueryPlanner.staging_table_has_input_set=Staging table ''{0}'' is not allowed to have an input set.
-CriteriaPlanner.staging_context=Staging table criteria cannot contian context functions
-CriteriaPlanner.multiple_staging=Staging table criteria {0} was not specified against a single staging table
-CriteriaPlanner.invalid_context=Element {0} is not in the scope of the context {1}
-CriteriaPlanner.invalid_element=Element {0} is not a valid data node
-results_not_found=Results for the mapping class {0} are not found;
-tuple_not_found=Tuple source results for the mapping class {0} are not found;
-unmapped_reference=Reference value for {0} is not supplied; can not continue.
-RulePlanProcedures.no_values=No valid criteria specified for procedure parameter {0}
-ProcedurePlan.nonNullableParam=The procedure parameter is not nullable, but is set to null: {0}
-
-BufferManagerImpl.no_memory_available=No memory available
-BufferManagerImpl.tuple_source_not_found=Tuple source does not exist: {0}
-FileStoreageManager.file_exists=Unable to create {0} as it already exists
-FileStoreageManager.error_creating=Error creating {0}
-FileStoreageManager.error_reading=Error reading {0}
-FileStoreageManager.no_directory=No directory specified for the file storage manager.
-FileStoreageManager.not_a_directory={0} is not a valid storage manager directory.
-FileStorageManager.error_getting_free_disk_space=Error while seeking free disk space for directory: {0}
-FileStorageManager.can_not_save_lobs=Can not save *Reference Lobs* into persistent disk storage.
-FileStorageManager.batch_error=Error while converting batched data to file storage.
-FileStoreageManager.space_exhausted=Max buffer space of {0} bytes has been exceed. The current operation will be aborted.
-
-TextTableNode.no_value=No value found for column \"{0}\" in the row ending on text line {1} in {2}.
-TextTableNode.conversion_error=Could not convert value for column \"{0}\" in the row ending on text line {1} in {2}.
-TextTableNode.header_missing=HEADER entry missing for column name \"{0}\" in {1}.
-TextTableNode.unclosed=Text parse error: Unclosed qualifier at end of text in {0}.
-TextTableNode.character_not_allowed=Text parse error: Non-whitespace character found between the qualifier and the delimiter in text line {0} in {1}.
-TextTableNode.unknown_escape=Text parse error: Unknown escape sequence \\{0} in text line {1} in {2}.
-TextTableNode.invalid_width=Text parse error: Fixed width line width {0} is smaller than the expected {1} on text line {2} in {3}.
-
-XMLTableNode.error=Error evaluating XQuery row context for XMLTable: {0}
-XMLTableNode.path_error=Error evaluating XMLTable column path expression for column: {0}
-XMLTableName.multi_value=Unexpected multi-valued result was returned for XMLTable column "{0}". Path expressions for non-XML type columns should return at most a single result.
-
-TempTableDataManager.failed_load=Failed to load materialized view table {0}.
-TempTableDataManager.loaded=Loaded materialized view table {0} with row count {1}.
-TempTableDataManager.loading=Loading materialized view table {0}
-TempTableDataManager.not_implicit_matview={0} does not target an internal materialized view.
-TempTableDataManager.row_refresh_pk=Materialized view {0} cannot have a row refreshed since there is no primary key.
-TempTableDataManager.row_refresh_composite=Materialized view {0} cannot have a row refreshed because it uses a composite key.
-TempTableDataManager.row_refresh_updatable=Materialized view {0} cannot have a row refreshed because it's cache hint did not specify \"updatable\".
-TempTableDataManager.row_refresh=Refreshing row {1} for materialized view {0}.
\ No newline at end of file
Modified: trunk/engine/src/main/resources/org/teiid/query/i18n.properties
===================================================================
--- trunk/engine/src/main/resources/org/teiid/query/i18n.properties 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/main/resources/org/teiid/query/i18n.properties 2010-09-24 18:51:07 UTC (rev 2603)
@@ -22,51 +22,20 @@
# Error messages for query (015) project to address internationalization
# Format:
-# ERR.015.001.0001=Doh! You blew it!
#
# function (001)
-ERR.015.001.0001 = Unknown function: {0}
ERR.015.001.0002 = Cannot find implementation for known function {0}
ERR.015.001.0003 = Error while evaluating function {0}
ERR.015.001.0004 = Unable to access function implementation for [{0}]
ERR.015.001.0005 = ERROR loading system functions: {0}
-ERR.015.001.0006 = Error occurred while adding {0} and {1}
-ERR.015.001.0007 = Unknown type signature for {0}({1}, {2})
-ERR.015.001.0008 = Error occurred while subtracting {0} from {1}
-ERR.015.001.0009 = Substring start value {0} out of valid range for {1}
-ERR.015.001.0010 = Error occurred while multiplying {0} and {1}
-ERR.015.001.0011 = Substring length {0} is invalid for {1}
-ERR.015.001.0012 = Error occurred while dividing {0} and {1}
-ERR.015.001.0013 = Unknown type signature for {0}({1}, {2}, {3})
-ERR.015.001.0014 = Error occurred while getting absolute value of {0}
-ERR.015.001.0015 = Unknown type signature for {0}({1})
-ERR.015.001.0016 = Error occurred while taking ceiling of {0}
ERR.015.001.0017 = Left count is invalid: {0}
-ERR.015.001.0018 = Error occurred while taking exp of {0}
-ERR.015.001.0019 = Right count is invalid: {0}
-ERR.015.001.0020 = Error occurred while taking floor of {0}
-ERR.015.001.0021 = Error evaluating ascii function - string passed has length 0.
-ERR.015.001.0022 = Error occurred while taking log of {0}
-ERR.015.001.0024 = Error occurred while taking log10 of {0}
ERR.015.001.0025 = Pad length must be > 0.
-ERR.015.001.0026 = Error occurred while doing {0} mod {1}
ERR.015.001.0027 = Pad string for lpad/rpad must have length greater than 0.
-ERR.015.001.0028 = Error occurred while doing {0} ^ {1}
-ERR.015.001.0029 = Pad string for rpad must have length greater than 1.
-ERR.015.001.0030 = Error occurred while taking sign({0})
ERR.015.001.0031 = Source and destination character lists must be the same length.
-ERR.015.001.0032 = Error occurred while taking sqrt of {0}
ERR.015.001.0033 = Error converting [{0}] of type {1} to type {2}
-ERR.015.001.0034 = Unknown target type for conversion: {0}
ERR.015.001.0035 = The context function may only be used in XML queries.
ERR.015.001.0035a = The rowlimit and rowlimitexception functions may only be used in XML queries.
-ERR.015.001.0036 = The DECODE string parameter cannot be null.
-ERR.015.001.0037 = Null decode delimiter encountered in DECODE function call.
-ERR.015.001.0038 = Unable to convert the comparison String: {0} in the decode function parameterto the return type: {1}
-ERR.015.001.0039 = Unable to convert the DECODE value: {0} to the proper return datatype.
-ERR.015.001.0040 = The second and third DECODE function arguments must be a literal String
-ERR.015.001.0041 = The DECODE function was unable to convert the object: {0} of type: {1} to the target output type: {2}
ERR.015.001.0042 = Illegal argument for formating: {0}
ERR.015.001.0043 = Parse Exception occurs for executing: {0} {1}
ERR.015.001.0044 = Function metadata source is of invalid type: {0}
@@ -75,7 +44,6 @@
ERR.015.001.0047 = Unexpected exception while loading {0}.{1} with args= {2}
ERR.015.001.0048 = Unable to represent average value from {0} / {1}
ERR.015.001.0050 = Unable to compute aggregate function {0} on data of type {1}
-ERR.015.001.0051 = Caught unexpected exception while computing {0}.
ERR.015.001.0052 = {0} must be non-null.
ERR.015.001.0053 = Method parameter must be non-null.
ERR.015.001.0054 = Type is unknown: {0}
@@ -83,42 +51,22 @@
ERR.015.001.0056 = {0} has invalid first character: {1}
ERR.015.001.0057 = {0} has invalid character: {1}
ERR.015.001.0058 = {0} cannot end with a ''.''
-ERR.015.001.0059 = IO Exception while reading XML metadata file: {0}
-ERR.015.001.0060 = Unexpected exception while reading XML data for user functions: {0}
ERR.015.001.0061 = <start> value of {0} is invalid, which should never be less than zero or bigger than the length of original string {1}
ERR.015.001.0062 = <length> value of {0} is invalid, which should never less be than zero.
ERR.015.001.0063 = Input String is an empty string but start value or/and length value is bigger than zero.
-ERR.015.001.0064 = Unknown type signature for evaluating function of: {0} ({1}, {2}, {3}, {4})
-ERR.015.001.0065 = Unknown type signature for evaluating function of: {0} ({1}, {2})
ERR.015.001.0066 = Unknown type signature for evaluating function of: {0} ({1})
-ERR.015.001.0067 = Unknown type signature for evaluating function of: {0} ({1}, {2}, {3})
-ERR.015.001.0068 = Unknown type signature for evaluating function of: {0} ({1}, {2}, {3})
ERR.015.001.0069 = Unknown type signature for evaluating function of: {0} ({1})
-ERR.015.001.0070 = Unknown type signature for evaluating function of: {0} ({1})
-ERR.015.001.0071 = Unknown type signature for evaluating function of: {0} ({1})
# mapping (002)
-QueryTreeConverter.jdomErr=Unable to create a JDOM document with string ({0})
-QueryTreeConverter.nullNode=QueryNode to convert is null.
-QueryTreeConverter.errConverting=Unable to create Query Node.
-QueryTreeMapper.errParseBinding=Unable to parse expression for binding: {0}, {1}
-QueryTreeMapper.errMapping=Unable to map the following symbols: {0}
-QueryTreeMapper.symbolParseErr=Unable to parse query for symbol mapping: {0}
-QueryTreeMapper.cantMapGroup=Unable to map the group name {0}
-ERR.015.002.0008 = Mapping file or stream must be specified prior to initializing mapping reader.
ERR.015.002.0009 = Search direction arg ''{0}'' is not one of the search constants defined in MappingNodeConstants.
ERR.015.002.0010 = Value for property ''{0}'' is null.
ERR.015.002.0011 = Invalid type: {0}
-ERR.015.002.0012 = QueryNode<error converting>
-ERR.015.004.0026= The following predicates must reference an XML element: {0}
# parser (005)
QueryParser.emptysql=Parser cannot parse an empty sql statement.
QueryParser.parsingError=Parsing error: {0}
-QueryParser.parsingErrorWithLocation=Parsing error at line {0}, column {1}: {2}
QueryParser.nullSqlCrit=Parser cannot parse a null sql criteria.
-QueryParser.nullBlock= Parser cannot parse a null block.
QueryParser.lexicalError= Lexical error: {0}
QueryParser.nullSqlExpr= Parser cannot parse a null sql expression.
QueryParser.xqueryCompilation= Direct usage of XQuery is no longer supported, use XMLQUERY instead.
@@ -132,7 +80,6 @@
ERR.015.006.0016= Unknown expression type: {0}
ERR.015.006.0033= Unable to evaluate {0}: {1}
ERR.015.006.0055= Unable to evaluate LOOKUP function.
-ERR.015.006.0056= The subquery of this compare criteria has to be scalar, but returned more than one value: {0}
ERR.015.006.0057= Unknown subquery comparison predicate quantifier: {0}
ERR.015.006.0058= The command of this scalar subquery returned more than one value: {0}
@@ -140,74 +87,48 @@
ERR.015.007.0001= Item may not be null
# resolver (008)
-ERR.015.008.0001= Error executing conversion function to convert value
-ERR.015.008.0002= Unknown command type: {0}
ERR.015.008.0003= Only one XML document may be specified in the FROM clause of a query.
-ERR.015.008.0004= Query is invalid - it specifies a mixture of groups and documents in the FROM clause.
-ERR.015.008.0005= Failed parsing delete plan for {0}
ERR.015.008.0007= Incorrect number of parameters specified on the stored procedure {2} - expected {0} but got {1}
-ERR.015.008.0008= Failed parsing stored query transformation for {0}
ERR.015.008.0009= {1} is not allowed on the virtual group {0}: no {1} procedure was defined.
ERR.015.008.0010= INSERT statement must have the same number of elements and values specified. This statement has {0} elements and {1} values.
ERR.015.008.0011= Error parsing query plan transformation for {0}
ERR.015.008.0012= Unable to resolve update procedure as the virtual group context is ambiguous.
ERR.015.008.0013= Error parsing query plan transformation for {0}
-ERR.015.008.0014= The expression on the assignment statement is being assigned to a variable of differing type and no implicit conversion is available: {0}
ERR.015.008.0015= Unknown statement type: {0}
-ERR.015.008.0016= Failed parsing update plan for {0}
-ERR.015.008.0018= Left side of ''{0}'' must be an element.
ERR.015.008.0019= Unable to resolve element: {0}
ERR.015.008.0020= Element is ambiguous and must be qualified: {0}
-ERR.015.008.0021= No element IDs found for document {0}
ERR.015.008.0022= Failed parsing reference binding: {0}
-ERR.015.008.0023= Could not resolve binding reference: {0}
-ERR.015.008.0024= Could not resolve group for binding reference: {0}
ERR.015.008.0025= Binding reference cannot be a function: {0}
ERR.015.008.0026= Expression ''{0}'' has a parameter with non-determinable type information. The use of an explicit convert may be necessary.
ERR.015.008.0027= The expressions in this criteria are being compared but are of differing types ({0} and {1}) and no implicit conversion is available: {2}
-ERR.015.008.0028= The expressions in this criteria are being compared but are of differing types and no conversion can be performed on an aggregate symbol.
ERR.015.008.0029= This criteria must have string or CLOB expressions on each side: {0}
ERR.015.008.0030= Type cannot be null for expression: {0}
ERR.015.008.0031= This criteria must have values only of the same type as the left expression: {0}
ERR.015.008.0032= There must be exactly one projected symbol of the subquery: {0}
ERR.015.008.0033= The left expression must have a type convertible to the type of the subquery projected symbol: {0}
-ERR.015.008.0034= Expression type cannot be null: {0}
ERR.015.008.0035= Type was null for {0} in function {1}
ERR.015.008.0036= The function ''{0}'' has more than one possible signature.
ERR.015.008.0037= The conversion from {0} to {1} is not allowed.
-ERR.015.008.0038= Could not obtain conversion type value for {0}
ERR.015.008.0039= The function ''{0}'' is an unknown form. Check that the function name and number of arguments is correct.
ERR.015.008.0040= The function ''{0}'' is a valid function form, but the arguments do not match a known type signature and cannot be converted using implicit type conversions.
ERR.015.008.0041= Expected value of type ''{0}'' but ''{1}'' is of type ''{2}'' and no implicit conversion is available.
ERR.015.008.0042= Element ''{0}'' in ORDER BY is ambiguous and may refer to more than one element of SELECT clause.
ERR.015.008.0043= Element ''{0}'' in ORDER BY was not found in SELECT clause.
-ERR.015.008.0044= No element IDs found for group {0}
ERR.015.008.0045= Failed parsing insert plan for {0}
ERR.015.008.0046= The symbol {0} may only be used once in the FROM clause.
ERR.015.008.0047= The symbol {0} refers to a group not defined in the FROM clause.
-ERR.015.008.0048= SELECT DISTINCT is not allowed for XML queries.
ERR.015.008.0049= Bindings must be specified
-ERR.015.008.0050= Element specified is ambiguous, it exists in two or more groups on this command.
ERR.015.008.0051= Symbol {0} is specified with an unknown group context
-ERR.015.008.0052= Unknown metadata element: {0}
ERR.015.008.0053= Element "{0}" is ambiguous, it exists in two or more groups.
ERR.015.008.0054= Element "{0}" is not defined by any relevant group.
ERR.015.008.0055= Group specified is ambiguous, resubmit the query by fully qualifying the group name
ambiguous_procedure= Procedure ''{0}'' is ambiguous, use the fully qualified name instead
ERR.015.008.0056= Group does not exist
-ERR.015.008.0057= Variable {0} is not resolvable.
-ERR.015.008.0058= Variable {0} is declared with an invalid datatype {1}
-ERR.015.008.0059= Element {0} specified on the HAS/TRANSLATE criteria is not present on the virtual group being updated {1}
-ERR.015.008.0060= Element {0} specified is not present on the virtual group being updated {1}
ERR.015.008.0061= Unable to resolve stored procedure {0} the datatype for the parameter {1} is not specified.
ERR.015.008.0062= Unable to resolve return element referred to by LOOKUP function: {0}
ERR.015.008.0063= The first three arguments for the LOOKUP function must be specified as constants.
-ERR.015.008.0064= The expressions in this criteria are being compared but are aggregate functions of differing types, thus no conversion can be performed.
ERR.015.008.0065= Group {0} is not allowed in LOOKUP function.
-ERR.015.008.0066= Aggregate functions cannot be nested in scalar functions.
-ERR.015.008.0067= CASE expressions cannot contain aggregate functions: {0}
ERR.015.008.0068= Could not find a common type to which all {0} expressions can be implicitly converted: {1}
-ERR.015.008.0069= Error parsing doc() arg of XQuery.
ERR.015.008.0070= Aliased Select Symbols are not valid in XML Queries.
XMLQueryResolver.no_expressions_in_select=Expressions cannot be selected by XML Queries
@@ -215,36 +136,21 @@
ERR.015.010.0001= Invalid compare operator: {0}
ERR.015.010.0002= Invalid logical operator: {0}
ERR.015.010.0003= Cannot set null collection of elements on GroupBy
-ERR.015.010.0004= Cannot set null collection of elements on OrderBy
-ERR.015.010.0005= Cannot replace variables in ORDER BY with a different sized set of variables
ERR.015.010.0006= Invalid parameter type [{0}] must be IN, OUT, INOUT, RETURN_VALUE, RESULT_SET
-ERR.015.010.0007= Unable to obtain value for this parameter
-ERR.015.010.0008= Parameter is represented by an expression, not a constant: {0}
ERR.015.010.0009= No columns exist.
ERR.015.010.0010= Invalid column index: {0}
ERR.015.010.0011= Parameter cannot be null
-ERR.015.010.0012= No value iterator is available; the subquery for this Set Criteria has not yet been processed.
-ERR.015.010.0013= Unknown aggregate function: {0}. Must be in {1}
ERR.015.010.0014= Constant type should never be null
ERR.015.010.0015= Unknown constant type: {0}
ERR.015.010.0016= A group symbol may not resolve to a null metadata ID.
ERR.015.010.0017= The name of a symbol may not be null.
ERR.015.010.0018= Inconsistent number of elements in transformation projected symbols and virtual group.
-ERR.015.010.0019= VariableMap cannot be null
-ERR.015.010.0020= VariableContext cannot be null
ERR.015.010.0021= Elements cannot be null
ERR.015.010.0022= Functions cannot be null
ERR.015.010.0023= Groups cannot be null
-ERR.015.010.0024= Predicates cannot be null
-ERR.015.010.0025= References cannot be null
-ERR.015.010.0026= Unexpected exception while checking type of constant: {0}
-ERR.015.010.0027= TranslateCriteria cannot be null
-ERR.015.010.0028= Variables cannot be null
ERR.015.010.0029= Cannot create AliasSymbol wrapping AliasSymbol
-ERR.015.010.0030= Unexpected symbol type: {0}
ERR.015.010.0031= Illegal variable name ''{1}''. Variable names can only be prefixed with the special group name ''{0}''.
ERR.015.010.0032= Variable {0} was previously declared.
-ERR.015.010.0034= No value iterator is available; the subquery for this predicate criteria has not yet been processed.
ERR.015.010.0035= The <expression> cannot be null in CASE <expression>
ERR.015.010.0036= There must be at least one WHEN expression and one THEN expression. The number of WHEN and THEN expressions must be equal.
ERR.015.010.0037= The WHEN part of the CASE expression must contain an expression.
@@ -252,7 +158,6 @@
ERR.015.010.0039= The WHEN part of the searched CASE expression must contain a criteria.
# util (011)
-ERR.015.011.0001 =
# validator (012)
ERR.015.012.0001 = The query defining an updatable virtual group cannot be a UNION query
@@ -266,8 +171,6 @@
ERR.015.012.0010 = The query defining an updatable simple virtual group should select all the required elements in its FROM clause {0}
ERR.015.012.0011 = There must be exactly one projected symbol in the subcommand of an IN clause.
ERR.015.012.0012 = An AssignmentStatement cannot change the value of a {0} or {1} variable.
-ERR.015.012.0013 = There must be exactly one projected symbol in the command of an AssignmentStatement.
-ERR.015.012.0014 = Variable used in the procedure''s AssignmentStatement does not match the type of value returned by the command.
ERR.015.012.0016 = Variable {0} not assigned any value in this procedure.
ERR.015.012.0017 = Variables declared the procedure''s DeclareStatement cannot be one of the special variables: {0}, {1} and {2}.
ERR.015.012.0019 = TranslateCriteria cannot be used in on an if or while statement.
@@ -283,9 +186,7 @@
ValidationVisitor.invalid_lookup_key=Expressions of type OBJECT, CLOB, BLOB, or XML cannot be used as LOOKUP key columns: {0}.
ValidationVisitor.limit_not_valid_for_xml=The limit clause cannot be used on an XML document query.
ValidationVisitor.translated_or=Translated user criteria must not contain OR criteria
-ValidateCriteriaVistitor.element_not_comparable = The following data elements are not supported in comparison criteria: {0}.
ValidationVisitor.union_insert = Select into is not allowed under a set operation: {0}.
-ERR.015.012.0028 = The following data elements are not supported in match criteria: {0}.
ERR.015.012.0029 = INSERT, UPDATE, and DELETE not allowed on XML documents
ERR.015.012.0030 = Commands used in stored procedure language not allowed on XML documents
ERR.015.012.0031 = Queries against XML documents can not have a GROUP By clause
@@ -293,31 +194,18 @@
ERR.015.012.0033 = Metadata does not allow updates on the group: {0}
ERR.015.012.0034 = Queries involving UNIONs, INTERSECTs and EXCEPTs not allowed on XML documents
ERR.015.012.0035 = Queries combined with the set operator {0} must have the same number of output elements.
-ERR.015.012.0036 = Queries combined with the set operator {0} must have elements with the same type in each position. The symbol ''{1}'' of type ''{2}'' does not match the symbol ''{3}'' of type ''{4}''.
ERR.015.012.0037 = Invalid symbol: {0}. When an aggregate function is used in the SELECT clause and no GROUP BY clause is specified, the SELECT clause may contain only aggregate functions and constants.
ERR.015.012.0038 = Invalid symbol: {0}. When a GROUP BY clause is used, all elements in the SELECT clause must be declared in the GROUP BY clause.
ERR.015.012.0039 = Nested aggregate expressions are not allowed: {0}
-ERR.015.012.0040 = Aggregate expression has unknown data type: {0}
ERR.015.012.0041 = The aggregate function {0} cannot be used with non-numeric expressions: {1}
AggregateValidationVisitor.non_comparable = The aggregate function {0} cannot be used with non-comparable expressions: {1}
AggregateValidationVisitor.non_xml = The XMLAGG aggregate function {0} requires an expression of type XML: {1}
AggregateValidationVisitor.non_boolean=The boolean aggregate functions ANY, SOME, EVERY require a boolean expression.
AggregateValidationVisitor.invalid_distinct=The enhanced numeric aggregate functions STDDEV_POP, STDDEV_SAMP, VAR_POP, VAR_SAMP cannot have DISTINCT specified.
-ERR.015.012.0042 = Cross join may not have criteria: {0}
-ERR.015.012.0043 = Join must have criteria declared in the ON clause: {0}
-ERR.015.012.0045 = Elements in this join criteria are not from a group involved in the join: {0}
-ERR.015.012.0046 = Join criteria must have at least one element on each side of criteria: {0}
-ERR.015.012.0047 = Elements in this join criteria are not from a group involved in the join: {0}
-ERR.015.012.0048 = When a HAVING clause is used without a GROUP BY clause, the HAVING clause may contain only constants and aggregate expressions.
-ERR.015.012.0049 = Invalid symbol {0} in HAVING clause. Any elements used in this clause outside an aggregate expression must be declared in the GROUP BY clause.
-ERR.015.012.0050 = Nested aggregate expressions are not allowed: {0}
-ERR.015.012.0051 = Number of values in the insert statement must match the number of elements.
ERR.015.012.0052 = The element [{0}] is in an INSERT but does not support updates.
ERR.015.012.0053 = Element in the group {0}, for which value is not specified in the insert command is neither nullable nor has a default value: {1}
ERR.015.012.0054 = Column variables do not reference columns on group "{0}": {1}
ERR.015.012.0055 = Element {0} does not allow nulls.
-ERR.015.012.0056 = Only constant expressions are allowed to be inserted. The expression ''{0}'' cannot be evaluated to a constant.
-ERR.015.012.0057 = Left side of update expression must be a single element and have a right expression of the same type: {0}
ERR.015.012.0058 = Left side of update expression may not be a variable or a reference to an external element: {0}
ERR.015.012.0059 = Left side of update expression must be an element that supports update: {0}
ERR.015.012.0060 = Element {0} does not allow nulls.
@@ -326,101 +214,47 @@
ERR.015.012.0063 = Multiple failures occurred during validation:
ERR.015.012.0064 = Validation succeeded
ERR.015.012.0065 = Nested Loop can not use the same cursor name as that of its parent.
-ERR.015.012.0066 = Cursor name can not be used outside the context of the Loop.
ERR.015.012.0067 = No scalar subqueries are allowed in the SELECT with no FROM clause.
ERR.015.012.0069 = INTO clause can not be used in XML query.
-ERR.015.012.0070 = The target table for a SELECT INTO or an INSERT with a query expression can only be a physical table or a temporary table.
-# Log messages for query (015) project to address internationalization
-# Format:
-# MSG.015.001.0001=Entering foo()
-#
-
-# function (001)
-MSG.015.001.0001 = The function {0} will not be added because a function with the same name and signature already exists.
-MSG.015.001.0002 = Function Validation
-
-# mapping (002)
-MSG.015.002.0001 =
-
-# metadata (003)
-MSG.015.003.0001 =
-
# optimizer (004)
-MSG.015.004.0001 = Rejecting dependent access node as it''s criteria is strong: {0}
-MSG.015.004.0002 = Rejecting dependent access node as parent join is CROSS or FULL OUTER: {0}
-MSG.015.004.0003 = Rejecting dependent access node as parent join has no join criteria: {0}
-MSG.015.004.0004 = Rejecting dependent access node as parent join has no equality expressions: {0}
-MSG.015.004.0005 = Rejecting dependent access node as it is on outer side of a join: {0}
-MSG.015.004.0006 = Neither access node can be made dependent because both have unsatisfied access patterns: {0} {1}
-MSG.015.004.0007 = Making access node dependent to satisfy access pattern: {0}
-MSG.015.004.0008 = Making access node dependent due to hint: {0}
-MSG.015.004.0009 = Rejecting dependent access node as access pattern forbids dependent join: {0}
-MSG.015.004.0010 = Rejecting weaker dependent access node sibling based on criteria: {0}
-MSG.015.004.0011 = Mapping document tree: {0}
-MSG.015.004.0012 = Optimizing location of staging table: {0}
-MSG.015.004.0013 = Could not find descendant twin for recursive node: {0}
-MSG.015.004.0014 = Found bound references list {0} for result set {1}
-MSG.015.004.0015 = Adding Reference for recursive processing to list for result set: {0} new expr: {1} old expr: {2}
-MSG.015.004.0016 = Found bound references list {0} for result set {1}
-MSG.015.004.0017 = Current program shouldn''t equal recursive program in recursive block: {0}
-MSG.015.004.0018 = ''context'' usage; current rs mapping node {0}
-MSG.015.004.0019 = ''context'' usage; building temp criteria loop, result Set {0} context result set {1}
-MSG.015.004.0020 = ''context'' usage; temp Criteria {0}
-MSG.015.004.0021 = ''context'' usage; next rs mapping node {0}
-MSG.015.004.0022 = ''context'' usage: mapping result set {0} to {1}
-MSG.015.004.0023 = adjusting From clause for ''context'' usage: Query {0} Criteria {1}
-MSG.015.004.0024 = finished adjusting From clause for ''context'' usage: Query {0} Criteria {1}
+ERR.015.004.0007= Can''t convert plan node of type {0}
+ERR.015.004.0009= Error finding connectorBindingID for command
+ERR.015.004.0010= Unknown group specified in OPTION MAKEDEP/MAKENOTDEP: {0}
+ERR.015.004.0012= Group has an access pattern which has not been met: group(s) {0}; access pattern(s) {1}
+ERR.015.004.0020= Error getting model for {0}
+ERR.015.004.0023= Error rewriting criteria: {0}
+ERR.015.004.0024= Unable to create a query plan that sends a criteria to \"{0}\". This connection factory requires criteria set to true indicating that a query against this model requires criteria.
+ERR.015.004.0029= Could not resolve group symbol {0}
+ERR.015.004.0035= The criteria {0} has elements from the root staging table and the document nodes which is not allowed.
+ERR.015.004.0037= No mapping node found named, ''{0}', in use of ''context''
+ERR.015.004.0046= The XML document element(s) {0} are not mapped to data and cannot be used in the criteria \"{1}\".
+ERR.015.004.0054= Could not parse query transformation for {0}: {1}
+ERR.015.004.0068= Context functions within the same conjunct refer to different contexts: {0}
-# parser (005)
-MSG.015.005.0001 =
-
# processor (006)
-MSG.015.006.0001 = AssignmentInstruction: The variable {0} in the variablecontext is updated with the value : {1}
-MSG.015.006.0002 = AssignmentInstruction: The variable {0} in the variablecontext is set to null, no rows were returned for the execution of command that assigns its value
-MSG.015.006.0003 = DeclareInstruction: Current variablecontext is updated with the variable: {0}
-MSG.015.006.0004 = Processing ExecSqlInstruction as part of processing the update procedure
-MSG.015.006.0005 = IFInstruction: The criteria on the if block evaluated to true, processing the if block
-MSG.015.006.0006 = IFInstruction: The criteria on the if block evaluated to false, processing the else block
-MSG.015.006.0007 = ProcedurePlan reset
-MSG.015.006.0008 = removed tuple source {0} for result set
-MSG.015.006.0009 = ProcedurePlan toString couldn''t print entire Program.
-MSG.015.006.0010 = Processing RaiseErrorInstruction as part of processing the update procedure
-MSG.015.006.0011 = RelationalPlan reset
-MSG.015.006.0012 = ABORT processing now.
-MSG.015.006.0013 = TAG elem {0} fixed value {1}
+ERR.015.006.0001= XMLPlan toString couldn''t print entire Program.
+ERR.015.006.0034= Unexpected symbol type while updating tuple: {0}
+ERR.015.006.0037= Tuple source does not exist: {0}
+ERR.015.006.0039= Instructed to abort processing when recursion limit reached.
+ERR.015.006.0042= No xml schema to validate document against
+ERR.015.006.0048= Fatal Error: {0}
+ERR.015.006.0049= Error: {0}
+ERR.015.006.0051= Invalid direction for MoveDocInstruction: {0}
+ERR.015.006.0054= Instructed to abort processing as default of choice.
-# report (007)
-MSG.015.007.0001 =
-
-# resolver (008)
-MSG.015.008.0001 =
-
# rewriter (009)
-MSG.015.009.0001 =
+ERR.015.009.0001= Error evaluating criteria: {0}
+ERR.015.009.0002= Error translating criteria on the user''s command, the criteria translated to {0} is not valid
+ERR.015.009.0003= Error simplifying mathematical expression: {0}
-# sql (010)
-MSG.015.010.0001 =
-# util (011)
-MSG.015.011.0001 =
-
-# validator (012)
-MSG.015.012.0001 =
-
-UpdateProcedureResolver.._1=.
-
-SQLParser.Cant_alias_star=Symbols such as {0} cannot be named with an alias.
SQLParser.Unknown_join_type=Unknown join type: {0}
SQLParser.Aggregate_only_top_level=Aggregate expressions are allowed only as top level functions in the SELECT and HAVING clauses.
SQLParser.Unknown_agg_func=Unknown aggregate function: {0}
SQLParser.Invalid_func=Invalid function name: [{0}]
SQLParser.Integer_parse=Unable to parse integer literal: {0}
SQLParser.Float_parse=Unable to parse floating point literal: {0}
-SQLParser.Boolean_parse=Illegal boolean format: {0}, expecting '{'b'true''}' or '{'b'false''}'
-SQLParser.Timestamp_parse=Illegal timestamp format: {0}, expecting '{'d'YYYY-MM-DD HH:MM:SS[.XXX]''}'
-SQLParser.Date_parse=Illegal date format: {0}, expecting '{'d'YYYY-MM-DD''}'
-SQLParser.Time_parse=Illegal time format: {0}, expecting '{'t'HH:MM:SS''}'
SQLParser.Invalid_id=Invalid metadata ID format: [{0}]
SQLParser.Invalid_alias=Invalid alias format: [{0}]
SQLParser.Invalid_short_name=Invalid simple identifier format: [{0}]
@@ -540,8 +374,6 @@
SystemSource.Rand_desc=Random Number
SystemSource.Rand_arg=Number
SystemSource.Rand_result_desc=Generated Random Number
-SystemSource.Float_arg=Number
-SystemSource.Double_arg=Number
SystemSource.Double_arg2=Number
SystemSource.Atan_arg1=Number parameter1
SystemSource.Atan_arg2=Number parameter2
@@ -576,16 +408,6 @@
SystemSource.Timestampadd_ts_arg2=Count number
SystemSource.Timestampadd_ts_arg3=Timestamp type
SystemSource.Timestampadd_ts_result=Returned modified timestamp
-SystemSource.Timestampdiff_d_desc=Calculate estimated number of intervals between start and end date
-SystemSource.Timestampdiff_d_arg1=Interval type
-SystemSource.Timestampdiff_d_arg2=Start day
-SystemSource.Timestampdiff_d_arg3=End day
-SystemSource.Timestampdiff_result_desc=Returns estimated number of intervals between start and end date
-SystemSource.Timestampdiff_t_desc=Calculate estimated number of intervals between start and end time
-SystemSource.Timestampdiff_t_arg1=Interval type
-SystemSource.Timestampdiff_t_arg2=Start time
-SystemSource.Timestampdiff_t_arg3=End time
-SystemSource.Timestampdiff_t_result_desc=Returns estimated number of intervals between start and end time
SystemSource.Timestampdiff_ts_desc=Calculate estimated number of intervals between start and end timestamp
SystemSource.Timestampdiff_ts_arg1=Interval type
SystemSource.Timestampdiff_ts_arg2=Start timestamp
@@ -668,11 +490,6 @@
SystemSource.Lpad_arg1=String
SystemSource.Lpad_arg2=Padded length
SystemSource.Lpad_result=Padded string
-SystemSource.Lpad2_desc=Pad the input string on the left to length with pad character
-SystemSource.Lpad2_arg1=String
-SystemSource.Lpad2_arg2=Padded length
-SystemSource.Lpad2_arg3=Pad character
-SystemSource.Lpad2_result=Padded string
SystemSource.Lpad3_desc=Pad the input string on the left to length with pad character
SystemSource.Lpad3_arg1=String
SystemSource.Lpad3_arg2=Padded length
@@ -682,11 +499,6 @@
SystemSource.Rpad1_arg1=String
SystemSource.Rpad1_arg2=Padded length
SystemSource.Rpad1_result=Padded string
-SystemSource.Rpad2_desc=Pad the input string on the right to length with pad character
-SystemSource.Rpad2_arg1=String
-SystemSource.Rpad2_arg2=Padded length
-SystemSource.Rpad2_arg3=Pad character
-SystemSource.Rpad2_result=Padded string
SystemSource.Rpad3_desc=Pad the input string on the right to length with pad character
SystemSource.Rpad3_arg1=String
SystemSource.Rpad3_arg2=Padded length
@@ -704,17 +516,6 @@
SystemSource.Context_arg1=XML context tag
SystemSource.Context_arg2=XML element
SystemSource.Context_result=Expression in higher context
-SystemSource.Relate_desc=Evaluate XML expression using the sibling relationship mode
-SystemSource.Relate_arg1=Relationship mapping root
-SystemSource.Relate_arg2=Relationship source root
-SystemSource.Relate_arg3=Relationship object root
-SystemSource.Relate_result=Same expression
-SystemSource.RelateSource_desc=Apply XML expression to the source entity when using XML relationship mode
-SystemSource.RelateSource_arg1=Expression
-SystemSource.RelateSource_result=Same expression
-SystemSource.RelateTarget_desc=Apply XML expression to the target entity when using XML relationship mode
-SystemSource.RelateTarget_arg1=Expression
-SystemSource.RelateTarget_result=Same expression
SystemSource.Rowlimit_desc=Limit the number of rows from an XML mapping class
SystemSource.RowlimitException_desc=Limit the number of rows from an XML mapping class, throw Exception if passed
SystemSource.Rowlimit_arg1=XML tag in the scope of a mapping class
@@ -770,19 +571,13 @@
SystemSource.Bitfunc2_arg2=Second integer
SystemSource.Convert_desc=Convert from {0} to target type
SystemSource.xpathvalue_description=Retrieve the first match content for an XPath statement
-SystemSource.xpath_description=Evaluate the XPath expression against a document
SystemSource.xpath_param1=Source document
SystemSource.xpath_param2=XPath expression
SystemSource.xpathvalue_result=Single result
-SystemSource.xpath_result=XPath result
SystemSource.xsltransform_description=Transform the document with the given stylesheet.
SystemSource.xsltransform_param1=Source document
SystemSource.xsltransform_param2=XSL stylesheet
SystemSource.xsltransform_result=Clob result
-SystemSource.xmlelement_description=Create an XML element.
-SystemSource.xmlelement_param1=Element name
-SystemSource.xmlelement_param2=Element contents
-SystemSource.xmlelement_result=XML result
SystemSource.xmlconcat_description=Concat XML types.
SystemSource.xmlconcat_param1=First element
SystemSource.xmlcomment_description=Create an XML comment.
@@ -810,7 +605,6 @@
SystemSource.from_unixtime_result=Timestamp value
SystemSource.nullif_description=Equivalent to case when (param1 = param2) then null else param1
SystemSource.nullif_param1=First parameter
-SystemSource.nullif_param2=Second parameter
SystemSource.nullif_result=null if the parameters are equivalent else param1
SystemSource.coalesce_description=Returns the first non-null parameter
SystemSource.coalesce_param1=parameter
@@ -828,36 +622,20 @@
ExpressionEvaluator.Must_push=Function {0} is marked in the function metadata as a function that must be evaluated at the source.
ExpressionEvaluator.Eval_failed=Unable to evaluate {0}: {1}
XMLSerialize.resolvingError=XMLSerialize is valid only for XML expressions: {0}
-QueryString.resolvingError=All query string expressions must be convertable to string.
Evaluator.xmlserialize=XMLSerialize: data exception - not an xml document
Evaluator.xmlquery=Error evaluating XMLQuery: {0}
-Evaluator.xmlquery_content=XQuery evaluation was expected to return content, but it returned a sequence.
-FunctionDefinitionsReader.Read_error=Error reading FunctionDefinitions.xmi: {0}
-FunctionDefinitionsSource.Read_error=Error reading {0}
ExecResolver.Param_convert_fail=Unable to convert procedural parameter of type {0} to expected type {1}
DynamicCommandResolver.SQL_String=Expected dynamic command sql to be of type STRING instead of type {0}.
-UnionQueryResolver.type_conversion_fail=Union query projected element {0} with type {1} and projected element {2} with type {3} are not compatible.
UnionQueryResolver.type_conversion=The Expression {0} used in a nested UNION ORDER BY clause cannot be implicitly converted from type {1} to type {2}.
ValidationVisitor.select_into_no_implicit_conversion=There is no implicit conversion between the source element type ({0}) and the target element type ({1}) at position {2} of the query: {3}
ValidationVisitor.excpet_intersect_all=EXCEPT ALL and INTERSECT ALL are currently unsupported
-ValidationVisitor.batch_command_updated_invalid_group=Only physical tables can be updated by a batched command. Cannot update {0} within a batch.
-ValidationVisitor.select_into_too_few_elements=Too few elements being SELECTed INTO the target table. Must select exactly {0} elements.
ValidationVisitor.element_updates_not_allowed=Metadata does not allow updates on the element: {0}
-ValidationVisitor.validateAccessPattern1=Access pattern is not satisfied for query {0}
ValidationVisitor.invalid_batch_command=Only INSERT, UPDATE, DELETE, and SELECT ... INTO statements are allowed within a batch.
-ValidationVisitor.badoffset1=The row offset in the LIMIT clause must be an integer literal
ValidationVisitor.badoffset2=The row offset in the LIMIT clause must be >= 0
-ValidationVisitor.badlimit1=The row limit in the LIMIT clause must be an integer literal
ValidationVisitor.badlimit2=The row limit in the LIMIT clause must be >= 0
-ValidationVisitor.pi_isNotNull=Cannot have a negated null check on a procedure input
-ValidationVisitor.proc_input_element=The assignment expression ''{0}'' is invalid. A procedure input element cannot be set to another element
ValidationVisitor.invalid_scalar_group_reference=Cannot reference a scalar group as a table: {0}
-ValidationVisitor.temp_group_in_dynamic=Only temp groups should be specified in a dyanmic command into clause
-ValidationVisitor.if_subquery=If and while criteria cannot contain subqueries.
-ValidationVisitor.assignment_subquery=Assignment, declaration, dynamic SQL, and dynamic SQL USING expressions cannot contain subqueries. A separate assignment statement should be used for each subquery.
ValidationVisitor.select_into_wrong_elements=Wrong number of elements being SELECTed INTO the target table. Expected {0} elements, but was {1}.
SimpleQueryResolver.Query_was_redirected_to_Mat_table=The query against {0} was redirected to the materialization table {1}.
-SimpleQueryResolver.Loading_materialized_table=The query is loading materialized group {0} so primary transformation was used.
SimpleQueryResolver.ambiguous_all_in_group=The symbol {0} refers to more than one group defined in the FROM clause.
SimpleQueryResolver.Proc_Relational_Name_conflict=Cannot access procedure {0} using table semantics since the parameter and result set column names are not all unique.
QueryResolver.invalid_xpath=Invalid xpath value: {0}
@@ -867,8 +645,6 @@
SimpleQueryResolver.procedure_cache_used=Procedure caching will be used for {0}.
SimpleQueryResolver.procedure_cache_not_usable=Procedure caching will not be used for {0} since the result set cache is disabled or the results/parameters cannot be cached.
SimpleQueryResolver.procedure_cache_not_used=Procedure caching will not be used for {0} due to the use of OPTION NOCACHE.
-ValidationVisitor.input_variable_data_type_not_match=The expression "{0}" assigned to input variable "{1}" is of type "{2}" which cannot be implicitly converted to the expected type "{3}".
-ValidationVisitor.input_variable_can_not_in_function=Input variable "{0}" cannot be an argument of a function in the criteria.
ValidationVisitor.groupby_subquery=Expressions used in a GROUP BY cannot be constant and must not contain subqueries: "{0}".
ValidationVisitor.Procedure_should_have_query=Procedure must execute at least one command to define the procedure result set.
ValidationVisitor.Procedure_has_group_self_reference=Procedure cannot have a Group reference to itself.
@@ -880,13 +656,7 @@
ValidationVisitor.2=The ''rowlimit'' and ''rowlimitexception'' functions arg must be an XML node symbol
ValidationVisitor.3=''Rowlimit'' and ''rowlimitexception'' functions can only be used within a compare criteria which is entirely a single conjunct.
ValidationVisitor.Context_function_nested=Context functions cannot be nested
-ValidationVisitor.update_temp=Update or Delete operations are not allowed on temporary tables: ''{0}''
ERR.015.004.0036= First argument in ''context'' must be the name of a node in the XML document model. Found Object {0} of Class {1}
-XMLSystemFunctions.xpathvalue_takes_only_string=The XPathValue function can only accept XML data in string form. The input is of type {0}.
-XMLSystemFunctions.wrap_exception=Error occurred evaluating XPathValue with XPath=''{0}'': {1}
-FunctionMethods.cant_execute_relate=The relate function may only be used in XML queries.
-FunctionMethods.cant_execute_relateSource=The relateSource function may only be used in XML relationship models and queries.
-FunctionMethods.cant_execute_relateTarget=The relateTarget function may only be used in XML relationship models and queries.
ExecResolver.invalid_named_params=Invalid param name(s): {0}. Name(s) of params without explicit values: {1}
ExecResolver.duplicate_named_params=Duplicate named param ''{0}''
ResolverUtil.required_param=Required parameter ''{0}'' has no value was set or is an invalid parameter.
@@ -895,14 +665,10 @@
ResolverUtil.setquery_order_expression=ORDER BY expression ''{0}'' cannot be used with a set query.
ResolverUtil.invalid_unrelated=Unrelated order by column {0} cannot be used in a SET query, with SELECT DISTINCT, or GROUP BY
XMLQueryResolver.xml_only_valid_alone=If any symbol in SELECT clause is ''xml'' or group.''xml'' , then no other element is allowed.
-EvaluateExpressionVisitor.Cant_get_iterator=Unable to retrieve ValueIterator with independent value expression: {0}
-ResolveFunctionsVisitor.xpath_cant_be_null=XPath cannot be null
ResolveVariablesVisitor.datatype_for_the_expression_not_resolvable=The datatype for the expression was not resolvable.
-Create.type_not_supported=The data type "{0}" is not supported.
TempTableResolver.unqualified_name_required=Cannot create temporary table "{0}". Local temporary tables must be created with unqualified names.
TempTableResolver.table_already_exists=Cannot create temporary table "{0}". A table with the same name already exists.
ValidationVisitor.drop_of_nontemptable=Cannot drop a non temporary table "{0}".
-ValidationVisitor.unrelated_orderby_xml=XML queries cannot order by an unrelated order by item.
ValidationVisitor.orderby_expression_xml=XML queries cannot order by an expression.
ValidationVisitor.text_table_invalid_width=For a fixed width text table, all columns must have width set.
ValidationVisitor.text_table_width=Fixed width text tables should not have DELIMITER, QUOTE, ESCAPE, or HEADER specified.
@@ -924,20 +690,16 @@
ValidationVisitor.xmlserialize_type=XMLSERIALIZE expects a STRING, CLOB, or BLOB value.
ValidationVisitor.invalid_encoding=Encoding {0} is not valid.
UpdateProcedureResolver.only_variables=Element symbol "{0}" cannot be assigned a value. Only declared VARIABLES can be assigned values.
-wrong_result_type=No results found; or non-XML result object has been produced as a result of the execution of XQuery expression. Please note that only XML type results are supported.
MappingLoader.unknown_node_type=Unknown Node Type "{0}" being loaded by the XML mapping document.
-MappingLoader.invalid_parent=Attribute or Comment nodes can not have children.
MappingLoader.invalid_criteria_node=Invalid criteria node found; A criteria node must have criteria specified or it must be a default node.
WrongTypeChild=Wrong type of child node is being added.
NoCriteria=Failed to add the node, because Criteria nodes must have "criteria" value set on them, or they need to be the default node.
root_cannotbe_null=Root node assigned to a document can be null.
invalid_recurive_node= Found recursive node {0} without recursive root node.
-criteria_node_not_allowed=Criteria Nodes can be only added on the Choice nodes; Wrong type of parent found.
SaxonXQueryExpression.bad_xquery=Failed to evaluate XQuery expression; Please check the query and correct errors in syntax or usage.
SaxonXQueryExpression.compile_failed=Could not compile XQuery; Please check the query for syntax or usage errors.
SaxonXQueryExpression.invalid_path=Column "{0}" has an invalid path expression: {1}
SaxonXQueryExpression.bad_context=Error building Source for context item.
-SimpleQueryResolver.unknown_group_in_nocache=Unknown group "{0}" found in the Option NOCACHE hint.
MappingLoader.invalidName=Null or blank name found in the Mapping Document, Must have valid name. Re-build the VDB
MatchCriteria.invalid_escape=Invalid escape sequence "{0}" with escape character "{1}"
QueryUtil.wrong_number_of_values=The number of bound values ''{0}'' does not match the number of parameters ''{1}'' in the prepared statement.
@@ -947,9 +709,155 @@
NewCalculateCostUtil.badCost=Unexpected format encountered for max or min value
WorkerPool.Max_thread=Reached maximum thread count "{0}" for worker pool "{1}" with a queue size of "{2}".
-WorkerPool.New_thread=Created worker thread "{0}".
WorkerPool.uncaughtException=Uncaught exception processing work
-XMLSystemFunctions.invalid_namespaces=Invalid namespaces supplied for XPath expression - ''{0}''
-TempTable.duplicate_key=Duplicate key
\ No newline at end of file
+TempTable.duplicate_key=Duplicate key
+ValidationVisitor.group_in_both_dep=Table specified in both dependent and independent queries '{0}'
+XMLQuery.resolvingError=Failed to resolve the query '{0}'
+SQLParser.non_position_constant=Invalid order by at {0}
+
+
+QueryRewriter.infinite_while=Infinite loop detected, procedure will not be executed.
+
+BatchedUpdatePlanner.unrecognized_command=The batch contained an unrecognized command: {0}
+ProcedurePlanner.bad_stmt=Error while planning update procedure, unknown statement type encountered: {0}
+RulePushSelectCriteria.Error_getting_modelID=Error getting modelID
+XMLPlanner.no_uri=Cannot find namespace URI for namespace {0} of element {1}
+
+XMLPlanner.The_XML_document_element_{0}_is_not_mapped_to_data_and_cannot_be_used_in_the_ORDER_BY_clause__{1}_1=The XML document element {0} is not mapped to data and cannot be used in the ORDER BY clause: {1}
+XMLPlanner.The_rowlimit_parameter_{0}_is_not_in_the_scope_of_any_mapping_class=The ''rowlimit'' or ''rowlimitexception'' function parameter ''{0}'' is not an XML node within the scope of any mapping class.
+XMLPlanner.Criteria_{0}_contains_conflicting_row_limits=The criteria ''{0}'' contains conflicting row limits for an XML mapping class.
+AccessNode.rewrite_failed=Failed to rewrite the command: {0}
+BatchedUpdateNode.unexpected_end_of_batch=Unexpectedly reached the end of the batched update counts at {0}, expected {1}.
+row_limit_passed=The row limit {0} has been exceeded for XML mapping class {1}.
+AddNodeInstruction.element__1=element
+AddNodeInstruction.Unable_to_add_xml_{0}_{1},_namespace_{2},_namespace_declarations_{3}_3=Unable to add xml {0} {1}, namespace {2}, namespace declarations {3}
+QueryProcessor.request_cancelled=The request {0} has been cancelled.
+VariableSubstitutionVisitor.Input_vars_should_have_same_changing_state=INPUT variables used in the expression should all have same CHANGING state: {0}
+
+ExecDynamicSqlInstruction.0=Evaluated dynamic SQL expression value was null.
+ExecDynamicSqlInstruction.3=There is a recursive invocation of group ''{0}''. Please correct the SQL.
+ExecDynamicSqlInstruction.4=The dynamic sql string contains an incorrect number of elements.
+ExecDynamicSqlInstruction.6=The datatype ''{0}'' for element ''{1}'' in the dynamic SQL cannot be implicitly converted to ''{2}''.
+ExecDynamicSqlInstruction.couldnt_execute=Couldn''t execute the dynamic SQL command "{0}" with the SQL statement "{1}" due to: {2}
+
+RulePlanJoins.cantSatisfy=Join region with unsatisfied access patterns cannot be satisfied by the join criteria, Access patterns: {0}
+TempTableStore.table_exist_error=Temporary table "{0}" already exists.
+TempTableStore.table_doesnt_exist_error=Temporary table "{0}" does not exist.
+
+XMLQueryPlanner.cannot_plan=Cannot create a query for MappingClass with user criteria {0}
+CriteriaPlanner.staging_context=Staging table criteria cannot contian context functions
+CriteriaPlanner.multiple_staging=Staging table criteria {0} was not specified against a single staging table
+CriteriaPlanner.invalid_context=Element {0} is not in the scope of the context {1}
+CriteriaPlanner.invalid_element=Element {0} is not a valid data node
+results_not_found=Results for the mapping class {0} are not found;
+RulePlanProcedures.no_values=No valid criteria specified for procedure parameter {0}
+ProcedurePlan.nonNullableParam=The procedure parameter is not nullable, but is set to null: {0}
+
+FileStoreageManager.error_creating=Error creating {0}
+FileStoreageManager.error_reading=Error reading {0}
+FileStoreageManager.no_directory=No directory specified for the file storage manager.
+FileStoreageManager.not_a_directory={0} is not a valid storage manager directory.
+FileStoreageManager.space_exhausted=Max buffer space of {0} bytes has been exceed. The current operation will be aborted.
+
+TextTableNode.no_value=No value found for column \"{0}\" in the row ending on text line {1} in {2}.
+TextTableNode.conversion_error=Could not convert value for column \"{0}\" in the row ending on text line {1} in {2}.
+TextTableNode.header_missing=HEADER entry missing for column name \"{0}\" in {1}.
+TextTableNode.unclosed=Text parse error: Unclosed qualifier at end of text in {0}.
+TextTableNode.character_not_allowed=Text parse error: Non-whitespace character found between the qualifier and the delimiter in text line {0} in {1}.
+TextTableNode.unknown_escape=Text parse error: Unknown escape sequence \\{0} in text line {1} in {2}.
+TextTableNode.invalid_width=Text parse error: Fixed width line width {0} is smaller than the expected {1} on text line {2} in {3}.
+
+XMLTableNode.error=Error evaluating XQuery row context for XMLTable: {0}
+XMLTableNode.path_error=Error evaluating XMLTable column path expression for column: {0}
+XMLTableName.multi_value=Unexpected multi-valued result was returned for XMLTable column "{0}". Path expressions for non-XML type columns should return at most a single result.
+
+TempTableDataManager.failed_load=Failed to load materialized view table {0}.
+TempTableDataManager.loaded=Loaded materialized view table {0} with row count {1}.
+TempTableDataManager.loading=Loading materialized view table {0}
+TempTableDataManager.not_implicit_matview={0} does not target an internal materialized view.
+TempTableDataManager.row_refresh_pk=Materialized view {0} cannot have a row refreshed since there is no primary key.
+TempTableDataManager.row_refresh_composite=Materialized view {0} cannot have a row refreshed because it uses a composite key.
+TempTableDataManager.row_refresh_updatable=Materialized view {0} cannot have a row refreshed because it's cache hint did not specify \"updatable\".
+TempTableDataManager.row_refresh=Refreshing row {1} for materialized view {0}.
+CriteriaPlanner.no_context=No root node found.
+
+BasicInterceptor.ProcessTree_for__4=ProcessTree for
+
+
+ConnectorManager.not_in_valid_state=Connector is not in OPEN state
+
+ConnectorManagerImpl.Initializing_connector=Initializing connector {0}
+Cancel_request_failed=AtomicRequest {0} failed to cancel.
+
+ConnectorWorker.MaxResultRowsExceed=The number of result rows has exceeded the maximum result rows "{0}"
+ConnectorWorker.zero_size_non_last_batch=Connector returned a 0 row non-last batch: {0}.
+ConnectorWorker.process_failed=Connector worker process failed for atomic-request={0}
+ConnectorWorker.ConnectorWorker_result_set_unexpected_columns=Could not process stored procedure results for {0}. Expected {1} result set columns, but was {2}. Please update your models to allow for stored procedure results batching.
+
+
+DataTierManager.could_not_obtain_connector_binding=Could not obtain connection factory for model {0} in VDB name= {1}, version {2}
+
+
+DQPCore.Unable_to_load_metadata_for_VDB_name__{0},_version__{1}=Unable to load metadata for VDB name= {0}, version= {1}
+DQPCore.Unknown_query_metadata_exception_while_registering_query__{0}.=Unknown query metadata exception while registering query: {0}.
+DQPCore.Clearing_prepared_plan_cache=Clearing prepared plan cache
+DQPCore.The_request_has_been_closed.=The request {0} has been closed.
+DQPCore.The_atomic_request_has_been_cancelled=The atomic request {0} has been canceled.
+DQPCore.failed_to_cancel=Failed to Cancel request, as request already finished processing
+
+ProcessWorker.failed_rollback=Failed to properly rollback autowrap transaction properly
+ProcessWorker.error=Unexpected exception for request {0}
+ProcessWorker.processing_error=Processing exception ''{0}'' for request {1}. Exception type {2} thrown from {3}. Enable more detailed logging to see the entire stacktrace.
+
+
+# #query (018.005)
+ERR.018.005.0095 = User <{0}> is not entitled to action <{1}> for 1 or more of the groups/elements/procedures.
+
+# services (003)
+
+Request.Invalid_character_in_query=Bind variables (represented as "?") were found but are allowed only in prepared or callable statements.
+
+ProcessWorker.wrongdata=Wrong type of data found or no data found; expecting streamable object from the buffer manager.
+ProcessWorker.LobError=An error occurred during streaming of Lob Chunks to Client.
+
+TransactionServer.existing_transaction=Client thread already involved in a transaction. Transaction nesting is not supported. The current transaction must be completed first.
+TransactionServer.no_transaction=No transaction found for client {0}.
+TransactionServer.concurrent_transaction=Concurrent enlistment in global transaction {0} is not supported.
+TransactionServer.no_global_transaction=Expected an existing global transaction {0} but there was none for client {1}
+TransactionServer.unknown_flags=Unknown flags
+TransactionServer.no_global_transaction=No global transaction found for {0}.
+TransactionServer.wrong_transaction=Client is not currently enlisted in transaction {0}.
+TransactionServer.resume_failed=Cannot resume, transaction {0} was not suspended by client {1}.
+TransactionServer.existing_global_transaction=Global transaction {0} already exists.
+TransactionServer.suspended_exist=Suspended work still exists on transaction {0}.
+
+TransformationMetadata.does_not_exist._1=does not exist.
+TransformationMetadata.Error_trying_to_read_virtual_document_{0},_with_body__n{1}_1=Error trying to read virtual document {0}, with body \n{1}
+TransformationMetadata.Unknown_support_constant___12=Unknown support constant:
+TransformationMetadata.QueryPlan_could_not_be_found_for_physical_group__6=QueryPlan could not be found for physical group
+TransformationMetadata.InsertPlan_could_not_be_found_for_physical_group__8=InsertPlan could not be found for physical group
+TransformationMetadata.InsertPlan_could_not_be_found_for_physical_group__10=InsertPlan could not be found for physical group
+TransformationMetadata.DeletePlan_could_not_be_found_for_physical_group__12=DeletePlan could not be found for physical group
+TransformationMetadata.Error_trying_to_read_schemas_for_the_document/table____1=Error trying to read schemas for the document/table :
+TransformationMetadata.Invalid_type=Invalid type: {0}.
+TransformationMetadata.does_not_exist._1=does not exist.
+TransformationMetadata.0={0} ambiguous, more than one entity matching the same name
+TransformationMetadata.Error_trying_to_read_virtual_document_{0},_with_body__n{1}_1=Error trying to read virtual document {0}, with body \n{1}
+TransformationMetadata.Unknown_support_constant___12=Unknown support constant:
+TransformationMetadata.QueryPlan_could_not_be_found_for_physical_group__6=QueryPlan could not be found for physical group
+TransformationMetadata.InsertPlan_could_not_be_found_for_physical_group__8=InsertPlan could not be found for physical group
+TransformationMetadata.InsertPlan_could_not_be_found_for_physical_group__10=InsertPlan could not be found for physical group
+TransformationMetadata.DeletePlan_could_not_be_found_for_physical_group__12=DeletePlan could not be found for physical group
+TransformationMetadata.Error_trying_to_read_schemas_for_the_document/table____1=Error trying to read schemas for the document/table :
+TransformationMetadata.Invalid_type=Invalid type: {0}.
+
+CachedFinder.no_connector_found=No connector with jndi-name {0} found for Model {1} with source name {2}
+translator_not_found=Translator {0} not accessible.
+datasource_not_found=Data Source {0} not accessible.
+
+RequestWorkItem.cache_nondeterministic=Caching command '{0}'' at a session level, but less deterministic functions were evaluated.
+not_found_cache=Results not found in cache
+failed_to_unwrap_connection=Failed to unwrap the source connection.
+connection_factory_not_found=Failed to the Connection Factory with JNDI name {0}. Please check the name for spelling or deploy the Connection Factory with specified name.
\ No newline at end of file
Modified: trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestDQPWorkContext.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestDQPWorkContext.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestDQPWorkContext.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -22,6 +22,11 @@
package org.teiid.dqp.internal.process;
+import java.util.Map;
+
+import org.mockito.Mockito;
+import org.teiid.adminapi.DataPolicy;
+import org.teiid.adminapi.impl.SessionMetadata;
import org.teiid.core.util.UnitTestUtil;
import junit.framework.TestCase;
@@ -58,4 +63,16 @@
assertEquals("querybuilder", copy.getAppName()); //$NON-NLS-1$
}
+
+ public void testClearPolicies() {
+ DQPWorkContext message = new DQPWorkContext();
+ message.setSession(Mockito.mock(SessionMetadata.class));
+ Map<String, DataPolicy> map = message.getAllowedDataPolicies();
+ map.put("role", Mockito.mock(DataPolicy.class)); //$NON-NLS-1$
+ assertFalse(map.isEmpty());
+
+ message.setSession(Mockito.mock(SessionMetadata.class));
+ map = message.getAllowedDataPolicies();
+ assertTrue(map.isEmpty());
+ }
}
Modified: trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestSessionAwareCache.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestSessionAwareCache.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestSessionAwareCache.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -111,6 +111,29 @@
assertTrue(result==c);
}
+
+ @Test
+ public void testVDBRemoval() {
+
+ SessionAwareCache<Cachable> cache = new SessionAwareCache<Cachable>();
+
+ CacheID id = new CacheID(buildWorkContext(), new ParseInfo(), "SELECT * FROM FOO");
+
+ Cachable result = Mockito.mock(Cachable.class);
+ Mockito.stub(result.prepare((Cache)anyObject(), (BufferManager)anyObject())).toReturn(true);
+ Mockito.stub(result.restore((Cache)anyObject(), (BufferManager)anyObject())).toReturn(true);
+
+ id = new CacheID(buildWorkContext(), new ParseInfo(), "SELECT * FROM FOO");
+ cache.put(id, FunctionMethod.VDB_DETERMINISTIC, result, null);
+
+ Object c = cache.get(id);
+
+ assertTrue(result==c);
+
+ cache.clearForVDB("vdb-name", 1);
+
+ assertNull(cache.get(id));
+ }
public static DQPWorkContext buildWorkContext() {
Modified: trunk/engine/src/test/java/org/teiid/query/optimizer/relational/rules/TestCalculateCostUtil.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/optimizer/relational/rules/TestCalculateCostUtil.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/test/java/org/teiid/query/optimizer/relational/rules/TestCalculateCostUtil.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -24,6 +24,9 @@
import static org.junit.Assert.*;
+import java.util.Arrays;
+
+import org.junit.Ignore;
import org.junit.Test;
import org.teiid.api.exception.query.QueryMetadataException;
import org.teiid.core.TeiidComponentException;
@@ -35,7 +38,6 @@
import org.teiid.query.optimizer.relational.plantree.NodeConstants;
import org.teiid.query.optimizer.relational.plantree.NodeFactory;
import org.teiid.query.optimizer.relational.plantree.PlanNode;
-import org.teiid.query.optimizer.relational.rules.NewCalculateCostUtil;
import org.teiid.query.parser.QueryParser;
import org.teiid.query.processor.TestVirtualDepJoin;
import org.teiid.query.processor.relational.RelationalPlan;
@@ -47,7 +49,7 @@
import org.teiid.query.unittest.FakeMetadataObject;
import org.teiid.query.util.CommandContext;
-
+@SuppressWarnings("nls")
public class TestCalculateCostUtil {
// =====================================================================
@@ -303,6 +305,21 @@
float cost = NewCalculateCostUtil.computeCostForTree(joinNode, metadata);
assertTrue(cost == NewCalculateCostUtil.UNKNOWN_VALUE);
}
+
+ @Ignore("this logic needs to be refined to work better")
+ @Test public void testEstimateJoinNodeCostOneUnknown() throws Exception {
+ QueryMetadataInterface metadata = FakeMetadataFactory.example4();
+ PlanNode joinNode = helpGetJoinNode(NewCalculateCostUtil.UNKNOWN_VALUE, 500, JoinType.JOIN_INNER);
+ joinNode.setProperty(NodeConstants.Info.JOIN_CRITERIA, Arrays.asList(helpGetCriteria("pm1.g1.e1 = pm1.g2.e1", metadata)));
+ float cost = NewCalculateCostUtil.computeCostForTree(joinNode, metadata);
+ assertEquals(10000, cost, 0);
+ }
+
+ @Test public void testEstimateNdvPostJoin() throws Exception {
+ String query = "SELECT account FROM US.Accounts, Europe.CustAccts, CustomerMaster.Customers where account + accid + CustomerMaster.Customers.id = 1000000"; //$NON-NLS-1$
+
+ helpTestQuery(1E9f, query, new String[] {"SELECT g_0.accid FROM Europe.CustAccts AS g_0", "SELECT g_0.id FROM CustomerMaster.Customers AS g_0", "SELECT g_0.account FROM US.Accounts AS g_0"});
+ }
/**
* cases 2159 and 2160, defect 14998
@@ -732,10 +749,17 @@
op +
"SELECT id, convert(accid / 10000, long), mod(accid, 10000), convert(type, integer), amount, 'EU' from Europe.CustAccts"; //$NON-NLS-1$
- RelationalPlan plan = (RelationalPlan)TestOptimizer.helpPlan(query, TestVirtualDepJoin.exampleVirtualDepJoin(), new String[] {"SELECT g_0.customer, g_0.account, g_0.txnid, g_0.txn, g_0.pennies FROM US.Accounts AS g_0 WHERE g_0.txn <> 'X'", "SELECT g_0.id, g_0.accid, g_0.type, g_0.amount FROM Europe.CustAccts AS g_0"}, ComparisonMode.EXACT_COMMAND_STRING); //$NON-NLS-1$ //$NON-NLS-2$
+ String[] expected = new String[] {"SELECT g_0.customer, g_0.account, g_0.txnid, g_0.txn, g_0.pennies FROM US.Accounts AS g_0 WHERE g_0.txn <> 'X'", "SELECT g_0.id, g_0.accid, g_0.type, g_0.amount FROM Europe.CustAccts AS g_0"};
+ helpTestQuery(cost, query, expected);
+ }
+
+ private void helpTestQuery(float cost, String query, String[] expected)
+ throws TeiidComponentException, TeiidProcessingException {
+ RelationalPlan plan = (RelationalPlan)TestOptimizer.helpPlan(query, TestVirtualDepJoin.exampleVirtualDepJoin(), expected, ComparisonMode.EXACT_COMMAND_STRING); //$NON-NLS-1$ //$NON-NLS-2$
+
assertEquals(cost, plan.getRootNode().getEstimateNodeCardinality());
- }
+ }
@Test public void testUnion() throws Exception {
helpTestSetOp("UNION ", 1375000.0f); //$NON-NLS-1$
Modified: trunk/engine/src/test/java/org/teiid/query/optimizer/relational/rules/TestCriteriaCapabilityValidatorVisitor.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/optimizer/relational/rules/TestCriteriaCapabilityValidatorVisitor.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/test/java/org/teiid/query/optimizer/relational/rules/TestCriteriaCapabilityValidatorVisitor.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -51,7 +51,7 @@
QueryResolver.resolveCriteria(criteria, metadata);
- assertEquals("Got incorrect isValid flag", isValid, CriteriaCapabilityValidatorVisitor.canPushLanguageObject(criteria, modelID, metadata, capFinder)); //$NON-NLS-1$
+ assertEquals("Got incorrect isValid flag", isValid, CriteriaCapabilityValidatorVisitor.canPushLanguageObject(criteria, modelID, metadata, capFinder, null)); //$NON-NLS-1$
} catch(QueryMetadataException e) {
if (!expectException) {
throw new RuntimeException(e);
@@ -68,7 +68,7 @@
QueryResolver.resolveCommand(command, metadata);
- assertEquals("Got incorrect isValid flag", isValid, CriteriaCapabilityValidatorVisitor.canPushLanguageObject(command, modelID, metadata, capFinder)); //$NON-NLS-1$
+ assertEquals("Got incorrect isValid flag", isValid, CriteriaCapabilityValidatorVisitor.canPushLanguageObject(command, modelID, metadata, capFinder, null)); //$NON-NLS-1$
} catch(QueryMetadataException e) {
if (!expectException) {
throw new RuntimeException(e);
Modified: trunk/engine/src/test/java/org/teiid/query/optimizer/relational/rules/TestRuleChooseDependent.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/optimizer/relational/rules/TestRuleChooseDependent.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/test/java/org/teiid/query/optimizer/relational/rules/TestRuleChooseDependent.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -213,9 +213,7 @@
null,
null,
joinCriteria,
- expectedMadeDependent);
-
-
+ expectedMadeDependent, null, null);
}
/**
@@ -253,7 +251,7 @@
Criteria atomicRequestCrit2a, //optional
Collection atomicJoinCriteria2, //optional
Collection joinCriteria,
- int expectedMadeDependent) throws QueryPlannerException, QueryMetadataException, TeiidComponentException {
+ int expectedMadeDependent, Number expectedCost1, Number expectedCost2) throws QueryPlannerException, QueryMetadataException, TeiidComponentException {
//EXAMPLE:
// Project(groups=[])
// Join(groups=[], props={21=joinCriteria, 23=true, 22=INNER JOIN})
@@ -407,6 +405,10 @@
Float cost2 = (Float)accessNode2.getProperty(NodeConstants.Info.EST_CARDINALITY);
assertNotNull(cost2);
assertNotNull(cost1);
+ if (expectedCost1 != null) {
+ assertEquals(expectedCost1.longValue(), cost1.longValue());
+ assertEquals(expectedCost2.longValue(), cost2.longValue());
+ }
}
// ################################## ACTUAL TESTS ################################
@@ -574,9 +576,9 @@
atomicCrit2a,
atomicJoinCrits2,
crits,
- expected);
+ expected, -1, 57734);
}
-
+
/**
* Tests that heuristics will take cardinality of a group into account when
* making a dependent join.
@@ -1064,7 +1066,7 @@
atomicCrit2a,
atomicJoinCrits2,
crits,
- expected);
+ expected, 1000, 1);
}
public void testCardinalityWithAtomicCrossJoin() throws Exception {
@@ -1110,7 +1112,7 @@
atomicCrit2a,
atomicJoinCrits2,
crits,
- expected);
+ expected, 1000, 1E5);
}
public void testCardinalityWithAtomicCrossJoin2() throws Exception {
@@ -1156,7 +1158,7 @@
atomicCrit2a,
atomicJoinCrits2,
crits,
- expected);
+ expected, 1000, 9999899648l);
}
// ################################## TEST SUITE ################################
Modified: trunk/engine/src/test/java/org/teiid/query/processor/TestMaterialization.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/processor/TestMaterialization.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/test/java/org/teiid/query/processor/TestMaterialization.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -31,6 +31,7 @@
import org.junit.Before;
import org.junit.Test;
+import org.teiid.cache.DefaultCacheFactory;
import org.teiid.common.buffer.BufferManager;
import org.teiid.common.buffer.BufferManagerFactory;
import org.teiid.core.TeiidProcessingException;
@@ -73,7 +74,7 @@
command.run();
}
};
- dataManager = new TempTableDataManager(hdm, bm, executor, cache);
+ dataManager = new TempTableDataManager(hdm, bm, executor, cache, cache, new DefaultCacheFactory());
}
private void execute(String sql, List<?>... expectedResults) throws Exception {
Modified: trunk/engine/src/test/java/org/teiid/query/processor/TestProcessor.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/processor/TestProcessor.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/test/java/org/teiid/query/processor/TestProcessor.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -254,7 +254,7 @@
command.run();
}
};
- dataManager = new TempTableDataManager(dataManager, bufferMgr, executor, cache);
+ dataManager = new TempTableDataManager(dataManager, bufferMgr, executor, cache, null, null);
}
if (context.getQueryProcessorFactory() == null) {
context.setQueryProcessorFactory(new QueryProcessorFactoryImpl(bufferMgr, dataManager, new DefaultCapabilitiesFinder(), null, context.getMetadata()));
Modified: trunk/engine/src/test/java/org/teiid/query/processor/TestTempTables.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/processor/TestTempTables.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/test/java/org/teiid/query/processor/TestTempTables.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -36,6 +36,7 @@
import org.teiid.core.TeiidProcessingException;
import org.teiid.dqp.internal.process.CachedResults;
import org.teiid.dqp.internal.process.SessionAwareCache;
+import org.teiid.query.function.metadata.FunctionMethod;
import org.teiid.query.metadata.TempMetadataAdapter;
import org.teiid.query.tempdata.TempTableDataManager;
import org.teiid.query.tempdata.TempTableStore;
@@ -57,6 +58,7 @@
CommandContext cc = TestProcessor.createCommandContext();
cc.setTempTableStore(tempStore);
TestProcessor.doProcess(processorPlan, dataManager, expectedResults, cc);
+ assertTrue(cc.getDeterminismLevel() <= FunctionMethod.SESSION_DETERMINISTIC);
}
@Before public void setUp() {
@@ -73,7 +75,7 @@
command.run();
}
};
- dataManager = new TempTableDataManager(fdm, bm, executor, cache);
+ dataManager = new TempTableDataManager(fdm, bm, executor, cache, null, null);
}
@Test public void testInsertWithQueryExpression() throws Exception {
Modified: trunk/engine/src/test/java/org/teiid/query/resolver/TestResolver.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/resolver/TestResolver.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/test/java/org/teiid/query/resolver/TestResolver.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -98,7 +98,6 @@
import org.teiid.query.unittest.FakeMetadataStore;
import org.teiid.query.unittest.RealMetadataFactory;
import org.teiid.query.unittest.TimestampUtil;
-import org.teiid.query.util.ErrorMessageKeys;
@SuppressWarnings("nls")
public class TestResolver {
@@ -1983,16 +1982,28 @@
@Test public void testUnaliasedOrderBySucceeds() {
helpResolve("SELECT pm1.g1.e1 a, pm1.g1.e1 b FROM pm1.g1 ORDER BY pm1.g1.e1"); //$NON-NLS-1$
}
+
+ @Test public void testUnaliasedOrderBySucceeds1() {
+ helpResolve("SELECT pm1.g1.e1 a FROM pm1.g1 group by pm1.g1.e1 ORDER BY pm1.g1.e1"); //$NON-NLS-1$
+ }
+
+ @Test public void testUnaliasedOrderByFails() {
+ helpResolveException("SELECT pm1.g1.e1 e2 FROM pm1.g1 group by pm1.g1.e1 ORDER BY pm1.g1.e2"); //$NON-NLS-1$
+ }
+
+ @Test public void testUnaliasedOrderByFails1() {
+ helpResolveException("SELECT pm1.g1.e1 e2 FROM pm1.g1 group by pm1.g1.e1 ORDER BY pm1.g1.e2 + 1"); //$NON-NLS-1$
+ }
/**
* the group g1 is not known to the order by clause of a union
*/
@Test public void testUnionOrderByFail() {
- helpResolveException("SELECT pm1.g1.e1 FROM pm1.g1 UNION SELECT pm1.g2.e1 FROM pm1.g2 ORDER BY g1.e1", "Error Code:ERR.015.008.0043 Message:Element 'g1.e1' in ORDER BY was not found in SELECT clause."); //$NON-NLS-1$ //$NON-NLS-2$
+ helpResolveException("SELECT pm1.g1.e1 FROM pm1.g1 UNION SELECT pm1.g2.e1 FROM pm1.g2 ORDER BY g1.e1", "ORDER BY expression 'g1.e1' cannot be used with a set query."); //$NON-NLS-1$ //$NON-NLS-2$
}
@Test public void testUnionOrderByFail1() {
- helpResolveException("SELECT pm1.g1.e1 FROM pm1.g1 UNION SELECT pm1.g2.e1 FROM pm1.g2 ORDER BY pm1.g1.e1", "Error Code:ERR.015.008.0043 Message:Element 'pm1.g1.e1' in ORDER BY was not found in SELECT clause."); //$NON-NLS-1$ //$NON-NLS-2$
+ helpResolveException("SELECT pm1.g1.e1 FROM pm1.g1 UNION SELECT pm1.g2.e1 FROM pm1.g2 ORDER BY pm1.g1.e1", "ORDER BY expression 'pm1.g1.e1' cannot be used with a set query."); //$NON-NLS-1$ //$NON-NLS-2$
}
@Test public void testOrderByPartiallyQualified() {
@@ -2888,7 +2899,7 @@
fail("expected exception");
} catch (RuntimeException e) {
QueryResolverException qre = (QueryResolverException)e.getCause();
- assertEquals(ErrorMessageKeys.RESOLVER_0040, qre.getCode());
+ assertEquals("ERR.015.008.0040", qre.getCode());
}
}
Modified: trunk/engine/src/test/java/org/teiid/query/rewriter/TestQueryRewriter.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/query/rewriter/TestQueryRewriter.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/engine/src/test/java/org/teiid/query/rewriter/TestQueryRewriter.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -1030,7 +1030,7 @@
procedure = procedure + "Declare String var1;\n"; //$NON-NLS-1$
procedure = procedure + "if(var1 = 'x' or var1 = 'y')\n"; //$NON-NLS-1$
procedure = procedure + "BEGIN\n"; //$NON-NLS-1$
- procedure = procedure + "Select pm1.g1.e2, Input.e2, CHANGING.e2, CHANGING.e1 from pm1.g1 order by CHANGING.e1;\n"; //$NON-NLS-1$
+ procedure = procedure + "Select pm1.g1.e2, Input.e2, CHANGING.e2, CHANGING.e1 from pm1.g1 order by CHANGING.e1 + 1;\n"; //$NON-NLS-1$
procedure = procedure + "END\n"; //$NON-NLS-1$
procedure = procedure + "END\n"; //$NON-NLS-1$
Modified: trunk/hibernate-dialect/pom.xml
===================================================================
--- trunk/hibernate-dialect/pom.xml 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/hibernate-dialect/pom.xml 2010-09-24 18:51:07 UTC (rev 2603)
@@ -1,6 +1,6 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
- <artifactId>teiid</artifactId>
+ <artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
<version>7.2.0.Alpha2-SNAPSHOT</version>
</parent>
Modified: trunk/jboss-integration/pom.xml
===================================================================
--- trunk/jboss-integration/pom.xml 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/jboss-integration/pom.xml 2010-09-24 18:51:07 UTC (rev 2603)
@@ -1,6 +1,6 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
- <artifactId>teiid</artifactId>
+ <artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
<version>7.2.0.Alpha2-SNAPSHOT</version>
</parent>
Modified: trunk/jboss-integration/src/main/java/org/teiid/adminapi/jboss/Admin.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/adminapi/jboss/Admin.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/jboss-integration/src/main/java/org/teiid/adminapi/jboss/Admin.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -383,7 +383,7 @@
info = getView().getTemplate(TranslatorMetaData.TRANSLATOR_PREFIX+templateName);
}
if(info == null) {
- throw new AdminProcessingException(IntegrationPlugin.Util.getString("connector_type_not_found", templateName)); //$NON-NLS-1$
+ throw new AdminProcessingException(IntegrationPlugin.Util.getString("template_not_found", templateName)); //$NON-NLS-1$
}
ArrayList<PropertyDefinition> props = new ArrayList<PropertyDefinition>();
@@ -544,29 +544,34 @@
throw new AdminProcessingException(IntegrationPlugin.Util.getString("policy_not_found", policyName, vdbName, vdbVersion)); //$NON-NLS-1$
}
- ManagedProperty mappedRoleNames = managedPolicy.getProperty("mappedRoleNames");//$NON-NLS-1$
- CollectionValueSupport roleCollection = (CollectionValueSupport)mappedRoleNames.getValue();
- ArrayList<MetaValue> modifiedRoleNames = new ArrayList<MetaValue>();
- if (roleCollection != null) {
- MetaValue[] roleNames = roleCollection.getElements();
- for (MetaValue mv:roleNames) {
- String existing = (String)((SimpleValueSupport)mv).getValue();
- if (!existing.equals(role)) {
- modifiedRoleNames.add(mv);
- }
+ if (role != null) {
+ ManagedProperty mappedRoleNames = managedPolicy.getProperty("mappedRoleNames");//$NON-NLS-1$
+ CollectionValueSupport roleCollection = (CollectionValueSupport)mappedRoleNames.getValue();
+ ArrayList<MetaValue> modifiedRoleNames = new ArrayList<MetaValue>();
+ if (roleCollection != null) {
+ MetaValue[] roleNames = roleCollection.getElements();
+ for (MetaValue mv:roleNames) {
+ String existing = (String)((SimpleValueSupport)mv).getValue();
+ if (!existing.equals(role)) {
+ modifiedRoleNames.add(mv);
+ }
+ }
}
- }
- else {
- roleCollection = new CollectionValueSupport(new CollectionMetaType("java.util.List", SimpleMetaType.STRING)); //$NON-NLS-1$
- mappedRoleNames.setValue(roleCollection);
- }
-
- if (add) {
- modifiedRoleNames.add(ManagedUtil.wrap(SimpleMetaType.STRING, role));
- }
-
- roleCollection.setElements(modifiedRoleNames.toArray(new MetaValue[modifiedRoleNames.size()]));
-
+ else {
+ roleCollection = new CollectionValueSupport(new CollectionMetaType("java.util.List", SimpleMetaType.STRING)); //$NON-NLS-1$
+ mappedRoleNames.setValue(roleCollection);
+ }
+
+ if (add) {
+ modifiedRoleNames.add(ManagedUtil.wrap(SimpleMetaType.STRING, role));
+ }
+
+ roleCollection.setElements(modifiedRoleNames.toArray(new MetaValue[modifiedRoleNames.size()]));
+ } else {
+ ManagedProperty anyAuthenticated = managedPolicy.getProperty("anyAuthenticated");//$NON-NLS-1$
+ anyAuthenticated.setValue(SimpleValueSupport.wrap(add));
+ }
+
try {
getView().updateComponent(mc);
} catch (Exception e) {
@@ -584,6 +589,12 @@
public void removeDataRoleMapping(String vdbName, int vdbVersion, String policyName, String role) throws AdminException{
manageRoleToDataPolicy(vdbName, vdbVersion, policyName, role, false);
}
+
+ @Override
+ public void setAnyAuthenticatedForDataRole(String vdbName, int vdbVersion,
+ String dataRole, boolean anyAuthenticated) throws AdminException {
+ manageRoleToDataPolicy(vdbName, vdbVersion, dataRole, null, anyAuthenticated);
+ }
@Override
public void mergeVDBs(String sourceVDBName, int sourceVDBVersion, String targetVDBName, int targetVDBVersion) throws AdminException {
Modified: trunk/jboss-integration/src/main/java/org/teiid/adminapi/jboss/ManagedUtil.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/adminapi/jboss/ManagedUtil.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/jboss-integration/src/main/java/org/teiid/adminapi/jboss/ManagedUtil.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -224,7 +224,6 @@
public static void deployArchive(DeploymentManager deploymentManager, String fileName, URL resourceURL, boolean deployExploded) throws AdminProcessingException {
List<DeploymentOption> deploymentOptions = new ArrayList<DeploymentOption>();
- deploymentOptions.add(DeploymentOption.FailIfExists);
if (deployExploded) {
deploymentOptions.add(DeploymentOption.Explode);
}
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/deployers/RuntimeEngineDeployer.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/deployers/RuntimeEngineDeployer.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/deployers/RuntimeEngineDeployer.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -49,6 +49,7 @@
import org.teiid.adminapi.Admin;
import org.teiid.adminapi.AdminComponentException;
import org.teiid.adminapi.AdminException;
+import org.teiid.adminapi.Admin.Cache;
import org.teiid.adminapi.impl.CacheStatisticsMetadata;
import org.teiid.adminapi.impl.DQPManagement;
import org.teiid.adminapi.impl.RequestMetadata;
@@ -62,6 +63,7 @@
import org.teiid.core.ComponentNotFoundException;
import org.teiid.core.TeiidComponentException;
import org.teiid.core.TeiidRuntimeException;
+import org.teiid.deployers.VDBLifeCycleListener;
import org.teiid.deployers.VDBRepository;
import org.teiid.dqp.internal.process.DQPConfiguration;
import org.teiid.dqp.internal.process.DQPCore;
@@ -143,7 +145,11 @@
}
}
}
-
+ /*
+ * having only a single clientserviceregistry means that the admin and jdbc ports are functionally equivalent.
+ * this is an undocuemented feature. Designer integration relies on this to use the same port
+ * for admin and preview logic.
+ */
this.csr.registerClientService(ILogon.class, logon, LogConstants.CTX_SECURITY);
this.csr.registerClientService(DQP.class, proxyService(DQP.class, this.dqpCore, LogConstants.CTX_DQP), LogConstants.CTX_DQP);
this.csr.registerClientService(Admin.class, proxyService(Admin.class, admin, LogConstants.CTX_ADMIN_API), LogConstants.CTX_ADMIN_API);
@@ -181,6 +187,34 @@
LogManager.logError(LogConstants.CTX_RUNTIME, ne, IntegrationPlugin.Util.getString("jndi_failed", new Date(System.currentTimeMillis()).toString())); //$NON-NLS-1$
}
}
+
+ // add vdb life cycle listeners
+ this.vdbRepository.addListener(new VDBLifeCycleListener() {
+
+ @Override
+ public void removed(String name, int version) {
+
+ }
+
+ @Override
+ public void added(String name, int version) {
+ // terminate all the previous sessions
+ try {
+ Collection<SessionMetadata> sessions = sessionService.getActiveSessions();
+ for (SessionMetadata session:sessions) {
+ if (name.equalsIgnoreCase(session.getVDBName()) && version == session.getVDBVersion()){
+ sessionService.terminateSession(session.getSessionId(), null);
+ }
+ }
+ } catch (SessionServiceException e) {
+ //ignore
+ }
+
+ // dump the caches.
+ dqpCore.clearCache(Cache.PREPARED_PLAN_CACHE.toString(), name, version);
+ dqpCore.clearCache(Cache.QUERY_SERVICE_RESULT_SET_CACHE.toString(), name, version);
+ }
+ });
}
public void stop() {
Modified: trunk/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties
===================================================================
--- trunk/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/jboss-integration/src/main/resources/org/teiid/jboss/i18n.properties 2010-09-24 18:51:07 UTC (rev 2603)
@@ -21,30 +21,27 @@
#
engine_started=Teiid Engine Started = {0}
-socket_not_enabled=Socket transport for {0} is not enabled in Teiid.
socket_enabled={0} {1}
odbc_not_enabled=ODBC transport is not enabled in Teiid.
odbc_enabled={0} {1}
engine_stopped=Teiid Engine stopped {0}
admin_connection_closed=Teiid admin connection is already closed.
-translator_exists=Translator with name {0} already exists in the configuration
-translator_does_not_exist=Translator with name {0} does not exist in the configuration
bad_vdb_extension=The extension of the file name must be either ".vdb" for designer vdb or "xxx-vdb.xml" for dynamic VDBs
-translator_template_not_found=Template with name {0} not found for creating a translator
vdb_not_found=VDB with name "{0}" version "{1}" not found in configuration
model_not_found=Model name "{0}" not found in the VDB with name "{1}" version "{2}"
policy_not_found=Policy name "{0}" not found in the VDB with name "{1}" version "{2}"
-connectionfactory_not_found=Connection factory {0} not found in the configuration.
datasource_not_found=Datasource {0} not found in the configuration.
sourcename_not_found=No source name {0} found in the model: {1}.{2}.{3}
no_operation=No operation found with given name = {0}
failed_to_remove=Failed to remove the deployment
-distibute_failed={0} distribute failed.
deployment_start_failed={0} deployment start failed
failed_to_convert=Failed to convert from String value to {0} type
property_required_not_found="{0}" is required for the connector type "{1}", but was not supplied; There is no default value either.
invalid_class={0} invalid type of class specified. Must be of type org.teiid.connector.api.ConnectorEnvironment
class_not_found=Class {0} not found.
datasource_exists=Data source with name {0} already exists!
-datasource_template_not_found=Template {0} for creating the data source is not found.
\ No newline at end of file
+datasource_template_not_found=Template {0} for creating the data source is not found.
+jndi_failed=JNDI lookup failed.
+distribute_failed=Deploy of the archive failed {0}
+template_not_found=Template not found for {0}
Modified: trunk/metadata/pom.xml
===================================================================
--- trunk/metadata/pom.xml 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/metadata/pom.xml 2010-09-24 18:51:07 UTC (rev 2603)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
- <artifactId>teiid</artifactId>
+ <artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
<version>7.2.0.Alpha2-SNAPSHOT</version>
</parent>
Modified: trunk/metadata/src/main/java/org/teiid/metadata/index/IndexMetadataFactory.java
===================================================================
--- trunk/metadata/src/main/java/org/teiid/metadata/index/IndexMetadataFactory.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/metadata/src/main/java/org/teiid/metadata/index/IndexMetadataFactory.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -43,7 +43,6 @@
import org.teiid.adminapi.impl.ModelMetaData;
import org.teiid.adminapi.impl.VDBMetaData;
import org.teiid.api.exception.query.QueryMetadataException;
-import org.teiid.core.CoreConstants;
import org.teiid.core.TeiidException;
import org.teiid.core.TeiidRuntimeException;
import org.teiid.core.id.UUID;
@@ -210,21 +209,11 @@
this.vdbEntries = visibilityMap;
}
- private final static boolean isSystemModelWithSystemTableType(String modelName) {
- return CoreConstants.SYSTEM_MODEL.equalsIgnoreCase(modelName);
- }
-
private boolean isFileVisible(String pathInVDB, VDBMetaData vdb) {
if (pathInVDB.endsWith(".xmi")) { //$NON-NLS-1$
String modelName = StringUtil.getFirstToken(StringUtil.getLastToken(pathInVDB, "/"), "."); //$NON-NLS-1$ //$NON-NLS-2$
- // If this is any of the Public System Models, like JDBC,ODBC system
- // models
- if (isSystemModelWithSystemTableType(modelName)) {
- return true;
- }
-
ModelMetaData model = vdb.getModel(modelName);
if (model != null) {
return model.isVisible();
Modified: trunk/metadata/src/main/resources/System.vdb
===================================================================
(Binary files differ)
Modified: trunk/metadata/src/main/resources/org/teiid/metadata/i18n.properties
===================================================================
--- trunk/metadata/src/main/resources/org/teiid/metadata/i18n.properties 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/metadata/src/main/resources/org/teiid/metadata/i18n.properties 2010-09-24 18:51:07 UTC (rev 2603)
@@ -24,4 +24,5 @@
# Note: All new messages should have been looked up before being logged! DON'T use I18nLogManager!
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-TransformationMetadata.0={0} ambiguous, more than one entity matching the same name
\ No newline at end of file
+TransformationMetadata.0={0} ambiguous, more than one entity matching the same name
+exception.wrongFormat=Index file in wrong format
\ No newline at end of file
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/pom.xml 2010-09-24 18:51:07 UTC (rev 2603)
@@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.teiid</groupId>
- <artifactId>teiid</artifactId>
+ <artifactId>teiid-parent</artifactId>
<packaging>pom</packaging>
<name>Teiid</name>
<version>7.2.0.Alpha2-SNAPSHOT</version>
@@ -67,61 +67,25 @@
</developer>
</developers>
<profiles>
- <profile>
- <!--
+ <profile>
+ <!--
This profile is activated manually, as in "mvn ... -P release ..."
-->
- <id>release</id>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <version>2.2-beta-5</version>
- <configuration>
- <descriptors>
- <descriptor>build/assembly/src.xml</descriptor>
- <descriptor>build/assembly/docs.xml</descriptor>
- <descriptor>build/assembly/client-jar.xml</descriptor>
- <descriptor>build/assembly/jboss-container/dist.xml</descriptor>
- <descriptor>build/assembly/adminshell/adminshell-dist.xml</descriptor>
- </descriptors>
- <outputDirectory>target/distribution</outputDirectory>
- <workDirectory>target/assembly/work</workDirectory>
- </configuration>
- </plugin>
- </plugins>
- </build>
- <modules>
- <module>build</module>
- <module>documentation</module>
- </modules>
- </profile>
- <profile>
- <!--
+ <id>release</id>
+ <modules>
+ <module>documentation</module>
+ <module>build</module>
+ </modules>
+ </profile>
+ <profile>
+ <!--
This is to enable faster build for development time.
-->
- <id>dev</id>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <version>2.2-beta-5</version>
- <configuration>
- <descriptors>
- <descriptor>build/assembly/client-jar.xml</descriptor>
- <descriptor>build/assembly/jboss-container/dist.xml</descriptor>
- <descriptor>build/assembly/adminshell/adminshell-dist.xml</descriptor>
- </descriptors>
- <outputDirectory>target/distribution</outputDirectory>
- <workDirectory>target/assembly/work</workDirectory>
- </configuration>
- </plugin>
- </plugins>
- </build>
- <modules>
- <module>build</module>
- </modules>
- </profile>
+ <id>dev</id>
+ <modules>
+ <module>build</module>
+ </modules>
+ </profile>
</profiles>
<build>
<!-- This section defines the default plugin settings inherited by child projects. -->
@@ -133,6 +97,10 @@
<artifactId>maven-jar-plugin</artifactId>
<version>2.2</version>
</plugin>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.2-beta-6-m1-jboss</version>
+ </plugin>
</plugins>
</pluginManagement>
<plugins>
@@ -481,7 +449,7 @@
<dependency>
<groupId>org.jboss.netty</groupId>
<artifactId>netty</artifactId>
- <version>3.2.0.Final</version>
+ <version>3.2.1.Final</version>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
@@ -504,7 +472,7 @@
<module>hibernate-dialect</module>
<module>jboss-integration</module>
<module>test-integration</module>
- </modules>
+ </modules>
<distributionManagement>
<repository>
<id>jboss-releases-repository</id>
@@ -517,4 +485,4 @@
<url>https://repository.jboss.org/nexus/content/repositories/snapshots/</url>
</snapshotRepository>
</distributionManagement>
-</project>
+</project>
\ No newline at end of file
Modified: trunk/runtime/pom.xml
===================================================================
--- trunk/runtime/pom.xml 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/runtime/pom.xml 2010-09-24 18:51:07 UTC (rev 2603)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
- <artifactId>teiid</artifactId>
+ <artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
<version>7.2.0.Alpha2-SNAPSHOT</version>
</parent>
Modified: trunk/runtime/src/main/java/org/teiid/deployers/VDBDeployer.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/deployers/VDBDeployer.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/runtime/src/main/java/org/teiid/deployers/VDBDeployer.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -171,9 +171,6 @@
IdentityHashMap<Translator, ExecutionFactory<Object, Object>> map = new IdentityHashMap<Translator, ExecutionFactory<Object, Object>>();
for (Model model:deployment.getModels()) {
- if (model.getName().equals(CoreConstants.SYSTEM_MODEL) || model.getName().equals(CoreConstants.ODBC_MODEL)){
- continue;
- }
for (String source:model.getSourceNames()) {
if (cmr.getConnectorManager(source) != null) {
continue;
@@ -207,9 +204,6 @@
ModelMetaData model = (ModelMetaData)m;
List<SourceMappingMetadata> mappings = model.getSourceMappings();
for (SourceMappingMetadata mapping:mappings) {
- if (mapping.getName().equals(CoreConstants.SYSTEM_MODEL) || model.getName().equals(CoreConstants.ODBC_MODEL)) {
- continue;
- }
ConnectorManager cm = cmr.getConnectorManager(mapping.getName());
String msg = cm.getStausMessage();
if (msg != null && msg.length() > 0) {
@@ -274,10 +268,6 @@
// make sure we are configured correctly first
for (final ModelMetaData model:vdb.getModelMetaDatas().values()) {
- if (model.getName().equals(CoreConstants.SYSTEM_MODEL) || model.getName().equals(CoreConstants.ODBC_MODEL)){
- continue;
- }
-
if (model.getSourceNames().isEmpty()) {
throw new DeploymentException(RuntimePlugin.Util.getString("fail_to_deploy", vdb.getName()+"-"+vdb.getVersion(), model.getName())); //$NON-NLS-1$ //$NON-NLS-2$
}
@@ -310,7 +300,7 @@
private void loadMetadata(VDBMetaData vdb, ModelMetaData model, boolean cache, File cacheFile, MetadataStoreGroup vdbStore, ConnectorManagerRepository cmr) {
Exception exception = null;
- boolean loaded = false;;
+ boolean loaded = false;
for (String sourceName: model.getSourceNames()) {
ConnectorManager cm = cmr.getConnectorManager(sourceName);
if (cm == null) {
Copied: trunk/runtime/src/main/java/org/teiid/deployers/VDBLifeCycleListener.java (from rev 2599, branches/7.1.x/runtime/src/main/java/org/teiid/deployers/VDBLifeCycleListener.java)
===================================================================
--- trunk/runtime/src/main/java/org/teiid/deployers/VDBLifeCycleListener.java (rev 0)
+++ trunk/runtime/src/main/java/org/teiid/deployers/VDBLifeCycleListener.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -0,0 +1,27 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+package org.teiid.deployers;
+
+public interface VDBLifeCycleListener {
+ void added(String name, int version);
+ void removed(String name, int version);
+}
Modified: trunk/runtime/src/main/java/org/teiid/deployers/VDBParserDeployer.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/deployers/VDBParserDeployer.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/runtime/src/main/java/org/teiid/deployers/VDBParserDeployer.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -46,7 +46,6 @@
import org.teiid.adminapi.impl.ModelMetaData;
import org.teiid.adminapi.impl.VDBMetaData;
import org.teiid.adminapi.impl.VDBTranslatorMetaData;
-import org.teiid.core.CoreConstants;
import org.teiid.logging.LogConstants;
import org.teiid.logging.LogManager;
import org.teiid.metadata.VdbConstants;
@@ -190,9 +189,6 @@
if (vdbMO != null) {
VDBMetaData vdb = (VDBMetaData) vdbMO.getAttachment();
for (Model m : vdb.getModels()) {
- if (m.getName().equals(CoreConstants.SYSTEM_MODEL) || m.getName().equals(CoreConstants.ODBC_MODEL) ) {
- continue;
- }
ManagedObject mo = this.mof.initManagedObject(m, ModelMetaData.class, m.getName(),m.getName());
if (mo == null) {
throw new DeploymentException("could not create managed object"); //$NON-NLS-1$
Modified: trunk/runtime/src/main/java/org/teiid/deployers/VDBRepository.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/deployers/VDBRepository.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/runtime/src/main/java/org/teiid/deployers/VDBRepository.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -35,8 +35,6 @@
import org.jboss.deployers.spi.DeploymentException;
import org.teiid.adminapi.AdminException;
import org.teiid.adminapi.AdminProcessingException;
-import org.teiid.adminapi.Model;
-import org.teiid.adminapi.impl.ModelMetaData;
import org.teiid.adminapi.impl.VDBMetaData;
import org.teiid.core.CoreConstants;
import org.teiid.core.types.DataTypeManager;
@@ -44,7 +42,6 @@
import org.teiid.logging.LogConstants;
import org.teiid.logging.LogManager;
import org.teiid.metadata.Datatype;
-import org.teiid.metadata.MetadataFactory;
import org.teiid.metadata.MetadataStore;
import org.teiid.query.metadata.TransformationMetadata.Resource;
import org.teiid.runtime.RuntimePlugin;
@@ -62,6 +59,7 @@
private MetadataStore systemStore;
private MetadataStore odbcStore;
private boolean odbcEnabled = false;
+ private List<VDBLifeCycleListener> listeners = new ArrayList<VDBLifeCycleListener>();
public void addVDB(VDBMetaData vdb, MetadataStoreGroup stores, LinkedHashMap<String, Resource> visibilityMap, UDFMetaData udf, ConnectorManagerRepository cmr) throws DeploymentException {
if (getVDB(vdb.getName(), vdb.getVersion()) != null) {
@@ -78,36 +76,14 @@
}
if (this.odbcStore == null) {
- addSystemModel(vdb);
this.vdbRepo.put(vdbId(vdb), new CompositeVDB(vdb, stores, visibilityMap, udf, cmr, this.systemStore));
}
else {
- addSystemModel(vdb);
- addODBCModel(vdb);
this.vdbRepo.put(vdbId(vdb), new CompositeVDB(vdb, stores, visibilityMap, udf, cmr, this.systemStore, odbcStore));
}
+ notifyAdd(vdb.getName(), vdb.getVersion());
}
- private void addODBCModel(VDBMetaData vdb) {
- // add the ODBC model
- ModelMetaData odbcSystem = new ModelMetaData();
- odbcSystem.setName(CoreConstants.ODBC_MODEL);
- odbcSystem.setVisible(true);
- odbcSystem.setModelType(Model.Type.VIRTUAL);
- vdb.addModel(odbcSystem);
- }
-
- private void addSystemModel(VDBMetaData vdb) {
- // Add system model to the deployed VDB
- ModelMetaData system = new ModelMetaData();
- system.setName(CoreConstants.SYSTEM_MODEL);
- system.setVisible(true);
- system.setModelType(Model.Type.PHYSICAL);
- system.addSourceMapping(CoreConstants.SYSTEM_MODEL, CoreConstants.SYSTEM_MODEL, CoreConstants.SYSTEM_MODEL);
- system.setSupportsMultiSourceBindings(false);
- vdb.addModel(system);
- }
-
public VDBMetaData getVDB(String name, int version) {
CompositeVDB v = this.vdbRepo.get(new VDBKey(name, version));
if (v != null) {
@@ -187,6 +163,7 @@
for (CompositeVDB other:this.vdbRepo.values()) {
other.removeChild(key);
}
+ notifyRemove(key.getName(), key.getVersion());
return true;
}
return false;
@@ -228,10 +205,30 @@
}
}
- public void updateVDB(String name, int version) {
+ void updateVDB(String name, int version) {
CompositeVDB v = this.vdbRepo.get(new VDBKey(name, version));
if (v!= null) {
v.update(v.getVDB());
}
}
+
+ public synchronized void addListener(VDBLifeCycleListener listener) {
+ this.listeners.add(listener);
+ }
+
+ public synchronized void removeListener(VDBLifeCycleListener listener) {
+ this.listeners.remove(listener);
+ }
+
+ private void notifyAdd(String name, int version) {
+ for(VDBLifeCycleListener l:this.listeners) {
+ l.added(name, version);
+ }
+ }
+
+ private void notifyRemove(String name, int version) {
+ for(VDBLifeCycleListener l:this.listeners) {
+ l.removed(name, version);
+ }
+ }
}
Modified: trunk/runtime/src/main/java/org/teiid/odbc/ODBCServerRemoteImpl.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/odbc/ODBCServerRemoteImpl.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/runtime/src/main/java/org/teiid/odbc/ODBCServerRemoteImpl.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -223,6 +223,7 @@
Prepared previous = this.preparedMap.get(prepareName);
if (previous == null) {
this.client.errorOccurred(RuntimePlugin.Util.getString("bad_binding", prepareName)); //$NON-NLS-1$
+ return;
}
if (bindName == null || bindName.length() == 0) {
@@ -357,11 +358,8 @@
}
else if ((m = rollbackPattern.matcher(modified)).matches()) {
try {
- if (!this.connection.getAutoCommit()) {
- this.connection.rollback();
- this.connection.setAutoCommit(true);
- modified = "SELECT 'ROLLBACK'"; //$NON-NLS-1$
- }
+ this.connection.rollback(false);
+ modified = "SELECT 'ROLLBACK'"; //$NON-NLS-1$
} catch (SQLException e) {
this.client.errorOccurred(e);
}
@@ -416,7 +414,9 @@
break;
} finally {
try {
- stmt.close();
+ if (stmt != null) {
+ stmt.close();
+ }
} catch (SQLException e) {
this.client.errorOccurred(e);
break;
Modified: trunk/runtime/src/main/java/org/teiid/services/BufferServiceImpl.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/services/BufferServiceImpl.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/runtime/src/main/java/org/teiid/services/BufferServiceImpl.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -38,6 +38,8 @@
import org.teiid.core.TeiidRuntimeException;
import org.teiid.core.util.FileUtils;
import org.teiid.dqp.service.BufferService;
+import org.teiid.logging.LogConstants;
+import org.teiid.logging.LogManager;
import org.teiid.runtime.RuntimePlugin;
@@ -76,7 +78,10 @@
public void start(){
try {
-
+ LogManager.logDetail(LogConstants.CTX_DQP, "Starting BufferManager using", bufferDir); //$NON-NLS-1$
+ if (!bufferDir.exists()) {
+ this.bufferDir.mkdirs();
+ }
// Construct and initialize the buffer manager
this.bufferMgr = new BufferManagerImpl();
this.bufferMgr.setConnectorBatchSize(Integer.valueOf(connectorBatchSize));
@@ -88,6 +93,9 @@
// If necessary, add disk storage manager
if(useDisk) {
+ // start the file storage manager in clean state
+ // wise FileStorageManager is smart enough to clean up after itself
+ cleanDirectory(bufferDir);
// Get the properties for FileStorageManager and create.
fsm = new FileStorageManager();
fsm.setStorageDirectory(bufferDir.getCanonicalPath());
@@ -96,10 +104,6 @@
fsm.setMaxBufferSpace(maxBufferSpace*MB);
fsm.initialize();
this.bufferMgr.setStorageManager(fsm);
-
- // start the file storage manager in clean state
- // wise FileStorageManager is smart enough to clen up after itself
- cleanDirectory(bufferDir);
} else {
this.bufferMgr.setStorageManager(new MemoryStorageManager());
}
@@ -112,6 +116,7 @@
}
public void stop() {
+ LogManager.logDetail(LogConstants.CTX_DQP, "Stopping BufferManager using", bufferDir); //$NON-NLS-1$
bufferMgr.shutdown();
// Delete the buffer directory
@@ -131,9 +136,6 @@
public void setDiskDirectory(String dir) {
this.bufferDir = new File(dir, "buffer"); //$NON-NLS-1$
- if (!bufferDir.exists()) {
- this.bufferDir.mkdirs();
- }
}
public void setProcessorBatchSize(int size) {
Modified: trunk/runtime/src/main/java/org/teiid/transport/LocalServerConnection.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/transport/LocalServerConnection.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/runtime/src/main/java/org/teiid/transport/LocalServerConnection.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -43,9 +43,9 @@
import org.teiid.dqp.internal.process.DQPWorkContext;
import org.teiid.net.CommunicationException;
import org.teiid.net.ConnectionException;
-import org.teiid.net.NetPlugin;
import org.teiid.net.ServerConnection;
import org.teiid.net.TeiidURL;
+import org.teiid.runtime.RuntimePlugin;
public class LocalServerConnection implements ServerConnection {
@@ -95,7 +95,7 @@
public Object invoke(Object arg0, final Method arg1, final Object[] arg2) throws Throwable {
if (shutdown) {
- throw ExceptionUtil.convertException(arg1, new TeiidComponentException(NetPlugin.Util.getString("LocalTransportHandler.Transport_shutdown"))); //$NON-NLS-1$
+ throw ExceptionUtil.convertException(arg1, new TeiidComponentException(RuntimePlugin.Util.getString("LocalTransportHandler.Transport_shutdown"))); //$NON-NLS-1$
}
try {
if (passthrough && !arg1.getDeclaringClass().equals(ILogon.class)) {
Modified: trunk/runtime/src/main/java/org/teiid/transport/PgBackendProtocol.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/transport/PgBackendProtocol.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/runtime/src/main/java/org/teiid/transport/PgBackendProtocol.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -107,7 +107,7 @@
throw e.getCause();
}
} catch (Throwable e) {
- // TODO: handle this.
+ terminate(e);
}
}
Modified: trunk/runtime/src/main/java/org/teiid/transport/SSLAwareChannelHandler.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/transport/SSLAwareChannelHandler.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/runtime/src/main/java/org/teiid/transport/SSLAwareChannelHandler.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -54,8 +54,8 @@
import org.teiid.common.buffer.StorageManager;
import org.teiid.logging.LogConstants;
import org.teiid.logging.LogManager;
-import org.teiid.net.NetPlugin;
import org.teiid.net.socket.ObjectChannel;
+import org.teiid.runtime.RuntimePlugin;
/**
@@ -216,7 +216,7 @@
ChannelStateEvent e) throws Exception {
ChannelListener listener = this.listeners.remove(e.getChannel());
if (listener != null) {
- LogManager.logDetail(LogConstants.CTX_TRANSPORT, NetPlugin.Util.getString("SSLAwareChannelHandler.channel_closed")); //$NON-NLS-1$
+ LogManager.logDetail(LogConstants.CTX_TRANSPORT, RuntimePlugin.Util.getString("SSLAwareChannelHandler.channel_closed")); //$NON-NLS-1$
listener.disconnected();
}
}
Modified: trunk/runtime/src/main/java/org/teiid/transport/SSLConfiguration.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/transport/SSLConfiguration.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/runtime/src/main/java/org/teiid/transport/SSLConfiguration.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -40,15 +40,18 @@
public static final String ONEWAY = "1-way"; //$NON-NLS-1$ - one way is the default
public static final String TWOWAY = "2-way"; //$NON-NLS-1$
public static final String ANONYMOUS = "anonymous"; //$NON-NLS-1$
+
+ public static final String LOGIN = "logIn"; //$NON-NLS-1$
+ public static final String DISABLED = "disabled"; //$NON-NLS-1$
+ public static final String ENABLED = "enabled"; //$NON-NLS-1$
- private static final String DEFAULT_SSL_PROTOCOL = "SSLv3"; //$NON-NLS-1$
private static final String DEFAULT_KEYSTORE_TYPE = "JKS"; //$NON-NLS-1$
/*
* External SSL resource settings
*/
- private boolean sslEnabled = false;
- private String sslProtocol = DEFAULT_SSL_PROTOCOL;
+ private String mode = LOGIN;
+ private String sslProtocol = SocketUtil.DEFAULT_PROTOCOL;
private String keyManagerFactoryAlgorithm = KeyManagerFactory.getDefaultAlgorithm();
private String keyStoreType = DEFAULT_KEYSTORE_TYPE;
private String keyStoreFileName;
@@ -57,11 +60,6 @@
private String trustStorePassword = ""; //$NON-NLS-1$
private String authenticationMode = ONEWAY;
- /*
- * Client encryption property. This may belong somewhere else
- */
- boolean clientEncryptionEnabled = true;
-
public SSLEngine getServerSSLEngine() throws IOException, GeneralSecurityException {
if (!isSslEnabled()) {
return null;
@@ -94,18 +92,22 @@
return result;
}
- public boolean isSslEnabled() {
- return this.sslEnabled;
- }
-
public boolean isClientEncryptionEnabled() {
- return this.clientEncryptionEnabled;
+ return LOGIN.equals(mode);
}
- public void setSslEnabled(boolean value) {
- this.sslEnabled = value;
+ public boolean isSslEnabled() {
+ return ENABLED.equals(mode);
}
+ public String getMode() {
+ return mode;
+ }
+
+ public void setMode(String mode) {
+ this.mode = mode;
+ }
+
public void setKeystoreFilename(String value) {
this.keyStoreFileName = value;
}
@@ -138,7 +140,4 @@
this.authenticationMode = value;
}
- public void setClientEncryptionEnabled(boolean value) {
- this.clientEncryptionEnabled = value;
- }
}
Modified: trunk/runtime/src/main/java/org/teiid/transport/SocketClientInstance.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/transport/SocketClientInstance.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/runtime/src/main/java/org/teiid/transport/SocketClientInstance.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -37,10 +37,10 @@
import org.teiid.logging.LogManager;
import org.teiid.logging.MessageLevel;
import org.teiid.net.CommunicationException;
-import org.teiid.net.NetPlugin;
import org.teiid.net.socket.Handshake;
import org.teiid.net.socket.Message;
import org.teiid.net.socket.ObjectChannel;
+import org.teiid.runtime.RuntimePlugin;
/**
@@ -130,7 +130,7 @@
//ensure the key information
if (returnedPublicKey == null) {
- throw new CommunicationException(NetPlugin.Util.getString("SocketClientInstance.invalid_sessionkey")); //$NON-NLS-1$
+ throw new CommunicationException(RuntimePlugin.Util.getString("SocketClientInstance.invalid_sessionkey")); //$NON-NLS-1$
}
try {
Modified: trunk/runtime/src/main/resources/org/teiid/runtime/i18n.properties
===================================================================
--- trunk/runtime/src/main/resources/org/teiid/runtime/i18n.properties 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/runtime/src/main/resources/org/teiid/runtime/i18n.properties 2010-09-24 18:51:07 UTC (rev 2603)
@@ -20,264 +20,33 @@
# 02110-1301 USA.
#
-EmbeddedConfigSource.No_configuration_file_specified_1=No configuration file specified
-EmbeddedConfigSource.Can_not_load_config_file_2=Can not load config file: \"{0}\"
-EmbeddedConfigSource.Service_class__4=Service class \"{0}\" is not assignable to expected type \"{1}\"
-EmbeddedConfigSource.0=Error trying to initialize IndexMetadataService
-EmbeddedConfigSource.1=Unable to get the url for the system vdb from the current configuration.
-EmbeddedConfigSource.Unable_to_find_service_class_6=Unable to find service class: \"{0}\"
-EmbeddedConfigSource.Unable_to_instantiate_service_class_7=Unable to instantiate service class: \"{0}\"
-EmbeddedConfigSource.Unable_to_instantiate_service_class_due_to_security_error_8=Unable to instantiate service class due to security error: \"{0}\"
-EmbeddedConfigurationService.invalid_vdb=Failed to add/load the VDB \"{0}\", because it is invalid
-VDBConfigurationWriter.vdb_delete_failed=Failed to delete VDB \"{0}\" with version \"{1}\" from configuration
-VDBConfigurationWriter.vdb_delete=Successfully deleted VDB \"{0}\" with version \"{1}\" from configuration
-LocalBufferService.Error_initializing_buffer_manager__missing_required_property_7=Error initializing buffer manager: missing required property \"{0}\"
LocalBufferService.Failed_initializing_buffer_manager._8=Failed initializing buffer manager.
-ServerConfiguration.Props_file_null=Properties file name must be non-null
-ServerConfiguration.Err_interpreting_property=Error interpreting property \"{0}\" with value \"{1}\" as a URL.
-ServerConfiguration.Req_prop_not_specified=Required property \"{0}\" not specified
-VDBConfigFileReader.Connector_type_names_do_not_match=Connector names do not match: \"{0}\" and \"{1}\".
-VDBConfigFileReader.No_connector_type_for_connector=Configuration has no connector definition for type \"{0}\" for connection factory \"{1}\".
-VDBConfigFileReader.Already_contains_connector_type=Configuration has two definitions for connector \"{0}\".
-VDBConfigFileReader.No_connector_binding_in_config = A model \"{0}\" specifies a connection factory "{1}" for which there is no definition found in the configuration or VDB definition files.
-
VDBService.VDB_does_not_exist._1=VDB \"{0}\" version \"{1}\" does not exist.
VDBService.VDB_does_not_exist._2=VDB \"{0}\" version \"{1}\" is not in "active" status.
-VDBService.VDB_does_not_exist._3=In VDB \"{0}\" version \"{1}\" the Model \"{2}\" does not exist.
-VDBService.Model_does_not_exist._4=Model "{0}" does not exist.
-VDBService.0=Error trying to read visibility information from the vdb \"{0}\".
-LOAD_VDB.FAILED.0=Invalid file location \"{0}\". The VDB file location must be a file or a directory path.
-VDBService.failed_load=Failed to load the VDB
-VDBService.lookup=VDB \"{0}\" with version \"{1}\" being loaded from configuration
-VDBService.vdb_deleted=VDB \"{0}\" with version \"{1}\" deleted from VDB Service and configuration
-VDBService.vdb_change_status=VDB \"{0}\" with version \"{1}\" has changed its status from \"{2}\" to \"{3}\" in VDBService
-VDBService.vdb_change_status_failed=VDB \"{0}\" with version \"{1}\" has failed to change its status from \"{2}\" to \"{3}\" in VDBService
-VDBService.connector_binding_changed=VDB \"{0}\" with version \"{1}\" has changed its connection factory for model name \"{2}\" with \"{3}\"
-VDBService.vdb_already_exists=VDB \"{0}\" with version \"{1}\" already exists in the configuration, saving as a new version of the VDB
-VDBService.vdb_deployed=VDB \"{0}\" with version \"{1}\" has been deployed to the Teiid system.
-VDBService.vdb_loded=VDB \"{0}\" with version \"{1}\" has been loaded from the configuration.
-VDBService.vdb_missing_bindings=VDB \"{0}\" with version \"{1}\" is incomplete, it does not have all the connection factories mapped to their physical models.
-VDBService.lookup=VDB \"{0}\" with version \"{1}\" being loaded from configuration
-VDBService.vdb_deleted=VDB \"{0}\" with version \"{1}\" deleted from VDB Service and configuration
-VDBService.connector_binding_changed=VDB \"{0}\" with version \"{1}\" has changed its connection factory for model name {2} with {3}
-VDBService.vdb_already_exists=VDB \"{0}\" with version \"{1}\" already exists in the configuration, saving as a new version of the VDB
-VDBService.vdb_deployed=VDB \"{0}\" with version \"{1}\" has been deployed to the Teiid system.
-VDBService.vdb_loded=VDB \"{0}\" with version \"{1}\" has been loaded from the configuration.
-VDBService.vdb_missing_bindings=VDB \"{0}\" with version \"{1}\" is incomplete, it does not have all the connection factories mapped to their physical models.
-VDBService.vdb_active=VDB \"{0}\" with version \"{1}\" is set to ACTIVE.
-VDBService.validityErrors=Failed to deploy VDB \"{0}\" because it has following validity errors; {1}
-VDBService.vdb_missing_models=VDB \"{0}\" with version \"{1}\" is Invalid; This archive has no models defined.
-DataService.Didnt_find_caps=Unable to find capabilities for {0}
-DataService.Unable_to_find_connector_manager_for_{0}_1=Unable to find connector manager for \"{0}\"
-DataService.Unable_to_find_connector=Invalid Connector name supplied or Connector not found: \"{0}\"
-DataService.System_model_initialze_error=Connection factory for the System Model is not initialized
-DataService.System_model_failed_start=Failed to add the System Model connector to the system
-DataService.failed_to_load_connector=Failed to load the Connection factory with name \"{0}\" in the configuration
-DataService.Connector_State_invalid=Connection factory \"{0}\" failed to start, or did not start correctly. Please check the Connection factory properties. Check the log file for more information.
-DataService.useClassloader=Connector is using the following Classpth to load a new ClassLoader=\"{0}\"
-DataService.Failed_To_Start=Embedded DataService Failed to start. Check the Connection factory proeprties.
-DataService.Failed_Initialize_CM=Failed to Properly initialize the Connector manager for Connection factory \"{0}\"
-DataService.Stopped= Data Service is stopped. All the Connection factories have been stopped.
-DataService.Started=Data Service initialized and started and running..
-DataService.Connector_Stopped=Connector Service \"{0}\" has been stopped
-DataService.Connector_Started=Connector Service \"{0}\" has been started.
-DataService.Connector_Deleted=Connector Service \"{0}\" has been Deleted from the Data Service and Configuration
-DataService.Connector_Added=Connector Service \"{0}\" has been Added to the Data Service and also Configuration
-DataService.Connector_exists=Connection factory with name \"{0}\" already exists. Connector name must be unique.
-DataService.Connector_does_not_exists=Connection factory with name \"{0}\" does not exist in the configuration.
-DataService.Connector_modified=Connection factory with name \"{0}\" has been modified.
-DataService.Connector_Stopped=Connector Service {0} has been stopped
-DataService.Connector_Started=Connector Service {0} has been started.
-DataService.Connector_Deleted=Connector Service {0} has been Deleted from the Data Service and Configuration
-DataService.Connector_Added=Connector Service {0} has been Added to the Data Service and also Configuration
-DataService.Connector_exists_replace=Connection factory with name {0} already exists. The old connector will be replaced with the new connector.
-DataService.Connector_exists=Connection factory with name {0} already exists. Connector name must be unique to add, using the old connector as it is.
-DataService.Connector_does_not_exists=Connection factory with name {0} does not exist in the configuration.
-DataService.Connector_modified=Connection factory with name {0} has been modified.
-DataService.Connector_type_does_not_exists=Connection factory type specified for Connection factory \"{0}\" does not exist in the configuration, add Connector first.
-DataService.ext_module_not_found=Required extension module \"{0}\" not found in the extensions directory. if not using extension modules ignore.
-DataService.Connector_still_used=Connection factory \"{0}\" can not be deleted because it is still in use by VDBs. Remove the assosiation with VDB before deletion.
-DataService.decryption_failed=initialization of the Connection factory \"{0}\" failed because, system failed to decrypt the property \"{1}\"
-DataService.FailedStop=Failed to stop the Connection factory "{0}"
-DataService.FailedStart=Failed to start the Connection factory "{0}"
-DataService.ext_module_not_found=Required extension module {0} not found in the extensions directory. if not using extension modules ignore.
-DataService.Connector_still_used=Connection factory {0} can not be deleted because it is still in use by VDBs. Remove the assosiation with VDB before deletion.
-DataService.Connector_failed_start=Connection factory {0} failed to start, check the properties and start again.
-DataService.no_connectors_defined=No connectors defined for binding
-Failed_To_Service=Failed to get service requested
-
-VDBReader.Invalid_location=Invalid file location \"{0}\". No VDB files (*.DEF) found
-VDBReader.Archive_not_Found=Archive file \"{0}\" not found, failed to load the VDB.
-VDBReader.validityErrors=Failed to load VDB file \"{0}\" because of following validity errors; {1}
-
-EmbeddedConfigurationService.no_system_vdb_path=Failed to load the System.VDB, incorrect path \"{0}\"
-EmbeddedConfigurationService.Server_Config_notfound=ServerConfig.xml file not found the location \"{0}\"
-EmbeddedConfigurationService.Server_Config_failedload=Server Configuration file failed to load \"{0}\"
-EmbeddedConfigurationService.Server_Config_notdefined=Server Configuration file is not defined in the properties file
-EmbeddedConfigurationService.Alternate_binding_inuse=Connection factory \"{0}\" is using alternate properties defined in the system configuration file.
-EmbeddedConfigurationService.ConnectorBinding_in_use_failed_delete=Connection factory with Name \"{0}\" is currenlty in use by VDB \"{1}\" with version \"{2}\"; Can not delete; Remove the assosiation first
-#EmbeddedConfigurationService.Alternate_binding_inuse=Connector binding {0} is using alternate properties defined in the system configuration file.
-EmbeddedConfigurationService.ConnectorBinding_in_use_failed_delete=Connection factory with Name {0} is currenlty in use by VDB {1} with version {2}; Can not delete; Remove the assosiation first
-EmbeddedConfigurationService.savingConfiguration=Teiid Configuration is being saved.
-EmbeddedConfigurationService.vdb_delete=VDB with name \"{0}\" and version \"{1}\" is being deleted from the configuration.
-EmbeddedConfigurationService.vdb_delete_failed=configuration service failed to delte VDB with name \"{0}\" and version \"{1}\".
-EmbeddedConfigurationService.vdb_saved=VDB with name \"{0}\" and version \"{1}\" is being saved by the configuration to \"{2}\" file name.
-EmbeddedConfigurationService.add_system_property=Adding a System property \"{0}\" with value \"{1}\" is being added to the configuration.
-EmbeddedConfigurationService.update_system_properties=Adding System properties to the configuration: {0}.
-EmbeddedConfigurationService.connector_save=Connection factory with name \"{0}\" is being saved.
-EmbeddedConfigurationService.connector_delete=Connection factory with name \"{0}\" is being deleted from the configuration.
-EmbeddedConfigurationService.connector_type_save=Connector with name \"{0}\" is being saved to configuration.
-EmbeddedConfigurationService.connector_type_save=Connector with name \"{0}\" is being deleted from configuration.
-EmbeddedConfigurationService.connector_type_delete_failed=Connector with name \"{0}\" failed to delete from configuration as they type is not found in configuration.
-EmbeddedConfigurationService.custom_connectors_restricted=License does not allow adding connectors.
-EmbeddedConfigurationService.Failed_to_load_vdb=Failed to load the VDB \"{0}\" during the initialization of Teiid
-EmbeddedConfigurationService.loaded_vdb=Loaded the VDB \"{0}\" sucessfully into Teiid.
-EmbeddedConfigurationService.not_loaded_vdb=VDB \"{0}\" is not loaded into Teiid due to licensing issues.
-EmbeddedConfigurationService.connector_binding_delete_failed=Delete of Connection factory \"{0}\" failed. Binding not found in the configuration.
-EmbeddedConfigurationService.connector_type_in_use=Delete of Connector \"{0}\" failed. Currently in use by a Connection factory.
-EmbeddedConfigurationService.duplicate_vdb_found=Duplicate VDB \"{0}\" is being loaded. Can not load have multiple VDBs with same name and version.
-EmbeddedConfigurationService.connector_type_delete=Connector \"{0}\" is deleted from the configuration.
-EmbeddedConfigurationService.connectionAdded=Connection added to VDB \"{0}\" with version \"{1}\" with connection id \"{2}\"
-EmbeddedConfigurationService.connectionRemoved=Connection removed from VDB \"{0}\" with version \"{1}\" with connection id \"{2}\"
-EmbeddedConfigurationService.dqp_loading=Teiid instance with instance id \"{0}\" is being loaded.
-EmbeddedConfigurationService.init_encryption=Cryptography libraries are in use and are initialized
-EmbeddedConfigurationService.udf_classspath_failure=Failed to resolve the user defined function''s classpath
-EmbeddedConfigurationService.udf_load=User Defined Functions file \"{0}\" is loaded, using classloader \"{1}\"
-EmbeddedConfigurationService.udf_unload=User Defined Functions file unloaded
-EmbeddedConfigurationService.bindings_exceeded_limit=VDB {1} has {0} Connection factories, that exceeds MetaMatrix license allowed number of Connection factories.
-EmbeddedConfigurationService.Invalid_connector_binding=Can not assign binding "{2}" to VDB "{0}" with "{1}", because it is a private binding from another vdb.
-EmbeddedConfigurationService.connector_binding_deployed=Connection factory {0} deployed
-
-ExtensionModuleReader.ext_module_failed_to_read=failed to read the extension module \"{0}\" from file system.
-ExtensionModuleReader.ext_module_does_not_exist=Extension module \"{0}\" does not exist in the configuration
-ExtensionModuleWriter.ext_module_save=Extension module with name \"{0}\" is saved to \"{1}\".
-ExtensionModuleWriter.ext_module_already_exists=Extension module \"{0}\" already exists in the configuration failed to delete.
-ExtensionModuleWriter.ext_module_delete_failed=Failed to delete Extension Module \"{0}\"; It may be currently in use by the Teiid, check if is it been un-assigned from all models.
-ExtensionModuleWriter.ext_module_delete=Extension module with name \"{0}\" is being deleted with file \"{1}\".
-
-UnSupported_object_conversion=This object conversion not supported..
-Admin.Vdb_or_Model_notfound=Requested Vdb or model Name not Found..
-Admin.timeout=Admin request timedout after \"{0}\" minutes
-Admin.invalid_request=Invalid request \"{0}\" is submitted to the Admin API. Please check the API documentation on usage.
-Admin.ext_path_invalid=Extension directory path is wrong or does not exists
-Admin.admin_isnull=Admin Object supplied is null
-Admin.can_not_set_property=Currently setting property on this type of Admin object is not supported.
-Admin.connector_load_failed_wrong_contents=Failed to load the Connection factory with name \"{0}\". Contents supplied are incorrect, check the contents again.
-Admin.connector_load_failed_wrong_type=Failed to load the Connection factory with name \"{0}\". Conntextor Type supplied and Connector used in binding are different.
-Admin.Connector_binding_does_not_exists=Connection factory with name \"{0}\" does not exist in the configuration
-Admin.Connector_type_does_not_exists=Connector with name \"{0}\" does not exist in the configuration
-Admin.ext_module_does_not_exists=Extension Module with name \"{0}\" does not exist in the configuration
-Admin.vdb_does_not_exists=VDB with name \"{0}\" and version \"{1}\" does not exist in the configuration
-Admin.Invalid_ext_source=Source contents supplied for Extension module can not be null.
-Admin.Invalid_ext_source_name=Source name can not be null, use a proper file name with extension as name for the Extension Module.
-Admin.Invalid_cb_name=Connection factory name can not be null, a valid name must be supplied
-Admin.Invalid_cb_source=Connection factory''s source contents can not be null
-Admin.Invalid_ct_name=Connector name can not be null or use of special characters is not allowed, a valid name must be supplied
-Admin.Invalid_ct_source=Connector''s source contents can not be null
-Admin.Invalid_vdb_name=VDB name can not be null or use of special characters is allowed, a valid name must be supplied
-Admin.Invalid_vdb_source=VDB source contents can not be null
-Admin.load_combined_vdb=Loading the VDB file \"{0}\", where DEF/VDB are combined in single source
-Admin.Invalid_model_name=Model name can not be null or use of special characters is not alloed, a valid name must be supplied to identify the model inside the VDB
-Admin.Invalid_identifier=Identifier supplied can not be null and must adhere to the naming patterns; Please check the java docs for the proper naming patterns.
-Admin_invalid_log_listener=Supplied log listener can not be null
-Admin.Invalid_ext_module=Extension module specified is not the JAR type, currently only ".jar" extension modules supported.
-Admin.Connector_type_exists=Connector \"{0}\" already exists; Can not add a duplicate, try delete and add again.
-Admin.extension_module_exists=Extension Module \"{0}\" already exists; Can not add a duplicate, delete first and add again.
-Admin.addBindingEixists=Connection factory \"{0}\" already exists in exists in the configuration, use a unique name for the Connection factory in the given Teiid instance.
-Admin.addBinding_type_exists=Adding Connection factory \"{0}\" failed, because the Connector \"{1}\" already exists, and admin option set to fail on conflict
-Admin.connector_type_not_exists=Connector \"{0}\" does not exists in the configuration, please add Connector.
-Admin.Invalid Request=Request submitted does not match the requirement \"{0}\"
-Admin.No_Objects_Found=No AdminObjects found for identifier {0} and class {1}.
-Admin.Multiple_Objects_Found=Multiple AdminObjects found for identifier {0} and class {1}.
-Admin.Unsupported_Object_Class=AdminObjects class {0} not supported for this operation.
-Admin.bindings_exceeded_limit=You have reached the MetaMatrix license limit of Connection factories, Failed to add Connection factories.
-Admin.cb_doesnot_exist=The Connection factory does not exist:{0}
-Admin.ct_doesnot_exist=The connector does not exist:{0}
-Admin.CODE_DECRYPTION_FAILED=Decryption of the password property failed; Check to make sure encryption libraries are correctly installed or provide a plain text password.
-
-DQPEmbeddedManager.start_dqp=Teiid is started at time = {0}
-DQPEmbeddedManager.shutdown_dqp=Teiid is shutdown at time = {0}
-DQPEmbeddedManager.duplicate_process= There is another process running with same name {0}; Failed to start.
-
-ServerSecurityAdminImpl.User_name_too_long=The user name may not be null and cannot be longer than {0} charachters
-ServerSecurityAdminImpl.neither_User_nor_Group=Parameter memberType is neither a User nor a Group.
-ServerSecurityAdminImpl.Unable_to_aquire_MembershipObjectEditor=Unable to aquire MembershipObjectEditor.
-ServerSecurityAdminImpl.Cant_use_wildcard=The wildcard cannot be used here.
-ServerSecurityAdminImpl.Non_existant_role=No administrative role exists with the identifier [{0}].
-ServerSecurityAdminImpl.Unknown_principal=Unknown principal: {0}
-ServerSecurityAdminImpl.Empty_props=No properties to set.
-ServerSecurityAdminImpl.Invalid_prop=Property [{0}] is not a valid User property and will not be set.
-ServerSecurityAdminImpl.Invalid_props=One or more properties were not set because they are no valid for a User:
-ServerSecurityAdminImpl.vdbName_can_not_be_null=Supplied VDB name is null
-ServerSecurityAdminImpl.vdbVersion_can_not_be_null=Supplied VDB version is null
-ServerSecurityAdminImpl.no_vdb_exists=No VDB with name {0}.{1} deployed in the system.
-ServerSecurityAdminImpl.not_implemented=This feature not available.
-
-failed_to_load_admin_roles=Failed to load Admin role permissions
-admin_roles_not_defined=Admin Role permissions are not defined. Refer to admin-roles.properties file
-
-# authorization service
-AuthorizationServiceImpl.invalid_session=The principal with SessionToken <{0}> is invalid.
-AuthorizationServiceImpl.wrong_realms = Permission collection contains requests from different realms.
-AuthorizationServiceImpl.error_seraching_policies=An exception occurred while searching for all policy IDs.
-AuthorizationServiceImpl.failed_to_get_groups=Can''t get principal''s groups from Membership service.
-AuthorizationServiceImpl.Authorization_Realm_is_null=The requested Authorization Realm is null
-
-# membership service
-MembershipServiceImpl.loaded = Loaded membership domain: "{0}".
-MembershipServiceImpl.failed_to_create = Unable to create membership domain {0}
-MembershipServiceImpl.unable_to_create = Unable to create membership domain "{0}". Factory class not found in environment properties.
-MembershipServiceImpl.invalid_principal = The principal "{0}" is invalid.
-MembershipServiceImpl.Null_authentication=Domain {0} returned a null authentication result for user {1}
-MembershipServiceImpl.Invalid_user=Domain {0} indicated that user {1} was not valid
-MembershipServiceImpl.Unsupported_credentials=Domain {0} indicated that the credentials were not supported
-MembershipServiceImpl.Failed_authentication={0} could not be authenticated in any domain
-MembershipServiceImpl.Root_password_required=password is required for super user
-MembershipServiceImpl.Root_password_decryption_failed=super password could not be decrypted
-MembershipServiceImpl.principal_does_not_exist=The principal ''{0}'' does not exist in domain ''{1}''
-MembershipServiceImpl.Decrypt_failed=Could not decrypt the encrypted password for user ''{0}''
-MembershipServiceImpl.source_exception=Membership Domain ''{0}'' failed to perform the desired operation, please check the settings for this domain
-MembershipServiceImpl.load_error=Could not load file ''{0}'' from the classpath, the file system, or as a URL.
-MembershipServiceImpl.unknown_host=Did not allow root user authentication attempt, since root logons are restricted and could not determine the remote host.
-MembershipServiceImpl.invalid_host=Could not authenticate root user, since the client address {0} is not in the allowed values {1}
-MembershipServiceImpl.error_shuting_down = Error shutting down domain after ''killService'' method received.
-MembershipServiceImpl.Logon_failed=log on failed for user {1} on the domain {0}
-
-LDAPMembershipDomain.No_annonymous=Annonymous user authentications are not allowed in domain {0}
-LDAPMembershipDomain.Required_property=Required property {0} was missing.
-LDAPMembershipDomain.Admin_credentials=Admin DN and/or password supplied for LDAP Membership Domain {0} are invalid.
-LDAPMembershipDomain.Require_memberof_property=Users in LDAP Membership Domain {0} will not appear as members of any group since user's memberOf and group's memberOf attributes are both unspecified.
-
-
# session service
SessionServiceImpl.invalid_session=The specified session ID "{0}" is invalid. It cannot be found in the userbase.
-SessionServiceImpl.reached_max_sessions = The server has reached the maximum number of sessions of {0} as defined by the property metamatrix.session.max.connections. If more sessions are required, modify this property value in the MetaMatrix Console.
-SessionServiceImpl.failed_to_getprincipal = Membership service encountered an error getting the principal for user "{0}".
+SessionServiceImpl.reached_max_sessions = The server has reached the maximum number of sessions of {0} as defined by the property "sessionMaxLimit". If more sessions are required, modify this property value in the "teiid-jboss-beans.xml" file.
SessionServiceImpl.expireSession = Expiring session {0}
SessionServiceImpl.keepaliveFailed = Keepalive failed for session {0}
-SessionServiceImpl.Unexpected_error_finding_latest_version_of_Virtual_Database=Unexpected error finding latest version of Virtual Database {0}
-SessionServiceImpl.Unexpected_error_finding_latest_version_of_Virtual_Database_{0}_of_version_{1}=Unexpected error finding latest version of Virtual Database {0} of version {1}
-SessionServiceImpl.Membership_service_could_not_authenticate_user=Membership service could not authenticate user "{0}"
SessionServiceImpl.The_username_0_and/or_password_are_incorrect=The username "{0}" and/or password and/or payload token could not be authenticated by any membership domain.
SessionServiceImpl.terminateSession = Admin [{0}] is terminating this session: {1}.
no_passthrough_identity_found = Passthrough authentication failed. No authentication information found.
-LogonImpl.Invalid_use_of_credentials_and_token=Conflicting use of both client session token and credentials.
ServerWorkItem.Received_exception_processing_request=Unexpected exception for session {0}
ServerWorkItem.processing_error=Processing exception ''{0}'' for session {1}. Exception type {2} thrown from {3}. Enable more detailed logging to see the entire stacktrace.
ServerWorkItem.Component_Not_Found=Component not found: {0}
SocketTransport.1=Bound to address {0} listening on port {1}
-SocketTransport.2=Problem starting server binding to address {0} and listening on port {1}
-SocketTransport.3=Socket transport is not enabled for Teiid.
+LocalTransportHandler.Transport_shutdown=Tranport has been shutdown.
+SocketClientInstance.invalid_sessionkey=Invalid session key used during handshake
+SSLAwareChannelHandler.channel_closed=Channel closed
-Illegal_access_on_admin=Illegal use of admin based connection by : {0}, {1}
invlaid_vdb_file=Invalid VDB file deployment failed {0}
redeploying_vdb=Re-deploying VDB {0}
validity_errors_in_vdb=VDB has validaity errors; failed to deploy - {0}
@@ -292,7 +61,6 @@
udf_model_not_found=User Defined Function (UDF) model "{0}" not found in the VDB
duplicate_vdb=VDB with given name and version already exists! {0}.{1}
system_vdb_not_found=System.vdb not found in classpath
-failed_to_deployed=Failed to deploy {0}
invalid_udf_file=No "path" information found to load the FUNCTION model {0}; FUNCTION model must have path information.
failed_matadata_load=Failed to load metadata for VDB {0}.{1}
vdb_not_found=VDB {0}.{1} not found deployed.
@@ -315,4 +83,4 @@
no_stmt_found=No prepared statement found with name {0}
error_closing_stmt=Error closing portal statement {0}
model_metadata_loading=VDB "{0}" - "{1}" model metadata is currently being loaded. Start Time: {2}
-ambigious_name=Ambiguous VDB name specified. Only single occurrence of the "." is allowed in the VDB name. Also, when version based vdb name is specified, then a separate "version" connection option is not allowed:{0}.{1}
\ No newline at end of file
+ambigious_name=Ambiguous VDB name specified. Only single occurrence of the "." is allowed in the VDB name. Also, when version based vdb name is specified, then a separate "version" connection option is not allowed:{0}.{1}
Modified: trunk/runtime/src/test/java/org/teiid/dqp/service/buffer/TestLocalBufferService.java
===================================================================
--- trunk/runtime/src/test/java/org/teiid/dqp/service/buffer/TestLocalBufferService.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/runtime/src/test/java/org/teiid/dqp/service/buffer/TestLocalBufferService.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -22,31 +22,19 @@
package org.teiid.dqp.service.buffer;
+import static org.junit.Assert.*;
+
+import org.junit.Test;
import org.teiid.common.buffer.impl.BufferManagerImpl;
import org.teiid.common.buffer.impl.FileStorageManager;
import org.teiid.core.util.UnitTestUtil;
import org.teiid.services.BufferServiceImpl;
-import junit.framework.TestCase;
-
@SuppressWarnings("nls")
-public class TestLocalBufferService extends TestCase {
+public class TestLocalBufferService {
- public TestLocalBufferService(String name) {
- super(name);
- }
-
- public void testMissingRequiredProperties() throws Exception {
+ @Test public void testCheckMemPropertyGotSet() throws Exception {
BufferServiceImpl svc = new BufferServiceImpl();
- svc.setDiskDirectory(UnitTestUtil.getTestScratchPath()+"/teiid");
-
- // These are defaults if none of the properties are set.
- assertTrue(svc.getBufferDirectory().isDirectory() && svc.getBufferDirectory().exists());
- assertTrue(svc.isUseDisk());
- }
-
- public void testCheckMemPropertyGotSet() throws Exception {
- BufferServiceImpl svc = new BufferServiceImpl();
svc.setDiskDirectory(UnitTestUtil.getTestScratchPath()+"/teiid/1");
svc.setUseDisk(true);
@@ -61,7 +49,7 @@
assertTrue(((FileStorageManager)mgr.getStorageManager()).getDirectory().endsWith(svc.getBufferDirectory().getName()));
}
- public void testCheckMemPropertyGotSet2() throws Exception {
+ @Test public void testCheckMemPropertyGotSet2() throws Exception {
BufferServiceImpl svc = new BufferServiceImpl();
svc.setDiskDirectory(UnitTestUtil.getTestScratchPath()+"/teiid/1");
svc.setUseDisk(false);
Modified: trunk/runtime/src/test/java/org/teiid/transport/TestCommSockets.java
===================================================================
--- trunk/runtime/src/test/java/org/teiid/transport/TestCommSockets.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/runtime/src/test/java/org/teiid/transport/TestCommSockets.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -138,7 +138,7 @@
@Test public void testConnectWithoutClientEncryption() throws Exception {
SSLConfiguration config = new SSLConfiguration();
- config.setClientEncryptionEnabled(false);
+ config.setMode(SSLConfiguration.DISABLED);
SocketServerConnection conn = helpEstablishConnection(false, config, new Properties());
assertTrue(conn.selectServerInstance().getCryptor() instanceof NullCryptor);
conn.close();
@@ -204,10 +204,9 @@
@Test public void testAnonSSLConnect() throws Exception {
SSLConfiguration config = new SSLConfiguration();
- config.setSslEnabled(true);
+ config.setMode(SSLConfiguration.ENABLED);
config.setAuthenticationMode(SSLConfiguration.ANONYMOUS);
Properties p = new Properties();
- p.setProperty(SocketUtil.TRUSTSTORE_FILENAME, SocketUtil.NONE);
helpEstablishConnection(true, config, p);
SocketServerConnection conn = helpEstablishConnection(true, config, p);
conn.close();
@@ -215,9 +214,10 @@
@Test(expected=CommunicationException.class) public void testNonSSLConnectWithSSLServer() throws Exception {
SSLConfiguration config = new SSLConfiguration();
- config.setSslEnabled(true);
+ config.setMode(SSLConfiguration.ENABLED);
config.setAuthenticationMode(SSLConfiguration.ANONYMOUS);
Properties p = new Properties();
+ p.setProperty(SocketUtil.ALLOW_ANON, Boolean.FALSE.toString());
helpEstablishConnection(true, config, p);
}
Modified: trunk/test-integration/common/src/test/java/org/teiid/jdbc/FakeServer.java
===================================================================
--- trunk/test-integration/common/src/test/java/org/teiid/jdbc/FakeServer.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/test-integration/common/src/test/java/org/teiid/jdbc/FakeServer.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -123,6 +123,10 @@
throw new RuntimeException(e);
}
}
+
+ public void removeVDB(String vdbName) {
+ this.repo.removeVDB(vdbName, 1);
+ }
private void addModel(VDBMetaData vdbMetaData, Schema schema) {
ModelMetaData model = new ModelMetaData();
Modified: trunk/test-integration/common/src/test/java/org/teiid/jdbc/TestMMDatabaseMetaData.java
===================================================================
--- trunk/test-integration/common/src/test/java/org/teiid/jdbc/TestMMDatabaseMetaData.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/test-integration/common/src/test/java/org/teiid/jdbc/TestMMDatabaseMetaData.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -480,7 +480,7 @@
while(rs.next()) {
count++;
}
- assertEquals(12, count);
+ assertEquals(11, count);
} finally {
if(rs != null) {
rs.close();
Modified: trunk/test-integration/common/src/test/java/org/teiid/systemmodel/TestMatViews.java
===================================================================
--- trunk/test-integration/common/src/test/java/org/teiid/systemmodel/TestMatViews.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/test-integration/common/src/test/java/org/teiid/systemmodel/TestMatViews.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -53,7 +53,7 @@
@Test public void testSystemMatViewsWithImplicitLoad() throws Exception {
Statement s = conn.createStatement();
- ResultSet rs = s.executeQuery("select * from SYS.MatViews order by name");
+ ResultSet rs = s.executeQuery("select * from MatViews order by name");
assertTrue(rs.next());
assertEquals("NEEDS_LOADING", rs.getString("loadstate"));
assertEquals("#MAT_TEST.ERRORVIEW", rs.getString("targetName"));
@@ -65,7 +65,7 @@
assertEquals("#MAT_TEST.RANDOMVIEW", rs.getString("targetName"));
rs = s.executeQuery("select * from MatView");
assertTrue(rs.next());
- rs = s.executeQuery("select * from SYS.MatViews where name = 'MatView'");
+ rs = s.executeQuery("select * from MatViews where name = 'MatView'");
assertTrue(rs.next());
assertEquals("LOADED", rs.getString("loadstate"));
try {
@@ -73,17 +73,17 @@
} catch (SQLException e) {
}
- rs = s.executeQuery("select * from SYS.MatViews where name = 'ErrorView'");
+ rs = s.executeQuery("select * from MatViews where name = 'ErrorView'");
assertTrue(rs.next());
assertEquals("FAILED_LOAD", rs.getString("loadstate"));
}
@Test public void testSystemMatViewsWithExplicitRefresh() throws Exception {
Statement s = conn.createStatement();
- ResultSet rs = s.executeQuery("select * from (call SYS.refreshMatView('TEST.MATVIEW', false)) p");
+ ResultSet rs = s.executeQuery("select * from (call refreshMatView('TEST.MATVIEW', false)) p");
assertTrue(rs.next());
assertEquals(1, rs.getInt(1));
- rs = s.executeQuery("select * from SYS.MatViews where name = 'MatView'");
+ rs = s.executeQuery("select * from MatViews where name = 'MatView'");
assertTrue(rs.next());
assertEquals("LOADED", rs.getString("loadstate"));
assertEquals(true, rs.getBoolean("valid"));
@@ -91,12 +91,12 @@
@Test(expected=TeiidSQLException.class) public void testSystemMatViewsInvalidView() throws Exception {
Statement s = conn.createStatement();
- s.execute("call SYS.refreshMatView('TEST.NotMat', false)");
+ s.execute("call refreshMatView('TEST.NotMat', false)");
}
@Test(expected=TeiidSQLException.class) public void testSystemMatViewsInvalidView1() throws Exception {
Statement s = conn.createStatement();
- s.execute("call SYS.refreshMatView('foo', false)");
+ s.execute("call refreshMatView('foo', false)");
}
@Test public void testSystemMatViewsWithRowRefresh() throws Exception {
@@ -108,15 +108,15 @@
Statement s = conn.createStatement();
//prior to load refresh of a single row returns -1
- ResultSet rs = s.executeQuery("select * from (call SYS.refreshMatViewRow('TEST.RANDOMVIEW', 0)) p");
+ ResultSet rs = s.executeQuery("select * from (call refreshMatViewRow('TEST.RANDOMVIEW', 0)) p");
assertTrue(rs.next());
assertEquals(-1, rs.getInt(1));
assertFalse(rs.next());
- rs = s.executeQuery("select * from (call SYS.refreshMatView('TEST.RANDOMVIEW', false)) p");
+ rs = s.executeQuery("select * from (call refreshMatView('TEST.RANDOMVIEW', false)) p");
assertTrue(rs.next());
assertEquals(1, rs.getInt(1));
- rs = s.executeQuery("select * from SYS.MatViews where name = 'RandomView'");
+ rs = s.executeQuery("select * from MatViews where name = 'RandomView'");
assertTrue(rs.next());
assertEquals("LOADED", rs.getString("loadstate"));
assertEquals(true, rs.getBoolean("valid"));
@@ -124,23 +124,23 @@
assertTrue(rs.next());
double key = rs.getDouble(1);
- rs = s.executeQuery("select * from (call SYS.refreshMatViewRow('TEST.RANDOMVIEW', "+key+")) p");
+ rs = s.executeQuery("select * from (call refreshMatViewRow('TEST.RANDOMVIEW', "+key+")) p");
assertTrue(rs.next());
assertEquals(1, rs.getInt(1)); //1 row updated (removed)
rs = s.executeQuery("select * from TEST.RANDOMVIEW");
assertFalse(rs.next());
- rs = s.executeQuery("select * from (call SYS.refreshMatViewRow('TEST.RANDOMVIEW', "+key+")) p");
+ rs = s.executeQuery("select * from (call refreshMatViewRow('TEST.RANDOMVIEW', "+key+")) p");
assertTrue(rs.next());
assertEquals(0, rs.getInt(1)); //no rows updated
}
@Test(expected=TeiidSQLException.class) public void testSystemMatViewsWithRowRefreshNoPk() throws Exception {
Statement s = conn.createStatement();
- s.executeQuery("select * from (call SYS.refreshMatView('TEST.MATVIEW', false)) p");
+ s.executeQuery("select * from (call refreshMatView('TEST.MATVIEW', false)) p");
//prior to load refresh of a single row returns -1
- s.executeQuery("select * from (call SYS.refreshMatViewRow('TEST.MATVIEW', 0)) p");
+ s.executeQuery("select * from (call refreshMatViewRow('TEST.MATVIEW', 0)) p");
}
}
Modified: trunk/test-integration/common/src/test/java/org/teiid/systemmodel/TestSystemVirtualModel.java
===================================================================
--- trunk/test-integration/common/src/test/java/org/teiid/systemmodel/TestSystemVirtualModel.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/test-integration/common/src/test/java/org/teiid/systemmodel/TestSystemVirtualModel.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -22,6 +22,9 @@
package org.teiid.systemmodel;
+import java.io.IOException;
+import java.sql.SQLException;
+
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.*;
@@ -97,15 +100,9 @@
checkResult("testKeyColumns", "select* from SYS.KeyColumns order by Name, KeyName"); //$NON-NLS-1$ //$NON-NLS-2$
}
- @Test public void testVDBResourcePathsProcedure() {
-
- String[] expected = { "ResourcePath[string] isBinary[boolean]",
- "/parts/partsmd/PartsSupplier.xmi false",
- "/ConfigurationInfo.def false",
- "/MetaMatrix-VdbManifestModel.xmi false",
- };
- execute("exec getVDBResourcePaths()",new Object[] {}); //$NON-NLS-1$
- assertResults(expected);
+ @Test public void testVDBResources() throws IOException, SQLException {
+ execute("select * from vdbresources",new Object[] {}); //$NON-NLS-1$
+ TestMMDatabaseMetaData.compareResultSet(this.internalResultSet);
}
@Test public void testColumns() throws Exception {
Modified: trunk/test-integration/common/src/test/resources/TestCase3473/testGetTables.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestCase3473/testGetTables.expected 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/test-integration/common/src/test/resources/TestCase3473/testGetTables.expected 2010-09-24 18:51:07 UTC (rev 2603)
@@ -4,7 +4,6 @@
test SYS DataTypes SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
test SYS KeyColumns SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
test SYS Keys SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
-test SYS MatViews SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
test SYS ProcedureParams SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
test SYS Procedures SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
test SYS Properties SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
@@ -12,6 +11,7 @@
test SYS Schemas SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
test SYS Tables SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
test SYS VirtualDatabases SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
+test SYSADMIN MatViews SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
test pg_catalog pg_am SYSTEM TABLE <null> <null> <null> <null> <null> <null> false
test pg_catalog pg_attrdef SYSTEM TABLE <null> <null> <null> <null> <null> <null> false
test pg_catalog pg_attribute SYSTEM TABLE <null> <null> <null> <null> <null> <null> false
@@ -23,10 +23,11 @@
test pg_catalog pg_trigger SYSTEM TABLE <null> <null> <null> <null> <null> <null> false
test pg_catalog pg_type SYSTEM TABLE <null> <null> <null> <null> <null> <null> false
test pg_catalog pg_user SYSTEM TABLE <null> <null> <null> <null> <null> <null> false
+test SYSADMIN VDBResources TABLE <null> <null> <null> <null> <null> <null> true
test test all_databases TABLE <null> <null> <null> <null> <null> <null> false
test test all_models TABLE <null> <null> <null> <null> <null> <null> false
test test all_tables TABLE <null> <null> <null> <null> <null> <null> false
-Row Count : 26
+Row Count : 27
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
TABLE_CAT 12 test java.lang.String TABLE_CAT string SYS Tables 255 255 0 false true false true 1 false true true true
TABLE_SCHEM 12 test java.lang.String TABLE_SCHEM string SYS Tables 255 255 0 false true false true 1 false true true true
Modified: trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetColumns.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetColumns.expected 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetColumns.expected 2010-09-24 18:51:07 UTC (rev 2603)
@@ -363,15 +363,15 @@
QT_Ora9DS BQT2 LargeB BigDecimalValue 2 bigdecimal 20 <null> 0 10 1 <null> <null> <null> <null> 126 16 NO <null> <null> <null> !
<null> NO
QT_Ora9DS BQT1 LargeB ObjectValue 2000 object 2048 <null> 0 10 1 <null> <null> <null> <null> 2048 17 NO <null> <null> <null> !
<null> NO
QT_Ora9DS BQT2 LargeB ObjectValue 2000 object 2048 <null> 0 10 1 <null> <null> <null> <null> 2048 17 NO <null> <null> <null> !
<null> NO
-QT_Ora9DS SYS MatViews VDBName 12 string 255 <null> 0 10 0 <null> <null> <null> <null> 255 1 YES <null> <null> <null> !
<null> NO
-QT_Ora9DS SYS MatViews SchemaName 12 string 255 <null> 0 10 0 <null> <null> <null> <null> 255 2 YES <null> <null> <null> !
<null> NO
-QT_Ora9DS SYS MatViews Name 12 string 255 <null> 0 10 0 <null> <null> <null> <null> 255 3 YES <null> <null> <null> !
<null> NO
-QT_Ora9DS SYS MatViews TargetSchemaName 12 string 255 <null> 0 10 1 <null> <null> <null> <null> 255 4 NO <null> <null> <null> !
<null> NO
-QT_Ora9DS SYS MatViews TargetName 12 string 4000 <null> 0 10 1 <null> <null> <null> <null> 4000 5 NO <null> <null> <null> !
<null> NO
-QT_Ora9DS SYS MatViews Valid -7 boolean 1 <null> 0 10 1 <null> <null> <null> <null> 0 6 NO <null> <null> <null> !
<null> NO
-QT_Ora9DS SYS MatViews LoadState 12 string 255 <null> 0 10 1 <null> <null> <null> <null> 255 7 NO <null> <null> <null> !
<null> NO
-QT_Ora9DS SYS MatViews Updated 93 timestamp 29 <null> 0 10 1 <null> <null> <null> <null> 0 8 NO <null> <null> <null> !
<null> NO
-QT_Ora9DS SYS MatViews Cardinality 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 10 9 NO <null> <null> <null> !
<null> NO
+QT_Ora9DS SYSADMIN MatViews VDBName 12 string 255 <null> 0 10 0 <null> <null> <null> <null> 255 1 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS SYSADMIN MatViews SchemaName 12 string 255 <null> 0 10 0 <null> <null> <null> <null> 255 2 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS SYSADMIN MatViews Name 12 string 255 <null> 0 10 0 <null> <null> <null> <null> 255 3 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS SYSADMIN MatViews TargetSchemaName 12 string 255 <null> 0 10 1 <null> <null> <null> <null> 255 4 NO <null> <null> <null> !
<null> NO
+QT_Ora9DS SYSADMIN MatViews TargetName 12 string 4000 <null> 0 10 1 <null> <null> <null> <null> 4000 5 NO <null> <null> <null> !
<null> NO
+QT_Ora9DS SYSADMIN MatViews Valid -7 boolean 1 <null> 0 10 1 <null> <null> <null> <null> 0 6 NO <null> <null> <null> !
<null> NO
+QT_Ora9DS SYSADMIN MatViews LoadState 12 string 255 <null> 0 10 1 <null> <null> <null> <null> 255 7 NO <null> <null> <null> !
<null> NO
+QT_Ora9DS SYSADMIN MatViews Updated 93 timestamp 29 <null> 0 10 1 <null> <null> <null> <null> 0 8 NO <null> <null> <null> !
<null> NO
+QT_Ora9DS SYSADMIN MatViews Cardinality 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 10 9 NO <null> <null> <null> !
<null> NO
QT_Ora9DS BQT1 MediumA IntKey 4 integer 22 <null> 0 10 0 <null> <null> <null> <null> 0 1 YES <null> <null> <null> !
<null> NO
QT_Ora9DS BQT2 MediumA IntKey 4 integer 22 <null> 0 10 0 <null> <null> <null> <null> 0 1 YES <null> <null> <null> !
<null> NO
QT_Ora9DS BQT1 MediumA StringKey 12 string 10 <null> 0 10 0 <null> <null> <null> <null> 10 2 YES <null> <null> <null> !
<null> NO
@@ -685,6 +685,8 @@
QT_Ora9DS VQT Union.U9 A 4 integer 22 <null> 0 10 0 <null> <null> <null> <null> 0 1 YES <null> <null> <null> !
<null> NO
QT_Ora9DS VQT Union.U9 B 12 string 10 <null> 0 10 0 <null> <null> <null> <null> 10 2 YES <null> <null> <null> !
<null> NO
QT_Ora9DS VQT Union.U9 C 7 float 20 <null> 0 10 0 <null> <null> <null> <null> 126 3 YES <null> <null> <null> !
<null> NO
+QT_Ora9DS SYSADMIN VDBResources resourcePath 12 string 255 <null> 0 10 1 <null> <null> <null> <null> 255 1 NO <null> <null> <null> !
<null> NO
+QT_Ora9DS SYSADMIN VDBResources contents 2004 blob 2147483647 <null> 0 10 1 <null> <null> <null> <null> 0 2 NO <null> <null> <null> !
<null> NO
QT_Ora9DS SYS VirtualDatabases Name 12 string 255 <null> 0 10 0 <null> <null> <null> <null> 255 1 YES <null> <null> <null> !
<null> NO
QT_Ora9DS SYS VirtualDatabases Version 12 string 50 <null> 0 10 0 <null> <null> <null> <null> 50 2 YES <null> <null> <null> !
<null> NO
QT_Ora9DS XQTDoc choiceTestDocument choiceTest.data1.wrapper1.data1 12 string 4000 <null> 0 0 1 <null> <null> <null> <null> 0 0 NO <null> <null> <null> !
<null> NO
@@ -1066,7 +1068,7 @@
QT_Ora9DS XQT xqtFullData BigIntegerValue 2 biginteger 19 <null> 0 10 1 <null> <null> <null> <null> 28 15 NO <null> <null> <null> !
<null> NO
QT_Ora9DS XQT xqtFullData BigDecimalValue 2 bigdecimal 20 <null> 0 10 1 <null> <null> <null> <null> 126 16 NO <null> <null> <null> !
<null> NO
QT_Ora9DS XQT xqtFullData ObjectValue 2000 object 2048 <null> 0 10 1 <null> <null> <null> <null> 2048 17 NO <null> <null> <null> !
<null> NO
-Row Count : 1066
+Row Count : 1068
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
TABLE_CAT 12 QT_Ora9DS java.lang.String TABLE_CAT string SYS Columns 255 255 0 false false false false 0 true true false false
TABLE_SCHEM 12 QT_Ora9DS java.lang.String TABLE_SCHEM string SYS Columns 255 255 0 false true false true 1 false true true true
Modified: trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetProcedureColumns.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetProcedureColumns.expected 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetProcedureColumns.expected 2010-09-24 18:51:07 UTC (rev 2603)
@@ -41,21 +41,15 @@
QT_Ora9DS SP sp_rows_between BigIntegerValue 3 2 biginteger 19 28 0 10 1 <null> <null> <null> <null> <null> 15 YES sp_rows_between
QT_Ora9DS SP sp_rows_between BigDecimalValue 3 2 bigdecimal 20 126 0 10 1 <null> <null> <null> <null> <null> 16 YES sp_rows_between
QT_Ora9DS SP sp_rows_between ObjectValue 3 2000 object 2147483647 2048 0 10 1 <null> <null> <null> <null> <null> 17 YES sp_rows_between
-QT_Ora9DS SYS getBinaryVDBResource resourcePath 1 12 string 50 50 0 10 0 <null> <null> <null> <null> <null> 1 NO getBinaryVDBResource
-QT_Ora9DS SYS getBinaryVDBResource VdbResource 3 2004 blob 2147483647 2147483647 0 10 1 <null> <null> <null> <null> <null> 1 YES getBinaryVDBResource
-QT_Ora9DS SYS getCharacterVDBResource resourcePath 1 12 string 50 50 0 10 0 <null> <null> <null> <null> <null> 1 NO getCharacterVDBResource
-QT_Ora9DS SYS getCharacterVDBResource VdbResource 3 2005 clob 2147483647 2147483647 0 10 1 <null> <null> <null> <null> <null> 1 YES getCharacterVDBResource
-QT_Ora9DS SYS getVDBResourcePaths ResourcePath 3 12 string 50 50 0 10 1 <null> <null> <null> <null> <null> 1 YES getVDBResourcePaths
-QT_Ora9DS SYS getVDBResourcePaths isBinary 3 -7 boolean 1 1 0 10 1 <null> <null> <null> <null> <null> 2 YES getVDBResourcePaths
QT_Ora9DS SYS getXMLSchemas document 1 12 string 4000 4000 0 10 0 <null> <null> <null> <null> <null> 1 NO getXMLSchemas
QT_Ora9DS SYS getXMLSchemas schema 3 2009 xml 2147483647 2147483647 0 10 1 <null> <null> <null> <null> <null> 1 YES getXMLSchemas
-QT_Ora9DS SYS refreshMatView ViewName 1 12 string 4000 4000 0 10 0 <null> <null> <null> <null> <null> 1 NO refreshMatView
-QT_Ora9DS SYS refreshMatView Invalidate 1 -7 boolean 1 1 0 10 0 <null> <null> <null> <null> <null> 2 NO refreshMatView
-QT_Ora9DS SYS refreshMatView RowsUpdated 5 4 integer 10 10 0 10 0 <null> <null> <null> <null> <null> 3 NO refreshMatView
-QT_Ora9DS SYS refreshMatViewRow ViewName 1 12 string 4000 4000 0 10 0 <null> <null> <null> <null> <null> 1 NO refreshMatViewRow
-QT_Ora9DS SYS refreshMatViewRow Key 1 2000 object 2147483647 2147483647 0 10 0 <null> <null> <null> <null> <null> 2 NO refreshMatViewRow
-QT_Ora9DS SYS refreshMatViewRow RowsUpdated 5 4 integer 10 10 0 10 0 <null> <null> <null> <null> <null> 3 NO refreshMatViewRow
-Row Count : 55
+QT_Ora9DS SYSADMIN refreshMatView ViewName 1 12 string 4000 4000 0 10 0 <null> <null> <null> <null> <null> 1 NO refreshMatView
+QT_Ora9DS SYSADMIN refreshMatView Invalidate 1 -7 boolean 1 1 0 10 0 <null> <null> <null> <null> <null> 2 NO refreshMatView
+QT_Ora9DS SYSADMIN refreshMatView RowsUpdated 5 4 integer 10 10 0 10 0 <null> <null> <null> <null> <null> 3 NO refreshMatView
+QT_Ora9DS SYSADMIN refreshMatViewRow ViewName 1 12 string 4000 4000 0 10 0 <null> <null> <null> <null> <null> 1 NO refreshMatViewRow
+QT_Ora9DS SYSADMIN refreshMatViewRow Key 1 2000 object 2147483647 2147483647 0 10 0 <null> <null> <null> <null> <null> 2 NO refreshMatViewRow
+QT_Ora9DS SYSADMIN refreshMatViewRow RowsUpdated 5 4 integer 10 10 0 10 0 <null> <null> <null> <null> <null> 3 NO refreshMatViewRow
+Row Count : 49
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
PROCEDURE_CAT 12 QT_Ora9DS java.lang.String PROCEDURE_CAT string SYS ProcedureParams 255 255 0 false false false false 0 true true false false
PROCEDURE_SCHEM 12 QT_Ora9DS java.lang.String PROCEDURE_SCHEM string SYS ProcedureParams 255 255 0 false true false true 1 false true true true
Modified: trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetProcedures.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetProcedures.expected 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetProcedures.expected 2010-09-24 18:51:07 UTC (rev 2603)
@@ -4,13 +4,10 @@
QT_Ora9DS SP sp_count_all_smalla_rows <null> <null> <null> <null> 1 sp_count_all_smalla_rows
QT_Ora9DS SP sp_count_rows_between <null> <null> <null> <null> 1 sp_count_rows_between
QT_Ora9DS SP sp_rows_between <null> <null> <null> <null> 2 sp_rows_between
-QT_Ora9DS SYS getBinaryVDBResource <null> <null> <null> <null> 2 getBinaryVDBResource
-QT_Ora9DS SYS getCharacterVDBResource <null> <null> <null> <null> 2 getCharacterVDBResource
-QT_Ora9DS SYS getVDBResourcePaths <null> <null> <null> <null> 2 getVDBResourcePaths
QT_Ora9DS SYS getXMLSchemas <null> <null> <null> <null> 2 getXMLSchemas
-QT_Ora9DS SYS refreshMatView <null> <null> <null> <null> 1 refreshMatView
-QT_Ora9DS SYS refreshMatViewRow <null> <null> <null> <null> 1 refreshMatViewRow
-Row Count : 10
+QT_Ora9DS SYSADMIN refreshMatView <null> <null> <null> <null> 1 refreshMatView
+QT_Ora9DS SYSADMIN refreshMatViewRow <null> <null> <null> <null> 1 refreshMatViewRow
+Row Count : 7
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
PROCEDURE_CAT 12 QT_Ora9DS java.lang.String PROCEDURE_CAT string SYS Procedures 255 255 0 false false false false 0 true true false false
PROCEDURE_SCHEM 12 QT_Ora9DS java.lang.String PROCEDURE_SCHEM string SYS Procedures 255 255 0 false true false true 1 false true true true
Modified: trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetProceduresWithEscape.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetProceduresWithEscape.expected 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetProceduresWithEscape.expected 2010-09-24 18:51:07 UTC (rev 2603)
@@ -4,13 +4,10 @@
QT_Ora9DS SP sp_count_all_smalla_rows <null> <null> <null> <null> 1 sp_count_all_smalla_rows
QT_Ora9DS SP sp_count_rows_between <null> <null> <null> <null> 1 sp_count_rows_between
QT_Ora9DS SP sp_rows_between <null> <null> <null> <null> 2 sp_rows_between
-QT_Ora9DS SYS getBinaryVDBResource <null> <null> <null> <null> 2 getBinaryVDBResource
-QT_Ora9DS SYS getCharacterVDBResource <null> <null> <null> <null> 2 getCharacterVDBResource
-QT_Ora9DS SYS getVDBResourcePaths <null> <null> <null> <null> 2 getVDBResourcePaths
QT_Ora9DS SYS getXMLSchemas <null> <null> <null> <null> 2 getXMLSchemas
-QT_Ora9DS SYS refreshMatView <null> <null> <null> <null> 1 refreshMatView
-QT_Ora9DS SYS refreshMatViewRow <null> <null> <null> <null> 1 refreshMatViewRow
-Row Count : 10
+QT_Ora9DS SYSADMIN refreshMatView <null> <null> <null> <null> 1 refreshMatView
+QT_Ora9DS SYSADMIN refreshMatViewRow <null> <null> <null> <null> 1 refreshMatViewRow
+Row Count : 7
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
PROCEDURE_CAT 12 QT_Ora9DS java.lang.String PROCEDURE_CAT string SYS Procedures 255 255 0 false false false false 0 true true false false
PROCEDURE_SCHEM 12 QT_Ora9DS java.lang.String PROCEDURE_SCHEM string SYS Procedures 255 255 0 false true false true 1 false true true true
Modified: trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetSchemas.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetSchemas.expected 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetSchemas.expected 2010-09-24 18:51:07 UTC (rev 2603)
@@ -4,13 +4,14 @@
BQT2 QT_Ora9DS
SP QT_Ora9DS
SYS QT_Ora9DS
+SYSADMIN QT_Ora9DS
VQT QT_Ora9DS
XQT QT_Ora9DS
XQTDoc QT_Ora9DS
XQTNestedDoc QT_Ora9DS
XQTRecursiveDoc QT_Ora9DS
pg_catalog QT_Ora9DS
-Row Count : 10
+Row Count : 11
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
TABLE_SCHEM 12 QT_Ora9DS java.lang.String TABLE_SCHEM string SYS Schemas 255 255 0 false true false true 1 false true true true
TABLE_CATALOG 12 QT_Ora9DS java.lang.String TABLE_CATALOG string SYS Schemas 255 255 0 false true false true 1 false true true true
Modified: trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetTables.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetTables.expected 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetTables.expected 2010-09-24 18:51:07 UTC (rev 2603)
@@ -22,7 +22,6 @@
QT_Ora9DS SYS DataTypes SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
QT_Ora9DS SYS KeyColumns SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
QT_Ora9DS SYS Keys SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
-QT_Ora9DS SYS MatViews SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
QT_Ora9DS SYS ProcedureParams SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
QT_Ora9DS SYS Procedures SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
QT_Ora9DS SYS Properties SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
@@ -30,6 +29,7 @@
QT_Ora9DS SYS Schemas SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
QT_Ora9DS SYS Tables SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
QT_Ora9DS SYS VirtualDatabases SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
+QT_Ora9DS SYSADMIN MatViews SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
QT_Ora9DS pg_catalog pg_am SYSTEM TABLE <null> <null> <null> <null> <null> <null> false
QT_Ora9DS pg_catalog pg_attrdef SYSTEM TABLE <null> <null> <null> <null> <null> <null> false
QT_Ora9DS pg_catalog pg_attribute SYSTEM TABLE <null> <null> <null> <null> <null> <null> false
@@ -57,6 +57,7 @@
QT_Ora9DS BQT2 MediumB TABLE <null> <null> <null> <null> <null> <null> true
QT_Ora9DS BQT2 SmallA TABLE <null> <null> <null> <null> <null> <null> true
QT_Ora9DS BQT2 SmallB TABLE <null> <null> <null> <null> <null> <null> true
+QT_Ora9DS SYSADMIN VDBResources TABLE <null> <null> <null> <null> <null> <null> true
QT_Ora9DS VQT Base.Agg1 TABLE <null> <null> <null> <null> <null> <null> false
QT_Ora9DS VQT Base.Agg2 TABLE <null> <null> <null> <null> <null> <null> false
QT_Ora9DS VQT Base.Agg3 TABLE <null> <null> <null> <null> <null> <null> false
@@ -133,7 +134,7 @@
QT_Ora9DS XQTNestedDoc testOptimizableTempTable.MappingClasses.moveToRootTempTable XMLSTAGINGTABLE <null> <null> <null> <null> <null> <null> false
QT_Ora9DS XQTNestedDoc testRootTempTable.MappingClasses.TemporaryTable1 XMLSTAGINGTABLE <null> <null> <null> <null> <null> <null> false
QT_Ora9DS XQTRecursiveDoc testSimpleTempTable.MappingClasses.TemporaryTable1 XMLSTAGINGTABLE <null> <null> <null> <null> <null> <null> false
-Row Count : 133
+Row Count : 134
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
TABLE_CAT 12 QT_Ora9DS java.lang.String TABLE_CAT string SYS Tables 255 255 0 false true false true 1 false true true true
TABLE_SCHEM 12 QT_Ora9DS java.lang.String TABLE_SCHEM string SYS Tables 255 255 0 false true false true 1 false true true true
Modified: trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetTables_allTables.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetTables_allTables.expected 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetTables_allTables.expected 2010-09-24 18:51:07 UTC (rev 2603)
@@ -22,7 +22,6 @@
QT_Ora9DS SYS DataTypes SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
QT_Ora9DS SYS KeyColumns SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
QT_Ora9DS SYS Keys SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
-QT_Ora9DS SYS MatViews SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
QT_Ora9DS SYS ProcedureParams SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
QT_Ora9DS SYS Procedures SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
QT_Ora9DS SYS Properties SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
@@ -30,6 +29,7 @@
QT_Ora9DS SYS Schemas SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
QT_Ora9DS SYS Tables SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
QT_Ora9DS SYS VirtualDatabases SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
+QT_Ora9DS SYSADMIN MatViews SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
QT_Ora9DS pg_catalog pg_am SYSTEM TABLE <null> <null> <null> <null> <null> <null> false
QT_Ora9DS pg_catalog pg_attrdef SYSTEM TABLE <null> <null> <null> <null> <null> <null> false
QT_Ora9DS pg_catalog pg_attribute SYSTEM TABLE <null> <null> <null> <null> <null> <null> false
@@ -57,6 +57,7 @@
QT_Ora9DS BQT2 MediumB TABLE <null> <null> <null> <null> <null> <null> true
QT_Ora9DS BQT2 SmallA TABLE <null> <null> <null> <null> <null> <null> true
QT_Ora9DS BQT2 SmallB TABLE <null> <null> <null> <null> <null> <null> true
+QT_Ora9DS SYSADMIN VDBResources TABLE <null> <null> <null> <null> <null> <null> true
QT_Ora9DS VQT Base.Agg1 TABLE <null> <null> <null> <null> <null> <null> false
QT_Ora9DS VQT Base.Agg2 TABLE <null> <null> <null> <null> <null> <null> false
QT_Ora9DS VQT Base.Agg3 TABLE <null> <null> <null> <null> <null> <null> false
@@ -133,7 +134,7 @@
QT_Ora9DS XQTNestedDoc testOptimizableTempTable.MappingClasses.moveToRootTempTable XMLSTAGINGTABLE <null> <null> <null> <null> <null> <null> false
QT_Ora9DS XQTNestedDoc testRootTempTable.MappingClasses.TemporaryTable1 XMLSTAGINGTABLE <null> <null> <null> <null> <null> <null> false
QT_Ora9DS XQTRecursiveDoc testSimpleTempTable.MappingClasses.TemporaryTable1 XMLSTAGINGTABLE <null> <null> <null> <null> <null> <null> false
-Row Count : 133
+Row Count : 134
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
TABLE_CAT 12 QT_Ora9DS java.lang.String TABLE_CAT string SYS Tables 255 255 0 false true false true 1 false true true true
TABLE_SCHEM 12 QT_Ora9DS java.lang.String TABLE_SCHEM string SYS Tables 255 255 0 false true false true 1 false true true true
Modified: trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetTables_specificTableMultipleTypes.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetTables_specificTableMultipleTypes.expected 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetTables_specificTableMultipleTypes.expected 2010-09-24 18:51:07 UTC (rev 2603)
@@ -16,6 +16,7 @@
QT_Ora9DS BQT2 MediumB TABLE <null> <null> <null> <null> <null> <null> true
QT_Ora9DS BQT2 SmallA TABLE <null> <null> <null> <null> <null> <null> true
QT_Ora9DS BQT2 SmallB TABLE <null> <null> <null> <null> <null> <null> true
+QT_Ora9DS SYSADMIN VDBResources TABLE <null> <null> <null> <null> <null> <null> true
QT_Ora9DS VQT Base.Agg1 TABLE <null> <null> <null> <null> <null> <null> false
QT_Ora9DS VQT Base.Agg2 TABLE <null> <null> <null> <null> <null> <null> false
QT_Ora9DS VQT Base.Agg3 TABLE <null> <null> <null> <null> <null> <null> false
@@ -49,7 +50,7 @@
QT_Ora9DS VQT Union.U9 TABLE <null> <null> <null> <null> <null> <null> false
QT_Ora9DS XQT xqtData TABLE <null> <null> <null> <null> <null> <null> false
QT_Ora9DS XQT xqtFullData TABLE <null> <null> <null> <null> <null> <null> false
-Row Count : 49
+Row Count : 50
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
TABLE_CAT 12 QT_Ora9DS java.lang.String TABLE_CAT string SYS Tables 255 255 0 false true false true 1 false true true true
TABLE_SCHEM 12 QT_Ora9DS java.lang.String TABLE_SCHEM string SYS Tables 255 255 0 false true false true 1 false true true true
Modified: trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetTables_specificTableTypes.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetTables_specificTableTypes.expected 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/test-integration/common/src/test/resources/TestMMDatabaseMetaData/testGetTables_specificTableTypes.expected 2010-09-24 18:51:07 UTC (rev 2603)
@@ -16,6 +16,7 @@
QT_Ora9DS BQT2 MediumB TABLE <null> <null> <null> <null> <null> <null> true
QT_Ora9DS BQT2 SmallA TABLE <null> <null> <null> <null> <null> <null> true
QT_Ora9DS BQT2 SmallB TABLE <null> <null> <null> <null> <null> <null> true
+QT_Ora9DS SYSADMIN VDBResources TABLE <null> <null> <null> <null> <null> <null> true
QT_Ora9DS VQT Base.Agg1 TABLE <null> <null> <null> <null> <null> <null> false
QT_Ora9DS VQT Base.Agg2 TABLE <null> <null> <null> <null> <null> <null> false
QT_Ora9DS VQT Base.Agg3 TABLE <null> <null> <null> <null> <null> <null> false
@@ -49,7 +50,7 @@
QT_Ora9DS VQT Union.U9 TABLE <null> <null> <null> <null> <null> <null> false
QT_Ora9DS XQT xqtData TABLE <null> <null> <null> <null> <null> <null> false
QT_Ora9DS XQT xqtFullData TABLE <null> <null> <null> <null> <null> <null> false
-Row Count : 49
+Row Count : 50
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
TABLE_CAT 12 QT_Ora9DS java.lang.String TABLE_CAT string SYS Tables 255 255 0 false true false true 1 false true true true
TABLE_SCHEM 12 QT_Ora9DS java.lang.String TABLE_SCHEM string SYS Tables 255 255 0 false true false true 1 false true true true
Modified: trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_ATTRIBUTE.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_ATTRIBUTE.expected 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_ATTRIBUTE.expected 2010-09-24 18:51:07 UTC (rev 2603)
@@ -19,222 +19,224 @@
16 4 SUPPLIER_STATE 1043 2 5 2 false false false
17 5 VDBName 1043 255 1 255 false false false
18 5 SchemaName 1043 255 2 255 false false false
-19 5 TableName 1043 255 3 255 false false false
-20 5 Name 1043 255 4 255 false false false
-21 5 Position <null> 10 5 10 false false false
-22 5 NameInSource 1043 255 6 255 false false false
-23 5 DataType 1043 100 7 100 false false false
-24 5 Scale <null> 10 8 10 false false false
-25 5 Length <null> 10 9 10 false false false
-26 5 IsLengthFixed 16 1 10 1 false false false
-27 5 SupportsSelect 16 1 11 1 false false false
-28 5 SupportsUpdates 16 1 12 1 false false false
-29 5 IsCaseSensitive 16 1 13 1 false false false
-30 5 IsSigned 16 1 14 1 false false false
-31 5 IsCurrency 16 1 15 1 false false false
-32 5 IsAutoIncremented 16 1 16 1 false false false
-33 5 NullType 1043 20 17 20 false false false
-34 5 MinRange 1043 50 18 50 false false false
-35 5 MaxRange 1043 50 19 50 false false false
-36 5 SearchType 1043 20 20 20 false false false
-37 5 Format 1043 255 21 255 false false false
-38 5 DefaultValue 1043 255 22 255 false false false
-39 5 JavaClass 1043 500 23 500 false false false
-40 5 Precision <null> 10 24 10 false false false
-41 5 CharOctetLength <null> 10 25 10 false false false
-42 5 Radix <null> 10 26 10 false false false
-43 5 UID 1043 50 27 50 false false false
-44 5 Description 1043 255 28 255 false false false
-45 5 OID <null> 10 29 10 false false false
-46 6 Name 1043 100 1 100 false false false
-47 6 IsStandard 16 1 2 1 false false false
-48 6 IsPhysical 16 1 3 1 false false false
-49 6 TypeName 1043 100 4 100 false false false
-50 6 JavaClass 1043 500 5 500 false false false
-51 6 Scale <null> 10 6 10 false false false
-52 6 TypeLength <null> 10 7 10 false false false
-53 6 NullType 1043 20 8 20 false false false
-54 6 IsSigned 16 1 9 1 false false false
-55 6 IsAutoIncremented 16 1 10 1 false false false
-56 6 IsCaseSensitive 16 1 11 1 false false false
-57 6 Precision <null> 10 12 10 false false false
-58 6 Radix <null> 10 13 10 false false false
-59 6 SearchType 1043 20 14 20 false false false
-60 6 UID 1043 50 15 50 false false false
-61 6 RuntimeType 1043 64 16 64 false false false
-62 6 BaseType 1043 64 17 64 false false false
-63 6 Description 1043 255 18 255 false false false
-64 6 OID <null> 10 19 10 false false false
-65 7 VDBName 1043 255 1 255 false false false
-66 7 SchemaName 1043 255 2 255 false false false
-67 7 TableName 1043 2048 3 2048 false false false
-68 7 Name 1043 255 4 255 false false false
-69 7 KeyName 1043 255 5 255 false false false
-70 7 KeyType 1043 20 6 20 false false false
-71 7 RefKeyUID 1043 50 7 50 false false false
-72 7 UID 1043 50 8 50 false false false
-73 7 Position <null> 10 9 10 false false false
-74 7 OID <null> 10 10 10 false false false
-75 8 VDBName 1043 255 1 255 false false false
-76 8 SchemaName 1043 255 2 255 false false false
-77 8 TableName 1043 2048 3 2048 false false false
-78 8 Name 1043 255 4 255 false false false
-79 8 Description 1043 255 5 255 false false false
-80 8 NameInSource 1043 255 6 255 false false false
-81 8 Type 1043 20 7 20 false false false
-82 8 IsIndexed 16 1 8 1 false false false
-83 8 RefKeyUID 1043 50 9 50 false false false
-84 8 UID 1043 50 10 50 false false false
-85 8 OID <null> 10 11 10 false false false
-86 9 VDBName 1043 255 1 255 false false false
-87 9 SchemaName 1043 255 2 255 false false false
-88 9 Name 1043 255 3 255 false false false
-89 9 TargetSchemaName 1043 255 4 255 false false false
-90 9 TargetName 1043 4000 5 4000 false false false
-91 9 Valid 16 0 6 0 false false false
-92 9 LoadState 1043 255 7 255 false false false
-93 9 Updated 1114 0 8 0 false false false
-94 9 Cardinality <null> 10 9 10 false false false
-95 10 VDBName 1043 255 1 255 false false false
-96 10 SchemaName 1043 255 2 255 false false false
-97 10 ProcedureName 1043 255 3 255 false false false
-98 10 Name 1043 255 4 255 false false false
-99 10 DataType 1043 25 5 25 false false false
-100 10 Position <null> 10 6 10 false false false
-101 10 Type 1043 100 7 100 false false false
-102 10 Optional 16 1 8 1 false false false
-103 10 Precision <null> 10 9 10 false false false
-104 10 TypeLength <null> 10 10 10 false false false
-105 10 Scale <null> 10 11 10 false false false
-106 10 Radix <null> 10 12 10 false false false
-107 10 NullType 1043 10 13 10 false false false
-108 10 UID 1043 50 14 50 false false false
-109 10 Description 1043 255 15 255 false false false
-110 10 OID <null> 10 16 10 false false false
-111 11 VDBName 1043 255 1 255 false false false
-112 11 SchemaName 1043 255 2 255 false false false
-113 11 Name 1043 255 3 255 false false false
-114 11 NameInSource 1043 255 4 255 false false false
-115 11 ReturnsResults 16 1 5 1 false false false
-116 11 UID 1043 50 6 50 false false false
-117 11 Description 1043 255 7 255 false false false
-118 11 OID <null> 10 8 10 false false false
-119 12 Name 1043 255 1 255 false false false
-120 12 Value 1043 255 2 255 false false false
-121 12 UID 1043 50 3 50 false false false
-122 12 OID <null> 10 4 10 false false false
-123 13 PKTABLE_CAT 1043 255 1 255 false false false
-124 13 PKTABLE_SCHEM 1043 255 2 255 false false false
-125 13 PKTABLE_NAME 1043 255 3 255 false false false
-126 13 PKCOLUMN_NAME 1043 255 4 255 false false false
-127 13 FKTABLE_CAT 1043 255 5 255 false false false
-128 13 FKTABLE_SCHEM 1043 255 6 255 false false false
-129 13 FKTABLE_NAME 1043 255 7 255 false false false
-130 13 FKCOLUMN_NAME 1043 255 8 255 false false false
-131 13 KEY_SEQ 21 5 9 5 false false false
-132 13 UPDATE_RULE <null> 10 10 10 false false false
-133 13 DELETE_RULE <null> 10 11 10 false false false
-134 13 FK_NAME 1043 255 12 255 false false false
-135 13 PK_NAME 1043 255 13 255 false false false
-136 13 DEFERRABILITY <null> 10 14 10 false false false
-137 14 VDBName 1043 255 1 255 false false false
-138 14 Name 1043 255 2 255 false false false
-139 14 IsPhysical 16 1 3 1 false false false
-140 14 UID 1043 50 4 50 false false false
-141 14 Description 1043 255 5 255 false false false
-142 14 PrimaryMetamodelURI 1043 255 6 255 false false false
-143 14 OID <null> 10 7 10 false false false
-144 15 VDBName 1043 255 1 255 false false false
-145 15 SchemaName 1043 255 2 255 false false false
-146 15 Name 1043 255 3 255 false false false
-147 15 Type 1043 20 4 20 false false false
-148 15 NameInSource 1043 255 5 255 false false false
-149 15 IsPhysical 16 1 6 1 false false false
-150 15 SupportsUpdates 16 1 7 1 false false false
-151 15 UID 1043 50 8 50 false false false
-152 15 Cardinality <null> 10 9 10 false false false
-153 15 Description 1043 255 10 255 false false false
-154 15 IsSystem 16 1 11 1 false false false
-155 15 IsMaterialized 16 0 12 0 false false false
-156 15 OID <null> 10 13 10 false false false
-157 16 Name 1043 255 1 255 false false false
-158 16 Version 1043 50 2 50 false false false
-159 17 oid <null> 0 1 0 false false false
-160 17 nspname 1043 0 2 0 false false false
+19 5 Name 1043 255 3 255 false false false
+20 5 TargetSchemaName 1043 255 4 255 false false false
+21 5 TargetName 1043 4000 5 4000 false false false
+22 5 Valid 16 0 6 0 false false false
+23 5 LoadState 1043 255 7 255 false false false
+24 5 Updated 1114 0 8 0 false false false
+25 5 Cardinality <null> 10 9 10 false false false
+26 6 resourcePath 1043 255 1 255 false false false
+27 6 contents 14939 0 2 0 false false false
+28 7 VDBName 1043 255 1 255 false false false
+29 7 SchemaName 1043 255 2 255 false false false
+30 7 TableName 1043 255 3 255 false false false
+31 7 Name 1043 255 4 255 false false false
+32 7 Position <null> 10 5 10 false false false
+33 7 NameInSource 1043 255 6 255 false false false
+34 7 DataType 1043 100 7 100 false false false
+35 7 Scale <null> 10 8 10 false false false
+36 7 Length <null> 10 9 10 false false false
+37 7 IsLengthFixed 16 1 10 1 false false false
+38 7 SupportsSelect 16 1 11 1 false false false
+39 7 SupportsUpdates 16 1 12 1 false false false
+40 7 IsCaseSensitive 16 1 13 1 false false false
+41 7 IsSigned 16 1 14 1 false false false
+42 7 IsCurrency 16 1 15 1 false false false
+43 7 IsAutoIncremented 16 1 16 1 false false false
+44 7 NullType 1043 20 17 20 false false false
+45 7 MinRange 1043 50 18 50 false false false
+46 7 MaxRange 1043 50 19 50 false false false
+47 7 SearchType 1043 20 20 20 false false false
+48 7 Format 1043 255 21 255 false false false
+49 7 DefaultValue 1043 255 22 255 false false false
+50 7 JavaClass 1043 500 23 500 false false false
+51 7 Precision <null> 10 24 10 false false false
+52 7 CharOctetLength <null> 10 25 10 false false false
+53 7 Radix <null> 10 26 10 false false false
+54 7 UID 1043 50 27 50 false false false
+55 7 Description 1043 255 28 255 false false false
+56 7 OID <null> 10 29 10 false false false
+57 8 Name 1043 100 1 100 false false false
+58 8 IsStandard 16 1 2 1 false false false
+59 8 IsPhysical 16 1 3 1 false false false
+60 8 TypeName 1043 100 4 100 false false false
+61 8 JavaClass 1043 500 5 500 false false false
+62 8 Scale <null> 10 6 10 false false false
+63 8 TypeLength <null> 10 7 10 false false false
+64 8 NullType 1043 20 8 20 false false false
+65 8 IsSigned 16 1 9 1 false false false
+66 8 IsAutoIncremented 16 1 10 1 false false false
+67 8 IsCaseSensitive 16 1 11 1 false false false
+68 8 Precision <null> 10 12 10 false false false
+69 8 Radix <null> 10 13 10 false false false
+70 8 SearchType 1043 20 14 20 false false false
+71 8 UID 1043 50 15 50 false false false
+72 8 RuntimeType 1043 64 16 64 false false false
+73 8 BaseType 1043 64 17 64 false false false
+74 8 Description 1043 255 18 255 false false false
+75 8 OID <null> 10 19 10 false false false
+76 9 VDBName 1043 255 1 255 false false false
+77 9 SchemaName 1043 255 2 255 false false false
+78 9 TableName 1043 2048 3 2048 false false false
+79 9 Name 1043 255 4 255 false false false
+80 9 KeyName 1043 255 5 255 false false false
+81 9 KeyType 1043 20 6 20 false false false
+82 9 RefKeyUID 1043 50 7 50 false false false
+83 9 UID 1043 50 8 50 false false false
+84 9 Position <null> 10 9 10 false false false
+85 9 OID <null> 10 10 10 false false false
+86 10 VDBName 1043 255 1 255 false false false
+87 10 SchemaName 1043 255 2 255 false false false
+88 10 TableName 1043 2048 3 2048 false false false
+89 10 Name 1043 255 4 255 false false false
+90 10 Description 1043 255 5 255 false false false
+91 10 NameInSource 1043 255 6 255 false false false
+92 10 Type 1043 20 7 20 false false false
+93 10 IsIndexed 16 1 8 1 false false false
+94 10 RefKeyUID 1043 50 9 50 false false false
+95 10 UID 1043 50 10 50 false false false
+96 10 OID <null> 10 11 10 false false false
+97 11 VDBName 1043 255 1 255 false false false
+98 11 SchemaName 1043 255 2 255 false false false
+99 11 ProcedureName 1043 255 3 255 false false false
+100 11 Name 1043 255 4 255 false false false
+101 11 DataType 1043 25 5 25 false false false
+102 11 Position <null> 10 6 10 false false false
+103 11 Type 1043 100 7 100 false false false
+104 11 Optional 16 1 8 1 false false false
+105 11 Precision <null> 10 9 10 false false false
+106 11 TypeLength <null> 10 10 10 false false false
+107 11 Scale <null> 10 11 10 false false false
+108 11 Radix <null> 10 12 10 false false false
+109 11 NullType 1043 10 13 10 false false false
+110 11 UID 1043 50 14 50 false false false
+111 11 Description 1043 255 15 255 false false false
+112 11 OID <null> 10 16 10 false false false
+113 12 VDBName 1043 255 1 255 false false false
+114 12 SchemaName 1043 255 2 255 false false false
+115 12 Name 1043 255 3 255 false false false
+116 12 NameInSource 1043 255 4 255 false false false
+117 12 ReturnsResults 16 1 5 1 false false false
+118 12 UID 1043 50 6 50 false false false
+119 12 Description 1043 255 7 255 false false false
+120 12 OID <null> 10 8 10 false false false
+121 13 Name 1043 255 1 255 false false false
+122 13 Value 1043 255 2 255 false false false
+123 13 UID 1043 50 3 50 false false false
+124 13 OID <null> 10 4 10 false false false
+125 14 PKTABLE_CAT 1043 255 1 255 false false false
+126 14 PKTABLE_SCHEM 1043 255 2 255 false false false
+127 14 PKTABLE_NAME 1043 255 3 255 false false false
+128 14 PKCOLUMN_NAME 1043 255 4 255 false false false
+129 14 FKTABLE_CAT 1043 255 5 255 false false false
+130 14 FKTABLE_SCHEM 1043 255 6 255 false false false
+131 14 FKTABLE_NAME 1043 255 7 255 false false false
+132 14 FKCOLUMN_NAME 1043 255 8 255 false false false
+133 14 KEY_SEQ 21 5 9 5 false false false
+134 14 UPDATE_RULE <null> 10 10 10 false false false
+135 14 DELETE_RULE <null> 10 11 10 false false false
+136 14 FK_NAME 1043 255 12 255 false false false
+137 14 PK_NAME 1043 255 13 255 false false false
+138 14 DEFERRABILITY <null> 10 14 10 false false false
+139 15 VDBName 1043 255 1 255 false false false
+140 15 Name 1043 255 2 255 false false false
+141 15 IsPhysical 16 1 3 1 false false false
+142 15 UID 1043 50 4 50 false false false
+143 15 Description 1043 255 5 255 false false false
+144 15 PrimaryMetamodelURI 1043 255 6 255 false false false
+145 15 OID <null> 10 7 10 false false false
+146 16 VDBName 1043 255 1 255 false false false
+147 16 SchemaName 1043 255 2 255 false false false
+148 16 Name 1043 255 3 255 false false false
+149 16 Type 1043 20 4 20 false false false
+150 16 NameInSource 1043 255 5 255 false false false
+151 16 IsPhysical 16 1 6 1 false false false
+152 16 SupportsUpdates 16 1 7 1 false false false
+153 16 UID 1043 50 8 50 false false false
+154 16 Cardinality <null> 10 9 10 false false false
+155 16 Description 1043 255 10 255 false false false
+156 16 IsSystem 16 1 11 1 false false false
+157 16 IsMaterialized 16 0 12 0 false false false
+158 16 OID <null> 10 13 10 false false false
+159 17 Name 1043 255 1 255 false false false
+160 17 Version 1043 50 2 50 false false false
161 18 oid <null> 0 1 0 false false false
-162 18 relname 1043 0 2 0 false false false
-163 18 relnamespace <null> 0 3 0 false false false
-164 18 relkind 1042 0 4 0 false false false
-165 18 relam <null> 0 5 0 false false false
-166 18 reltuples 700 0 6 0 false false false
-167 18 relpages <null> 0 7 0 false false false
-168 18 relhasrules 16 0 8 0 false false false
-169 18 relhasoids 1043 0 9 0 false false false
-170 19 oid <null> 0 1 0 false false false
-171 19 attrelid <null> 0 2 0 false false false
-172 19 attname 1043 0 3 0 false false false
-173 19 atttypid <null> 0 4 0 false false false
-174 19 attlen 21 0 5 0 false false false
-175 19 attnum 21 0 6 0 false false false
-176 19 atttypmod <null> 0 7 0 false false false
-177 19 attnotnull 16 0 8 0 false false false
-178 19 attisdropped 16 0 9 0 false false false
-179 19 atthasdef 16 0 10 0 false false false
-180 20 oid <null> 0 1 0 false false false
-181 20 typname 1043 0 2 0 false false false
-182 20 typnamespace <null> 0 3 0 false false false
-183 20 typlen 21 0 4 0 false false false
-184 20 typtype 1042 0 5 0 false false false
-185 20 typbasetype <null> 0 6 0 false false false
-186 20 typtypmod <null> 0 7 0 false false false
-187 20 typrelid <null> 0 8 0 false false false
-188 21 oid <null> 0 1 0 false false false
-189 21 indexrelid <null> 0 2 0 false false false
-190 21 indrelid <null> 0 3 0 false false false
-191 21 indisclustered 16 0 4 0 false false false
-192 21 indisunique 16 0 5 0 false false false
-193 21 indisprimary 16 0 6 0 false false false
-194 21 indexprs 1043 0 7 0 false false false
-195 21 indkey 1043 0 8 0 false false false
-196 22 oid <null> 0 1 0 false false false
-197 22 amname 1043 0 2 0 false false false
+162 18 nspname 1043 0 2 0 false false false
+163 19 oid <null> 0 1 0 false false false
+164 19 relname 1043 0 2 0 false false false
+165 19 relnamespace <null> 0 3 0 false false false
+166 19 relkind 1042 0 4 0 false false false
+167 19 relam <null> 0 5 0 false false false
+168 19 reltuples 700 0 6 0 false false false
+169 19 relpages <null> 0 7 0 false false false
+170 19 relhasrules 16 0 8 0 false false false
+171 19 relhasoids 1043 0 9 0 false false false
+172 20 oid <null> 0 1 0 false false false
+173 20 attrelid <null> 0 2 0 false false false
+174 20 attname 1043 0 3 0 false false false
+175 20 atttypid <null> 0 4 0 false false false
+176 20 attlen 21 0 5 0 false false false
+177 20 attnum 21 0 6 0 false false false
+178 20 atttypmod <null> 0 7 0 false false false
+179 20 attnotnull 16 0 8 0 false false false
+180 20 attisdropped 16 0 9 0 false false false
+181 20 atthasdef 16 0 10 0 false false false
+182 21 oid <null> 0 1 0 false false false
+183 21 typname 1043 0 2 0 false false false
+184 21 typnamespace <null> 0 3 0 false false false
+185 21 typlen 21 0 4 0 false false false
+186 21 typtype 1042 0 5 0 false false false
+187 21 typbasetype <null> 0 6 0 false false false
+188 21 typtypmod <null> 0 7 0 false false false
+189 21 typrelid <null> 0 8 0 false false false
+190 22 oid <null> 0 1 0 false false false
+191 22 indexrelid <null> 0 2 0 false false false
+192 22 indrelid <null> 0 3 0 false false false
+193 22 indisclustered 16 0 4 0 false false false
+194 22 indisunique 16 0 5 0 false false false
+195 22 indisprimary 16 0 6 0 false false false
+196 22 indexprs 1043 0 7 0 false false false
+197 22 indkey 1043 0 8 0 false false false
198 23 oid <null> 0 1 0 false false false
-199 23 proname 1043 0 2 0 false false false
-200 23 proretset 16 0 3 0 false false false
-201 23 prorettype <null> 0 4 0 false false false
-202 23 pronargs 21 0 5 0 false false false
-203 23 proargtypes <null> 0 6 0 false false false
-204 23 proargnames <null> 0 7 0 false false false
-205 23 proargmodes <null> 0 8 0 false false false
-206 23 proallargtypes <null> 0 9 0 false false false
-207 23 pronamespace <null> 0 10 0 false false false
-208 24 oid <null> 0 1 0 false false false
-209 24 tgconstrrelid <null> 0 2 0 false false false
-210 24 tgfoid <null> 0 3 0 false false false
-211 24 tgargs <null> 0 4 0 false false false
-212 24 tgnargs <null> 0 5 0 false false false
-213 24 tgdeferrable 16 0 6 0 false false false
-214 24 tginitdeferred 16 0 7 0 false false false
-215 24 tgconstrname 1043 0 8 0 false false false
-216 24 tgrelid <null> 0 9 0 false false false
-217 25 oid <null> 0 1 0 false false false
-218 25 adsrc <null> 0 2 0 false false false
-219 25 adrelid <null> 0 3 0 false false false
-220 25 adnum <null> 0 4 0 false false false
-221 26 oid <null> 0 1 0 false false false
-222 26 datname 1043 0 2 0 false false false
-223 26 encoding <null> 0 3 0 false false false
-224 26 datlastsysoid <null> 0 4 0 false false false
-225 26 datallowconn 1042 0 5 0 false false false
-226 26 datconfig <null> 0 6 0 false false false
-227 26 datacl <null> 0 7 0 false false false
-228 26 datdba <null> 0 8 0 false false false
-229 26 dattablespace <null> 0 9 0 false false false
-230 27 oid <null> 0 1 0 false false false
-231 27 usename 1043 0 2 0 false false false
-232 27 usecreatedb 16 0 3 0 false false false
-233 27 usesuper 16 0 4 0 false false false
-Row Count : 234
+199 23 amname 1043 0 2 0 false false false
+200 24 oid <null> 0 1 0 false false false
+201 24 proname 1043 0 2 0 false false false
+202 24 proretset 16 0 3 0 false false false
+203 24 prorettype <null> 0 4 0 false false false
+204 24 pronargs 21 0 5 0 false false false
+205 24 proargtypes <null> 0 6 0 false false false
+206 24 proargnames <null> 0 7 0 false false false
+207 24 proargmodes <null> 0 8 0 false false false
+208 24 proallargtypes <null> 0 9 0 false false false
+209 24 pronamespace <null> 0 10 0 false false false
+210 25 oid <null> 0 1 0 false false false
+211 25 tgconstrrelid <null> 0 2 0 false false false
+212 25 tgfoid <null> 0 3 0 false false false
+213 25 tgargs <null> 0 4 0 false false false
+214 25 tgnargs <null> 0 5 0 false false false
+215 25 tgdeferrable 16 0 6 0 false false false
+216 25 tginitdeferred 16 0 7 0 false false false
+217 25 tgconstrname 1043 0 8 0 false false false
+218 25 tgrelid <null> 0 9 0 false false false
+219 26 oid <null> 0 1 0 false false false
+220 26 adsrc <null> 0 2 0 false false false
+221 26 adrelid <null> 0 3 0 false false false
+222 26 adnum <null> 0 4 0 false false false
+223 27 oid <null> 0 1 0 false false false
+224 27 datname 1043 0 2 0 false false false
+225 27 encoding <null> 0 3 0 false false false
+226 27 datlastsysoid <null> 0 4 0 false false false
+227 27 datallowconn 1042 0 5 0 false false false
+228 27 datconfig <null> 0 6 0 false false false
+229 27 datacl <null> 0 7 0 false false false
+230 27 datdba <null> 0 8 0 false false false
+231 27 dattablespace <null> 0 9 0 false false false
+232 28 oid <null> 0 1 0 false false false
+233 28 usename 1043 0 2 0 false false false
+234 28 usecreatedb 16 0 3 0 false false false
+235 28 usesuper 16 0 4 0 false false false
+Row Count : 236
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
oid 4 PartsSupplier java.lang.Integer oid integer pg_catalog pg_attribute 11 10 0 false false false false 2 true true false false
attrelid 4 PartsSupplier java.lang.Integer attrelid integer pg_catalog pg_attribute 11 10 0 false false false false 2 true true false false
Modified: trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_CLASS.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_CLASS.expected 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_CLASS.expected 2010-09-24 18:51:07 UTC (rev 2603)
@@ -5,30 +5,31 @@
2 PARTSSUPPLIER.STATUS 0 r 0 0.0 0 false false
3 PARTSSUPPLIER.SUPPLIER_PARTS 0 r 0 0.0 0 false false
4 PARTSSUPPLIER.SUPPLIER 0 r 0 0.0 0 false false
-5 Columns 1 r 0 0.0 0 false false
-6 DataTypes 1 r 0 0.0 0 false false
-7 KeyColumns 1 r 0 0.0 0 false false
-8 Keys 1 r 0 0.0 0 false false
-9 MatViews 1 r 0 0.0 0 false false
-10 ProcedureParams 1 r 0 0.0 0 false false
-11 Procedures 1 r 0 0.0 0 false false
-12 Properties 1 r 0 0.0 0 false false
-13 ReferenceKeyColumns 1 r 0 0.0 0 false false
-14 Schemas 1 r 0 0.0 0 false false
-15 Tables 1 r 0 0.0 0 false false
-16 VirtualDatabases 1 r 0 0.0 0 false false
-17 pg_namespace 2 v 0 0.0 0 false false
-18 pg_class 2 v 0 0.0 0 false false
-19 pg_attribute 2 v 0 0.0 0 false false
-20 pg_type 2 v 0 0.0 0 false false
-21 pg_index 2 v 0 0.0 0 false false
-22 pg_am 2 v 0 0.0 0 false false
-23 pg_proc 2 v 0 0.0 0 false false
-24 pg_trigger 2 v 0 0.0 0 false false
-25 pg_attrdef 2 v 0 0.0 0 false false
-26 pg_database 2 v 0 0.0 0 false false
-27 pg_user 2 v 0 0.0 0 false false
-Row Count : 28
+5 MatViews 1 r 0 0.0 0 false false
+6 VDBResources 1 r 0 0.0 0 false false
+7 Columns 2 r 0 0.0 0 false false
+8 DataTypes 2 r 0 0.0 0 false false
+9 KeyColumns 2 r 0 0.0 0 false false
+10 Keys 2 r 0 0.0 0 false false
+11 ProcedureParams 2 r 0 0.0 0 false false
+12 Procedures 2 r 0 0.0 0 false false
+13 Properties 2 r 0 0.0 0 false false
+14 ReferenceKeyColumns 2 r 0 0.0 0 false false
+15 Schemas 2 r 0 0.0 0 false false
+16 Tables 2 r 0 0.0 0 false false
+17 VirtualDatabases 2 r 0 0.0 0 false false
+18 pg_namespace 3 v 0 0.0 0 false false
+19 pg_class 3 v 0 0.0 0 false false
+20 pg_attribute 3 v 0 0.0 0 false false
+21 pg_type 3 v 0 0.0 0 false false
+22 pg_index 3 v 0 0.0 0 false false
+23 pg_am 3 v 0 0.0 0 false false
+24 pg_proc 3 v 0 0.0 0 false false
+25 pg_trigger 3 v 0 0.0 0 false false
+26 pg_attrdef 3 v 0 0.0 0 false false
+27 pg_database 3 v 0 0.0 0 false false
+28 pg_user 3 v 0 0.0 0 false false
+Row Count : 29
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
oid 4 PartsSupplier java.lang.Integer oid integer pg_catalog pg_class 11 10 0 false false false false 2 true true false false
relname 12 PartsSupplier java.lang.String relname string pg_catalog pg_class 4000 4000 0 false false false false 2 true true false false
Modified: trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_INDEX.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_INDEX.expected 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_INDEX.expected 2010-09-24 18:51:07 UTC (rev 2603)
@@ -9,10 +9,10 @@
6 6 3 false false false 0
7 7 4 false false true 0
8 8 4 false false false 0
-9 9 18 false false true 0
-10 10 19 false false true 0
-11 11 21 false false true 0
-12 12 23 false false true 0
+9 9 19 false false true 0
+10 10 20 false false true 0
+11 11 22 false false true 0
+12 12 24 false false true 0
Row Count : 13
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
oid 4 PartsSupplier java.lang.Integer oid integer pg_catalog pg_index 11 10 0 false false false false 2 true true false false
Modified: trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_NAMESPACE.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_NAMESPACE.expected 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_NAMESPACE.expected 2010-09-24 18:51:07 UTC (rev 2603)
@@ -1,9 +1,10 @@
integer string
oid nspname
0 PartsSupplier
-1 SYS
-2 pg_catalog
-Row Count : 3
+1 SYSADMIN
+2 SYS
+3 pg_catalog
+Row Count : 4
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
oid 4 PartsSupplier java.lang.Integer oid integer pg_catalog pg_namespace 11 10 0 false false false false 2 true true false false
nspname 12 PartsSupplier java.lang.String nspname string pg_catalog pg_namespace 4000 4000 0 false false false false 2 true true false false
Modified: trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_PROC.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_PROC.expected 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_PROC.expected 2010-09-24 18:51:07 UTC (rev 2603)
@@ -1,12 +1,9 @@
integer string boolean integer short object object object object integer
oid proname proretset prorettype pronargs proargtypes proargnames proargmodes proallargtypes pronamespace
-0 getBinaryVDBResource false 3 2 <null> <null> <null> <null> 1
-1 getCharacterVDBResource false 5 2 <null> <null> <null> <null> 1
-2 getVDBResourcePaths false 45 2 <null> <null> <null> <null> 1
-3 getXMLSchemas false <null> 2 <null> <null> <null> <null> 1
-4 refreshMatViewRow false <null> 3 <null> <null> <null> <null> 1
-5 refreshMatView false <null> 3 <null> <null> <null> <null> 1
-Row Count : 6
+0 refreshMatViewRow false <null> 3 <null> <null> <null> <null> 1
+1 refreshMatView false <null> 3 <null> <null> <null> <null> 1
+2 getXMLSchemas false <null> 2 <null> <null> <null> <null> 2
+Row Count : 3
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
oid 4 PartsSupplier java.lang.Integer oid integer pg_catalog pg_proc 11 10 0 false false false false 2 true true false false
proname 12 PartsSupplier java.lang.String proname string pg_catalog pg_proc 4000 4000 0 false false false false 2 true true false false
Modified: trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_TYPE.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_TYPE.expected 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/test-integration/common/src/test/resources/TestODBCSchema/test_PG_TYPE.expected 2010-09-24 18:51:07 UTC (rev 2603)
@@ -1,21 +1,21 @@
integer string integer short char integer integer integer
oid typname typnamespace typlen typtype typbasetype typtypmod typrelid
-16 boolean 1 1 b 0 -1 0
-20 long 1 8 b 0 -1 0
-21 short 1 2 b 0 -1 0
-23 int 1 4 b 0 -1 0
-25 text 1 -1 b 0 -1 0
-26 oid 1 4 b 0 -1 0
-142 xml 1 -1 b 0 -1 0
-700 float 1 4 b 0 -1 0
-701 double 1 8 b 0 -1 0
-1042 char 1 1 b 0 -1 0
-1043 string 1 -1 b 0 -1 0
-1082 date 1 4 b 0 -1 0
-1083 datetime 1 8 b 0 -1 0
-1114 timestamp 1 8 b 0 -1 0
-1700 decimal 1 -1 b 0 -1 0
-14939 lo 1 -1 b 0 -1 0
+16 boolean 2 1 b 0 -1 0
+20 long 2 8 b 0 -1 0
+21 short 2 2 b 0 -1 0
+23 int 2 4 b 0 -1 0
+25 text 2 -1 b 0 -1 0
+26 oid 2 4 b 0 -1 0
+142 xml 2 -1 b 0 -1 0
+700 float 2 4 b 0 -1 0
+701 double 2 8 b 0 -1 0
+1042 char 2 1 b 0 -1 0
+1043 string 2 -1 b 0 -1 0
+1082 date 2 4 b 0 -1 0
+1083 datetime 2 8 b 0 -1 0
+1114 timestamp 2 8 b 0 -1 0
+1700 decimal 2 -1 b 0 -1 0
+14939 lo 2 -1 b 0 -1 0
Row Count : 16
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
oid 4 PartsSupplier java.lang.Integer oid integer pg_catalog pg_type 11 10 0 false false false false 2 true true false false
Modified: trunk/test-integration/common/src/test/resources/TestPartsDatabaseMetadata/testColumns.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestPartsDatabaseMetadata/testColumns.expected 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/test-integration/common/src/test/resources/TestPartsDatabaseMetadata/testColumns.expected 2010-09-24 18:51:07 UTC (rev 2603)
@@ -69,15 +69,15 @@
PartsSupplier SYS Keys RefKeyUID 12 string 50 <null> 0 10 1 <null> <null> <null> <null> 50 9 NO <null> <null> <null> !
<null> NO
PartsSupplier SYS Keys UID 12 string 50 <null> 0 10 0 <null> <null> <null> <null> 50 10 YES <null> <null> <null> !
<null> NO
PartsSupplier SYS Keys OID 4 integer 10 <null> 0 10 0 <null> <null> <null> <null> 10 11 YES <null> <null> <null> !
<null> NO
-PartsSupplier SYS MatViews VDBName 12 string 255 <null> 0 10 0 <null> <null> <null> <null> 255 1 YES <null> <null> <null> !
<null> NO
-PartsSupplier SYS MatViews SchemaName 12 string 255 <null> 0 10 0 <null> <null> <null> <null> 255 2 YES <null> <null> <null> !
<null> NO
-PartsSupplier SYS MatViews Name 12 string 255 <null> 0 10 0 <null> <null> <null> <null> 255 3 YES <null> <null> <null> !
<null> NO
-PartsSupplier SYS MatViews TargetSchemaName 12 string 255 <null> 0 10 1 <null> <null> <null> <null> 255 4 NO <null> <null> <null> !
<null> NO
-PartsSupplier SYS MatViews TargetName 12 string 4000 <null> 0 10 1 <null> <null> <null> <null> 4000 5 NO <null> <null> <null> !
<null> NO
-PartsSupplier SYS MatViews Valid -7 boolean 1 <null> 0 10 1 <null> <null> <null> <null> 0 6 NO <null> <null> <null> !
<null> NO
-PartsSupplier SYS MatViews LoadState 12 string 255 <null> 0 10 1 <null> <null> <null> <null> 255 7 NO <null> <null> <null> !
<null> NO
-PartsSupplier SYS MatViews Updated 93 timestamp 29 <null> 0 10 1 <null> <null> <null> <null> 0 8 NO <null> <null> <null> !
<null> NO
-PartsSupplier SYS MatViews Cardinality 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 10 9 NO <null> <null> <null> !
<null> NO
+PartsSupplier SYSADMIN MatViews VDBName 12 string 255 <null> 0 10 0 <null> <null> <null> <null> 255 1 YES <null> <null> <null> !
<null> NO
+PartsSupplier SYSADMIN MatViews SchemaName 12 string 255 <null> 0 10 0 <null> <null> <null> <null> 255 2 YES <null> <null> <null> !
<null> NO
+PartsSupplier SYSADMIN MatViews Name 12 string 255 <null> 0 10 0 <null> <null> <null> <null> 255 3 YES <null> <null> <null> !
<null> NO
+PartsSupplier SYSADMIN MatViews TargetSchemaName 12 string 255 <null> 0 10 1 <null> <null> <null> <null> 255 4 NO <null> <null> <null> !
<null> NO
+PartsSupplier SYSADMIN MatViews TargetName 12 string 4000 <null> 0 10 1 <null> <null> <null> <null> 4000 5 NO <null> <null> <null> !
<null> NO
+PartsSupplier SYSADMIN MatViews Valid -7 boolean 1 <null> 0 10 1 <null> <null> <null> <null> 0 6 NO <null> <null> <null> !
<null> NO
+PartsSupplier SYSADMIN MatViews LoadState 12 string 255 <null> 0 10 1 <null> <null> <null> <null> 255 7 NO <null> <null> <null> !
<null> NO
+PartsSupplier SYSADMIN MatViews Updated 93 timestamp 29 <null> 0 10 1 <null> <null> <null> <null> 0 8 NO <null> <null> <null> !
<null> NO
+PartsSupplier SYSADMIN MatViews Cardinality 4 integer 10 <null> 0 10 1 <null> <null> <null> <null> 10 9 NO <null> <null> <null> !
<null> NO
PartsSupplier PartsSupplier PARTSSUPPLIER.PARTS PART_ID 12 string 4 <null> 0 10 0 <null> <null> <null> <null> 4 1 YES <null> <null> <null> !
<null> NO
PartsSupplier PartsSupplier PARTSSUPPLIER.PARTS PART_NAME 12 string 255 <null> 0 10 1 <null> <null> <null> <null> 255 2 NO <null> <null> <null> !
<null> NO
PartsSupplier PartsSupplier PARTSSUPPLIER.PARTS PART_COLOR 12 string 30 <null> 0 10 1 <null> <null> <null> <null> 30 3 NO <null> <null> <null> !
<null> NO
@@ -157,6 +157,8 @@
PartsSupplier SYS Tables IsSystem -7 boolean 1 <null> 0 10 1 <null> <null> <null> <null> 1 11 NO <null> <null> <null> !
<null> NO
PartsSupplier SYS Tables IsMaterialized -7 boolean 1 <null> 0 10 0 <null> <null> <null> <null> 0 12 YES <null> <null> <null> !
<null> NO
PartsSupplier SYS Tables OID 4 integer 10 <null> 0 10 0 <null> <null> <null> <null> 10 13 YES <null> <null> <null> !
<null> NO
+PartsSupplier SYSADMIN VDBResources resourcePath 12 string 255 <null> 0 10 1 <null> <null> <null> <null> 255 1 NO <null> <null> <null> !
<null> NO
+PartsSupplier SYSADMIN VDBResources contents 2004 blob 2147483647 <null> 0 10 1 <null> <null> <null> <null> 0 2 NO <null> <null> <null> !
<null> NO
PartsSupplier SYS VirtualDatabases Name 12 string 255 <null> 0 10 0 <null> <null> <null> <null> 255 1 YES <null> <null> <null> !
<null> NO
PartsSupplier SYS VirtualDatabases Version 12 string 50 <null> 0 10 0 <null> <null> <null> <null> 50 2 YES <null> <null> <null> !
<null> NO
PartsSupplier pg_catalog pg_am oid 4 integer 10 <null> 0 0 2 <null> <null> <null> <null> 0 1 <null> <null> <null> !
<null> NO
@@ -234,7 +236,7 @@
PartsSupplier pg_catalog pg_user usename 12 string 4000 <null> 0 0 2 <null> <null> <null> <null> 0 2 <null> <null> <null> !
<null> NO
PartsSupplier pg_catalog pg_user usecreatedb -7 boolean 1 <null> 0 0 2 <null> <null> <null> <null> 0 3 <null> <null> <null> !
<null> NO
PartsSupplier pg_catalog pg_user usesuper -7 boolean 1 <null> 0 0 2 <null> <null> <null> <null> 0 4 <null> <null> <null> !
<null> NO
-Row Count : 234
+Row Count : 236
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
TABLE_CAT 12 PartsSupplier java.lang.String TABLE_CAT string SYS Columns 255 255 0 false false false false 0 true true false false
TABLE_SCHEM 12 PartsSupplier java.lang.String TABLE_SCHEM string SYS Columns 255 255 0 false true false true 1 false true true true
Modified: trunk/test-integration/common/src/test/resources/TestPartsDatabaseMetadata/testProcedureColumns.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestPartsDatabaseMetadata/testProcedureColumns.expected 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/test-integration/common/src/test/resources/TestPartsDatabaseMetadata/testProcedureColumns.expected 2010-09-24 18:51:07 UTC (rev 2603)
@@ -1,20 +1,14 @@
string string string string short integer string integer integer short integer integer string string string string string integer string string
PROCEDURE_CAT PROCEDURE_SCHEM PROCEDURE_NAME COLUMN_NAME COLUMN_TYPE DATA_TYPE TYPE_NAME PRECISION LENGTH SCALE RADIX NULLABLE REMARKS COLUMN_DEF SQL_DATA_TYPE SQL_DATETIME_SUB CHAR_OCTET_LENGTH ORDINAL_POSITION IS_NULLABLE SPECIFIC_NAME
-PartsSupplier SYS getBinaryVDBResource resourcePath 1 12 string 50 50 0 10 0 <null> <null> <null> <null> <null> 1 NO getBinaryVDBResource
-PartsSupplier SYS getBinaryVDBResource VdbResource 3 2004 blob 2147483647 2147483647 0 10 1 <null> <null> <null> <null> <null> 1 YES getBinaryVDBResource
-PartsSupplier SYS getCharacterVDBResource resourcePath 1 12 string 50 50 0 10 0 <null> <null> <null> <null> <null> 1 NO getCharacterVDBResource
-PartsSupplier SYS getCharacterVDBResource VdbResource 3 2005 clob 2147483647 2147483647 0 10 1 <null> <null> <null> <null> <null> 1 YES getCharacterVDBResource
-PartsSupplier SYS getVDBResourcePaths ResourcePath 3 12 string 50 50 0 10 1 <null> <null> <null> <null> <null> 1 YES getVDBResourcePaths
-PartsSupplier SYS getVDBResourcePaths isBinary 3 -7 boolean 1 1 0 10 1 <null> <null> <null> <null> <null> 2 YES getVDBResourcePaths
PartsSupplier SYS getXMLSchemas document 1 12 string 4000 4000 0 10 0 <null> <null> <null> <null> <null> 1 NO getXMLSchemas
PartsSupplier SYS getXMLSchemas schema 3 2009 xml 2147483647 2147483647 0 10 1 <null> <null> <null> <null> <null> 1 YES getXMLSchemas
-PartsSupplier SYS refreshMatView ViewName 1 12 string 4000 4000 0 10 0 <null> <null> <null> <null> <null> 1 NO refreshMatView
-PartsSupplier SYS refreshMatView Invalidate 1 -7 boolean 1 1 0 10 0 <null> <null> <null> <null> <null> 2 NO refreshMatView
-PartsSupplier SYS refreshMatView RowsUpdated 5 4 integer 10 10 0 10 0 <null> <null> <null> <null> <null> 3 NO refreshMatView
-PartsSupplier SYS refreshMatViewRow ViewName 1 12 string 4000 4000 0 10 0 <null> <null> <null> <null> <null> 1 NO refreshMatViewRow
-PartsSupplier SYS refreshMatViewRow Key 1 2000 object 2147483647 2147483647 0 10 0 <null> <null> <null> <null> <null> 2 NO refreshMatViewRow
-PartsSupplier SYS refreshMatViewRow RowsUpdated 5 4 integer 10 10 0 10 0 <null> <null> <null> <null> <null> 3 NO refreshMatViewRow
-Row Count : 14
+PartsSupplier SYSADMIN refreshMatView ViewName 1 12 string 4000 4000 0 10 0 <null> <null> <null> <null> <null> 1 NO refreshMatView
+PartsSupplier SYSADMIN refreshMatView Invalidate 1 -7 boolean 1 1 0 10 0 <null> <null> <null> <null> <null> 2 NO refreshMatView
+PartsSupplier SYSADMIN refreshMatView RowsUpdated 5 4 integer 10 10 0 10 0 <null> <null> <null> <null> <null> 3 NO refreshMatView
+PartsSupplier SYSADMIN refreshMatViewRow ViewName 1 12 string 4000 4000 0 10 0 <null> <null> <null> <null> <null> 1 NO refreshMatViewRow
+PartsSupplier SYSADMIN refreshMatViewRow Key 1 2000 object 2147483647 2147483647 0 10 0 <null> <null> <null> <null> <null> 2 NO refreshMatViewRow
+PartsSupplier SYSADMIN refreshMatViewRow RowsUpdated 5 4 integer 10 10 0 10 0 <null> <null> <null> <null> <null> 3 NO refreshMatViewRow
+Row Count : 8
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
PROCEDURE_CAT 12 PartsSupplier java.lang.String PROCEDURE_CAT string SYS ProcedureParams 255 255 0 false false false false 0 true true false false
PROCEDURE_SCHEM 12 PartsSupplier java.lang.String PROCEDURE_SCHEM string SYS ProcedureParams 255 255 0 false true false true 1 false true true true
Modified: trunk/test-integration/common/src/test/resources/TestPartsDatabaseMetadata/testProcedures.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestPartsDatabaseMetadata/testProcedures.expected 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/test-integration/common/src/test/resources/TestPartsDatabaseMetadata/testProcedures.expected 2010-09-24 18:51:07 UTC (rev 2603)
@@ -1,12 +1,9 @@
string string string string string string string short string
PROCEDURE_CAT PROCEDURE_SCHEM PROCEDURE_NAME RESERVED_1 RESERVED_2 RESERVED_3 REMARKS PROCEDURE_TYPE SPECIFIC_NAME
-PartsSupplier SYS getBinaryVDBResource <null> <null> <null> <null> 2 getBinaryVDBResource
-PartsSupplier SYS getCharacterVDBResource <null> <null> <null> <null> 2 getCharacterVDBResource
-PartsSupplier SYS getVDBResourcePaths <null> <null> <null> <null> 2 getVDBResourcePaths
PartsSupplier SYS getXMLSchemas <null> <null> <null> <null> 2 getXMLSchemas
-PartsSupplier SYS refreshMatView <null> <null> <null> <null> 1 refreshMatView
-PartsSupplier SYS refreshMatViewRow <null> <null> <null> <null> 1 refreshMatViewRow
-Row Count : 6
+PartsSupplier SYSADMIN refreshMatView <null> <null> <null> <null> 1 refreshMatView
+PartsSupplier SYSADMIN refreshMatViewRow <null> <null> <null> <null> 1 refreshMatViewRow
+Row Count : 3
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
PROCEDURE_CAT 12 PartsSupplier java.lang.String PROCEDURE_CAT string SYS Procedures 255 255 0 false false false false 0 true true false false
PROCEDURE_SCHEM 12 PartsSupplier java.lang.String PROCEDURE_SCHEM string SYS Procedures 255 255 0 false true false true 1 false true true true
Modified: trunk/test-integration/common/src/test/resources/TestPartsDatabaseMetadata/testSchemas.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestPartsDatabaseMetadata/testSchemas.expected 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/test-integration/common/src/test/resources/TestPartsDatabaseMetadata/testSchemas.expected 2010-09-24 18:51:07 UTC (rev 2603)
@@ -2,8 +2,9 @@
TABLE_SCHEM TABLE_CATALOG
PartsSupplier PartsSupplier
SYS PartsSupplier
+SYSADMIN PartsSupplier
pg_catalog PartsSupplier
-Row Count : 3
+Row Count : 4
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
TABLE_SCHEM 12 PartsSupplier java.lang.String TABLE_SCHEM string SYS Schemas 255 255 0 false true false true 1 false true true true
TABLE_CATALOG 12 PartsSupplier java.lang.String TABLE_CATALOG string SYS Schemas 255 255 0 false true false true 1 false true true true
Modified: trunk/test-integration/common/src/test/resources/TestPartsDatabaseMetadata/testTables.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestPartsDatabaseMetadata/testTables.expected 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/test-integration/common/src/test/resources/TestPartsDatabaseMetadata/testTables.expected 2010-09-24 18:51:07 UTC (rev 2603)
@@ -4,7 +4,6 @@
PartsSupplier SYS DataTypes SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
PartsSupplier SYS KeyColumns SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
PartsSupplier SYS Keys SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
-PartsSupplier SYS MatViews SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
PartsSupplier SYS ProcedureParams SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
PartsSupplier SYS Procedures SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
PartsSupplier SYS Properties SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
@@ -12,6 +11,7 @@
PartsSupplier SYS Schemas SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
PartsSupplier SYS Tables SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
PartsSupplier SYS VirtualDatabases SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
+PartsSupplier SYSADMIN MatViews SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
PartsSupplier pg_catalog pg_am SYSTEM TABLE <null> <null> <null> <null> <null> <null> false
PartsSupplier pg_catalog pg_attrdef SYSTEM TABLE <null> <null> <null> <null> <null> <null> false
PartsSupplier pg_catalog pg_attribute SYSTEM TABLE <null> <null> <null> <null> <null> <null> false
@@ -28,7 +28,8 @@
PartsSupplier PartsSupplier PARTSSUPPLIER.STATUS TABLE <null> <null> <null> <null> <null> <null> true
PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER TABLE <null> <null> <null> <null> <null> <null> true
PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER_PARTS TABLE <null> <null> <null> <null> <null> <null> true
-Row Count : 28
+PartsSupplier SYSADMIN VDBResources TABLE <null> <null> <null> <null> <null> <null> true
+Row Count : 29
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
TABLE_CAT 12 PartsSupplier java.lang.String TABLE_CAT string SYS Tables 255 255 0 false true false true 1 false true true true
TABLE_SCHEM 12 PartsSupplier java.lang.String TABLE_SCHEM string SYS Tables 255 255 0 false true false true 1 false true true true
Modified: trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testColumns.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testColumns.expected 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testColumns.expected 2010-09-24 18:51:07 UTC (rev 2603)
@@ -1,105 +1,105 @@
string string string string integer string string integer integer boolean boolean boolean boolean boolean boolean boolean string string string string string string string integer integer integer string !
string integer
VDBName SchemaName TableName Name Position NameInSource DataType Scale Length IsLengthFixed SupportsSelect SupportsUpdates IsCaseSensitive IsSigned IsCurrency IsAutoIncremented NullType MinRange MaxRange SearchType Format DefaultValue JavaClass Precision CharOctetLength Radix UID !
Description OID
-PartsSupplier SYS DataTypes BaseType 17 <null> string 0 64 true true false true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 64 64 10 mmuuid:03beb57c-968b-4821-a6ae-cb1154cfadee !
<null> 62
-PartsSupplier SYS MatViews Cardinality 9 <null> integer 0 10 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.Integer 10 10 10 mmuuid:c20875ac-5df8-4a3f-89af-c766af8f81b6 !
<null> 94
-PartsSupplier SYS Tables Cardinality 9 <null> integer 0 10 false true false true true false false No Nulls <null> <null> All Except Like <null> <null> java.lang.Integer 10 10 10 mmuuid:24cdad3a-e8f7-4376-bb32-79f8bc8eeed2 !
<null> 152
-PartsSupplier SYS Columns CharOctetLength 25 <null> integer 0 10 true true false false false false false Nullable <null> <null> Searchable <null> <null> java.lang.Integer 10 10 10 mmuuid:de5def94-2804-4c91-91ed-26d630ce8afe !
<null> 41
-PartsSupplier SYS ReferenceKeyColumns DEFERRABILITY 14 <null> integer 0 10 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.Integer 10 10 10 mmuuid:88380f55-2cbd-4325-b9a3-9dcaa88a690e !
<null> 136
-PartsSupplier SYS ReferenceKeyColumns DELETE_RULE 11 <null> integer 0 10 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.Integer 10 10 10 mmuuid:9207f4df-a5ce-43bd-b3b2-fee57e459849 !
<null> 133
-PartsSupplier SYS Columns DataType 7 <null> string 0 100 true true false true true false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 100 100 10 mmuuid:9a8dc0d5-e65c-4032-a066-187f8d2e73ea !
<null> 23
-PartsSupplier SYS ProcedureParams DataType 5 <null> string 0 25 true true false true true false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 25 25 10 mmuuid:207a09af-65b8-405f-b1cb-537bc8632fa4 !
<null> 99
-PartsSupplier SYS Columns DefaultValue 22 <null> string 0 255 true true false false false false false Nullable <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:7e853988-356b-4c7c-83d4-a9f015bff279 !
<null> 38
-PartsSupplier SYS Columns Description 28 <null> string 0 255 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:74d73b53-b723-419e-9fea-de56408409ee !
<null> 44
-PartsSupplier SYS DataTypes Description 18 <null> string 0 255 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:b7d95ef6-63a3-441c-8de5-c98e2e577ea3 !
<null> 63
-PartsSupplier SYS Keys Description 5 <null> string 0 255 true true false false false false false Nullable <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:175e21b2-24c3-4677-a253-6d7cdb513a9a !
<null> 79
-PartsSupplier SYS ProcedureParams Description 15 <null> string 0 255 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 0 255 10 mmuuid:05ac4703-5c2c-4410-93b7-19b39d90c803 !
<null> 109
-PartsSupplier SYS Procedures Description 7 <null> string 0 255 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 225 255 10 mmuuid:fa0b5db7-acb1-4975-8410-d5d27df46040 !
<null> 117
-PartsSupplier SYS Schemas Description 5 <null> string 0 255 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:1cb99300-a527-4a26-b4e6-08ebd92a781d !
<null> 141
-PartsSupplier SYS Tables Description 10 <null> string 0 255 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:51605e41-5cb0-40ca-8c4a-4eca52780afc !
<null> 153
-PartsSupplier SYS ReferenceKeyColumns FKCOLUMN_NAME 8 <null> string 0 255 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:f4b2b32c-e411-45e6-a236-fec4718f0874 !
<null> 130
-PartsSupplier SYS ReferenceKeyColumns FKTABLE_CAT 5 <null> string 0 255 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 1 255 10 mmuuid:a0095da3-1258-44dc-bab9-33eacf886a28 !
<null> 127
-PartsSupplier SYS ReferenceKeyColumns FKTABLE_NAME 7 <null> string 0 255 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:53284aaa-4c07-4930-8a0e-5e2aaa2da5cb !
<null> 129
-PartsSupplier SYS ReferenceKeyColumns FKTABLE_SCHEM 6 <null> string 0 255 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:93a35adf-b6b1-4d9c-bdef-d336a84f478e !
<null> 128
-PartsSupplier SYS ReferenceKeyColumns FK_NAME 12 <null> string 0 255 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:a9ca7516-6898-419d-b1ad-7d174d946d07 !
<null> 134
-PartsSupplier SYS Columns Format 21 <null> string 0 255 true true false false false false false Nullable <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:172b133e-5bf1-4020-953c-de4446b1e64a !
<null> 37
-PartsSupplier SYS Columns IsAutoIncremented 16 <null> boolean 0 1 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Boolean 1 1 10 mmuuid:0d41e284-f274-4fd1-8576-7696f4b758d0 !
<null> 32
-PartsSupplier SYS DataTypes IsAutoIncremented 10 <null> boolean 0 1 true true false true true false false No Nulls <null> <null> Searchable <null> ('0') java.lang.Boolean 1 1 10 mmuuid:2a1568e2-776a-474b-981f-040a6ad63361 !
<null> 55
-PartsSupplier SYS Columns IsCaseSensitive 13 <null> boolean 0 1 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Boolean 1 1 10 mmuuid:21ee166a-b462-41a1-b88d-dc79f63d6e17 !
<null> 29
-PartsSupplier SYS DataTypes IsCaseSensitive 11 <null> boolean 0 1 true true false true false false false No Nulls <null> <null> Searchable <null> ('0') java.lang.Boolean 1 1 10 mmuuid:1468aaf2-6481-4d10-9554-44d0363fe571 !
<null> 56
-PartsSupplier SYS Columns IsCurrency 15 <null> boolean 0 1 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Boolean 1 1 10 mmuuid:b28a2963-36e0-4b4a-a8f8-a2c06f2b440a !
<null> 31
-PartsSupplier SYS Keys IsIndexed 8 <null> boolean 0 1 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Boolean 1 1 10 mmuuid:ea96cb7c-2dcf-453c-b83a-1aaa921d8f92 !
<null> 82
-PartsSupplier SYS Columns IsLengthFixed 10 <null> boolean 0 1 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Boolean 1 1 10 mmuuid:571aa4ce-3254-4a2b-aa48-1cb23a0c47ed !
<null> 26
-PartsSupplier SYS Tables IsMaterialized 12 <null> boolean 0 0 false true true false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Boolean 0 0 10 mmuuid:89265cba-ab85-48c2-960a-a5a9594ba6d0 !
<null> 155
-PartsSupplier SYS DataTypes IsPhysical 3 <null> boolean 0 1 true true false true true false false Nullable <null> <null> Searchable <null> <null> java.lang.Boolean 1 1 10 mmuuid:983714a2-bd0b-4fad-b4e8-dfb7832e9c4b !
<null> 48
-PartsSupplier SYS Schemas IsPhysical 3 <null> boolean 0 1 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Boolean 1 1 10 mmuuid:bab257d7-cced-4605-9b40-8ca6c078aca7 !
<null> 139
-PartsSupplier SYS Tables IsPhysical 6 <null> boolean 0 1 true true false true false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Boolean 1 1 10 mmuuid:e27712f6-a0a6-452e-848d-9de77691e939 !
<null> 149
-PartsSupplier SYS Columns IsSigned 14 <null> boolean 0 1 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Boolean 1 1 10 mmuuid:36be2afa-8ebc-4af8-acc5-a887cf2b5a86 !
<null> 30
-PartsSupplier SYS DataTypes IsSigned 9 <null> boolean 0 1 true true false true false false false No Nulls <null> <null> Searchable <null> ('0') java.lang.Boolean 1 1 10 mmuuid:235cea48-b2b9-41d5-b296-8ab9c649b6e7 !
<null> 54
-PartsSupplier SYS DataTypes IsStandard 2 <null> boolean 0 1 true true false true true false false Nullable <null> <null> Searchable <null> <null> java.lang.Boolean 1 1 10 mmuuid:02f27c5d-af55-4677-b91b-8690793671b2 !
<null> 47
-PartsSupplier SYS Tables IsSystem 11 <null> boolean 0 1 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.Boolean 1 1 10 mmuuid:9fa7987c-7dc8-4102-9cc0-5658d5b46382 !
<null> 154
-PartsSupplier SYS Columns JavaClass 23 <null> string 0 500 true true false true false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 500 500 10 mmuuid:6b8d5df5-7bd2-425c-8b2b-e427e026ef66 !
<null> 39
-PartsSupplier SYS DataTypes JavaClass 5 <null> string 0 500 true true false true false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 500 500 10 mmuuid:4c68ef90-8042-44ab-896a-bb3890a8fe04 !
<null> 50
-PartsSupplier SYS ReferenceKeyColumns KEY_SEQ 9 <null> short 0 5 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.Short 5 5 10 mmuuid:4884ac83-84ed-4b67-9f1a-bd79c0199269 !
<null> 131
-PartsSupplier SYS KeyColumns KeyName 5 <null> string 0 255 true true false false false false false Nullable <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:da4bef58-83f4-4b88-8bb0-2dc8990be539 !
<null> 69
-PartsSupplier SYS KeyColumns KeyType 6 <null> string 0 20 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 20 20 10 mmuuid:df9e15e6-ab77-486d-bfe0-0adc378aa99d !
<null> 70
-PartsSupplier SYS Columns Length 9 <null> integer 0 10 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Integer 10 10 10 mmuuid:b36ea0f6-cbff-4049-bc9c-8ec9928be048 !
<null> 25
-PartsSupplier SYS MatViews LoadState 7 <null> string 0 255 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 0 255 10 mmuuid:d730c1a8-a8b1-4912-957d-f310506ec93b !
<null> 92
-PartsSupplier SYS Columns MaxRange 19 <null> string 0 50 true true false false false false false Nullable <null> <null> Searchable <null> <null> java.lang.String 50 50 10 mmuuid:0b0df4a5-7de5-4315-94f7-22c84958302e !
<null> 35
-PartsSupplier SYS Columns MinRange 18 <null> string 0 50 true true false false false false false Nullable <null> <null> Searchable <null> <null> java.lang.String 50 50 10 mmuuid:dba0f97d-fab5-45f6-a1eb-3459ab3fcc74 !
<null> 34
-PartsSupplier SYS Columns Name 4 <null> string 0 255 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:d1f44a6d-3e39-4251-b873-1280c2b035b3 !
<null> 20
-PartsSupplier SYS DataTypes Name 1 <null> string 0 100 true true false true true false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 100 100 10 mmuuid:17f7de33-e6f0-4b9c-b55e-a87f6b7bb9b3 !
<null> 46
-PartsSupplier SYS KeyColumns Name 4 <null> string 0 255 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:08bda0c7-5f66-4fed-8285-d74b63eeb0e2 !
<null> 68
-PartsSupplier SYS Keys Name 4 <null> string 0 255 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:149de302-2107-45ca-839d-fc0dd1e7d7f4 !
<null> 78
-PartsSupplier SYS MatViews Name 3 <null> string 0 255 false true true true true false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 0 255 10 mmuuid:75bd4c7c-71f9-44ee-be3a-16f82af5dec7 !
<null> 88
-PartsSupplier SYS ProcedureParams Name 4 <null> string 0 255 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:2bf20c6f-5a95-436d-8f30-a24d164e77a4 !
<null> 98
-PartsSupplier SYS Procedures Name 3 <null> string 0 255 true true false true false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:bd17e98a-c40a-43b1-93ac-88d62937c051 !
<null> 113
-PartsSupplier SYS Properties Name 1 <null> string 0 255 true true false true true false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:ba007c56-04b6-4981-ab89-3fdd33ff0de8 !
<null> 119
-PartsSupplier SYS Schemas Name 2 <null> string 0 255 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 0 255 10 mmuuid:654112f8-bb4c-4453-9e4d-f3a96fba61ec !
<null> 138
-PartsSupplier SYS Tables Name 3 <null> string 0 255 true true false true false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:ef487cc2-1214-439c-af6e-da431df00d2c !
<null> 146
-PartsSupplier SYS VirtualDatabases Name 1 <null> string 0 255 true true false true false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:42fa1249-8b24-4aae-a252-0a347db6ec30 !
<null> 157
-PartsSupplier SYS Columns NameInSource 6 <null> string 0 255 true true false false false false false Nullable <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:fac72c6e-41dc-4a1b-8af3-f0796690d9cc !
<null> 22
-PartsSupplier SYS Keys NameInSource 6 <null> string 0 255 true true false false false false false Nullable <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:a52a6169-99e0-4b7e-9dc6-3a93ffa6094a !
<null> 80
-PartsSupplier SYS Procedures NameInSource 4 <null> string 0 255 true true false false false false false Nullable <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:a4e7a0fd-c340-49a9-9ac0-8328caaffda8 !
<null> 114
-PartsSupplier SYS Tables NameInSource 5 <null> string 0 255 true true false true false false false Nullable <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:1f036fb0-b841-450c-8462-986cdd57e921 !
<null> 148
-PartsSupplier SYS Columns NullType 17 <null> string 0 20 true true false true false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 20 20 10 mmuuid:4d83bdbb-a7ce-44cc-a201-021a517d3c1a !
<null> 33
-PartsSupplier SYS DataTypes NullType 8 <null> string 0 20 true true false true false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 20 20 10 mmuuid:278b0534-1164-495e-a8c6-de45e0ff53a4 !
<null> 53
-PartsSupplier SYS ProcedureParams NullType 13 <null> string 0 10 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 10 10 10 mmuuid:d887c203-6bf5-462b-b2f0-f5302e2f4bcd !
<null> 107
-PartsSupplier SYS Columns OID 29 <null> integer 0 10 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Integer 10 10 10 mmuuid:b9e5ba07-4a8d-4589-8aa9-597ae70d18a4 !
<null> 45
-PartsSupplier SYS DataTypes OID 19 <null> integer 0 10 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Integer 10 10 10 mmuuid:a3c41050-80b6-4fb5-9c6b-5e20c0839cda !
<null> 64
-PartsSupplier SYS KeyColumns OID 10 <null> integer 0 10 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Integer 10 10 10 mmuuid:207d123c-a3ff-4e4e-85ae-6f3b0debfc06 !
<null> 74
-PartsSupplier SYS Keys OID 11 <null> integer 0 10 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Integer 10 10 10 mmuuid:d781f893-bdf3-4dc1-956f-7e7b1a138c99 !
<null> 85
-PartsSupplier SYS ProcedureParams OID 16 <null> integer 0 10 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Integer 10 10 10 mmuuid:72125f93-846f-413c-82e1-fa3227fb043f !
<null> 110
-PartsSupplier SYS Procedures OID 8 <null> integer 0 10 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Integer 10 10 10 mmuuid:c80c02d2-7174-4cc4-b347-e921a80f568c !
<null> 118
-PartsSupplier SYS Properties OID 4 <null> integer 0 10 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Integer 10 10 10 mmuuid:54c1a7dc-5ca8-4d34-8672-e76d63fe3b95 !
<null> 122
-PartsSupplier SYS Schemas OID 7 <null> integer 0 10 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Integer 10 10 10 mmuuid:31746839-e019-4321-90cb-a557e1d4754e !
<null> 143
-PartsSupplier SYS Tables OID 13 <null> integer 0 10 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Integer 10 10 10 mmuuid:dae79c58-b381-4275-8c1c-b299d732d355 !
<null> 156
-PartsSupplier SYS ProcedureParams Optional 8 <null> boolean 0 1 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Boolean 1 1 10 mmuuid:4033f891-5ef5-4a75-8a50-bd1d021e43ad !
<null> 102
+PartsSupplier SYS DataTypes BaseType 17 <null> string 0 64 true true false true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 64 64 10 mmuuid:03beb57c-968b-4821-a6ae-cb1154cfadee !
<null> 73
+PartsSupplier SYSADMIN MatViews Cardinality 9 <null> integer 0 10 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.Integer 10 10 10 mmuuid:abe699b0-b6bc-4413-9172-0a21ca9664d2 !
<null> 25
+PartsSupplier SYS Tables Cardinality 9 <null> integer 0 10 false true false true true false false No Nulls <null> <null> All Except Like <null> <null> java.lang.Integer 10 10 10 mmuuid:24cdad3a-e8f7-4376-bb32-79f8bc8eeed2 !
<null> 154
+PartsSupplier SYS Columns CharOctetLength 25 <null> integer 0 10 true true false false false false false Nullable <null> <null> Searchable <null> <null> java.lang.Integer 10 10 10 mmuuid:de5def94-2804-4c91-91ed-26d630ce8afe !
<null> 52
+PartsSupplier SYS ReferenceKeyColumns DEFERRABILITY 14 <null> integer 0 10 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.Integer 10 10 10 mmuuid:88380f55-2cbd-4325-b9a3-9dcaa88a690e !
<null> 138
+PartsSupplier SYS ReferenceKeyColumns DELETE_RULE 11 <null> integer 0 10 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.Integer 10 10 10 mmuuid:9207f4df-a5ce-43bd-b3b2-fee57e459849 !
<null> 135
+PartsSupplier SYS Columns DataType 7 <null> string 0 100 true true false true true false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 100 100 10 mmuuid:9a8dc0d5-e65c-4032-a066-187f8d2e73ea !
<null> 34
+PartsSupplier SYS ProcedureParams DataType 5 <null> string 0 25 true true false true true false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 25 25 10 mmuuid:207a09af-65b8-405f-b1cb-537bc8632fa4 !
<null> 101
+PartsSupplier SYS Columns DefaultValue 22 <null> string 0 255 true true false false false false false Nullable <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:7e853988-356b-4c7c-83d4-a9f015bff279 !
<null> 49
+PartsSupplier SYS Columns Description 28 <null> string 0 255 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:74d73b53-b723-419e-9fea-de56408409ee !
<null> 55
+PartsSupplier SYS DataTypes Description 18 <null> string 0 255 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:b7d95ef6-63a3-441c-8de5-c98e2e577ea3 !
<null> 74
+PartsSupplier SYS Keys Description 5 <null> string 0 255 true true false false false false false Nullable <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:175e21b2-24c3-4677-a253-6d7cdb513a9a !
<null> 90
+PartsSupplier SYS ProcedureParams Description 15 <null> string 0 255 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 0 255 10 mmuuid:05ac4703-5c2c-4410-93b7-19b39d90c803 !
<null> 111
+PartsSupplier SYS Procedures Description 7 <null> string 0 255 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 225 255 10 mmuuid:fa0b5db7-acb1-4975-8410-d5d27df46040 !
<null> 119
+PartsSupplier SYS Schemas Description 5 <null> string 0 255 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:1cb99300-a527-4a26-b4e6-08ebd92a781d !
<null> 143
+PartsSupplier SYS Tables Description 10 <null> string 0 255 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:51605e41-5cb0-40ca-8c4a-4eca52780afc !
<null> 155
+PartsSupplier SYS ReferenceKeyColumns FKCOLUMN_NAME 8 <null> string 0 255 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:f4b2b32c-e411-45e6-a236-fec4718f0874 !
<null> 132
+PartsSupplier SYS ReferenceKeyColumns FKTABLE_CAT 5 <null> string 0 255 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 1 255 10 mmuuid:a0095da3-1258-44dc-bab9-33eacf886a28 !
<null> 129
+PartsSupplier SYS ReferenceKeyColumns FKTABLE_NAME 7 <null> string 0 255 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:53284aaa-4c07-4930-8a0e-5e2aaa2da5cb !
<null> 131
+PartsSupplier SYS ReferenceKeyColumns FKTABLE_SCHEM 6 <null> string 0 255 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:93a35adf-b6b1-4d9c-bdef-d336a84f478e !
<null> 130
+PartsSupplier SYS ReferenceKeyColumns FK_NAME 12 <null> string 0 255 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:a9ca7516-6898-419d-b1ad-7d174d946d07 !
<null> 136
+PartsSupplier SYS Columns Format 21 <null> string 0 255 true true false false false false false Nullable <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:172b133e-5bf1-4020-953c-de4446b1e64a !
<null> 48
+PartsSupplier SYS Columns IsAutoIncremented 16 <null> boolean 0 1 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Boolean 1 1 10 mmuuid:0d41e284-f274-4fd1-8576-7696f4b758d0 !
<null> 43
+PartsSupplier SYS DataTypes IsAutoIncremented 10 <null> boolean 0 1 true true false true true false false No Nulls <null> <null> Searchable <null> ('0') java.lang.Boolean 1 1 10 mmuuid:2a1568e2-776a-474b-981f-040a6ad63361 !
<null> 66
+PartsSupplier SYS Columns IsCaseSensitive 13 <null> boolean 0 1 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Boolean 1 1 10 mmuuid:21ee166a-b462-41a1-b88d-dc79f63d6e17 !
<null> 40
+PartsSupplier SYS DataTypes IsCaseSensitive 11 <null> boolean 0 1 true true false true false false false No Nulls <null> <null> Searchable <null> ('0') java.lang.Boolean 1 1 10 mmuuid:1468aaf2-6481-4d10-9554-44d0363fe571 !
<null> 67
+PartsSupplier SYS Columns IsCurrency 15 <null> boolean 0 1 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Boolean 1 1 10 mmuuid:b28a2963-36e0-4b4a-a8f8-a2c06f2b440a !
<null> 42
+PartsSupplier SYS Keys IsIndexed 8 <null> boolean 0 1 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Boolean 1 1 10 mmuuid:ea96cb7c-2dcf-453c-b83a-1aaa921d8f92 !
<null> 93
+PartsSupplier SYS Columns IsLengthFixed 10 <null> boolean 0 1 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Boolean 1 1 10 mmuuid:571aa4ce-3254-4a2b-aa48-1cb23a0c47ed !
<null> 37
+PartsSupplier SYS Tables IsMaterialized 12 <null> boolean 0 0 false true true false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Boolean 0 0 10 mmuuid:89265cba-ab85-48c2-960a-a5a9594ba6d0 !
<null> 157
+PartsSupplier SYS DataTypes IsPhysical 3 <null> boolean 0 1 true true false true true false false Nullable <null> <null> Searchable <null> <null> java.lang.Boolean 1 1 10 mmuuid:983714a2-bd0b-4fad-b4e8-dfb7832e9c4b !
<null> 59
+PartsSupplier SYS Schemas IsPhysical 3 <null> boolean 0 1 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Boolean 1 1 10 mmuuid:bab257d7-cced-4605-9b40-8ca6c078aca7 !
<null> 141
+PartsSupplier SYS Tables IsPhysical 6 <null> boolean 0 1 true true false true false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Boolean 1 1 10 mmuuid:e27712f6-a0a6-452e-848d-9de77691e939 !
<null> 151
+PartsSupplier SYS Columns IsSigned 14 <null> boolean 0 1 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Boolean 1 1 10 mmuuid:36be2afa-8ebc-4af8-acc5-a887cf2b5a86 !
<null> 41
+PartsSupplier SYS DataTypes IsSigned 9 <null> boolean 0 1 true true false true false false false No Nulls <null> <null> Searchable <null> ('0') java.lang.Boolean 1 1 10 mmuuid:235cea48-b2b9-41d5-b296-8ab9c649b6e7 !
<null> 65
+PartsSupplier SYS DataTypes IsStandard 2 <null> boolean 0 1 true true false true true false false Nullable <null> <null> Searchable <null> <null> java.lang.Boolean 1 1 10 mmuuid:02f27c5d-af55-4677-b91b-8690793671b2 !
<null> 58
+PartsSupplier SYS Tables IsSystem 11 <null> boolean 0 1 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.Boolean 1 1 10 mmuuid:9fa7987c-7dc8-4102-9cc0-5658d5b46382 !
<null> 156
+PartsSupplier SYS Columns JavaClass 23 <null> string 0 500 true true false true false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 500 500 10 mmuuid:6b8d5df5-7bd2-425c-8b2b-e427e026ef66 !
<null> 50
+PartsSupplier SYS DataTypes JavaClass 5 <null> string 0 500 true true false true false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 500 500 10 mmuuid:4c68ef90-8042-44ab-896a-bb3890a8fe04 !
<null> 61
+PartsSupplier SYS ReferenceKeyColumns KEY_SEQ 9 <null> short 0 5 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.Short 5 5 10 mmuuid:4884ac83-84ed-4b67-9f1a-bd79c0199269 !
<null> 133
+PartsSupplier SYS KeyColumns KeyName 5 <null> string 0 255 true true false false false false false Nullable <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:da4bef58-83f4-4b88-8bb0-2dc8990be539 !
<null> 80
+PartsSupplier SYS KeyColumns KeyType 6 <null> string 0 20 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 20 20 10 mmuuid:df9e15e6-ab77-486d-bfe0-0adc378aa99d !
<null> 81
+PartsSupplier SYS Columns Length 9 <null> integer 0 10 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Integer 10 10 10 mmuuid:b36ea0f6-cbff-4049-bc9c-8ec9928be048 !
<null> 36
+PartsSupplier SYSADMIN MatViews LoadState 7 <null> string 0 255 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 0 255 10 mmuuid:c67365c3-f252-40f4-aae6-8971d3b1b153 !
<null> 23
+PartsSupplier SYS Columns MaxRange 19 <null> string 0 50 true true false false false false false Nullable <null> <null> Searchable <null> <null> java.lang.String 50 50 10 mmuuid:0b0df4a5-7de5-4315-94f7-22c84958302e !
<null> 46
+PartsSupplier SYS Columns MinRange 18 <null> string 0 50 true true false false false false false Nullable <null> <null> Searchable <null> <null> java.lang.String 50 50 10 mmuuid:dba0f97d-fab5-45f6-a1eb-3459ab3fcc74 !
<null> 45
+PartsSupplier SYSADMIN MatViews Name 3 <null> string 0 255 false true true true true false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 0 255 10 mmuuid:0f56d35c-e450-4b4f-86b0-bdb4f1015c57 !
<null> 19
+PartsSupplier SYS Columns Name 4 <null> string 0 255 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:d1f44a6d-3e39-4251-b873-1280c2b035b3 !
<null> 31
+PartsSupplier SYS DataTypes Name 1 <null> string 0 100 true true false true true false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 100 100 10 mmuuid:17f7de33-e6f0-4b9c-b55e-a87f6b7bb9b3 !
<null> 57
+PartsSupplier SYS KeyColumns Name 4 <null> string 0 255 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:08bda0c7-5f66-4fed-8285-d74b63eeb0e2 !
<null> 79
+PartsSupplier SYS Keys Name 4 <null> string 0 255 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:149de302-2107-45ca-839d-fc0dd1e7d7f4 !
<null> 89
+PartsSupplier SYS ProcedureParams Name 4 <null> string 0 255 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:2bf20c6f-5a95-436d-8f30-a24d164e77a4 !
<null> 100
+PartsSupplier SYS Procedures Name 3 <null> string 0 255 true true false true false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:bd17e98a-c40a-43b1-93ac-88d62937c051 !
<null> 115
+PartsSupplier SYS Properties Name 1 <null> string 0 255 true true false true true false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:ba007c56-04b6-4981-ab89-3fdd33ff0de8 !
<null> 121
+PartsSupplier SYS Schemas Name 2 <null> string 0 255 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 0 255 10 mmuuid:654112f8-bb4c-4453-9e4d-f3a96fba61ec !
<null> 140
+PartsSupplier SYS Tables Name 3 <null> string 0 255 true true false true false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:ef487cc2-1214-439c-af6e-da431df00d2c !
<null> 148
+PartsSupplier SYS VirtualDatabases Name 1 <null> string 0 255 true true false true false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:42fa1249-8b24-4aae-a252-0a347db6ec30 !
<null> 159
+PartsSupplier SYS Columns NameInSource 6 <null> string 0 255 true true false false false false false Nullable <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:fac72c6e-41dc-4a1b-8af3-f0796690d9cc !
<null> 33
+PartsSupplier SYS Keys NameInSource 6 <null> string 0 255 true true false false false false false Nullable <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:a52a6169-99e0-4b7e-9dc6-3a93ffa6094a !
<null> 91
+PartsSupplier SYS Procedures NameInSource 4 <null> string 0 255 true true false false false false false Nullable <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:a4e7a0fd-c340-49a9-9ac0-8328caaffda8 !
<null> 116
+PartsSupplier SYS Tables NameInSource 5 <null> string 0 255 true true false true false false false Nullable <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:1f036fb0-b841-450c-8462-986cdd57e921 !
<null> 150
+PartsSupplier SYS Columns NullType 17 <null> string 0 20 true true false true false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 20 20 10 mmuuid:4d83bdbb-a7ce-44cc-a201-021a517d3c1a !
<null> 44
+PartsSupplier SYS DataTypes NullType 8 <null> string 0 20 true true false true false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 20 20 10 mmuuid:278b0534-1164-495e-a8c6-de45e0ff53a4 !
<null> 64
+PartsSupplier SYS ProcedureParams NullType 13 <null> string 0 10 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 10 10 10 mmuuid:d887c203-6bf5-462b-b2f0-f5302e2f4bcd !
<null> 109
+PartsSupplier SYS Columns OID 29 <null> integer 0 10 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Integer 10 10 10 mmuuid:b9e5ba07-4a8d-4589-8aa9-597ae70d18a4 !
<null> 56
+PartsSupplier SYS DataTypes OID 19 <null> integer 0 10 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Integer 10 10 10 mmuuid:a3c41050-80b6-4fb5-9c6b-5e20c0839cda !
<null> 75
+PartsSupplier SYS KeyColumns OID 10 <null> integer 0 10 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Integer 10 10 10 mmuuid:207d123c-a3ff-4e4e-85ae-6f3b0debfc06 !
<null> 85
+PartsSupplier SYS Keys OID 11 <null> integer 0 10 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Integer 10 10 10 mmuuid:d781f893-bdf3-4dc1-956f-7e7b1a138c99 !
<null> 96
+PartsSupplier SYS ProcedureParams OID 16 <null> integer 0 10 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Integer 10 10 10 mmuuid:72125f93-846f-413c-82e1-fa3227fb043f !
<null> 112
+PartsSupplier SYS Procedures OID 8 <null> integer 0 10 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Integer 10 10 10 mmuuid:c80c02d2-7174-4cc4-b347-e921a80f568c !
<null> 120
+PartsSupplier SYS Properties OID 4 <null> integer 0 10 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Integer 10 10 10 mmuuid:54c1a7dc-5ca8-4d34-8672-e76d63fe3b95 !
<null> 124
+PartsSupplier SYS Schemas OID 7 <null> integer 0 10 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Integer 10 10 10 mmuuid:31746839-e019-4321-90cb-a557e1d4754e !
<null> 145
+PartsSupplier SYS Tables OID 13 <null> integer 0 10 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Integer 10 10 10 mmuuid:dae79c58-b381-4275-8c1c-b299d732d355 !
<null> 158
+PartsSupplier SYS ProcedureParams Optional 8 <null> boolean 0 1 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Boolean 1 1 10 mmuuid:4033f891-5ef5-4a75-8a50-bd1d021e43ad !
<null> 104
PartsSupplier PartsSupplier PARTSSUPPLIER.PARTS PART_COLOR 3 PART_COLOR string 0 30 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 0 30 10 mmuuid:015c0d00-73ff-1edc-a81c-ecf397b10590 !
<null> 2
PartsSupplier PartsSupplier PARTSSUPPLIER.PARTS PART_ID 1 PART_ID string 0 4 true true true true true false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 0 4 10 mmuuid:fadcd7c0-73fe-1edc-a81c-ecf397b10590 !
<null> 0
PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER_PARTS PART_ID 2 PART_ID string 0 4 true true true true true false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 0 4 10 mmuuid:3fc400c0-73ff-1edc-a81c-ecf397b10590 !
<null> 9
PartsSupplier PartsSupplier PARTSSUPPLIER.PARTS PART_NAME 2 PART_NAME string 0 255 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 0 255 10 mmuuid:0067e900-73ff-1edc-a81c-ecf397b10590 !
<null> 1
PartsSupplier PartsSupplier PARTSSUPPLIER.PARTS PART_WEIGHT 4 PART_WEIGHT string 0 255 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 0 255 10 mmuuid:015c0d01-73ff-1edc-a81c-ecf397b10590 !
<null> 3
-PartsSupplier SYS ReferenceKeyColumns PKCOLUMN_NAME 4 <null> string 0 255 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:0125a80a-95f9-486f-aa90-debb21cb5f1b !
<null> 126
-PartsSupplier SYS ReferenceKeyColumns PKTABLE_CAT 1 <null> string 0 255 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 1 255 10 mmuuid:f615a661-2c36-4ab1-b72b-5e13e99e052c !
<null> 123
-PartsSupplier SYS ReferenceKeyColumns PKTABLE_NAME 3 <null> string 0 255 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:6d420bc2-0f85-4da9-833d-d71b428b0743 !
<null> 125
-PartsSupplier SYS ReferenceKeyColumns PKTABLE_SCHEM 2 <null> string 0 255 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:ef7b3b79-fb51-42ef-a723-080ed0a6e3bc !
<null> 124
-PartsSupplier SYS ReferenceKeyColumns PK_NAME 13 <null> string 0 255 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:ac210a6d-4de6-4d71-aa9b-e3d34baca81a !
<null> 135
-PartsSupplier SYS Columns Position 5 <null> integer 0 10 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Integer 10 10 10 mmuuid:dbc8cd09-1b47-43c5-82ec-aba525b85cc4 !
<null> 21
-PartsSupplier SYS KeyColumns Position 9 <null> integer 0 10 true true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.Integer 10 10 10 mmuuid:92a4849c-ed0e-4f5f-a108-d7d71a5aba25 !
<null> 73
-PartsSupplier SYS ProcedureParams Position 6 <null> integer 0 10 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Integer 10 10 10 mmuuid:5fdefd17-65f4-4350-9ee0-0ed3c34d10ae !
<null> 100
-PartsSupplier SYS Columns Precision 24 <null> integer 0 10 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Integer 10 10 10 mmuuid:db3d49e2-fe1d-438b-8d07-847bf58506ab !
<null> 40
-PartsSupplier SYS DataTypes Precision 12 <null> integer 0 10 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Integer 10 10 10 mmuuid:8673c810-7162-4331-ba0b-6fc3530d2d1c !
<null> 57
-PartsSupplier SYS ProcedureParams Precision 9 <null> integer 0 10 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Integer 10 10 10 mmuuid:00fe7cad-0a83-42f0-90f2-d6a9584916b2 !
<null> 103
-PartsSupplier SYS Schemas PrimaryMetamodelURI 6 <null> string 0 255 false true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:eadfaba5-ce44-4529-816f-6af94666baec !
<null> 142
-PartsSupplier SYS ProcedureParams ProcedureName 3 <null> string 0 255 true true false true false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:8081b3a6-fc79-42fd-b7c9-a19d682a1658 !
<null> 97
+PartsSupplier SYS ReferenceKeyColumns PKCOLUMN_NAME 4 <null> string 0 255 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:0125a80a-95f9-486f-aa90-debb21cb5f1b !
<null> 128
+PartsSupplier SYS ReferenceKeyColumns PKTABLE_CAT 1 <null> string 0 255 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 1 255 10 mmuuid:f615a661-2c36-4ab1-b72b-5e13e99e052c !
<null> 125
+PartsSupplier SYS ReferenceKeyColumns PKTABLE_NAME 3 <null> string 0 255 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:6d420bc2-0f85-4da9-833d-d71b428b0743 !
<null> 127
+PartsSupplier SYS ReferenceKeyColumns PKTABLE_SCHEM 2 <null> string 0 255 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:ef7b3b79-fb51-42ef-a723-080ed0a6e3bc !
<null> 126
+PartsSupplier SYS ReferenceKeyColumns PK_NAME 13 <null> string 0 255 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:ac210a6d-4de6-4d71-aa9b-e3d34baca81a !
<null> 137
+PartsSupplier SYS Columns Position 5 <null> integer 0 10 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Integer 10 10 10 mmuuid:dbc8cd09-1b47-43c5-82ec-aba525b85cc4 !
<null> 32
+PartsSupplier SYS KeyColumns Position 9 <null> integer 0 10 true true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.Integer 10 10 10 mmuuid:92a4849c-ed0e-4f5f-a108-d7d71a5aba25 !
<null> 84
+PartsSupplier SYS ProcedureParams Position 6 <null> integer 0 10 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Integer 10 10 10 mmuuid:5fdefd17-65f4-4350-9ee0-0ed3c34d10ae !
<null> 102
+PartsSupplier SYS Columns Precision 24 <null> integer 0 10 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Integer 10 10 10 mmuuid:db3d49e2-fe1d-438b-8d07-847bf58506ab !
<null> 51
+PartsSupplier SYS DataTypes Precision 12 <null> integer 0 10 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Integer 10 10 10 mmuuid:8673c810-7162-4331-ba0b-6fc3530d2d1c !
<null> 68
+PartsSupplier SYS ProcedureParams Precision 9 <null> integer 0 10 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Integer 10 10 10 mmuuid:00fe7cad-0a83-42f0-90f2-d6a9584916b2 !
<null> 105
+PartsSupplier SYS Schemas PrimaryMetamodelURI 6 <null> string 0 255 false true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:eadfaba5-ce44-4529-816f-6af94666baec !
<null> 144
+PartsSupplier SYS ProcedureParams ProcedureName 3 <null> string 0 255 true true false true false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:8081b3a6-fc79-42fd-b7c9-a19d682a1658 !
<null> 99
PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER_PARTS QUANTITY 3 QUANTITY short 0 0 true true true false true false false Nullable <null> <null> All Except Like <null> <null> java.lang.Short 3 0 10 mmuuid:3fc400c1-73ff-1edc-a81c-ecf397b10590 !
<null> 10
-PartsSupplier SYS Columns Radix 26 <null> integer 0 10 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Integer 10 10 10 mmuuid:43a6124c-972f-4c4c-af05-24080c2a8ad7 !
<null> 42
-PartsSupplier SYS DataTypes Radix 13 <null> integer 0 10 true true false false false false false Nullable <null> <null> Searchable <null> <null> java.lang.Integer 10 10 10 mmuuid:967ab8fd-3226-4a78-8cf2-2eb7fbf2981a !
<null> 58
-PartsSupplier SYS ProcedureParams Radix 12 <null> integer 0 10 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Integer 10 10 10 mmuuid:8df37c99-3b12-4789-8128-4aa496f895c4 !
<null> 106
-PartsSupplier SYS KeyColumns RefKeyUID 7 <null> string 0 50 true true false false false false false Nullable <null> <null> Searchable <null> <null> java.lang.String 50 50 10 mmuuid:aafbdf50-25aa-427b-b322-7cb36094a1e2 !
<null> 71
-PartsSupplier SYS Keys RefKeyUID 9 <null> string 0 50 true true false false false false false Nullable <null> <null> Searchable <null> <null> java.lang.String 50 50 10 mmuuid:1cf4c5ad-5932-47ec-8593-385b75bfeba8 !
<null> 83
-PartsSupplier SYS Procedures ReturnsResults 5 <null> boolean 0 1 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Boolean 1 1 10 mmuuid:b01164c8-dd10-410d-a91b-fcb2fc0450ce !
<null> 115
-PartsSupplier SYS DataTypes RuntimeType 16 <null> string 0 64 true true false true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 64 64 10 mmuuid:3c7bc9d0-b73f-49a0-b9ab-dc97a4d2a124 !
<null> 61
+PartsSupplier SYS Columns Radix 26 <null> integer 0 10 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Integer 10 10 10 mmuuid:43a6124c-972f-4c4c-af05-24080c2a8ad7 !
<null> 53
+PartsSupplier SYS DataTypes Radix 13 <null> integer 0 10 true true false false false false false Nullable <null> <null> Searchable <null> <null> java.lang.Integer 10 10 10 mmuuid:967ab8fd-3226-4a78-8cf2-2eb7fbf2981a !
<null> 69
+PartsSupplier SYS ProcedureParams Radix 12 <null> integer 0 10 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Integer 10 10 10 mmuuid:8df37c99-3b12-4789-8128-4aa496f895c4 !
<null> 108
+PartsSupplier SYS KeyColumns RefKeyUID 7 <null> string 0 50 true true false false false false false Nullable <null> <null> Searchable <null> <null> java.lang.String 50 50 10 mmuuid:aafbdf50-25aa-427b-b322-7cb36094a1e2 !
<null> 82
+PartsSupplier SYS Keys RefKeyUID 9 <null> string 0 50 true true false false false false false Nullable <null> <null> Searchable <null> <null> java.lang.String 50 50 10 mmuuid:1cf4c5ad-5932-47ec-8593-385b75bfeba8 !
<null> 94
+PartsSupplier SYS Procedures ReturnsResults 5 <null> boolean 0 1 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Boolean 1 1 10 mmuuid:b01164c8-dd10-410d-a91b-fcb2fc0450ce !
<null> 117
+PartsSupplier SYS DataTypes RuntimeType 16 <null> string 0 64 true true false true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 64 64 10 mmuuid:3c7bc9d0-b73f-49a0-b9ab-dc97a4d2a124 !
<null> 72
PartsSupplier PartsSupplier PARTSSUPPLIER.SHIP_VIA SHIPPER_ID 1 SHIPPER_ID short 0 0 true true true false true false false No Nulls <null> <null> All Except Like <null> <null> java.lang.Short 2 0 10 mmuuid:121bc540-73ff-1edc-a81c-ecf397b10590 !
<null> 4
PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER_PARTS SHIPPER_ID 4 SHIPPER_ID short 0 0 true true true false true false false Nullable <null> <null> All Except Like <null> <null> java.lang.Short 2 0 10 mmuuid:3fc400c2-73ff-1edc-a81c-ecf397b10590 !
<null> 11
PartsSupplier PartsSupplier PARTSSUPPLIER.SHIP_VIA SHIPPER_NAME 2 SHIPPER_NAME string 0 30 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 0 30 10 mmuuid:130fe940-73ff-1edc-a81c-ecf397b10590 !
<null> 5
@@ -111,130 +111,132 @@
PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER SUPPLIER_NAME 2 SUPPLIER_NAME string 0 30 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 0 30 10 mmuuid:2f044881-73ff-1edc-a81c-ecf397b10590 !
<null> 13
PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER SUPPLIER_STATE 5 SUPPLIER_STATE string 0 2 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 0 2 10 mmuuid:2fe92a41-73ff-1edc-a81c-ecf397b10590 !
<null> 16
PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER SUPPLIER_STATUS 3 SUPPLIER_STATUS short 0 0 true true true false true false false Nullable <null> <null> All Except Like <null> <null> java.lang.Short 2 0 10 mmuuid:2f044882-73ff-1edc-a81c-ecf397b10590 !
<null> 14
-PartsSupplier SYS Columns Scale 8 <null> integer 0 10 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Integer 10 10 10 mmuuid:cc6c6113-8d70-40c8-84c0-94e17c14e22e !
<null> 24
-PartsSupplier SYS DataTypes Scale 6 <null> integer 0 10 true true false false false false false Nullable <null> <null> Searchable <null> (0) java.lang.Integer 10 10 10 mmuuid:e8655204-e97a-45cd-909b-1e37731e9546 !
<null> 51
-PartsSupplier SYS ProcedureParams Scale 11 <null> integer 0 10 true true true false false false false No Nulls <null> <null> Searchable <null> (0) java.lang.Integer 10 10 10 mmuuid:360c8b1d-4b3d-42fd-952c-bf5763cad69e !
<null> 105
-PartsSupplier SYS Columns SchemaName 2 <null> string 0 255 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 0 255 10 mmuuid:859288c9-cd78-4407-90fc-61b5d310e2ab !
<null> 18
-PartsSupplier SYS KeyColumns SchemaName 2 <null> string 0 255 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 0 255 10 mmuuid:787be966-cf12-4956-907f-a8e6dc1009dc !
<null> 66
-PartsSupplier SYS Keys SchemaName 2 <null> string 0 255 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 0 255 10 mmuuid:4a7fc059-208e-4f98-b6ef-cb7c6102a327 !
<null> 76
-PartsSupplier SYS MatViews SchemaName 2 <null> string 0 255 false true true true true false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 0 255 10 mmuuid:ee14b6ad-9b87-41e5-8eb5-90262f9e0ec4 !
<null> 87
-PartsSupplier SYS ProcedureParams SchemaName 2 <null> string 0 255 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 0 255 10 mmuuid:88497911-619c-4ca8-b482-8885d940706a !
<null> 96
-PartsSupplier SYS Procedures SchemaName 2 <null> string 0 255 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 0 255 10 mmuuid:53a84865-334e-4750-b343-de2411d56e3e !
<null> 112
-PartsSupplier SYS Tables SchemaName 2 <null> string 0 255 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 0 255 10 mmuuid:95bd960c-fd84-44c9-9831-692376f69b46 !
<null> 145
-PartsSupplier SYS Columns SearchType 20 <null> string 0 20 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 20 20 10 mmuuid:3037138a-bb20-4485-ba01-75bc20b1a532 !
<null> 36
-PartsSupplier SYS DataTypes SearchType 14 <null> string 0 20 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 20 20 10 mmuuid:d8494fa3-40e4-44cd-b0d8-da5c83685a75 !
<null> 59
-PartsSupplier SYS Columns SupportsSelect 11 <null> boolean 0 1 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Boolean 1 1 10 mmuuid:c2a50f93-0040-41ec-ad7b-e8511296555f !
<null> 27
-PartsSupplier SYS Columns SupportsUpdates 12 <null> boolean 0 1 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Boolean 1 1 10 mmuuid:fab660d1-36bf-4a5b-bbe6-9a543e0ebd76 !
<null> 28
-PartsSupplier SYS Tables SupportsUpdates 7 <null> boolean 0 1 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Boolean 1 1 10 mmuuid:5144d230-2b0e-4255-b321-65b9f6f6f76c !
<null> 150
-PartsSupplier SYS Columns TableName 3 <null> string 0 255 true true false true false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:2c09c9d1-2f25-45de-81cf-eeb2a5157d34 !
<null> 19
-PartsSupplier SYS KeyColumns TableName 3 <null> string 0 2048 true true false true false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 2048 2048 10 mmuuid:c24fad72-0c0d-4260-96ae-f188ad77b137 !
<null> 67
-PartsSupplier SYS Keys TableName 3 <null> string 0 2048 true true false true false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 2048 2048 10 mmuuid:7d9540bd-b51f-4206-8c33-b39c5ba8bb8b !
<null> 77
-PartsSupplier SYS MatViews TargetName 5 <null> string 0 4000 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 0 4000 10 mmuuid:9433bf0c-1046-4b83-9539-862fc0e190c6 !
<null> 90
-PartsSupplier SYS MatViews TargetSchemaName 4 <null> string 0 255 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 0 255 10 mmuuid:544b39f9-5243-43ce-a0cb-747d91fc5c5e !
<null> 89
-PartsSupplier SYS Keys Type 7 <null> string 0 20 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 20 20 10 mmuuid:29e73c18-afec-43a9-81ab-7378d6daf20b !
<null> 81
-PartsSupplier SYS ProcedureParams Type 7 <null> string 0 100 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 100 100 10 mmuuid:76a1981b-1226-4a55-9acf-82a061cc8642 !
<null> 101
-PartsSupplier SYS Tables Type 4 <null> string 0 20 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 20 20 10 mmuuid:4814a0af-4e8f-4f55-9b25-3148d90d3d9b !
<null> 147
-PartsSupplier SYS DataTypes TypeLength 7 <null> integer 0 10 true true false false false false false No Nulls <null> <null> Searchable <null> (0) java.lang.Integer 10 10 10 mmuuid:0668382a-f9c3-4507-8b0f-df65a2ebbf2f !
<null> 52
-PartsSupplier SYS ProcedureParams TypeLength 10 <null> integer 0 10 true true false false false false false No Nulls <null> <null> Searchable <null> (0) java.lang.Integer 10 10 10 mmuuid:791d7a29-8fc5-4735-9144-1accc114b58e !
<null> 104
-PartsSupplier SYS DataTypes TypeName 4 <null> string 0 100 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 100 100 10 mmuuid:48081cdd-9e90-4440-a956-4a32af96d7f4 !
<null> 49
-PartsSupplier SYS Columns UID 27 <null> string 0 50 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 50 50 10 mmuuid:5f491c75-769b-4908-9f68-2a9a486607bb !
<null> 43
-PartsSupplier SYS DataTypes UID 15 <null> string 0 50 true true false false true false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 50 50 10 mmuuid:dd57f577-ffc4-4b55-8f7f-355b9ea3ce37 !
<null> 60
-PartsSupplier SYS KeyColumns UID 8 <null> string 0 50 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 50 50 10 mmuuid:0d994a45-4f52-4b79-9b31-7ef22331fee2 !
<null> 72
-PartsSupplier SYS Keys UID 10 <null> string 0 50 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 50 50 10 mmuuid:782218d1-5337-48c6-9070-0aafd4c6cd20 !
<null> 84
-PartsSupplier SYS ProcedureParams UID 14 <null> string 0 50 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 0 50 10 mmuuid:a278de2e-89f1-4281-9e63-54aebb6062ce !
<null> 108
-PartsSupplier SYS Procedures UID 6 <null> string 0 50 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 50 50 10 mmuuid:de9df25a-c886-46e0-ae3a-8eb6792e43f4 !
<null> 116
-PartsSupplier SYS Properties UID 3 <null> string 0 50 true true false false true false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 50 50 10 mmuuid:b333969a-83e0-4010-9463-9a0088da6c83 !
<null> 121
-PartsSupplier SYS Schemas UID 4 <null> string 0 50 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 50 50 10 mmuuid:ad232e4d-9c01-4d0c-bc57-0459d9db918a !
<null> 140
-PartsSupplier SYS Tables UID 8 <null> string 0 50 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 50 50 10 mmuuid:6afe3737-26f9-43a8-88db-86531b5dc66c !
<null> 151
-PartsSupplier SYS ReferenceKeyColumns UPDATE_RULE 10 <null> integer 0 10 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.Integer 10 10 10 mmuuid:30d5ae74-b19e-4186-97e1-aeff5801e44f !
<null> 132
-PartsSupplier SYS MatViews Updated 8 <null> timestamp 0 0 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.sql.Timestamp 0 0 10 mmuuid:8053993e-6653-473d-a8b5-7d73f26900b0 !
<null> 93
-PartsSupplier SYS Columns VDBName 1 <null> string 0 255 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:83f19a81-1243-4751-8c99-daddbf37b1d7 !
<null> 17
-PartsSupplier SYS KeyColumns VDBName 1 <null> string 0 255 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:f062eb9c-4854-47fb-b7bd-a4e23c782b62 !
<null> 65
-PartsSupplier SYS Keys VDBName 1 <null> string 0 255 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:5785b523-7da3-42c1-8920-66daa1f7fa1d !
<null> 75
-PartsSupplier SYS MatViews VDBName 1 <null> string 0 255 false true true true true false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 0 255 10 mmuuid:9498360d-1e16-4d16-b88f-d46cc75a03c2 !
<null> 86
-PartsSupplier SYS ProcedureParams VDBName 1 <null> string 0 255 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:f832f316-2403-43fa-9ccc-c3ab9d38acca !
<null> 95
-PartsSupplier SYS Procedures VDBName 1 <null> string 0 255 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:1d664747-4a95-4605-8b28-381bed3121f1 !
<null> 111
-PartsSupplier SYS Schemas VDBName 1 <null> string 0 255 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 0 255 10 mmuuid:73dbf95b-a283-4f0a-81b9-9b98e09c2906 !
<null> 137
-PartsSupplier SYS Tables VDBName 1 <null> string 0 255 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 0 255 10 mmuuid:58de905f-9d64-4831-a985-da6d082ff709 !
<null> 144
-PartsSupplier SYS MatViews Valid 6 <null> boolean 0 0 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.Boolean 0 0 10 mmuuid:0eb16d11-5da1-47bd-a26e-8403726b2eeb !
<null> 91
-PartsSupplier SYS Properties Value 2 <null> string 0 255 true true false true true false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:c917257d-06b7-41dd-a6cb-44c0ff0f897e !
<null> 120
-PartsSupplier SYS VirtualDatabases Version 2 <null> string 0 50 true true false true false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 50 50 10 mmuuid:c876d749-a512-4810-9910-3034ca524c45 !
<null> 158
-PartsSupplier pg_catalog pg_attrdef adnum 4 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:e22c521a-e208-4181-9dbd-89f5de7014b9 !
<null> 220
-PartsSupplier pg_catalog pg_attrdef adrelid 3 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:e9b278d4-49af-442f-9a5a-b699fe3b102b !
<null> 219
-PartsSupplier pg_catalog pg_attrdef adsrc 2 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:4589389f-4abd-42a6-818f-ff1f2a085dfb !
<null> 218
-PartsSupplier pg_catalog pg_am amname 2 <null> string 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.String 0 0 0 mmuid:3c67619c-7d8f-4378-b7e9-84a0451ea5e5 !
<null> 197
-PartsSupplier pg_catalog pg_attribute atthasdef 10 <null> boolean 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Boolean 0 0 0 mmuid:5868e549-4bbe-479e-bc7e-632c05cc2329 !
<null> 179
-PartsSupplier pg_catalog pg_attribute attisdropped 9 <null> boolean 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Boolean 0 0 0 mmuid:7beb42a9-dfe6-43de-98b6-7e8948b1a666 !
<null> 178
-PartsSupplier pg_catalog pg_attribute attlen 5 <null> short 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Short 0 0 0 mmuid:d1214249-95cd-426f-b8f6-4bf68c0504c7 !
<null> 174
-PartsSupplier pg_catalog pg_attribute attname 3 <null> string 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.String 0 0 0 mmuid:6064d149-4102-4c2d-9132-582342f25e90 !
<null> 172
-PartsSupplier pg_catalog pg_attribute attnotnull 8 <null> boolean 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Boolean 0 0 0 mmuid:91ce8bde-8570-4867-be17-80acfa9275a6 !
<null> 177
-PartsSupplier pg_catalog pg_attribute attnum 6 <null> short 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Short 0 0 0 mmuid:141fd911-f2dd-4edd-8f08-ad8a67ffd0fb !
<null> 175
-PartsSupplier pg_catalog pg_attribute attrelid 2 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:3be6b5de-2287-4279-93f3-4f5064799118 !
<null> 171
-PartsSupplier pg_catalog pg_attribute atttypid 4 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:99782493-1cce-4e14-9c1b-4de7ce50e2c8 !
<null> 173
-PartsSupplier pg_catalog pg_attribute atttypmod 7 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:2e2bae3c-ab93-49f5-b96c-7a7b9d66782d !
<null> 176
-PartsSupplier pg_catalog pg_database datacl 7 <null> object 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Object 0 0 0 mmuid:4b5beb14-03a0-4652-9d6f-5f8cc74d470c !
<null> 227
-PartsSupplier pg_catalog pg_database datallowconn 5 <null> char 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Character 0 0 0 mmuid:c2bdf40c-ec58-439c-a403-7adf604ceadd !
<null> 225
-PartsSupplier pg_catalog pg_database datconfig 6 <null> object 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Object 0 0 0 mmuid:5c9d54b2-433f-443a-85ce-821f42ed109e !
<null> 226
-PartsSupplier pg_catalog pg_database datdba 8 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:8b993c11-de2b-48bc-beb1-3e44c46811b4 !
<null> 228
-PartsSupplier pg_catalog pg_database datlastsysoid 4 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:3b621b25-171c-405b-8bf9-635cf93f2273 !
<null> 224
-PartsSupplier pg_catalog pg_database datname 2 <null> string 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.String 0 0 0 mmuid:689cde3b-a631-4f25-94b4-ff2ffe022b0f !
<null> 222
-PartsSupplier pg_catalog pg_database dattablespace 9 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:36db343d-e99a-427c-a4e2-763a720ce4a4 !
<null> 229
-PartsSupplier pg_catalog pg_database encoding 3 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:1aedd02c-5801-41e7-accd-da1f257c26e8 !
<null> 223
-PartsSupplier pg_catalog pg_index indexprs 7 <null> string 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.String 0 0 0 mmuid:9ea3b6d2-b27b-4bb1-a99d-b703c3308384 !
<null> 194
-PartsSupplier pg_catalog pg_index indexrelid 2 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:83ae2247-7eec-459f-b037-ffd3cdca0627 !
<null> 189
-PartsSupplier pg_catalog pg_index indisclustered 4 <null> boolean 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Boolean 0 0 0 mmuid:16998907-e1dd-447e-898d-780994d30619 !
<null> 191
-PartsSupplier pg_catalog pg_index indisprimary 6 <null> boolean 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Boolean 0 0 0 mmuid:a52c714d-dfe9-406c-906b-fadd53ac4e98 !
<null> 193
-PartsSupplier pg_catalog pg_index indisunique 5 <null> boolean 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Boolean 0 0 0 mmuid:9f873e0f-903d-4c9d-8c37-1073b5ec4c67 !
<null> 192
-PartsSupplier pg_catalog pg_index indkey 8 <null> string 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.String 0 0 0 mmuid:1e6dbecd-9a2d-4aef-afbe-665de7acb9d6 !
<null> 195
-PartsSupplier pg_catalog pg_index indrelid 3 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:8709e084-48df-417d-b3f8-f4e9b7d8802b !
<null> 190
-PartsSupplier pg_catalog pg_namespace nspname 2 <null> string 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.String 0 0 0 mmuid:0e513513-b35a-48be-975d-5dbed6ace7e9 !
<null> 160
-PartsSupplier pg_catalog pg_namespace oid 1 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:688e5112-4083-4b67-b42c-62d9a614c59a !
<null> 159
-PartsSupplier pg_catalog pg_class oid 1 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:c1e736ac-c9d4-4026-8904-23c90e6eb1c0 !
<null> 161
-PartsSupplier pg_catalog pg_attribute oid 1 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:f735e545-a81c-4ee2-84d0-3ea35d4083a2 !
<null> 170
-PartsSupplier pg_catalog pg_type oid 1 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:b6f64d16-b147-459d-8e84-1bd3048fb900 !
<null> 180
-PartsSupplier pg_catalog pg_index oid 1 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:09daed8d-b0b8-4552-a261-2b6c775b46b0 !
<null> 188
-PartsSupplier pg_catalog pg_am oid 1 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:f6517a63-8c14-4b73-a18d-afaa5dfb35d9 !
<null> 196
-PartsSupplier pg_catalog pg_proc oid 1 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:f20c9489-10ca-4596-8a37-24218b67f764 !
<null> 198
-PartsSupplier pg_catalog pg_trigger oid 1 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:2b75f0b1-7475-4ed5-9da3-d37a8a25f26a !
<null> 208
-PartsSupplier pg_catalog pg_attrdef oid 1 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:76a7dd05-9a7d-4243-b561-f3056500dcaf !
<null> 217
-PartsSupplier pg_catalog pg_database oid 1 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:382f9fc9-8c96-4df7-ab5d-04dfb47ee142 !
<null> 221
-PartsSupplier pg_catalog pg_user oid 1 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:e63613cb-01ee-4b37-8b91-99d1aac4dfcb !
<null> 230
-PartsSupplier pg_catalog pg_proc proallargtypes 9 <null> object 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Object 0 0 0 mmuid:bcbed548-176c-4116-a5d6-7638cb0206e1 !
<null> 206
-PartsSupplier pg_catalog pg_proc proargmodes 8 <null> object 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Object 0 0 0 mmuid:d9f36bdc-7b25-4af0-b9f5-a96aac6d3094 !
<null> 205
-PartsSupplier pg_catalog pg_proc proargnames 7 <null> object 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Object 0 0 0 mmuid:ffa4ac73-b549-470e-931f-dc36330cb8c4 !
<null> 204
-PartsSupplier pg_catalog pg_proc proargtypes 6 <null> object 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Object 0 0 0 mmuid:6796c2e7-48a4-4f9f-bc98-d47913e2491c !
<null> 203
-PartsSupplier pg_catalog pg_proc proname 2 <null> string 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.String 0 0 0 mmuid:bdf3ee1e-b5b7-48ab-b43c-4bbb2c8ae1e2 !
<null> 199
-PartsSupplier pg_catalog pg_proc pronamespace 10 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:a385751f-a31a-4d5d-9197-3fbd390b0251 !
<null> 207
-PartsSupplier pg_catalog pg_proc pronargs 5 <null> short 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Short 0 0 0 mmuid:9fb5a34a-3a7e-4d38-b7cd-239f28a3504e !
<null> 202
-PartsSupplier pg_catalog pg_proc proretset 3 <null> boolean 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Boolean 0 0 0 mmuid:b288b3aa-37f2-4a8e-8b1b-e932a2ce3e25 !
<null> 200
-PartsSupplier pg_catalog pg_proc prorettype 4 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:e0244e1d-431c-41fa-8194-1e357e2b688b !
<null> 201
-PartsSupplier pg_catalog pg_class relam 5 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:c2f92b1a-6ba0-4486-8936-f5185d926178 !
<null> 165
-PartsSupplier pg_catalog pg_class relhasoids 9 <null> string 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.String 0 0 0 mmuid:3ac5a14a-1f9e-455b-8ea1-cf0878774fd7 !
<null> 169
-PartsSupplier pg_catalog pg_class relhasrules 8 <null> boolean 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Boolean 0 0 0 mmuid:6c26fd66-2a4a-4ccf-949a-a06a858db7f6 !
<null> 168
-PartsSupplier pg_catalog pg_class relkind 4 <null> char 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Character 0 0 0 mmuid:ef4359eb-6d51-4249-bfea-40bc0f407d10 !
<null> 164
-PartsSupplier pg_catalog pg_class relname 2 <null> string 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.String 0 0 0 mmuid:5f9b50fa-8188-4048-93c2-3ad1587915df !
<null> 162
-PartsSupplier pg_catalog pg_class relnamespace 3 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:4591ef08-bff8-4f3b-9de7-420f9c7f9d2b !
<null> 163
-PartsSupplier pg_catalog pg_class relpages 7 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:44dee7d6-b6ae-44c7-85f2-e87364d8d059 !
<null> 167
-PartsSupplier pg_catalog pg_class reltuples 6 <null> float 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Float 0 0 0 mmuid:b9ed4b49-5a7b-4ba4-863a-37fd95b2a34c !
<null> 166
-PartsSupplier pg_catalog pg_trigger tgargs 4 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:250d7c06-728a-4b2a-b557-91f2a69bb184 !
<null> 211
-PartsSupplier pg_catalog pg_trigger tgconstrname 8 <null> string 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.String 0 0 0 mmuid:da4b59ca-ebff-45a8-ad68-9777bc587813 !
<null> 215
-PartsSupplier pg_catalog pg_trigger tgconstrrelid 2 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:635b6634-632c-43c9-8cc7-bcaa016133e8 !
<null> 209
-PartsSupplier pg_catalog pg_trigger tgdeferrable 6 <null> boolean 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Boolean 0 0 0 mmuid:d70f020b-658c-4f58-86dc-0fbb12e2d8af !
<null> 213
-PartsSupplier pg_catalog pg_trigger tgfoid 3 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:64977f3e-f2a0-466e-a5d1-80bb058cbe08 !
<null> 210
-PartsSupplier pg_catalog pg_trigger tginitdeferred 7 <null> boolean 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Boolean 0 0 0 mmuid:bfbff036-caf2-4652-80cf-398af17ed7d1 !
<null> 214
-PartsSupplier pg_catalog pg_trigger tgnargs 5 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:0c20dbe7-5d89-411f-a8ab-3d77b999595b !
<null> 212
-PartsSupplier pg_catalog pg_trigger tgrelid 9 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:c010d12f-2074-45db-8e18-979cee2c45da !
<null> 216
-PartsSupplier pg_catalog pg_type typbasetype 6 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:a17d2f61-cd68-4c0d-8d25-132f68eb3b67 !
<null> 185
-PartsSupplier pg_catalog pg_type typlen 4 <null> short 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Short 0 0 0 mmuid:931c09e1-937a-437e-aab2-2360f8d90e2b !
<null> 183
-PartsSupplier pg_catalog pg_type typname 2 <null> string 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.String 0 0 0 mmuid:d600d818-2aad-4c92-9343-267d044dd97d !
<null> 181
-PartsSupplier pg_catalog pg_type typnamespace 3 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:e47217d2-2b07-4353-bfbd-d7c883a5e7e0 !
<null> 182
-PartsSupplier pg_catalog pg_type typrelid 8 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:bec25882-b292-4ed1-a610-cad5d504837d !
<null> 187
-PartsSupplier pg_catalog pg_type typtype 5 <null> char 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Character 0 0 0 mmuid:83199eba-7af4-44a9-822f-006677b1b895 !
<null> 184
-PartsSupplier pg_catalog pg_type typtypmod 7 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:cee3559d-1ce6-4b17-ad57-2ecb79a9e1d2 !
<null> 186
-PartsSupplier pg_catalog pg_user usecreatedb 3 <null> boolean 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Boolean 0 0 0 mmuid:236445e1-408c-40a1-a61c-40e96fb5dc9f !
<null> 232
-PartsSupplier pg_catalog pg_user usename 2 <null> string 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.String 0 0 0 mmuid:bb78401d-d10c-43b1-af84-e4fa6b95db42 !
<null> 231
-PartsSupplier pg_catalog pg_user usesuper 4 <null> boolean 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Boolean 0 0 0 mmuid:6da98878-b46e-4ed1-b032-1bc72da595f4 !
<null> 233
-Row Count : 234
+PartsSupplier SYS Columns Scale 8 <null> integer 0 10 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Integer 10 10 10 mmuuid:cc6c6113-8d70-40c8-84c0-94e17c14e22e !
<null> 35
+PartsSupplier SYS DataTypes Scale 6 <null> integer 0 10 true true false false false false false Nullable <null> <null> Searchable <null> (0) java.lang.Integer 10 10 10 mmuuid:e8655204-e97a-45cd-909b-1e37731e9546 !
<null> 62
+PartsSupplier SYS ProcedureParams Scale 11 <null> integer 0 10 true true true false false false false No Nulls <null> <null> Searchable <null> (0) java.lang.Integer 10 10 10 mmuuid:360c8b1d-4b3d-42fd-952c-bf5763cad69e !
<null> 107
+PartsSupplier SYSADMIN MatViews SchemaName 2 <null> string 0 255 false true true true true false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 0 255 10 mmuuid:2738c484-d24d-4c40-b0b7-e734afb03450 !
<null> 18
+PartsSupplier SYS Columns SchemaName 2 <null> string 0 255 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 0 255 10 mmuuid:859288c9-cd78-4407-90fc-61b5d310e2ab !
<null> 29
+PartsSupplier SYS KeyColumns SchemaName 2 <null> string 0 255 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 0 255 10 mmuuid:787be966-cf12-4956-907f-a8e6dc1009dc !
<null> 77
+PartsSupplier SYS Keys SchemaName 2 <null> string 0 255 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 0 255 10 mmuuid:4a7fc059-208e-4f98-b6ef-cb7c6102a327 !
<null> 87
+PartsSupplier SYS ProcedureParams SchemaName 2 <null> string 0 255 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 0 255 10 mmuuid:88497911-619c-4ca8-b482-8885d940706a !
<null> 98
+PartsSupplier SYS Procedures SchemaName 2 <null> string 0 255 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 0 255 10 mmuuid:53a84865-334e-4750-b343-de2411d56e3e !
<null> 114
+PartsSupplier SYS Tables SchemaName 2 <null> string 0 255 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 0 255 10 mmuuid:95bd960c-fd84-44c9-9831-692376f69b46 !
<null> 147
+PartsSupplier SYS Columns SearchType 20 <null> string 0 20 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 20 20 10 mmuuid:3037138a-bb20-4485-ba01-75bc20b1a532 !
<null> 47
+PartsSupplier SYS DataTypes SearchType 14 <null> string 0 20 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 20 20 10 mmuuid:d8494fa3-40e4-44cd-b0d8-da5c83685a75 !
<null> 70
+PartsSupplier SYS Columns SupportsSelect 11 <null> boolean 0 1 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Boolean 1 1 10 mmuuid:c2a50f93-0040-41ec-ad7b-e8511296555f !
<null> 38
+PartsSupplier SYS Columns SupportsUpdates 12 <null> boolean 0 1 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Boolean 1 1 10 mmuuid:fab660d1-36bf-4a5b-bbe6-9a543e0ebd76 !
<null> 39
+PartsSupplier SYS Tables SupportsUpdates 7 <null> boolean 0 1 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.Boolean 1 1 10 mmuuid:5144d230-2b0e-4255-b321-65b9f6f6f76c !
<null> 152
+PartsSupplier SYS Columns TableName 3 <null> string 0 255 true true false true false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:2c09c9d1-2f25-45de-81cf-eeb2a5157d34 !
<null> 30
+PartsSupplier SYS KeyColumns TableName 3 <null> string 0 2048 true true false true false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 2048 2048 10 mmuuid:c24fad72-0c0d-4260-96ae-f188ad77b137 !
<null> 78
+PartsSupplier SYS Keys TableName 3 <null> string 0 2048 true true false true false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 2048 2048 10 mmuuid:7d9540bd-b51f-4206-8c33-b39c5ba8bb8b !
<null> 88
+PartsSupplier SYSADMIN MatViews TargetName 5 <null> string 0 4000 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 0 4000 10 mmuuid:d2831595-d6f5-4cca-aa5d-2ff2530d0ab1 !
<null> 21
+PartsSupplier SYSADMIN MatViews TargetSchemaName 4 <null> string 0 255 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 0 255 10 mmuuid:a95dba1c-283e-4f48-9671-34cecdb7d0e3 !
<null> 20
+PartsSupplier SYS Keys Type 7 <null> string 0 20 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 20 20 10 mmuuid:29e73c18-afec-43a9-81ab-7378d6daf20b !
<null> 92
+PartsSupplier SYS ProcedureParams Type 7 <null> string 0 100 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 100 100 10 mmuuid:76a1981b-1226-4a55-9acf-82a061cc8642 !
<null> 103
+PartsSupplier SYS Tables Type 4 <null> string 0 20 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 20 20 10 mmuuid:4814a0af-4e8f-4f55-9b25-3148d90d3d9b !
<null> 149
+PartsSupplier SYS DataTypes TypeLength 7 <null> integer 0 10 true true false false false false false No Nulls <null> <null> Searchable <null> (0) java.lang.Integer 10 10 10 mmuuid:0668382a-f9c3-4507-8b0f-df65a2ebbf2f !
<null> 63
+PartsSupplier SYS ProcedureParams TypeLength 10 <null> integer 0 10 true true false false false false false No Nulls <null> <null> Searchable <null> (0) java.lang.Integer 10 10 10 mmuuid:791d7a29-8fc5-4735-9144-1accc114b58e !
<null> 106
+PartsSupplier SYS DataTypes TypeName 4 <null> string 0 100 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 100 100 10 mmuuid:48081cdd-9e90-4440-a956-4a32af96d7f4 !
<null> 60
+PartsSupplier SYS Columns UID 27 <null> string 0 50 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 50 50 10 mmuuid:5f491c75-769b-4908-9f68-2a9a486607bb !
<null> 54
+PartsSupplier SYS DataTypes UID 15 <null> string 0 50 true true false false true false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 50 50 10 mmuuid:dd57f577-ffc4-4b55-8f7f-355b9ea3ce37 !
<null> 71
+PartsSupplier SYS KeyColumns UID 8 <null> string 0 50 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 50 50 10 mmuuid:0d994a45-4f52-4b79-9b31-7ef22331fee2 !
<null> 83
+PartsSupplier SYS Keys UID 10 <null> string 0 50 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 50 50 10 mmuuid:782218d1-5337-48c6-9070-0aafd4c6cd20 !
<null> 95
+PartsSupplier SYS ProcedureParams UID 14 <null> string 0 50 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 0 50 10 mmuuid:a278de2e-89f1-4281-9e63-54aebb6062ce !
<null> 110
+PartsSupplier SYS Procedures UID 6 <null> string 0 50 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 50 50 10 mmuuid:de9df25a-c886-46e0-ae3a-8eb6792e43f4 !
<null> 118
+PartsSupplier SYS Properties UID 3 <null> string 0 50 true true false false true false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 50 50 10 mmuuid:b333969a-83e0-4010-9463-9a0088da6c83 !
<null> 123
+PartsSupplier SYS Schemas UID 4 <null> string 0 50 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 50 50 10 mmuuid:ad232e4d-9c01-4d0c-bc57-0459d9db918a !
<null> 142
+PartsSupplier SYS Tables UID 8 <null> string 0 50 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 50 50 10 mmuuid:6afe3737-26f9-43a8-88db-86531b5dc66c !
<null> 153
+PartsSupplier SYS ReferenceKeyColumns UPDATE_RULE 10 <null> integer 0 10 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.Integer 10 10 10 mmuuid:30d5ae74-b19e-4186-97e1-aeff5801e44f !
<null> 134
+PartsSupplier SYSADMIN MatViews Updated 8 <null> timestamp 0 0 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.sql.Timestamp 0 0 10 mmuuid:33970a66-7ad4-411f-a6c4-545746747fe6 !
<null> 24
+PartsSupplier SYSADMIN MatViews VDBName 1 <null> string 0 255 false true true true true false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 0 255 10 mmuuid:c1ce9841-e272-4839-8c78-777a5f68d241 !
<null> 17
+PartsSupplier SYS Columns VDBName 1 <null> string 0 255 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:83f19a81-1243-4751-8c99-daddbf37b1d7 !
<null> 28
+PartsSupplier SYS KeyColumns VDBName 1 <null> string 0 255 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:f062eb9c-4854-47fb-b7bd-a4e23c782b62 !
<null> 76
+PartsSupplier SYS Keys VDBName 1 <null> string 0 255 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:5785b523-7da3-42c1-8920-66daa1f7fa1d !
<null> 86
+PartsSupplier SYS ProcedureParams VDBName 1 <null> string 0 255 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:f832f316-2403-43fa-9ccc-c3ab9d38acca !
<null> 97
+PartsSupplier SYS Procedures VDBName 1 <null> string 0 255 true true false false false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:1d664747-4a95-4605-8b28-381bed3121f1 !
<null> 113
+PartsSupplier SYS Schemas VDBName 1 <null> string 0 255 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 0 255 10 mmuuid:73dbf95b-a283-4f0a-81b9-9b98e09c2906 !
<null> 139
+PartsSupplier SYS Tables VDBName 1 <null> string 0 255 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 0 255 10 mmuuid:58de905f-9d64-4831-a985-da6d082ff709 !
<null> 146
+PartsSupplier SYSADMIN MatViews Valid 6 <null> boolean 0 0 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.Boolean 0 0 10 mmuuid:13098912-bce2-4842-9ea9-b162fcd7383e !
<null> 22
+PartsSupplier SYS Properties Value 2 <null> string 0 255 true true false true true false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 255 255 10 mmuuid:c917257d-06b7-41dd-a6cb-44c0ff0f897e !
<null> 122
+PartsSupplier SYS VirtualDatabases Version 2 <null> string 0 50 true true false true false false false No Nulls <null> <null> Searchable <null> <null> java.lang.String 50 50 10 mmuuid:c876d749-a512-4810-9910-3034ca524c45 !
<null> 160
+PartsSupplier pg_catalog pg_attrdef adnum 4 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:e22c521a-e208-4181-9dbd-89f5de7014b9 !
<null> 222
+PartsSupplier pg_catalog pg_attrdef adrelid 3 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:e9b278d4-49af-442f-9a5a-b699fe3b102b !
<null> 221
+PartsSupplier pg_catalog pg_attrdef adsrc 2 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:4589389f-4abd-42a6-818f-ff1f2a085dfb !
<null> 220
+PartsSupplier pg_catalog pg_am amname 2 <null> string 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.String 0 0 0 mmuid:3c67619c-7d8f-4378-b7e9-84a0451ea5e5 !
<null> 199
+PartsSupplier pg_catalog pg_attribute atthasdef 10 <null> boolean 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Boolean 0 0 0 mmuid:5868e549-4bbe-479e-bc7e-632c05cc2329 !
<null> 181
+PartsSupplier pg_catalog pg_attribute attisdropped 9 <null> boolean 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Boolean 0 0 0 mmuid:7beb42a9-dfe6-43de-98b6-7e8948b1a666 !
<null> 180
+PartsSupplier pg_catalog pg_attribute attlen 5 <null> short 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Short 0 0 0 mmuid:d1214249-95cd-426f-b8f6-4bf68c0504c7 !
<null> 176
+PartsSupplier pg_catalog pg_attribute attname 3 <null> string 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.String 0 0 0 mmuid:6064d149-4102-4c2d-9132-582342f25e90 !
<null> 174
+PartsSupplier pg_catalog pg_attribute attnotnull 8 <null> boolean 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Boolean 0 0 0 mmuid:91ce8bde-8570-4867-be17-80acfa9275a6 !
<null> 179
+PartsSupplier pg_catalog pg_attribute attnum 6 <null> short 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Short 0 0 0 mmuid:141fd911-f2dd-4edd-8f08-ad8a67ffd0fb !
<null> 177
+PartsSupplier pg_catalog pg_attribute attrelid 2 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:3be6b5de-2287-4279-93f3-4f5064799118 !
<null> 173
+PartsSupplier pg_catalog pg_attribute atttypid 4 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:99782493-1cce-4e14-9c1b-4de7ce50e2c8 !
<null> 175
+PartsSupplier pg_catalog pg_attribute atttypmod 7 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:2e2bae3c-ab93-49f5-b96c-7a7b9d66782d !
<null> 178
+PartsSupplier SYSADMIN VDBResources contents 2 <null> blob 0 0 false true true true true false false Nullable <null> <null> Searchable <null> <null> org.teiid.core.types.BlobType 0 0 10 mmuuid:f9421669-3564-451d-9293-96c1e5e72c4f !
<null> 27
+PartsSupplier pg_catalog pg_database datacl 7 <null> object 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Object 0 0 0 mmuid:4b5beb14-03a0-4652-9d6f-5f8cc74d470c !
<null> 229
+PartsSupplier pg_catalog pg_database datallowconn 5 <null> char 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Character 0 0 0 mmuid:c2bdf40c-ec58-439c-a403-7adf604ceadd !
<null> 227
+PartsSupplier pg_catalog pg_database datconfig 6 <null> object 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Object 0 0 0 mmuid:5c9d54b2-433f-443a-85ce-821f42ed109e !
<null> 228
+PartsSupplier pg_catalog pg_database datdba 8 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:8b993c11-de2b-48bc-beb1-3e44c46811b4 !
<null> 230
+PartsSupplier pg_catalog pg_database datlastsysoid 4 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:3b621b25-171c-405b-8bf9-635cf93f2273 !
<null> 226
+PartsSupplier pg_catalog pg_database datname 2 <null> string 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.String 0 0 0 mmuid:689cde3b-a631-4f25-94b4-ff2ffe022b0f !
<null> 224
+PartsSupplier pg_catalog pg_database dattablespace 9 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:36db343d-e99a-427c-a4e2-763a720ce4a4 !
<null> 231
+PartsSupplier pg_catalog pg_database encoding 3 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:1aedd02c-5801-41e7-accd-da1f257c26e8 !
<null> 225
+PartsSupplier pg_catalog pg_index indexprs 7 <null> string 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.String 0 0 0 mmuid:9ea3b6d2-b27b-4bb1-a99d-b703c3308384 !
<null> 196
+PartsSupplier pg_catalog pg_index indexrelid 2 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:83ae2247-7eec-459f-b037-ffd3cdca0627 !
<null> 191
+PartsSupplier pg_catalog pg_index indisclustered 4 <null> boolean 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Boolean 0 0 0 mmuid:16998907-e1dd-447e-898d-780994d30619 !
<null> 193
+PartsSupplier pg_catalog pg_index indisprimary 6 <null> boolean 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Boolean 0 0 0 mmuid:a52c714d-dfe9-406c-906b-fadd53ac4e98 !
<null> 195
+PartsSupplier pg_catalog pg_index indisunique 5 <null> boolean 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Boolean 0 0 0 mmuid:9f873e0f-903d-4c9d-8c37-1073b5ec4c67 !
<null> 194
+PartsSupplier pg_catalog pg_index indkey 8 <null> string 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.String 0 0 0 mmuid:1e6dbecd-9a2d-4aef-afbe-665de7acb9d6 !
<null> 197
+PartsSupplier pg_catalog pg_index indrelid 3 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:8709e084-48df-417d-b3f8-f4e9b7d8802b !
<null> 192
+PartsSupplier pg_catalog pg_namespace nspname 2 <null> string 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.String 0 0 0 mmuid:0e513513-b35a-48be-975d-5dbed6ace7e9 !
<null> 162
+PartsSupplier pg_catalog pg_namespace oid 1 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:688e5112-4083-4b67-b42c-62d9a614c59a !
<null> 161
+PartsSupplier pg_catalog pg_class oid 1 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:c1e736ac-c9d4-4026-8904-23c90e6eb1c0 !
<null> 163
+PartsSupplier pg_catalog pg_attribute oid 1 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:f735e545-a81c-4ee2-84d0-3ea35d4083a2 !
<null> 172
+PartsSupplier pg_catalog pg_type oid 1 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:b6f64d16-b147-459d-8e84-1bd3048fb900 !
<null> 182
+PartsSupplier pg_catalog pg_index oid 1 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:09daed8d-b0b8-4552-a261-2b6c775b46b0 !
<null> 190
+PartsSupplier pg_catalog pg_am oid 1 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:f6517a63-8c14-4b73-a18d-afaa5dfb35d9 !
<null> 198
+PartsSupplier pg_catalog pg_proc oid 1 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:f20c9489-10ca-4596-8a37-24218b67f764 !
<null> 200
+PartsSupplier pg_catalog pg_trigger oid 1 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:2b75f0b1-7475-4ed5-9da3-d37a8a25f26a !
<null> 210
+PartsSupplier pg_catalog pg_attrdef oid 1 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:76a7dd05-9a7d-4243-b561-f3056500dcaf !
<null> 219
+PartsSupplier pg_catalog pg_database oid 1 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:382f9fc9-8c96-4df7-ab5d-04dfb47ee142 !
<null> 223
+PartsSupplier pg_catalog pg_user oid 1 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:e63613cb-01ee-4b37-8b91-99d1aac4dfcb !
<null> 232
+PartsSupplier pg_catalog pg_proc proallargtypes 9 <null> object 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Object 0 0 0 mmuid:bcbed548-176c-4116-a5d6-7638cb0206e1 !
<null> 208
+PartsSupplier pg_catalog pg_proc proargmodes 8 <null> object 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Object 0 0 0 mmuid:d9f36bdc-7b25-4af0-b9f5-a96aac6d3094 !
<null> 207
+PartsSupplier pg_catalog pg_proc proargnames 7 <null> object 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Object 0 0 0 mmuid:ffa4ac73-b549-470e-931f-dc36330cb8c4 !
<null> 206
+PartsSupplier pg_catalog pg_proc proargtypes 6 <null> object 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Object 0 0 0 mmuid:6796c2e7-48a4-4f9f-bc98-d47913e2491c !
<null> 205
+PartsSupplier pg_catalog pg_proc proname 2 <null> string 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.String 0 0 0 mmuid:bdf3ee1e-b5b7-48ab-b43c-4bbb2c8ae1e2 !
<null> 201
+PartsSupplier pg_catalog pg_proc pronamespace 10 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:a385751f-a31a-4d5d-9197-3fbd390b0251 !
<null> 209
+PartsSupplier pg_catalog pg_proc pronargs 5 <null> short 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Short 0 0 0 mmuid:9fb5a34a-3a7e-4d38-b7cd-239f28a3504e !
<null> 204
+PartsSupplier pg_catalog pg_proc proretset 3 <null> boolean 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Boolean 0 0 0 mmuid:b288b3aa-37f2-4a8e-8b1b-e932a2ce3e25 !
<null> 202
+PartsSupplier pg_catalog pg_proc prorettype 4 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:e0244e1d-431c-41fa-8194-1e357e2b688b !
<null> 203
+PartsSupplier pg_catalog pg_class relam 5 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:c2f92b1a-6ba0-4486-8936-f5185d926178 !
<null> 167
+PartsSupplier pg_catalog pg_class relhasoids 9 <null> string 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.String 0 0 0 mmuid:3ac5a14a-1f9e-455b-8ea1-cf0878774fd7 !
<null> 171
+PartsSupplier pg_catalog pg_class relhasrules 8 <null> boolean 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Boolean 0 0 0 mmuid:6c26fd66-2a4a-4ccf-949a-a06a858db7f6 !
<null> 170
+PartsSupplier pg_catalog pg_class relkind 4 <null> char 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Character 0 0 0 mmuid:ef4359eb-6d51-4249-bfea-40bc0f407d10 !
<null> 166
+PartsSupplier pg_catalog pg_class relname 2 <null> string 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.String 0 0 0 mmuid:5f9b50fa-8188-4048-93c2-3ad1587915df !
<null> 164
+PartsSupplier pg_catalog pg_class relnamespace 3 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:4591ef08-bff8-4f3b-9de7-420f9c7f9d2b !
<null> 165
+PartsSupplier pg_catalog pg_class relpages 7 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:44dee7d6-b6ae-44c7-85f2-e87364d8d059 !
<null> 169
+PartsSupplier pg_catalog pg_class reltuples 6 <null> float 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Float 0 0 0 mmuid:b9ed4b49-5a7b-4ba4-863a-37fd95b2a34c !
<null> 168
+PartsSupplier SYSADMIN VDBResources resourcePath 1 <null> string 0 255 false true true true true false false Nullable <null> <null> Searchable <null> <null> java.lang.String 0 255 10 mmuuid:b1bc5150-3dcc-452e-9e75-4a506997f612 !
<null> 26
+PartsSupplier pg_catalog pg_trigger tgargs 4 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:250d7c06-728a-4b2a-b557-91f2a69bb184 !
<null> 213
+PartsSupplier pg_catalog pg_trigger tgconstrname 8 <null> string 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.String 0 0 0 mmuid:da4b59ca-ebff-45a8-ad68-9777bc587813 !
<null> 217
+PartsSupplier pg_catalog pg_trigger tgconstrrelid 2 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:635b6634-632c-43c9-8cc7-bcaa016133e8 !
<null> 211
+PartsSupplier pg_catalog pg_trigger tgdeferrable 6 <null> boolean 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Boolean 0 0 0 mmuid:d70f020b-658c-4f58-86dc-0fbb12e2d8af !
<null> 215
+PartsSupplier pg_catalog pg_trigger tgfoid 3 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:64977f3e-f2a0-466e-a5d1-80bb058cbe08 !
<null> 212
+PartsSupplier pg_catalog pg_trigger tginitdeferred 7 <null> boolean 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Boolean 0 0 0 mmuid:bfbff036-caf2-4652-80cf-398af17ed7d1 !
<null> 216
+PartsSupplier pg_catalog pg_trigger tgnargs 5 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:0c20dbe7-5d89-411f-a8ab-3d77b999595b !
<null> 214
+PartsSupplier pg_catalog pg_trigger tgrelid 9 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:c010d12f-2074-45db-8e18-979cee2c45da !
<null> 218
+PartsSupplier pg_catalog pg_type typbasetype 6 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:a17d2f61-cd68-4c0d-8d25-132f68eb3b67 !
<null> 187
+PartsSupplier pg_catalog pg_type typlen 4 <null> short 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Short 0 0 0 mmuid:931c09e1-937a-437e-aab2-2360f8d90e2b !
<null> 185
+PartsSupplier pg_catalog pg_type typname 2 <null> string 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.String 0 0 0 mmuid:d600d818-2aad-4c92-9343-267d044dd97d !
<null> 183
+PartsSupplier pg_catalog pg_type typnamespace 3 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:e47217d2-2b07-4353-bfbd-d7c883a5e7e0 !
<null> 184
+PartsSupplier pg_catalog pg_type typrelid 8 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:bec25882-b292-4ed1-a610-cad5d504837d !
<null> 189
+PartsSupplier pg_catalog pg_type typtype 5 <null> char 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Character 0 0 0 mmuid:83199eba-7af4-44a9-822f-006677b1b895 !
<null> 186
+PartsSupplier pg_catalog pg_type typtypmod 7 <null> integer 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Integer 0 0 0 mmuid:cee3559d-1ce6-4b17-ad57-2ecb79a9e1d2 !
<null> 188
+PartsSupplier pg_catalog pg_user usecreatedb 3 <null> boolean 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Boolean 0 0 0 mmuid:236445e1-408c-40a1-a61c-40e96fb5dc9f !
<null> 234
+PartsSupplier pg_catalog pg_user usename 2 <null> string 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.String 0 0 0 mmuid:bb78401d-d10c-43b1-af84-e4fa6b95db42 !
<null> 233
+PartsSupplier pg_catalog pg_user usesuper 4 <null> boolean 0 0 false true false false false false false Unknown <null> <null> Searchable <null> <null> java.lang.Boolean 0 0 0 mmuid:6da98878-b46e-4ed1-b032-1bc72da595f4 !
<null> 235
+Row Count : 236
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
VDBName 12 PartsSupplier java.lang.String VDBName string SYS Columns 255 255 0 false false false false 0 true true false false
SchemaName 12 PartsSupplier java.lang.String SchemaName string SYS Columns 255 255 0 false true false true 1 false true true true
Modified: trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testProcedureParams.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testProcedureParams.expected 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testProcedureParams.expected 2010-09-24 18:51:07 UTC (rev 2603)
@@ -1,20 +1,14 @@
string string string string string integer string boolean integer integer integer integer string string string integer
VDBName SchemaName ProcedureName Name DataType Position Type Optional Precision TypeLength Scale Radix NullType UID Description OID
-PartsSupplier SYS refreshMatView Invalidate boolean 2 In false 0 0 0 10 No Nulls mmuuid:0a04801b-c78e-4ccf-a273-8b6c2fbc4fec <null> 12
-PartsSupplier SYS refreshMatViewRow Key object 2 In false 0 0 0 10 No Nulls mmuuid:c339f41d-5927-4516-849f-b1485c18ee6b <null> 9
-PartsSupplier SYS getVDBResourcePaths ResourcePath string 1 ResultSet false 50 50 0 10 Nullable mmuuid:ebbffdab-ac7e-41ab-974f-62785b3086f9 <null> 4
-PartsSupplier SYS refreshMatViewRow RowsUpdated integer 3 ReturnValue false 0 0 0 10 No Nulls mmuuid:882ac88e-8e35-4173-8961-71997ff3552a <null> 10
-PartsSupplier SYS refreshMatView RowsUpdated integer 3 ReturnValue false 0 0 0 10 No Nulls mmuuid:ea9da7d7-680a-41fc-8235-989e076f10a1 <null> 13
-PartsSupplier SYS getBinaryVDBResource VdbResource blob 1 ResultSet false 0 0 0 10 Nullable mmuuid:90d1f79d-bd98-46f4-ae8f-adacc329cf0b <null> 1
-PartsSupplier SYS getCharacterVDBResource VdbResource clob 1 ResultSet false 0 0 0 10 Nullable mmuuid:111f9fa8-74c9-479a-a184-8db64a1eab3c <null> 3
-PartsSupplier SYS refreshMatViewRow ViewName string 1 In false 0 0 0 10 No Nulls mmuuid:db4b20a0-0714-4cab-9a94-96a2171a4231 <null> 8
-PartsSupplier SYS refreshMatView ViewName string 1 In false 0 0 0 10 No Nulls mmuuid:9e3b093d-616b-46a2-9789-a963354f2f4c <null> 11
-PartsSupplier SYS getXMLSchemas document string 1 In false 0 0 0 10 No Nulls mmuuid:41f00dca-7bc1-4593-b2a7-a7d64936c2d4 <null> 6
-PartsSupplier SYS getVDBResourcePaths isBinary boolean 2 ResultSet false 1 1 0 10 Nullable mmuuid:e8d087da-9833-4422-a255-f0e0fea2cb61 <null> 5
-PartsSupplier SYS getBinaryVDBResource resourcePath string 1 In false 50 50 0 10 No Nulls mmuuid:25e5065a-454e-4a87-bf71-b6f71b98319f <null> 0
-PartsSupplier SYS getCharacterVDBResource resourcePath string 1 In false 50 50 0 10 No Nulls mmuuid:c54e777f-3cd0-45ad-a18b-e4e93532984f <null> 2
-PartsSupplier SYS getXMLSchemas schema xml 1 ResultSet false 0 0 0 10 Nullable mmuuid:f0cb82f2-111e-4433-ae77-59a27fa93991 <null> 7
-Row Count : 14
+PartsSupplier SYSADMIN refreshMatView Invalidate boolean 2 In false 0 0 0 10 No Nulls mmuuid:5736cfd3-750f-42d8-b083-102061e11c60 <null> 4
+PartsSupplier SYSADMIN refreshMatViewRow Key object 2 In false 0 0 0 10 No Nulls mmuuid:7af5a63b-1b91-4d1e-912e-846a7e84c579 <null> 1
+PartsSupplier SYSADMIN refreshMatViewRow RowsUpdated integer 3 ReturnValue false 0 0 0 10 No Nulls mmuuid:05a6a9be-c014-4d06-bcac-746cee4f118b <null> 2
+PartsSupplier SYSADMIN refreshMatView RowsUpdated integer 3 ReturnValue false 0 0 0 10 No Nulls mmuuid:d07a6a75-aa12-4dac-8eab-b2acdbaaffd8 <null> 5
+PartsSupplier SYSADMIN refreshMatViewRow ViewName string 1 In false 0 0 0 10 No Nulls mmuuid:ba635c44-a052-496d-9c35-ca010c0ebebe <null> 0
+PartsSupplier SYSADMIN refreshMatView ViewName string 1 In false 0 0 0 10 No Nulls mmuuid:e0c28e00-d987-48e4-8c60-5f637f10bf33 <null> 3
+PartsSupplier SYS getXMLSchemas document string 1 In false 0 0 0 10 No Nulls mmuuid:85b88af5-f0b8-401f-b35a-ccee56155492 <null> 6
+PartsSupplier SYS getXMLSchemas schema xml 1 ResultSet false 0 0 0 10 Nullable mmuuid:003980bb-38bb-41ad-b8c2-c87ca47aa554 <null> 7
+Row Count : 8
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
VDBName 12 PartsSupplier java.lang.String VDBName string SYS ProcedureParams 255 255 0 false false false false 0 true true false false
SchemaName 12 PartsSupplier java.lang.String SchemaName string SYS ProcedureParams 255 255 0 false true false true 1 false true true true
Modified: trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testProcedures.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testProcedures.expected 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testProcedures.expected 2010-09-24 18:51:07 UTC (rev 2603)
@@ -1,12 +1,9 @@
string string string string boolean string string integer
VDBName SchemaName Name NameInSource ReturnsResults UID Description OID
-PartsSupplier SYS getBinaryVDBResource <null> true mmuuid:9bc0b701-b36e-4209-a986-9d38420d2c20 <null> 0
-PartsSupplier SYS getCharacterVDBResource <null> true mmuuid:72464082-00fc-44f0-98b9-8c8f637c6570 <null> 1
-PartsSupplier SYS getVDBResourcePaths <null> true mmuuid:1204d4b2-6f92-428d-bcc5-7b3a0da9a113 <null> 2
-PartsSupplier SYS getXMLSchemas <null> true mmuuid:2d51a2a4-9966-4bd8-861d-9c0ae8e4b869 <null> 3
-PartsSupplier SYS refreshMatView <null> false mmuuid:38467814-0f73-40c0-a373-0ee4f8bda99a <null> 5
-PartsSupplier SYS refreshMatViewRow <null> false mmuuid:f03ad830-a06c-4b8e-bb4e-2dd1ae59bb3f <null> 4
-Row Count : 6
+PartsSupplier SYS getXMLSchemas <null> true mmuuid:68497bd9-30f5-461b-bf13-6b26aeb2fc4f <null> 2
+PartsSupplier SYSADMIN refreshMatView <null> false mmuuid:52178344-dca8-4c76-8549-00a4515c7044 <null> 1
+PartsSupplier SYSADMIN refreshMatViewRow <null> false mmuuid:1674912b-af56-465a-a1b9-d1de8b761f10 <null> 0
+Row Count : 3
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
VDBName 12 PartsSupplier java.lang.String VDBName string SYS Procedures 255 255 0 false false false false 0 true true false false
SchemaName 12 PartsSupplier java.lang.String SchemaName string SYS Procedures 255 255 0 false true false true 1 false true true true
Modified: trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testSchemas.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testSchemas.expected 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testSchemas.expected 2010-09-24 18:51:07 UTC (rev 2603)
@@ -1,9 +1,10 @@
string string boolean string string string integer
VDBName Name IsPhysical UID Description PrimaryMetamodelURI OID
PartsSupplier PartsSupplier true mmuuid:19c7f380-73d8-1edc-a81c-ecf397b10590 <null> http://www.metamatrix.com/metamodels/Relational 0
-PartsSupplier SYS true mmuuid:49b9c0f9-2c4c-42d3-9409-2d847d29a1de System http://www.metamatrix.com/metamodels/Relational 1
-PartsSupplier pg_catalog true mmuid:5a84789f-c794-4748-803a-09b6b605f6b9 <null> http://www.metamatrix.com/metamodels/Relational 2
-Row Count : 3
+PartsSupplier SYS true mmuuid:49b9c0f9-2c4c-42d3-9409-2d847d29a1de System http://www.metamatrix.com/metamodels/Relational 2
+PartsSupplier SYSADMIN true mmuuid:82f6153e-31e0-4034-b335-013cb418da34 <null> http://www.metamatrix.com/metamodels/Relational 1
+PartsSupplier pg_catalog true mmuid:5a84789f-c794-4748-803a-09b6b605f6b9 <null> http://www.metamatrix.com/metamodels/Relational 3
+Row Count : 4
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
VDBName 12 PartsSupplier java.lang.String VDBName string SYS Schemas 255 255 0 false true false true 1 false true true true
Name 12 PartsSupplier java.lang.String Name string SYS Schemas 255 255 0 false true false true 1 false true true true
Modified: trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testTableIsSystem.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testTableIsSystem.expected 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testTableIsSystem.expected 2010-09-24 18:51:07 UTC (rev 2603)
@@ -5,6 +5,7 @@
PARTSSUPPLIER.STATUS
PARTSSUPPLIER.SUPPLIER
PARTSSUPPLIER.SUPPLIER_PARTS
-Row Count : 5
+VDBResources
+Row Count : 6
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
Name 12 PartsSupplier java.lang.String Name string SYS Tables 255 255 0 false true false false 0 true true false false
Modified: trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testTables.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testTables.expected 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testTables.expected 2010-09-24 18:51:07 UTC (rev 2603)
@@ -1,34 +1,35 @@
string string string string string boolean boolean string integer string boolean boolean integer
VDBName SchemaName Name Type NameInSource IsPhysical SupportsUpdates UID Cardinality Description IsSystem IsMaterialized OID
-PartsSupplier SYS Columns Table <null> true false mmuuid:1c9a5cb2-17b1-4e4a-8b0e-3a42bd052509 0 <null> true false 5
-PartsSupplier SYS DataTypes Table <null> true false mmuuid:9a8794f9-66f8-49e8-8576-89d212d0f957 0 <null> true false 6
-PartsSupplier SYS KeyColumns Table <null> true false mmuuid:14946083-3bd5-42d5-8283-1c0694347c29 0 <null> true false 7
-PartsSupplier SYS Keys Table <null> true false mmuuid:1e5135dc-ce5d-4b25-a8ff-63f5440b3108 0 <null> true false 8
-PartsSupplier SYS MatViews Table <null> true true mmuuid:29f7718e-bd87-4fe0-8b8a-9fec44517de5 0 <null> true false 9
+PartsSupplier SYS Columns Table <null> true false mmuuid:1c9a5cb2-17b1-4e4a-8b0e-3a42bd052509 0 <null> true false 7
+PartsSupplier SYS DataTypes Table <null> true false mmuuid:9a8794f9-66f8-49e8-8576-89d212d0f957 0 <null> true false 8
+PartsSupplier SYS KeyColumns Table <null> true false mmuuid:14946083-3bd5-42d5-8283-1c0694347c29 0 <null> true false 9
+PartsSupplier SYS Keys Table <null> true false mmuuid:1e5135dc-ce5d-4b25-a8ff-63f5440b3108 0 <null> true false 10
+PartsSupplier SYSADMIN MatViews Table <null> true true mmuuid:520ba1e8-3553-460f-8d18-9b43f089e256 0 <null> true false 5
PartsSupplier PartsSupplier PARTSSUPPLIER.PARTS Table PARTS true true mmuuid:f6276601-73fe-1edc-a81c-ecf397b10590 16 <null> false false 0
PartsSupplier PartsSupplier PARTSSUPPLIER.SHIP_VIA Table SHIP_VIA true true mmuuid:0f4e9b80-73ff-1edc-a81c-ecf397b10590 4 <null> false false 1
PartsSupplier PartsSupplier PARTSSUPPLIER.STATUS Table STATUS true true mmuuid:1f297200-73ff-1edc-a81c-ecf397b10590 3 <null> false false 2
PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER Table SUPPLIER true true mmuuid:2c371ec0-73ff-1edc-a81c-ecf397b10590 16 <null> false false 4
PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER_PARTS Table SUPPLIER_PARTS true true mmuuid:3deafb00-73ff-1edc-a81c-ecf397b10590 227 <null> false false 3
-PartsSupplier SYS ProcedureParams Table <null> true false mmuuid:a56bd7fe-c87a-411c-8f5d-661975a25626 0 <null> true false 10
-PartsSupplier SYS Procedures Table <null> true false mmuuid:0bc132a5-9f8d-4a3c-9f5d-98156a98a962 0 <null> true false 11
-PartsSupplier SYS Properties Table <null> true false mmuuid:7a45e50a-d03f-4548-ba35-761651bbca85 0 <null> true false 12
-PartsSupplier SYS ReferenceKeyColumns Table <null> true false mmuuid:6a9653e8-a337-41b2-86fa-77b98f409a29 0 <null> true false 13
-PartsSupplier SYS Schemas Table <null> true false mmuuid:8648a554-b2ad-4e8e-84ca-2ec618b311a9 0 <null> true false 14
-PartsSupplier SYS Tables Table <null> true false mmuuid:8551b3bd-11cc-4049-9bcf-fe91a0eb7ba7 0 <null> true false 15
-PartsSupplier SYS VirtualDatabases Table <null> true false mmuuid:47297c72-d621-4f4e-af4e-74060ac5f489 0 <null> true false 16
-PartsSupplier pg_catalog pg_am Table <null> false false mmuid:1462b28e-0bab-436f-9654-013821506337 0 <null> true false 22
-PartsSupplier pg_catalog pg_attrdef Table <null> false false mmuid:71091853-c65e-46a9-9947-aa024f806e2d 0 <null> true false 25
-PartsSupplier pg_catalog pg_attribute Table <null> false false mmuid:fa463d98-365f-489a-a707-025193cb51eb 0 <null> true true 19
-PartsSupplier pg_catalog pg_class Table <null> false false mmuid:7e21f2e6-06e3-4bca-9b01-72ea47821560 0 <null> true true 18
-PartsSupplier pg_catalog pg_database Table <null> false false mmuid:492dd834-907f-429b-aa6e-958ad65204c6 0 <null> true false 26
-PartsSupplier pg_catalog pg_index Table <null> false false mmuid:22ac431d-e6e6-4eef-9d74-b31795424e97 0 <null> true true 21
-PartsSupplier pg_catalog pg_namespace Table <null> false false mmuid:6609866a-3d7b-4f4b-95fe-ebfac769d699 0 <null> true false 17
-PartsSupplier pg_catalog pg_proc Table <null> false false mmuid:da4b747e-7d87-403a-8309-2cdf1399031b 0 <null> true true 23
-PartsSupplier pg_catalog pg_trigger Table <null> false false mmuid:9569efdb-21b2-4b4f-a2db-e7406267b8ed 0 <null> true false 24
-PartsSupplier pg_catalog pg_type Table <null> false false mmuid:9462e3f8-cd3c-414f-a570-f6f33c40e36a 0 <null> true false 20
-PartsSupplier pg_catalog pg_user Table <null> false false mmuid:28d034eb-6f39-402f-b642-9c9560e57247 0 <null> true false 27
-Row Count : 28
+PartsSupplier SYS ProcedureParams Table <null> true false mmuuid:a56bd7fe-c87a-411c-8f5d-661975a25626 0 <null> true false 11
+PartsSupplier SYS Procedures Table <null> true false mmuuid:0bc132a5-9f8d-4a3c-9f5d-98156a98a962 0 <null> true false 12
+PartsSupplier SYS Properties Table <null> true false mmuuid:7a45e50a-d03f-4548-ba35-761651bbca85 0 <null> true false 13
+PartsSupplier SYS ReferenceKeyColumns Table <null> true false mmuuid:6a9653e8-a337-41b2-86fa-77b98f409a29 0 <null> true false 14
+PartsSupplier SYS Schemas Table <null> true false mmuuid:8648a554-b2ad-4e8e-84ca-2ec618b311a9 0 <null> true false 15
+PartsSupplier SYS Tables Table <null> true false mmuuid:8551b3bd-11cc-4049-9bcf-fe91a0eb7ba7 0 <null> true false 16
+PartsSupplier SYSADMIN VDBResources Table <null> true true mmuuid:1785804d-beaf-4831-9531-e59164fedd49 0 <null> false false 6
+PartsSupplier SYS VirtualDatabases Table <null> true false mmuuid:47297c72-d621-4f4e-af4e-74060ac5f489 0 <null> true false 17
+PartsSupplier pg_catalog pg_am Table <null> false false mmuid:1462b28e-0bab-436f-9654-013821506337 0 <null> true false 23
+PartsSupplier pg_catalog pg_attrdef Table <null> false false mmuid:71091853-c65e-46a9-9947-aa024f806e2d 0 <null> true false 26
+PartsSupplier pg_catalog pg_attribute Table <null> false false mmuid:fa463d98-365f-489a-a707-025193cb51eb 0 <null> true true 20
+PartsSupplier pg_catalog pg_class Table <null> false false mmuid:7e21f2e6-06e3-4bca-9b01-72ea47821560 0 <null> true true 19
+PartsSupplier pg_catalog pg_database Table <null> false false mmuid:492dd834-907f-429b-aa6e-958ad65204c6 0 <null> true false 27
+PartsSupplier pg_catalog pg_index Table <null> false false mmuid:22ac431d-e6e6-4eef-9d74-b31795424e97 0 <null> true true 22
+PartsSupplier pg_catalog pg_namespace Table <null> false false mmuid:6609866a-3d7b-4f4b-95fe-ebfac769d699 0 <null> true false 18
+PartsSupplier pg_catalog pg_proc Table <null> false false mmuid:da4b747e-7d87-403a-8309-2cdf1399031b 0 <null> true true 24
+PartsSupplier pg_catalog pg_trigger Table <null> false false mmuid:9569efdb-21b2-4b4f-a2db-e7406267b8ed 0 <null> true false 25
+PartsSupplier pg_catalog pg_type Table <null> false false mmuid:9462e3f8-cd3c-414f-a570-f6f33c40e36a 0 <null> true false 21
+PartsSupplier pg_catalog pg_user Table <null> false false mmuid:28d034eb-6f39-402f-b642-9c9560e57247 0 <null> true false 28
+Row Count : 29
getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
VDBName 12 PartsSupplier java.lang.String VDBName string SYS Tables 255 255 0 false true false true 1 false true true true
SchemaName 12 PartsSupplier java.lang.String SchemaName string SYS Tables 255 255 0 false true false true 1 false true true true
Copied: trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testVDBResources.expected (from rev 2599, branches/7.1.x/test-integration/common/src/test/resources/TestSystemVirtualModel/testVDBResources.expected)
===================================================================
--- trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testVDBResources.expected (rev 0)
+++ trunk/test-integration/common/src/test/resources/TestSystemVirtualModel/testVDBResources.expected 2010-09-24 18:51:07 UTC (rev 2603)
@@ -0,0 +1,26 @@
+string blob
+resourcePath contents
+/parts/partsmd/PartsSupplier.xmi Blob[9655]
+/ConfigurationInfo.def Blob[4830]
+/META-INF/MANIFEST.MF Blob[25]
+/MetaMatrix-VdbManifestModel.xmi Blob[2393]
+/runtime-inf/ANNOTATION.INDEX Blob[8212]
+/runtime-inf/COLUMNS.INDEX Blob[25021]
+/runtime-inf/DATATYPES.INDEX Blob[42378]
+/runtime-inf/DELETE_TRANSFORM.INDEX Blob[8212]
+/runtime-inf/FILES.INDEX Blob[8212]
+/runtime-inf/INSERT_TRANSFORM.INDEX Blob[8212]
+/runtime-inf/KEYS.INDEX Blob[25014]
+/runtime-inf/MAPPING_TRANSFORM.INDEX Blob[8212]
+/runtime-inf/MODELS.INDEX Blob[24855]
+/runtime-inf/PROCEDURES.INDEX Blob[8212]
+/runtime-inf/PROC_TRANSFORM.INDEX Blob[8212]
+/runtime-inf/PROPERTIES.INDEX Blob[8212]
+/runtime-inf/SELECT_TRANSFORM.INDEX Blob[8212]
+/runtime-inf/TABLES.INDEX Blob[24947]
+/runtime-inf/UPDATE_TRANSFORM.INDEX Blob[8212]
+/runtime-inf/VDBS.INDEX Blob[24924]
+Row Count : 20
+getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
+resourcePath 12 PartsSupplier java.lang.String resourcePath string SYSADMIN VDBResources 255 255 0 false true false true 1 false true true true
+contents 2004 PartsSupplier java.sql.Blob contents blob SYSADMIN VDBResources 2147483647 2147483647 0 false true false true 1 false true true true
Modified: trunk/test-integration/db/pom.xml
===================================================================
--- trunk/test-integration/db/pom.xml 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/test-integration/db/pom.xml 2010-09-24 18:51:07 UTC (rev 2603)
@@ -191,7 +191,6 @@
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
- <version>2.2-beta-2</version>
<configuration>
<descriptors>
<descriptor>src/assembly/binaries.xml</descriptor>
@@ -508,7 +507,6 @@
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
- <version>2.2-beta-2</version>
<configuration>
<descriptors>
<descriptor>src/assembly/binaries.xml</descriptor>
Modified: trunk/test-integration/db/src/test/java/org/teiid/test/testcases/CommonTransactionTests.java
===================================================================
--- trunk/test-integration/db/src/test/java/org/teiid/test/testcases/CommonTransactionTests.java 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/test-integration/db/src/test/java/org/teiid/test/testcases/CommonTransactionTests.java 2010-09-24 18:51:07 UTC (rev 2603)
@@ -594,7 +594,6 @@
* Note: This is producing the below error some times; however this is SQL Server issue.
* http://support.microsoft.com/?kbid=834849
*/
- @Ignore
@Test
public void testMultipleSourcePartialProcessingUsingLimit() throws Exception {
AbstractQueryTransactionTest userTxn = new AbstractQueryTransactionTest("testMultipleSourcePartialProcessingUsingLimit") {
@@ -616,7 +615,6 @@
* Note: This is producing the below error some times; however this is SQL Server issue.
* http://support.microsoft.com/?kbid=834849
*/
- @Ignore
@Test
public void testMultipleSourcePartialProcessingUsingMakedep() throws Exception {
AbstractQueryTransactionTest userTxn = new AbstractQueryTransactionTest("testMultipleSourcePartialProcessingUsingMakedep") {
@@ -629,8 +627,4 @@
// run test
getTransactionContainter().runTransaction(userTxn);
}
-
-
-
-
}
Modified: trunk/test-integration/pom.xml
===================================================================
--- trunk/test-integration/pom.xml 2010-09-24 18:27:53 UTC (rev 2602)
+++ trunk/test-integration/pom.xml 2010-09-24 18:51:07 UTC (rev 2603)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
- <artifactId>teiid</artifactId>
+ <artifactId>teiid-parent</artifactId>
<groupId>org.jboss.teiid</groupId>
<version>7.2.0.Alpha2-SNAPSHOT</version>
</parent>
14 years, 3 months
teiid SVN: r2602 - branches/7.1.x/engine/src/main/java/org/teiid/dqp/internal/process.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2010-09-24 14:27:53 -0400 (Fri, 24 Sep 2010)
New Revision: 2602
Modified:
branches/7.1.x/engine/src/main/java/org/teiid/dqp/internal/process/AuthorizationValidationVisitor.java
Log:
TEIID-1275: fixing the code to get model-id correctly from element symbols.
Modified: branches/7.1.x/engine/src/main/java/org/teiid/dqp/internal/process/AuthorizationValidationVisitor.java
===================================================================
--- branches/7.1.x/engine/src/main/java/org/teiid/dqp/internal/process/AuthorizationValidationVisitor.java 2010-09-24 18:27:41 UTC (rev 2601)
+++ branches/7.1.x/engine/src/main/java/org/teiid/dqp/internal/process/AuthorizationValidationVisitor.java 2010-09-24 18:27:53 UTC (rev 2602)
@@ -231,18 +231,22 @@
Object metadataID = null;
if(symbol instanceof ElementSymbol) {
metadataID = ((ElementSymbol)symbol).getMetadataID();
- GroupSymbol groupSymbol = ((ElementSymbol)symbol).getGroupSymbol();
- if (metadataID instanceof MultiSourceElement || metadataID instanceof TempMetadataID || groupSymbol == null || isSystemModel(groupSymbol.getMetadataID())) {
+ if (metadataID instanceof MultiSourceElement || metadataID instanceof TempMetadataID) {
continue;
}
} else if(symbol instanceof GroupSymbol) {
GroupSymbol group = (GroupSymbol)symbol;
metadataID = group.getMetadataID();
- if ((metadataID instanceof TempMetadataID && !group.isProcedure()) || isSystemModel(metadataID)) {
+ if (metadataID instanceof TempMetadataID && !group.isProcedure()) {
continue;
}
}
fullName = getMetadata().getFullName(metadataID);
+ Object modelId = getMetadata().getModelID(metadataID);
+ String modelName = getMetadata().getFullName(modelId);
+ if (CoreConstants.SYSTEM_MODEL.equals(modelName) || CoreConstants.ODBC_MODEL.equals(modelName)) {
+ continue;
+ }
nameToSymbolMap.put(fullName, symbol);
} catch(QueryMetadataException e) {
handleException(e);
@@ -267,14 +271,7 @@
inaccessibleSymbols);
}
}
-
}
-
- private boolean isSystemModel(Object groupMetadataID) throws QueryMetadataException, TeiidComponentException {
- Object modelId = getMetadata().getModelID(groupMetadataID);
- String modelName = getMetadata().getFullName(modelId);
- return (CoreConstants.SYSTEM_MODEL.equals(modelName) || CoreConstants.ODBC_MODEL.equals(modelName));
- }
/**
* Out of resources specified, return the subset for which the specified not have authorization to access.
14 years, 3 months
teiid SVN: r2601 - branches/7.1.x/engine/src/main/java/org/teiid/query/metadata.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2010-09-24 14:27:41 -0400 (Fri, 24 Sep 2010)
New Revision: 2601
Modified:
branches/7.1.x/engine/src/main/java/org/teiid/query/metadata/TransformationMetadata.java
Log:
TEIID-1275: fixing the code to get model-id correctly from element symbols.
Modified: branches/7.1.x/engine/src/main/java/org/teiid/query/metadata/TransformationMetadata.java
===================================================================
--- branches/7.1.x/engine/src/main/java/org/teiid/query/metadata/TransformationMetadata.java 2010-09-24 18:16:49 UTC (rev 2600)
+++ branches/7.1.x/engine/src/main/java/org/teiid/query/metadata/TransformationMetadata.java 2010-09-24 18:27:41 UTC (rev 2601)
@@ -220,7 +220,7 @@
if (parent == null) {
throw createInvalidRecordTypeException(groupOrElementID);
}
- parent = metadataRecord.getParent();
+ parent = parent.getParent();
if (parent instanceof Schema) {
return parent;
}
14 years, 3 months
teiid SVN: r2600 - in branches/7.1.x/engine/src: test/java/org/teiid/dqp/internal/process and 1 other directories.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2010-09-24 14:16:49 -0400 (Fri, 24 Sep 2010)
New Revision: 2600
Modified:
branches/7.1.x/engine/src/main/java/org/teiid/dqp/internal/process/AuthorizationValidationVisitor.java
branches/7.1.x/engine/src/test/java/org/teiid/dqp/internal/process/TestAuthorizationValidationVisitor.java
branches/7.1.x/engine/src/test/java/org/teiid/query/unittest/FakeMetadataFactory.java
Log:
TEIID-1275: fixing the code to get model-id correctly from element symbols.
Modified: branches/7.1.x/engine/src/main/java/org/teiid/dqp/internal/process/AuthorizationValidationVisitor.java
===================================================================
--- branches/7.1.x/engine/src/main/java/org/teiid/dqp/internal/process/AuthorizationValidationVisitor.java 2010-09-23 21:09:51 UTC (rev 2599)
+++ branches/7.1.x/engine/src/main/java/org/teiid/dqp/internal/process/AuthorizationValidationVisitor.java 2010-09-24 18:16:49 UTC (rev 2600)
@@ -231,22 +231,18 @@
Object metadataID = null;
if(symbol instanceof ElementSymbol) {
metadataID = ((ElementSymbol)symbol).getMetadataID();
- if (metadataID instanceof MultiSourceElement || metadataID instanceof TempMetadataID) {
+ GroupSymbol groupSymbol = ((ElementSymbol)symbol).getGroupSymbol();
+ if (metadataID instanceof MultiSourceElement || metadataID instanceof TempMetadataID || groupSymbol == null || isSystemModel(groupSymbol.getMetadataID())) {
continue;
}
} else if(symbol instanceof GroupSymbol) {
GroupSymbol group = (GroupSymbol)symbol;
metadataID = group.getMetadataID();
- if (metadataID instanceof TempMetadataID && !group.isProcedure()) {
+ if ((metadataID instanceof TempMetadataID && !group.isProcedure()) || isSystemModel(metadataID)) {
continue;
}
}
fullName = getMetadata().getFullName(metadataID);
- Object modelId = getMetadata().getModelID(metadataID);
- String modelName = getMetadata().getFullName(modelId);
- if (CoreConstants.SYSTEM_MODEL.equals(modelName) || CoreConstants.ODBC_MODEL.equals(modelName)) {
- continue;
- }
nameToSymbolMap.put(fullName, symbol);
} catch(QueryMetadataException e) {
handleException(e);
@@ -273,6 +269,12 @@
}
}
+
+ private boolean isSystemModel(Object groupMetadataID) throws QueryMetadataException, TeiidComponentException {
+ Object modelId = getMetadata().getModelID(groupMetadataID);
+ String modelName = getMetadata().getFullName(modelId);
+ return (CoreConstants.SYSTEM_MODEL.equals(modelName) || CoreConstants.ODBC_MODEL.equals(modelName));
+ }
/**
* Out of resources specified, return the subset for which the specified not have authorization to access.
Modified: branches/7.1.x/engine/src/test/java/org/teiid/dqp/internal/process/TestAuthorizationValidationVisitor.java
===================================================================
--- branches/7.1.x/engine/src/test/java/org/teiid/dqp/internal/process/TestAuthorizationValidationVisitor.java 2010-09-23 21:09:51 UTC (rev 2599)
+++ branches/7.1.x/engine/src/test/java/org/teiid/dqp/internal/process/TestAuthorizationValidationVisitor.java 2010-09-24 18:16:49 UTC (rev 2600)
@@ -296,4 +296,7 @@
}
}
+ @Test public void testSystemTablesAccessible() throws Exception {
+ helpTest(exampleAuthSvc2(), "select * from Sys.tables", FakeMetadataFactory.example1Cached(), new String[] {}, FakeMetadataFactory.example1VDB()); //$NON-NLS-1$ //$NON-NLS-2$
+ }
}
Modified: branches/7.1.x/engine/src/test/java/org/teiid/query/unittest/FakeMetadataFactory.java
===================================================================
--- branches/7.1.x/engine/src/test/java/org/teiid/query/unittest/FakeMetadataFactory.java 2010-09-23 21:09:51 UTC (rev 2599)
+++ branches/7.1.x/engine/src/test/java/org/teiid/query/unittest/FakeMetadataFactory.java 2010-09-24 18:16:49 UTC (rev 2600)
@@ -178,6 +178,7 @@
FakeMetadataObject vm1 = createVirtualModel("vm1"); //$NON-NLS-1$
FakeMetadataObject vm2 = createVirtualModel("vm2"); //$NON-NLS-1$
FakeMetadataObject tm1 = createVirtualModel("tm1"); //$NON-NLS-1$
+ FakeMetadataObject sys = createPhysicalModel("SYS"); //$NON-NLS-1$
// Create physical groups
FakeMetadataObject pm1g1 = createPhysicalGroup("pm1.g1", pm1); //$NON-NLS-1$
@@ -198,6 +199,7 @@
FakeMetadataObject pm5g2 = createPhysicalGroup("pm5.g2", pm5); //$NON-NLS-1$
FakeMetadataObject pm5g3 = createPhysicalGroup("pm5.g3", pm5); //$NON-NLS-1$
FakeMetadataObject pm6g1 = createPhysicalGroup("pm6.g1", pm6); //$NON-NLS-1$
+ FakeMetadataObject sysTables = createPhysicalGroup("SYS.Tables", sys); //$NON-NLS-1$
// Create physical elements
@@ -258,6 +260,9 @@
List pm6g1e = createElements(pm6g1,
new String[] { "e1", "e2" }, //$NON-NLS-1$ //$NON-NLS-2$
new String[] { DataTypeManager.DefaultDataTypes.STRING, DataTypeManager.DefaultDataTypes.INTEGER });
+ List sysTablese = createElements(sysTables,
+ new String[] { "e1", "e2" }, //$NON-NLS-1$ //$NON-NLS-2$
+ new String[] { DataTypeManager.DefaultDataTypes.STRING, DataTypeManager.DefaultDataTypes.INTEGER });
// Create access patterns - pm4
@@ -1237,6 +1242,10 @@
store.addObject(pm6);
store.addObject(pm6g1);
store.addObjects(pm6g1e);
+
+ store.addObject(sys);
+ store.addObject(sysTables);
+ store.addObjects(sysTablese);
store.addObject(tm1);
store.addObject(tm1g1);
14 years, 3 months
teiid SVN: r2599 - in branches/7.1.x/engine/src/main: resources/org/teiid/query and 1 other directory.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2010-09-23 17:09:51 -0400 (Thu, 23 Sep 2010)
New Revision: 2599
Modified:
branches/7.1.x/engine/src/main/java/org/teiid/dqp/internal/datamgr/ConnectorManager.java
branches/7.1.x/engine/src/main/resources/org/teiid/query/i18n.properties
Log:
TEIID-1274: Throw exception when the connection factory defined is not found. This will report error correctly when user fat fingers the cf name
Modified: branches/7.1.x/engine/src/main/java/org/teiid/dqp/internal/datamgr/ConnectorManager.java
===================================================================
--- branches/7.1.x/engine/src/main/java/org/teiid/dqp/internal/datamgr/ConnectorManager.java 2010-09-22 21:58:32 UTC (rev 2598)
+++ branches/7.1.x/engine/src/main/java/org/teiid/dqp/internal/datamgr/ConnectorManager.java 2010-09-23 21:09:51 UTC (rev 2599)
@@ -88,7 +88,14 @@
if(ef != null) {
if (ef.isSourceRequired()) {
- Object conn = getConnectionFactory();
+
+ Object conn = null;
+ try {
+ conn = getConnectionFactory();
+ } catch (TranslatorException e) {
+ // treat this as connection not found.
+ }
+
if (conn == null) {
sb.append(QueryPlugin.Util.getString("datasource_not_found", this.connectionName)); //$NON-NLS-1$
}
@@ -232,7 +239,7 @@
* Get the ConnectionFactory object required by this manager
* @return
*/
- protected Object getConnectionFactory() {
+ protected Object getConnectionFactory() throws TranslatorException {
if (this.connectionName != null) {
String jndiName = this.connectionName;
if (!this.connectionName.startsWith(JAVA_CONTEXT)) {
@@ -249,7 +256,8 @@
}
}
} catch (NamingException e) {
- }
+ throw new TranslatorException(e, QueryPlugin.Util.getString("connection_factory_not_found", this.connectionName)); //$NON-NLS-1$
+ }
}
return null;
}
Modified: branches/7.1.x/engine/src/main/resources/org/teiid/query/i18n.properties
===================================================================
--- branches/7.1.x/engine/src/main/resources/org/teiid/query/i18n.properties 2010-09-22 21:58:32 UTC (rev 2598)
+++ branches/7.1.x/engine/src/main/resources/org/teiid/query/i18n.properties 2010-09-23 21:09:51 UTC (rev 2599)
@@ -859,4 +859,5 @@
RequestWorkItem.cache_nondeterministic=Caching command '{0}'' at a session level, but less deterministic functions were evaluated.
not_found_cache=Results not found in cache
-failed_to_unwrap_connection=Failed to unwrap the source connection.
\ No newline at end of file
+failed_to_unwrap_connection=Failed to unwrap the source connection.
+connection_factory_not_found=Failed to the Connection Factory with JNDI name {0}. Please check the name for spelling or deploy the Connection Factory with specified name.
\ No newline at end of file
14 years, 3 months
teiid SVN: r2598 - in branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape: functions and 1 other directory.
by teiid-commits@lists.jboss.org
Author: vhalbert(a)redhat.com
Date: 2010-09-22 17:58:32 -0400 (Wed, 22 Sep 2010)
New Revision: 2598
Added:
branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/
branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/Cast.java
branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/IsChildNode.java
branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/IsSameNode.java
branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/Name.java
branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/Path.java
Log:
TEIID-1106 adding functions for the UDFs
Added: branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/Cast.java
===================================================================
--- branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/Cast.java (rev 0)
+++ branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/Cast.java 2010-09-22 21:58:32 UTC (rev 2598)
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.translator.jdbc.modeshape.functions;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.teiid.language.Expression;
+import org.teiid.language.Function;
+import org.teiid.translator.jdbc.FunctionModifier;
+
+/**
+ * Function for Cast
+ * @since 7.1
+ */
+public class Cast {
+
+ public Object cast(String literal, String asType) {
+ return "";
+ }
+
+}
Property changes on: branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/Cast.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/IsChildNode.java
===================================================================
--- branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/IsChildNode.java (rev 0)
+++ branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/IsChildNode.java 2010-09-22 21:58:32 UTC (rev 2598)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.translator.jdbc.modeshape.functions;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.teiid.language.Expression;
+import org.teiid.language.Function;
+import org.teiid.translator.jdbc.FunctionModifier;
+
+
+/**
+ * Function for IsChildNode
+ * @since 7.1
+ */
+public class IsChildNode {
+
+ public boolean isChildNode(String childSelectorName, String parentSelectorName) {
+ return false;
+ }
+
+}
Property changes on: branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/IsChildNode.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/IsSameNode.java
===================================================================
--- branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/IsSameNode.java (rev 0)
+++ branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/IsSameNode.java 2010-09-22 21:58:32 UTC (rev 2598)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.translator.jdbc.modeshape.functions;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.teiid.language.Expression;
+import org.teiid.language.Function;
+import org.teiid.translator.jdbc.FunctionModifier;
+
+
+/**
+ * Function for IsSameNode
+ * @since 7.1
+ */
+public class IsSameNode {
+
+ public boolean isSameNode(String selectorName, String joinSelectorName) {
+ return false;
+ }
+
+ public boolean isSameNode(String selectorName, String joinSelectorName, String selectorPathName) {
+ return false;
+ }
+
+}
Property changes on: branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/IsSameNode.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/Name.java
===================================================================
--- branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/Name.java (rev 0)
+++ branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/Name.java 2010-09-22 21:58:32 UTC (rev 2598)
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.translator.jdbc.modeshape.functions;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.teiid.language.Expression;
+import org.teiid.language.Function;
+import org.teiid.translator.jdbc.FunctionModifier;
+
+/**
+ * Function for Name
+ * @since 7.1
+ */
+public class Name {
+
+ public String name(String name) {
+ return "";
+ }
+
+}
Property changes on: branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/Name.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/Path.java
===================================================================
--- branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/Path.java (rev 0)
+++ branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/Path.java 2010-09-22 21:58:32 UTC (rev 2598)
@@ -0,0 +1,48 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.translator.jdbc.modeshape.functions;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.teiid.language.Expression;
+import org.teiid.language.Function;
+import org.teiid.translator.jdbc.FunctionModifier;
+
+
+/**
+ * Function for Path
+ * @since 7.1
+ */
+public class Path {
+
+
+ public String path() {
+ return "";
+ }
+
+ public String path(String name) {
+ return "";
+ }
+
+}
Property changes on: branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/functions/Path.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
14 years, 3 months
teiid SVN: r2597 - in branches/7.1.x: engine/src/main/java/org/teiid/query/optimizer/relational/plantree and 2 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2010-09-22 17:14:19 -0400 (Wed, 22 Sep 2010)
New Revision: 2597
Modified:
branches/7.1.x/documentation/developer-guide/src/main/docbook/en-US/content/translator-api.xml
branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/plantree/PlanNode.java
branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/CriteriaCapabilityValidatorVisitor.java
branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/JoinRegion.java
branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/NewCalculateCostUtil.java
branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleImplementJoinStrategy.java
branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePlanJoins.java
branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePushAggregates.java
branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePushSelectCriteria.java
branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleRaiseAccess.java
branches/7.1.x/engine/src/test/java/org/teiid/query/optimizer/relational/rules/TestCalculateCostUtil.java
branches/7.1.x/engine/src/test/java/org/teiid/query/optimizer/relational/rules/TestCriteriaCapabilityValidatorVisitor.java
branches/7.1.x/engine/src/test/java/org/teiid/query/optimizer/relational/rules/TestRuleChooseDependent.java
Log:
TEIID-1271 adding some logging for common pushdown decisions. there are still plenty more to add. TEIID-1272 making join ordering decisions use a better heuristic when 1 side is unknown
Modified: branches/7.1.x/documentation/developer-guide/src/main/docbook/en-US/content/translator-api.xml
===================================================================
--- branches/7.1.x/documentation/developer-guide/src/main/docbook/en-US/content/translator-api.xml 2010-09-22 21:11:32 UTC (rev 2596)
+++ branches/7.1.x/documentation/developer-guide/src/main/docbook/en-US/content/translator-api.xml 2010-09-22 21:14:19 UTC (rev 2597)
@@ -680,10 +680,10 @@
<title>Translator Capabilities</title>
<para>The <code>ExecutionFactory</code> class defines all the methods that describe the capabilities of a Translator.
These are used by the Connector Manager to determine what kinds of commands the translator is
- capable of executing. A base <code>ExecutionFactory</code> class implements all the basic capabilities, which says
- your translator does not support any cpabilities. Your extended
+ capable of executing. A base <code>ExecutionFactory</code> class implements all the basic capabilities methods, which says
+ your translator does not support any capabilities. Your extended
<code>ExecutionFactory</code> class must override the the necessary methods to specify which
- capabilities your translator supports. </para>
+ capabilities your translator supports. You should consult the debug log of query planning (set showplan debug) to see if desired pushdown requires additional capabilities.</para>
<section>
<title>Capability Scope</title>
<para>
Modified: branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/plantree/PlanNode.java
===================================================================
--- branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/plantree/PlanNode.java 2010-09-22 21:11:32 UTC (rev 2596)
+++ branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/plantree/PlanNode.java 2010-09-22 21:14:19 UTC (rev 2597)
@@ -378,5 +378,13 @@
}
return ValueIteratorProviderCollectorVisitor.getValueIteratorProviders(toSearch);
}
+
+ public float getCardinality() {
+ Float cardinality = (Float) this.getProperty(NodeConstants.Info.EST_CARDINALITY);
+ if (cardinality == null) {
+ return -1f;
+ }
+ return cardinality;
+ }
}
Modified: branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/CriteriaCapabilityValidatorVisitor.java
===================================================================
--- branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/CriteriaCapabilityValidatorVisitor.java 2010-09-22 21:11:32 UTC (rev 2596)
+++ branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/CriteriaCapabilityValidatorVisitor.java 2010-09-22 21:14:19 UTC (rev 2597)
@@ -28,6 +28,7 @@
import org.teiid.api.exception.query.QueryMetadataException;
import org.teiid.core.TeiidComponentException;
import org.teiid.query.QueryPlugin;
+import org.teiid.query.analysis.AnalysisRecord;
import org.teiid.query.function.metadata.FunctionMethod;
import org.teiid.query.metadata.QueryMetadataInterface;
import org.teiid.query.metadata.SupportConstants;
@@ -83,6 +84,7 @@
private Object modelID;
private QueryMetadataInterface metadata;
private CapabilitiesFinder capFinder;
+ private AnalysisRecord analysisRecord;
// Retrieved during initialization and cached
private SourceCapabilities caps;
@@ -105,48 +107,48 @@
@Override
public void visit(XMLAttributes obj) {
- markInvalid();
+ markInvalid(obj, "Pushdown of XMLAttributes not allowed"); //$NON-NLS-1$
}
@Override
public void visit(XMLNamespaces obj) {
- markInvalid();
+ markInvalid(obj, "Pushdown of XMLNamespaces not allowed"); //$NON-NLS-1$
}
@Override
public void visit(XMLForest obj) {
- markInvalid();
+ markInvalid(obj, "Pushdown of XMLForest not allowed"); //$NON-NLS-1$
}
@Override
public void visit(XMLElement obj) {
- markInvalid();
+ markInvalid(obj, "Pushdown of XMLElement not allowed"); //$NON-NLS-1$
}
@Override
public void visit(XMLSerialize obj) {
- markInvalid();
+ markInvalid(obj, "Pushdown of XMLSerialize not allowed"); //$NON-NLS-1$
}
@Override
public void visit(XMLParse obj) {
- markInvalid();
+ markInvalid(obj, "Pushdown of XMLParse not allowed"); //$NON-NLS-1$
}
@Override
public void visit(XMLQuery obj) {
- markInvalid();
+ markInvalid(obj, "Pushdown of XMLQuery not allowed"); //$NON-NLS-1$
}
@Override
public void visit(QueryString obj) {
- markInvalid();
+ markInvalid(obj, "Pushdown of QueryString not allowed"); //$NON-NLS-1$
}
public void visit(AggregateSymbol obj) {
try {
if(! CapabilitiesUtil.supportsAggregateFunction(modelID, obj, metadata, capFinder)) {
- markInvalid();
+ markInvalid(obj, "Aggregate function pushdown not supported by source"); //$NON-NLS-1$
}
} catch(QueryMetadataException e) {
handleException(new TeiidComponentException(e));
@@ -157,7 +159,7 @@
public void visit(CaseExpression obj) {
if(! this.caps.supportsCapability(Capability.QUERY_CASE)) {
- markInvalid();
+ markInvalid(obj, "CaseExpression pushdown not supported by source"); //$NON-NLS-1$
}
}
@@ -186,10 +188,12 @@
// Check if compares are allowed
if(! this.caps.supportsCapability(operatorCap)) {
- markInvalid();
+ markInvalid(obj, "ordered CompareCriteria not supported by source"); //$NON-NLS-1$
+ return;
}
if (negated && !this.caps.supportsCapability(Capability.CRITERIA_NOT)) {
- markInvalid();
+ markInvalid(obj, "Negation is not supported by source"); //$NON-NLS-1$
+ return;
}
// Check capabilities of the elements
@@ -206,12 +210,8 @@
int operator = crit.getOperator();
// Verify capabilities are supported
- if(operator == CompoundCriteria.OR) {
- // Check if OR is allowed
- if(! this.caps.supportsCapability(Capability.CRITERIA_OR)) {
- markInvalid();
- return;
- }
+ if(operator == CompoundCriteria.OR && !this.caps.supportsCapability(Capability.CRITERIA_OR)) {
+ markInvalid(crit, "OR criteria not supported by source"); //$NON-NLS-1$
}
}
@@ -221,9 +221,13 @@
if (EvaluatableVisitor.willBecomeConstant(obj, true)) {
return;
}
- if(obj.getFunctionDescriptor().getPushdown() == FunctionMethod.CANNOT_PUSHDOWN || ! CapabilitiesUtil.supportsScalarFunction(modelID, obj, metadata, capFinder)) {
- markInvalid();
+ if(obj.getFunctionDescriptor().getPushdown() == FunctionMethod.CANNOT_PUSHDOWN) {
+ markInvalid(obj, "Function metadata indicates it cannot be pusheddown."); //$NON-NLS-1$
+ return;
}
+ if (! CapabilitiesUtil.supportsScalarFunction(modelID, obj, metadata, capFinder)) {
+ markInvalid(obj, obj.isImplicit()?"":"(implicit) convert" + " Function not supported by source"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
} catch(QueryMetadataException e) {
handleException(new TeiidComponentException(e));
} catch(TeiidComponentException e) {
@@ -234,12 +238,12 @@
public void visit(IsNullCriteria obj) {
// Check if compares are allowed
if(! this.caps.supportsCapability(Capability.CRITERIA_ISNULL)) {
- markInvalid();
+ markInvalid(obj, "IsNull not supported by source"); //$NON-NLS-1$
return;
}
if (obj.isNegated() && !this.caps.supportsCapability(Capability.CRITERIA_NOT)) {
- markInvalid();
+ markInvalid(obj, "Negation is not supported by source"); //$NON-NLS-1$
return;
}
}
@@ -247,21 +251,21 @@
public void visit(MatchCriteria obj) {
// Check if compares are allowed
if(! this.caps.supportsCapability(Capability.CRITERIA_LIKE)) {
- markInvalid();
+ markInvalid(obj, "Like is not supported by source"); //$NON-NLS-1$
return;
}
// Check ESCAPE char if necessary
if(obj.getEscapeChar() != MatchCriteria.NULL_ESCAPE_CHAR) {
if(! this.caps.supportsCapability(Capability.CRITERIA_LIKE_ESCAPE)) {
- markInvalid();
+ markInvalid(obj, "Like escape is not supported by source"); //$NON-NLS-1$
return;
}
}
//check NOT
if(obj.isNegated() && ! this.caps.supportsCapability(Capability.CRITERIA_NOT)) {
- markInvalid();
+ markInvalid(obj, "Negation is not supported by source"); //$NON-NLS-1$
return;
}
@@ -278,18 +282,14 @@
public void visit(NotCriteria obj) {
// Check if compares are allowed
if(! this.caps.supportsCapability(Capability.CRITERIA_NOT)) {
- markInvalid();
+ markInvalid(obj, "Negation is not supported by source"); //$NON-NLS-1$
return;
}
}
public void visit(SearchedCaseExpression obj) {
- if (this.caps == null) {
- return;
- }
-
if(! this.caps.supportsCapability(Capability.QUERY_SEARCHED_CASE)) {
- markInvalid();
+ markInvalid(obj, "SearchedCase is not supported by source"); //$NON-NLS-1$
}
}
@@ -299,7 +299,7 @@
int maxSize = CapabilitiesUtil.getMaxInCriteriaSize(modelID, metadata, capFinder);
if (maxSize > 0 && crit.getValues().size() > maxSize) {
- markInvalid();
+ markInvalid(crit, "SetCriteria size exceeds maximum for source"); //$NON-NLS-1$
return;
}
} catch(QueryMetadataException e) {
@@ -315,13 +315,13 @@
public void visit(ExistsCriteria crit) {
// Check if exists criteria are allowed
if(! this.caps.supportsCapability(Capability.CRITERIA_EXISTS)) {
- markInvalid();
+ markInvalid(crit, "Exists is not supported by source"); //$NON-NLS-1$
return;
}
try {
- if (validateSubqueryPushdown(crit, modelID, metadata, capFinder) == null) {
- markInvalid();
+ if (validateSubqueryPushdown(crit, modelID, metadata, capFinder, analysisRecord) == null) {
+ markInvalid(crit.getCommand(), "Subquery cannot be pushed down"); //$NON-NLS-1$
}
} catch (TeiidComponentException e) {
handleException(e);
@@ -346,7 +346,7 @@
break;
}
if(! this.caps.supportsCapability(capability)) {
- markInvalid();
+ markInvalid(crit, "SubqueryCompare not supported by source"); //$NON-NLS-1$
return;
}
@@ -354,8 +354,8 @@
// Check capabilities of the elements
try {
- if (validateSubqueryPushdown(crit, modelID, metadata, capFinder) == null) {
- markInvalid();
+ if (validateSubqueryPushdown(crit, modelID, metadata, capFinder, analysisRecord) == null) {
+ markInvalid(crit.getCommand(), "Subquery cannot be pushed down"); //$NON-NLS-1$
}
} catch(QueryMetadataException e) {
handleException(new TeiidComponentException(e));
@@ -368,11 +368,12 @@
public void visit(ScalarSubquery obj) {
try {
if(!this.caps.supportsCapability(Capability.QUERY_SUBQUERIES_SCALAR)
- || validateSubqueryPushdown(obj, modelID, metadata, capFinder) == null) {
+ || validateSubqueryPushdown(obj, modelID, metadata, capFinder, analysisRecord) == null) {
if (obj.getCommand().getCorrelatedReferences() == null) {
obj.setShouldEvaluate(true);
} else {
- markInvalid();
+ markInvalid(obj.getCommand(), !this.caps.supportsCapability(Capability.QUERY_SUBQUERIES_SCALAR)?
+ "Correlated ScalarSubquery is not supported":"Subquery cannot be pushed down"); //$NON-NLS-1$ //$NON-NLS-2$
}
}
} catch(QueryMetadataException e) {
@@ -387,12 +388,12 @@
try {
// Check if compares with subqueries are allowed
if(! this.caps.supportsCapability(Capability.CRITERIA_IN_SUBQUERY)) {
- markInvalid();
+ markInvalid(crit, "SubqueryIn is not supported by source"); //$NON-NLS-1$
return;
}
- if (validateSubqueryPushdown(crit, modelID, metadata, capFinder) == null) {
- markInvalid();
+ if (validateSubqueryPushdown(crit, modelID, metadata, capFinder, analysisRecord) == null) {
+ markInvalid(crit.getCommand(), "Subquery cannot be pushed down"); //$NON-NLS-1$
}
} catch(QueryMetadataException e) {
handleException(new TeiidComponentException(e));
@@ -405,12 +406,12 @@
try {
// Check if compares are allowed
if(! this.caps.supportsCapability(Capability.CRITERIA_IN)) {
- markInvalid();
+ markInvalid(crit, "In is not supported by source"); //$NON-NLS-1$
return;
}
if (crit.isNegated() && !this.caps.supportsCapability(Capability.CRITERIA_NOT)) {
- markInvalid();
+ markInvalid(crit, "Negation is not supported by source"); //$NON-NLS-1$
return;
}
// Check capabilities of the elements
@@ -431,7 +432,7 @@
private void checkElementsAreSearchable(LanguageObject crit, int searchableType)
throws QueryMetadataException, TeiidComponentException {
if (!CapabilitiesUtil.checkElementsAreSearchable(Arrays.asList(crit), metadata, searchableType)) {
- markInvalid();
+ markInvalid(crit, "not all source columns support search type"); //$NON-NLS-1$
}
}
@@ -445,7 +446,7 @@
* @return
* @throws TeiidComponentException
*/
- static Object validateSubqueryPushdown(SubqueryContainer subqueryContainer, Object critNodeModelID, QueryMetadataInterface metadata, CapabilitiesFinder capFinder) throws TeiidComponentException {
+ static Object validateSubqueryPushdown(SubqueryContainer subqueryContainer, Object critNodeModelID, QueryMetadataInterface metadata, CapabilitiesFinder capFinder, AnalysisRecord analysisRecord) throws TeiidComponentException {
ProcessorPlan plan = subqueryContainer.getCommand().getProcessorPlan();
if (plan != null) {
if(!(plan instanceof RelationalPlan)) {
@@ -497,7 +498,7 @@
}
//TODO: this check sees as correlated references as coming from the containing scope
//but this is only an issue with deeply nested subqueries
- if (!CriteriaCapabilityValidatorVisitor.canPushLanguageObject(subqueryContainer.getCommand(), critNodeModelID, metadata, capFinder)) {
+ if (!CriteriaCapabilityValidatorVisitor.canPushLanguageObject(subqueryContainer.getCommand(), critNodeModelID, metadata, capFinder, analysisRecord )) {
return null;
}
}
@@ -519,16 +520,19 @@
return this.exception;
}
- private void markInvalid() {
+ private void markInvalid(LanguageObject object, String reason) {
this.valid = false;
setAbort(true);
+ if (analysisRecord != null && analysisRecord.recordDebug()) {
+ analysisRecord.println(reason + " " + object); //$NON-NLS-1$
+ }
}
public boolean isValid() {
return this.valid;
}
- public static boolean canPushLanguageObject(LanguageObject obj, Object modelID, QueryMetadataInterface metadata, CapabilitiesFinder capFinder) throws QueryMetadataException, TeiidComponentException {
+ public static boolean canPushLanguageObject(LanguageObject obj, Object modelID, QueryMetadataInterface metadata, CapabilitiesFinder capFinder, AnalysisRecord analysisRecord) throws QueryMetadataException, TeiidComponentException {
if(obj == null) {
return true;
}
Modified: branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/JoinRegion.java
===================================================================
--- branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/JoinRegion.java 2010-09-22 21:11:32 UTC (rev 2596)
+++ branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/JoinRegion.java 2010-09-22 21:14:19 UTC (rev 2597)
@@ -42,6 +42,7 @@
import org.teiid.query.optimizer.relational.plantree.PlanNode;
import org.teiid.query.resolver.util.AccessPattern;
import org.teiid.query.sql.lang.CompareCriteria;
+import org.teiid.query.sql.lang.CompoundCriteria;
import org.teiid.query.sql.lang.Criteria;
import org.teiid.query.sql.symbol.ElementSymbol;
import org.teiid.query.sql.symbol.Expression;
@@ -233,8 +234,10 @@
* @param joinOrder
* @param metadata
* @return
+ * @throws TeiidComponentException
+ * @throws QueryMetadataException
*/
- public double scoreRegion(Object[] joinOrder, QueryMetadataInterface metadata) {
+ public double scoreRegion(Object[] joinOrder, QueryMetadataInterface metadata) throws QueryMetadataException, TeiidComponentException {
List<Map.Entry<PlanNode, PlanNode>> joinSourceEntries = new ArrayList<Map.Entry<PlanNode, PlanNode>>(joinSourceNodes.entrySet());
double totalIntermediatCost = 0;
double cost = 1;
@@ -263,17 +266,35 @@
float sourceCost = ((Float)joinSourceRoot.getProperty(NodeConstants.Info.EST_CARDINALITY)).floatValue();
- if (sourceCost == NewCalculateCostUtil.UNKNOWN_VALUE) {
- sourceCost = UNKNOWN_TUPLE_EST;
+ List<PlanNode> applicableCriteria = null;
+
+ if (!criteria.isEmpty() && i > 0) {
+ applicableCriteria = getJoinCriteriaForGroups(groups, criteria);
+ }
+
+ if (sourceCost == NewCalculateCostUtil.UNKNOWN_VALUE) {
+ sourceCost = UNKNOWN_TUPLE_EST;
+ if (applicableCriteria != null && !applicableCriteria.isEmpty()) {
+ CompoundCriteria cc = new CompoundCriteria();
+ for (PlanNode planNode : applicableCriteria) {
+ cc.addCriteria((Criteria) planNode.getProperty(NodeConstants.Info.SELECT_CRITERIA));
+ }
+ sourceCost = (float)cost;
+ criteria.removeAll(applicableCriteria);
+ applicableCriteria = null;
+ if (NewCalculateCostUtil.usesKey(cc, metadata)) {
+ sourceCost = Math.min(UNKNOWN_TUPLE_EST, sourceCost * Math.min(NewCalculateCostUtil.UNKNOWN_JOIN_SCALING, sourceCost));
+ } else {
+ sourceCost = Math.min(UNKNOWN_TUPLE_EST, sourceCost * Math.min(NewCalculateCostUtil.UNKNOWN_JOIN_SCALING * 2, sourceCost));
+ }
+ }
} else if (Double.isInfinite(sourceCost) || Double.isNaN(sourceCost)) {
- sourceCost = UNKNOWN_TUPLE_EST * 10;
+ return Double.MAX_VALUE;
}
-
+
cost *= sourceCost;
- if (!criteria.isEmpty() && i > 0) {
- List<PlanNode> applicableCriteria = getJoinCriteriaForGroups(groups, criteria);
-
+ if (applicableCriteria != null) {
for (PlanNode criteriaNode : applicableCriteria) {
float filter = ((Float)criteriaNode.getProperty(NodeConstants.Info.EST_SELECTIVITY)).floatValue();
@@ -282,7 +303,6 @@
criteria.removeAll(applicableCriteria);
}
-
totalIntermediatCost += cost;
}
Modified: branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/NewCalculateCostUtil.java
===================================================================
--- branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/NewCalculateCostUtil.java 2010-09-22 21:11:32 UTC (rev 2596)
+++ branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/NewCalculateCostUtil.java 2010-09-22 21:14:19 UTC (rev 2597)
@@ -76,7 +76,8 @@
*/
public class NewCalculateCostUtil {
- public static final float UNKNOWN_VALUE = -1;
+ public static final int UNKNOWN_JOIN_SCALING = 20;
+ public static final float UNKNOWN_VALUE = -1;
// the following variables are used to hold cost estimates (roughly in milliseconds)
private final static float compareTime = .05f; //TODO: a better estimate would be based upon the number of conjuncts
@@ -181,13 +182,13 @@
case NodeConstants.Types.TUPLE_LIMIT:
{
PlanNode child = node.getFirstChild();
- Float childCost = (Float)child.getProperty(NodeConstants.Info.EST_CARDINALITY);
+ float childCost = child.getCardinality();
Expression offset = (Expression)node.getProperty(NodeConstants.Info.OFFSET_TUPLE_COUNT);
Float cost = childCost;
- if (childCost.floatValue() != UNKNOWN_VALUE && offset instanceof Constant) {
- float offsetCost = childCost.floatValue() - ((Number)((Constant)offset).getValue()).floatValue();
+ if (childCost != UNKNOWN_VALUE && offset instanceof Constant) {
+ float offsetCost = childCost - ((Number)((Constant)offset).getValue()).floatValue();
cost = new Float((offsetCost < 0) ? 0 : offsetCost);
}
@@ -277,39 +278,43 @@
private static void estimateJoinNodeCost(PlanNode node, QueryMetadataInterface metadata)
throws QueryMetadataException, TeiidComponentException {
- Iterator children = node.getChildren().iterator();
- PlanNode child1 = (PlanNode)children.next();
- Float childCost1 = (Float)child1.getProperty(NodeConstants.Info.EST_CARDINALITY);
- PlanNode child2 = (PlanNode)children.next();
- Float childCost2 = (Float)child2.getProperty(NodeConstants.Info.EST_CARDINALITY);
- if (childCost1 != null && childCost2 != null && childCost1.floatValue() != UNKNOWN_VALUE && childCost2.floatValue() != UNKNOWN_VALUE){
+ Iterator<PlanNode> children = node.getChildren().iterator();
+ PlanNode child1 = children.next();
+ float childCost1 = child1.getCardinality();
+ PlanNode child2 = children.next();
+ float childCost2 = child2.getCardinality();
+
+ if (childCost1 == UNKNOWN_VALUE || childCost2 == UNKNOWN_VALUE) {
+ setCardinalityEstimate(node, null);
+ return;
+ }
- JoinType joinType = (JoinType)node.getProperty(NodeConstants.Info.JOIN_TYPE);
- List joinCriteria = (List) node.getProperty(NodeConstants.Info.JOIN_CRITERIA);
-
- float baseCost = childCost1.floatValue() * childCost2.floatValue();
- if (joinCriteria != null && !joinCriteria.isEmpty()) {
- Criteria crit = Criteria.combineCriteria(joinCriteria);
- baseCost = recursiveEstimateCostOfCriteria(baseCost, node, crit, metadata);
- }
-
- Float cost = null;
- if (JoinType.JOIN_CROSS.equals(joinType)){
- cost = new Float(baseCost);
- } else if (JoinType.JOIN_FULL_OUTER.equals(joinType)) {
- cost = new Float(Math.max((childCost1.floatValue()+childCost2.floatValue()),baseCost));
- } else if (JoinType.JOIN_LEFT_OUTER.equals(joinType)) {
- cost = new Float(Math.max(childCost1.floatValue(),baseCost));
- } else if (JoinType.JOIN_RIGHT_OUTER.equals(joinType)) {
- cost = new Float(Math.max(childCost2.floatValue(),baseCost));
- } else if (JoinType.JOIN_INNER.equals(joinType)) {
- cost = new Float(baseCost);
- }
-
- setCardinalityEstimate(node, cost);
- } else {
- setCardinalityEstimate(node, null);
+ JoinType joinType = (JoinType)node.getProperty(NodeConstants.Info.JOIN_TYPE);
+ List joinCriteria = (List) node.getProperty(NodeConstants.Info.JOIN_CRITERIA);
+
+ float baseCost = childCost1 * childCost2;
+
+ if (joinCriteria != null && !joinCriteria.isEmpty()) {
+ Criteria crit = Criteria.combineCriteria(joinCriteria);
+ //TODO: we may be able to get a fairly accurate join estimate if the
+ //unknown side is being joined with a key
+ baseCost = recursiveEstimateCostOfCriteria(baseCost, node, crit, metadata);
}
+
+ Float cost = null;
+ if (JoinType.JOIN_CROSS.equals(joinType)){
+ cost = new Float(baseCost);
+ } else if (JoinType.JOIN_FULL_OUTER.equals(joinType)) {
+ cost = new Float(Math.max((childCost1+childCost2),baseCost));
+ } else if (JoinType.JOIN_LEFT_OUTER.equals(joinType)) {
+ cost = new Float(Math.max(childCost1,baseCost));
+ } else if (JoinType.JOIN_RIGHT_OUTER.equals(joinType)) {
+ cost = new Float(Math.max(childCost2,baseCost));
+ } else if (JoinType.JOIN_INNER.equals(joinType)) {
+ cost = new Float(baseCost);
+ }
+
+ setCardinalityEstimate(node, cost);
}
/**
@@ -321,11 +326,7 @@
throws QueryMetadataException, TeiidComponentException {
PlanNode child = node.getFirstChild();
- Float childCostFloat = (Float)child.getProperty(NodeConstants.Info.EST_CARDINALITY);
- float childCost = UNKNOWN_VALUE;
- if (childCostFloat != null){
- childCost = childCostFloat.floatValue();
- }
+ float childCost = child.getCardinality();
//Get list of conjuncts
Criteria selectCriteria = (Criteria)node.getProperty(NodeConstants.Info.SELECT_CRITERIA);
@@ -350,10 +351,7 @@
//only cost non-correlated TODO: a better estimate for correlated
if (references == null) {
PlanNode child = node.getFirstChild();
- Float childCostFloat = (Float)child.getProperty(NodeConstants.Info.EST_CARDINALITY);
- if (childCostFloat != null) {
- cost = childCostFloat.floatValue();
- }
+ cost = child.getCardinality();
}
}else {
GroupSymbol group = node.getGroups().iterator().next();
@@ -379,7 +377,7 @@
throws QueryMetadataException, TeiidComponentException {
PlanNode child = node.getFirstChild();
- float childCost = ((Float)child.getProperty(NodeConstants.Info.EST_CARDINALITY)).floatValue();
+ float childCost = child.getCardinality();
if(childCost == UNKNOWN_VALUE) {
setCardinalityEstimate(node, null);
@@ -421,12 +419,9 @@
if (compCrit.getOperator() == CompoundCriteria.OR) {
cost = 0;
}
- HashSet<ElementSymbol> elements = new HashSet<ElementSymbol>();
- collectElementsOfValidCriteria(compCrit, elements);
- if (usesKey(elements, metadata)) {
+ if (usesKey(compCrit, metadata)) {
return 1;
}
-
for (Criteria critPart : compCrit.getCriteria()) {
float nextCost = recursiveEstimateCostOfCriteria(childCost, currentNode, critPart, metadata);
@@ -497,7 +492,7 @@
if(criteria instanceof CompoundCriteria) {
CompoundCriteria compCrit = (CompoundCriteria) criteria;
- Iterator iter = compCrit.getCriteria().iterator();
+ Iterator<Criteria> iter = compCrit.getCriteria().iterator();
boolean first = true;
Collection<ElementSymbol> savedElements = elements;
if(compCrit.getOperator() == CompoundCriteria.OR) {
@@ -505,11 +500,11 @@
}
while(iter.hasNext()) {
if(compCrit.getOperator() == CompoundCriteria.AND || first) {
- collectElementsOfValidCriteria((Criteria) iter.next(), elements);
+ collectElementsOfValidCriteria(iter.next(), elements);
first = false;
} else {
HashSet<ElementSymbol> other = new HashSet<ElementSymbol>();
- collectElementsOfValidCriteria((Criteria) iter.next(), other);
+ collectElementsOfValidCriteria(iter.next(), other);
elements.retainAll(other);
}
}
@@ -532,7 +527,6 @@
if (!setCriteria.isNegated()) {
ElementCollectorVisitor.getElements(setCriteria.getExpression(), elements);
}
-
} else if(criteria instanceof IsNullCriteria) {
IsNullCriteria isNullCriteria = (IsNullCriteria)criteria;
if (!isNullCriteria.isNegated()) {
@@ -769,6 +763,12 @@
&& usesKey(allElements, metadata);
}
+ public static boolean usesKey(Criteria crit, QueryMetadataInterface metadata) throws QueryMetadataException, TeiidComponentException {
+ HashSet<ElementSymbol> elements = new HashSet<ElementSymbol>();
+ collectElementsOfValidCriteria(crit, elements);
+ return usesKey(elements, metadata);
+ }
+
/**
* TODO: this uses key check is not really accurate, it doesn't take into consideration where
* we are in the plan.
@@ -849,8 +849,8 @@
}
} else if (cardinality != UNKNOWN_VALUE) {
int groupCardinality = metadata.getCardinality(elementSymbol.getGroupSymbol().getMetadataID());
- if (groupCardinality != UNKNOWN_VALUE) {
- ndv *= cardinality / Math.max(1, groupCardinality);
+ if (groupCardinality != UNKNOWN_VALUE && groupCardinality > cardinality) {
+ ndv *= cardinality / Math.max(1, groupCardinality);
}
}
result = Math.max(result, ndv);
@@ -948,7 +948,7 @@
/**
* Computes the cost of a Dependent Join
*
- * The worst possible cost will arise from a high independent ndv (many dependent sets) and a low depenendent ndv (possibly many matches per set)
+ * The worst possible cost will arise from a high independent ndv (many dependent sets) and a low dependent ndv (possibly many matches per set)
*
* This logic uses the same assumption as criteria in that ndv is used as a divisor of cardinality.
*
Modified: branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleImplementJoinStrategy.java
===================================================================
--- branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleImplementJoinStrategy.java 2010-09-22 21:11:32 UTC (rev 2596)
+++ branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleImplementJoinStrategy.java 2010-09-22 21:14:19 UTC (rev 2597)
@@ -150,7 +150,7 @@
if (NewCalculateCostUtil.usesKey(sourceNode, expressions, metadata)) {
joinNode.setProperty(joinNode.getFirstChild() == childNode ? NodeConstants.Info.IS_LEFT_DISTINCT : NodeConstants.Info.IS_RIGHT_DISTINCT, true);
}
- if (attemptPush && RuleRaiseAccess.canRaiseOverSort(sourceNode, metadata, capFinder, sortNode)) {
+ if (attemptPush && RuleRaiseAccess.canRaiseOverSort(sourceNode, metadata, capFinder, sortNode, null)) {
sourceNode.getFirstChild().addAsParent(sortNode);
if (needsCorrection) {
Modified: branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePlanJoins.java
===================================================================
--- branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePlanJoins.java 2010-09-22 21:11:32 UTC (rev 2596)
+++ branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePlanJoins.java 2010-09-22 21:14:19 UTC (rev 2597)
@@ -237,7 +237,7 @@
* Ideally we should be a little smarter in case 2
* - pushing down a same source cross join can be done if we know that a dependent join will be performed
*/
- boolean hasJoinCriteria = false;
+ //boolean hasJoinCriteria = false;
LinkedList<Criteria> joinCriteria = new LinkedList<Criteria>();
Object modelId = RuleRaiseAccess.getModelIDFromAccess(accessNode1, metadata);
SupportedJoinCriteria sjc = CapabilitiesUtil.getSupportedJoinCriteria(modelId, metadata, capFinder);
@@ -250,25 +250,27 @@
if (sources.contains(accessNode1)) {
if (sources.contains(accessNode2) && sources.size() == 2) {
- hasJoinCriteria = true;
+ //hasJoinCriteria = true;
Criteria crit = (Criteria)critNode.getProperty(NodeConstants.Info.SELECT_CRITERIA);
- if (RuleRaiseAccess.isSupportedJoinCriteria(sjc, crit, modelId, metadata, capFinder)) {
+ if (RuleRaiseAccess.isSupportedJoinCriteria(sjc, crit, modelId, metadata, capFinder, null)) {
joinCriteriaNodes.add(critNode);
joinCriteria.add(crit);
}
} else if (!accessNodes.containsAll(sources)) {
- hasJoinCriteria = true;
+ //hasJoinCriteria = true;
}
} else if (sources.contains(accessNode2) && !accessNodes.containsAll(sources)) {
- hasJoinCriteria = true;
+ //hasJoinCriteria = true;
}
}
/*
- * If we failed to find direct criteria, but still have non-pushable or criteria to
- * other groups we'll use additional checks
+ * If we failed to find direct criteria, a cross join may still be acceptable
*/
- if ((!hasJoinCriteria || joinCriteriaNodes.isEmpty()) && !canPushCrossJoin(metadata, context, accessNode1, accessNode2)) {
+ if (joinCriteriaNodes.isEmpty() && !canPushCrossJoin(metadata, context, accessNode1, accessNode2)) {
+ //if (hasJoinCriteria) {
+ //a cross join would still be a good idea given that a dependent join can be used
+ //}
continue;
}
@@ -277,7 +279,7 @@
JoinType joinType = joinCriteria.isEmpty()?JoinType.JOIN_CROSS:JoinType.JOIN_INNER;
//try to push to the source
- if (RuleRaiseAccess.canRaiseOverJoin(toTest, metadata, capFinder, joinCriteria, joinType) == null) {
+ if (RuleRaiseAccess.canRaiseOverJoin(toTest, metadata, capFinder, joinCriteria, joinType, null) == null) {
continue;
}
@@ -521,7 +523,7 @@
* @param metadata
* @return
*/
- Object[] findBestJoinOrder(JoinRegion region, QueryMetadataInterface metadata) {
+ Object[] findBestJoinOrder(JoinRegion region, QueryMetadataInterface metadata) throws QueryMetadataException, TeiidComponentException {
int regionCount = region.getJoinSourceNodes().size();
List<Integer> orderList = new ArrayList<Integer>(regionCount);
Modified: branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePushAggregates.java
===================================================================
--- branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePushAggregates.java 2010-09-22 21:11:32 UTC (rev 2596)
+++ branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePushAggregates.java 2010-09-22 21:14:19 UTC (rev 2597)
@@ -386,7 +386,7 @@
projectPlanNode.setProperty(NodeConstants.Info.PROJECT_COLS, projectedViewSymbols);
projectPlanNode.addGroup(group);
if (pushdown) {
- while (RuleRaiseAccess.raiseAccessNode(root, originalNode, metadata, capFinder, true) != null) {
+ while (RuleRaiseAccess.raiseAccessNode(root, originalNode, metadata, capFinder, true, null) != null) {
//continue to raise
}
}
@@ -487,7 +487,7 @@
//check for push down
if (stageGroup.getFirstChild().getType() == NodeConstants.Types.ACCESS
- && RuleRaiseAccess.canRaiseOverGroupBy(stageGroup, stageGroup.getFirstChild(), aggregates, metadata, capFinder)) {
+ && RuleRaiseAccess.canRaiseOverGroupBy(stageGroup, stageGroup.getFirstChild(), aggregates, metadata, capFinder, null)) {
RuleRaiseAccess.performRaise(null, stageGroup.getFirstChild(), stageGroup);
if (stagedGroupingSymbols.isEmpty()) {
RuleRaiseAccess.performRaise(null, stageGroup.getParent(), stageGroup.getParent().getParent());
Modified: branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePushSelectCriteria.java
===================================================================
--- branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePushSelectCriteria.java 2010-09-22 21:11:32 UTC (rev 2596)
+++ branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePushSelectCriteria.java 2010-09-22 21:14:19 UTC (rev 2597)
@@ -94,7 +94,7 @@
continue;
}
- PlanNode sourceNode = findOriginatingNode(metadata, capFinder, critNode);
+ PlanNode sourceNode = findOriginatingNode(metadata, capFinder, critNode, analysisRecord);
if(sourceNode == null) {
deadNodes.add(critNode);
@@ -137,7 +137,7 @@
}
private PlanNode findOriginatingNode(QueryMetadataInterface metadata,
- CapabilitiesFinder capFinder, PlanNode critNode)
+ CapabilitiesFinder capFinder, PlanNode critNode, AnalysisRecord record)
throws TeiidComponentException, QueryMetadataException {
if (critNode.getGroups().isEmpty()) {
//check to see if pushing may impact cardinality
@@ -146,7 +146,7 @@
return groupNode;
}
- Object modelId = getSubqueryModelId(metadata, capFinder, critNode);
+ Object modelId = getSubqueryModelId(metadata, capFinder, critNode, record);
if (modelId != null) {
for (PlanNode node : NodeEditor.findAllNodes(critNode, NodeConstants.Types.SOURCE)) {
GroupSymbol group = node.getGroups().iterator().next();
@@ -161,11 +161,11 @@
}
private Object getSubqueryModelId(QueryMetadataInterface metadata,
- CapabilitiesFinder capFinder, PlanNode critNode)
+ CapabilitiesFinder capFinder, PlanNode critNode, AnalysisRecord record)
throws TeiidComponentException, QueryMetadataException {
Object modelId = null;
for (SubqueryContainer subqueryContainer : critNode.getSubqueryContainers()) {
- Object validId = CriteriaCapabilityValidatorVisitor.validateSubqueryPushdown(subqueryContainer, null, metadata, capFinder);
+ Object validId = CriteriaCapabilityValidatorVisitor.validateSubqueryPushdown(subqueryContainer, null, metadata, capFinder, record);
if (validId == null) {
return null;
}
@@ -282,7 +282,7 @@
// Look for situations where we don't allow SELECT to be pushed
if(currentNode.getType() == NodeConstants.Types.ACCESS) {
try {
- if (!RuleRaiseAccess.canRaiseOverSelect(currentNode, metadata, capFinder, critNode)) {
+ if (!RuleRaiseAccess.canRaiseOverSelect(currentNode, metadata, capFinder, critNode, null)) {
return currentNode;
}
Modified: branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleRaiseAccess.java
===================================================================
--- branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleRaiseAccess.java 2010-09-22 21:11:32 UTC (rev 2596)
+++ branches/7.1.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleRaiseAccess.java 2010-09-22 21:14:19 UTC (rev 2597)
@@ -73,7 +73,7 @@
raisedNode = false;
for (PlanNode accessNode : NodeEditor.findAllNodes(plan, NodeConstants.Types.ACCESS)) {
- PlanNode newRoot = raiseAccessNode(plan, accessNode, metadata, capFinder, afterJoinPlanning);
+ PlanNode newRoot = raiseAccessNode(plan, accessNode, metadata, capFinder, afterJoinPlanning, analysisRecord);
if(newRoot != null) {
raisedNode = true;
plan = newRoot;
@@ -87,7 +87,8 @@
/**
* @return null if nothing changed, and a new plan root if something changed
*/
- static PlanNode raiseAccessNode(PlanNode rootNode, PlanNode accessNode, QueryMetadataInterface metadata, CapabilitiesFinder capFinder, boolean afterJoinPlanning)
+ static PlanNode raiseAccessNode(PlanNode rootNode, PlanNode accessNode, QueryMetadataInterface metadata,
+ CapabilitiesFinder capFinder, boolean afterJoinPlanning, AnalysisRecord record)
throws QueryPlannerException, QueryMetadataException, TeiidComponentException {
PlanNode parentNode = accessNode.getParent();
@@ -103,7 +104,7 @@
switch(parentNode.getType()) {
case NodeConstants.Types.JOIN:
{
- modelID = canRaiseOverJoin(modelID, parentNode, metadata, capFinder, afterJoinPlanning);
+ modelID = canRaiseOverJoin(modelID, parentNode, metadata, capFinder, afterJoinPlanning, record);
if(modelID != null) {
raiseAccessOverJoin(parentNode, modelID, true);
return rootNode;
@@ -117,7 +118,7 @@
for (int i = 0; i < projectCols.size(); i++) {
SingleElementSymbol symbol = (SingleElementSymbol)projectCols.get(i);
- if(! canPushSymbol(symbol, true, modelID, metadata, capFinder)) {
+ if(! canPushSymbol(symbol, true, modelID, metadata, capFinder, record)) {
return null;
}
}
@@ -138,10 +139,13 @@
{
// If model supports the support constant parameter, then move access node
if(!CapabilitiesUtil.supportsSelectDistinct(modelID, metadata, capFinder)) {
+ recordDebug("cannot push dupremove, since distinct is not supported by source", parentNode, record); //$NON-NLS-1$
return null;
}
+ //TODO: this check is too specific the columns could be used in expressions that are comparable
if (!CapabilitiesUtil.checkElementsAreSearchable((List)NodeEditor.findNodePreOrder(parentNode, NodeConstants.Types.PROJECT).getProperty(NodeConstants.Info.PROJECT_COLS), metadata, SupportConstants.Element.SEARCHABLE_COMPARE)) {
+ recordDebug("cannot push dupremove, since not all columns are comparable at the source", parentNode, record); //$NON-NLS-1$
return null;
}
@@ -149,7 +153,7 @@
}
case NodeConstants.Types.SORT:
{
- if (canRaiseOverSort(accessNode, metadata, capFinder, parentNode)) {
+ if (canRaiseOverSort(accessNode, metadata, capFinder, parentNode, record)) {
return performRaise(rootNode, accessNode, parentNode);
}
return null;
@@ -157,7 +161,7 @@
case NodeConstants.Types.GROUP:
{
Set<AggregateSymbol> aggregates = RulePushAggregates.collectAggregates(parentNode);
- if (canRaiseOverGroupBy(parentNode, accessNode, aggregates, metadata, capFinder)) {
+ if (canRaiseOverGroupBy(parentNode, accessNode, aggregates, metadata, capFinder, record)) {
return performRaise(rootNode, accessNode, parentNode);
}
return null;
@@ -180,7 +184,7 @@
if (parentNode.hasBooleanProperty(NodeConstants.Info.IS_DEPENDENT_SET)) {
return null;
}
- if (canRaiseOverSelect(accessNode, metadata, capFinder, parentNode)) {
+ if (canRaiseOverSelect(accessNode, metadata, capFinder, parentNode, record)) {
RulePushSelectCriteria.satisfyAccessPatterns(parentNode, accessNode);
return performRaise(rootNode, accessNode, parentNode);
}
@@ -212,7 +216,7 @@
}
PlanNode newParent = grandParent.getParent();
//TODO: use costing or heuristics instead of always raising
- PlanNode newRoot = raiseAccessNode(rootNode, accessNode, metadata, capFinder, afterJoinPlanning);
+ PlanNode newRoot = raiseAccessNode(rootNode, accessNode, metadata, capFinder, afterJoinPlanning, record);
if (newRoot == null) {
//return the tree to its original state
parentNode.addFirstChild(accessNode);
@@ -291,7 +295,7 @@
PlanNode accessNode,
Collection<? extends SingleElementSymbol> aggregates,
QueryMetadataInterface metadata,
- CapabilitiesFinder capFinder) throws QueryMetadataException,
+ CapabilitiesFinder capFinder, AnalysisRecord record) throws QueryMetadataException,
TeiidComponentException {
Object modelID = getModelIDFromAccess(accessNode, metadata);
if(modelID == null) {
@@ -299,29 +303,36 @@
}
List<SingleElementSymbol> groupCols = (List<SingleElementSymbol>)groupNode.getProperty(NodeConstants.Info.GROUP_COLS);
if(!CapabilitiesUtil.supportsAggregates(groupCols, modelID, metadata, capFinder)) {
+ recordDebug("cannot push group by, since group by is not supported by source", groupNode, record); //$NON-NLS-1$
return false;
}
if (groupCols != null) {
for (SingleElementSymbol singleElementSymbol : groupCols) {
- if (!canPushSymbol(singleElementSymbol, false, modelID, metadata, capFinder)) {
+ if (!canPushSymbol(singleElementSymbol, false, modelID, metadata, capFinder, record)) {
return false;
}
}
}
if (aggregates != null) {
for (SingleElementSymbol aggregateSymbol : aggregates) {
- if(! CriteriaCapabilityValidatorVisitor.canPushLanguageObject(aggregateSymbol, modelID, metadata, capFinder)) {
+ if(! CriteriaCapabilityValidatorVisitor.canPushLanguageObject(aggregateSymbol, modelID, metadata, capFinder, record)) {
return false;
}
}
}
return CapabilitiesUtil.checkElementsAreSearchable(groupCols, metadata, SupportConstants.Element.SEARCHABLE_COMPARE);
}
+
+ private static void recordDebug(String message, PlanNode node, AnalysisRecord record) {
+ if (record != null && record.recordDebug()) {
+ record.println(message + " " + node.nodeToString()); //$NON-NLS-1$
+ }
+ }
static boolean canRaiseOverSort(PlanNode accessNode,
QueryMetadataInterface metadata,
CapabilitiesFinder capFinder,
- PlanNode parentNode) throws QueryMetadataException,
+ PlanNode parentNode, AnalysisRecord record) throws QueryMetadataException,
TeiidComponentException {
// Find the model for this node by getting ACCESS node's model
Object modelID = getModelIDFromAccess(accessNode, metadata);
@@ -333,7 +344,7 @@
List<OrderByItem> sortCols = ((OrderBy)parentNode.getProperty(NodeConstants.Info.SORT_ORDER)).getOrderByItems();
for (OrderByItem symbol : sortCols) {
//TODO: this check shouldn't be necessary, since the order by is not introducing new expressions
- if(! canPushSymbol(symbol.getSymbol(), true, modelID, metadata, capFinder)) {
+ if(! canPushSymbol(symbol.getSymbol(), true, modelID, metadata, capFinder, record)) {
return false;
}
boolean supportsNullOrdering = CapabilitiesUtil.supports(Capability.QUERY_ORDERBY_NULL_ORDERING, modelID, metadata, capFinder);
@@ -407,7 +418,7 @@
static boolean canRaiseOverSelect(PlanNode accessNode,
QueryMetadataInterface metadata,
CapabilitiesFinder capFinder,
- PlanNode parentNode) throws QueryMetadataException,
+ PlanNode parentNode, AnalysisRecord record) throws QueryMetadataException,
TeiidComponentException,
QueryPlannerException {
if (parentNode.hasBooleanProperty(NodeConstants.Info.IS_PHANTOM)) {
@@ -422,6 +433,7 @@
}
if (parentNode.hasBooleanProperty(NodeConstants.Info.IS_HAVING) && !CapabilitiesUtil.supports(Capability.QUERY_HAVING, modelID, metadata, capFinder)) {
+ recordDebug("cannot push having, since having is not supported by source", parentNode, record); //$NON-NLS-1$
return false;
}
@@ -433,7 +445,7 @@
Criteria crit = (Criteria) parentNode.getProperty(NodeConstants.Info.SELECT_CRITERIA);
- if(!CriteriaCapabilityValidatorVisitor.canPushLanguageObject(crit, modelID, metadata, capFinder) ) {
+ if(!CriteriaCapabilityValidatorVisitor.canPushLanguageObject(crit, modelID, metadata, capFinder, record) ) {
return false;
}
@@ -456,13 +468,14 @@
* @throws QueryMetadataException
* @since 4.1.2
*/
- private static boolean canPushSymbol(SingleElementSymbol symbol, boolean inSelectClause, Object modelID, QueryMetadataInterface metadata, CapabilitiesFinder capFinder)
+ private static boolean canPushSymbol(SingleElementSymbol symbol, boolean inSelectClause, Object modelID,
+ QueryMetadataInterface metadata, CapabilitiesFinder capFinder, AnalysisRecord record)
throws TeiidComponentException, QueryMetadataException {
Expression expr = SymbolMap.getExpression(symbol);
// Do the normal checks
- if(! CriteriaCapabilityValidatorVisitor.canPushLanguageObject(expr, modelID, metadata, capFinder)) {
+ if(! CriteriaCapabilityValidatorVisitor.canPushLanguageObject(expr, modelID, metadata, capFinder, record)) {
return false;
}
@@ -499,7 +512,8 @@
* @return The modelID if the raise can proceed and what common model these combined
* nodes will be sent to
*/
- private static Object canRaiseOverJoin(Object modelId, PlanNode joinNode, QueryMetadataInterface metadata, CapabilitiesFinder capFinder, boolean afterJoinPlanning)
+ private static Object canRaiseOverJoin(Object modelId, PlanNode joinNode, QueryMetadataInterface metadata,
+ CapabilitiesFinder capFinder, boolean afterJoinPlanning, AnalysisRecord record)
throws QueryMetadataException, TeiidComponentException {
List crits = (List) joinNode.getProperty(NodeConstants.Info.JOIN_CRITERIA);
@@ -536,14 +550,14 @@
}
}
- return canRaiseOverJoin(joinNode.getChildren(), metadata, capFinder, crits, type);
+ return canRaiseOverJoin(joinNode.getChildren(), metadata, capFinder, crits, type, record);
}
static Object canRaiseOverJoin(List<PlanNode> children,
QueryMetadataInterface metadata,
CapabilitiesFinder capFinder,
List<Criteria> crits,
- JoinType type) throws QueryMetadataException,
+ JoinType type, AnalysisRecord record) throws QueryMetadataException,
TeiidComponentException {
//we only want to consider binary joins
if (children.size() != 2) {
@@ -602,7 +616,7 @@
List<Object> rightIds = null;
GroupSymbol leftGroup = null;
for (Criteria crit : crits) {
- if (!isSupportedJoinCriteria(sjc, crit, accessModelID, metadata, capFinder)) {
+ if (!isSupportedJoinCriteria(sjc, crit, accessModelID, metadata, capFinder, record)) {
return null;
}
if (sjc != SupportedJoinCriteria.KEY) {
@@ -663,9 +677,10 @@
/**
* Checks criteria one predicate at a time. Only tests up to the equi restriction.
*/
- static boolean isSupportedJoinCriteria(SupportedJoinCriteria sjc, Criteria crit, Object accessModelID, QueryMetadataInterface metadata, CapabilitiesFinder capFinder)
+ static boolean isSupportedJoinCriteria(SupportedJoinCriteria sjc, Criteria crit, Object accessModelID,
+ QueryMetadataInterface metadata, CapabilitiesFinder capFinder, AnalysisRecord record)
throws QueryMetadataException, TeiidComponentException {
- if(!CriteriaCapabilityValidatorVisitor.canPushLanguageObject(crit, accessModelID, metadata, capFinder) ) {
+ if(!CriteriaCapabilityValidatorVisitor.canPushLanguageObject(crit, accessModelID, metadata, capFinder, record) ) {
return false;
}
if (sjc == SupportedJoinCriteria.ANY) {
Modified: branches/7.1.x/engine/src/test/java/org/teiid/query/optimizer/relational/rules/TestCalculateCostUtil.java
===================================================================
--- branches/7.1.x/engine/src/test/java/org/teiid/query/optimizer/relational/rules/TestCalculateCostUtil.java 2010-09-22 21:11:32 UTC (rev 2596)
+++ branches/7.1.x/engine/src/test/java/org/teiid/query/optimizer/relational/rules/TestCalculateCostUtil.java 2010-09-22 21:14:19 UTC (rev 2597)
@@ -24,6 +24,9 @@
import static org.junit.Assert.*;
+import java.util.Arrays;
+
+import org.junit.Ignore;
import org.junit.Test;
import org.teiid.api.exception.query.QueryMetadataException;
import org.teiid.core.TeiidComponentException;
@@ -35,7 +38,6 @@
import org.teiid.query.optimizer.relational.plantree.NodeConstants;
import org.teiid.query.optimizer.relational.plantree.NodeFactory;
import org.teiid.query.optimizer.relational.plantree.PlanNode;
-import org.teiid.query.optimizer.relational.rules.NewCalculateCostUtil;
import org.teiid.query.parser.QueryParser;
import org.teiid.query.processor.TestVirtualDepJoin;
import org.teiid.query.processor.relational.RelationalPlan;
@@ -47,7 +49,7 @@
import org.teiid.query.unittest.FakeMetadataObject;
import org.teiid.query.util.CommandContext;
-
+@SuppressWarnings("nls")
public class TestCalculateCostUtil {
// =====================================================================
@@ -303,6 +305,21 @@
float cost = NewCalculateCostUtil.computeCostForTree(joinNode, metadata);
assertTrue(cost == NewCalculateCostUtil.UNKNOWN_VALUE);
}
+
+ @Ignore("this logic needs to be refined to work better")
+ @Test public void testEstimateJoinNodeCostOneUnknown() throws Exception {
+ QueryMetadataInterface metadata = FakeMetadataFactory.example4();
+ PlanNode joinNode = helpGetJoinNode(NewCalculateCostUtil.UNKNOWN_VALUE, 500, JoinType.JOIN_INNER);
+ joinNode.setProperty(NodeConstants.Info.JOIN_CRITERIA, Arrays.asList(helpGetCriteria("pm1.g1.e1 = pm1.g2.e1", metadata)));
+ float cost = NewCalculateCostUtil.computeCostForTree(joinNode, metadata);
+ assertEquals(10000, cost, 0);
+ }
+
+ @Test public void testEstimateNdvPostJoin() throws Exception {
+ String query = "SELECT account FROM US.Accounts, Europe.CustAccts, CustomerMaster.Customers where account + accid + CustomerMaster.Customers.id = 1000000"; //$NON-NLS-1$
+
+ helpTestQuery(1E9f, query, new String[] {"SELECT g_0.accid FROM Europe.CustAccts AS g_0", "SELECT g_0.id FROM CustomerMaster.Customers AS g_0", "SELECT g_0.account FROM US.Accounts AS g_0"});
+ }
/**
* cases 2159 and 2160, defect 14998
@@ -732,10 +749,17 @@
op +
"SELECT id, convert(accid / 10000, long), mod(accid, 10000), convert(type, integer), amount, 'EU' from Europe.CustAccts"; //$NON-NLS-1$
- RelationalPlan plan = (RelationalPlan)TestOptimizer.helpPlan(query, TestVirtualDepJoin.exampleVirtualDepJoin(), new String[] {"SELECT g_0.customer, g_0.account, g_0.txnid, g_0.txn, g_0.pennies FROM US.Accounts AS g_0 WHERE g_0.txn <> 'X'", "SELECT g_0.id, g_0.accid, g_0.type, g_0.amount FROM Europe.CustAccts AS g_0"}, ComparisonMode.EXACT_COMMAND_STRING); //$NON-NLS-1$ //$NON-NLS-2$
+ String[] expected = new String[] {"SELECT g_0.customer, g_0.account, g_0.txnid, g_0.txn, g_0.pennies FROM US.Accounts AS g_0 WHERE g_0.txn <> 'X'", "SELECT g_0.id, g_0.accid, g_0.type, g_0.amount FROM Europe.CustAccts AS g_0"};
+ helpTestQuery(cost, query, expected);
+ }
+
+ private void helpTestQuery(float cost, String query, String[] expected)
+ throws TeiidComponentException, TeiidProcessingException {
+ RelationalPlan plan = (RelationalPlan)TestOptimizer.helpPlan(query, TestVirtualDepJoin.exampleVirtualDepJoin(), expected, ComparisonMode.EXACT_COMMAND_STRING); //$NON-NLS-1$ //$NON-NLS-2$
+
assertEquals(cost, plan.getRootNode().getEstimateNodeCardinality());
- }
+ }
@Test public void testUnion() throws Exception {
helpTestSetOp("UNION ", 1375000.0f); //$NON-NLS-1$
Modified: branches/7.1.x/engine/src/test/java/org/teiid/query/optimizer/relational/rules/TestCriteriaCapabilityValidatorVisitor.java
===================================================================
--- branches/7.1.x/engine/src/test/java/org/teiid/query/optimizer/relational/rules/TestCriteriaCapabilityValidatorVisitor.java 2010-09-22 21:11:32 UTC (rev 2596)
+++ branches/7.1.x/engine/src/test/java/org/teiid/query/optimizer/relational/rules/TestCriteriaCapabilityValidatorVisitor.java 2010-09-22 21:14:19 UTC (rev 2597)
@@ -51,7 +51,7 @@
QueryResolver.resolveCriteria(criteria, metadata);
- assertEquals("Got incorrect isValid flag", isValid, CriteriaCapabilityValidatorVisitor.canPushLanguageObject(criteria, modelID, metadata, capFinder)); //$NON-NLS-1$
+ assertEquals("Got incorrect isValid flag", isValid, CriteriaCapabilityValidatorVisitor.canPushLanguageObject(criteria, modelID, metadata, capFinder, null)); //$NON-NLS-1$
} catch(QueryMetadataException e) {
if (!expectException) {
throw new RuntimeException(e);
@@ -68,7 +68,7 @@
QueryResolver.resolveCommand(command, metadata);
- assertEquals("Got incorrect isValid flag", isValid, CriteriaCapabilityValidatorVisitor.canPushLanguageObject(command, modelID, metadata, capFinder)); //$NON-NLS-1$
+ assertEquals("Got incorrect isValid flag", isValid, CriteriaCapabilityValidatorVisitor.canPushLanguageObject(command, modelID, metadata, capFinder, null)); //$NON-NLS-1$
} catch(QueryMetadataException e) {
if (!expectException) {
throw new RuntimeException(e);
Modified: branches/7.1.x/engine/src/test/java/org/teiid/query/optimizer/relational/rules/TestRuleChooseDependent.java
===================================================================
--- branches/7.1.x/engine/src/test/java/org/teiid/query/optimizer/relational/rules/TestRuleChooseDependent.java 2010-09-22 21:11:32 UTC (rev 2596)
+++ branches/7.1.x/engine/src/test/java/org/teiid/query/optimizer/relational/rules/TestRuleChooseDependent.java 2010-09-22 21:14:19 UTC (rev 2597)
@@ -213,9 +213,7 @@
null,
null,
joinCriteria,
- expectedMadeDependent);
-
-
+ expectedMadeDependent, null, null);
}
/**
@@ -253,7 +251,7 @@
Criteria atomicRequestCrit2a, //optional
Collection atomicJoinCriteria2, //optional
Collection joinCriteria,
- int expectedMadeDependent) throws QueryPlannerException, QueryMetadataException, TeiidComponentException {
+ int expectedMadeDependent, Number expectedCost1, Number expectedCost2) throws QueryPlannerException, QueryMetadataException, TeiidComponentException {
//EXAMPLE:
// Project(groups=[])
// Join(groups=[], props={21=joinCriteria, 23=true, 22=INNER JOIN})
@@ -407,6 +405,10 @@
Float cost2 = (Float)accessNode2.getProperty(NodeConstants.Info.EST_CARDINALITY);
assertNotNull(cost2);
assertNotNull(cost1);
+ if (expectedCost1 != null) {
+ assertEquals(expectedCost1.longValue(), cost1.longValue());
+ assertEquals(expectedCost2.longValue(), cost2.longValue());
+ }
}
// ################################## ACTUAL TESTS ################################
@@ -574,9 +576,9 @@
atomicCrit2a,
atomicJoinCrits2,
crits,
- expected);
+ expected, -1, 57734);
}
-
+
/**
* Tests that heuristics will take cardinality of a group into account when
* making a dependent join.
@@ -1064,7 +1066,7 @@
atomicCrit2a,
atomicJoinCrits2,
crits,
- expected);
+ expected, 1000, 1);
}
public void testCardinalityWithAtomicCrossJoin() throws Exception {
@@ -1110,7 +1112,7 @@
atomicCrit2a,
atomicJoinCrits2,
crits,
- expected);
+ expected, 1000, 1E5);
}
public void testCardinalityWithAtomicCrossJoin2() throws Exception {
@@ -1156,7 +1158,7 @@
atomicCrit2a,
atomicJoinCrits2,
crits,
- expected);
+ expected, 1000, 9999899648l);
}
// ################################## TEST SUITE ################################
14 years, 3 months
teiid SVN: r2596 - in branches/7.1.x/connectors/translator-jdbc/src: test/java/org/teiid/translator/jdbc/modeshape and 1 other directories.
by teiid-commits@lists.jboss.org
Author: vhalbert(a)redhat.com
Date: 2010-09-22 17:11:32 -0400 (Wed, 22 Sep 2010)
New Revision: 2596
Added:
branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/ModeShapeSQLVisitor.java
branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/ModeShapeUtil.java
branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/PathFunctionModifier.java
branches/7.1.x/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/modeshape/TestPathFunctionModifier.java
Modified:
branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/ModeShapeExecutionFactory.java
branches/7.1.x/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/modeshape/TestModeShapeSqlTranslator.java
branches/7.1.x/connectors/translator-jdbc/src/test/resources/ModeShape.vdb
Log:
TEIID-1106 adding logic to support more JCR Sql Syntax
Modified: branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/ModeShapeExecutionFactory.java
===================================================================
--- branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/ModeShapeExecutionFactory.java 2010-09-22 16:59:20 UTC (rev 2595)
+++ branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/ModeShapeExecutionFactory.java 2010-09-22 21:11:32 UTC (rev 2596)
@@ -35,8 +35,10 @@
import org.teiid.language.LanguageObject;
import org.teiid.language.Literal;
import org.teiid.language.NamedTable;
-import org.teiid.translator.SourceSystemFunctions;
+import org.teiid.logging.LogConstants;
+import org.teiid.logging.LogManager;
import org.teiid.translator.ExecutionContext;
+import org.teiid.translator.SourceSystemFunctions;
import org.teiid.translator.Translator;
import org.teiid.translator.TranslatorException;
import org.teiid.translator.jdbc.ConvertModifier;
@@ -60,24 +62,7 @@
public void start() throws TranslatorException {
super.start();
- registerFunctionModifier("PATH", new FunctionModifier() { //$NON-NLS-1$
-
- @Override
- public List<?> translate(Function function) {
- List<Object> objs = new ArrayList<Object>();
-
- List<Expression> parms = function.getParameters();
-
- for (Expression s : parms)
- {
- String v = s.toString();
- v.replace('\'', ' ');
- objs.add(v);
- }
-
- return objs;
- }
- } );
+ registerFunctionModifier("PATH", new PathFunctionModifier());
//add in type conversion
ConvertModifier convertModifier = new ConvertModifier();
@@ -127,6 +112,10 @@
}, FunctionModifier.BOOLEAN);
registerFunctionModifier(SourceSystemFunctions.CONVERT, convertModifier);
+
+
+ LogManager.logTrace(LogConstants.CTX_CONNECTOR, "Started"); //$NON-NLS-1$
+
}
/**
@@ -136,48 +125,35 @@
* @return the {@link SQLConversionVisitor}
*/
public SQLConversionVisitor getSQLConversionVisitor() {
- return new SQLConversionVisitor(this);
+ return new ModeShapeSQLVisitor(this);
}
@Override
public List<?> translate(LanguageObject obj, ExecutionContext context) {
-
if (obj instanceof NamedTable) {
NamedTable nt = (NamedTable) obj;
List<String> ntlist = new ArrayList<String>(1);
- ntlist.add("[" + trimTics(nt.getMetadataObject().getNameInSource()) + "]"); //$NON-NLS-1$ //$NON-NLS-2$
+ ntlist.add(ModeShapeUtil.createJCRName(nt.getMetadataObject().getNameInSource()));
return ntlist;
- }
-
- if (obj instanceof ColumnReference) {
+ } else if (obj instanceof ColumnReference) {
ColumnReference elem = (ColumnReference) obj;
- List<String> ntlist = new ArrayList<String>(1);
- ntlist.add("[" + trimTics(elem.getMetadataObject().getNameInSource()) + "]"); //$NON-NLS-1$ //$NON-NLS-2$
- return ntlist;
- }
+
+ String nameInSource = "NoNameInSource";
+ if (elem.getMetadataObject() != null) {
+ nameInSource = elem.getMetadataObject().getNameInSource();
+
+ List<String> ntlist = new ArrayList<String>(1);
+ ntlist.add(ModeShapeUtil.createJCRName(nameInSource));
+
+ return ntlist;
+ }
+ }
return super.translate(obj, context);
}
-
- /**
- * Because the Teiid Designer Import from JDBC adds tic's to a nameInSource that has special characters,
- * they have to be removed when building the sql syntax
- * @param name
- * @return
- */
- private String trimTics(String name) {
- String rtn = name;
- if (rtn.startsWith("'")) {
- rtn = rtn.substring(1);
- }
- if (rtn.endsWith("'")) {
- rtn = rtn.substring(0, rtn.indexOf("'"));
- }
- return rtn;
- }
-
+
@Override
public String translateLiteralBoolean(Boolean booleanValue) {
if(booleanValue.booleanValue()) {
Added: branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/ModeShapeSQLVisitor.java
===================================================================
--- branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/ModeShapeSQLVisitor.java (rev 0)
+++ branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/ModeShapeSQLVisitor.java 2010-09-22 21:11:32 UTC (rev 2596)
@@ -0,0 +1,95 @@
+package org.teiid.translator.jdbc.modeshape;
+
+import static org.teiid.language.SQLConstants.Reserved.BY;
+import static org.teiid.language.SQLConstants.Reserved.ORDER;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.teiid.language.ColumnReference;
+import org.teiid.language.DerivedColumn;
+import org.teiid.language.Expression;
+import org.teiid.language.OrderBy;
+import org.teiid.language.Select;
+import org.teiid.language.SortSpecification;
+import org.teiid.language.SQLConstants.Tokens;
+import org.teiid.metadata.Column;
+import org.teiid.translator.jdbc.JDBCExecutionFactory;
+import org.teiid.translator.jdbc.SQLConversionVisitor;
+
+public class ModeShapeSQLVisitor extends SQLConversionVisitor {
+
+ private Map<String, Column> columnMap = new HashMap<String, Column>();
+ private Map<String, Column> aliasMap = new HashMap<String, Column>();
+
+ public ModeShapeSQLVisitor(JDBCExecutionFactory ef) {
+ super(ef);
+
+ }
+
+ public void visit(Select query) {
+
+ // if the query has an order by, then
+ // need to cache the columns so that the
+ // order by column name can be replaced by its
+ // correlating select column that has the nameInSource
+ if (query.getOrderBy() == null) {
+ super.visit(query);
+ return;
+ }
+
+ List<DerivedColumn> selectSymbols = query.getDerivedColumns();
+ Iterator<DerivedColumn> symbolIter = selectSymbols.iterator();
+ while (symbolIter.hasNext()) {
+ DerivedColumn symbol = symbolIter.next();
+ Expression expression = symbol.getExpression();
+
+ if (symbol.getAlias() != null) {
+
+ }
+ // cache the columns so that order by
+ if (expression instanceof ColumnReference) {
+ ColumnReference colRef = (ColumnReference) expression;
+ if (colRef.getMetadataObject() != null) {
+ Column element = colRef.getMetadataObject();
+ if (symbol.getAlias() != null) {
+ aliasMap.put(symbol.getAlias(), element);
+ }
+ columnMap.put(element.getName(), element);
+ }
+ }
+ }
+
+ super.visit(query);
+ }
+
+ public void visit(OrderBy obj) {
+ buffer.append(ORDER)
+ .append(Tokens.SPACE)
+ .append(BY)
+ .append(Tokens.SPACE);
+
+ List<SortSpecification> specs = obj.getSortSpecifications();
+ for (SortSpecification spec : specs) {
+ String specName = spec.getExpression().toString();
+ Column col = null;
+
+ col = aliasMap.get(specName);
+ if (col == null) {
+ col = columnMap.get(specName);
+ }
+ if (col != null) {
+ buffer.append(ModeShapeUtil.createJCRName(col.getNameInSource()))
+ .append(" ")
+ .append(spec.getOrdering().toString());
+
+ } else {
+ buffer.append(obj.getSortSpecifications());
+ }
+ }
+
+ }
+
+}
Property changes on: branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/ModeShapeSQLVisitor.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/ModeShapeUtil.java
===================================================================
--- branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/ModeShapeUtil.java (rev 0)
+++ branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/ModeShapeUtil.java 2010-09-22 21:11:32 UTC (rev 2596)
@@ -0,0 +1,27 @@
+package org.teiid.translator.jdbc.modeshape;
+
+public class ModeShapeUtil {
+
+ public static final String createJCRName(String name) {
+ return "[" + ModeShapeUtil.trimTics(name) + "]";
+ }
+
+ /**
+ * Because the Teiid Designer Import from JDBC adds tic's to a nameInSource that has special characters,
+ * they have to be removed when building the sql syntax
+ * @param name
+ * @return
+ */
+ public static final String trimTics(String name) {
+ String rtn = name;
+ if (rtn.startsWith("'")) {
+ rtn = rtn.substring(1);
+ }
+
+ if (rtn.endsWith("'")) {
+ rtn = rtn.substring(0, rtn.indexOf("'"));
+ }
+ return rtn;
+ }
+
+}
Property changes on: branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/ModeShapeUtil.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/PathFunctionModifier.java
===================================================================
--- branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/PathFunctionModifier.java (rev 0)
+++ branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/PathFunctionModifier.java 2010-09-22 21:11:32 UTC (rev 2596)
@@ -0,0 +1,58 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.translator.jdbc.modeshape;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.teiid.language.Expression;
+import org.teiid.language.Function;
+import org.teiid.translator.jdbc.FunctionModifier;
+
+
+/**
+ * Function to translate the PATH function
+ * @since 7.1
+ */
+public class PathFunctionModifier extends FunctionModifier {
+
+ public PathFunctionModifier() {
+ super();
+ }
+
+ public List<?> translate(Function function) {
+ List<Object> objs = new ArrayList<Object>();
+
+ List<Expression> parms = function.getParameters();
+
+ for (Expression s : parms)
+ {
+ String v = s.toString();
+ v.replace('\'', ' ');
+ objs.add(v);
+ }
+
+ return objs;
+ }
+
+}
Property changes on: branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/PathFunctionModifier.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: branches/7.1.x/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/modeshape/TestModeShapeSqlTranslator.java
===================================================================
--- branches/7.1.x/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/modeshape/TestModeShapeSqlTranslator.java 2010-09-22 16:59:20 UTC (rev 2595)
+++ branches/7.1.x/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/modeshape/TestModeShapeSqlTranslator.java 2010-09-22 21:11:32 UTC (rev 2596)
@@ -22,15 +22,15 @@
package org.teiid.translator.jdbc.modeshape;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
import org.junit.BeforeClass;
-import org.junit.Ignore;
import org.junit.Test;
import org.mockito.Mockito;
import org.teiid.cdk.api.TranslationUtility;
import org.teiid.core.util.UnitTestUtil;
import org.teiid.language.Command;
+import org.teiid.language.LanguageFactory;
import org.teiid.translator.ExecutionContext;
import org.teiid.translator.TranslatorException;
import org.teiid.translator.jdbc.TranslatedCommand;
@@ -46,14 +46,16 @@
.getTestDataPath()
: "src/test/resources")
+ "/ModeShape.vdb";
+
+
+ @BeforeClass
+ public static void setUp() throws TranslatorException {
+ TRANSLATOR = new ModeShapeExecutionFactory();
+ TRANSLATOR.setUseBindVariables(false);
+ TRANSLATOR.start();
- @BeforeClass
- public static void setUp() throws TranslatorException {
- TRANSLATOR = new ModeShapeExecutionFactory();
- TRANSLATOR.start();
+ }
- }
-
public void helpTestVisitor(TranslationUtility util, String input,
String expectedOutput) throws TranslatorException {
// Convert from sql to objects
@@ -68,77 +70,51 @@
@Test
public void testSelectAllFromBase() throws Exception {
String input = "select * from nt_base"; //$NON-NLS-1$
- String output = "SELECT [jcr:mixinTypes] FROM [nt:base]"; //$NON-NLS-1$
+ String output = "SELECT [jcr:primaryType] FROM [nt:base]"; //$NON-NLS-1$
- // FakeTranslationFactory.getInstance().getExampleTranslationUtility(),
helpTestVisitor(new TranslationUtility(MODESHAPE_VDB), input, output);
}
@Test
public void testSelectColumnFromBase() throws Exception {
- String input = "select jcr_mixinTypes from nt_base"; //$NON-NLS-1$
- String output = "SELECT [jcr:mixinTypes] FROM [nt:base]"; //$NON-NLS-1$
+ String input = "select jcr_primaryType from nt_base"; //$NON-NLS-1$
+ String output = "SELECT [jcr:primaryType] FROM [nt:base]"; //$NON-NLS-1$
- // FakeTranslationFactory.getInstance().getExampleTranslationUtility(),
helpTestVisitor(new TranslationUtility(MODESHAPE_VDB), input, output);
}
-//
-// @Test
-// public void testSimpleSelect() throws Exception {
-// String input = "select Model from Car"; //$NON-NLS-1$
-// String output = "SELECT [car:Model] FROM [car:Car]"; //$NON-NLS-1$
-//
-// // FakeTranslationFactory.getInstance().getExampleTranslationUtility(),
-// helpTestVisitor(new TranslationUtility(MODESHAPE_VDB), input, output);
-//
-// }
-//
-// @Test
-// public void testWhereClause() throws Exception {
-//
-// String input = "select Model from Car WHERE Make = 'Honda'"; //$NON-NLS-1$
-// String output = "SELECT [car:Model] FROM [car:Car] WHERE [car:Make] = 'Honda'"; //$NON-NLS-1$
-//
-// // FakeTranslationFactory.getInstance().getExampleTranslationUtility(),
-// helpTestVisitor(new TranslationUtility(MODESHAPE_VDB), input, output);
-//
-// }
-//
-// @Test
-// public void testOrderBy() throws Exception {
-//
-// String input = "select Model from Car ORDER BY Make"; //$NON-NLS-1$
-// String output = "SELECT [car:Model] FROM [car:Car] ORDER BY [car:Make]"; //$NON-NLS-1$
-//
-// // FakeTranslationFactory.getInstance().getExampleTranslationUtility(),
-// helpTestVisitor(new TranslationUtility(MODESHAPE_VDB), input, output);
-//
-// }
-//
-// @Ignore
-// @Test
-// public void testUsingAlias() throws Exception {
-//
-// String input = "select c.Model from Car As c"; //$NON-NLS-1$
-// String output = "SELECT c.[car:Model] FROM [car:Car] As c"; //$NON-NLS-1$
-//
-// // FakeTranslationFactory.getInstance().getExampleTranslationUtility(),
-// helpTestVisitor(new TranslationUtility(MODESHAPE_VDB), input, output);
-//
-// }
-//
-// @Ignore
-// @Test
-// public void testUsingNameFunction() throws Exception {
-//
-// String input = "select Model from Car as car WHERE PATH('car') LIKE '%/Hybrid/%'"; //$NON-NLS-1$
-// String output = "SELECT [car:Model] FROM [car:Car] WHERE PATH(car:Car) LIKE '%/Hybrid/%'"; //$NON-NLS-1$
-//
-// // FakeTranslationFactory.getInstance().getExampleTranslationUtility(),
-// helpTestVisitor(new TranslationUtility(MODESHAPE_VDB), input, output);
-//
-// }
+ @Test
+ public void testWhereClause() throws Exception {
+
+ String input = "SELECT jcr_primaryType from nt_base WHERE jcr_primaryType = 'relational:column'"; //$NON-NLS-1$
+ String output = "SELECT [jcr:primaryType] FROM [nt:base] WHERE [jcr:primaryType] = 'relational:column'"; //$NON-NLS-1$
+
+ helpTestVisitor(new TranslationUtility(MODESHAPE_VDB), input, output);
+
+ }
+
+ @Test
+ public void testOrderBy() throws Exception {
+
+ String input = "SELECT jcr_primaryType from nt_base ORDER BY jcr_primaryType"; //$NON-NLS-1$
+ String output = "SELECT [jcr:primaryType] FROM [nt:base] ORDER BY [jcr:primaryType] ASC"; //$NON-NLS-1$
+
+ helpTestVisitor(new TranslationUtility(MODESHAPE_VDB), input, output);
+
+ }
+
+ @Test
+ public void testUsingLike() throws Exception {
+
+ String input = "SELECT jcr_primaryType from nt_base WHERE jcr_primaryType LIKE '%relational%'"; //$NON-NLS-1$
+ String output = "SELECT [jcr:primaryType] FROM [nt:base] WHERE [jcr:primaryType] LIKE '%relational%'"; //$NON-NLS-1$
+
+ helpTestVisitor(new TranslationUtility(MODESHAPE_VDB), input, output);
+
+ }
+
+
+
}
Added: branches/7.1.x/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/modeshape/TestPathFunctionModifier.java
===================================================================
--- branches/7.1.x/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/modeshape/TestPathFunctionModifier.java (rev 0)
+++ branches/7.1.x/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/modeshape/TestPathFunctionModifier.java 2010-09-22 21:11:32 UTC (rev 2596)
@@ -0,0 +1,87 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.translator.jdbc.modeshape;
+
+import java.util.Arrays;
+import java.util.Collections;
+
+import junit.framework.TestCase;
+
+import org.junit.Test;
+import org.teiid.cdk.api.TranslationUtility;
+import org.teiid.language.Expression;
+import org.teiid.language.Function;
+import org.teiid.language.LanguageFactory;
+import org.teiid.language.Literal;
+import org.teiid.translator.jdbc.SQLConversionVisitor;
+
+
+/**
+ */
+public class TestPathFunctionModifier extends TestCase {
+
+ private static final LanguageFactory LANG_FACTORY = new LanguageFactory();
+
+ /**
+ * Constructor for TestMonthFunctionModifier.
+ * @param name
+ */
+ public TestPathFunctionModifier(String name) {
+ super(name);
+ }
+
+ public void helpTestMod(Expression c, String expectedStr, String target) throws Exception {
+ Function func = null;
+ if (c != null) {
+ func = LANG_FACTORY.createFunction(target,
+ Arrays.asList(c),
+ String.class);
+ } else {
+ func = LANG_FACTORY.createFunction(target,
+ Collections.EMPTY_LIST,
+ String.class);
+
+ }
+
+ ModeShapeExecutionFactory trans = new ModeShapeExecutionFactory();
+ trans.start();
+
+ SQLConversionVisitor sqlVisitor = trans.getSQLConversionVisitor();
+
+ sqlVisitor.append(func);
+ assertEquals(expectedStr, sqlVisitor.toString());
+ }
+
+
+ public void test1() throws Exception {
+ Literal arg1 = LANG_FACTORY.createLiteral("car", String.class); //$NON-NLS-1$
+ helpTestMod(arg1, "PATH('car')", "PATH"); //$NON-NLS-1$
+ }
+
+ public void test2() throws Exception {
+ helpTestMod(null, "PATH()", "PATH"); //$NON-NLS-1$
+ }
+
+
+}
+
Property changes on: branches/7.1.x/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/modeshape/TestPathFunctionModifier.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: branches/7.1.x/connectors/translator-jdbc/src/test/resources/ModeShape.vdb
===================================================================
(Binary files differ)
14 years, 3 months
teiid SVN: r2595 - in branches/7.1.x/engine/src/main/java/org/teiid: query/tempdata and 1 other directory.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2010-09-22 12:59:20 -0400 (Wed, 22 Sep 2010)
New Revision: 2595
Modified:
branches/7.1.x/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java
branches/7.1.x/engine/src/main/java/org/teiid/query/tempdata/TempTableDataManager.java
Log:
TEIID-1212 adding replication support for internal materialization
Modified: branches/7.1.x/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java
===================================================================
--- branches/7.1.x/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java 2010-09-22 16:46:21 UTC (rev 2594)
+++ branches/7.1.x/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java 2010-09-22 16:59:20 UTC (rev 2595)
@@ -211,6 +211,8 @@
private int currentlyActivePlans;
private LinkedList<RequestWorkItem> waitingPlans = new LinkedList<RequestWorkItem>();
private CacheFactory cacheFactory;
+
+ private SessionAwareCache<CachedResults> matTables;
/**
* perform a full shutdown and wait for 10 seconds for all threads to finish
@@ -615,6 +617,9 @@
clearResultSetCache(vdbName, version);
break;
}
+ if (this.matTables != null) {
+ this.matTables.clearForVDB(vdbName, version);
+ }
}
public Collection<org.teiid.adminapi.Transaction> getTransactions() {
@@ -700,7 +705,6 @@
this.processWorkerPool = new ThreadReuseExecutor(DQPConfiguration.PROCESS_PLAN_QUEUE_NAME, config.getMaxThreads());
- SessionAwareCache<CachedResults> matTables = null;
if (cacheFactory.isReplicated()) {
matTables = new SessionAwareCache<CachedResults>();
}
Modified: branches/7.1.x/engine/src/main/java/org/teiid/query/tempdata/TempTableDataManager.java
===================================================================
--- branches/7.1.x/engine/src/main/java/org/teiid/query/tempdata/TempTableDataManager.java 2010-09-22 16:46:21 UTC (rev 2594)
+++ branches/7.1.x/engine/src/main/java/org/teiid/query/tempdata/TempTableDataManager.java 2010-09-22 16:59:20 UTC (rev 2595)
@@ -138,7 +138,8 @@
private static class MatTableEntry implements Serializable {
private static final long serialVersionUID = 8559613701442751579L;
- transient long lastUpdate = System.currentTimeMillis();
+ long lastUpdate = System.currentTimeMillis();
+ boolean valid;
}
private Cache<MatTableKey, MatTableEntry> tables;
@@ -156,7 +157,7 @@
tables = cacheFactory.get(Cache.Type.MATTABLES, cc);
}
}
-
+
public TupleSource registerRequest(
CommandContext context,
Command command,
@@ -303,6 +304,9 @@
LogManager.logDetail(LogConstants.CTX_MATVIEWS, "processing refreshmatview for", matViewName); //$NON-NLS-1$
MatTableInfo info = globalStore.getMatTableInfo(matTableName);
boolean invalidate = Boolean.TRUE.equals(((Constant)proc.getParameter(1).getExpression()).getValue());
+ if (invalidate) {
+ touchTable(context, matTableName, false);
+ }
MatState oldState = info.setState(MatState.NEEDS_LOADING, invalidate?Boolean.FALSE:null, null);
if (oldState == MatState.LOADING) {
return CollectionTupleSource.createUpdateCountTupleSource(-1);
@@ -395,7 +399,7 @@
if (entry != null && entry.lastUpdate > info.getUpdateTime()
&& info.getState() != MatState.LOADING) {
//remote load
- info.setState(MatState.NEEDS_LOADING, null, null);
+ info.setState(MatState.NEEDS_LOADING, entry.valid, null);
loadTime = entry.lastUpdate;
}
}
@@ -497,12 +501,7 @@
BatchCollector bc = qp.createBatchCollector();
TupleBuffer tb = bc.collectTuples();
cr.setResults(tb);
- MatTableKey key = new MatTableKey();
- key.name = fullName;
- key.vdb = new VDBKey(context.getVdbName(), context.getVdbVersion());
- MatTableEntry matTableEntry = new MatTableEntry();
- matTableEntry.lastUpdate = 0;
- tables.put(key, matTableEntry, null);
+ touchTable(context, fullName, true);
this.distributedCache.put(cid, FunctionMethod.VDB_DETERMINISTIC, cr, info.getTtl());
ts = tb.createIndexedTupleSource();
} else {
@@ -541,6 +540,15 @@
return rowCount;
}
+ private void touchTable(CommandContext context, String fullName, boolean valid) {
+ MatTableKey key = new MatTableKey();
+ key.name = fullName;
+ key.vdb = new VDBKey(context.getVdbName(), context.getVdbVersion());
+ MatTableEntry matTableEntry = new MatTableEntry();
+ matTableEntry.valid = valid;
+ tables.put(key, matTableEntry, null);
+ }
+
/**
* Return a list of ElementSymbols for the given index/key object
*/
14 years, 3 months
teiid SVN: r2594 - in branches/7.1.x: documentation/caching-guide/src/main/docbook/en-US/content and 4 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2010-09-22 12:46:21 -0400 (Wed, 22 Sep 2010)
New Revision: 2594
Modified:
branches/7.1.x/cache-jbosscache/src/main/java/org/teiid/cache/jboss/ClusterableCacheFactory.java
branches/7.1.x/cache-jbosscache/src/main/java/org/teiid/cache/jboss/JBossCacheFactory.java
branches/7.1.x/documentation/caching-guide/src/main/docbook/en-US/content/matviews.xml
branches/7.1.x/engine/src/main/java/org/teiid/cache/Cache.java
branches/7.1.x/engine/src/main/java/org/teiid/cache/CacheFactory.java
branches/7.1.x/engine/src/main/java/org/teiid/cache/DefaultCacheFactory.java
branches/7.1.x/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java
branches/7.1.x/engine/src/main/java/org/teiid/dqp/internal/process/SessionAwareCache.java
branches/7.1.x/engine/src/main/java/org/teiid/query/tempdata/TempTableDataManager.java
branches/7.1.x/engine/src/main/java/org/teiid/query/tempdata/TempTableStore.java
branches/7.1.x/engine/src/test/java/org/teiid/query/processor/TestMaterialization.java
branches/7.1.x/engine/src/test/java/org/teiid/query/processor/TestProcessor.java
branches/7.1.x/engine/src/test/java/org/teiid/query/processor/TestTempTables.java
Log:
TEIID-1212 adding replication support for internal materialization
Modified: branches/7.1.x/cache-jbosscache/src/main/java/org/teiid/cache/jboss/ClusterableCacheFactory.java
===================================================================
--- branches/7.1.x/cache-jbosscache/src/main/java/org/teiid/cache/jboss/ClusterableCacheFactory.java 2010-09-21 17:39:11 UTC (rev 2593)
+++ branches/7.1.x/cache-jbosscache/src/main/java/org/teiid/cache/jboss/ClusterableCacheFactory.java 2010-09-22 16:46:21 UTC (rev 2594)
@@ -89,4 +89,12 @@
public void setCacheManager(String mgrName) {
this.cacheManagerName = mgrName;
}
+
+ @Override
+ public boolean isReplicated() {
+ if (delegate == null) {
+ return false;
+ }
+ return delegate.isReplicated();
+ }
}
Modified: branches/7.1.x/cache-jbosscache/src/main/java/org/teiid/cache/jboss/JBossCacheFactory.java
===================================================================
--- branches/7.1.x/cache-jbosscache/src/main/java/org/teiid/cache/jboss/JBossCacheFactory.java 2010-09-21 17:39:11 UTC (rev 2593)
+++ branches/7.1.x/cache-jbosscache/src/main/java/org/teiid/cache/jboss/JBossCacheFactory.java 2010-09-22 16:46:21 UTC (rev 2594)
@@ -113,4 +113,9 @@
public void stop() {
destroy();
}
+
+ @Override
+ public boolean isReplicated() {
+ return true;
+ }
}
Modified: branches/7.1.x/documentation/caching-guide/src/main/docbook/en-US/content/matviews.xml
===================================================================
--- branches/7.1.x/documentation/caching-guide/src/main/docbook/en-US/content/matviews.xml 2010-09-21 17:39:11 UTC (rev 2593)
+++ branches/7.1.x/documentation/caching-guide/src/main/docbook/en-US/content/matviews.xml 2010-09-22 16:46:21 UTC (rev 2594)
@@ -122,7 +122,8 @@
</para>
<section>
<title>TTL Snapshot Refresh</title>
- <para>The <link linkend="cache-hint">cache hint</link> may be used to automatically trigger a full snapshot refresh after a specified time to live.
+ <para>The <link linkend="cache-hint">cache hint</link> may be used to automatically trigger a full snapshot refresh after a specified time to live (ttl).
+ The ttl starts from the time the table is finished loading.
The refresh is equivalent to <code>CALL SYSADMIN.refreshMatView('view name', false)</code>, but performed asynchronously so that user queries do not block on the load.</para>
<example>
<title>Auto-refresh Transformation Query</title>
@@ -178,5 +179,16 @@
</itemizedlist>
</para>
</section>
+ <section>
+ <title>Clustering Considerations</title>
+ <para>Each member in a cluster maintains its own copy of each materialized table and associated indexes.
+ With cache clustering enabled, an additional snapshot copy of the table is maintained for loading by other members.
+ An attempt is made to ensure each member receives the same full refresh events as the others.
+ Full consistency for updatable materialized views however is not guarenteed.
+ Periodic full refreshes of updatable materialized view tables helps ensure consistency among members.
+ <note><para>Loads of materialized tables are not coordinated across the cluster. It is possible for the same ttl expiration to trigger a load at each member.</para></note>
+ In many clustered scenarios using external materialization is advantagious to fully control the loading of the tables and to have materialized data that is durable.
+ </para>
+ </section>
</section>
</chapter>
Modified: branches/7.1.x/engine/src/main/java/org/teiid/cache/Cache.java
===================================================================
--- branches/7.1.x/engine/src/main/java/org/teiid/cache/Cache.java 2010-09-21 17:39:11 UTC (rev 2593)
+++ branches/7.1.x/engine/src/main/java/org/teiid/cache/Cache.java 2010-09-22 16:46:21 UTC (rev 2594)
@@ -29,10 +29,12 @@
*/
public interface Cache<K, V> {
- public enum Type {SESSION("Session"), //$NON-NLS-1$
- RESULTSET("ResultSet"), //$NON-NLS-1$
- RESULTSET_BATCHES(RESULTSET, "batches"), //$NON-NLS-1$
- PREPAREDPLAN("PreparaedPlan"); //$NON-NLS-1$
+ public enum Type {
+ MATTABLES("MatTables"), //$NON-NLS-1$
+ MATTABLEUPDATES("MatTableUpdates"), //$NON-NLS-1$
+ RESULTSET("ResultSet"), //$NON-NLS-1$
+ RESULTSET_BATCHES(RESULTSET, "batches"), //$NON-NLS-1$
+ PREPAREDPLAN("PreparaedPlan"); //$NON-NLS-1$
private String location;
Modified: branches/7.1.x/engine/src/main/java/org/teiid/cache/CacheFactory.java
===================================================================
--- branches/7.1.x/engine/src/main/java/org/teiid/cache/CacheFactory.java 2010-09-21 17:39:11 UTC (rev 2593)
+++ branches/7.1.x/engine/src/main/java/org/teiid/cache/CacheFactory.java 2010-09-22 16:46:21 UTC (rev 2594)
@@ -36,4 +36,10 @@
* Destroy the cache factory and any caches underneath.
*/
void destroy();
+
+ /**
+ * Return true if replicated caches are created by this factory
+ * @return
+ */
+ boolean isReplicated();
}
Modified: branches/7.1.x/engine/src/main/java/org/teiid/cache/DefaultCacheFactory.java
===================================================================
--- branches/7.1.x/engine/src/main/java/org/teiid/cache/DefaultCacheFactory.java 2010-09-21 17:39:11 UTC (rev 2593)
+++ branches/7.1.x/engine/src/main/java/org/teiid/cache/DefaultCacheFactory.java 2010-09-22 16:46:21 UTC (rev 2594)
@@ -49,9 +49,13 @@
@Override
public <K, V> Cache<K, V> get(Type type, CacheConfiguration config) {
if (!destroyed) {
- Cache node = cacheRoot.addChild(type.location());
- return node;
+ return cacheRoot.addChild(type.location());
}
throw new TeiidRuntimeException("Cache system has been shutdown"); //$NON-NLS-1$
}
+
+ @Override
+ public boolean isReplicated() {
+ return false;
+ }
}
Modified: branches/7.1.x/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java
===================================================================
--- branches/7.1.x/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java 2010-09-21 17:39:11 UTC (rev 2593)
+++ branches/7.1.x/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java 2010-09-22 16:46:21 UTC (rev 2594)
@@ -700,8 +700,13 @@
this.processWorkerPool = new ThreadReuseExecutor(DQPConfiguration.PROCESS_PLAN_QUEUE_NAME, config.getMaxThreads());
+ SessionAwareCache<CachedResults> matTables = null;
+ if (cacheFactory.isReplicated()) {
+ matTables = new SessionAwareCache<CachedResults>();
+ }
+
dataTierMgr = new TempTableDataManager(new DataTierManagerImpl(this,
- this.bufferService), this.bufferManager, this.processWorkerPool, this.rsCache);
+ this.bufferService), this.bufferManager, this.processWorkerPool, this.rsCache, matTables, this.cacheFactory);
}
public void setBufferService(BufferService service) {
Modified: branches/7.1.x/engine/src/main/java/org/teiid/dqp/internal/process/SessionAwareCache.java
===================================================================
--- branches/7.1.x/engine/src/main/java/org/teiid/dqp/internal/process/SessionAwareCache.java 2010-09-21 17:39:11 UTC (rev 2593)
+++ branches/7.1.x/engine/src/main/java/org/teiid/dqp/internal/process/SessionAwareCache.java 2010-09-22 16:46:21 UTC (rev 2594)
@@ -182,8 +182,9 @@
private void clearCache(Cache<CacheID, T> cache, String vdbName, int version) {
Set<CacheID> keys = cache.keys();
+ VDBKey vdbKey = new VDBKey(vdbName, version);
for (CacheID key:keys) {
- if (key.vdbInfo.getName().equalsIgnoreCase(vdbName) && key.vdbInfo.getVersion() == version) {
+ if (key.vdbInfo.equals(vdbKey)) {
cache.remove(key);
}
}
Modified: branches/7.1.x/engine/src/main/java/org/teiid/query/tempdata/TempTableDataManager.java
===================================================================
--- branches/7.1.x/engine/src/main/java/org/teiid/query/tempdata/TempTableDataManager.java 2010-09-21 17:39:11 UTC (rev 2593)
+++ branches/7.1.x/engine/src/main/java/org/teiid/query/tempdata/TempTableDataManager.java 2010-09-22 16:46:21 UTC (rev 2594)
@@ -22,6 +22,7 @@
package org.teiid.query.tempdata;
+import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
@@ -36,6 +37,10 @@
import org.teiid.api.exception.query.QueryProcessingException;
import org.teiid.api.exception.query.QueryResolverException;
import org.teiid.api.exception.query.QueryValidatorException;
+import org.teiid.cache.Cache;
+import org.teiid.cache.CacheConfiguration;
+import org.teiid.cache.CacheFactory;
+import org.teiid.cache.CacheConfiguration.Policy;
import org.teiid.common.buffer.BlockedException;
import org.teiid.common.buffer.BufferManager;
import org.teiid.common.buffer.TupleBuffer;
@@ -44,6 +49,7 @@
import org.teiid.core.TeiidComponentException;
import org.teiid.core.TeiidProcessingException;
import org.teiid.core.types.DataTypeManager;
+import org.teiid.core.util.HashCodeUtil;
import org.teiid.core.util.StringUtil;
import org.teiid.dqp.internal.process.CachedResults;
import org.teiid.dqp.internal.process.SessionAwareCache;
@@ -54,6 +60,7 @@
import org.teiid.query.QueryPlugin;
import org.teiid.query.analysis.AnalysisRecord;
import org.teiid.query.eval.Evaluator;
+import org.teiid.query.function.metadata.FunctionMethod;
import org.teiid.query.mapping.relational.QueryNode;
import org.teiid.query.metadata.QueryMetadataInterface;
import org.teiid.query.metadata.TempMetadataID;
@@ -87,6 +94,7 @@
import org.teiid.query.tempdata.TempTableStore.MatState;
import org.teiid.query.tempdata.TempTableStore.MatTableInfo;
import org.teiid.query.util.CommandContext;
+import org.teiid.vdb.runtime.VDBKey;
/**
* This proxy ProcessorDataManager is used to handle temporary tables.
@@ -104,13 +112,49 @@
private BufferManager bufferManager;
private SessionAwareCache<CachedResults> cache;
private Executor executor;
+
+ private static class MatTableKey implements Serializable {
+ private static final long serialVersionUID = 5481692896572663992L;
+ String name;
+ VDBKey vdb;
+
+ @Override
+ public int hashCode() {
+ return HashCodeUtil.hashCode(name.hashCode(), vdb);
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof MatTableKey)) {
+ return false;
+ }
+ MatTableKey other = (MatTableKey)obj;
+ return this.name.equals(other.name) && this.vdb.equals(other.vdb);
+ }
+ }
+
+ private static class MatTableEntry implements Serializable {
+ private static final long serialVersionUID = 8559613701442751579L;
+ transient long lastUpdate = System.currentTimeMillis();
+ }
+
+ private Cache<MatTableKey, MatTableEntry> tables;
+ private SessionAwareCache<CachedResults> distributedCache;
public TempTableDataManager(ProcessorDataManager processorDataManager, BufferManager bufferManager,
- Executor executor, SessionAwareCache<CachedResults> cache){
+ Executor executor, SessionAwareCache<CachedResults> cache, SessionAwareCache<CachedResults> distibutedCache, CacheFactory cacheFactory){
this.processorDataManager = processorDataManager;
this.bufferManager = bufferManager;
this.executor = executor;
this.cache = cache;
+ this.distributedCache = distibutedCache;
+ if (distibutedCache != null) {
+ CacheConfiguration cc = new CacheConfiguration(Policy.LRU, -1, -1);
+ tables = cacheFactory.get(Cache.Type.MATTABLES, cc);
+ }
}
public TupleSource registerRequest(
@@ -259,7 +303,7 @@
LogManager.logDetail(LogConstants.CTX_MATVIEWS, "processing refreshmatview for", matViewName); //$NON-NLS-1$
MatTableInfo info = globalStore.getMatTableInfo(matTableName);
boolean invalidate = Boolean.TRUE.equals(((Constant)proc.getParameter(1).getExpression()).getValue());
- MatState oldState = info.setState(MatState.NEEDS_LOADING, invalidate?Boolean.FALSE:null);
+ MatState oldState = info.setState(MatState.NEEDS_LOADING, invalidate?Boolean.FALSE:null, null);
if (oldState == MatState.LOADING) {
return CollectionTupleSource.createUpdateCountTupleSource(-1);
}
@@ -268,7 +312,7 @@
Object matTableId = RelationalPlanner.getGlobalTempTableMetadataId(group, matTableName, context, metadata, AnalysisRecord.createNonRecordingRecord());
GroupSymbol matTable = new GroupSymbol(matTableName);
matTable.setMetadataID(matTableId);
- int rowCount = loadGlobalTable(context, matTable, matTableName, globalStore, info);
+ int rowCount = loadGlobalTable(context, matTable, matTableName, globalStore, info, null);
return CollectionTupleSource.createUpdateCountTupleSource(rowCount);
} else if (StringUtil.endsWithIgnoreCase(proc.getProcedureCallableName(), REFRESHMATVIEWROW)) {
Object groupID = validateMatView(metadata, proc);
@@ -305,6 +349,7 @@
tuple = Arrays.asList(key.getValue());
}
List<?> result = tempTable.updateTuple(tuple, delete);
+ //TODO: maintain a table log and distribute the events
return CollectionTupleSource.createUpdateCountTupleSource(result != null ? 1 : 0);
}
return null;
@@ -340,20 +385,27 @@
if (group.isGlobalTable()) {
final TempTableStore globalStore = context.getGlobalTableStore();
final MatTableInfo info = globalStore.getMatTableInfo(tableName);
+ Long loadTime = null;
+ if (this.distributedCache != null) {
+ MatTableKey key = new MatTableKey();
+ key.name = tableName;
+ key.vdb = new VDBKey(context.getVdbName(), context.getVdbVersion());
+
+ MatTableEntry entry = this.tables.get(key);
+ if (entry != null && entry.lastUpdate > info.getUpdateTime()
+ && info.getState() != MatState.LOADING) {
+ //remote load
+ info.setState(MatState.NEEDS_LOADING, null, null);
+ loadTime = entry.lastUpdate;
+ }
+ }
boolean load = info.shouldLoad();
if (load) {
if (!info.isValid()) {
//blocking load
- loadGlobalTable(context, group, tableName, globalStore, info);
+ loadGlobalTable(context, group, tableName, globalStore, info, loadTime);
} else {
- Callable<Integer> toCall = new Callable<Integer>() {
- @Override
- public Integer call() throws Exception {
- return loadGlobalTable(context, group, tableName, globalStore, info);
- }
- };
- FutureTask<Integer> task = new FutureTask<Integer>(toCall);
- executor.execute(task);
+ loadAsynch(context, group, tableName, globalStore, info, loadTime);
}
}
table = globalStore.getOrCreateTempTable(tableName, query, bufferManager, false);
@@ -377,9 +429,23 @@
return table.createTupleSource(query.getProjectedSymbols(), query.getCriteria(), query.getOrderBy());
}
+ private void loadAsynch(final CommandContext context,
+ final GroupSymbol group, final String tableName,
+ final TempTableStore globalStore, final MatTableInfo info,
+ final Long loadTime) {
+ Callable<Integer> toCall = new Callable<Integer>() {
+ @Override
+ public Integer call() throws Exception {
+ return loadGlobalTable(context, group, tableName, globalStore, info, loadTime);
+ }
+ };
+ FutureTask<Integer> task = new FutureTask<Integer>(toCall);
+ executor.execute(task);
+ }
+
private int loadGlobalTable(CommandContext context,
GroupSymbol group, final String tableName,
- TempTableStore globalStore, MatTableInfo info)
+ TempTableStore globalStore, MatTableInfo info, Long loadTime)
throws TeiidComponentException, TeiidProcessingException {
LogManager.logInfo(LogConstants.CTX_MATVIEWS, QueryPlugin.Util.getString("TempTableDataManager.loading", tableName)); //$NON-NLS-1$
QueryMetadataInterface metadata = context.getMetadata();
@@ -408,11 +474,42 @@
int rowCount = -1;
try {
String fullName = metadata.getFullName(group.getMetadataID());
- //TODO: order by primary key nulls first - then have an insert ordered optimization
- String transformation = metadata.getVirtualPlan(group.getMetadataID()).getQuery();
- QueryProcessor qp = context.getQueryProcessorFactory().createQueryProcessor(transformation, fullName, context);
- qp.setNonBlocking(true);
- TupleSource ts = new BatchCollector.BatchProducerTupleSource(qp);
+ TupleSource ts = null;
+ CacheID cid = null;
+ if (distributedCache != null) {
+ cid = new CacheID(new ParseInfo(), fullName, context.getVdbName(),
+ context.getVdbVersion(), context.getConnectionID(), context.getUserName());
+ CachedResults cr = this.distributedCache.get(cid);
+ if (cr != null) {
+ ts = cr.getResults().createIndexedTupleSource();
+ }
+ }
+
+ if (ts == null) {
+ //TODO: coordinate a distributed load
+ //TODO: order by primary key nulls first - then have an insert ordered optimization
+ String transformation = metadata.getVirtualPlan(group.getMetadataID()).getQuery();
+ QueryProcessor qp = context.getQueryProcessorFactory().createQueryProcessor(transformation, fullName, context);
+ qp.setNonBlocking(true);
+
+ if (distributedCache != null) {
+ CachedResults cr = new CachedResults();
+ BatchCollector bc = qp.createBatchCollector();
+ TupleBuffer tb = bc.collectTuples();
+ cr.setResults(tb);
+ MatTableKey key = new MatTableKey();
+ key.name = fullName;
+ key.vdb = new VDBKey(context.getVdbName(), context.getVdbVersion());
+ MatTableEntry matTableEntry = new MatTableEntry();
+ matTableEntry.lastUpdate = 0;
+ tables.put(key, matTableEntry, null);
+ this.distributedCache.put(cid, FunctionMethod.VDB_DETERMINISTIC, cr, info.getTtl());
+ ts = tb.createIndexedTupleSource();
+ } else {
+ ts = new BatchCollector.BatchProducerTupleSource(qp);
+ }
+ }
+
//TODO: if this insert fails, it's unnecessary to do the undo processing
table.insert(ts, table.getColumns());
rowCount = table.getRowCount();
@@ -434,10 +531,10 @@
throw e;
} finally {
if (rowCount == -1) {
- info.setState(MatState.FAILED_LOAD, null);
+ info.setState(MatState.FAILED_LOAD, null, null);
} else {
globalStore.swapTempTable(tableName, table);
- info.setState(MatState.LOADED, true);
+ info.setState(MatState.LOADED, true, loadTime);
LogManager.logInfo(LogConstants.CTX_MATVIEWS, QueryPlugin.Util.getString("TempTableDataManager.loaded", tableName, rowCount)); //$NON-NLS-1$
}
}
Modified: branches/7.1.x/engine/src/main/java/org/teiid/query/tempdata/TempTableStore.java
===================================================================
--- branches/7.1.x/engine/src/main/java/org/teiid/query/tempdata/TempTableStore.java 2010-09-21 17:39:11 UTC (rev 2593)
+++ branches/7.1.x/engine/src/main/java/org/teiid/query/tempdata/TempTableStore.java 2010-09-22 16:46:21 UTC (rev 2594)
@@ -84,16 +84,19 @@
}
}
- public synchronized MatState setState(MatState state, Boolean valid) {
+ public synchronized MatState setState(MatState state, Boolean valid, Long timestamp) {
MatState oldState = this.state;
if (valid != null) {
this.valid = valid;
}
setState(state);
+ if (timestamp != null) {
+ this.updateTime = timestamp;
+ }
notifyAll();
return oldState;
}
-
+
private void setState(MatState state) {
this.state = state;
this.updateTime = System.currentTimeMillis();
@@ -115,6 +118,10 @@
return valid;
}
+ public synchronized long getTtl() {
+ return ttl;
+ }
+
}
private ConcurrentHashMap<String, MatTableInfo> matTables = new ConcurrentHashMap<String, MatTableInfo>();
Modified: branches/7.1.x/engine/src/test/java/org/teiid/query/processor/TestMaterialization.java
===================================================================
--- branches/7.1.x/engine/src/test/java/org/teiid/query/processor/TestMaterialization.java 2010-09-21 17:39:11 UTC (rev 2593)
+++ branches/7.1.x/engine/src/test/java/org/teiid/query/processor/TestMaterialization.java 2010-09-22 16:46:21 UTC (rev 2594)
@@ -31,6 +31,7 @@
import org.junit.Before;
import org.junit.Test;
+import org.teiid.cache.DefaultCacheFactory;
import org.teiid.common.buffer.BufferManager;
import org.teiid.common.buffer.BufferManagerFactory;
import org.teiid.core.TeiidProcessingException;
@@ -73,7 +74,7 @@
command.run();
}
};
- dataManager = new TempTableDataManager(hdm, bm, executor, cache);
+ dataManager = new TempTableDataManager(hdm, bm, executor, cache, cache, new DefaultCacheFactory());
}
private void execute(String sql, List<?>... expectedResults) throws Exception {
Modified: branches/7.1.x/engine/src/test/java/org/teiid/query/processor/TestProcessor.java
===================================================================
--- branches/7.1.x/engine/src/test/java/org/teiid/query/processor/TestProcessor.java 2010-09-21 17:39:11 UTC (rev 2593)
+++ branches/7.1.x/engine/src/test/java/org/teiid/query/processor/TestProcessor.java 2010-09-22 16:46:21 UTC (rev 2594)
@@ -254,7 +254,7 @@
command.run();
}
};
- dataManager = new TempTableDataManager(dataManager, bufferMgr, executor, cache);
+ dataManager = new TempTableDataManager(dataManager, bufferMgr, executor, cache, null, null);
}
if (context.getQueryProcessorFactory() == null) {
context.setQueryProcessorFactory(new QueryProcessorFactoryImpl(bufferMgr, dataManager, new DefaultCapabilitiesFinder(), null, context.getMetadata()));
Modified: branches/7.1.x/engine/src/test/java/org/teiid/query/processor/TestTempTables.java
===================================================================
--- branches/7.1.x/engine/src/test/java/org/teiid/query/processor/TestTempTables.java 2010-09-21 17:39:11 UTC (rev 2593)
+++ branches/7.1.x/engine/src/test/java/org/teiid/query/processor/TestTempTables.java 2010-09-22 16:46:21 UTC (rev 2594)
@@ -75,7 +75,7 @@
command.run();
}
};
- dataManager = new TempTableDataManager(fdm, bm, executor, cache);
+ dataManager = new TempTableDataManager(fdm, bm, executor, cache, null, null);
}
@Test public void testInsertWithQueryExpression() throws Exception {
14 years, 3 months