teiid SVN: r1543 - in trunk/engine/src: test/java/com/metamatrix/common/buffer/impl and 8 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2009-10-26 21:18:06 -0400 (Mon, 26 Oct 2009)
New Revision: 1543
Added:
trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestConnectorCapabilitiesFinder.java
Removed:
trunk/engine/src/test/java/org/teiid/dqp/internal/process/capabilities/
Modified:
trunk/engine/src/main/resources/com/metamatrix/dqp/i18n.properties
trunk/engine/src/test/java/com/metamatrix/common/buffer/impl/TestBufferManagerImpl.java
trunk/engine/src/test/java/com/metamatrix/query/optimizer/TestAggregatePushdown.java
trunk/engine/src/test/java/com/metamatrix/query/optimizer/TestExpressionsInGroupBy.java
trunk/engine/src/test/java/com/metamatrix/query/optimizer/TestJoinOptimization.java
trunk/engine/src/test/java/com/metamatrix/query/optimizer/TestOptimizer.java
trunk/engine/src/test/java/com/metamatrix/query/optimizer/TestRuleMergeVirtual.java
trunk/engine/src/test/java/com/metamatrix/query/optimizer/TestRuleRaiseNull.java
trunk/engine/src/test/java/com/metamatrix/query/optimizer/TestSubqueryPushdown.java
trunk/engine/src/test/java/com/metamatrix/query/optimizer/batch/TestBatchedUpdatePlanner.java
trunk/engine/src/test/java/com/metamatrix/query/optimizer/capabilities/FakeCapabilitiesFinder.java
trunk/engine/src/test/java/com/metamatrix/query/optimizer/relational/rules/TestCapabilitiesUtil.java
trunk/engine/src/test/java/com/metamatrix/query/optimizer/relational/rules/TestRuleAccessPatternValidation.java
trunk/engine/src/test/java/com/metamatrix/query/processor/TestProcedureRelational.java
trunk/engine/src/test/java/com/metamatrix/query/processor/TestProcessor.java
trunk/engine/src/test/java/com/metamatrix/query/processor/TestSetProcessing.java
trunk/engine/src/test/java/com/metamatrix/query/processor/relational/TestSortNode.java
trunk/engine/src/test/java/com/metamatrix/query/processor/xml/TestXMLProcessor.java
Log:
TEIID-203 correctly implementing the check for supportsSelectExpression. also merging Connector and Shared capabilities finders, and removing TypeRetrievalUtil
Modified: trunk/engine/src/main/resources/com/metamatrix/dqp/i18n.properties
===================================================================
--- trunk/engine/src/main/resources/com/metamatrix/dqp/i18n.properties 2009-10-27 01:16:42 UTC (rev 1542)
+++ trunk/engine/src/main/resources/com/metamatrix/dqp/i18n.properties 2009-10-27 01:18:06 UTC (rev 1543)
@@ -502,4 +502,35 @@
TransformationMetadata.No_metadata_info_available_for_the_index_with_UUID_{0}._1=No metadata info available for the index with UUID {0}.
TransformationMetadata.Ambigous_index_with_UUID_{0},_found_multiple_indexes_with_the_given_UUID._2=Ambigous 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.Ambigous_index_with_UUID_{0},_found_multiple_indexes_with_the_given_UUID._2=Ambigous 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
\ No newline at end of file
Modified: trunk/engine/src/test/java/com/metamatrix/common/buffer/impl/TestBufferManagerImpl.java
===================================================================
--- trunk/engine/src/test/java/com/metamatrix/common/buffer/impl/TestBufferManagerImpl.java 2009-10-27 01:16:42 UTC (rev 1542)
+++ trunk/engine/src/test/java/com/metamatrix/common/buffer/impl/TestBufferManagerImpl.java 2009-10-27 01:18:06 UTC (rev 1543)
@@ -30,6 +30,7 @@
import java.io.InputStreamReader;
import java.io.Reader;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.List;
import java.util.Properties;
import java.util.Random;
@@ -58,6 +59,7 @@
import com.metamatrix.common.types.SQLXMLImpl;
import com.metamatrix.common.types.XMLType;
import com.metamatrix.core.util.UnitTestUtil;
+import com.metamatrix.query.sql.symbol.ElementSymbol;
/**
*/
@@ -87,11 +89,10 @@
List expectedRows = new ArrayList();
- List schema = new ArrayList();
- schema.add("col"); //$NON-NLS-1$
- String[] schemaTypes = new String[] {DataTypeManager.DefaultDataTypes.STRING};
+ List<ElementSymbol> schema = Arrays.asList(new ElementSymbol("col")); //$NON-NLS-1$
+ schema.get(0).setType(DataTypeManager.DefaultDataClasses.STRING);
- TupleSourceID tsID = mgr.createTupleSource(schema, schemaTypes, null, TupleSourceType.PROCESSOR);
+ TupleSourceID tsID = mgr.createTupleSource(schema, null, TupleSourceType.PROCESSOR);
long batchSize = -1;
for(int b=0; b<numBatches; b++) {
@@ -211,9 +212,10 @@
XMLType xml1 = new XMLType(new SQLXMLImpl("<foo/>")); //$NON-NLS-1$
XMLType xml2 = new XMLType(new SQLXMLImpl("<bar/>")); //$NON-NLS-1$
- List schema = new ArrayList();
- schema.add("xml"); //$NON-NLS-1$
- final TupleSourceID id = mgr.createTupleSource(schema, new String[] {DataTypeManager.DefaultDataTypes.XML}, "GROUP1", TupleSourceType.PROCESSOR); //$NON-NLS-1$
+ List<ElementSymbol> schema = Arrays.asList(new ElementSymbol("col")); //$NON-NLS-1$
+ schema.get(0).setType(DataTypeManager.DefaultDataClasses.XML);
+
+ final TupleSourceID id = mgr.createTupleSource(schema, "GROUP1", TupleSourceType.PROCESSOR); //$NON-NLS-1$
List xmlList1 = new ArrayList();
xmlList1.add(xml1);
@@ -232,7 +234,7 @@
assertNotNull(mgr.getStreamable(id, xml1.getReferenceStreamId()));
- final TupleSourceID id1 = mgr.createTupleSource(schema, new String[] {DataTypeManager.DefaultDataTypes.XML}, "GROUP1", TupleSourceType.PROCESSOR); //$NON-NLS-1$
+ final TupleSourceID id1 = mgr.createTupleSource(schema, "GROUP1", TupleSourceType.PROCESSOR); //$NON-NLS-1$
TupleBatch batch1 = new TupleBatch(1, new List[] {xmlList1, xmlList2});
mgr.addTupleBatch(id1, batch1);
@@ -246,9 +248,10 @@
final BufferManager mgr = getTestBufferManager(1, createFakeDatabaseStorageManager());
// save the lob
- List schema = new ArrayList();
- schema.add("xml"); //$NON-NLS-1$
- final TupleSourceID id = mgr.createTupleSource(schema, new String[] {DataTypeManager.DefaultDataTypes.XML}, "GROUP1", TupleSourceType.PROCESSOR); //$NON-NLS-1$
+ List<ElementSymbol> schema = Arrays.asList(new ElementSymbol("col")); //$NON-NLS-1$
+ schema.get(0).setType(DataTypeManager.DefaultDataClasses.XML);
+
+ final TupleSourceID id = mgr.createTupleSource(schema, "GROUP1", TupleSourceType.PROCESSOR); //$NON-NLS-1$
ByteLobChunkStream stream = new ByteLobChunkStream(new FileInputStream(UnitTestUtil.getTestDataPath()+"/LicenseMappingExample.xml"), 11); //$NON-NLS-1$
int i = 1;
@@ -306,12 +309,11 @@
@Test public void testPinning1() throws Exception {
BufferManager mgr = getTestBufferManager(1, createFakeDatabaseStorageManager());
- List schema = new ArrayList();
- schema.add("val"); //$NON-NLS-1$
- schema.add("col"); //$NON-NLS-1$
+ List<ElementSymbol> schema = Arrays.asList(new ElementSymbol("val"), new ElementSymbol("col")); //$NON-NLS-1$ //$NON-NLS-2$
+ schema.get(0).setType(DataTypeManager.DefaultDataClasses.INTEGER);
+ schema.get(1).setType(DataTypeManager.DefaultDataClasses.STRING);
String group = "test"; //$NON-NLS-1$
- String[] schemaTypes = new String[] {DataTypeManager.DefaultDataTypes.INTEGER, DataTypeManager.DefaultDataTypes.STRING};
- TupleSourceID tsID = mgr.createTupleSource(schema, schemaTypes, group, TupleSourceType.PROCESSOR);
+ TupleSourceID tsID = mgr.createTupleSource(schema, group, TupleSourceType.PROCESSOR);
// Add some batches, 1000 at a time
int maxRows = 4000;
@@ -337,12 +339,12 @@
@Test public void testUnpinOfUnpinnedBatch() throws Exception {
BufferManager mgr = getTestBufferManager(1, createFakeDatabaseStorageManager());
- List schema = new ArrayList();
- schema.add("val"); //$NON-NLS-1$
- schema.add("col"); //$NON-NLS-1$
+ List<ElementSymbol> schema = Arrays.asList(new ElementSymbol("val"), new ElementSymbol("col")); //$NON-NLS-1$ //$NON-NLS-2$
+ schema.get(0).setType(DataTypeManager.DefaultDataClasses.INTEGER);
+ schema.get(1).setType(DataTypeManager.DefaultDataClasses.STRING);
+
String group = "test"; //$NON-NLS-1$
- String[] schemaTypes = new String[] {DataTypeManager.DefaultDataTypes.INTEGER, DataTypeManager.DefaultDataTypes.STRING};
- TupleSourceID tsID = mgr.createTupleSource(schema, schemaTypes, group, TupleSourceType.PROCESSOR);
+ TupleSourceID tsID = mgr.createTupleSource(schema, group, TupleSourceType.PROCESSOR);
// Add some batches, 1000 at a time
int maxRows = 4000;
@@ -399,9 +401,9 @@
@Test public void testDeadlockOnMultiThreadClean() throws Exception {
BufferManager mgr = getTestBufferManager(1, createFakeDatabaseStorageManager());
- List schema = new ArrayList();
- schema.add("val"); //$NON-NLS-1$
- String[] schemaTypes = new String[] {DataTypeManager.DefaultDataTypes.STRING};
+ List<ElementSymbol> schema = Arrays.asList(new ElementSymbol("col")); //$NON-NLS-1$
+ schema.get(0).setType(DataTypeManager.DefaultDataClasses.STRING);
+
String group = "test"; //$NON-NLS-1$
int count = 20;
int pins = 50;
@@ -414,7 +416,7 @@
// Setup
for(int t=0; t<count; t++) {
- ids[t] = mgr.createTupleSource(schema, schemaTypes, group, TupleSourceType.PROCESSOR);
+ ids[t] = mgr.createTupleSource(schema, group, TupleSourceType.PROCESSOR);
for(int i=1; i<(batches*rowsPerBatch); i=i+rowsPerBatch) {
mgr.addTupleBatch(ids[t], exampleBigBatch(i, i+rowsPerBatch-1, rowSize));
}
@@ -437,12 +439,12 @@
BufferManager mgr = getTestBufferManager(1, createFakeDatabaseStorageManager());
TupleSourceID tsID = null;
try {
- List schema = new ArrayList();
- schema.add("val"); //$NON-NLS-1$
- schema.add("col"); //$NON-NLS-1$
+ List<ElementSymbol> schema = Arrays.asList(new ElementSymbol("val"), new ElementSymbol("col")); //$NON-NLS-1$ //$NON-NLS-2$
+ schema.get(0).setType(DataTypeManager.DefaultDataClasses.INTEGER);
+ schema.get(1).setType(DataTypeManager.DefaultDataClasses.STRING);
+
String group = "test"; //$NON-NLS-1$
- String[] schemaTypes = new String[] {DataTypeManager.DefaultDataTypes.INTEGER, DataTypeManager.DefaultDataTypes.STRING};
- tsID = mgr.createTupleSource(schema, schemaTypes, group, TupleSourceType.PROCESSOR);
+ tsID = mgr.createTupleSource(schema, group, TupleSourceType.PROCESSOR);
// Add some batches, 1000 at a time
int maxRows = 10000;
@@ -476,11 +478,10 @@
*/
@Test public void testDefect_18499() throws Exception {
BufferManager mgr = getTestBufferManager(1, createFakeDatabaseStorageManager());
- List schema = new ArrayList();
- schema.add("col"); //$NON-NLS-1$
- String[] schemaTypes = new String[] {DataTypeManager.DefaultDataTypes.STRING};
+ List<ElementSymbol> schema = Arrays.asList(new ElementSymbol("col")); //$NON-NLS-1$
+ schema.get(0).setType(DataTypeManager.DefaultDataClasses.STRING);
- TupleSourceID tsID = mgr.createTupleSource(schema, schemaTypes, null, TupleSourceType.PROCESSOR);
+ TupleSourceID tsID = mgr.createTupleSource(schema, null, TupleSourceType.PROCESSOR);
mgr.addTupleBatch(tsID, exampleBigBatch(1, 1000, 512));
mgr.setStatus(tsID, TupleSourceStatus.FULL);
TupleSource ts = mgr.getTupleSource(tsID);
@@ -499,12 +500,12 @@
BufferManager mgr = getTestBufferManager(1, createFakeDatabaseStorageManager());
TupleSourceID tsID = null;
try {
- List schema = new ArrayList();
- schema.add("val"); //$NON-NLS-1$
- schema.add("col"); //$NON-NLS-1$
+ List<ElementSymbol> schema = Arrays.asList(new ElementSymbol("val"), new ElementSymbol("col")); //$NON-NLS-1$ //$NON-NLS-2$
+ schema.get(0).setType(DataTypeManager.DefaultDataClasses.INTEGER);
+ schema.get(1).setType(DataTypeManager.DefaultDataClasses.STRING);
+
String group = "test"; //$NON-NLS-1$
- String[] schemaTypes = new String[] {DataTypeManager.DefaultDataTypes.INTEGER, DataTypeManager.DefaultDataTypes.STRING};
- tsID = mgr.createTupleSource(schema, schemaTypes, group, TupleSourceType.PROCESSOR);
+ tsID = mgr.createTupleSource(schema, group, TupleSourceType.PROCESSOR);
// Add some batches, 1000 at a time
int maxRows = 10000;
@@ -527,20 +528,16 @@
@Test public void testDefect19325() throws Exception{
BufferManagerImpl mgr = (BufferManagerImpl)getTestBufferManager(1, createFakeDatabaseStorageManager());
TupleSourceID tsID = null;
- List schema = new ArrayList();
- schema.add("val"); //$NON-NLS-1$
- schema.add("col"); //$NON-NLS-1$
+ List<ElementSymbol> schema = Arrays.asList(new ElementSymbol("val"), new ElementSymbol("col")); //$NON-NLS-1$ //$NON-NLS-2$
+ schema.get(0).setType(DataTypeManager.DefaultDataClasses.INTEGER);
+ schema.get(1).setType(DataTypeManager.DefaultDataClasses.STRING);
+
String group = "test1"; //$NON-NLS-1$
- String[] schemaTypes = new String[] {DataTypeManager.DefaultDataTypes.INTEGER, DataTypeManager.DefaultDataTypes.STRING};
- tsID = mgr.createTupleSource(schema, schemaTypes, group, TupleSourceType.PROCESSOR);
+ tsID = mgr.createTupleSource(schema, group, TupleSourceType.PROCESSOR);
TupleSourceID tsID2 = null;
- schema = new ArrayList();
- schema.add("val"); //$NON-NLS-1$
- schema.add("col"); //$NON-NLS-1$
group = "test2"; //$NON-NLS-1$
- schemaTypes = new String[] {DataTypeManager.DefaultDataTypes.INTEGER, DataTypeManager.DefaultDataTypes.STRING};
- tsID2 = mgr.createTupleSource(schema, schemaTypes, group, TupleSourceType.PROCESSOR);
+ tsID2 = mgr.createTupleSource(schema, group, TupleSourceType.PROCESSOR);
// Add some batches, 1000 at a time
int maxRows = 50000;
@@ -564,12 +561,12 @@
BufferManager mgr = getTestBufferManager(50, createFakeDatabaseStorageManager());
TupleSourceID tsID = null;
try {
- List schema = new ArrayList();
- schema.add("val"); //$NON-NLS-1$
- schema.add("col"); //$NON-NLS-1$
+ List<ElementSymbol> schema = Arrays.asList(new ElementSymbol("val"), new ElementSymbol("col")); //$NON-NLS-1$ //$NON-NLS-2$
+ schema.get(0).setType(DataTypeManager.DefaultDataClasses.INTEGER);
+ schema.get(1).setType(DataTypeManager.DefaultDataClasses.STRING);
+
String group = "test"; //$NON-NLS-1$
- String[] schemaTypes = new String[] {DataTypeManager.DefaultDataTypes.INTEGER, DataTypeManager.DefaultDataTypes.STRING};
- tsID = mgr.createTupleSource(schema, schemaTypes, group, TupleSourceType.PROCESSOR);
+ tsID = mgr.createTupleSource(schema, group, TupleSourceType.PROCESSOR);
// Add some batches
int maxRows = 10000;
@@ -597,12 +594,12 @@
@Test public void testPinning2() throws Exception {
BufferManager mgr = getTestBufferManager(1, createFakeDatabaseStorageManager());
- List schema = new ArrayList();
- schema.add("val"); //$NON-NLS-1$
- schema.add("col"); //$NON-NLS-1$
+ List<ElementSymbol> schema = Arrays.asList(new ElementSymbol("val"), new ElementSymbol("col")); //$NON-NLS-1$ //$NON-NLS-2$
+ schema.get(0).setType(DataTypeManager.DefaultDataClasses.INTEGER);
+ schema.get(1).setType(DataTypeManager.DefaultDataClasses.STRING);
+
String group = "test"; //$NON-NLS-1$
- String[] schemaTypes = new String[] {DataTypeManager.DefaultDataTypes.INTEGER, DataTypeManager.DefaultDataTypes.STRING};
- TupleSourceID tsID = mgr.createTupleSource(schema, schemaTypes, group, TupleSourceType.PROCESSOR);
+ TupleSourceID tsID = mgr.createTupleSource(schema, group, TupleSourceType.PROCESSOR);
// Add some batches, 1000 at a time
int maxRows = 4000;
Modified: trunk/engine/src/test/java/com/metamatrix/query/optimizer/TestAggregatePushdown.java
===================================================================
--- trunk/engine/src/test/java/com/metamatrix/query/optimizer/TestAggregatePushdown.java 2009-10-27 01:16:42 UTC (rev 1542)
+++ trunk/engine/src/test/java/com/metamatrix/query/optimizer/TestAggregatePushdown.java 2009-10-27 01:18:06 UTC (rev 1543)
@@ -28,6 +28,8 @@
import com.metamatrix.query.optimizer.TestOptimizer.ComparisonMode;
import com.metamatrix.query.optimizer.capabilities.BasicSourceCapabilities;
+import com.metamatrix.query.optimizer.capabilities.CapabilitiesFinder;
+import com.metamatrix.query.optimizer.capabilities.DefaultCapabilitiesFinder;
import com.metamatrix.query.optimizer.capabilities.FakeCapabilitiesFinder;
import com.metamatrix.query.optimizer.capabilities.SourceCapabilities.Capability;
import com.metamatrix.query.processor.ProcessorPlan;
@@ -50,13 +52,8 @@
return caps;
}
- private FakeCapabilitiesFinder getAggregatesFinder() {
- FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
- BasicSourceCapabilities caps = getAggregateCapabilities();
- capFinder.addCapabilities("m1", caps); //$NON-NLS-1$
- capFinder.addCapabilities("m2", caps); //$NON-NLS-1$
-
- return capFinder;
+ public static CapabilitiesFinder getAggregatesFinder() {
+ return new DefaultCapabilitiesFinder(getAggregateCapabilities());
}
@Test public void testCase6327() {
Modified: trunk/engine/src/test/java/com/metamatrix/query/optimizer/TestExpressionsInGroupBy.java
===================================================================
--- trunk/engine/src/test/java/com/metamatrix/query/optimizer/TestExpressionsInGroupBy.java 2009-10-27 01:16:42 UTC (rev 1542)
+++ trunk/engine/src/test/java/com/metamatrix/query/optimizer/TestExpressionsInGroupBy.java 2009-10-27 01:18:06 UTC (rev 1543)
@@ -46,10 +46,10 @@
// Create capabilities
FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
BasicSourceCapabilities caps = new BasicSourceCapabilities();
+ caps.setCapabilitySupport(Capability.QUERY_SELECT_EXPRESSION, true);
caps.setCapabilitySupport(Capability.QUERY_GROUP_BY, true);
caps.setCapabilitySupport(Capability.QUERY_AGGREGATES_COUNT_STAR, true);
caps.setCapabilitySupport(Capability.QUERY_FROM_GROUP_ALIAS, true);
- caps.setCapabilitySupport(Capability.QUERY_FUNCTIONS_IN_GROUP_BY, true);
caps.setCapabilitySupport(Capability.QUERY_FROM_INLINE_VIEWS, true);
caps.setFunctionSupport("convert", true); //$NON-NLS-1$
capFinder.addCapabilities("BQT1", caps); //$NON-NLS-1$
@@ -70,10 +70,10 @@
// Create capabilities
FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
BasicSourceCapabilities caps = new BasicSourceCapabilities();
+ caps.setCapabilitySupport(Capability.QUERY_SELECT_EXPRESSION, true);
caps.setCapabilitySupport(Capability.QUERY_GROUP_BY, true);
caps.setCapabilitySupport(Capability.QUERY_AGGREGATES_COUNT_STAR, true);
caps.setCapabilitySupport(Capability.QUERY_FROM_GROUP_ALIAS, true);
- caps.setCapabilitySupport(Capability.QUERY_FUNCTIONS_IN_GROUP_BY, true);
caps.setCapabilitySupport(Capability.QUERY_FROM_INLINE_VIEWS, true);
caps.setFunctionSupport("convert", true); //$NON-NLS-1$
capFinder.addCapabilities("BQT1", caps); //$NON-NLS-1$
@@ -222,6 +222,7 @@
// Plan query
FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
BasicSourceCapabilities caps = new BasicSourceCapabilities();
+ caps.setCapabilitySupport(Capability.QUERY_SELECT_EXPRESSION, true);
caps.setCapabilitySupport(Capability.QUERY_CASE, true);
caps.setCapabilitySupport(Capability.QUERY_SEARCHED_CASE, true);
caps.setCapabilitySupport(Capability.QUERY_AGGREGATES_SUM, true);
Modified: trunk/engine/src/test/java/com/metamatrix/query/optimizer/TestJoinOptimization.java
===================================================================
--- trunk/engine/src/test/java/com/metamatrix/query/optimizer/TestJoinOptimization.java 2009-10-27 01:16:42 UTC (rev 1542)
+++ trunk/engine/src/test/java/com/metamatrix/query/optimizer/TestJoinOptimization.java 2009-10-27 01:18:06 UTC (rev 1543)
@@ -407,24 +407,9 @@
String sql = "select bqt1.smalla.intkey, bqt2.smalla.intkey from bqt1.smalla left outer join bqt2.smalla on (bqt1.smalla.stringkey = bqt2.smalla.intkey and bqt2.smalla.intkey = null)"; //$NON-NLS-1$
// Plan query
- ProcessorPlan plan = TestOptimizer.helpPlan(sql, FakeMetadataFactory.exampleBQTCached(), new String[] {"SELECT bqt1.smalla.intkey FROM bqt1.smalla"}); //$NON-NLS-1$
+ ProcessorPlan plan = TestOptimizer.helpPlan(sql, FakeMetadataFactory.exampleBQTCached(), new String[] {"SELECT bqt1.smalla.intkey, null FROM bqt1.smalla"}); //$NON-NLS-1$
- TestOptimizer.checkNodeTypes(plan, new int[] {
- 1, // Access
- 0, // DependentAccess
- 0, // DependentSelect
- 0, // DependentProject
- 0, // DupRemove
- 0, // Grouping
- 0, // Join
- 0, // MergeJoin
- 0, // Null
- 0, // PlanExecution
- 1, // Project
- 0, // Select
- 0, // Sort
- 0 // UnionAll
- });
+ TestOptimizer.checkNodeTypes(plan, TestOptimizer.FULL_PUSHDOWN);
}
@Test public void testPushMultiGroupJoinCriteria() throws Exception {
@@ -884,6 +869,7 @@
FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
BasicSourceCapabilities caps = new BasicSourceCapabilities();
+ caps.setCapabilitySupport(Capability.QUERY_SELECT_EXPRESSION, true);
caps.setCapabilitySupport(Capability.CRITERIA_COMPARE_EQ, true);
caps.setCapabilitySupport(Capability.CRITERIA_COMPARE_EQ, true);
caps.setCapabilitySupport(Capability.QUERY_FROM_JOIN_INNER, true);
Modified: trunk/engine/src/test/java/com/metamatrix/query/optimizer/TestOptimizer.java
===================================================================
--- trunk/engine/src/test/java/com/metamatrix/query/optimizer/TestOptimizer.java 2009-10-27 01:16:42 UTC (rev 1542)
+++ trunk/engine/src/test/java/com/metamatrix/query/optimizer/TestOptimizer.java 2009-10-27 01:18:06 UTC (rev 1543)
@@ -49,7 +49,6 @@
import com.metamatrix.query.optimizer.capabilities.CapabilitiesFinder;
import com.metamatrix.query.optimizer.capabilities.DefaultCapabilitiesFinder;
import com.metamatrix.query.optimizer.capabilities.FakeCapabilitiesFinder;
-import com.metamatrix.query.optimizer.capabilities.SourceCapabilities;
import com.metamatrix.query.optimizer.capabilities.SourceCapabilities.Capability;
import com.metamatrix.query.optimizer.relational.AliasGenerator;
import com.metamatrix.query.optimizer.relational.rules.CapabilitiesUtil;
@@ -130,6 +129,7 @@
public static BasicSourceCapabilities getTypicalCapabilities() {
BasicSourceCapabilities caps = new BasicSourceCapabilities();
caps.setCapabilitySupport(Capability.QUERY_SELECT_DISTINCT, true);
+ caps.setCapabilitySupport(Capability.QUERY_SELECT_EXPRESSION, true);
caps.setCapabilitySupport(Capability.QUERY_FROM_JOIN_INNER, true);
caps.setCapabilitySupport(Capability.QUERY_FROM_JOIN_OUTER, true);
caps.setCapabilitySupport(Capability.QUERY_FROM_JOIN_OUTER_FULL, true);
@@ -157,12 +157,7 @@
caps.setCapabilitySupport(Capability.QUERY_FROM_JOIN_INNER, false);
caps.setCapabilitySupport(Capability.QUERY_ORDERBY, false);
}
- CapabilitiesFinder finder = new CapabilitiesFinder() {
- public SourceCapabilities findCapabilities(String modelName) throws MetaMatrixComponentException {
- return caps;
- }
- };
- return finder;
+ return new DefaultCapabilitiesFinder(caps);
}
public static CapabilitiesFinder getGenericFinder() {
@@ -953,16 +948,16 @@
public void testPushCriteriaThroughUnion11() {
helpPlan("select * from vm1.u8 where const = 's3' or e1 is null", example1(), //$NON-NLS-1$
- new String[] { "SELECT e1 FROM pm1.g3", //$NON-NLS-1$
- "SELECT e1 FROM pm1.g2 WHERE e1 IS NULL", //$NON-NLS-1$
- "SELECT e1 FROM pm1.g1 WHERE e1 IS NULL" } ); //$NON-NLS-1$
+ new String[] { "SELECT 's3', e1 FROM pm1.g3", //$NON-NLS-1$
+ "SELECT 's2', e1 FROM pm1.g2 WHERE e1 IS NULL", //$NON-NLS-1$
+ "SELECT 's1', e1 FROM pm1.g1 WHERE e1 IS NULL" } ); //$NON-NLS-1$
}
public void testPushCriteriaThroughUnion12() {
helpPlan("select * from vm1.u8 where const = 's1' or e1 is null", example1(), //$NON-NLS-1$
- new String[] { "SELECT e1 FROM pm1.g3 WHERE e1 IS NULL", //$NON-NLS-1$
- "SELECT e1 FROM pm1.g2 WHERE e1 IS NULL", //$NON-NLS-1$
- "SELECT e1 FROM pm1.g1" } ); //$NON-NLS-1$
+ new String[] { "SELECT 's3', e1 FROM pm1.g3 WHERE e1 IS NULL", //$NON-NLS-1$
+ "SELECT 's2', e1 FROM pm1.g2 WHERE e1 IS NULL", //$NON-NLS-1$
+ "SELECT 's1', e1 FROM pm1.g1" } ); //$NON-NLS-1$
}
/** defect #4997 */
@@ -2382,7 +2377,7 @@
FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
BasicSourceCapabilities caps = new BasicSourceCapabilities();
caps.setCapabilitySupport(Capability.CRITERIA_COMPARE_EQ, true);
- caps.setFunctionSupport(SourceSystemFunctions.UCASE, true); //$NON-NLS-1$
+ caps.setFunctionSupport(SourceSystemFunctions.UCASE, true);
capFinder.addCapabilities("pm1", caps); //$NON-NLS-1$
// Add join capability to pm1
@@ -2401,9 +2396,10 @@
public void testPushFunctionInSelect1() {
FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
BasicSourceCapabilities caps = new BasicSourceCapabilities();
+ caps.setCapabilitySupport(Capability.QUERY_SELECT_EXPRESSION, true);
caps.setCapabilitySupport(Capability.CRITERIA_COMPARE_EQ, true);
- caps.setFunctionSupport(SourceSystemFunctions.UCASE, true); //$NON-NLS-1$
- caps.setFunctionSupport(SourceSystemFunctions.LCASE, true); //$NON-NLS-1$
+ caps.setFunctionSupport(SourceSystemFunctions.UCASE, true);
+ caps.setFunctionSupport(SourceSystemFunctions.LCASE, true);
capFinder.addCapabilities("pm1", caps); //$NON-NLS-1$
// Add join capability to pm1
@@ -2422,9 +2418,10 @@
public void testPushFunctionInSelect2() {
FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
BasicSourceCapabilities caps = new BasicSourceCapabilities();
+ caps.setCapabilitySupport(Capability.QUERY_SELECT_EXPRESSION, true);
caps.setCapabilitySupport(Capability.CRITERIA_COMPARE_EQ, true);
- caps.setFunctionSupport(SourceSystemFunctions.UCASE, true); //$NON-NLS-1$
- caps.setFunctionSupport(SourceSystemFunctions.LCASE, true); //$NON-NLS-1$
+ caps.setFunctionSupport(SourceSystemFunctions.UCASE, true);
+ caps.setFunctionSupport(SourceSystemFunctions.LCASE, true);
capFinder.addCapabilities("pm1", caps); //$NON-NLS-1$
// Add join capability to pm1
@@ -2444,8 +2441,8 @@
FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
BasicSourceCapabilities caps = new BasicSourceCapabilities();
caps.setCapabilitySupport(Capability.CRITERIA_COMPARE_EQ, true);
- caps.setFunctionSupport(SourceSystemFunctions.UCASE, true); //$NON-NLS-1$
- caps.setFunctionSupport(SourceSystemFunctions.LCASE, false); //$NON-NLS-1$
+ caps.setFunctionSupport(SourceSystemFunctions.UCASE, true);
+ caps.setFunctionSupport(SourceSystemFunctions.LCASE, false);
capFinder.addCapabilities("pm1", caps); //$NON-NLS-1$
// Add join capability to pm1
@@ -2479,9 +2476,10 @@
public void testPushFunctionInSelect4() {
FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
BasicSourceCapabilities caps = new BasicSourceCapabilities();
+ caps.setCapabilitySupport(Capability.QUERY_SELECT_EXPRESSION, true);
caps.setCapabilitySupport(Capability.CRITERIA_COMPARE_EQ, true);
- caps.setFunctionSupport(SourceSystemFunctions.UCASE, true); //$NON-NLS-1$
- caps.setFunctionSupport(SourceSystemFunctions.LCASE, true); //$NON-NLS-1$
+ caps.setFunctionSupport(SourceSystemFunctions.UCASE, true);
+ caps.setFunctionSupport(SourceSystemFunctions.LCASE, true);
capFinder.addCapabilities("pm1", caps); //$NON-NLS-1$
// Add join capability to pm1
@@ -2500,9 +2498,10 @@
public void testPushFunctionInSelect5() {
FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
BasicSourceCapabilities caps = new BasicSourceCapabilities();
+ caps.setCapabilitySupport(Capability.QUERY_SELECT_EXPRESSION, true);
caps.setCapabilitySupport(Capability.CRITERIA_COMPARE_EQ, true);
- caps.setFunctionSupport(SourceSystemFunctions.UCASE, true); //$NON-NLS-1$
- caps.setFunctionSupport(SourceSystemFunctions.LCASE, true); //$NON-NLS-1$
+ caps.setFunctionSupport(SourceSystemFunctions.UCASE, true);
+ caps.setFunctionSupport(SourceSystemFunctions.LCASE, true);
capFinder.addCapabilities("pm1", caps); //$NON-NLS-1$
// Add join capability to pm1
@@ -2556,10 +2555,11 @@
public void testPushFunctionInSelectWithOrderBy1() {
FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
BasicSourceCapabilities caps = new BasicSourceCapabilities();
+ caps.setCapabilitySupport(Capability.QUERY_SELECT_EXPRESSION, true);
caps.setCapabilitySupport(Capability.CRITERIA_COMPARE_EQ, true);
caps.setCapabilitySupport(Capability.QUERY_ORDERBY, true);
- caps.setFunctionSupport(SourceSystemFunctions.UCASE, true); //$NON-NLS-1$
- caps.setFunctionSupport(SourceSystemFunctions.LCASE, true); //$NON-NLS-1$
+ caps.setFunctionSupport(SourceSystemFunctions.UCASE, true);
+ caps.setFunctionSupport(SourceSystemFunctions.LCASE, true);
capFinder.addCapabilities("pm1", caps); //$NON-NLS-1$
// Add join capability to pm1
@@ -2579,10 +2579,11 @@
public void testPushFunctionInSelectWithOrderBy1a() {
FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
BasicSourceCapabilities caps = new BasicSourceCapabilities();
+ caps.setCapabilitySupport(Capability.QUERY_SELECT_EXPRESSION, true);
caps.setCapabilitySupport(Capability.CRITERIA_COMPARE_EQ, true);
caps.setCapabilitySupport(Capability.QUERY_ORDERBY, true);
- caps.setFunctionSupport(SourceSystemFunctions.UCASE, true); //$NON-NLS-1$
- caps.setFunctionSupport(SourceSystemFunctions.LCASE, true); //$NON-NLS-1$
+ caps.setFunctionSupport(SourceSystemFunctions.UCASE, true);
+ caps.setFunctionSupport(SourceSystemFunctions.LCASE, true);
capFinder.addCapabilities("pm1", caps); //$NON-NLS-1$
// Add join capability to pm1
@@ -2602,10 +2603,11 @@
public void testPushFunctionInSelectWithOrderBy2() {
FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
BasicSourceCapabilities caps = new BasicSourceCapabilities();
+ caps.setCapabilitySupport(Capability.QUERY_SELECT_EXPRESSION, true);
caps.setCapabilitySupport(Capability.CRITERIA_COMPARE_EQ, true);
caps.setCapabilitySupport(Capability.QUERY_ORDERBY, true);
- caps.setFunctionSupport(SourceSystemFunctions.UCASE, true); //$NON-NLS-1$
- caps.setFunctionSupport(SourceSystemFunctions.LCASE, true); //$NON-NLS-1$
+ caps.setFunctionSupport(SourceSystemFunctions.UCASE, true);
+ caps.setFunctionSupport(SourceSystemFunctions.LCASE, true);
capFinder.addCapabilities("pm1", caps); //$NON-NLS-1$
// Add join capability to pm1
@@ -2626,7 +2628,7 @@
BasicSourceCapabilities caps = new BasicSourceCapabilities();
caps.setCapabilitySupport(Capability.CRITERIA_COMPARE_EQ, true);
caps.setCapabilitySupport(Capability.QUERY_FROM_JOIN_INNER, true);
- caps.setFunctionSupport(SourceSystemFunctions.UCASE, true); //$NON-NLS-1$
+ caps.setFunctionSupport(SourceSystemFunctions.UCASE, true);
caps.setFunctionSupport("convert", true); //$NON-NLS-1$
capFinder.addCapabilities("pm1", caps); //$NON-NLS-1$
@@ -2648,7 +2650,7 @@
BasicSourceCapabilities caps = new BasicSourceCapabilities();
caps.setCapabilitySupport(Capability.CRITERIA_COMPARE_EQ, true);
caps.setCapabilitySupport(Capability.QUERY_FROM_JOIN_INNER, true);
- caps.setFunctionSupport(SourceSystemFunctions.UCASE, true); //$NON-NLS-1$
+ caps.setFunctionSupport(SourceSystemFunctions.UCASE, true);
caps.setFunctionSupport("convert", true); //$NON-NLS-1$
capFinder.addCapabilities("pm1", caps); //$NON-NLS-1$
@@ -2686,7 +2688,7 @@
BasicSourceCapabilities caps = new BasicSourceCapabilities();
caps.setCapabilitySupport(Capability.CRITERIA_COMPARE_EQ, true);
caps.setCapabilitySupport(Capability.QUERY_FROM_JOIN_INNER, true);
- caps.setFunctionSupport(SourceSystemFunctions.UCASE, true); //$NON-NLS-1$
+ caps.setFunctionSupport(SourceSystemFunctions.UCASE, true);
caps.setFunctionSupport("convert", true); //$NON-NLS-1$
capFinder.addCapabilities("pm1", caps); //$NON-NLS-1$
@@ -2722,6 +2724,7 @@
public void testUnionOverFunctions() {
FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
BasicSourceCapabilities caps = new BasicSourceCapabilities();
+ caps.setCapabilitySupport(Capability.QUERY_SELECT_EXPRESSION, true);
caps.setCapabilitySupport(Capability.CRITERIA_COMPARE_EQ, true);
caps.setCapabilitySupport(Capability.QUERY_FROM_JOIN_INNER, true);
caps.setFunctionSupport("convert", true); //$NON-NLS-1$
@@ -2966,6 +2969,7 @@
public void testPushSubqueryInWhereClause3() {
FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
BasicSourceCapabilities caps = new BasicSourceCapabilities();
+ caps.setCapabilitySupport(Capability.QUERY_SELECT_EXPRESSION, true);
caps.setCapabilitySupport(Capability.CRITERIA_IN, true);
caps.setCapabilitySupport(Capability.CRITERIA_IN_SUBQUERY, true);
caps.setFunctionSupport("ltrim", true); //$NON-NLS-1$
@@ -2984,6 +2988,7 @@
public void testPushSubqueryInWhereClause4() {
FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
BasicSourceCapabilities caps = new BasicSourceCapabilities();
+ caps.setCapabilitySupport(Capability.QUERY_SELECT_EXPRESSION, true);
caps.setCapabilitySupport(Capability.CRITERIA_IN, true);
caps.setCapabilitySupport(Capability.CRITERIA_IN_SUBQUERY, true);
caps.setFunctionSupport("ltrim", true); //$NON-NLS-1$
@@ -3279,8 +3284,6 @@
capFinder.addCapabilities("pm2", caps); //$NON-NLS-1$
FakeMetadataFacade metadata = FakeMetadataFactory.example1();
- FakeMetadataObject model = metadata.getStore().findObject("pm1", FakeMetadataObject.MODEL); //$NON-NLS-1$
- FakeMetadataObject model2 = metadata.getStore().findObject("pm2", FakeMetadataObject.MODEL); //$NON-NLS-1$
FakeMetadataObject g1 = metadata.getStore().findObject("pm1.g1", FakeMetadataObject.GROUP); //$NON-NLS-1$
g1.putProperty(FakeMetadataObject.Props.CARDINALITY, new Integer(RuleChooseDependent.DEFAULT_INDEPENDENT_CARDINALITY + 500));
FakeMetadataObject g2 = metadata.getStore().findObject("pm2.g2", FakeMetadataObject.GROUP); //$NON-NLS-1$
@@ -3322,7 +3325,6 @@
capFinder.addCapabilities("pm1", caps); //$NON-NLS-1$
FakeMetadataFacade metadata = FakeMetadataFactory.example1();
- FakeMetadataObject model = metadata.getStore().findObject("pm1", FakeMetadataObject.MODEL); //$NON-NLS-1$
FakeMetadataObject g1 = metadata.getStore().findObject("pm1.g1", FakeMetadataObject.GROUP); //$NON-NLS-1$
g1.putProperty(FakeMetadataObject.Props.CARDINALITY, new Integer(RuleChooseDependent.DEFAULT_INDEPENDENT_CARDINALITY + 500));
FakeMetadataObject g2 = metadata.getStore().findObject("pm1.g2", FakeMetadataObject.GROUP); //$NON-NLS-1$
@@ -3595,25 +3597,9 @@
/** defect 21965 */
public void testLookupFunctionInSelect() {
ProcessorPlan plan = helpPlan("SELECT e1, LOOKUP('pm1.g1','e1', 'e2', 1) FROM pm1.g2", FakeMetadataFactory.example1Cached(), //$NON-NLS-1$
- new String[] { "SELECT e1 FROM pm1.g2" }); //$NON-NLS-1$
+ new String[] { "SELECT e1, LOOKUP('pm1.g1','e1', 'e2', 1) FROM pm1.g2" }); //$NON-NLS-1$
- checkNodeTypes(plan, new int[] {
- 1, // Access
- 0, // DependentAccess
- 0, // DependentSelect
- 0, // DependentProject
- 0, // DupRemove
- 0, // Grouping
- 0, // NestedLoopJoinStrategy
- 0, // MergeJoinStrategy
- 0, // Null
- 0, // PlanExecution
- 1, // Project
- 0, // Select
- 0, // Sort
- 0 // UnionAll
- });
-
+ checkNodeTypes(plan, FULL_PUSHDOWN);
}
// SELECT * FROM (SELECT IntKey FROM BQT1.SmallA UNION ALL SELECT DISTINCT IntNum FROM BQT1.SmallA) AS x WHERE IntKey = 0
@@ -4075,6 +4061,7 @@
public void testUnionPushdownWithFunctionsAndAliases() {
FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
BasicSourceCapabilities caps = new BasicSourceCapabilities();
+ caps.setCapabilitySupport(Capability.QUERY_SELECT_EXPRESSION, true);
caps.setCapabilitySupport(Capability.QUERY_FROM_GROUP_ALIAS, true);
caps.setCapabilitySupport(Capability.QUERY_FROM_JOIN_INNER, true);
caps.setCapabilitySupport(Capability.QUERY_UNION, true);
@@ -4133,6 +4120,7 @@
public void testUnionNoAllPushdownInInlineView() {
FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
BasicSourceCapabilities caps = new BasicSourceCapabilities();
+ caps.setCapabilitySupport(Capability.QUERY_SELECT_EXPRESSION, true);
caps.setCapabilitySupport(Capability.QUERY_FROM_GROUP_ALIAS, true);
caps.setCapabilitySupport(Capability.QUERY_FROM_JOIN_INNER, true);
caps.setCapabilitySupport(Capability.QUERY_UNION, true);
@@ -4184,6 +4172,7 @@
public void testUnionAllPushdownVirtualGroup() {
FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
BasicSourceCapabilities caps = new BasicSourceCapabilities();
+ caps.setCapabilitySupport(Capability.QUERY_SELECT_EXPRESSION, true);
caps.setCapabilitySupport(Capability.QUERY_FROM_GROUP_ALIAS, true);
caps.setCapabilitySupport(Capability.QUERY_FROM_JOIN_INNER, true);
caps.setCapabilitySupport(Capability.QUERY_UNION, true);
@@ -4272,6 +4261,7 @@
public void testPushCaseInSelect() {
FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
BasicSourceCapabilities caps = new BasicSourceCapabilities();
+ caps.setCapabilitySupport(Capability.QUERY_SELECT_EXPRESSION, true);
caps.setCapabilitySupport(Capability.CRITERIA_COMPARE_EQ, true);
caps.setCapabilitySupport(Capability.QUERY_CASE, true);
caps.setCapabilitySupport(Capability.QUERY_SEARCHED_CASE, true);
@@ -4328,6 +4318,7 @@
public void testPushSearchedCaseInSelect() {
FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
BasicSourceCapabilities caps = new BasicSourceCapabilities();
+ caps.setCapabilitySupport(Capability.QUERY_SELECT_EXPRESSION, true);
caps.setCapabilitySupport(Capability.CRITERIA_COMPARE_EQ, true);
caps.setCapabilitySupport(Capability.QUERY_SEARCHED_CASE, true);
capFinder.addCapabilities("pm1", caps); //$NON-NLS-1$
@@ -4885,6 +4876,7 @@
// Plan query
FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
BasicSourceCapabilities caps = new BasicSourceCapabilities();
+ caps.setCapabilitySupport(Capability.QUERY_SELECT_EXPRESSION, true);
caps.setCapabilitySupport(Capability.QUERY_AGGREGATES, true);
caps.setCapabilitySupport(Capability.QUERY_AGGREGATES_SUM, true);
caps.setFunctionSupport("+", true); //$NON-NLS-1$
@@ -5604,6 +5596,7 @@
public void testCase2507() {
FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
BasicSourceCapabilities caps = new BasicSourceCapabilities();
+ caps.setCapabilitySupport(Capability.QUERY_SELECT_EXPRESSION, true);
caps.setCapabilitySupport(Capability.CRITERIA_COMPARE_EQ, true);
caps.setCapabilitySupport(Capability.CRITERIA_COMPARE_ORDERED, true);
caps.setCapabilitySupport(Capability.CRITERIA_IN, true);
@@ -5633,6 +5626,7 @@
public void testCase2507A() {
FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
BasicSourceCapabilities caps = new BasicSourceCapabilities();
+ caps.setCapabilitySupport(Capability.QUERY_SELECT_EXPRESSION, true);
caps.setCapabilitySupport(Capability.CRITERIA_COMPARE_EQ, true);
caps.setCapabilitySupport(Capability.CRITERIA_COMPARE_ORDERED, true);
caps.setCapabilitySupport(Capability.CRITERIA_IN, true);
@@ -5661,6 +5655,7 @@
public void testCase2507B() {
FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
BasicSourceCapabilities caps = new BasicSourceCapabilities();
+ caps.setCapabilitySupport(Capability.QUERY_SELECT_EXPRESSION, true);
caps.setCapabilitySupport(Capability.CRITERIA_COMPARE_EQ, true);
caps.setCapabilitySupport(Capability.CRITERIA_COMPARE_ORDERED, true);
caps.setCapabilitySupport(Capability.CRITERIA_IN, true);
@@ -5986,12 +5981,12 @@
/*
* Select literals created by runtime evaluation should not be pushed down.
*/
- public void testCase4017() {
+ public void testCase4017() throws Exception {
String sql = "SELECT env('soap_host') AS HOST, intkey from bqt2.smalla"; //$NON-NLS-1$
- helpPlan(sql, FakeMetadataFactory.exampleBQTCached(),
- new String[] {"SELECT intkey FROM bqt2.smalla"}); //$NON-NLS-1$
+ helpPlan(sql, FakeMetadataFactory.exampleBQTCached(), null, new DefaultCapabilitiesFinder(),
+ new String[] {"SELECT bqt2.smalla.intkey FROM bqt2.smalla"}, ComparisonMode.EXACT_COMMAND_STRING); //$NON-NLS-1$
}
/**
@@ -6216,6 +6211,7 @@
// Plan query
FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
BasicSourceCapabilities caps = new BasicSourceCapabilities();
+ caps.setCapabilitySupport(Capability.QUERY_SELECT_EXPRESSION, true);
caps.setCapabilitySupport(Capability.QUERY_FROM_JOIN_INNER, true);
caps.setCapabilitySupport(Capability.QUERY_FROM_JOIN_OUTER, true);
caps.setCapabilitySupport(Capability.QUERY_FROM_JOIN_OUTER_FULL, true);
@@ -6241,6 +6237,7 @@
FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
BasicSourceCapabilities caps = new BasicSourceCapabilities();
+ caps.setCapabilitySupport(Capability.QUERY_SELECT_EXPRESSION, true);
caps.setCapabilitySupport(Capability.CRITERIA_COMPARE_EQ, true);
caps.setCapabilitySupport(Capability.CRITERIA_COMPARE_ORDERED, true);
caps.setCapabilitySupport(Capability.CRITERIA_IN, true);
@@ -6307,6 +6304,7 @@
// Plan query
FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
BasicSourceCapabilities caps = new BasicSourceCapabilities();
+ caps.setCapabilitySupport(Capability.QUERY_SELECT_EXPRESSION, true);
caps.setCapabilitySupport(Capability.CRITERIA_COMPARE_EQ, true);
caps.setCapabilitySupport(Capability.QUERY_ORDERBY, true);
caps.setFunctionSupport("concat", true); //$NON-NLS-1$
Modified: trunk/engine/src/test/java/com/metamatrix/query/optimizer/TestRuleMergeVirtual.java
===================================================================
--- trunk/engine/src/test/java/com/metamatrix/query/optimizer/TestRuleMergeVirtual.java 2009-10-27 01:16:42 UTC (rev 1542)
+++ trunk/engine/src/test/java/com/metamatrix/query/optimizer/TestRuleMergeVirtual.java 2009-10-27 01:18:06 UTC (rev 1543)
@@ -22,8 +22,10 @@
package com.metamatrix.query.optimizer;
-import junit.framework.TestCase;
+import org.junit.Test;
+import static junit.framework.Assert.*;
+
import com.metamatrix.query.optimizer.capabilities.BasicSourceCapabilities;
import com.metamatrix.query.optimizer.capabilities.FakeCapabilitiesFinder;
import com.metamatrix.query.optimizer.capabilities.SourceCapabilities.Capability;
@@ -33,174 +35,90 @@
import com.metamatrix.query.unittest.FakeMetadataFacade;
import com.metamatrix.query.unittest.FakeMetadataFactory;
-public class TestRuleMergeVirtual extends TestCase {
+public class TestRuleMergeVirtual {
- public void testSimpleMergeGroupBy() {
- FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
- BasicSourceCapabilities caps = new BasicSourceCapabilities();
- caps.setCapabilitySupport(Capability.QUERY_AGGREGATES, true);
- caps.setCapabilitySupport(Capability.QUERY_AGGREGATES_MAX, true);
- capFinder.addCapabilities("pm1", caps); //$NON-NLS-1$
-
+ @Test public void testSimpleMergeGroupBy() {
ProcessorPlan plan = TestOptimizer.helpPlan("SELECT x FROM (SELECT e1, max(e2) as x FROM pm1.g1 GROUP BY e1) AS z", //$NON-NLS-1$
- FakeMetadataFactory.example1Cached(), null, capFinder,
+ FakeMetadataFactory.example1Cached(), null, TestAggregatePushdown.getAggregatesFinder(),
new String[] {
"SELECT MAX(e2) AS x FROM pm1.g1 GROUP BY e1"}, TestOptimizer.SHOULD_SUCCEED); //$NON-NLS-1$
TestOptimizer.checkNodeTypes(plan, TestOptimizer.FULL_PUSHDOWN);
}
- public void testSimpleMergeGroupBy1() {
- FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
- BasicSourceCapabilities caps = new BasicSourceCapabilities();
- caps.setCapabilitySupport(Capability.QUERY_AGGREGATES, true);
- caps.setCapabilitySupport(Capability.QUERY_AGGREGATES_MAX, true);
- caps.setCapabilitySupport(Capability.QUERY_SELECT_DISTINCT, true);
- capFinder.addCapabilities("pm1", caps); //$NON-NLS-1$
-
+ @Test public void testSimpleMergeGroupBy1() {
ProcessorPlan plan = TestOptimizer.helpPlan("SELECT x FROM (SELECT distinct e1, max(e2) as x FROM pm1.g1 GROUP BY e1) AS z", //$NON-NLS-1$
- FakeMetadataFactory.example1Cached(), null, capFinder,
+ FakeMetadataFactory.example1Cached(), null, TestAggregatePushdown.getAggregatesFinder(),
new String[] {
- "SELECT DISTINCT e1, MAX(e2) AS x FROM pm1.g1 GROUP BY e1"}, TestOptimizer.SHOULD_SUCCEED); //$NON-NLS-1$
+ "SELECT v_0.c_1 FROM (SELECT DISTINCT g_0.e1 AS c_0, MAX(g_0.e2) AS c_1 FROM pm1.g1 AS g_0 GROUP BY g_0.e1) AS v_0"}, TestOptimizer.SHOULD_SUCCEED); //$NON-NLS-1$
- TestOptimizer.checkNodeTypes(plan, new int[] {
- 1, // Access
- 0, // DependentAccess
- 0, // DependentSelect
- 0, // DependentProject
- 0, // DupRemove
- 0, // Grouping
- 0, // NestedLoopJoinStrategy
- 0, // MergeJoinStrategy
- 0, // Null
- 0, // PlanExecution
- 1, // Project
- 0, // Select
- 0, // Sort
- 0 // UnionAll
- });
+ TestOptimizer.checkNodeTypes(plan, TestOptimizer.FULL_PUSHDOWN);
}
/**
* Same as above but all required symbols are selected
*/
- public void testSimpleMergeGroupBy2() {
- FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
- BasicSourceCapabilities caps = new BasicSourceCapabilities();
- caps.setCapabilitySupport(Capability.QUERY_AGGREGATES, true);
- caps.setCapabilitySupport(Capability.QUERY_AGGREGATES_MAX, true);
- caps.setCapabilitySupport(Capability.QUERY_SELECT_DISTINCT, true);
- capFinder.addCapabilities("pm1", caps); //$NON-NLS-1$
+ @Test public void testSimpleMergeGroupBy2() {
FakeMetadataFacade metadata = FakeMetadataFactory.example1Cached();
ProcessorPlan plan = TestOptimizer.helpPlan("SELECT x, e1 FROM (SELECT distinct e1, max(e2) as x FROM pm1.g1 GROUP BY e1) AS z", //$NON-NLS-1$
- metadata, null, capFinder,
+ metadata, null, TestAggregatePushdown.getAggregatesFinder(),
new String[] {
"SELECT DISTINCT MAX(e2) AS x, e1 FROM pm1.g1 GROUP BY e1"}, TestOptimizer.SHOULD_SUCCEED); //$NON-NLS-1$
TestOptimizer.checkNodeTypes(plan, TestOptimizer.FULL_PUSHDOWN);
}
- public void testSimpleMergeGroupBy3() {
- FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
- BasicSourceCapabilities caps = new BasicSourceCapabilities();
- caps.setCapabilitySupport(Capability.QUERY_AGGREGATES, true);
- caps.setCapabilitySupport(Capability.QUERY_AGGREGATES_MAX, true);
- caps.setCapabilitySupport(Capability.QUERY_SELECT_DISTINCT, true);
- capFinder.addCapabilities("pm1", caps); //$NON-NLS-1$
+ @Test public void testSimpleMergeGroupBy3() {
FakeMetadataFacade metadata = FakeMetadataFactory.example1Cached();
ProcessorPlan plan = TestOptimizer.helpPlan("SELECT distinct x, e1 FROM (SELECT e1, max(e2) as x FROM pm1.g1 GROUP BY e1) AS z", //$NON-NLS-1$
- metadata, null, capFinder,
+ metadata, null, TestAggregatePushdown.getAggregatesFinder(),
new String[] {
"SELECT DISTINCT MAX(e2) AS x, e1 FROM pm1.g1 GROUP BY e1"}, TestOptimizer.SHOULD_SUCCEED); //$NON-NLS-1$
TestOptimizer.checkNodeTypes(plan, TestOptimizer.FULL_PUSHDOWN);
}
- public void testSimpleMergeGroupBy4() {
- FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
- BasicSourceCapabilities caps = new BasicSourceCapabilities();
- caps.setCapabilitySupport(Capability.QUERY_AGGREGATES, true);
- caps.setCapabilitySupport(Capability.QUERY_AGGREGATES_MAX, true);
- caps.setCapabilitySupport(Capability.QUERY_SELECT_DISTINCT, true);
- capFinder.addCapabilities("pm1", caps); //$NON-NLS-1$
-
+ @Test public void testSimpleMergeGroupBy4() {
ProcessorPlan plan = TestOptimizer.helpPlan("SELECT x, x FROM (SELECT e1, max(e2) as x FROM pm1.g1 GROUP BY e1) AS z", //$NON-NLS-1$
- FakeMetadataFactory.example1Cached(), null, capFinder,
+ FakeMetadataFactory.example1Cached(), null, TestAggregatePushdown.getAggregatesFinder(),
new String[] {
- "SELECT MAX(e2) AS x FROM pm1.g1 GROUP BY e1"}, TestOptimizer.SHOULD_SUCCEED); //$NON-NLS-1$
+ "SELECT v_0.c_0, v_0.c_0 FROM (SELECT MAX(g_0.e2) AS c_0 FROM pm1.g1 AS g_0 GROUP BY g_0.e1) AS v_0"}, TestOptimizer.SHOULD_SUCCEED); //$NON-NLS-1$
- TestOptimizer.checkNodeTypes(plan, new int[] {
- 1, // Access
- 0, // DependentAccess
- 0, // DependentSelect
- 0, // DependentProject
- 0, // DupRemove
- 0, // Grouping
- 0, // NestedLoopJoinStrategy
- 0, // MergeJoinStrategy
- 0, // Null
- 0, // PlanExecution
- 1, // Project
- 0, // Select
- 0, // Sort
- 0 // UnionAll
- });
+ TestOptimizer.checkNodeTypes(plan, TestOptimizer.FULL_PUSHDOWN);
}
- public void testSimpleMergeGroupBy5() {
- FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
- BasicSourceCapabilities caps = new BasicSourceCapabilities();
- caps.setCapabilitySupport(Capability.QUERY_AGGREGATES, true);
- caps.setCapabilitySupport(Capability.QUERY_AGGREGATES_MAX, true);
- caps.setCapabilitySupport(Capability.QUERY_SELECT_DISTINCT, true);
- caps.setCapabilitySupport(Capability.CRITERIA_COMPARE_EQ, true);
- capFinder.addCapabilities("pm1", caps); //$NON-NLS-1$
-
+ @Test public void testSimpleMergeGroupBy5() {
ProcessorPlan plan = TestOptimizer.helpPlan("SELECT x FROM (SELECT e1, max(e2) as x FROM pm1.g1 GROUP BY e1) AS z where z.x = 1", //$NON-NLS-1$
- FakeMetadataFactory.example1Cached(), null, capFinder,
+ FakeMetadataFactory.example1Cached(), null, TestAggregatePushdown.getAggregatesFinder(),
new String[] {
"SELECT MAX(e2) AS x FROM pm1.g1 GROUP BY e1 HAVING MAX(e2) = 1"}, TestOptimizer.SHOULD_SUCCEED); //$NON-NLS-1$
TestOptimizer.checkNodeTypes(plan, TestOptimizer.FULL_PUSHDOWN);
}
- public void testSimpleMergeGroupBy6() {
- FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
- BasicSourceCapabilities caps = new BasicSourceCapabilities();
- caps.setCapabilitySupport(Capability.QUERY_AGGREGATES, true);
- caps.setCapabilitySupport(Capability.QUERY_AGGREGATES_MAX, true);
- caps.setCapabilitySupport(Capability.QUERY_SELECT_DISTINCT, true);
- caps.setCapabilitySupport(Capability.CRITERIA_COMPARE_EQ, true);
- capFinder.addCapabilities("pm1", caps); //$NON-NLS-1$
-
+ @Test public void testSimpleMergeGroupBy6() {
ProcessorPlan plan = TestOptimizer.helpPlan("SELECT x FROM (SELECT e1, max(e2) as x FROM pm1.g1 GROUP BY e1) AS z where z.x = 1", //$NON-NLS-1$
- FakeMetadataFactory.example1Cached(), null, capFinder,
+ FakeMetadataFactory.example1Cached(), null, TestAggregatePushdown.getAggregatesFinder(),
new String[] {
"SELECT MAX(e2) AS x FROM pm1.g1 GROUP BY e1 HAVING MAX(e2) = 1"}, TestOptimizer.SHOULD_SUCCEED); //$NON-NLS-1$
TestOptimizer.checkNodeTypes(plan, TestOptimizer.FULL_PUSHDOWN);
}
- public void testSimpleMergeGroupBy7() {
- FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
- BasicSourceCapabilities caps = new BasicSourceCapabilities();
- caps.setCapabilitySupport(Capability.QUERY_AGGREGATES, true);
- caps.setCapabilitySupport(Capability.QUERY_AGGREGATES_MAX, true);
- caps.setCapabilitySupport(Capability.QUERY_SELECT_DISTINCT, true);
- capFinder.addCapabilities("pm1", caps); //$NON-NLS-1$
+ @Test public void testSimpleMergeGroupBy7() {
FakeMetadataFacade metadata = FakeMetadataFactory.example1Cached();
ProcessorPlan plan = TestOptimizer.helpPlan("SELECT distinct x, e1 FROM (SELECT distinct e1, max(e2) as x FROM pm1.g1 GROUP BY e1) AS z", //$NON-NLS-1$
- metadata, null, capFinder,
+ metadata, null, TestAggregatePushdown.getAggregatesFinder(),
new String[] {
"SELECT DISTINCT MAX(e2) AS x, e1 FROM pm1.g1 GROUP BY e1"}, TestOptimizer.SHOULD_SUCCEED); //$NON-NLS-1$
TestOptimizer.checkNodeTypes(plan, TestOptimizer.FULL_PUSHDOWN);
}
- public void testSimpleMergeUnion() {
+ @Test public void testSimpleMergeUnion() {
FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
BasicSourceCapabilities caps = new BasicSourceCapabilities();
caps.setCapabilitySupport(Capability.QUERY_UNION, true);
@@ -215,7 +133,7 @@
TestOptimizer.checkNodeTypes(plan, TestOptimizer.FULL_PUSHDOWN);
}
- public void testSimpleMergeUnion1() {
+ @Test public void testSimpleMergeUnion1() {
FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
BasicSourceCapabilities caps = new BasicSourceCapabilities();
caps.setCapabilitySupport(Capability.QUERY_UNION, true);
@@ -233,7 +151,7 @@
/**
* Same as above, but the expression will prevent the source removal
*/
- public void testSimpleMergeUnion2() {
+ @Test public void testSimpleMergeUnion2() {
FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
BasicSourceCapabilities caps = new BasicSourceCapabilities();
caps.setCapabilitySupport(Capability.QUERY_UNION, true);
@@ -263,7 +181,7 @@
});
}
- public void testSimpleMergeUnion3() {
+ @Test public void testSimpleMergeUnion3() {
FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
BasicSourceCapabilities caps = new BasicSourceCapabilities();
caps.setCapabilitySupport(Capability.QUERY_UNION, true);
@@ -293,7 +211,7 @@
});
}
- public void testSimpleMergeWithLimit() {
+ @Test public void testSimpleMergeWithLimit() {
FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
BasicSourceCapabilities caps = new BasicSourceCapabilities();
caps.setCapabilitySupport(Capability.ROW_LIMIT, true);
@@ -307,7 +225,7 @@
TestOptimizer.checkNodeTypes(plan, TestOptimizer.FULL_PUSHDOWN);
}
- public void testSimpleMergeWithLimit1() {
+ @Test public void testSimpleMergeWithLimit1() {
FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
BasicSourceCapabilities caps = new BasicSourceCapabilities();
caps.setCapabilitySupport(Capability.ROW_LIMIT, true);
@@ -341,7 +259,7 @@
/**
* Note that the merge is not performed since it would create an expression in the group by clause
*/
- public void testViewPreservationWithGroupByExpression() throws Exception {
+ @Test public void testViewPreservationWithGroupByExpression() throws Exception {
String sql = "SELECT gbl_date " + //$NON-NLS-1$
"FROM " + //$NON-NLS-1$
"(SELECT a.intkey as x, convert(a.TimestampValue, date) AS gbl_date, b.intkey as y " + //$NON-NLS-1$
@@ -351,6 +269,7 @@
// Create capabilities
FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
BasicSourceCapabilities caps = TestOptimizer.getTypicalCapabilities();
+ caps.setCapabilitySupport(Capability.QUERY_SELECT_EXPRESSION, true);
caps.setCapabilitySupport(Capability.QUERY_AGGREGATES, true);
caps.setCapabilitySupport(Capability.QUERY_AGGREGATES_COUNT, true);
caps.setCapabilitySupport(Capability.QUERY_AGGREGATES_COUNT_STAR, true);
@@ -370,7 +289,7 @@
TestOptimizer.checkNodeTypes(plan, TestOptimizer.FULL_PUSHDOWN);
}
- public void testSortAliasWithSameName() throws Exception {
+ @Test public void testSortAliasWithSameName() throws Exception {
String sql = "select e1 from (select distinct pm1.g1.e1 as e1 from pm1.g1) x order by e1"; //$NON-NLS-1$
FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
Modified: trunk/engine/src/test/java/com/metamatrix/query/optimizer/TestRuleRaiseNull.java
===================================================================
--- trunk/engine/src/test/java/com/metamatrix/query/optimizer/TestRuleRaiseNull.java 2009-10-27 01:16:42 UTC (rev 1542)
+++ trunk/engine/src/test/java/com/metamatrix/query/optimizer/TestRuleRaiseNull.java 2009-10-27 01:18:06 UTC (rev 1543)
@@ -68,24 +68,9 @@
String sql = "select * from ( select intkey as cola, null as colb, intnum as colc from bqt1.smalla union all select null, intkey, intnum from bqt2.smalla) as X where X.cola = 1"; //$NON-NLS-1$
ProcessorPlan plan = TestOptimizer.helpPlan(sql, FakeMetadataFactory.exampleBQT(),
- new String[] {"SELECT intkey, intnum FROM bqt1.smalla WHERE intkey = 1"} ); //$NON-NLS-1$
+ new String[] {"SELECT intkey, null, intnum FROM bqt1.smalla WHERE intkey = 1"} ); //$NON-NLS-1$
- TestOptimizer.checkNodeTypes(plan, new int[] {
- 1, // Access
- 0, // DependentAccess
- 0, // DependentSelect
- 0, // DependentProject
- 0, // DupRemove
- 0, // Grouping
- 0, // NestedLoopJoinStrategy
- 0, // MergeJoinStrategy
- 0, // Null
- 0, // PlanExecution
- 1, // Project
- 0, // Select
- 0, // Sort
- 0 // UnionAll
- });
+ TestOptimizer.checkNodeTypes(plan, TestOptimizer.FULL_PUSHDOWN);
}
@@ -101,46 +86,16 @@
String sql = "select b.intkey from (select intkey from bqt1.smalla) a full outer join (select intkey from bqt1.smallb where 1 = 0) b on (a.intkey = b.intkey)"; //$NON-NLS-1$
ProcessorPlan plan = TestOptimizer.helpPlan(sql, FakeMetadataFactory.exampleBQTCached(),
- new String[]{"SELECT BQT1.SmallA.IntKey FROM bqt1.smalla"}); //$NON-NLS-1$
- TestOptimizer.checkNodeTypes(plan, new int[] {
- 1, // Access
- 0, // DependentAccess
- 0, // DependentSelect
- 0, // DependentProject
- 0, // DupRemove
- 0, // Grouping
- 0, // NestedLoopJoinStrategy
- 0, // MergeJoinStrategy
- 0, // Null
- 0, // PlanExecution
- 1, // Project
- 0, // Select
- 0, // Sort
- 0 // UnionAll
- });
+ new String[]{"SELECT null FROM bqt1.smalla"}); //$NON-NLS-1$
+ TestOptimizer.checkNodeTypes(plan, TestOptimizer.FULL_PUSHDOWN);
}
public void testRaiseNullWithOuterJoin() {
String sql = "select b.intkey from (select intkey from bqt1.smalla) a left outer join (select intkey from bqt1.smallb where 1 = 0) b on (a.intkey = b.intkey)"; //$NON-NLS-1$
ProcessorPlan plan = TestOptimizer.helpPlan(sql, FakeMetadataFactory.exampleBQTCached(),
- new String[]{"SELECT BQT1.SmallA.IntKey FROM bqt1.smalla"}); //$NON-NLS-1$
- TestOptimizer.checkNodeTypes(plan, new int[] {
- 1, // Access
- 0, // DependentAccess
- 0, // DependentSelect
- 0, // DependentProject
- 0, // DupRemove
- 0, // Grouping
- 0, // NestedLoopJoinStrategy
- 0, // MergeJoinStrategy
- 0, // Null
- 0, // PlanExecution
- 1, // Project
- 0, // Select
- 0, // Sort
- 0 // UnionAll
- });
+ new String[]{"SELECT null FROM bqt1.smalla"}); //$NON-NLS-1$
+ TestOptimizer.checkNodeTypes(plan, TestOptimizer.FULL_PUSHDOWN);
}
public void testRaiseNullWithOuterJoin1() {
@@ -178,7 +133,7 @@
String sql = "select b.intkey, b.x from (select intkey, intnum as x from bqt1.smalla where 1 = 0 union all select intnum as a, null from bqt1.smalla union all select 1 as z, intkey as b from bqt1.smallb) b"; //$NON-NLS-1$
ProcessorPlan plan = TestOptimizer.helpPlan(sql, FakeMetadataFactory.exampleBQTCached(),
- new String[]{"SELECT intkey FROM bqt1.smallb", "SELECT IntNum FROM bqt1.smalla"}); //$NON-NLS-1$ //$NON-NLS-2$
+ new String[]{"SELECT 1, intkey FROM bqt1.smallb", "SELECT IntNum, null FROM bqt1.smalla"}); //$NON-NLS-1$ //$NON-NLS-2$
TestOptimizer.checkNodeTypes(plan, new int[] {
2, // Access
0, // DependentAccess
@@ -190,7 +145,7 @@
0, // MergeJoinStrategy
0, // Null
0, // PlanExecution
- 2, // Project
+ 0, // Project
0, // Select
0, // Sort
1 // UnionAll
@@ -209,23 +164,8 @@
String sql = "select b.intkey, b.x from (select intkey, intnum as x from bqt1.smalla where 1 = 0 union all select 1 as z, intkey as b from bqt1.smallb) b inner join bqt1.smalla on b.intkey = bqt1.smalla.intkey"; //$NON-NLS-1$
ProcessorPlan plan = TestOptimizer.helpPlan(sql, FakeMetadataFactory.exampleBQTCached(),
- new String[]{"SELECT g_0.intkey FROM bqt1.smallb AS g_0, bqt1.smalla AS g_1 WHERE g_1.IntKey = 1"}, TestOptimizer.ComparisonMode.EXACT_COMMAND_STRING); //$NON-NLS-1$
- TestOptimizer.checkNodeTypes(plan, new int[] {
- 1, // Access
- 0, // DependentAccess
- 0, // DependentSelect
- 0, // DependentProject
- 0, // DupRemove
- 0, // Grouping
- 0, // NestedLoopJoinStrategy
- 0, // MergeJoinStrategy
- 0, // Null
- 0, // PlanExecution
- 1, // Project
- 0, // Select
- 0, // Sort
- 0 // UnionAll
- });
+ new String[]{"SELECT 1, g_0.intkey FROM bqt1.smallb AS g_0, bqt1.smalla AS g_1 WHERE g_1.IntKey = 1"}, TestOptimizer.ComparisonMode.EXACT_COMMAND_STRING); //$NON-NLS-1$
+ TestOptimizer.checkNodeTypes(plan, TestOptimizer.FULL_PUSHDOWN);
}
public void testRaiseNullWithUnion5() {
@@ -261,12 +201,12 @@
public void testPushCriteriaThroughUnion9() {
TestOptimizer.helpPlan("select * from vm1.u8 where const = 's1'", TestOptimizer.example1(), //$NON-NLS-1$
- new String[] { "SELECT e1 FROM pm1.g1" } ); //$NON-NLS-1$
+ new String[] { "SELECT 's1', e1 FROM pm1.g1" } ); //$NON-NLS-1$
}
public void testPushCriteriaThroughUnion10() {
TestOptimizer.helpPlan("select * from vm1.u8 where const = 's3'", TestOptimizer.example1(), //$NON-NLS-1$
- new String[] { "SELECT e1 FROM pm1.g3" } ); //$NON-NLS-1$
+ new String[] { "SELECT 's3', e1 FROM pm1.g3" } ); //$NON-NLS-1$
}
public void testRaiseNullWithOuterJoinAndHaving() {
@@ -411,7 +351,7 @@
String sql = "select pm1.g1.e1 from pm1.g1, (select e1 from pm1.g1 where (1 = 0) union all select e1 as x from pm1.g2) x where pm1.g1.e1 <> x.e1"; //$NON-NLS-1$
RelationalPlan plan = (RelationalPlan)TestOptimizer.helpPlan(sql, FakeMetadataFactory.example1Cached(),
- new String[]{"SELECT g_0.e1 FROM pm1.g1 AS g_0, pm1.g2 AS g_1 WHERE g_0.e1 <> g_1.e1"}); //$NON-NLS-1$ //$NON-NLS-2$
+ new String[]{"SELECT g_0.e1 FROM pm1.g1 AS g_0, pm1.g2 AS g_1 WHERE g_0.e1 <> g_1.e1"}); //$NON-NLS-1$
TestOptimizer.checkNodeTypes(plan, TestOptimizer.FULL_PUSHDOWN);
}
Modified: trunk/engine/src/test/java/com/metamatrix/query/optimizer/TestSubqueryPushdown.java
===================================================================
--- trunk/engine/src/test/java/com/metamatrix/query/optimizer/TestSubqueryPushdown.java 2009-10-27 01:16:42 UTC (rev 1542)
+++ trunk/engine/src/test/java/com/metamatrix/query/optimizer/TestSubqueryPushdown.java 2009-10-27 01:18:06 UTC (rev 1543)
@@ -121,6 +121,7 @@
caps.setCapabilitySupport(Capability.CRITERIA_IN, true);
caps.setCapabilitySupport(Capability.CRITERIA_IN_SUBQUERY, true);
caps.setCapabilitySupport(Capability.QUERY_SUBQUERIES_SCALAR, true);
+ caps.setCapabilitySupport(Capability.QUERY_SELECT_EXPRESSION, true);
caps.setCapabilitySupport(Capability.QUERY_SUBQUERIES_CORRELATED, true);
caps.setCapabilitySupport(Capability.QUERY_AGGREGATES, true);
caps.setCapabilitySupport(Capability.QUERY_AGGREGATES_MAX, true);
@@ -144,6 +145,7 @@
caps.setCapabilitySupport(Capability.CRITERIA_IN_SUBQUERY, true);
caps.setCapabilitySupport(Capability.QUERY_SUBQUERIES_SCALAR, true);
caps.setCapabilitySupport(Capability.QUERY_SUBQUERIES_CORRELATED, true);
+ caps.setCapabilitySupport(Capability.QUERY_SELECT_EXPRESSION, true);
caps.setCapabilitySupport(Capability.QUERY_AGGREGATES, true);
caps.setCapabilitySupport(Capability.QUERY_AGGREGATES_MAX, true);
caps.setCapabilitySupport(Capability.QUERY_FROM_GROUP_ALIAS, true);
@@ -184,6 +186,7 @@
caps.setCapabilitySupport(Capability.CRITERIA_IN_SUBQUERY, true);
caps.setCapabilitySupport(Capability.QUERY_SUBQUERIES_SCALAR, true);
caps.setCapabilitySupport(Capability.QUERY_SUBQUERIES_CORRELATED, true);
+ caps.setCapabilitySupport(Capability.QUERY_SELECT_EXPRESSION, true);
caps.setCapabilitySupport(Capability.QUERY_AGGREGATES, true);
caps.setCapabilitySupport(Capability.QUERY_AGGREGATES_MAX, true);
caps.setCapabilitySupport(Capability.QUERY_FROM_GROUP_ALIAS, true);
@@ -679,6 +682,7 @@
caps.setCapabilitySupport(Capability.CRITERIA_IN_SUBQUERY, true);
caps.setCapabilitySupport(Capability.QUERY_SUBQUERIES_SCALAR, true);
caps.setCapabilitySupport(Capability.QUERY_SUBQUERIES_CORRELATED, true);
+ caps.setCapabilitySupport(Capability.QUERY_SELECT_EXPRESSION, true);
caps.setCapabilitySupport(Capability.QUERY_AGGREGATES, true);
caps.setCapabilitySupport(Capability.QUERY_AGGREGATES_MAX, true);
caps.setCapabilitySupport(Capability.QUERY_AGGREGATES_MIN, true);
Modified: trunk/engine/src/test/java/com/metamatrix/query/optimizer/batch/TestBatchedUpdatePlanner.java
===================================================================
--- trunk/engine/src/test/java/com/metamatrix/query/optimizer/batch/TestBatchedUpdatePlanner.java 2009-10-27 01:16:42 UTC (rev 1542)
+++ trunk/engine/src/test/java/com/metamatrix/query/optimizer/batch/TestBatchedUpdatePlanner.java 2009-10-27 01:18:06 UTC (rev 1543)
@@ -24,7 +24,6 @@
import java.util.ArrayList;
import java.util.Collection;
-import java.util.HashMap;
import java.util.List;
import junit.framework.TestCase;
@@ -39,6 +38,8 @@
import com.metamatrix.query.metadata.QueryMetadataInterface;
import com.metamatrix.query.optimizer.QueryOptimizer;
import com.metamatrix.query.optimizer.capabilities.CapabilitiesFinder;
+import com.metamatrix.query.optimizer.capabilities.DefaultCapabilitiesFinder;
+import com.metamatrix.query.optimizer.capabilities.FakeCapabilitiesFinder;
import com.metamatrix.query.optimizer.capabilities.SourceCapabilities;
import com.metamatrix.query.parser.QueryParser;
import com.metamatrix.query.processor.ProcessorPlan;
@@ -126,13 +127,7 @@
}
public static CapabilitiesFinder getGenericFinder() {
- CapabilitiesFinder finder = new CapabilitiesFinder() {
- private SourceCapabilities caps = new FakeCapabilities(true);
- public SourceCapabilities findCapabilities(String modelName) throws MetaMatrixComponentException {
- return caps;
- }
- };
- return finder;
+ return new DefaultCapabilitiesFinder(new FakeCapabilities(true));
}
private BatchedUpdatePlan helpPlan(String[] sql, QueryMetadataInterface md) throws QueryParserException, QueryResolverException, QueryValidatorException, MetaMatrixComponentException, QueryPlannerException, QueryMetadataException {
@@ -195,8 +190,8 @@
"DELETE FROM pm1.g1 WHERE e2 > 5000", //$NON-NLS-1$
"UPDATE pm1.g1 set e2 = -1 WHERE e2 = 4999" //$NON-NLS-1$
};
- FakeFinder finder = new FakeFinder();
- finder.setCapabilities("pm1", new FakeCapabilities(false)); //$NON-NLS-1$
+ FakeCapabilitiesFinder finder = new FakeCapabilitiesFinder();
+ finder.addCapabilities("pm1", new FakeCapabilities(false)); //$NON-NLS-1$
boolean[] expectedBatching = {false, false, false, false};
helpTestPlanner(sql, expectedBatching, finder);
}
@@ -209,9 +204,9 @@
"UPDATE pm2.g1 set e2 = -1 WHERE e2 = 4999", //$NON-NLS-1$
"DELETE FROM pm1.g2 WHERE e2 = 50" //$NON-NLS-1$
};
- FakeFinder finder = new FakeFinder();
- finder.setCapabilities("pm1", new FakeCapabilities(false)); //$NON-NLS-1$
- finder.setCapabilities("pm2", new FakeCapabilities(true)); //$NON-NLS-1$
+ FakeCapabilitiesFinder finder = new FakeCapabilitiesFinder();
+ finder.addCapabilities("pm1", new FakeCapabilities(false)); //$NON-NLS-1$
+ finder.addCapabilities("pm2", new FakeCapabilities(true)); //$NON-NLS-1$
boolean[] expectedBatching = {false, false, true, false};
helpTestPlanner(sql, expectedBatching, finder);
}
@@ -230,15 +225,7 @@
public Object getSourceProperty(Capability propertyName) {return null;}
}
- private static final class FakeFinder implements CapabilitiesFinder {
- private HashMap caps = new HashMap();
- private void setCapabilities(String modelName, SourceCapabilities cap) {
- caps.put(modelName, cap);
- }
- public SourceCapabilities findCapabilities(String modelName) throws MetaMatrixComponentException {
- return (SourceCapabilities)caps.get(modelName);
- }
-}
+
private static final boolean DEBUG = false;
}
Modified: trunk/engine/src/test/java/com/metamatrix/query/optimizer/capabilities/FakeCapabilitiesFinder.java
===================================================================
--- trunk/engine/src/test/java/com/metamatrix/query/optimizer/capabilities/FakeCapabilitiesFinder.java 2009-10-27 01:16:42 UTC (rev 1542)
+++ trunk/engine/src/test/java/com/metamatrix/query/optimizer/capabilities/FakeCapabilitiesFinder.java 2009-10-27 01:18:06 UTC (rev 1543)
@@ -31,7 +31,7 @@
*/
public class FakeCapabilitiesFinder implements CapabilitiesFinder {
- private Map caps = new HashMap();
+ private Map<String, SourceCapabilities> caps = new HashMap<String, SourceCapabilities>();
/**
*
@@ -47,7 +47,7 @@
* @see com.metamatrix.query.optimizer.capabilities.CapabilitiesFinder#findCapabilities(java.lang.String)
*/
public SourceCapabilities findCapabilities(String connectorBindingID) throws MetaMatrixComponentException {
- return (SourceCapabilities) caps.get(connectorBindingID);
+ return caps.get(connectorBindingID);
}
public String toString() {
Modified: trunk/engine/src/test/java/com/metamatrix/query/optimizer/relational/rules/TestCapabilitiesUtil.java
===================================================================
--- trunk/engine/src/test/java/com/metamatrix/query/optimizer/relational/rules/TestCapabilitiesUtil.java 2009-10-27 01:16:42 UTC (rev 1542)
+++ trunk/engine/src/test/java/com/metamatrix/query/optimizer/relational/rules/TestCapabilitiesUtil.java 2009-10-27 01:18:06 UTC (rev 1543)
@@ -513,7 +513,7 @@
finder.addCapabilities("pm1", sourceCaps); //$NON-NLS-1$
// Test capabilities util
- boolean actual = CapabilitiesUtil.supportsSelectLiterals(modelID, metadata, finder);
+ boolean actual = CapabilitiesUtil.supportsSelectExpression(modelID, metadata, finder);
assertEquals("Got wrong answer for supports", supports, actual); //$NON-NLS-1$
}
Modified: trunk/engine/src/test/java/com/metamatrix/query/optimizer/relational/rules/TestRuleAccessPatternValidation.java
===================================================================
--- trunk/engine/src/test/java/com/metamatrix/query/optimizer/relational/rules/TestRuleAccessPatternValidation.java 2009-10-27 01:16:42 UTC (rev 1542)
+++ trunk/engine/src/test/java/com/metamatrix/query/optimizer/relational/rules/TestRuleAccessPatternValidation.java 2009-10-27 01:18:06 UTC (rev 1543)
@@ -34,7 +34,7 @@
import com.metamatrix.query.metadata.QueryMetadataInterface;
import com.metamatrix.query.optimizer.TestOptimizer;
import com.metamatrix.query.optimizer.capabilities.CapabilitiesFinder;
-import com.metamatrix.query.optimizer.capabilities.SourceCapabilities;
+import com.metamatrix.query.optimizer.capabilities.DefaultCapabilitiesFinder;
import com.metamatrix.query.optimizer.relational.GenerateCanonical;
import com.metamatrix.query.optimizer.relational.OptimizerRule;
import com.metamatrix.query.optimizer.relational.PlanHints;
@@ -130,12 +130,7 @@
System.out.println("EXECUTING " + rule); //$NON-NLS-1$
}
- CapabilitiesFinder finder = new CapabilitiesFinder() {
- private SourceCapabilities caps = TestOptimizer.getTypicalCapabilities();
- public SourceCapabilities findCapabilities(String modelName) throws MetaMatrixComponentException {
- return caps;
- }
- };
+ CapabilitiesFinder finder = new DefaultCapabilitiesFinder(TestOptimizer.getTypicalCapabilities());
plan = rule.execute(plan, metadata, finder, rules, new AnalysisRecord(false, false, debug), null);
if(debug) {
System.out.println("\nAFTER: \n" + plan); //$NON-NLS-1$
Modified: trunk/engine/src/test/java/com/metamatrix/query/processor/TestProcedureRelational.java
===================================================================
--- trunk/engine/src/test/java/com/metamatrix/query/processor/TestProcedureRelational.java 2009-10-27 01:16:42 UTC (rev 1542)
+++ trunk/engine/src/test/java/com/metamatrix/query/processor/TestProcedureRelational.java 2009-10-27 01:18:06 UTC (rev 1543)
@@ -195,6 +195,15 @@
TestOptimizer.helpPlan(sql, FakeMetadataFactory.example1Cached(), null, TestOptimizer.getGenericFinder(), null, false);
}
+ /**
+ * Will fail missing param2 assignment
+ */
+ @Test public void testProcAsTable5(){
+ String sql = "select param1, param2, e1, e2 from pm1.vsp26 where param1=e2 and param2 = 'a'"; //$NON-NLS-1$
+
+ TestOptimizer.helpPlan(sql, FakeMetadataFactory.example1Cached(), null, TestOptimizer.getGenericFinder(), null, false);
+ }
+
@Test public void testProcAsTableInJoin(){
String sql = "select param1, param2, pm1.vsp26.e2 from pm1.vsp26, pm1.g1 where param1 = pm1.g1.e2 and param2 = pm1.g1.e1 order by param1, param2, e2"; //$NON-NLS-1$
Modified: trunk/engine/src/test/java/com/metamatrix/query/processor/TestProcessor.java
===================================================================
--- trunk/engine/src/test/java/com/metamatrix/query/processor/TestProcessor.java 2009-10-27 01:16:42 UTC (rev 1542)
+++ trunk/engine/src/test/java/com/metamatrix/query/processor/TestProcessor.java 2009-10-27 01:18:06 UTC (rev 1543)
@@ -5567,6 +5567,7 @@
// Plan query
FakeCapabilitiesFinder capFinder = new FakeCapabilitiesFinder();
BasicSourceCapabilities caps = new BasicSourceCapabilities();
+ caps.setCapabilitySupport(Capability.QUERY_SELECT_EXPRESSION, true);
caps.setCapabilitySupport(Capability.QUERY_SEARCHED_CASE, true);
caps.setCapabilitySupport(Capability.QUERY_AGGREGATES, true);
caps.setCapabilitySupport(Capability.QUERY_AGGREGATES_SUM, true);
Modified: trunk/engine/src/test/java/com/metamatrix/query/processor/TestSetProcessing.java
===================================================================
--- trunk/engine/src/test/java/com/metamatrix/query/processor/TestSetProcessing.java 2009-10-27 01:16:42 UTC (rev 1542)
+++ trunk/engine/src/test/java/com/metamatrix/query/processor/TestSetProcessing.java 2009-10-27 01:18:06 UTC (rev 1543)
@@ -25,17 +25,19 @@
import java.util.Arrays;
import java.util.List;
-import junit.framework.TestCase;
+import org.junit.Test;
import com.metamatrix.query.optimizer.TestOptimizer;
+import com.metamatrix.query.optimizer.TestOptimizer.ComparisonMode;
+import com.metamatrix.query.optimizer.capabilities.DefaultCapabilitiesFinder;
import com.metamatrix.query.unittest.FakeMetadataFactory;
-public class TestSetProcessing extends TestCase {
+public class TestSetProcessing {
- public void testExcept() {
+ @Test public void testExcept() throws Exception {
String sql = "select e1, e2 from pm1.g2 except select e1, 1 from pm1.g2"; //$NON-NLS-1$
- ProcessorPlan plan = TestOptimizer.helpPlan(sql, FakeMetadataFactory.example1Cached(), new String[] {"SELECT g_0.e1 FROM pm1.g2 AS g_0", "SELECT g_0.e1, g_0.e2 FROM pm1.g2 AS g_0"}); //$NON-NLS-1$ //$NON-NLS-2$
+ ProcessorPlan plan = TestOptimizer.helpPlan(sql, FakeMetadataFactory.example1Cached(), null, new DefaultCapabilitiesFinder(), new String[] {"SELECT pm1.g2.e1 FROM pm1.g2", "SELECT pm1.g2.e1, pm1.g2.e2 FROM pm1.g2"}, ComparisonMode.EXACT_COMMAND_STRING); //$NON-NLS-1$ //$NON-NLS-2$
List<?>[] expected = new List[] {
Arrays.asList(new Object[] {"a", 0}), //$NON-NLS-1$
@@ -48,10 +50,10 @@
TestProcessor.helpProcess(plan, manager, expected);
}
- public void testIntersect() {
+ @Test public void testIntersect() throws Exception {
String sql = "select e1, e2 from pm1.g2 intersect select e1, 1 from pm1.g2"; //$NON-NLS-1$
- ProcessorPlan plan = TestOptimizer.helpPlan(sql, FakeMetadataFactory.example1Cached(), new String[] {"SELECT g_0.e1 FROM pm1.g2 AS g_0", "SELECT g_0.e1, g_0.e2 FROM pm1.g2 AS g_0"}); //$NON-NLS-1$ //$NON-NLS-2$
+ ProcessorPlan plan = TestOptimizer.helpPlan(sql, FakeMetadataFactory.example1Cached(), null, new DefaultCapabilitiesFinder(), new String[] {"SELECT pm1.g2.e1 FROM pm1.g2", "SELECT pm1.g2.e1, pm1.g2.e2 FROM pm1.g2"}, ComparisonMode.EXACT_COMMAND_STRING); //$NON-NLS-1$ //$NON-NLS-2$
List<?>[] expected = new List[] {
Arrays.asList(new Object[] {null, 1}),
@@ -63,10 +65,10 @@
TestProcessor.helpProcess(plan, manager, expected);
}
- public void testIntersectExcept() {
+ @Test public void testIntersectExcept() {
String sql = "select e1, e2 from pm1.g2 except select e1, 1 from pm1.g2 intersect select 'a', e2 from pm1.g2"; //$NON-NLS-1$
- ProcessorPlan plan = TestOptimizer.helpPlan(sql, FakeMetadataFactory.example1Cached(), new String[] {"SELECT g_0.e1 FROM pm1.g2 AS g_0", "SELECT g_0.e1, g_0.e2 FROM pm1.g2 AS g_0", "SELECT g_0.e2 FROM pm1.g2 AS g_0"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ProcessorPlan plan = TestOptimizer.helpPlan(sql, FakeMetadataFactory.example1Cached(), new String[] {"SELECT g_0.e1, 1 FROM pm1.g2 AS g_0", "SELECT g_0.e1, g_0.e2 FROM pm1.g2 AS g_0", "SELECT 'a', g_0.e2 FROM pm1.g2 AS g_0"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
List<?>[] expected = new List[] {
Arrays.asList(new Object[] {null, 1}),
Modified: trunk/engine/src/test/java/com/metamatrix/query/processor/relational/TestSortNode.java
===================================================================
--- trunk/engine/src/test/java/com/metamatrix/query/processor/relational/TestSortNode.java 2009-10-27 01:16:42 UTC (rev 1542)
+++ trunk/engine/src/test/java/com/metamatrix/query/processor/relational/TestSortNode.java 2009-10-27 01:18:06 UTC (rev 1543)
@@ -322,7 +322,7 @@
ElementSymbol es1 = new ElementSymbol("e1"); //$NON-NLS-1$
es1.setType(DataTypeManager.DefaultDataClasses.INTEGER);
BufferManager bm = BufferManagerFactory.getStandaloneBufferManager();
- TupleSourceID tsid = bm.createTupleSource(Arrays.asList(es1), new String[] {DataTypeManager.DefaultDataTypes.INTEGER}, "test", TupleSourceType.PROCESSOR); //$NON-NLS-1$
+ TupleSourceID tsid = bm.createTupleSource(Arrays.asList(es1), "test", TupleSourceType.PROCESSOR); //$NON-NLS-1$
bm.addTupleBatch(tsid, new TupleBatch(1, new List[] {Arrays.asList(1)}));
SortUtility su = new SortUtility(tsid, Arrays.asList(es1), Arrays.asList(Boolean.TRUE), Mode.DUP_REMOVE, bm, "test", true); //$NON-NLS-1$
TupleSourceID out = su.sort();
Modified: trunk/engine/src/test/java/com/metamatrix/query/processor/xml/TestXMLProcessor.java
===================================================================
--- trunk/engine/src/test/java/com/metamatrix/query/processor/xml/TestXMLProcessor.java 2009-10-27 01:16:42 UTC (rev 1542)
+++ trunk/engine/src/test/java/com/metamatrix/query/processor/xml/TestXMLProcessor.java 2009-10-27 01:18:06 UTC (rev 1543)
@@ -65,7 +65,6 @@
import com.metamatrix.query.optimizer.capabilities.BasicSourceCapabilities;
import com.metamatrix.query.optimizer.capabilities.CapabilitiesFinder;
import com.metamatrix.query.optimizer.capabilities.DefaultCapabilitiesFinder;
-import com.metamatrix.query.optimizer.capabilities.SourceCapabilities;
import com.metamatrix.query.optimizer.capabilities.SourceCapabilities.Capability;
import com.metamatrix.query.optimizer.xml.TestXMLPlanner;
import com.metamatrix.query.parser.ParseInfo;
@@ -10064,7 +10063,7 @@
caps.setCapabilitySupport(Capability.QUERY_SUBQUERIES_SCALAR, true);
caps.setCapabilitySupport(Capability.CRITERIA_COMPARE_EQ, true);
caps.setFunctionSupport("convert", true); //$NON-NLS-1$
- CapabilitiesFinder capFinder = new SimpleCapabilitiesFinder(caps);
+ CapabilitiesFinder capFinder = new DefaultCapabilitiesFinder(caps);
helpTestProcess("SELECT * FROM xmltest.doc12260", expectedDoc, metadata, dataMgr, true, MetaMatrixComponentException.class, null, capFinder); //$NON-NLS-1$
}
@@ -11914,13 +11913,4 @@
}
}
- private static final class SimpleCapabilitiesFinder implements CapabilitiesFinder{
- private SourceCapabilities caps;
- SimpleCapabilitiesFinder(SourceCapabilities caps){
- this.caps = caps;
- }
- public SourceCapabilities findCapabilities(String modelName) {
- return caps;
- }
- }
}
Added: trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestConnectorCapabilitiesFinder.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestConnectorCapabilitiesFinder.java (rev 0)
+++ trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestConnectorCapabilitiesFinder.java 2009-10-27 01:18:06 UTC (rev 1543)
@@ -0,0 +1,83 @@
+/*
+ * 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.internal.process;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+
+import junit.framework.TestCase;
+
+import org.mockito.Mockito;
+import org.teiid.dqp.internal.process.DQPWorkContext;
+import org.teiid.dqp.internal.process.SharedCachedFinder;
+
+import com.metamatrix.dqp.internal.datamgr.ConnectorID;
+import com.metamatrix.dqp.message.RequestMessage;
+import com.metamatrix.dqp.service.DataService;
+import com.metamatrix.dqp.service.VDBService;
+import com.metamatrix.query.optimizer.capabilities.BasicSourceCapabilities;
+import com.metamatrix.query.optimizer.capabilities.SourceCapabilities;
+
+/**
+ */
+public class TestConnectorCapabilitiesFinder extends TestCase {
+
+ /**
+ * Constructor for TestConnectorCapabilitiesFinder.
+ * @param name
+ */
+ public TestConnectorCapabilitiesFinder(String name) {
+ super(name);
+ }
+
+ public void testFind() throws Exception {
+ String vdbName = "myvdb"; //$NON-NLS-1$
+ String vdbVersion = "1"; //$NON-NLS-1$
+ String modelName = "model"; //$NON-NLS-1$
+ String functionName = "fakeFunction"; //$NON-NLS-1$
+
+ BasicSourceCapabilities caps = new BasicSourceCapabilities();
+ caps.setFunctionSupport("fakeFunction", true); //$NON-NLS-1$
+ RequestMessage request = new RequestMessage(null);
+ DQPWorkContext workContext = new DQPWorkContext();
+ workContext.setVdbName(vdbName);
+ workContext.setVdbVersion(vdbVersion);
+
+ VDBService vdbService = Mockito.mock(VDBService.class);
+ Mockito.stub(vdbService.getConnectorBindingNames(vdbName, vdbVersion, modelName)).toReturn(Arrays.asList(modelName));
+ DataService dataService = Mockito.mock(DataService.class);
+ ConnectorID id = new ConnectorID("foo"); //$NON-NLS-1$
+ Mockito.stub(dataService.selectConnector(modelName)).toReturn(id);
+ BasicSourceCapabilities basicSourceCapabilities = new BasicSourceCapabilities();
+ basicSourceCapabilities.setFunctionSupport(functionName, true);
+ Mockito.stub(dataService.getCapabilities(request, workContext, id)).toReturn(basicSourceCapabilities);
+
+ SharedCachedFinder finder = new SharedCachedFinder(vdbService, dataService, request, workContext, new HashMap<String, SourceCapabilities>());
+
+ // Test
+ SourceCapabilities actual = finder.findCapabilities(modelName);
+ assertEquals("Did not get expected capabilities", true, actual.supportsFunction(functionName)); //$NON-NLS-1$
+ }
+
+}
Property changes on: trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestConnectorCapabilitiesFinder.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 1 month
teiid SVN: r1542 - in trunk/engine/src/main/java: com/metamatrix/common/buffer/impl and 9 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2009-10-26 21:16:42 -0400 (Mon, 26 Oct 2009)
New Revision: 1542
Added:
trunk/engine/src/main/java/org/teiid/dqp/internal/process/SharedCachedFinder.java
Removed:
trunk/engine/src/main/java/com/metamatrix/query/util/TypeRetrievalUtil.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/capabilities/
Modified:
trunk/engine/src/main/java/com/metamatrix/common/buffer/BufferManager.java
trunk/engine/src/main/java/com/metamatrix/common/buffer/impl/BufferManagerImpl.java
trunk/engine/src/main/java/com/metamatrix/query/function/metadata/FunctionMetadataReader.java
trunk/engine/src/main/java/com/metamatrix/query/optimizer/capabilities/DefaultCapabilitiesFinder.java
trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/rules/CapabilitiesUtil.java
trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/rules/RulePlanProcedures.java
trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/rules/RulePushSelectCriteria.java
trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/rules/RuleRaiseAccess.java
trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/rules/RuleRemoveOptionalJoins.java
trunk/engine/src/main/java/com/metamatrix/query/processor/QueryProcessor.java
trunk/engine/src/main/java/com/metamatrix/query/processor/relational/BatchCollector.java
trunk/engine/src/main/java/com/metamatrix/query/processor/relational/DuplicateFilter.java
trunk/engine/src/main/java/com/metamatrix/query/processor/relational/GroupingNode.java
trunk/engine/src/main/java/com/metamatrix/query/processor/relational/SortUtility.java
trunk/engine/src/main/java/com/metamatrix/query/processor/relational/SourceState.java
trunk/engine/src/main/java/com/metamatrix/query/processor/xml/XMLUtil.java
trunk/engine/src/main/java/com/metamatrix/query/tempdata/TempTableStoreImpl.java
trunk/engine/src/main/java/com/metamatrix/query/util/CommandContext.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/Request.java
Log:
TEIID-203 correctly implementing the check for supportsSelectExpression. also merging Connector and Shared capabilities finders, and removing TypeRetrievalUtil
Modified: trunk/engine/src/main/java/com/metamatrix/common/buffer/BufferManager.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/common/buffer/BufferManager.java 2009-10-25 02:09:27 UTC (rev 1541)
+++ trunk/engine/src/main/java/com/metamatrix/common/buffer/BufferManager.java 2009-10-27 01:16:42 UTC (rev 1542)
@@ -100,13 +100,13 @@
* Creates a tuple source based on a schema and properties describing
* hints about the source
* @param elements Elements of the tuple source
- * @param groupName Tuple source group name
- * @param tupleSourceType Type of tuple source
+ * @param groupName Tuple source group name
+ * @param tupleSourceType Type of tuple source
* @return Identifier for tuple source
* @throws MetaMatrixComponentException indicating a non-business-related
* exception (such as a communication exception)
*/
- TupleSourceID createTupleSource(List elements, String[] types, String groupName, TupleSourceType tupleSourceType)
+ TupleSourceID createTupleSource(List elements, String groupName, TupleSourceType tupleSourceType)
throws MetaMatrixComponentException;
/**
Modified: trunk/engine/src/main/java/com/metamatrix/common/buffer/impl/BufferManagerImpl.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/common/buffer/impl/BufferManagerImpl.java 2009-10-25 02:09:27 UTC (rev 1541)
+++ trunk/engine/src/main/java/com/metamatrix/common/buffer/impl/BufferManagerImpl.java 2009-10-27 01:16:42 UTC (rev 1542)
@@ -29,6 +29,7 @@
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.List;
+import java.util.ListIterator;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
@@ -48,12 +49,14 @@
import com.metamatrix.common.buffer.TupleSourceNotFoundException;
import com.metamatrix.common.lob.LobChunk;
import com.metamatrix.common.log.LogManager;
+import com.metamatrix.common.types.DataTypeManager;
import com.metamatrix.common.types.Streamable;
import com.metamatrix.core.log.MessageLevel;
import com.metamatrix.core.util.Assertion;
import com.metamatrix.dqp.DQPPlugin;
import com.metamatrix.dqp.util.LogConstants;
import com.metamatrix.query.execution.QueryExecPlugin;
+import com.metamatrix.query.sql.symbol.Expression;
/**
* <p>Default implementation of BufferManager. This buffer manager implementation
@@ -242,18 +245,18 @@
/**
* Register a new tuple source and return a unique ID for it.
- * @param schema List of ElementSymbol
* @param groupName Group name
* @param tupleSourceType Type of tuple source as defined in BufferManager constants
+ * @param schema List of ElementSymbol
* @return New unique ID for this tuple source
* @throws MetaMatrixComponentException If internal server error occurs
*/
- public TupleSourceID createTupleSource(List schema, String[] types, String groupName, TupleSourceType tupleSourceType)
+ public TupleSourceID createTupleSource(List schema, String groupName, TupleSourceType tupleSourceType)
throws MetaMatrixComponentException {
TupleSourceID newID = new TupleSourceID(String.valueOf(this.currentTuple.getAndIncrement()), this.lookup);
TupleGroupInfo tupleGroupInfo = getGroupInfo(groupName);
- TupleSourceInfo info = new TupleSourceInfo(newID, schema, types, tupleGroupInfo, tupleSourceType);
+ TupleSourceInfo info = new TupleSourceInfo(newID, schema, getTypeNames(schema), tupleGroupInfo, tupleSourceType);
tupleGroupInfo.getTupleSourceIDs().add(newID);
tupleSourceMap.put(newID, info);
if (LogManager.isMessageToBeRecorded(LogConstants.CTX_BUFFER_MGR, MessageLevel.DETAIL)) {
@@ -262,6 +265,21 @@
return newID;
}
+
+ /**
+ * Gets the data type names for each of the input expressions, in order.
+ * @param expressions List of Expressions
+ * @return
+ * @since 4.2
+ */
+ public static String[] getTypeNames(List expressions) {
+ String[] types = new String[expressions.size()];
+ for (ListIterator i = expressions.listIterator(); i.hasNext();) {
+ Expression expr = (Expression)i.next();
+ types[i.previousIndex()] = DataTypeManager.getDataTypeName(expr.getType());
+ }
+ return types;
+ }
/**
* Remove a tuple source based on ID
Modified: trunk/engine/src/main/java/com/metamatrix/query/function/metadata/FunctionMetadataReader.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/function/metadata/FunctionMetadataReader.java 2009-10-25 02:09:27 UTC (rev 1541)
+++ trunk/engine/src/main/java/com/metamatrix/query/function/metadata/FunctionMetadataReader.java 2009-10-27 01:16:42 UTC (rev 1542)
@@ -106,9 +106,7 @@
}
return methods;
} catch (JDOMException e) {
- IOException ex = new IOException();
- ex.initCause(e);
- throw ex;
+ throw new IOException(e);
}
}
Modified: trunk/engine/src/main/java/com/metamatrix/query/optimizer/capabilities/DefaultCapabilitiesFinder.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/optimizer/capabilities/DefaultCapabilitiesFinder.java 2009-10-25 02:09:27 UTC (rev 1541)
+++ trunk/engine/src/main/java/com/metamatrix/query/optimizer/capabilities/DefaultCapabilitiesFinder.java 2009-10-27 01:16:42 UTC (rev 1542)
@@ -28,17 +28,23 @@
*/
public class DefaultCapabilitiesFinder implements CapabilitiesFinder {
+ private SourceCapabilities capabilities;
/**
*
*/
public DefaultCapabilitiesFinder() {
+ this.capabilities = new BasicSourceCapabilities();
}
+
+ public DefaultCapabilitiesFinder(SourceCapabilities capabilities) {
+ this.capabilities = capabilities;
+ }
/* (non-Javadoc)
* @see com.metamatrix.query.optimizer.capabilities.CapabilitiesFinder#findCapabilities(java.lang.Object)
*/
public SourceCapabilities findCapabilities(String modelName) throws MetaMatrixComponentException {
- return new BasicSourceCapabilities();
+ return capabilities;
}
}
Modified: trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/rules/CapabilitiesUtil.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/rules/CapabilitiesUtil.java 2009-10-25 02:09:27 UTC (rev 1541)
+++ trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/rules/CapabilitiesUtil.java 2009-10-27 01:16:42 UTC (rev 1542)
@@ -222,7 +222,7 @@
return supports(Capability.QUERY_SELECT_DISTINCT, modelID, metadata, capFinder);
}
- public static boolean supportsSelectLiterals(Object modelID, QueryMetadataInterface metadata, CapabilitiesFinder capFinder)
+ public static boolean supportsSelectExpression(Object modelID, QueryMetadataInterface metadata, CapabilitiesFinder capFinder)
throws QueryMetadataException, MetaMatrixComponentException {
return supports(Capability.QUERY_SELECT_EXPRESSION, modelID, metadata, capFinder);
}
Modified: trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/rules/RulePlanProcedures.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/rules/RulePlanProcedures.java 2009-10-25 02:09:27 UTC (rev 1541)
+++ trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/rules/RulePlanProcedures.java 2009-10-27 01:16:42 UTC (rev 1542)
@@ -183,7 +183,7 @@
}
public void visit(DependentSetCriteria obj) {
- if (checkForInput(obj.getExpression())) {
+ if (!obj.isNegated() && checkForInput(obj.getExpression())) {
addInputNode((Reference)obj.getExpression());
}
}
@@ -197,9 +197,9 @@
return inputs.contains(ref.getExpression());
}
- boolean checkForAnyInput(LanguageObject expr) {
- for (Iterator refs = ReferenceCollectorVisitor.getReferences(expr).iterator(); refs.hasNext();) {
- if (checkForInput((Expression)refs.next())) {
+ boolean checkForAnyInput(LanguageObject expr) {
+ for (Reference ref : ReferenceCollectorVisitor.getReferences(expr)) {
+ if (checkForInput(ref)) {
return true;
}
}
Modified: trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/rules/RulePushSelectCriteria.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/rules/RulePushSelectCriteria.java 2009-10-25 02:09:27 UTC (rev 1541)
+++ trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/rules/RulePushSelectCriteria.java 2009-10-27 01:16:42 UTC (rev 1542)
@@ -450,14 +450,11 @@
* @param elements
* @return
*/
- static boolean satisfyAccessPatterns(List aps, Collection elements) {
- for (Iterator i = aps.iterator(); i.hasNext();) {
- AccessPattern ap = (AccessPattern)i.next();
- if (ap.getCurrentElements().containsAll(elements)) {
- ap.getUnsatisfied().removeAll(elements);
- if (ap.getUnsatisfied().isEmpty()) {
- return true;
- }
+ static boolean satisfyAccessPatterns(List<AccessPattern> aps, Collection elements) {
+ for (AccessPattern ap : aps) {
+ ap.getUnsatisfied().removeAll(elements);
+ if (ap.getUnsatisfied().isEmpty()) {
+ return true;
}
}
return false;
Modified: trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/rules/RuleRaiseAccess.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/rules/RuleRaiseAccess.java 2009-10-25 02:09:27 UTC (rev 1541)
+++ trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/rules/RuleRaiseAccess.java 2009-10-27 01:16:42 UTC (rev 1542)
@@ -49,13 +49,11 @@
import com.metamatrix.query.sql.lang.JoinType;
import com.metamatrix.query.sql.lang.SetQuery.Operation;
import com.metamatrix.query.sql.symbol.AggregateSymbol;
-import com.metamatrix.query.sql.symbol.Constant;
import com.metamatrix.query.sql.symbol.ElementSymbol;
import com.metamatrix.query.sql.symbol.Expression;
import com.metamatrix.query.sql.symbol.GroupSymbol;
import com.metamatrix.query.sql.symbol.SingleElementSymbol;
import com.metamatrix.query.sql.util.SymbolMap;
-import com.metamatrix.query.sql.visitor.EvaluatableVisitor;
import com.metamatrix.query.util.CommandContext;
public final class RuleRaiseAccess implements OptimizerRule {
@@ -368,11 +366,9 @@
return false;
}
- if(inSelectClause && !(expr instanceof ElementSymbol)) {
- if (!CapabilitiesUtil.supportsSelectLiterals(modelID, metadata, capFinder)
- && (expr instanceof Constant || EvaluatableVisitor.willBecomeConstant(expr))) {
- return false;
- }
+ if(inSelectClause && !(expr instanceof ElementSymbol || expr instanceof AggregateSymbol)
+ && !CapabilitiesUtil.supportsSelectExpression(modelID, metadata, capFinder)) {
+ return false;
}
// By default, no reason we can't push
Modified: trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/rules/RuleRemoveOptionalJoins.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/rules/RuleRemoveOptionalJoins.java 2009-10-25 02:09:27 UTC (rev 1541)
+++ trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/rules/RuleRemoveOptionalJoins.java 2009-10-27 01:16:42 UTC (rev 1542)
@@ -244,6 +244,9 @@
*/
static boolean useNonDistinctRows(PlanNode parent) {
while (parent != null) {
+ if (parent.hasBooleanProperty(NodeConstants.Info.IS_DUP_REMOVAL)) {
+ return false;
+ }
switch (parent.getType()) {
case NodeConstants.Types.DUP_REMOVE: {
return false;
Modified: trunk/engine/src/main/java/com/metamatrix/query/processor/QueryProcessor.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/processor/QueryProcessor.java 2009-10-25 02:09:27 UTC (rev 1541)
+++ trunk/engine/src/main/java/com/metamatrix/query/processor/QueryProcessor.java 2009-10-27 01:16:42 UTC (rev 1542)
@@ -40,7 +40,6 @@
import com.metamatrix.dqp.util.LogConstants;
import com.metamatrix.query.execution.QueryExecPlugin;
import com.metamatrix.query.util.CommandContext;
-import com.metamatrix.query.util.TypeRetrievalUtil;
/**
* TODO: combine overlapping responsibilities with RequestWorkItem
@@ -85,7 +84,7 @@
// Add data manager to all nodes in tree
this.processPlan.initialize(context, this.dataMgr, bufferMgr);
- this.resultsID = bufferMgr.createTupleSource(processPlan.getOutputElements(), TypeRetrievalUtil.getTypeNames(processPlan.getOutputElements()), context.getConnectionID(), TupleSourceType.PROCESSOR);
+ this.resultsID = bufferMgr.createTupleSource(processPlan.getOutputElements(), context.getConnectionID(), TupleSourceType.PROCESSOR);
}
public CommandContext getContext() {
Modified: trunk/engine/src/main/java/com/metamatrix/query/processor/relational/BatchCollector.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/processor/relational/BatchCollector.java 2009-10-25 02:09:27 UTC (rev 1541)
+++ trunk/engine/src/main/java/com/metamatrix/query/processor/relational/BatchCollector.java 2009-10-27 01:16:42 UTC (rev 1542)
@@ -31,7 +31,6 @@
import com.metamatrix.common.buffer.TupleSourceNotFoundException;
import com.metamatrix.common.buffer.BufferManager.TupleSourceStatus;
import com.metamatrix.common.buffer.BufferManager.TupleSourceType;
-import com.metamatrix.query.util.TypeRetrievalUtil;
public class BatchCollector {
@@ -45,7 +44,7 @@
public BatchCollector(RelationalNode sourceNode) throws MetaMatrixComponentException {
this.sourceNode = sourceNode;
List sourceElements = sourceNode.getElements();
- tsID = sourceNode.getBufferManager().createTupleSource(sourceElements, TypeRetrievalUtil.getTypeNames(sourceElements), sourceNode.getConnectionID(), TupleSourceType.PROCESSOR);
+ tsID = sourceNode.getBufferManager().createTupleSource(sourceElements, sourceNode.getConnectionID(), TupleSourceType.PROCESSOR);
}
public TupleSourceID collectTuples() throws MetaMatrixComponentException, MetaMatrixProcessingException {
Modified: trunk/engine/src/main/java/com/metamatrix/query/processor/relational/DuplicateFilter.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/processor/relational/DuplicateFilter.java 2009-10-25 02:09:27 UTC (rev 1541)
+++ trunk/engine/src/main/java/com/metamatrix/query/processor/relational/DuplicateFilter.java 2009-10-27 01:16:42 UTC (rev 1542)
@@ -37,7 +37,6 @@
import com.metamatrix.query.function.aggregate.AggregateFunction;
import com.metamatrix.query.sql.lang.OrderBy;
import com.metamatrix.query.sql.symbol.ElementSymbol;
-import com.metamatrix.query.util.TypeRetrievalUtil;
/**
*/
@@ -50,7 +49,6 @@
// Derived and static - can be reused
private List elements;
- private String[] elementTypes;
private List sortTypes;
// Temporary state - should be reset
@@ -84,7 +82,6 @@
element.setType(inputType);
elements = new ArrayList();
elements.add(element);
- elementTypes = TypeRetrievalUtil.getTypeNames(elements);
sortTypes = new ArrayList();
sortTypes.add(Boolean.valueOf(OrderBy.ASC));
@@ -107,7 +104,7 @@
try {
if(collectionID == null) {
- collectionID = mgr.createTupleSource(elements, elementTypes, groupName, TupleSourceType.PROCESSOR);
+ collectionID = mgr.createTupleSource(elements, groupName, TupleSourceType.PROCESSOR);
this.tupleCollector = new TupleCollector(collectionID, mgr);
}
Modified: trunk/engine/src/main/java/com/metamatrix/query/processor/relational/GroupingNode.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/processor/relational/GroupingNode.java 2009-10-25 02:09:27 UTC (rev 1541)
+++ trunk/engine/src/main/java/com/metamatrix/query/processor/relational/GroupingNode.java 2009-10-27 01:16:42 UTC (rev 1542)
@@ -53,7 +53,6 @@
import com.metamatrix.query.sql.symbol.AggregateSymbol;
import com.metamatrix.query.sql.symbol.Expression;
import com.metamatrix.query.sql.symbol.SingleElementSymbol;
-import com.metamatrix.query.util.TypeRetrievalUtil;
public class GroupingNode extends RelationalNode {
@@ -148,7 +147,7 @@
// Determine expressions to build (all grouping expressions + expressions used by aggregates)
collectExpressions();
- this.collectionID = getBufferManager().createTupleSource(collectedExpressions, TypeRetrievalUtil.getTypeNames(collectedExpressions), getConnectionID(), TupleSourceType.PROCESSOR);
+ this.collectionID = getBufferManager().createTupleSource(collectedExpressions, getConnectionID(), TupleSourceType.PROCESSOR);
initializeFunctionAccumulators();
}
Modified: trunk/engine/src/main/java/com/metamatrix/query/processor/relational/SortUtility.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/processor/relational/SortUtility.java 2009-10-25 02:09:27 UTC (rev 1541)
+++ trunk/engine/src/main/java/com/metamatrix/query/processor/relational/SortUtility.java 2009-10-27 01:16:42 UTC (rev 1542)
@@ -42,7 +42,6 @@
import com.metamatrix.core.util.Assertion;
import com.metamatrix.query.sql.lang.OrderBy;
import com.metamatrix.query.sql.symbol.SingleElementSymbol;
-import com.metamatrix.query.util.TypeRetrievalUtil;
/**
*/
@@ -66,7 +65,6 @@
//init state
private int batchSize;
protected List schema;
- private String[] schemaTypes;
protected int[] sortCols;
private ListNestedSortComparator comparator;
@@ -153,7 +151,7 @@
}
private TupleSourceID createTupleSource() throws MetaMatrixComponentException {
- return bufferManager.createTupleSource(this.schema, this.schemaTypes, this.groupName, TupleSourceType.PROCESSOR);
+ return bufferManager.createTupleSource(this.schema, this.groupName, TupleSourceType.PROCESSOR);
}
protected void initialSort() throws BlockedOnMemoryException, TupleSourceNotFoundException, MetaMatrixComponentException {
@@ -405,7 +403,6 @@
private void initialize() throws TupleSourceNotFoundException, MetaMatrixComponentException {
this.schema = this.bufferManager.getTupleSchema(this.sourceID);
- this.schemaTypes = TypeRetrievalUtil.getTypeNames(schema);
this.batchSize = bufferManager.getProcessorBatchSize();
int distinctIndex = sortElements != null? sortElements.size() - 1:0;
if (useAllColumns && mode != Mode.SORT) {
Modified: trunk/engine/src/main/java/com/metamatrix/query/processor/relational/SourceState.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/processor/relational/SourceState.java 2009-10-25 02:09:27 UTC (rev 1541)
+++ trunk/engine/src/main/java/com/metamatrix/query/processor/relational/SourceState.java 2009-10-27 01:16:42 UTC (rev 1542)
@@ -31,7 +31,6 @@
import com.metamatrix.common.buffer.TupleSourceID;
import com.metamatrix.common.buffer.TupleSourceNotFoundException;
import com.metamatrix.common.buffer.BufferManager.TupleSourceType;
-import com.metamatrix.query.util.TypeRetrievalUtil;
class SourceState {
@@ -66,7 +65,7 @@
}
TupleSourceID createSourceTupleSource() throws MetaMatrixComponentException {
- return this.source.getBufferManager().createTupleSource(source.getElements(), TypeRetrievalUtil.getTypeNames(source.getElements()), source.getConnectionID(), TupleSourceType.PROCESSOR);
+ return this.source.getBufferManager().createTupleSource(source.getElements(), source.getConnectionID(), TupleSourceType.PROCESSOR);
}
public List saveNext() throws MetaMatrixComponentException, MetaMatrixProcessingException {
Modified: trunk/engine/src/main/java/com/metamatrix/query/processor/xml/XMLUtil.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/processor/xml/XMLUtil.java 2009-10-25 02:09:27 UTC (rev 1541)
+++ trunk/engine/src/main/java/com/metamatrix/query/processor/xml/XMLUtil.java 2009-10-27 01:16:42 UTC (rev 1542)
@@ -102,7 +102,7 @@
* Creates a buffer manager's id for XML based data.
*/
public static TupleSourceID createXMLTupleSource(BufferManager bufferMgr, String tupleGroupName) throws MetaMatrixComponentException {
- TupleSourceID sourceID = bufferMgr.createTupleSource(getOutputElements(), new String[]{DataTypeManager.DefaultDataTypes.XML}, tupleGroupName, TupleSourceType.PROCESSOR);
+ TupleSourceID sourceID = bufferMgr.createTupleSource(getOutputElements(), tupleGroupName, TupleSourceType.PROCESSOR);
return sourceID;
}
Modified: trunk/engine/src/main/java/com/metamatrix/query/tempdata/TempTableStoreImpl.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/tempdata/TempTableStoreImpl.java 2009-10-25 02:09:27 UTC (rev 1541)
+++ trunk/engine/src/main/java/com/metamatrix/query/tempdata/TempTableStoreImpl.java 2009-10-27 01:16:42 UTC (rev 1542)
@@ -66,7 +66,6 @@
import com.metamatrix.query.sql.symbol.Expression;
import com.metamatrix.query.sql.symbol.GroupSymbol;
import com.metamatrix.query.sql.symbol.SingleElementSymbol;
-import com.metamatrix.query.util.TypeRetrievalUtil;
/**
* @since 5.5
@@ -91,7 +90,7 @@
this.ts = buffer.getTupleSource(tsId);
List columns = buffer.getTupleSchema(tsId);
this.lookup = RelationalNode.createLookupMap(columns);
- this.newTs = buffer.createTupleSource(columns, TypeRetrievalUtil.getTypeNames(columns), sessionID, TupleSourceType.PROCESSOR);
+ this.newTs = buffer.createTupleSource(columns, sessionID, TupleSourceType.PROCESSOR);
this.tc = new TupleCollector(newTs, buffer);
this.eval = new Evaluator(lookup, null, null);
this.crit = crit;
@@ -170,7 +169,7 @@
//add metadata
tempMetadataStore.addTempGroup(tempTableName, columns, false, true);
//create tuple source
- TupleSourceID tsId = buffer.createTupleSource(columns, TypeRetrievalUtil.getTypeNames(columns), sessionID, TupleSourceType.PROCESSOR);
+ TupleSourceID tsId = buffer.createTupleSource(columns, sessionID, TupleSourceType.PROCESSOR);
try {
buffer.setStatus(tsId, TupleSourceStatus.FULL);
}catch(TupleSourceNotFoundException e) {
Modified: trunk/engine/src/main/java/com/metamatrix/query/util/CommandContext.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/util/CommandContext.java 2009-10-25 02:09:27 UTC (rev 1541)
+++ trunk/engine/src/main/java/com/metamatrix/query/util/CommandContext.java 2009-10-27 01:16:42 UTC (rev 1542)
@@ -168,7 +168,7 @@
public void setSessionFunctionEvaluated(boolean sessionFunctionEvaluated) {
if (parent != null) {
- parent.setCollectNodeStatistics(sessionFunctionEvaluated);
+ parent.setSessionFunctionEvaluated(sessionFunctionEvaluated);
} else {
this.sessionFunctionEvaluated = sessionFunctionEvaluated;
}
Deleted: trunk/engine/src/main/java/com/metamatrix/query/util/TypeRetrievalUtil.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/util/TypeRetrievalUtil.java 2009-10-25 02:09:27 UTC (rev 1541)
+++ trunk/engine/src/main/java/com/metamatrix/query/util/TypeRetrievalUtil.java 2009-10-27 01:16:42 UTC (rev 1542)
@@ -1,56 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package com.metamatrix.query.util;
-
-import java.util.List;
-import java.util.ListIterator;
-
-import com.metamatrix.common.types.DataTypeManager;
-import com.metamatrix.query.sql.symbol.Expression;
-
-
-/**
- * Utility to provide type names to pass to the BufferManager.createTupleSource() method.
- * @since 4.2
- */
-public class TypeRetrievalUtil {
- private TypeRetrievalUtil() {} // Uninstantiable
-
- /**
- * Gets the data type names for each of the input expressions, in order.
- * @param expressions List of Expressions
- * @return
- * @since 4.2
- */
- public static String[] getTypeNames(List expressions) {
- String[] types = new String[expressions.size()];
- ListIterator i = expressions.listIterator();
- Expression expr = null;
- for (int index = 0; i.hasNext(); index++) {
- expr = (Expression)i.next();
- types[index] = DataTypeManager.getDataTypeName(expr.getType());
- }
- return types;
- }
-
-}
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 2009-10-25 02:09:27 UTC (rev 1541)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/Request.java 2009-10-27 01:16:42 UTC (rev 1542)
@@ -34,8 +34,6 @@
import javax.transaction.SystemException;
import org.teiid.connector.xa.api.TransactionContext;
-import org.teiid.dqp.internal.process.capabilities.ConnectorCapabilitiesFinder;
-import org.teiid.dqp.internal.process.capabilities.SharedCachedFinder;
import org.teiid.dqp.internal.process.multisource.MultiSourceCapabilitiesFinder;
import org.teiid.dqp.internal.process.multisource.MultiSourceMetadataWrapper;
import org.teiid.dqp.internal.process.multisource.MultiSourcePlanToProcessConverter;
@@ -192,15 +190,12 @@
return;
}
// Prepare dependencies for running the optimizer
- CapabilitiesFinder baseFinder =
- new ConnectorCapabilitiesFinder(
+ this.capabilitiesFinder =
+ new SharedCachedFinder(
this.vdbService,
(DataService) this.env.findService(DQPServiceNames.DATA_SERVICE),
- requestMsg, workContext);
+ requestMsg, workContext, connectorCapabilitiesCache);
- // Wrap the finder with a cache
- this.capabilitiesFinder = new SharedCachedFinder(baseFinder, connectorCapabilitiesCache);
-
MetadataService metadataService = (MetadataService) this.env.findService(DQPServiceNames.METADATA_SERVICE);
if(metadataService == null){
//should not come here. Per defect 15087,
Added: trunk/engine/src/main/java/org/teiid/dqp/internal/process/SharedCachedFinder.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/SharedCachedFinder.java (rev 0)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/SharedCachedFinder.java 2009-10-27 01:16:42 UTC (rev 1542)
@@ -0,0 +1,109 @@
+/*
+ * 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.internal.process;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+import com.metamatrix.api.exception.MetaMatrixComponentException;
+import com.metamatrix.core.CoreConstants;
+import com.metamatrix.dqp.DQPPlugin;
+import com.metamatrix.dqp.internal.datamgr.ConnectorID;
+import com.metamatrix.dqp.message.RequestMessage;
+import com.metamatrix.dqp.service.DataService;
+import com.metamatrix.dqp.service.VDBService;
+import com.metamatrix.query.optimizer.capabilities.BasicSourceCapabilities;
+import com.metamatrix.query.optimizer.capabilities.CapabilitiesFinder;
+import com.metamatrix.query.optimizer.capabilities.SourceCapabilities;
+
+/**
+ */
+public class SharedCachedFinder implements CapabilitiesFinder {
+
+ private static BasicSourceCapabilities SYSTEM_CAPS = new BasicSourceCapabilities();
+
+ private VDBService vdbService;
+ private DataService dataService;
+ private RequestMessage requestMessage;
+ private DQPWorkContext workContext;
+
+ // Cache of SourceCapabilities by modelName
+ private Map<String, SourceCapabilities> capabilityCache; //synchronized
+ private Map<String, SourceCapabilities> userCache = new HashMap<String, SourceCapabilities>(); //unsynchronized
+
+
+ /**
+ * Construct a CacheFinder that wraps another finder
+ * @param internalFinder Finder to wrap
+ * @param sharedCache The shared cache - map of model name to SourceCapabilities
+ */
+ public SharedCachedFinder(VDBService vdbService, DataService dataService, RequestMessage requestMessage, DQPWorkContext workContext, Map<String, SourceCapabilities> sharedCache) {
+ this.vdbService = vdbService;
+ this.dataService = dataService;
+ this.requestMessage = requestMessage;
+ this.workContext = workContext;
+ this.capabilityCache = sharedCache;
+ userCache.put(CoreConstants.SYSTEM_MODEL, SYSTEM_CAPS);
+ }
+
+ /**
+ * Find capabilities used the cache if possible, otherwise do the lookup.
+ */
+ public SourceCapabilities findCapabilities(String modelName) throws MetaMatrixComponentException {
+ if (CoreConstants.SYSTEM_MODEL.equals(modelName)) {
+ return SYSTEM_CAPS;
+ }
+ SourceCapabilities caps = userCache.get(modelName);
+ if(caps != null) {
+ return caps;
+ }
+ caps = capabilityCache.get(modelName);
+ if(caps == null) {
+ // Find capabilities
+ List bindings = vdbService.getConnectorBindingNames(workContext.getVdbName(), workContext.getVdbVersion(), modelName);
+ for(int i=0; i<bindings.size(); i++) {
+ try {
+ String connBinding = (String) bindings.get(i);
+ ConnectorID connector = dataService.selectConnector(connBinding);
+ caps = dataService.getCapabilities(requestMessage, workContext, connector);
+ break;
+ }catch(MetaMatrixComponentException e) {
+ if(i == bindings.size()-1) {
+ throw e;
+ }
+ }
+ }
+ if(caps == null) {
+ throw new MetaMatrixComponentException(DQPPlugin.Util.getString("SharedCacheFinder.Didnt_find_caps", modelName)); //$NON-NLS-1$
+ }
+ }
+ if(caps.getScope() == SourceCapabilities.Scope.SCOPE_GLOBAL) {
+ capabilityCache.put(modelName, caps);
+ }
+ userCache.put(modelName, caps);
+ return caps;
+ }
+
+}
Property changes on: trunk/engine/src/main/java/org/teiid/dqp/internal/process/SharedCachedFinder.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 1 month
teiid SVN: r1541 - in trunk: client-jdbc/src/main/java/com/metamatrix/jdbc and 3 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2009-10-24 22:09:27 -0400 (Sat, 24 Oct 2009)
New Revision: 1541
Modified:
trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMDatabaseMetaData.java
trunk/common-core/src/main/java/com/metamatrix/core/CoreConstants.java
trunk/common-core/src/main/java/com/metamatrix/core/util/ResourceNameUtil.java
trunk/documentation/reference/src/main/docbook/en-US/content/system_tables.xml
trunk/pom.xml
Log:
TEIID-871 TEIID-792 TEIID-102 TEIID-254 TEIID-869 TEIID-875 further clean up of metadata related logic. The index connector has been removed and the system virtual views promoted to physical tables. some of the tables/procedures have been removed. and minor changes have been made to MMDatabaseMetadata queries.
Modified: trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMDatabaseMetaData.java
===================================================================
--- trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMDatabaseMetaData.java 2009-10-25 02:06:32 UTC (rev 1540)
+++ trunk/client-jdbc/src/main/java/com/metamatrix/jdbc/MMDatabaseMetaData.java 2009-10-25 02:09:27 UTC (rev 1541)
@@ -123,7 +123,6 @@
final private static class RUNTIME_MODEL{
public final static String VIRTUAL_MODEL_NAME = "System"; //$NON-NLS-1$
- public final static String JDBC_SYSTEM_MODEL_NAME = "System.JDBC"; //$NON-NLS-1$
}
private static final String TYPE_MAPPING;
@@ -187,7 +186,7 @@
private final static String QUERY_REFERENCE_KEYS =
new StringBuffer("SELECT PKTABLE_CAT, PKTABLE_SCHEM, PKTABLE_NAME, PKCOLUMN_NAME, FKTABLE_CAT, FKTABLE_SCHEM") //$NON-NLS-1$
.append(", FKTABLE_NAME, FKCOLUMN_NAME, KEY_SEQ, UPDATE_RULE, DELETE_RULE, FK_NAME, PK_NAME, DEFERRABILITY FROM ") //$NON-NLS-1$
- .append(RUNTIME_MODEL.JDBC_SYSTEM_MODEL_NAME).append(".ReferenceKeyColumns").toString(); //$NON-NLS-1$
+ .append(RUNTIME_MODEL.VIRTUAL_MODEL_NAME).append(".ReferenceKeyColumns").toString(); //$NON-NLS-1$
private final static String QUERY_CROSS_REFERENCES = new StringBuffer(QUERY_REFERENCE_KEYS)
.append(",").append(RUNTIME_MODEL.VIRTUAL_MODEL_NAME).append(".VirtualDatabases v WHERE UCASE(v.Name)").append(LIKE_ESCAPE).append("AND UCASE(v.Name) LIKE ?") //$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$
@@ -227,12 +226,12 @@
private static final String QUERY_INDEX_INFO =
new StringBuffer("SELECT NULL AS TABLE_CAT, v.Name AS TABLE_SCHEM, GroupFullName AS TABLE_NAME") //$NON-NLS-1$
- .append(", convert(0, boolean) AS NON_UNIQUE, NULL AS INDEX_QUALIFIER, KeyName AS INDEX_NAME") //$NON-NLS-1$
+ .append(", case when KeyType = 'Index' then TRUE else FALSE end AS NON_UNIQUE, NULL AS INDEX_QUALIFIER, KeyName AS INDEX_NAME") //$NON-NLS-1$
.append(", 0 AS TYPE, convert(Position, short) AS ORDINAL_POSITION, k.Name AS COLUMN_NAME") //$NON-NLS-1$
.append(", NULL AS ASC_OR_DESC, 0 AS CARDINALITY, 1 AS PAGES, NULL AS FILTER_CONDITION") //$NON-NLS-1$
.append(" FROM ").append(RUNTIME_MODEL.VIRTUAL_MODEL_NAME).append(".KeyElements k CROSS JOIN ") //$NON-NLS-1$ //$NON-NLS-2$
.append(RUNTIME_MODEL.VIRTUAL_MODEL_NAME).append(".VirtualDatabases v") //$NON-NLS-1$
- .append(" WHERE UCASE(v.Name)").append(LIKE_ESCAPE).append("AND KeyType LIKE 'Index' AND UCASE(GroupFullName) LIKE ?") //$NON-NLS-1$//$NON-NLS-2$
+ .append(" WHERE UCASE(v.Name)").append(LIKE_ESCAPE).append("AND KeyType IN ('Index', ?) AND UCASE(GroupFullName) LIKE ?") //$NON-NLS-1$//$NON-NLS-2$
.append(" ORDER BY NON_UNIQUE, TYPE, INDEX_NAME, ORDINAL_POSITION").toString(); //$NON-NLS-1$
private static final String QUERY_MODELS =
@@ -1074,7 +1073,8 @@
prepareQuery = driverConnection.prepareStatement(QUERY_INDEX_INFO);
prepareQuery.setObject(1, schema.toUpperCase());
- prepareQuery.setObject(2, table.toUpperCase());
+ prepareQuery.setObject(2, unique?null:"NonUnique"); //$NON-NLS-1$
+ prepareQuery.setObject(3, table.toUpperCase());
// make a query against runtimemetadata and get results
results = (MMResultSet) prepareQuery.executeQuery();
Modified: trunk/common-core/src/main/java/com/metamatrix/core/CoreConstants.java
===================================================================
--- trunk/common-core/src/main/java/com/metamatrix/core/CoreConstants.java 2009-10-25 02:06:32 UTC (rev 1540)
+++ trunk/common-core/src/main/java/com/metamatrix/core/CoreConstants.java 2009-10-25 02:09:27 UTC (rev 1541)
@@ -50,6 +50,8 @@
interface Trace {
String PROXIES = "proxies"; //$NON-NLS-1$
}
+
+ public static final String SYSTEM_MODEL = "System"; //$NON-NLS-1$
public static final String SYSTEM_VDB = "System.vdb"; //$NON-NLS-1$
Modified: trunk/common-core/src/main/java/com/metamatrix/core/util/ResourceNameUtil.java
===================================================================
--- trunk/common-core/src/main/java/com/metamatrix/core/util/ResourceNameUtil.java 2009-10-25 02:06:32 UTC (rev 1540)
+++ trunk/common-core/src/main/java/com/metamatrix/core/util/ResourceNameUtil.java 2009-10-25 02:09:27 UTC (rev 1541)
@@ -74,7 +74,7 @@
public static final String RELATIONAL_NAME = "Relational"; //$NON-NLS-1$
public static final String RELATIONSHIP_NAME = "Relationship"; //$NON-NLS-1$
public static final String SIMPLEDATATYPES_INSTANCE_NAME = "SimpleDatatypes-instance"; //$NON-NLS-1$
- public static final String SYSTEM_NAME = "System"; //$NON-NLS-1$
+ public static final String SYSTEM_NAME = CoreConstants.SYSTEM_MODEL;
public static final String SYSTEMADMIN_NAME = CoreConstants.SYSTEM_ADMIN_MODEL_NAME;
public static final String SYSTEMADMINPHYSICAL_NAME = CoreConstants.SYSTEM_ADMIN_PHYSICAL_MODEL_NAME;
public static final String SYSTEMPHYSICAL_NAME = CoreConstants.SYSTEM_PHYSICAL_MODEL_NAME;
Modified: trunk/documentation/reference/src/main/docbook/en-US/content/system_tables.xml
===================================================================
--- trunk/documentation/reference/src/main/docbook/en-US/content/system_tables.xml 2009-10-25 02:06:32 UTC (rev 1540)
+++ trunk/documentation/reference/src/main/docbook/en-US/content/system_tables.xml 2009-10-25 02:09:27 UTC (rev 1541)
@@ -1792,6 +1792,96 @@
</tgroup>
</informaltable>
</sect2>
+ <sect2>
+ <title>System.ProcedureParamProperties</title>
+ <para>This supplies information on procedure parameters.
+ </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>ModelName</para>
+ </entry>
+ <entry>
+ <para>string</para>
+ </entry>
+ <entry>
+ <para>Model name</para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>ProcedureName</para>
+ </entry>
+ <entry>
+ <para>string</para>
+ </entry>
+ <entry>
+ <para>Procedure name</para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>ProcedureParamName</para>
+ </entry>
+ <entry>
+ <para>string</para>
+ </entry>
+ <entry>
+ <para>Parameter name</para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>Name</para>
+ </entry>
+ <entry>
+ <para>string</para>
+ </entry>
+ <entry>
+ <para>Property name</para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>Value</para>
+ </entry>
+ <entry>
+ <para>string</para>
+ </entry>
+ <entry>
+ <para>Property value</para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>UID</para>
+ </entry>
+ <entry>
+ <para>string</para>
+ </entry>
+ <entry>
+ <para>param unique id</para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </sect2>
</sect1>
<sect1>
<title>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2009-10-25 02:06:32 UTC (rev 1540)
+++ trunk/pom.xml 2009-10-25 02:09:27 UTC (rev 1541)
@@ -336,11 +336,6 @@
<version>${project.version}</version>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.jboss.teiid</groupId>
- <artifactId>teiid-connector-metadata</artifactId>
- <version>${project.version}</version>
- </dependency>
<!-- External dependencies -->
<dependency>
@@ -458,7 +453,6 @@
<module>runtime</module>
<module>adminshell</module>
<module>test-integration</module>
- <module>connector-metadata</module>
<module>cache-jbosscache</module>
<module>hibernate-dialect</module>
</modules>
15 years, 1 month
teiid SVN: r1539 - in trunk/runtime/src: test/java/com/metamatrix/dqp/embedded/services and 1 other directory.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2009-10-24 22:04:53 -0400 (Sat, 24 Oct 2009)
New Revision: 1539
Added:
trunk/runtime/src/main/java/com/metamatrix/dqp/embedded/services/QueryMetadataCache.java
Removed:
trunk/runtime/src/main/java/com/metamatrix/dqp/embedded/services/DefaultIndexConnectorBinding.java
Modified:
trunk/runtime/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedBaseDQPService.java
trunk/runtime/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedDataService.java
trunk/runtime/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedMetadataService.java
trunk/runtime/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedVDBService.java
trunk/runtime/src/test/java/com/metamatrix/dqp/embedded/services/TestEmbeddedVDBService.java
Log:
TEIID-871 TEIID-792 TEIID-102 TEIID-254 TEIID-869 TEIID-875 further clean up of metadata related logic. The index connector has been removed and the system virtual views promoted to physical tables. some of the tables/procedures have been removed. and minor changes have been made to MMDatabaseMetadata queries.
Deleted: trunk/runtime/src/main/java/com/metamatrix/dqp/embedded/services/DefaultIndexConnectorBinding.java
===================================================================
--- trunk/runtime/src/main/java/com/metamatrix/dqp/embedded/services/DefaultIndexConnectorBinding.java 2009-10-25 02:03:40 UTC (rev 1538)
+++ trunk/runtime/src/main/java/com/metamatrix/dqp/embedded/services/DefaultIndexConnectorBinding.java 2009-10-25 02:04:53 UTC (rev 1539)
@@ -1,242 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package com.metamatrix.dqp.embedded.services;
-
-import java.util.Date;
-import java.util.Properties;
-
-import org.teiid.connector.api.ConnectorPropertyNames;
-
-import com.metamatrix.common.config.api.ComponentTypeID;
-import com.metamatrix.common.config.api.ConfigurationID;
-import com.metamatrix.common.config.api.ConnectorBinding;
-import com.metamatrix.common.config.model.ConfigurationVisitor;
-import com.metamatrix.common.namedobject.BaseID;
-import com.metamatrix.core.MetaMatrixRuntimeException;
-
-
-/**
- * This is default class which will used by the VDBs as ConnectorBinding for the
- * CoreConstants.SYSTEM_PHYSICAL_MODEL_NAME. This is same connector in all the
- * VDBs, however this is not included in the VDB.
- *
- * @since 4.3
- */
-class DefaultIndexConnectorBinding implements ConnectorBinding {
-
- private static final String INDEX_CONNECTOR_NAME = "Index_Connector"; //$NON-NLS-1$
- private static final String INDEX_CONNECTOR_CLASS_NAME = "com.metamatrix.connector.metadata.IndexConnector"; //$NON-NLS-1$
- private static final String INDEX_CONNECTOR_MAX_ROWS = "0"; //$NON-NLS-1$
-
- private Properties props = new Properties();
- private Date creationTime = new Date(System.currentTimeMillis());
-
- /**
- * ctor
- * @since 4.3
- */
- public DefaultIndexConnectorBinding() {
- this.props.setProperty(ConnectorPropertyNames.CONNECTOR_CLASS, INDEX_CONNECTOR_CLASS_NAME );
- this.props.setProperty(ConnectorPropertyNames.MAX_RESULT_ROWS, INDEX_CONNECTOR_MAX_ROWS );
- }
-
- /**
- * @see com.metamatrix.common.config.api.ConnectorBinding#getDeployedName()
- */
- public String getDeployedName() {
- return INDEX_CONNECTOR_NAME;
- }
-
-
- /**
- * @see com.metamatrix.common.config.api.ServiceComponentDefn#accept(com.metamatrix.common.config.model.ConfigurationVisitor)
- * @since 4.3
- */
- public void accept(ConfigurationVisitor visitor) {
- // no configuratio needed
- }
-
- /**
- * @see com.metamatrix.common.config.api.ServiceComponentDefn#getRoutingUUID()
- * @since 4.3
- */
- public String getRoutingUUID() {
- return INDEX_CONNECTOR_NAME;
- }
-
-
- /**
- * @since 6.1
- */
- public boolean isXASupported() {
- // TODO Auto-generated method stub
- return false;
- }
-
- /**
- * @see com.metamatrix.common.config.api.ComponentDefn#getConfigurationID()
- * @since 4.3
- */
- public ConfigurationID getConfigurationID() {
- return null;
- }
-
- /**
- * @see com.metamatrix.common.config.api.ComponentDefn#isEnabled()
- * @since 4.3
- */
- public boolean isEnabled() {
- return true;
- }
-
- /**
- * @see com.metamatrix.common.config.api.ComponentObject#getName()
- * @since 4.3
- */
- public String getName() {
- return INDEX_CONNECTOR_NAME;
- }
-
- /**
- * @see com.metamatrix.common.config.api.ComponentObject#getProperties()
- * @since 4.3
- */
- public Properties getProperties() {
- return props;
- }
-
- /**
- * @see com.metamatrix.common.config.api.ComponentObject#getProperty(java.lang.String)
- * @since 4.3
- */
- public String getProperty(String name) {
- return props.getProperty(name);
- }
-
- /**
- * @see com.metamatrix.common.config.api.ComponentObject#getComponentTypeID()
- * @since 4.3
- */
- public ComponentTypeID getComponentTypeID() {
- return new ComponentTypeID(INDEX_CONNECTOR_NAME);
- }
-
- /**
- * @see com.metamatrix.common.config.api.ComponentObject#getDescription()
- * @since 4.3
- */
- public String getDescription() {
- return INDEX_CONNECTOR_NAME;
- }
-
- /**
- * @see com.metamatrix.common.config.api.ComponentObject#getCreatedBy()
- * @since 4.3
- */
- public String getCreatedBy() {
- return "system.runtime"; //$NON-NLS-1$
- }
-
- /**
- * @see com.metamatrix.common.config.api.ComponentObject#getCreatedDate()
- * @since 4.3
- */
- public Date getCreatedDate() {
- return creationTime;
- }
-
- /**
- * @see com.metamatrix.common.config.api.ComponentObject#getLastChangedBy()
- * @since 4.3
- */
- public String getLastChangedBy() {
- return "none"; //$NON-NLS-1$
- }
-
- /**
- * @see com.metamatrix.common.config.api.ComponentObject#getLastChangedDate()
- * @since 4.3
- */
- public Date getLastChangedDate() {
- return creationTime;
- }
-
- /**
- * @see com.metamatrix.common.config.api.ComponentObject#isDependentUpon(com.metamatrix.common.namedobject.BaseID)
- * @since 4.3
- */
- public boolean isDependentUpon(BaseID componentObjectId) {
- return false;
- }
-
- /**
- * @see com.metamatrix.common.namedobject.BaseObject#getID()
- * @since 4.3
- */
- public BaseID getID() {
- return null;
- }
-
- /**
- * @see com.metamatrix.common.namedobject.BaseObject#getFullName()
- * @since 4.3
- */
- public String getFullName() {
- return INDEX_CONNECTOR_NAME;
- }
-
- /**
- * @see com.metamatrix.common.namedobject.BaseObject#compareTo(java.lang.Object)
- * @since 4.3
- */
- public int compareTo(Object obj) {
- return 0;
- }
- /**
- * Return a deep cloned instance of this object. Subclasses must override
- * this method.
- * @return the object that is the clone of this instance.
- */
- public Object clone() {
- try {
- return super.clone();
- } catch (CloneNotSupportedException e) {
- throw new MetaMatrixRuntimeException(e);
- }
- }
-
- /**
- * @see com.metamatrix.common.config.api.ConnectorBinding#getConnectorClass()
- * @since 4.3
- */
- public String getConnectorClass() {
- return INDEX_CONNECTOR_CLASS_NAME;
- }
-
- /**
- * @see com.metamatrix.common.config.api.ComponentDefn#isEssential()
- */
- public boolean isEssential() {
- return false;
- }
-}
Modified: trunk/runtime/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedBaseDQPService.java
===================================================================
--- trunk/runtime/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedBaseDQPService.java 2009-10-25 02:03:40 UTC (rev 1538)
+++ trunk/runtime/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedBaseDQPService.java 2009-10-25 02:04:53 UTC (rev 1539)
@@ -32,7 +32,6 @@
import com.metamatrix.common.application.exception.ApplicationLifecycleException;
import com.metamatrix.common.vdb.api.VDBArchive;
import com.metamatrix.common.vdb.api.VDBDefn;
-import com.metamatrix.core.CoreConstants;
import com.metamatrix.dqp.embedded.DQPEmbeddedPlugin;
import com.metamatrix.dqp.service.ConfigurationService;
import com.metamatrix.dqp.service.DQPServiceNames;
@@ -44,8 +43,6 @@
* @since 4.3
*/
public abstract class EmbeddedBaseDQPService implements ApplicationService {
- public static final String SYSTEM_PHYSICAL_MODEL_NAME = CoreConstants.SYSTEM_PHYSICAL_MODEL_NAME;
-
private boolean started = false;
private boolean initialized = false;
private ApplicationEnvironment environment;
Modified: trunk/runtime/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedDataService.java
===================================================================
--- trunk/runtime/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedDataService.java 2009-10-25 02:03:40 UTC (rev 1538)
+++ trunk/runtime/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedDataService.java 2009-10-25 02:04:53 UTC (rev 1539)
@@ -34,7 +34,7 @@
import org.teiid.adminapi.ConnectionPool;
import org.teiid.connector.api.ConnectorException;
import org.teiid.connector.api.ConnectorPropertyNames;
-import org.teiid.connector.metadata.runtime.ConnectorMetadata;
+import org.teiid.connector.metadata.runtime.MetadataStore;
import org.teiid.dqp.internal.datamgr.impl.ConnectorManager;
import org.teiid.dqp.internal.process.DQPWorkContext;
@@ -129,7 +129,7 @@
}
@Override
- public ConnectorMetadata getConnectorMetadata(String vdbName,
+ public MetadataStore getConnectorMetadata(String vdbName,
String vdbVersion, String modelName, Properties importProperties) throws MetaMatrixComponentException {
VDBService vdbService = (VDBService)this.lookupService(DQPServiceNames.VDB_SERVICE);
List<String> bindingNames = vdbService.getConnectorBindingNames(vdbName, vdbVersion, modelName);
@@ -363,9 +363,6 @@
getConfigurationService().register(this.listener);
try {
- // Start System Model connector Binding
- startConnectorBinding(SYSTEM_PHYSICAL_MODEL_NAME);
-
// Loop through the available ACTIVE VDBS and only start those
// connector bindings that are ACTIVE VDBS.
List otherBindings = new ArrayList();
@@ -462,13 +459,8 @@
ConnectorBinding binding = (ConnectorBinding)loadedConnectorBindingsMap.get(deployedConnectorBindingName);
if (binding == null) {
- if (SYSTEM_PHYSICAL_MODEL_NAME.equals(deployedConnectorBindingName)) {
- binding = getSystemModelBinding();
- }
- else {
- // if connector binding not found load from the configuration service.
- binding = getConfigurationService().getConnectorBinding(deployedConnectorBindingName);
- }
+ // if connector binding not found load from the configuration service.
+ binding = getConfigurationService().getConnectorBinding(deployedConnectorBindingName);
}
return binding;
}
@@ -569,13 +561,4 @@
return value;
}
- /**
- * Create a Connector Binding for the System Model.
- * @return
- * @since 4.3
- */
- ConnectorBinding getSystemModelBinding() {
- return new DefaultIndexConnectorBinding();
- }
-
}
Modified: trunk/runtime/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedMetadataService.java
===================================================================
--- trunk/runtime/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedMetadataService.java 2009-10-25 02:03:40 UTC (rev 1538)
+++ trunk/runtime/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedMetadataService.java 2009-10-25 02:04:53 UTC (rev 1539)
@@ -26,20 +26,19 @@
import java.util.Properties;
import org.teiid.connector.metadata.runtime.DatatypeRecordImpl;
-import org.teiid.metadata.QueryMetadataCache;
+import org.teiid.metadata.CompositeMetadataStore;
+import org.teiid.metadata.TransformationMetadata;
import com.metamatrix.api.exception.MetaMatrixComponentException;
import com.metamatrix.common.application.ApplicationEnvironment;
import com.metamatrix.common.application.exception.ApplicationInitializationException;
import com.metamatrix.common.application.exception.ApplicationLifecycleException;
-import com.metamatrix.connector.metadata.internal.IObjectSource;
import com.metamatrix.dqp.service.ConfigurationService;
import com.metamatrix.dqp.service.DQPServiceNames;
import com.metamatrix.dqp.service.DataService;
import com.metamatrix.dqp.service.MetadataService;
import com.metamatrix.dqp.service.VDBLifeCycleListener;
import com.metamatrix.dqp.service.VDBService;
-import com.metamatrix.query.metadata.QueryMetadataInterface;
/**
@@ -90,7 +89,7 @@
* @see com.metamatrix.dqp.service.MetadataService#lookupMetadata(java.lang.String, java.lang.String)
* @since 4.3
*/
- public QueryMetadataInterface lookupMetadata(String vdbName, String vdbVersion)
+ public TransformationMetadata lookupMetadata(String vdbName, String vdbVersion)
throws MetaMatrixComponentException {
VDBService vdbService = ((VDBService)lookupService(DQPServiceNames.VDB_SERVICE));
DataService dataService = ((DataService)lookupService(DQPServiceNames.DATA_SERVICE));
@@ -98,9 +97,8 @@
}
- public IObjectSource getMetadataObjectSource(String vdbName, String vdbVersion) throws MetaMatrixComponentException {
- VDBService vdbService = (VDBService)lookupService(DQPServiceNames.VDB_SERVICE);
- return this.metadataCache.getCompositeMetadataObjectSource(vdbName, vdbVersion, vdbService);
+ public CompositeMetadataStore getMetadataObjectSource(String vdbName, String vdbVersion) throws MetaMatrixComponentException {
+ return lookupMetadata(vdbName, vdbVersion).getMetadataStore();
}
@Override
Modified: trunk/runtime/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedVDBService.java
===================================================================
--- trunk/runtime/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedVDBService.java 2009-10-25 02:03:40 UTC (rev 1538)
+++ trunk/runtime/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedVDBService.java 2009-10-25 02:04:53 UTC (rev 1539)
@@ -79,10 +79,6 @@
return vdb;
}
- private boolean isSystemModel(String modelName) {
- return modelName.equalsIgnoreCase(SYSTEM_PHYSICAL_MODEL_NAME);
- }
-
private ModelInfo getModel(VDBDefn vdb, String modelName) {
Collection c = vdb.getModels();
Iterator it = c.iterator();
@@ -103,13 +99,6 @@
public List getConnectorBindingNames(String vdbName, String vdbVersion, String modelName)
throws MetaMatrixComponentException {
- // If the request for System model, we have a single name always
- if (isSystemModel(modelName)) {
- List list = new ArrayList();
- list.add(SYSTEM_PHYSICAL_MODEL_NAME);
- return list;
- }
-
// Otherwise get these from the database.
VDBArchive vdb = getVDB(vdbName, vdbVersion);
BasicVDBDefn def = vdb.getConfigurationDef();
@@ -143,11 +132,6 @@
public int getModelVisibility(String vdbName, String vdbVersion, String modelName)
throws MetaMatrixComponentException {
- // If this is system Model
- if (isSystemModel(modelName)) {
- return ModelInfo.PRIVATE;
- }
-
// If this is any of the Public System Models, like JDBC,ODBC system models
if(SystemVdbUtility.isSystemModelWithSystemTableType(modelName)){
return ModelInfo.PUBLIC;
@@ -174,11 +158,6 @@
String modelName = StringUtil.getFirstToken(StringUtil.getLastToken(pathInVDB, "/"), "."); //$NON-NLS-1$ //$NON-NLS-2$
- // If this is system Model
- if (isSystemModel(modelName)) {
- return ModelInfo.PRIVATE;
- }
-
// If this is any of the Public System Models, like JDBC,ODBC system models
if(SystemVdbUtility.isSystemModelWithSystemTableType(modelName)){
return ModelInfo.PUBLIC;
Copied: trunk/runtime/src/main/java/com/metamatrix/dqp/embedded/services/QueryMetadataCache.java (from rev 1529, trunk/metadata/src/main/java/org/teiid/metadata/QueryMetadataCache.java)
===================================================================
--- trunk/runtime/src/main/java/com/metamatrix/dqp/embedded/services/QueryMetadataCache.java (rev 0)
+++ trunk/runtime/src/main/java/com/metamatrix/dqp/embedded/services/QueryMetadataCache.java 2009-10-25 02:04:53 UTC (rev 1539)
@@ -0,0 +1,225 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package com.metamatrix.dqp.embedded.services;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.teiid.connector.metadata.runtime.DatatypeRecordImpl;
+import org.teiid.connector.metadata.runtime.MetadataStore;
+import org.teiid.metadata.CompositeMetadataStore;
+import org.teiid.metadata.TransformationMetadata;
+import org.teiid.metadata.index.IndexMetadataFactory;
+
+import com.metamatrix.api.exception.MetaMatrixComponentException;
+import com.metamatrix.common.log.LogManager;
+import com.metamatrix.common.types.DataTypeManager;
+import com.metamatrix.common.vdb.api.VDBArchive;
+import com.metamatrix.core.CoreConstants;
+import com.metamatrix.core.MetaMatrixRuntimeException;
+import com.metamatrix.dqp.DQPPlugin;
+import com.metamatrix.dqp.service.DataService;
+import com.metamatrix.dqp.util.LogConstants;
+import com.metamatrix.metadata.runtime.api.MetadataSource;
+import com.metamatrix.vdb.runtime.VDBKey;
+
+
+/**
+ * This caches QueryMetadataInterface implementations for all vdbs, each implementation has access to
+ * metadata for a given vdb and the system vdb.
+ * @since 4.2
+ */
+public class QueryMetadataCache {
+
+ private static class QueryMetadataHolder {
+ TransformationMetadata qmi;
+ }
+
+ // vdbID to QueryMetadataInterfaceHolder map
+ private Map<VDBKey, QueryMetadataHolder> vdbToQueryMetadata = Collections.synchronizedMap(new HashMap<VDBKey, QueryMetadataHolder>());
+ // RuntimeIndexSelector for the system vdb
+ private final VDBArchive systemVDBSelector;
+
+ // boolean for the cache being valid
+ private boolean isCacheValid = true;
+ private MetadataStore systemMetadataStore;
+
+ /**
+ * Constructor given a URL to a system vdb.
+ * @since 4.2
+ */
+ public QueryMetadataCache(final URL systemVdbUrl) throws MetaMatrixComponentException {
+ try {
+ this.systemVDBSelector = new VDBArchive(systemVdbUrl.openStream());
+ this.systemMetadataStore = new IndexMetadataFactory(this.systemVDBSelector).getMetadataStore();
+ } catch(IOException e) {
+ throw new MetaMatrixComponentException(e, DQPPlugin.Util.getString("QueryMetadataCache.Failed_creating_Runtime_Index_Selector._4", CoreConstants.SYSTEM_VDB)); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * Look up metadata for the given vdbName, version at the given filecontent.
+ * @throws MetaMatrixComponentException
+ */
+ public TransformationMetadata lookupMetadata(final String vdbName, final String vdbVersion, MetadataSource iss, DataService dataService) throws MetaMatrixComponentException {
+ assertIsValidCache();
+ VDBKey vdbID = toVdbID(vdbName, vdbVersion);
+ QueryMetadataHolder qmiHolder = null;
+ // Enter a synchronized block to find the holder of a QueryMetadataInterface for a VDB
+ synchronized(vdbToQueryMetadata) {
+ qmiHolder = vdbToQueryMetadata.get(vdbID);
+ if ( qmiHolder == null ) {
+ qmiHolder = new QueryMetadataHolder();
+ vdbToQueryMetadata.put(vdbID, qmiHolder);
+ }
+ }
+ synchronized (qmiHolder) {
+ if (qmiHolder.qmi == null) {
+ qmiHolder.qmi = loadMetadata(vdbID, iss, dataService);
+ }
+ }
+ return qmiHolder.qmi;
+ }
+
+ private void assertIsValidCache() {
+ if(!this.isCacheValid) {
+ throw new MetaMatrixRuntimeException(DQPPlugin.Util.getString("QueryMetadataCache.cache_not_valid")); //$NON-NLS-1$
+ }
+ }
+
+ private TransformationMetadata loadMetadata(final VDBKey vdbID, final MetadataSource runtimeSelector, DataService dataService) throws MetaMatrixComponentException {
+ // check cache status
+ assertIsValidCache();
+
+ List<MetadataStore> metadataStores = new ArrayList<MetadataStore>();
+ try {
+ metadataStores.add(new IndexMetadataFactory(runtimeSelector).getMetadataStore());
+ Set<String> modelNames = runtimeSelector.getConnectorMetadataModelNames();
+ if (!modelNames.isEmpty()) {
+ for (String modelName : modelNames) {
+ MetadataStore connectorMetadata = null;
+ String savedMetadata = "/META-INF/" + modelName.toLowerCase() + ".ser"; //$NON-NLS-1$ //$NON-NLS-2$
+ if (runtimeSelector.cacheConnectorMetadata()) {
+ File f = runtimeSelector.getFile(savedMetadata);
+ if (f != null) {
+ ObjectInputStream ois = null;
+ try {
+ ois = new ObjectInputStream(new FileInputStream(f));
+ connectorMetadata = (MetadataStore)ois.readObject();
+ } catch (Exception e) {
+
+ } finally {
+ if (ois != null) {
+ ois.close();
+ }
+ }
+ }
+ }
+ if (connectorMetadata == null) {
+ connectorMetadata = dataService.getConnectorMetadata(vdbID.getName(), vdbID.getVersion(), modelName, runtimeSelector.getModelInfo(modelName).getProperties());
+ }
+ if (runtimeSelector.cacheConnectorMetadata()) {
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ ObjectOutputStream oos = new ObjectOutputStream(baos);
+ oos.writeObject(connectorMetadata);
+ oos.close();
+ runtimeSelector.saveFile(new ByteArrayInputStream(baos.toByteArray()), savedMetadata);
+ }
+ metadataStores.add(connectorMetadata);
+ }
+ }
+ metadataStores.add(systemMetadataStore);
+ } catch (IOException e) {
+ throw new MetaMatrixComponentException(e);
+ }
+ // build a composite selector for the runtimeselectors of this vdb and system vdb
+ CompositeMetadataStore composite = new CompositeMetadataStore(metadataStores, runtimeSelector);
+ return new TransformationMetadata(composite);
+ }
+
+ public Map<String, DatatypeRecordImpl> getBuiltinDatatypes() {
+ Collection<DatatypeRecordImpl> datatypes = this.systemMetadataStore.getDatatypes();
+ Map<String, DatatypeRecordImpl> datatypeMap = new HashMap<String, DatatypeRecordImpl>();
+ for (Class<?> typeClass : DataTypeManager.getAllDataTypeClasses()) {
+ for (DatatypeRecordImpl datatypeRecordImpl : datatypes) {
+ if (datatypeRecordImpl.getJavaClassName().equals(typeClass.getName())) {
+ datatypeMap.put(DataTypeManager.getDataTypeName(typeClass), datatypeRecordImpl);
+ break;
+ }
+ }
+ }
+ return datatypeMap;
+ }
+
+ /**
+ * Clears all state on this cache and also deletes any indexfiles
+ * associated with the cache.
+ * @since 4.2
+ */
+ public void clearCache() {
+ LogManager.logTrace(LogConstants.CTX_DQP, new Object[] {"QueryMetadataCache Clearing VDB cache"}); //$NON-NLS-1$
+ // mark cache invalid
+ isCacheValid = false;
+ // Clear the holders ...
+ vdbToQueryMetadata.clear();
+
+ // Clean up the directory for the System VDB ...
+ if (this.systemVDBSelector != null) {
+ // selector should no longer be used
+ this.systemVDBSelector.close();
+ }
+ }
+
+ /**
+ * Remove cache for a given vdb, called when a vdb is actually deleted.
+ * Also deletes any temp files associated with the vdb.
+ */
+ public void removeFromCache(final String vdbName, final String vdbVersion) {
+ LogManager.logTrace(LogConstants.CTX_DQP, new Object[] {"QueryMetadataCache Removing vdb from cache", vdbName, vdbVersion}); //$NON-NLS-1$
+ if(vdbName != null && vdbVersion != null) {
+ final VDBKey vdbID = toVdbID(vdbName, vdbVersion);
+ vdbToQueryMetadata.remove(vdbID);
+ }
+ }
+
+ /**
+ * Return unique id for a vdb
+ */
+ private VDBKey toVdbID(final String vdbName, final String vdbVersion) {
+ return new VDBKey(vdbName, vdbVersion);
+ }
+
+}
Property changes on: trunk/runtime/src/main/java/com/metamatrix/dqp/embedded/services/QueryMetadataCache.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/runtime/src/test/java/com/metamatrix/dqp/embedded/services/TestEmbeddedVDBService.java
===================================================================
--- trunk/runtime/src/test/java/com/metamatrix/dqp/embedded/services/TestEmbeddedVDBService.java 2009-10-25 02:03:40 UTC (rev 1538)
+++ trunk/runtime/src/test/java/com/metamatrix/dqp/embedded/services/TestEmbeddedVDBService.java 2009-10-25 02:04:53 UTC (rev 1539)
@@ -81,17 +81,6 @@
}
}
- public void testSystemModelConnectorBinding() throws Exception {
- Properties p = EmbeddedTestUtil.getProperties();
- configService.setUserPreferences(p);
- configService.initializeService(p);
-
- // asking "vdb.name" and stored "vdb.name"
- List names = vdbService.getConnectorBindingNames("QT_Ora9DS", "1", EmbeddedBaseDQPService.SYSTEM_PHYSICAL_MODEL_NAME); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals(1, names.size());
- assertEquals(EmbeddedBaseDQPService.SYSTEM_PHYSICAL_MODEL_NAME, (String)names.get(0));
- }
-
// new VDB connector binding scope names
//---------------------------------------
// | stored |
15 years, 1 month
teiid SVN: r1538 - in trunk/metadata/src: main/java/org/teiid/internal/core/index and 8 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2009-10-24 22:03:40 -0400 (Sat, 24 Oct 2009)
New Revision: 1538
Added:
trunk/metadata/src/main/java/org/teiid/internal/core/index/CharOperation.java
Removed:
trunk/metadata/src/main/java/org/teiid/connector/metadata/
trunk/metadata/src/main/resources/org/teiid/connector/
trunk/metadata/src/main/system-models/SystemPhysical.xmi
trunk/metadata/src/main/system-models/system-admin-models/
trunk/metadata/src/test/java/com/metamatrix/connector/metadata/TestPropertyFileObjectSource.java
trunk/metadata/src/test/java/com/metamatrix/connector/metadata/index/
trunk/metadata/src/test/java/com/metamatrix/dqp/
Modified:
trunk/metadata/src/main/java/org/teiid/internal/core/index/BlocksIndexInput.java
trunk/metadata/src/main/java/org/teiid/internal/core/index/IndexBlock.java
trunk/metadata/src/main/java/org/teiid/internal/core/index/IndexSummary.java
trunk/metadata/src/main/resources/System.vdb
trunk/metadata/src/main/resources/org/teiid/metadata/i18n.properties
trunk/metadata/src/test/java/com/metamatrix/core/util/TestCharOperation.java
trunk/metadata/src/test/java/com/metamatrix/metadata/runtime/FakeMetadataService.java
Log:
TEIID-871 TEIID-792 TEIID-102 TEIID-254 TEIID-869 TEIID-875 further clean up of metadata related logic. The index connector has been removed and the system virtual views promoted to physical tables. some of the tables/procedures have been removed. and minor changes have been made to MMDatabaseMetadata queries.
Modified: trunk/metadata/src/main/java/org/teiid/internal/core/index/BlocksIndexInput.java
===================================================================
--- trunk/metadata/src/main/java/org/teiid/internal/core/index/BlocksIndexInput.java 2009-10-25 02:00:37 UTC (rev 1537)
+++ trunk/metadata/src/main/java/org/teiid/internal/core/index/BlocksIndexInput.java 2009-10-25 02:03:40 UTC (rev 1538)
@@ -20,7 +20,6 @@
import org.teiid.core.index.IDocument;
import org.teiid.core.index.IEntryResult;
import org.teiid.core.index.IQueryResult;
-import org.teiid.metadata.index.CharOperation;
import com.metamatrix.core.util.LRUCache;
Copied: trunk/metadata/src/main/java/org/teiid/internal/core/index/CharOperation.java (from rev 1529, trunk/metadata/src/main/java/org/teiid/metadata/index/CharOperation.java)
===================================================================
--- trunk/metadata/src/main/java/org/teiid/internal/core/index/CharOperation.java (rev 0)
+++ trunk/metadata/src/main/java/org/teiid/internal/core/index/CharOperation.java 2009-10-25 02:03:40 UTC (rev 1538)
@@ -0,0 +1,202 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2003 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ * MetaMatrix, Inc - repackaging and updates for use as a metadata store
+ *******************************************************************************/
+
+package org.teiid.internal.core.index;
+
+/**
+ * This class is a collection of helper methods to manipulate char arrays.
+ *
+ * @since 2.1
+ */
+public final class CharOperation {
+
+ /**
+ * Answers true if the pattern matches the given name, false otherwise. This
+ * char[] pattern matching accepts wild-cards '*' and '?'.
+ *
+ * When not case sensitive, the pattern is assumed to already be lowercased,
+ * the name will be lowercased character per character as comparing. If name
+ * is null, the answer is false. If pattern is null, the answer is true if
+ * name is not null. <br>
+ * <br>
+ * For example:
+ * <ol>
+ * <li>
+ *
+ * <pre>
+ * pattern = { '?', 'b', '*' }
+ * name = { 'a', 'b', 'c' , 'd' }
+ * isCaseSensitive = true
+ * result => true
+ * </pre>
+ *
+ * </li>
+ * <li>
+ *
+ * <pre>
+ * pattern = { '?', 'b', '?' }
+ * name = { 'a', 'b', 'c' , 'd' }
+ * isCaseSensitive = true
+ * result => false
+ * </pre>
+ *
+ * </li>
+ * <li>
+ *
+ * <pre>
+ * pattern = { 'b', '*' }
+ * name = { 'a', 'b', 'c' , 'd' }
+ * isCaseSensitive = true
+ * result => false
+ * </pre>
+ *
+ * </li>
+ * </ol>
+ *
+ * @param pattern
+ * the given pattern
+ * @param name
+ * the given name
+ * @param isCaseSensitive
+ * flag to know whether or not the matching should be case
+ * sensitive
+ * @return true if the pattern matches the given name, false otherwise
+ *
+ * TODO: this code was derived from eclipse CharOperation.
+ * It also lacks the ability to specify an escape character.
+ *
+ */
+ public static final boolean match(char[] pattern, char[] name,
+ boolean isCaseSensitive) {
+
+ if (name == null)
+ return false; // null name cannot match
+ if (pattern == null)
+ return true; // null pattern is equivalent to '*'
+
+ int patternEnd = pattern.length;
+ int nameEnd = name.length;
+
+ int iPattern = 0;
+ int iName = 0;
+
+ /* check first segment */
+ char patternChar = 0;
+ while ((iPattern < patternEnd)
+ && (patternChar = pattern[iPattern]) != '*') {
+ if (iName == nameEnd)
+ return false;
+ if (isCaseSensitive && patternChar != name[iName]
+ && patternChar != '?') {
+ return false;
+ } else if (!isCaseSensitive
+ && Character.toLowerCase(patternChar) != Character
+ .toLowerCase(name[iName]) && patternChar != '?') {
+ return false;
+ }
+ iName++;
+ iPattern++;
+ }
+ /* check sequence of star+segment */
+ int segmentStart;
+ if (patternChar == '*') {
+ if (patternEnd == 1) {
+ return true;
+ }
+ segmentStart = ++iPattern; // skip star
+ } else {
+ segmentStart = 0; // force iName check
+ }
+ int prefixStart = iName;
+ checkSegment: while (iName < nameEnd) {
+ if (iPattern == patternEnd) {
+ iPattern = segmentStart; // mismatch - restart current
+ // segment
+ iName = ++prefixStart;
+ continue checkSegment;
+ }
+ /* segment is ending */
+ if ((patternChar = pattern[iPattern]) == '*') {
+ segmentStart = ++iPattern; // skip start
+ if (segmentStart == patternEnd) {
+ return true;
+ }
+ prefixStart = iName;
+ continue checkSegment;
+ }
+ /* check current name character */
+ char matchChar = isCaseSensitive ? name[iName] : Character
+ .toLowerCase(name[iName]);
+ if ((isCaseSensitive ? ((matchChar != patternChar) && patternChar != '?')
+ : (matchChar != Character.toLowerCase(patternChar))
+ && patternChar != '?')) {
+ iPattern = segmentStart; // mismatch - restart current
+ // segment
+ iName = ++prefixStart;
+ continue checkSegment;
+ }
+ iName++;
+ iPattern++;
+ }
+
+ return (segmentStart == patternEnd)
+ || (iName == nameEnd && iPattern == patternEnd)
+ || (iPattern == patternEnd - 1 && pattern[iPattern] == '*');
+ }
+
+ /**
+ * Answers true if the given name starts with the given prefix, false otherwise.
+ * isCaseSensitive is used to find out whether or not the comparison should be case sensitive.
+ * <br>
+ * <br>
+ * For example:
+ * <ol>
+ * <li><pre>
+ * prefix = { 'a' , 'B' }
+ * name = { 'a' , 'b', 'b', 'a', 'b', 'a' }
+ * isCaseSensitive = false
+ * result => true
+ * </pre>
+ * </li>
+ * <li><pre>
+ * prefix = { 'a' , 'B' }
+ * name = { 'a' , 'b', 'b', 'a', 'b', 'a' }
+ * isCaseSensitive = true
+ * result => false
+ * </pre>
+ * </li>
+ * </ol>
+ *
+ * @param prefix the given prefix
+ * @param name the given name
+ * @param isCaseSensitive to find out whether or not the comparison should be case sensitive
+ * @return true if the given name starts with the given prefix, false otherwise
+ * @exception NullPointerException if the given name is null or if the given prefix is null
+ */
+ public static final boolean prefixEquals(char[] prefix, char[] name,
+ boolean isCaseSensitive) {
+
+ int max = prefix.length;
+ if (name.length < max)
+ return false;
+
+ for (int i = max; --i >= 0;) {
+ if (prefix[i] == name[i]
+ || (isCaseSensitive && Character.toLowerCase(prefix[i]) == Character
+ .toLowerCase(name[i]))) {
+ continue;
+ }
+ return false;
+ }
+ return true;
+ }
+}
Property changes on: trunk/metadata/src/main/java/org/teiid/internal/core/index/CharOperation.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/metadata/src/main/java/org/teiid/internal/core/index/IndexBlock.java
===================================================================
--- trunk/metadata/src/main/java/org/teiid/internal/core/index/IndexBlock.java 2009-10-25 02:00:37 UTC (rev 1537)
+++ trunk/metadata/src/main/java/org/teiid/internal/core/index/IndexBlock.java 2009-10-25 02:03:40 UTC (rev 1538)
@@ -13,7 +13,6 @@
import java.util.Arrays;
-import org.teiid.metadata.index.CharOperation;
/**
Modified: trunk/metadata/src/main/java/org/teiid/internal/core/index/IndexSummary.java
===================================================================
--- trunk/metadata/src/main/java/org/teiid/internal/core/index/IndexSummary.java 2009-10-25 02:00:37 UTC (rev 1537)
+++ trunk/metadata/src/main/java/org/teiid/internal/core/index/IndexSummary.java 2009-10-25 02:03:40 UTC (rev 1538)
@@ -15,7 +15,6 @@
import java.io.RandomAccessFile;
import java.util.ArrayList;
-import org.teiid.metadata.index.CharOperation;
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 2009-10-25 02:00:37 UTC (rev 1537)
+++ trunk/metadata/src/main/resources/org/teiid/metadata/i18n.properties 2009-10-25 02:03:40 UTC (rev 1538)
@@ -24,1101 +24,4 @@
# Note: All new messages should have been looked up before being logged! DON'T use I18nLogManager!
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-# ==========================================
-# Error Messages for the Metadata Package (008)
-# ==========================================
-#
-# example ERR.008.001.0001=Test Error Message for Metadata Package
-
-# ================== GENERIC METADATA MESSAGES ==================
-# generic (000)
-ERR.008.000.0001 = Error closing connection
-ERR.008.000.0002 = Error processing event
-ERR.008.000.0003 = Error loading configuration.
-ERR.008.000.0004 = Error creating unique id
-ERR.008.000.0005 = Attempt to compare null
-ERR.008.000.0006 = Error rolling back.
-ERR.008.000.0007 = Error executing query: {0}
-ERR.008.000.0008 = Error closing statement
-ERR.008.000.0009 = Error preparing statement: {0}
-ERR.008.000.0010 = Unable to commit transaction
-ERR.008.000.0011 = Unable to rollback transaction
-ERR.008.000.0012 = Unable to close transaction
-
-# ================== METADATA RUNTIME MESSAGES ==================
-# runtime (001)
-ERR.008.001.0001 = VDB name can not be null.
-ERR.008.001.0002 = Error obtaining active VDB ID for {0}
-ERR.008.001.0003 = There is no available virtual database with name: {0} and version: {1}
-ERR.008.001.0004 = RuntimeMetadata: failed setVDBStatus for vdb {0}
-ERR.008.001.0005 = Error obtaining active VDB
-ERR.008.001.0006 = Error obtaining VDB {0}
-ERR.008.001.0007 = Error obtaining active VDB IDs.
-ERR.008.001.0008 = Error obtaining MetaBase info.
-ERR.008.001.0009 = Error obtaining Models for VDB {0}
-ERR.008.001.0010 = Can not find modelID with name: {0} in VDB {1}
-ERR.008.001.0011 = Error obtaining runtime types.
-ERR.008.001.0012 = Error obtaining all data types.
-ERR.008.001.0013 = Error adding listener. Creating NoOpMessageBus.
-ERR.008.001.0014 = Unable to load the MetadataSupplier class "{0}". No dynamic runtime metadata loading will be available.
-ERR.008.001.0015 = Unable to instantiate the MetadataSupplier class "{0}". No dynamic runtime metadata loading will be available.
-ERR.008.001.0016 = Unable to access the MetadataSupplier class "{0}". No dynamic runtime metadata loading will be available.
-ERR.008.001.0017 = Error initializing transaction manager.
-ERR.008.001.0018 = The model name string may not be null
-ERR.008.001.0019 = The VirtualDatabaseID reference may not be null
-ERR.008.001.0020 = The model name string may not be zero-length
-ERR.008.001.0021 = The ModelID reference may not be null
-ERR.008.001.0022 = The VirtualDatabaseLoader reference may not be null
-ERR.008.001.0023 = The group name string may not be null
-ERR.008.001.0024 = The group name string may not be zero-length
-ERR.008.001.0025 = A model with name "{0}" cannot be found in the VDB "{1}"
-ERR.008.001.0026 = deleteVDBMarkedForDelete: Unable to delete VDB: {0}
-ERR.008.001.0027 = deleteVDBsMarkedForDelete(sessionID<{0}>) no sessions logged in: Unable to delete VDB: {1}
-ERR.008.001.0028 = Error getting sessions logged in to VDB version: {0} {1}
-ERR.008.001.0029 = Can''t delete Entitlements for VDB {0} version {1}
-ERR.008.001.0030 = Can''t delete the {0} Entitlements for VDB {1} version {2}
-ERR.008.001.0031 = Model is null in VDBMetadata, ID <{0}>
-ERR.008.001.0032 = GroupID is null in VDBMetadata, ID <{0}> under Model: <{1}>
-ERR.008.001.0033 = Resource {0} could not be found or loaded in order to know what type of model classes to entitle.
-
-# runtime.api (002)
-
-# runtime.event (003)
-
-# runtime.exception (004)
-
-# runtime.model (005)
-ERR.008.005.0001 = Invalid element full name.
-ERR.008.005.0002 = Invalid group full name.
-ERR.008.005.0003 = Invalid key full name.
-ERR.008.005.0004 = Unable to create an ID object with a null full name.
-ERR.008.005.0005 = Unable to create an ID object with a zero-length name.
-# ERR.008.005.0006 = Attempt to compare null
-ERR.008.005.0007 = Unable to create a basic object with a null ID
-ERR.008.005.0008 = Class Cast : Attempt to compare {0} to {1}
-ERR.008.005.0009 = Cannot clone this immutable object.
-ERR.008.005.0010 = The list of group names may not be null
-ERR.008.005.0011 = The list of group names may not be empty
-ERR.008.005.0012 = The list of group name may not be null
-ERR.008.005.0013 = The String builder method reference may not be null
-ERR.008.005.0014 = The VirtualDatabaseID reference may not be null
-ERR.008.005.0015 = The ModelID reference may not be null
-ERR.008.005.0016 = Invalid model full name {0}
-ERR.008.005.0017 = Invalid procedure full name.
-ERR.008.005.0018 = The fullnameWithinModel String may not be null
-ERR.008.005.0019 = The fullnameWithinModel String may not be zero-length
-ERR.008.005.0020 = The GroupID reference may not be null
-ERR.008.005.0021 = The name String may not be null
-ERR.008.005.0022 = The name dataTypeName may not be null
-ERR.008.005.0023 = The name String may not be zero-length
-ERR.008.005.0024 = The name dataTypeName may not be zero-length
-ERR.008.005.0025 = The DataType reference may not be null
-ERR.008.005.0026 = The Key reference may not be null
-ERR.008.005.0027 = The Element[] reference may not be null
-ERR.008.005.0028 = The Group reference may not be null
-ERR.008.005.0029 = The Element reference may not be null
-ERR.008.005.0030 = The Group reference must be an instance of BasicGroup
-ERR.008.005.0031 = The Element reference must be an instance of BasicElement
-ERR.008.005.0032 = Group {0} not found in the RuntimeMetadata.
-ERR.008.005.0033 = Key {0} not found in the RuntimeMetadata.
-ERR.008.005.0034 = Element {0} not found in the RuntimeMetadata.
-ERR.008.005.0035 = Model {0} not found in the RuntimeMetadata.
-ERR.008.005.0036 = Procedure {0} not found in the RuntimeMetadata.
-ERR.008.005.0037 = UnsupportedOperation : getMetaBaseInfo is not supported in MetadataCache
-ERR.008.005.0038 = UnsupportedOperation : getVirtualDatabaseID is not supported in MetadataCache
-ERR.008.005.0039 = Error obtaining elements in key.
-ERR.008.005.0040 = Error obtaining procedures.
-ERR.008.005.0041 = Error obtaining key.
-ERR.008.005.0042 = Error obtaining keys in model.
-ERR.008.005.0043 = Error obtaining keys in group.
-ERR.008.005.0044 = UnsupportedOperation : getVirtualDatabases is not supported in MetadataCache
-ERR.008.005.0045 = Can not find VDB with ID {0} and UUID {1}
-ERR.008.005.0046 = Can not find VDB {0}
-ERR.008.005.0047 = Error obtaining data types.
-ERR.008.005.0048 = Incomplete group name "{0}"
-ERR.008.005.0049 = Error creating KeyID for {0}
-ERR.008.005.0050 = Error creating ElementID for {0}
-ERR.008.005.0051 = Error creating ModelID for {0}
-ERR.008.005.0052 = Error creating ProcedureID for {0}
-ERR.008.005.0053 = Error obtaining properties.
-ERR.008.005.0054 = Error obtaining groupIDs for model.
-ERR.008.005.0055 = Error obtaining loaded groupIDs for model.
-ERR.008.005.0056 = Error obtaining groupIDs with the pattern {0}
-ERR.008.005.0057 = UnsupportedOperation : loadGroups is not supported in MetadataCache
-ERR.008.005.0058 = Error obtaining groupIDs that end with {0}
-ERR.008.005.0059 = Error obtaining XML Schema for {0}
-ERR.008.005.0060 = Error obtaining group.
-ERR.008.005.0061 = Error obtaining VDB.
-ERR.008.005.0062 = Error obtaining models.
-ERR.008.005.0063 = Error initializing object cache.
-ERR.008.005.0064 = Error loading built-in types.
-ERR.008.005.0065 = Error loading xml file: {0}
-ERR.008.005.0066 = Failed loading xml files into Runtime Metadata for VDB {0}
-ERR.008.005.0067 = There are unresolved references. See error log.
-ERR.008.005.0068 = Error inserting objects.
-ERR.008.005.0069 = Error creating VDB: {0}
-ERR.008.005.0070 = The virtual database is not fully created yet.
-ERR.008.005.0071 = Error setting VDB status.
-ERR.008.005.0072 = Error setting VDB: {0} active.
-ERR.008.005.0073 = Error broadcasting VDB changes.
-ERR.008.005.0074 = Virtual Database: {0} can not be deleted because it is not marked for deletion.
-ERR.008.005.0075 = Error deleting VDB.
-ERR.008.005.0076 = Error deleting VDB: {0}
-ERR.008.005.0077 = Error obtaining RT connector binding name.
-ERR.008.005.0078 = Error setting connector binding names.
-ERR.008.005.0079 = Error setting status.
-ERR.008.005.0080 = Error obtaining RT visibility levels.
-ERR.008.005.0081 = Error setting visibility levels.
-ERR.008.005.0082 = Error setting visibility levels updating system models
-ERR.008.005.0083 = Error adding Schemas
-ERR.008.005.0084 = Unable to resolve connection for Schema Insert.
-ERR.008.005.0085 = Error inserting Schema
-ERR.008.005.0086 = Error obtaining all model IDs.
-ERR.008.005.0087 = The VirtualDatabaseID reference may not be null
-ERR.008.005.0088 = The MetadataCache reference may not be null
-ERR.008.005.0089 = The MetadataSupplier reference may not be null
-ERR.008.005.0090 = Incomplete group name "{0}"
-ERR.008.005.0091 = The valid fullname string may not be null
-ERR.008.005.0092 = The test fullname string may not be null
-ERR.008.005.0093 = The ModelID reference may not be null
-ERR.008.005.0094 = The UpdateController reference may not be null
-ERR.008.005.0095 = The MetadataSupplier reference may not be null
-ERR.008.005.0096 = The VirtualDatabaseID reference may not be null
-ERR.008.005.0097 = The BasicModel reference may not be null
-ERR.008.005.0098 = Virtual Database already contains model "{0}"
-ERR.008.005.0099 = Unable to obtain connection to add relational model to VDB {0}
-ERR.008.005.0100 = Error adding relational model to VDB {0}
-ERR.008.005.0101 = The UpdateController reference may not be null
-ERR.008.005.0102 = The VirtualDatabaseID reference may not be null
-ERR.008.005.0103 = The ModelID reference may not be null
-ERR.008.005.0104 = Unable to obtain connection to add relational objects to VDB {0}
-ERR.008.005.0105 = Unable to obtain connection to delete relational objects from VDB
-ERR.008.005.0106 = Error updating the status of {0} for VDB {1}
-ERR.008.005.0107 = Error reading the status of {0} for VDB {1}
-ERR.008.005.0108 = Model {0} in virtual database {1} has a status of "{2}" and cannot be accessed at this time.
-ERR.008.005.0109 = Unable to obtain connection to delete relational objects from VDB {0}
-ERR.008.005.0110 = The model name string may not be null
-ERR.008.005.0111 = The model name string may not be zero-length
-ERR.008.005.0112 = The VirtualDatabaseLoader reference may not be null
-ERR.008.005.0113 = No VirtualDatabaseLoaderProperties returned for model {0}
-ERR.008.005.0114 = The group name string may not be null
-ERR.008.005.0115 = The group name string may not be zero-length
-ERR.008.005.0116 = The VirtualDatabaseMetadata must be an instance of BasicVirtualDatabaseMetadata
-ERR.008.005.0117 = The KeyID reference may not be null
-ERR.008.005.0118 = The List reference may not be null
-ERR.008.005.0119 = A model with the name, "{0}", does not exist for VDB, "{1}"
-ERR.008.005.0120 = Cannot create a ModelID with the name, "{0}". A model by that name already exists for VDB, "{1}"
-ERR.008.005.0121 = Cannot create a GroupID with the name, "{0}". A group by that name already exists for VDB, "{1}"
-ERR.008.005.0122 = The specified name, "{0}", is invalid: {1}
-
-
-# runtime.spi (006)
-ERR.008.006.0001 = Error obtaining connection for {0}
-ERR.008.006.0002 = The connection is not the appropriate type ("{0}")
-ERR.008.006.0003 = JDBC error while processing query: {0}
-ERR.008.006.0004 = Error processing results for query: {0}
-ERR.008.006.0005 = Error getting query plan for procedure using:{0}
-ERR.008.006.0006 = Unexpected Error getting Procedures
-ERR.008.006.0007 = The specified status, "{0}", is not one of the allowable values.
-ERR.008.006.0008 = The virtual database: {0} is already marked for deletion. It can not be set to other status.
-ERR.008.006.0009 = Error inserting models
-ERR.008.006.0010 = Error inserting groups
-ERR.008.006.0011 = Element: {0} does not have data type
-ERR.008.006.0012 = Unable to find a valid DataType with name "{0}"
-ERR.008.006.0013 = Error inserting elements
-ERR.008.006.0014 = Error inserting models
-ERR.008.006.0015 = Error inserting procedures
-ERR.008.006.0016 = Error inserting key elements
-ERR.008.006.0017 = Parameter: {0} does not have data type
-ERR.008.006.0018 = Error inserting parameters
-ERR.008.006.0019 = Error inserting properties
-ERR.008.006.0020 = Runtime type for type: {0} is not defined.
-ERR.008.006.0021 = Error inserting data types
-ERR.008.006.0022 = Error inserting data type elements
-ERR.008.006.0023 = Error inserting database: {0}
-ERR.008.006.0024 = Error deleting model : {0}
-ERR.008.006.0025 = Error deleting group : {0}
-ERR.008.006.0026 = Error deleting properties
-ERR.008.006.0027 = UnsupportedOperation : loadGroups is not supported for JDBCConnector
-ERR.008.006.0028 = Error inserting query plan: {0}
-ERR.008.006.0029 = Error processing document schema: Schema may not be null
-ERR.008.006.0030 = Error processing document schema: IDs may not be null {0} - {1}
-ERR.008.006.0031 = Error inserting schema: {0}
-ERR.008.006.0032 = Current system vdb is not active.
-ERR.008.006.0033 = Error obtaining all required models in order to update system models.
-ERR.008.006.0034 = Can not resolve RuntimeType for
-ERR.008.006.0035 = Error processing query: {0}
-ERR.008.006.0036 = There is no XML Schema in runtime metadata for {0}
-ERR.008.006.0037 = Referenced key {0} is not resolved.
-ERR.008.006.0038 = Error setting state to {0} for virtual database: {1}
-ERR.008.006.0039 = Error updating connector binding names for VDB {0}
-ERR.008.006.0040 = Error setting visibility levels for VDB {0}
-ERR.008.006.0041 = Error updating VDB {0}
-ERR.008.006.0042 = Error updating VDB models for vdb {0}
-ERR.008.006.0043 = Error updating VDB version for VDB {0}
-ERR.008.006.0044 = Error inserting VDB models for vdb {0}
-ERR.008.006.0045 = Error converting String to Date.
-ERR.008.006.0046 = Error parsing multiplicity: {0}
-ERR.008.006.0047 = Can not find dataType with uid {0} for element {1}
-ERR.008.006.0048 = Error creating objects.
-ERR.008.006.0049 = SearchType: {0} is not supported.
-ERR.008.006.0050 = Error obtaining multiplicity: {0}
-ERR.008.006.0051 = DataTypeType: {0} is not supported.
-ERR.008.006.0052 = NullType: {0} is not supported.
-ERR.008.006.0053 = Can not resolve runtime type {0}
-ERR.008.006.0054 = Error creating properties.
-ERR.008.006.0055 = Property value {0} not an instance of Boolean or String
-ERR.008.006.0056 = Unresolved dataType reference: {0}
-ERR.008.006.0057 = Unresolved element reference in key: {0}
-ERR.008.006.0058 = Unresolved foreign key reference in primary key: {0}
-ERR.008.006.0059 = Unresolved query reference in group: {0}
-ERR.008.006.0060 = Unresolved mapping reference in document element: {0}
-ERR.008.006.0061 = Error getting all data types.
-ERR.008.006.0062 = Error getting runtime type for {0}
-ERR.008.006.0063 = Can not get built-in type for {0}
-ERR.008.006.0064 = Error updating the model name for ModelID "{0}" with UID {1}
-ERR.008.006.0065 = Error updating the group path for GroupID "{0}" with UID {1}
-
-# runtime.util (007)
-ERR.008.007.0001 = One or more files are not found.
-ERR.008.007.0002 = Error saving input stream to file for key {0}
-ERR.008.007.0003 = Error saving input stream from file for key {0}
-
-# ================== METADATA SEARCHBASE MESSAGES ==================
-# searchbase (008)
-ERR.008.008.0001 = Searchbase Error processing element : {0}
-ERR.008.008.0002 = Error adding data type model for target {0}
-ERR.008.008.0003 = Searchbase Error establishing sb_publish connection pool
-ERR.008.008.0004 = Unable to get connection, target {0} is invalid and not known to the searchbase.
-
-# searchbase.api (009)
-
-# searchbase.apiimpl (010)
-
-# searchbase.command (011)
-
-# searchbase.exception (012)
-
-# searchbase.jdbc (013)
-
-# searchbase.processor (014)
-
-# searchbase.tool (015)
-
-# searchbase.transform (016)
-
-# searchbase.transform.xml (017)
-
-# searchbase.util (018)
-
-# searchbase.xmi (019)
-# ================== METADATA SERVER MESSAGES ==================
-# server.api (020)
-ERR.008.020.0001 = The entryUUIDs may not be null
-ERR.008.020.0002 = The entryUUID may not be null
-ERR.008.020.0003 = The UUID string may not be zero-length
-ERR.008.020.0004 = The version may not be null
-ERR.008.020.0005 = The getInfoCriteriaType may not be null, see GetInfoCriteria
-ERR.008.020.0006 = The getInfoCriteriaType string may not be zero-length, see GetInfoCriteria
-ERR.008.020.0007 = The searchCriteriaStatement may not be null
-ERR.008.020.0008 = The searchCriteriaStatement string may not be zero-length
-ERR.008.020.0009 = Search type {0} is not supported.
-ERR.008.020.0010 = The criteria may not be null, call getInfo to first obtain a criteria object.
-ERR.008.020.0011 = The version may not be null
-ERR.008.020.0012 = VersionLabel is not supported, must use a VersionRule or VersionName to specify the version.
-ERR.008.020.0013 = The from VersionIdentifier may not be null
-ERR.008.020.0014 = The to VersionIdentifier may not be null
-ERR.008.020.0015 = The from Date may not be null
-ERR.008.020.0016 = The to Date may not be null
-ERR.008.020.0017 = The dtcUUID may not be null
-ERR.008.020.0018 = The dtcUUID string may not be zero-length
-ERR.008.020.0019 = The parentUUID may not be null
-ERR.008.020.0020 = The parentUUID string may not be zero-length
-ERR.008.020.0021 = The userName may not be null
-ERR.008.020.0022 = The userName string may not be zero-length
-ERR.008.020.0023 = The projectUUID may not be null
-ERR.008.020.0024 = The projectUUID string may not be zero-length
-ERR.008.020.0025 = The map of primaryModelUUID and Versions may not be null
-ERR.008.020.0026 = The fileName string may not be null
-ERR.008.020.0027 = The fileName string may not be zero-length
-ERR.008.020.0028 = The creationDate string may not be null
-ERR.008.020.0029 = The content may not be null
-ERR.008.020.0030 = The fileType string may not be null
-ERR.008.020.0031 = The fileType string may not be zero-length
-ERR.008.020.0032 = Cannot name a file a reserved word.
-ERR.008.020.0033 = The lastModifiedDate string may not be null
-ERR.008.020.0034 = The folderName string may not be null
-ERR.008.020.0035 = The folderName string may not be zero-length
-ERR.008.020.0036 = The versionRollbackTo string may not be null
-ERR.008.020.0037 = The versionRollbackTo string may not be zero-length
-ERR.008.020.0038 = The newParentUUID string may not be null
-ERR.008.020.0039 = The newParentUUID string may not be zero-length
-ERR.008.020.0040 = The copy operation is not supported in the Toolkit
-ERR.008.020.0041 = The entry may not be null
-ERR.008.020.0042 = he updatedProperties may not be null
-ERR.008.020.0043 = The label string may not be null
-ERR.008.020.0044 = The label string may not be zero-length
-ERR.008.020.0045 = The UUID version list may not be null
-ERR.008.020.0046 = The resourceNames may not be null
-ERR.008.020.0047 = The first EntryInfo reference may not be null
-ERR.008.020.0048 = The second EntryInfo reference may not be null
-ERR.008.020.0049 = The name of the first EntryInfo reference may not be null
-ERR.008.020.0050 = The name of the second EntryInfo reference may not be null
-ERR.008.020.0051 = The entry UUID String reference may not be null.
-ERR.008.020.0052 = The entry UUID String reference may not be zero-length.
-ERR.008.020.0053 = The from VersionIdentifier may not be null
-ERR.008.020.0054 = The to VersionIdentifier may not be null
-ERR.008.020.0055 = The from Date may not be null
-ERR.008.020.0056 = The to Date may not be null
-ERR.008.020.0057 = Connection parameters cannot be null
-ERR.008.020.0058 = Method not implemented
-ERR.008.020.0059 = The label String reference may not be null.
-ERR.008.020.0060 = The label String reference may not be zero-length.
-ERR.008.020.0061 = The name String reference may not be null.
-ERR.008.020.0062 = The name String reference may not be zero-length.
-ERR.008.020.0063 = The rule String reference may not be null.
-ERR.008.020.0064 = The rule String reference may not be zero-length.
-
-# server.api.dtc (021)
-ERR.008.021.0001 = The root Document reference may not be null
-ERR.008.021.0002 = The InputStream reference may not be null
-ERR.008.021.0003 = Error loading the XMI document from the specified stream
-ERR.008.021.0004 = The dtcUUID may not be null
-ERR.008.021.0005 = The dtcUUID may not be zero length
-ERR.008.021.0006 = The dtcName may not be null
-ERR.008.021.0007 = The dtcName may not be zero length
-ERR.008.021.0008 = The projectUUID may not be null
-ERR.008.021.0009 = The projectUUID may not be zero length
-ERR.008.021.0010 = The entryInfos may not be null
-
-# server.api.event (022)
-
-# server.api.exception (023)
-ERR.008.023.0001 = Entry "{0}" is currently locked by user "{1}".
-ERR.008.023.0002 = Entry "{0}" is not currently locked.
-ERR.008.023.0003 = No version was found in the directory for entry "{0}".
-ERR.008.023.0004 = Entry "{0}" is currently locked by the current user.
-ERR.008.023.0005 = Folder copy is not supported.
-ERR.008.023.0006 = Need to recover entry "{0}" before it can be checked out.
-ERR.008.023.0007 = Entry "{0}" already exist with uuid "{1}".
-ERR.008.023.0008 = Entry does not exist for UUID "{0}" .
-ERR.008.023.0009 = A RuntimeMetadata Configuration In Progress does not exist for UUID "{0}" .
-ERR.008.023.0010 = There already exist a file or folder in this location with the name "{0}".
-ERR.008.023.0011 = The model "{0}" cannot be deleted, it is involved in making deployable configuration "{1}".
-ERR.008.023.0012 = Label "{0}" already exist for entry "{1}".
-ERR.008.023.0013 = The user "{0}" is not authorized to perform "{1}" on entry "{2}".
-ERR.008.023.0014 = The license prevents additional physical models from being added to the repository. No entry or entries added.
-
-# server.apiimpl (024)
-ERR.008.024.0001 = The name may not be null.
-ERR.008.024.0002 = The name may not be zero-length.
-ERR.008.024.0003 = The UUID may not be null.
-ERR.008.024.0004 = The UUID may not be zero-length.
-ERR.008.024.0005 = The file type may not be null.
-ERR.008.024.0006 = The file type may not be zero-length.
-ERR.008.024.0007 = The version may not be null.
-ERR.008.024.0008 = The version may not be zero-length.
-ERR.008.024.0009 = Context properties were not found in the sessions properties for initializaing MetadataServerAPI.
-ERR.008.024.0010 = {0} session exception
-ERR.008.024.0011 = {0} remote exception
-ERR.008.024.0012 = {0} naming exception
-ERR.008.024.0013 = {0} create exception
-ERR.008.024.0014 = Error in MetadataServer add message bus listener for class event {0}
-ERR.008.024.0015 = Illegal Argument in MetadataServerConnectionImpl add Event Listener: listener cannot be null
-ERR.008.024.0016 = The MetadataServerConnection is closed and may not be used.
-ERR.008.024.0017 = Invalid session when trying to submit request.
-ERR.008.024.0018 = Unable to complete directory request.
-ERR.008.024.0019 = Invalid Component when trying to submit request.
-ERR.008.024.0020 = Invalid session when trying to submit request.
-ERR.008.024.0021 = Exception occured when trying to submit request.
-ERR.008.024.0022 = Invalid Session
-ERR.008.024.0023 = The EventBroker reference may not be null
-ERR.008.024.0024 = The listener reference may not be null
-ERR.008.024.0025 = Unable to find EventObjectListener for {0}
-ERR.008.024.0026 = EntryAddCriteria may not be null
-ERR.008.024.0027 = The number of spaces to indent must be positive
-ERR.008.024.0028 = The request ID may not be null
-ERR.008.024.0029 = The session token may not be null
-ERR.008.024.0030 = The session token may not be zero-length
-ERR.008.024.0031 = This builder already has an unclosed document
-ERR.008.024.0032 = The username may not be null
-ERR.008.024.0033 = The username may not be zero-length
-ERR.008.024.0034 = Criteria object of type {0} is not supported.
-ERR.008.024.0035 = The criteria may not be null
-ERR.008.024.0036 = Unable to create inputstream for the file {0}
-ERR.008.024.0037 = Unable to load inputstream into byte array for entry {0}
-ERR.008.024.0038 = The history criteria may not be null
-ERR.008.024.0039 = The entry UUID list may not be null
-ERR.008.024.0040 = The UUID string may not be null
-ERR.008.024.0041 = The UUID string may not be zero-length
-ERR.008.024.0042 = The version string may not be null
-ERR.008.024.0043 = The version string may not be zero-length
-ERR.008.024.0044 = The content List may not be null
-ERR.008.024.0045 = The content InputStream may not be null
-ERR.008.024.0046 = The fileName string may not be null
-ERR.008.024.0047 = The fileName string may not be zero-length
-ERR.008.024.0048 = The fileType string may not be null
-ERR.008.024.0049 = The fileType string may not be zero-length
-ERR.008.024.0050 = RequestBuilder Error: Cannot use addFile method for the file type {0}
-ERR.008.024.0051 = Invalid criteria, no method was defined for this criteria.
-ERR.008.024.0052 = The Action string may not be null
-ERR.008.024.0053 = The Target string may not be null
-ERR.008.024.0054 = The new location string may not be null
-ERR.008.024.0055 = The folderName string may not be null
-ERR.008.024.0056 = The folderName string may not be zero-length
-ERR.008.024.0057 = The entry may not be null
-ERR.008.024.0058 = The new entry UUID string may not be null
-ERR.008.024.0059 = The new entry UUID string may not be zero-length
-ERR.008.024.0060 = The new parent UUID string may not be null
-ERR.008.024.0061 = The new parent UUID string may not be zero-length
-ERR.008.024.0062 = The version identifier may not be null
-ERR.008.024.0063 = Unable to convert XML to string for the request message.
-ERR.008.024.0064 = Unable to parse the response message.
-ERR.008.024.0065 = Unable to convert the response content InputStream into a byte array.
-ERR.008.024.0066 = Object type {0} is not supported for content.
-
-# server.apiimpl.dtc (025)
-ERR.008.025.0001 = The ObjectDefinition reference may not be null
-ERR.008.025.0002 = The DirectoryServiceProxy may not be null
-ERR.008.025.0003 = The DTCEditorImpl reference may not be null
-ERR.008.025.0004 = The TreeNode reference may not be null
-ERR.008.025.0005 = The referenced object is not a BasicTreeNode
-ERR.008.025.0006 = The PropertiedObject reference may not be null
-ERR.008.025.0007 = The referenced object is not a TreeNode
-ERR.008.025.0008 = The referenced object is not of type DTCDefinition
-ERR.008.025.0009 = The referenced object is not of type FolderDefinition
-
-# server.directory.api.exception (026)
-# server.directory.api.service (027)
-# server.directory.dtc (028)
-ERR.008.028.0001 = The dtcUUID may not be null
-ERR.008.028.0002 = The dtcUUID may not be zero length
-ERR.008.028.0003 = The dtcName may not be null
-ERR.008.028.0004 = The dtcName may not be zero length
-ERR.008.028.0005 = The projectUUID may not be null
-ERR.008.028.0006 = The projectUUID may not be zero length
-ERR.008.028.0007 = The entryInfos may not be null
-ERR.008.028.0008 = DTC In Progress has not completed, the content that manages the list of models has not been saved.
-ERR.008.028.0009 = No project file found in the repository for UUID: {0} version: {1}
-ERR.008.028.0010 = Project Model Content Error, project model {0} in the repository does not contain any content to determine model imports.
-ERR.008.028.0011 = Project Model Import Error, project model {0} in the repository does not contain any model imports.
-ERR.008.028.0012 = Connection is closed, cannot validate DTC {0}
-ERR.008.028.0013 = Unable to complete DTC Validation
-ERR.008.028.0014 = Unable to update the DTC from "Validating" to "InValid" status.
-ERR.008.028.0015 = Unable to notify of DTC validation
-ERR.008.028.0016 = Configuration Validation Error, unable to obtain models for validation.
-ERR.008.028.0017 = Configuration Validation Error, no models were found in the repository based on the request.
-ERR.008.028.0018 = Configuration Validation Error, unable to obtain model UUID {0} for validation.
-ERR.008.028.0019 = Configuration Validation Error, model {0} in the repository does not contain any content.
-ERR.008.028.0020 = Error obtaining model dependencies for validation.
-ERR.008.028.0021 = Configuration Validation Error, unable to load XMIDocument models for validation.
-ERR.008.028.0022 = Error obtaining dependent model for validation.
-ERR.008.028.0023 = Configuration Validation Error, model {0} has been included more than once in the validation. Check the internal model names for duplicates.
-ERR.008.028.0024 = Configuration Validation Error, problem obtaining file for uuid {0}.
-ERR.008.028.0025 = Configuration Validation Error, problem obtaining file {0}, the content is empty.
-ERR.008.028.0026 = Configuration Validation Error, unable to obtain model from repository for uuid {0}
-ERR.008.028.0027 = The MessageList reference may not be null.
-ERR.008.028.0028 = Exception during validation: {0}
-ERR.008.028.0029 = Aborted creation of Runtime Metadata Configuration due to validation errors.
-ERR.008.028.0030 = Configuration Validation Error, unable to create the Runtime Metadata Configuration Document.
-ERR.008.028.0031 = Validation Error Message: {0} {1}
-ERR.008.028.0032 = Cannot validate a null object.
-ERR.008.028.0033 = Error when attempting to perform validation process on object: {0}
-ERR.008.028.0034 = Unable to create the object ID for entry " + name + " using uuid
-ERR.008.028.0035 = Method not implemented
-
-# server.directory.service (029)
-ERR.008.029.0001 = Error initializing service for {0}
-ERR.008.029.0002 = Resource property "{0}" for Resource Name "{1}" is null.
-ERR.008.029.0003 = This DirectoryService is closed and cannot be used any longer
-ERR.008.029.0004 = The message reference may not be null
-ERR.008.029.0005 = Error submitting message {0}
-ERR.008.029.0006 = Error adding listener to message bus.
-ERR.008.029.0007 = Unable to get proxy for Authorization service.
-ERR.008.029.0008 = Invalid message request, {0} is not a valid method request.
-ERR.008.029.0009 = Error executing transaction {0}
-ERR.008.029.0010 = Error rolling back transaction for request {0}
-ERR.008.029.0011 = Invalid object passed for notify changes : Class {0} is invalid.
-ERR.008.029.0012 = Sending "CREATE" event for target: {0}
-ERR.008.029.0013 = Sending "DELETE" event for target: {0}
-ERR.008.029.0014 = Sending "CHANGE" event for target: {0}
-ERR.008.029.0015 = Error publishing changes.
-ERR.008.029.0016 = Unable to get user authorization for resources. The user principal "{0}" is not valid.
-ERR.008.029.0017 = Error getting user authorization for resources.
-ERR.008.029.0018 = Unable to filter directory response for {0} access. The user session "{1}" is not valid.
-ERR.008.029.0019 = Error filtering directory response for {0} access.
-ERR.008.029.0020 = Unable to check directory access. The user session "{0}" is not valid.
-ERR.008.029.0021 = Error checking directory access.
-ERR.008.029.0022 = getEntryInfo got fault: {0}
-
-# server.directory.spi (030)
-ERR.008.030.0001 = Unable to parse the requested document.
-ERR.008.030.0002 = The number of request in a request message body must be one, the number in the current body is {0}
-ERR.008.030.0003 = Invalid request node {0}
-ERR.008.030.0004 = Error building request message.
-ERR.008.030.0005 = Error building response message.
-
-# server.directory.spi.jdbc (031)
-ERR.008.031.0001 = The connection is not the appropriate type ("{0}")
-ERR.008.031.0002 = Installation Error - No Root Entry exist in the Directory
-ERR.008.031.0003 = No entry is found at location {0} to filter from.
-ERR.008.031.0004 = Request DTC in Progress {0} does not exist in order to delete.
-ERR.008.031.0005 = Request for DTC in Progress does not contain either a DTC uuid or Parent UUID
-ERR.008.031.0006 = Error inserting lock for entry {0} and version {1}
-ERR.008.031.0007 = No parent entry was found for the specified UUID {0}
-ERR.008.031.0008 = Parent location was not specified.
-ERR.008.031.0009 = UUID for the destination entry was not specified.
-ERR.008.031.0010 = Unable to add Dependency for entry {1}
-ERR.008.031.0011 = Parent entry may not be null when adding dependencies
-ERR.008.031.0012 = Unable to add dependencies. No child entry found for UUID {0} and version {1}
-ERR.008.031.0013 = Error reading basic entry information.
-ERR.008.031.0014 = No file content for UUID {0} version {1}
-ERR.008.031.0015 = Failed to execute the query "{0}"
-ERR.008.031.0016 = Unable to execute the query ("{0}") and/or process the results
-ERR.008.031.0017 = No Entry Found for UUID: {0}
-ERR.008.031.0018 = No Entry Found for UUID: {0} when checking isDeleted flag.
-ERR.008.031.0019 = Installation Problem, no type found for: {0} using SQL: {1}
-ERR.008.031.0020 = Unable to close the statement for query {0}
-ERR.008.031.0021 = Unable to insert new entry {0} for user {1}
-ERR.008.031.0022 = Unable to insert directory lock on UUID {0} for user {1}
-ERR.008.031.0023 = Unable to insert new version for entry {0} for user {1}
-ERR.008.031.0024 = Unable to insert label UUID {0} for user {1}
-ERR.008.031.0025 = Error inserting file data.
-ERR.008.031.0026 = Failed to execute the query {0}
-ERR.008.031.0027 = Programming Error: Inserting file data for platform {0} is not supported.
-ERR.008.031.0028 = No file found for version id {0}
-ERR.008.031.0029 = Error inserting file into directory using SQL statement: {0}
-ERR.008.031.0030 = JDBC error while inserting file data: {0}
-ERR.008.031.0031 = Unable to insert file dependencies for {0}
-ERR.008.031.0032 = Unable to insert orphaned dependencies for parent uuid {0} and child {1}
-ERR.008.031.0033 = JDBC error while inserting file data:
-ERR.008.031.0034 = Unable to remove lock for entry {0} for user {1}
-ERR.008.031.0035 = Unable to remove entry {0}
-ERR.008.031.0036 = Unable to remove versions for entry ID {0}
-ERR.008.031.0037 = Error deleting versions for entryID {0}
-ERR.008.031.0038 = Error deleting label {0} for UUID {1}
-ERR.008.031.0039 = Error deleting labels for UUID {0}
-ERR.008.031.0040 = Error deleting file for {0}
-ERR.008.031.0041 = Unable to remove DTC in progress {0}
-ERR.008.031.0042 = Unable to remove Orphaned Dependencies for uuid: {0}
-ERR.008.031.0043 = Unable to move Orphaned Dependencies for uuid: {0}
-ERR.008.031.0044 = Unable to set state for DTC in progress {0}
-ERR.008.031.0045 = No file found for uuid {0}
-ERR.008.031.0046 = Unable to update DTC in progress {0}
-ERR.008.031.0047 = Error rollback for {0}
-ERR.008.031.0048 = Error deleting entry {0}
-
-# server.resource (032)
-ERR.008.032.0001 = The parent of uuid {0} had fault: {1}
-ERR.008.032.0002 = Error submitting request
-ERR.008.032.0003 = Error creating DirectoryServiceProxy, {0}
-ERR.008.032.0004 = Failed to create MetaBase AuthorizationPermission for uuid: {0} at path: {1}
-ERR.008.032.0005 = Failed to delete MetaBase AuthorizationPermission for uuid: {0} at path: {1}
-ERR.008.032.0006 = Unable to parse the request message.
-ERR.008.032.0007 = The number of request in a request message body must be one, the number in the current body is {0}
-ERR.008.032.0008 = Invalid request node {0}
-ERR.008.032.0009 = Error building request message.
-ERR.008.032.0010 = Error building response message.
-ERR.008.032.0011 = Invalid message request, {0} is not a valid method request.
-ERR.008.032.0012 = Error obtaining resource information.
-
-# server.searchbase.api.service (033)
-
-# server.searchbase.service (034)
-ERR.008.034.0001 = Error initializing service for {0}
-ERR.008.034.0002 = The message reference may not be null
-ERR.008.034.0003 = Error submitting message {0}
-ERR.008.034.0004 = SearchbaseService error parsing for Searchbase commands.
-ERR.008.034.0005 = Error building target response message in Searchbase Service.
-
-# server.serverapi (035)
-ERR.008.035.0001 = invalid status: {0}
-
-# server.serverapi.beans (036)
-ERR.008.036.0001 = Error creating MetadataServerAPIBean, Exception: {0}
-ERR.008.036.0002 = License violation: Max number of {0} connections exceded, license only allows {1} connections.
-ERR.008.036.0003 = Error validating licenses for {0}
-ERR.008.036.0004 = Could not connect to a SessionService.
-ERR.008.036.0005 = SessionService error: Could not connectToProduct for {0}
-ERR.008.036.0006 = Metadata Server API Bean error parsing for Searchbase commands
-ERR.008.036.0007 = Can not find a handler to hanle the request.
-ERR.008.036.0008 = DirectoryServiceProxy couldn''t be instantiated.
-ERR.008.036.0009 = SearchbaseServiceProxy couldn''t be instantiated.
-ERR.008.036.0010 = Session "{0}" is not valid
-ERR.008.036.0011 = Unable to find a valid Session Service
-ERR.008.036.0012 = Unknown Session Service exception.
-
-# server.serverapi.beans.metadataserverapi (037)
-# server.serverapi.exception (038)
-# server.service (039)
-# server.util (040)
-ERR.008.040.0001 = The project name String may not be null.
-ERR.008.040.0002 = The project version String may not be null.
-ERR.008.040.0003 = The username String may not be null.
-ERR.008.040.0004 = The dtcName String may not be null.
-ERR.008.040.0005 = Object type {0} not supported for object conversion.
-ERR.008.040.0006 = File {0} is not found
-
-# ================== METADATA TRANSFORM MESSAGES ==================
-# transform (041)
-ERR.008.041.0007 = There was an error creating a Templates object from the XSLT source: {0}
-ERR.008.041.0008 = Unable to create an XSLT TransformerFactory instance.
-
-# ==========================================
-# LOG Messages for the Metadata Package (008)
-# ==========================================
-#
-# example: MSG.008.001.0001=Test Message for Metadata Package
-
-# ================== GENERIC METADATA MESSAGES ==================
-# generic (000)
-MSG.008.000.0001 = Properties successfully loaded.
-
-# ================== METADATA RUNTIME MESSAGES ==================
-# runtime (001)
-MSG.008.001.0001 = Transaction Mgr successfully initialized.
-MSG.008.001.0002 = Messagebus successfully initialized.
-MSG.008.001.0003 = Update controller successfully initialized.
-
-# runtime.api (002)
-
-# runtime.event (003)
-
-# runtime.exception (004)
-
-# runtime.model (005)
-MSG.008.005.0001 = Cache successfully initialized.
-MSG.008.005.0002 = creating vdb: {0}
-MSG.008.005.0003 = created vdb: {0}
-MSG.008.005.0004 = Can not find schema "{0}"
-MSG.008.005.0005 = WrappedCache successfully initialized.
-
-# runtime.spi (006)
-MSG.008.006.0001 = Deleted DaLogManager.logTracetaType with DBID {0}
-MSG.008.006.0002 = There is only one system virtual database, or the other one is incomplete. Nothing is done.
-MSG.008.006.0003 = Unable to resolve parent datatype for {0}
-MSG.008.006.0004 = Getting VDB: {0} with version: {1} and uid: {2}
-MSG.008.006.0005 = Got VDB ID: {0} with version: {1} and uid: {2}
-MSG.008.006.0006 = No VDB ID could be found for {0}
-
-# runtime.util (007)
-
-# ================== METADATA SEARCHBASE MESSAGES ==================
-# searchbase (008)
-MSG.008.008.0001 = Unable to add Command due to missing target ({0}) {1}
-MSG.008.008.0002 = Adding Connection Pool for target : {0}
-MSG.008.008.0003 = SearchbaseManager : Begin Lazy Init for Public SB Targets
-MSG.008.008.0004 = Config External SearchBase {0}
-MSG.008.008.0005 = Config External SearchBase {0} is a valid target and already defined
-MSG.008.008.0006 = SearchbaseManager created connection pool for target : {0}
-MSG.008.008.0007 = SearchbaseManager getConnection for target {0}
-MSG.008.008.0008 = SearchbaseManager : Invalid Connection Property. NULL value for {0}
-
-# searchbase.api (009)
-
-# searchbase.apiimpl (010)
-
-# searchbase.command (011)
-
-# searchbase.exception (012)
-
-# searchbase.jdbc (013)
-
-# searchbase.processor (014)
-
-# searchbase.tool (015)
-
-# searchbase.transform (016)
-
-# searchbase.transform.xml (017)
-
-# searchbase.util (018)
-
-# searchbase.xmi (019)
-
-# ================== METADATA SERVER MESSAGES ==================
-# server.api (020)
-# server.api.dtc (021)
-# server.api.event (022)
-# server.api.exception (023)
-# server.apiimpl (024)
-MSG.008.024.0001 = Searchbase found no public targets.
-MSG.008.024.0002 = GetResponses from response message: \n {0}
-MSG.008.024.0003 = GetResponse from response message: \n {0}
-
-# server.apiimpl.dtc (025)
-# server.directory.api.exception (026)
-# server.directory.api.service (027)
-MSG.008.027.0001 = RMI Error in DirectoryServiceProxy.
-
-# server.directory.dtc (028)
-MSG.008.028.0001 = Inserting DTC In Progress for UUID {0} and name {1}
-MSG.008.028.0002 = DTC Validation Project {0} uuid: {1}
-MSG.008.028.0003 = Starting DTC Validation
-MSG.008.028.0004 = ***** Validation succeeded
-MSG.008.028.0005 = ***** Validation failed
-MSG.008.028.0006 = Model Count to be Validated
-MSG.008.028.0007 = \tNumber of primary models: {0}
-MSG.008.028.0008 = \tNumber of secondary models: {0}
-MSG.008.028.0009 = \t --------
-MSG.008.028.0010 = \tTotal Number of Models: {0}\n
-MSG.008.028.0011 = Models are valid and will be auto deployed.
-MSG.008.028.0012 = Models are VALID, but WILL NOT be auto deployed.
-MSG.008.028.0013 = Models are INVALID and will not be deployed.
-MSG.008.028.0014 = Found {0} models requested in DTC for validation.
-MSG.008.028.0015 = DTC Validation found {0} models to make up the DTC.
-MSG.008.028.0016 = Completed Validating DTC and is DTC valid:
-MSG.008.028.0017 = Exception during validation
-MSG.008.028.0018 = Validating model {0}
-
-# server.directory.service (029)
-# MSG.008.029.0001 = Initialized directory service for {0}
-# MSG.008.029.0002 = Resource property "{0}" for Resource Name "{1}" is null.
-# MSG.008.029.0003 = {0} : closing
-# MSG.008.029.0004 = {0} : closed
-# MSG.008.029.0005 = Submitting message request {0}
-# MSG.008.029.0006 = Unable to add physical model(s) because maximum in license would be exceeded
-# MSG.008.029.0007 = Filtering {0} access by {1} to: {2}
-# MSG.008.029.0008 = Allowed {0} access by {1} to entries: {2}
-# MSG.008.029.0009 = Dissalowed {0} access by {1} to entries: {2}
-# MSG.008.029.0010 = UUID: {0} Path: {1} Requested Actions: {2}
-# MSG.008.029.0011 = assembleFullPath for entryInfo: {0}
-# MSG.008.029.0012 = assembleFullPath for: {0} : {1}
-# MSG.008.029.0013 = checkAuthAdd: Searching: {0} - {1}
-# MSG.008.029.0014 = checkAuthAdd: FOUND: {0} - {1}
-
-
-# server.resource (032)
-MSG.008.032.0001 = Unable to initialize DirectoryResourceResolverEnvironment: Couldn''t get proxy for Directory service. Will attempt again on demand.
-MSG.008.032.0002 = Error registering MetaBaseResourceResolver for Directory service events. Will attempt again on demand.
-MSG.008.032.0003 = Unable to get the children of "{0}" from Directory service: Couldn''t get proxy. Will attempt again on demand.
-MSG.008.032.0004 = Unable to get the children of <root> from Directory service: Couldn''t get proxy. Will attempt again on demand.
-MSG.008.032.0005 = Unable to get the parent info for "{0}" from Directory service: Couldn''t submit request. Will attempt again on demand.
-MSG.008.032.0006 = Unable to get the parent info for <root> from Directory service: Couldn''t submit request. Will attempt again on demand.
-MSG.008.032.0007 = Got back null for parent of uuid: {0}
-MSG.008.032.0008 = Got back same uuid: {0} for parent of uuid: {1}
-MSG.008.032.0009 = Unable to get the children info for "{0}" from Directory service: Couldn''t submit request. Will attempt again on demand.
-MSG.008.032.0010 = Unable to get the children info for <root> from Directory service: Couldn''t submit request. Will attempt again on demand.
-MSG.008.032.0011 = Unable to get the path for "{0}" from Directory service: Couldn''t get proxy. Will attempt again on demand.
-MSG.008.032.0012 = Unable to get the path for <root> from Directory service: Couldn''t get proxy. Will attempt again on demand.
-
-
-UpdateController.VDB_File_already_exist_in_extension_modules_25=VDB File {0} already exist in extension modules
-UpdateController.VDB_File_does_not_exist_in_extension_modules_1=VDB File {0} does not exist in extension modules
-
-# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-# Note: All new messages should have been looked up before being logged! DON'T use I18nLogManager!
-# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-VDBDefinition.Model_is_at_a_nondeployable_severity_state=Model {0} is at a nondeployable severity state of {1}
-VDBDefinition.Problem_closing_context_editor=Problem closing VDB context editor when processing vdb {0}
-
-MetadataCache.Model_is_at_a_nondeployable_severity_state=Model {0} is at a nondeployable severity state of {1}
-MetadataCache.VDB_is_at_a_nondeployable_severity_state=VDB {0} is at a nondeployable severity state of {1}
-
-RuntimeMetadataCatalog.Error_adding_listener=Unable to add listener for runtimemetadata events
-RuntimeMetadataCatalog.No_connector_binding_found=Connector Binding with routing ID {0} was not found in the configuration.
-RuntimeMetadataCatalog.System_cache_initialized=System vdb cache is initialized.
-RuntimeMetadataCatalog.VDB_cache_initialized=VDB cache is initialized for {0}.
-
-VDBDefXMLHelper.Unexpected_header_element=The element {0} is not the header element.
-
-
-VDBDefnFactory.VDBDefn_file_doesnt_exist= VDBDefn file {0} does not exist.
-VDBDefnFactory.VDBDefn_file_not_readable=VDBDefn file {0} can not be read.
-VDBDefnFactory.Unable_to_read_file=Unable to read the Document from file {0} inputStream.
-VDBDefnFactory.VDB_version_not_found=VDB: {0}, version: {1} was not found.
-VDBDefnFactory.Load_vdb_models=Loading Models for VDB {0}
-VDBDefnFactory.No_connector_binding_found=Error Exporting: Connector binding {0} not found.
-VDBDefnFactory.Unable_to_defn_file=Unable to read the VDB Definition file.
-VDBDefnFactory.Model_not_found=The model ''{0}'' was not found in the selected VDB. You must use ''New VDB Version...'' to interactively deploy a new version.
-
-VDBDeleteUtility.1=VDB {0} has been deleted.
-VDBDeleteUtility.2=Authorization polices have been deleted for VDB name= {0} and version= {1}.
-
-
-VDBDefnImportExport.Invalid_properties=Properties must not be null.
-VDBDefnImportExport.Invalid_property={0} property must be specified to export a VDB.
-
-VDBDefnImportExport.0=The # of VMs are {0} and they are: {1}
-VDBDefnImportExport.1=No VMs specified for binding deployment
-VDBDefnImportExport.2=Error: VDB {0} was imported, but unable to migrate entitlements due to no MetaMatrix server is running.
-VDBDefnImportExport.Exporting_vdb_version=Exporting VDB {0} Version {1}
-VDBDefnImportExport.Exporting_vdb=Exporting VDB {0} Version Not Specified
-VDBDefnImportExport.3= Error migrating entitlements.
-
-VDBCreation.0=VM {0} is not deployed and will not have the connector deployed to it.
-VDBCreation.2=Deploy existing binding {0} to VM {1} for PSC {2}
-VDBCreation.3=Deploy created binding {0} to VM {1} for PSC {2}
-VDBCreation.4=No VM deployed and therefore no bindngs can be deployed
-VDBCreation.5=Deploying binding {0} to VM {1} in list
-VDBCreation.7=ConnectorBinding {0} will be updated.
-VDBCreation.11=Creating PSC {0} to deploy binding {1}
-VDBDefnImport.Failed_license_check=Failed to add source. You have reached the limit of sources per VDB defined in your MetaMatrix license. Number of sources in VDB: {0}.
-
-VDBCreation.Invalid_VDB_name=VDB Name must be specified.
-VDBCreation.Does_connectorbinding_exist=Does ConnectorBinding ''{0}'' exist?
-VDBCreation.Connectorbinding_exist=ConnectorBinding ''{0}'' already exist.
-VDBCreation.Connectorbinding_will_be_added=ConnectorBinding ''{0}'' will be added.
-VDBCreation.Invalid_VDB_model=The VDBModel definition must not be null.
-VDBCreation.Invalid_VDB_defintion=The VDB definition must not be null.
-VDBCreation.No_name_defined=No {0} is defined in properties.
-VDBCreation.No_model_found_in_VDB=Model {0} NOT found in the VDB inputstream.
-VDBCreation.Error_importing_vdbfile= Error importing vdb file {0}
-VDBCreation.Error_deploying_binding=Error deploying connectorbinding {0}, it was not deployed after deploying the psc {1}
-VDBCreation.Connectorbinding_created=ConnectorBinding ''{0}'' was created.
-VDBCreation.Warning_binding_does_not_exist=<** Warning **> ConnectorBinding {0} does not exist in the configuration and may not have been created.
-VDBCreation.No_type_passed_and_bindingtype_not_found=There was no connector type passed for binding {0} and the referenced type {1} was not found.
-
-RuntimeMetadataAdminAPIImpl.Can_t_delete_VDB_in_state_{0}=Can''t delete a VDB that''s in state:
-RuntimeMetadataAdminAPIImpl.Unable_to_set_connector_bindings.=Unable to set connector bindings.
-RuntimeMetadataAdminAPIImpl.Can__t_set_VDB_state_from_{0}_to_{1}=Can''t set VDB state from: {0} to: {1}
-RuntimeMetadataAdminAPIImpl.The_resource_for_this_permission_does_not_exist_in_the_target_VDB.=The resource for this permission does not exist in the target VDB.
-RuntimeMetadataAdminAPIImpl.Migrated=Migrated
-RuntimeMetadataAdminAPIImpl.VDB_null=VDB may not be null.
-RuntimeMetadataAdminAPIImpl.This_resource_exists_in_the_target_VDB_but_not_in_the_source_VDB.=This resource exists in the target VDB but not in the source VDB.
-RuntimeMetadataAdminAPIImpl.Error_getting_VDBDefn_for_{0}=Error getting VDBDefn for {0}
-RuntimeMetadataAdminAPIImpl.materializationUserName_null=materializationUserName may not be null or empty.
-RuntimeMetadataAdminAPIImpl.VDB_has_no_materialziation=Unable to create materialization scripts. VDB has no materialization model.
-RuntimeMetadataAdminAPIImpl.materializationUserPwd_null=materializationUserPwd may not be null or empty.
-RuntimeMetadataAdminAPIImpl.Expected_integer_for_port {0}=Expected integer for port in serverVMs argument, got {0}.
-RuntimeMetadataAdminAPIImpl.metamatrixUserName_null=metamatrixUserName may not be null or empty.
-RuntimeMetadataAdminAPIImpl.DirectoryService_is_not_available=DirectoryService is not available, unable to ping.
-RuntimeMetadataAdminAPIImpl.Failed_migration=Failed
-RuntimeMetadataAdminAPIImpl.Succeeded_migration=Succeeded
-RuntimeMetadataAdminAPIImpl.metamatrixPwd_null=metamatrixPwd may not be null or empty.
-RuntimeMetadataAdminAPIImpl.Connector_has_no_URL=Unable to create materializatin scripts. Connector has no URL property.
-RuntimeMetadataAdminAPIImpl.MetaMatrix_host_null=The MetaMatrix host name may not be null.
-RuntimeMetadataAdminAPIImpl.Unable_to_encrypt_pwd=Unable to encrypt connection property passwords for VDB {0}
-RuntimeMetadataAdminAPIImpl.Migrated_entitlement_policy_with_no_permissions=Migrated entitlement policy with no permissions on any resources.
-RuntimeMetadataAdminAPIImpl.Error_creating_DirectoryServiceProxy:_{0}=Failed to create Directory Service for Session id =\"{0}\"
-RuntimeMetadataAdminAPIImpl.Unable_to_determine_ssl_mode=Error trying to determine ssl mode for server.
-
-# runtime metadata admin helper
-ERR.018.001.0003 = Cannot get VDB Definition from MetadataDirectory.
-ERR.018.001.0004 = Error retrieving policies for Realm <{0}>: {1}.
-ERR.018.001.0005 = Error getting permission iterator from sourcePolicy.
-ERR.018.001.0006 = Error migrating entitlements.
-ERR.018.001.0008 = Error importing VDB Definition {0}.
-ERR.018.001.0010 = Error obtaining all VDB Definitions to build directory tree.
-ERR.018.001.0013 = Error submitting request.
-ERR.018.001.0051 = Cannot get VDB metadata for VDB ID <{0}>
-ERR.018.001.0052 = Cannot get all data node paths for VDB ID <{0}>
-ERR.018.001.0053 = Cannot get Models for VDB ID <{0}>
-ERR.018.001.0054 = Cannot get VDB ID for VDB name <{0}> and version <{1}>
-ERR.018.001.0055 = An error occured in the Authorization service.
-ERR.018.001.0063 = Unable to convert uuid string to object: <{0}>
-
-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
-InputSetUmlAspect.Invalid_show_mask_for_getSignature=Invalid show mask for getSignature
-InputSetUmlAspect.Signature_set=Signature set to
-InputParameterUmlAspect.Invalid_show_mask_for_getSignature=Invalid show mask for getSignature
-InputParameterUmlAspect.Signature_set=Signature set to
-MappingClassUmlAspect.Invalid_show_mask_for_getSignature=Invalid show mask for getSignature
-MappingClassUmlAspect.Signature_set=Signature set to
-MappingClassColumnUmlAspect.Invalid_show_mask_for_getSignature=Invalid show mask for getSignature
-MappingClassTransformationRule.Non-Query_NonUnion_transformation=The transformation defining a mapping class ''{0}'' can only be of type QUERY, UNION, INTERSECT or EXCEPT
-MappingClassTransformationRule.No_INPUT_Parameters_In_Criteria=Query defining the mapping class {0} does not use INPUT parameters in its criteria.
-
-MappingClassTransformationRule.Mapping_Class_Is_Null_For_{0}_0=Recursion root mapping class not found for {0} class
-MappingClassTransformationRule.Mismatch_Number_Of_Column_{0}_AND_{1}_1=Mismatch number of columns between mapping class {0} and {1}
-MappingClassTransformationRule.Mismatch_Number_Column_Name_{0}_AND_{1}_2=Mismatch column name between mapping class {0} and {1}
-MappingClassTransformationRule.Mismatch_Column_Type_{0}_AND_{1}_3=Column type mismatch between recursion root mapping class {0} and recursion child mapping class {1}
-
-MappingClassColumnUmlAspect.Signature_set=Signature set to
-TransformationMappingValidationRule.Sql_transformation_in_the_model__1=Sql transformation in the model
-TransformationMappingValidationRule._does_not_have_targets_mapped_for_source_element/s__2=\ does not have targets mapped for source element/s
-TransformationMappingValidationRule.Sql_transformation_in_the_model__3=Sql transformation in the model
-TransformationMappingValidationRule._does_not_have_target_elements._4=\ does not have target elements.
-TransformationMappingValidationRule.Sql_transformation_in_the_model__5=Sql transformation in the model
-TransformationMappingValidationRule._cannot_have_multiple_targets_mapped_for_source_element/s__6=\ cannot have multiple targets mapped for source element/s
-TransformationMappingValidationRule.Sql_transformation_in_the_model__7=Sql transformation in the model
-TransformationMappingValidationRule._cannot_have_multiple_target_elements._8=\ cannot have multiple target elements.
-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
-MappingClassSetSqlAspect.MappingClasses_sql_name=MappingClasses
-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:
-SqlTransformationMappingRootValidationRule.Join_type_mismatch_in_crit=Implicit runtime type conversion in join criteria ''{0}'': left type is ''{1}'', right type is ''{2}''.
-TransformationPlugin.noFunctionDefinitionFileMessage=Unable to find the Function Definition file at {0}
-
-#-----------------TransformationHelper-----------------
-TransformationHelper.changeSelectSqlTxnDescription=Change SQL SELECT for transformation {0}
-TransformationHelper.changeInsertSqlTxnDescription=Change SQL INSERT for transformation {0}
-TransformationHelper.changeUpdateSqlTxnDescription=Change SQL UPDATE for transformation {0}
-TransformationHelper.changeDeleteSqlTxnDescription=Change SQL DELETE for transformation {0}
-TransformationHelper.removeTargetAttributesError=Error Removing attribute from Target {0}
-
-TransformationHelper.addSrcTxnDescription=Add transformation source for transformation {0}
-TransformationHelper.addSrcAliasTxnDescription=Add transformation source alias for source {0}
-TransformationHelper.removeSrcTxnDescription=Remove transformation source for transformation {0}
-TransformationHelper.removeSrcAliasTxnDescription=Remove transformation source alias for source {0}
-
-TransformationHelper.getTransformationError=Error getting Transformation for target virtual group {0}
-TransformationHelper.createTransformationError=Error creating Transformation for target virtual group {0}
-TransformationHelper.addTransSourceError=Error adding Transformation Source for transformation mapping root {0}
-TransformationHelper.removeTransSourceError=Error removing Transformation Source for transformation mapping root {0}
-TransformationHelper.addTransSourceAliasError=Error adding Transformation Source Alias for transformation mapping root {0}
-TransformationHelper.removeTransSourceAliasError=Error removing Transformation Source Alias for transformation mapping root {0}
-TransformationHelper.sqlColumnRenameError=Error renaming SqlColumn {0}
-TransformationHelper.createProcResultSetError=Error creating ResultSet for Procedure {0}
-TransformationHelper.getProcResultSetDescriptorError=Error getting ResultSet Descriptor for Procedure {0}
-TreeMappingRootSqlAspect.could_not_get_resource_for_xmldoc=Could not get resource for {0}
-
-#-----------------TransformationMappingHelper-----------------
-TransformationMappingHelper.addAttributesTransactionDescription=Add attributes to Target {0}
-TransformationMappingHelper.addAttributesBeginTransactionError=Error starting transaction to Add attributes to Target {0}
-TransformationMappingHelper.addAttributesCommitTransactionError=Error committing transaction to Add attributes to Target {0}
-TransformationMappingHelper.reconcileMappingsTransactionDescription=Reconcile mappings for Target {0}
-TransformationMappingHelper.reconcileMappingsBeginTransactionError=Error starting transaction to Reconcile mappings for Target {0}
-TransformationMappingHelper.reconcileMappingsCommitTransactionError=Error committing transaction to Reconcile mappings for Target {0}
-TransformationMappingHelper.createNewAttrError=Error creating new attribute for group {0}
-TransformationMappingHelper.moveTargetAttrError=Error moving attribute for group {0}
-TransformationMappingHelper.containerNotFoundError=Error getting Container from ModelerCore
-TransformationMappingHelper.getChildDescriptorError=Error getting Child descriptors for {0}
-TransformationMappingHelper.errorCreatingAttribute=Error creating new attribute with name {0}
-TransformationMappingHelper.errorDeletingAttribute=Error deleting attribute {0}
-TransformationMappingHelper.errorDeletingAttributes=Error deleting attribute(s)
-
-#-----------------AttributeMappingHelper-----------------
-AttributeMappingHelper.removeAttrMappingError=Error removing attribute mapping {0}
-
-#-----------------TransformationSqlHelper-----------------
-TransformationSqlHelper.elementIDNotFoundError=Error finding the element ID for {0}
-TransformationSqlHelper.groupIDNotFoundError=Error finding the group ID for {0}
-
-#-----------------TransformationValidator-----------------
-TransformationValidator.getProcExternalMetadataError=Error getting External Metadata Map for target virtual group {0}
-TransformationValidator.errorTargetIsSourceMsg= Error: Invalid source table - {0}.\nReason: Target cannot be a source to itself.
-TransformationValidator.QMI_of_unexpected_type=Expected the QueryMetadataInterface instance to be of type TransformationMetadataFacade or VdbMetadata
-
-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
-TransformationMappingValidationRule.Sql_transformation_in_the_model_contains_the_unresolved_reference_1=Sql transformation in the model {0} contains the unresolved reference {1}
-TransformationValidator.Error_in_the_Sql_tranformation_for_1=No Sql Transformation defined for {0}
-SqlTransformationMappingRootValidationRule.Virtual_stored_procedures_should_always_return_a_resultSet._1=Virtual stored procedures should always return a ResultSet.
-SqlTransformationMappingRootValidationRule.A_virtual_stored_procedure_can_only_define_IN_parameters._2=A virtual stored procedure can only define IN parameters.
-SqlTransformationMappingRootValidationRule.Virtual_stored_procedures_transformation_definition_cannot_be_an_updateProcedure._3=The transformation for a virtual stored procedures cannot be an update procedure.
-SqlTransformationMappingRootValidationRule.Virtual_stored_procedures_defined_by_an_Insert,_Update_or_Delete_statement_must_define_return_a_resultSet_with_one_column_of_type_int._4=Virtual stored procedures defined by an Insert, Update or Delete statement must define return a resultSet with one column of type int.
-TransformationHelper.Error_adding_model_import_to_{0}_1=Error adding model import to {0}
-TransformationHelper.Error_removing_Model_Import_from_{0}_1=Error removing Model Import from {0}
-TransformationMetadata.Could_not_find_transformation_record_for_the_group__1=Could not find transformation record for the group
-XmlDocumentValidationRule.Error_trying_to_collect_XmlElements_in_an_XmlDocument__1=Error trying to collect XmlElements in an XmlDocument
-XmlDocumentValidationRule.Error_trying_to_collect_XmlElements_in_an_XmlDocument__2=Error trying to collect XmlElements in an XmlDocument
-XmlDocumentValidationRule.The_option_of_a_Choice_must_either_have_the_criteria_defined,_or_be_the_default._3=The option of a Choice must either have the criteria defined or be the default.
-XmlDocumentValidationRule.Error_trying_validate_choice_criteria__14=Error trying validate choice criteria
-XmlDocumentValidationRule.Recursion_not_allowed_on_compositor=Mapping classes bound to an xml element of type sequence, choice, or all cannot be marked for recursion
-XmlDocumentValidationRule.__15=\
-XmlDocumentValidationRule.0=The group ''{0}'' referenced in the choice criteria on the ''{1}'' is not among the mapping classes in the context of the choice.
-XmlDocumentValidationRule.Column_and_element_types_possibly_not_compatible=The mapping column ''{0}'' of type ''{1}'' and the document element ''{2}'' of type ''{3}'' are potentially incompatible.
-XmlDocumentValidationRule.Column_and_element_types_not_compatible=The mapping column ''{0}'' of type ''{1}'' and the document element ''{2}'' of type ''{3}'' are not compatible.
-TransformationMetadata.Error_trying_to_read_schemas_for_the_document/table____1=Error trying to read schemas for the document/table :
-SqlTransformationMappingRootValidationRule.Translate/Has_Criteria_on_an_insert_procedure_would_always_evaluate_to_false._3=Translate/Has Criteria on an insert procedure would always evaluate to false.
-TransformationValidator.The_transformation_contains_Reference_Symbols_(_),_which_is_not_allowed,_replace___with_a_constant,_element,_or_parameter_name._1=The transformation contains Reference Symbols (?), which is not allowed. Replace ? with a constant, element, or parameter name.
-SqlTransformationMappingRootValidationRule.Sql_Transform_defining_the_virtual_procedure_{0}_does_not_use_any_of_the_parameters_defined_on_the_procedure._1=The SQL defining the virtual procedure {0} does not use any of the parameters defined on the procedure.
-TransformationMetadata.Multiple_transformation_records_found_for_the_group___1=Multiple transformation records found for the group:
-InputParameterSqlAspect.Length_cannot_be_set_on_an_InputParameter_1=Length cannot be set on an InputParameter
-InputParameterSqlAspect.NullType_cannot_be_set_on_an_InputParameter_2=NullType cannot be set on an InputParameter
-MappingClassColumnSqlAspect.Length_cannot_be_set_on_a_MappingClassColumn_1=Length cannot be set on a MappingClassColumn
-MappingClassColumnSqlAspect.NullType_cannot_be_set_on_a_MappingClassColumn_2=NullType cannot be set on a MappingClassColumn
-TransformationValidator.Only_update_procedures_are_allowed_in_the_INSERT/UPDATE/DELETE_tabs._1=Only update procedures are allowed in the Insert/Update/Delete tabs.
-TransformationValidator.Query_defining_a_virtual_group_can_only_be_of_type_Select_or_Exec._1=The query defining a virtual group can only be of type Select or Exec.
-TransformationValidator.Query_defining_a_virtual_procedure_can_only_be_of_type_Virtual_procedure._2=The query defining a virtual procedure can only be of type Virtual procedure.
-TransformationValidator.Query_defining_an_operation_can_only_be_of_type_Virtual_procedure._1=The query defining an operation can only be of type Virtual procedure.
-SqlTransformationMappingRootValidationRule.The_transformation_on_the_updatable_virtual_group_{0},_allows_Insert/Update/Delete_but_does_not_define_the_necessary_transformation._1=The transformation on the updatable virtual group {0} allows Insert/Update/Delete but does not define the necessary transformation(s).
-XmlDocumentValidationRule.This_entity_{0}_is_fixed_or_default_and_should_not_have_a_mapping_attribute_defined_in_MappingClasses_1="{0}" has a fixed or default value and should not be mapped.
-XmlDocumentValidationRule.The_entity_{0}_has_been_selected_to_be_excluded_from_the_Document,_but_has_a_mapping_attribute_defined_in_MappingClasses_2="{0}" is excluded from the Document, but is still mapped.
-XmlDocumentValidationRule.The_entity_{0}_has_a_min_occurs_of_zero,_but_has_a_mapping_attribute_defined_in_MappingClasses_3="{0}" references an XML Schema component that has a min occurs of zero, and may not appear in a result document.
-XmlDocumentValidationRule.The_element_{0}_has_a_max_occurs_of_one,_but_is_mapped_to_a_MappingClass="{0}" references an XML Schema component that has a max occurs of one, but may occur more than once in a result document.
-XmlDocumentValidationRule.The_entity_{0}__s_schema_component_reference_is_nullable,_but_has_a_mapping_attribute_defined_in_MappingClasses._5="{0}" references an XML Schema component that is nullable and is mapped.
-XmlDocumentValidationRule.The_entity_{0}_having_element/attribute_children_may_not_have_a_mapping_attribute_defined_in_MappingClasses._6="{0}" has element/attribute children that may not be mapped with a MappingClass.
-XmlDocumentValidationRule.The_attribute_{0}_references_a_prohibited_schema_attribute._7=The attribute "{0}" references a prohibited schema attribute.
-XmlDocumentValidationRule.The_entity_{0}_has_been_selected_to_be_excluded_from_the_Document,_but_the_neither_the_entity_nor_its_parent_are_optional._9="{0}" is excluded from the Document, but the neither the entity nor its parent are optional.
-XmlDocumentValidationRule.The_document_element/attribute_{0}_doesn__t_reference_a_schema_component._10="{0}" does not reference a schema component.
-XmlDocumentValidationRule.The_entity_{0},_may_be_violating_maxOccurs_specified_by_the_schema._1="{0}" may cause a result document to violate the referenced XML Schema component's maxOccurs.
-SqlTransformationMappingRootValidationRule.Sql_transformation_in_the_model_{0},_has_no_target_tables/groups._1=The SQL transformation (in model {0}) has no target tables/groups.
-SqlTransformationMappingRootValidationRule.there_are_source_parameters_that_are_not_mapped_to_a_virtual_column=There are {0} in/in-out parameters from source procedures that are not mapped to a virtual group attribute
-SqlTransformationMappingRootValidationRule.Sql_transformation_in_the_model_{0},_cannot_not_have_multiple_target_tables/groups._2=The SQL transformation (in model {0}) cannot not have multiple target tables/groups.
-SqlTransformationMappingRootValidationRule.The_transformation_defining_an_updatable_virtual_group_should_be_include_atleast_one_updatable_source_group._1=The transformation defining an updatable virtual group should include at least one updatable source.
-SqlTransformationMappingRootValidationRule.The_number_of_columns/elements_in_{0}_are_less_than_the_number_defined_in_the_sql_transformation._1=The number of columns/elements in {0} are less than the number defined in the SQL transformation.
-SqlTransformationMappingRootValidationRule.The_number_of_columns/elements_in_{0}_are_greater_than_the_number_defined_in_the_sql_transformation._2=The number of columns/elements in {0} are greater than the number defined in the SQL transformation.
-SqlTransformationMappingRootValidationRule.The_target_attribute_matches_no_symbol_in_the_query_{0}._1=The target attribute {0} does not match the corresponding symbol name in the query.
-SqlTransformationMappingRootValidationRule.parameter_in_procedure_is_not_mapped_to_a_virtual_column=The IN/IN_OUT parameter {0} in procedure {1} is not mapped to a column in {2}
-SqlTransformationMappingRootValidationRule.InputParam_In_Mapping_Class_Transform=INPUT parameters cannot be used in the SELECT clause of the transformation defining the mapping class ''{0}''
-SqlTransformationMappingRootValidationRule.invalid_source_for_target=''{0}'' is not a valid transformation source for ''{1}''.
-SqlTransformationMappingRootValidationRule.invalid_target_for_source=''{0}'' is not a valid transformation target for ''{1}''.
-SqlTransformationMappingRootSqlAspect.EObject_has_not_resourceset_reference=The EObject {0} has no resource set reference
-SqlTransformationMappingRootValidationRule.The_datatype_type_of_the_column_{0}_does_not_match_the_source_column_type._1=The column ''{0}'' with runtime type ''{1}'' does not match the runtime type ''{2}'' from the query transformation.
-SqlTransformationMappingRootValidationRule.The_datatype_type_of_the_column_{0}_is_not_set_or_cannot_be_resolved_in_the_workspace._1=The datatype type of the column ''{0}'' is not set or cannot be resolved in the workspace.
-SqlTransformationMappingRootValidationRule.all_virtual_group_attributes_for_parameters_must_be_in_an_access_pattern=All virtual group attributes mapped to source procedure input parameters must be specified in a single virtual access pattern
-SqlTransformationMappingRootValidationRule.The_Nullable_value_of_virtual_group_attribute_{0}_doesn____t_match_that_of_the_attribute_it_mapps_to_in_query_transform._1=The Nullable value of virtual group attribute {0} doesn\'\'t match that of the attribute it maps to in the SQL query transform.
-SqlTransformationMappingRootValidationRule.The_insert_procedure_for_the_virtualGroup_{0}_does____not_execute_an_insert._1=The insert procedure for the virtualGroup {0} does not execute an insert.
-SqlTransformationMappingRootValidationRule.The_update_procedure_for_the_virtualGroup_{0}_does____not_execute_an_update._2=The update procedure for the virtualGroup {0} does not execute an update.
-SqlTransformationMappingRootValidationRule.The_delete_procedure_for_the_virtualGroup_{0}_does____not_execute_an_delete._3=The delete procedure for the virtualGroup {0} does not execute a delete.
-SqlTransformationMappingRootValidationRule.The_virtual_group_{0}_cannot_be_involved_as_an_input_to_the_transformation_defining_it._1=The virtual group {0} cannot use itself as a source.
-SqlTransformationMappingRootValidationRule.The_insert_procedure_for_the_virtualGroup_{0},_is_trying_to_execute_an_insert_against_itself._1=The insert procedure for {0} is trying to execute an insert against itself.
-SqlTransformationMappingRootValidationRule.The_update_procedure_for_the_virtualGroup_{0},_is_trying_to_execute_an_update_against_itself._2=The update procedure for {0} is trying to execute an update against itself.
-SqlTransformationMappingRootValidationRule.The_delete_procedure_for_the_virtualGroup_{0},_is_trying_to_execute_an_delete_against_itself._3=The delete procedure for {0} is trying to execute an delete against itself.
-InputParameterValidationRule.The_inputParameter_{0}_on_the_inputSet_of_the_MappingClass_{1}_is_not_bound_to_any_mappingClass_column._1=The input parameter {0} in the input set of the MappingClass {1} is not bound to a mapping class column.
-InputParameterValidationRule.Invalid_binding=The input parameter {0} in the input set of the MappingClass {1} is bound to an invalid mapping class column.
-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.Ambigous_index_with_UUID_{0},_found_multiple_indexes_with_the_given_UUID._2=Ambigous index with UUID {0}, found multiple indexes with the given UUID.
-TransformationValidator.Invalid_transformation_type,_only_allowed_transformations_are_select,_insert,_update,_delete_transforms._1=Invalid transformation type, only allowed transformations are select, insert, update, delete transforms.
-SqlTransformationMappingRootValidationRule.A_circular_dependency_exists_between_this_tranformation_and_the_source_group_0_1=A circular dependency exists between this transformation and virtual group {0}
-ModelerMetadata.Resolving_entity_{0}_using_index_files_1=Resolving entity {0} using index files
-ModelerMetadata.Resolving_entity_{0}_by_navigating_the_workspace_1=Resolving entity {0} by navigating the workspace
-ModelerMetadata.Found_{0}_records_for_the_entity_{1}_1=Found {0} records for the entity {1}
-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}
-TransformationValidator.Found_problems_validating_transformation_defining_{0},_re-validate_in_the_transformation_editor._1=Found problems validating transformation defining {0}, re-validate in the transformation editor.
-SqlTransformationMappingRootValidationRule.0=Group name ''{0}'' used in the OPTION MAKEDEP/MAKENOTDEP clause is not a fully qualified group, check if it is an alias name.
-SqlTransformationMappingRootValidationRule.1=Cannot use Virtual Group ''{0}'' in the OPTION MAKEDEP/MAKENOTDEP clause.
-SqlTransformationMappingRootValidationRule.10=Transformation query has an empty OPTION NOCACHE clause, no materialized virtual groups found among the groups in the FROM clause.
-SqlTransformationMappingRootValidationRule.2=Group name ''{0}'' used in the OPTION MAKEDEP/MAKENOTDEP clause could not be found in any dependent transformations.
-SqlTransformationMappingRootValidationRule.3=Group name ''{0}'' used in the OPTION NOCACHE clause is not a fully qualified group, check if it is an alias name.
-SqlTransformationMappingRootValidationRule.4=Cannot use Virtual Group ''{0}'' in the OPTION NOCACHE clause.
-SqlTransformationMappingRootValidationRule.5=Group name ''{0}'' used in the OPTION NOCACHE clause could not be found in any dependent transformations.
-SqlTransformationMappingRootValidationRule.6=Possible cross-join: Group/s ''{0}'' are not joined either directly or transitively to other groups through a join criteria. Check all queries in the transformation.
-SqlTransformationMappingRootValidationRule.7=Group name ''{0}'' in the OPTION NOCACHE clause ambiguous, matches short name of more than one group in the FROM clause of the query.
-SqlTransformationMappingRootValidationRule.8=Group name ''{0}'' in the OPTION NOCACHE clause ambiguous, matches alias name of more than one group in the FROM clause of the query.
-SqlTransformationMappingRootValidationRule.9=Group name ''{0}'' in the OPTION NOCACHE clause does not match any materialized virtual group name or alias in the FROM clause of the query.
-SqlTransformationMappingRootValidationRule.11=Group name ''{0}'' in the OPTION NOCACHE clause ambiguous, matches partial name of more than one group in the FROM clause of the query.
-SqlTransformationMappingRootValidationRule.no_valid_target=The sql transformation does not have a valid target.
-SqlTransformationMappingRootValidationRule.no_valid_source=The sql transformation does not have a valid source.
-SqlTransformationMappingRootValidationRule.xml_doc_mapped_at_root_for_web_service=The XML document source may return multiple documents. That is not supported by web service per the WS-I profile.
-SqlTransformationMappingRootSqlAspect.0=The transformation mapping root {0} does not have a target table.
-SqlTransformationMappingRootSqlAspect.EObject_has_no_resource_reference=The EObject {0} has no resource reference
-TreeMappingRootSqlAspect.0=The tree mapping root {0} does not have a target document.
-TransformationMetadata.Invalid_type=Invalid type: {0}.
-ServerRuntimeMetadata.invalid_selector=The metadata instace is using an invalid index selector.
-MappingDocumentFormatter.Unable_to_determine_schema_in_the_workspace_for_XsdComponent_{0}_when_deriving_Namespace_Prefix_1=Unable to determine schema in the workspace for XsdComponent {0} when deriving Namespace Prefix
-_UI_InputParameter_type = Input Parameter
-_UI_InputSet_type = Input Set
-_UI_MappingClass_type = Mapping Class
-_UI_MappingClassColumn_type = Mapping Class Column
-_UI_StagingTable_type = Staging Table
-TransformationMetadata.Unable_to_determine_fullname_for_element__1=Unable to determine fullname for element
-ProcedureParameterValidationHelper.Additional_Assignment=View parameter ''{0}'' has more than 1 valid assignment: ''{1}''.
-ProcedureParameterValidationHelper.Required_view_parameter=Required view parameter ''{0}'' does not have a valid assignment.
-ProcedureParameterValidationHelper.Required_procedure_parameter=Required procedure parameter ''{0}'' does not have a valid assignment.
-ProcedureParameterValidationHelper.Invalid_Assignment=Parameter ''{0}'' has an invalid assignment: ''{1}''.
-ProcedureParameterValidationHelper.Non-selectable_column=Non-selectable column ''{0}'' must have a Default Value, be set to Nullable, or set as Auto Incremented.
-ProcedureParameterValidationHelper.No_default_for_mapping_class_parameter=The mapping class column ''{0}'' is non-selectable, but does not have a default value. A null value will be used if the column is used as a procedure parameter.
-SqlTransformationMappingRootValidationRule.STRING_BASED_FUNCTION_ONE_BASED =In 5.0 SP1, the SUBSTRING, LOCATE, and INSERT functions changed from 0-based to 1-based to match the JDBC and ODBC specifications. Please verify they are used correctly in the transformation.
-XQueryTransformationMappingRootSqlAspect.0=The transformation mapping root {0} does not have a target.
-
+TransformationMetadata.0={0} ambiguous, more than one entity matching the same name
\ No newline at end of file
Deleted: trunk/metadata/src/main/system-models/SystemPhysical.xmi
===================================================================
--- trunk/metadata/src/main/system-models/SystemPhysical.xmi 2009-10-25 02:00:37 UTC (rev 1537)
+++ trunk/metadata/src/main/system-models/SystemPhysical.xmi 2009-10-25 02:03:40 UTC (rev 1538)
@@ -1,1263 +0,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:diagram="http://www.metamatrix.com/metamodels/Diagram" xmlns:mmcore="http://www.metamatrix.com/metamodels/Core" xmlns:relational="http://www.metamatrix.com/metamodels/Relational">
- <mmcore:ModelAnnotation xmi:uuid="mmuuid:6d490541-276b-1de6-8a38-9d76e1f90f2e" description="SystemPhysical" primaryMetamodelUri="http://www.metamatrix.com/metamodels/Relational" modelType="PHYSICAL" visible="false" ProducerName="MetaMatrix" ProducerVersion="5.5">
- <modelImports xmi:uuid="mmuuid:85e82a80-c843-1f03-a301-eb60b4891b42" name="SimpleDatatypes-instance" modelLocation="http://www.metamatrix.com/metamodels/SimpleDatatypes-instance" modelType="PHYSICAL" primaryMetamodelUri="http://www.eclipse.org/xsd/2002/XSD"/>
- <modelImports xmi:uuid="mmuuid:85e82a81-c843-1f03-a301-eb60b4891b42" name="XMLSchema" modelLocation="http://www.w3.org/2001/XMLSchema" modelType="PHYSICAL" primaryMetamodelUri="http://www.eclipse.org/xsd/2002/XSD"/>
- </mmcore:ModelAnnotation>
- <mmcore:AnnotationContainer xmi:uuid="mmuuid:5dfe9841-60a7-1ed2-a91e-94785e58cb05">
- <annotations xmi:uuid="mmuuid:5dfe9840-60a7-1ed2-a91e-94785e58cb05" description="Each VDB will see only one record in this table, and that record will represent its own VDB." annotatedObject="mmuuid/f1ca5240-c9c7-1ede-943a-ad14f214907c"/>
- <annotations xmi:uuid="mmuuid:6b0c4500-60a7-1ed2-a91e-94785e58cb05" description="The name of the object." annotatedObject="mmuuid/6efe5240-2506-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:6ce54ac0-60a7-1ed2-a91e-94785e58cb05" description="The name of the object as known to the underlying source." annotatedObject="mmuuid/70c815c0-2506-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:6dd96ec0-60a7-1ed2-a91e-94785e58cb05" description="The type of the object." annotatedObject="mmuuid/7291d940-2506-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:7ae71b80-60a7-1ed2-a91e-94785e58cb05" description="The name of the object." annotatedObject="mmuuid/81788bc0-2506-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:7bcbfd40-60a7-1ed2-a91e-94785e58cb05" description="The name of the object as known to the underlying source." annotatedObject="mmuuid/83519180-2506-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:7db44540-60a7-1ed2-a91e-94785e58cb05" description="The fully qualified name of the object." annotatedObject="mmuuid/851b5500-2506-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:7f8d4b00-60a7-1ed2-a91e-94785e58cb05" description="The type of the object." annotatedObject="mmuuid/88164580-2506-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:88d9aa00-60a7-1ed2-a91e-94785e58cb05" description="The name of the object." annotatedObject="mmuuid/93697100-2506-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:8ab2afc0-60a7-1ed2-a91e-94785e58cb05" description="The name of the object as known to the underlying source." annotatedObject="mmuuid/95333480-2506-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:8f58df40-60a7-1ed2-a91e-94785e58cb05" description="The fully qualified name of the object." annotatedObject="mmuuid/98c6bb80-2506-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:91412741-60a7-1ed2-a91e-94785e58cb05" description="The type of the object." annotatedObject="mmuuid/9a907f00-2506-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:ac416280-60a7-1ed2-a91e-94785e58cb05" description="The name of the object." annotatedObject="mmuuid/bdca70c0-2506-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:ad264440-60a7-1ed2-a91e-94785e58cb05" description="The name of the object as known to the underlying source." annotatedObject="mmuuid/befb9dc0-2506-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:b0e79200-60a7-1ed2-a91e-94785e58cb05" description="The fully qualified name of the object." annotatedObject="mmuuid/c15df7c0-2506-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:b2c097c0-60a7-1ed2-a91e-94785e58cb05" description="The type of the object." annotatedObject="mmuuid/c28f24c0-2506-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:b85aeb40-60a7-1ed2-a91e-94785e58cb05" description="The name of the object." annotatedObject="mmuuid/c9b632c0-2506-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:b94f0f40-60a7-1ed2-a91e-94785e58cb05" description="The name of the object as known to the underlying source." annotatedObject="mmuuid/cb7ff640-2506-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:bd011ac0-60a7-1ed2-a91e-94785e58cb05" description="The fully qualified name of the object." annotatedObject="mmuuid/cd49b9c0-2506-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:bdf53ec0-60a7-1ed2-a91e-94785e58cb05" description="The type of the object." annotatedObject="mmuuid/cf137d40-2506-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:c29b6e40-60a7-1ed2-a91e-94785e58cb05" description="The name of the object." annotatedObject="mmuuid/d5095e40-2506-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:c4747400-60a7-1ed2-a91e-94785e58cb05" description="The name of the object as known to the underlying source." annotatedObject="mmuuid/d6e26400-2506-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:c7419dc0-60a7-1ed2-a91e-94785e58cb05" description="The fully qualified name of the object." annotatedObject="mmuuid/d944be01-2506-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:c835c1c0-60a7-1ed2-a91e-94785e58cb05" description="The type of the object." annotatedObject="mmuuid/db0e8180-2506-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:cdc0d300-60a7-1ed2-a91e-94785e58cb05" description="The name of the object." annotatedObject="mmuuid/e2358f80-2506-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:cfa91b00-60a7-1ed2-a91e-94785e58cb05" description="The name of the object as known to the underlying source." annotatedObject="mmuuid/e3ff5300-2506-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:d2670280-60a7-1ed2-a91e-94785e58cb05" description="The fully qualified name of the object." annotatedObject="mmuuid/e5c91681-2506-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:d35b2680-60a7-1ed2-a91e-94785e58cb05" description="The type of the object." annotatedObject="mmuuid/e792da00-2506-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:d9da5bc0-60a7-1ed2-a91e-94785e58cb05" description="The name of the object." annotatedObject="mmuuid/ef527e80-2506-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:dace7fc0-60a7-1ed2-a91e-94785e58cb05" description="The name of the object as known to the underlying source." annotatedObject="mmuuid/f11c4200-2506-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:dd9ba980-60a7-1ed2-a91e-94785e58cb05" description="The fully qualified name of the object." annotatedObject="mmuuid/f37e9c00-2506-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:df74af40-60a7-1ed2-a91e-94785e58cb05" description="The type of the object." annotatedObject="mmuuid/f4afc900-2506-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:e41adec0-60a7-1ed2-a91e-94785e58cb05" description="The name of the object." annotatedObject="mmuuid/faa5aa00-2506-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:e50f02c0-60a7-1ed2-a91e-94785e58cb05" description="The name of the object as known to the underlying source." annotatedObject="mmuuid/fc6f6d80-2506-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:e7dc2c80-60a7-1ed2-a91e-94785e58cb05" description="The fully qualified name of the object." annotatedObject="mmuuid/fe393101-2506-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:e8c10e40-60a7-1ed2-a91e-94785e58cb05" description="The type of the object." annotatedObject="mmuuid/001236c0-2507-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:0876bb40-60a8-1ed2-a91e-94785e58cb05" description="The name of the object." annotatedObject="mmuuid/086a71c0-2507-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:095b9d00-60a8-1ed2-a91e-94785e58cb05" description="The name of the object as known to the underlying source." annotatedObject="mmuuid/099b9ec0-2507-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:0d1ceac0-60a8-1ed2-a91e-94785e58cb05" description="The fully qualified name of the object." annotatedObject="mmuuid/0d2f25c0-2507-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:0e01cc80-60a8-1ed2-a91e-94785e58cb05" description="The type of the object." annotatedObject="mmuuid/0ef8e940-2507-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:12b73e40-60a8-1ed2-a91e-94785e58cb05" description="The name of the object." annotatedObject="mmuuid/14eeca40-2507-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:139c2000-60a8-1ed2-a91e-94785e58cb05" description="The name of the object as known to the underlying source." annotatedObject="mmuuid/161ff740-2507-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:18424f80-60a8-1ed2-a91e-94785e58cb05" description="The fully qualified name of the object." annotatedObject="mmuuid/19b37e40-2507-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:19367380-60a8-1ed2-a91e-94785e58cb05" description="The type of the object." annotatedObject="mmuuid/1b7d41c0-2507-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:1ddca300-60a8-1ed2-a91e-94785e58cb05" description="The name of the object." annotatedObject="mmuuid/20da8c40-2507-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:1ed0c700-60a8-1ed2-a91e-94785e58cb05" description="The name of the object as known to the underlying source." annotatedObject="mmuuid/220bb940-2507-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:20a9ccc1-60a8-1ed2-a91e-94785e58cb05" description="The fully qualified name of the object." annotatedObject="mmuuid/23d57cc1-2507-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:2282d280-60a8-1ed2-a91e-94785e58cb05" description="The type of the object." annotatedObject="mmuuid/259f4040-2507-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:254ffc40-60a8-1ed2-a91e-94785e58cb05" description="The type of the object." annotatedObject="mmuuid/3b92ff80-2fd0-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:3436aec0-60a8-1ed2-a91e-94785e58cb05" description="The variety of datatype. Value is one of the following: 1=Atomic, 2=List, 3=Union, 4=Complex" annotatedObject="mmuuid/3b23ac80-2507-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:3703d881-60a8-1ed2-a91e-94785e58cb05" description="The type of the object." annotatedObject="mmuuid/3f4fca00-2507-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:39d10240-60a8-1ed2-a91e-94785e58cb05" description="The fully qualified name of the object." annotatedObject="mmuuid/41b22400-2507-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:3c9e2c00-60a8-1ed2-a91e-94785e58cb05" description="The type of the object." annotatedObject="mmuuid/45de4180-2507-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:3f6b55c0-60a8-1ed2-a91e-94785e58cb05" description="The fully qualified name of the object." annotatedObject="mmuuid/48409b80-2507-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:42293d40-60a8-1ed2-a91e-94785e58cb05" description="The type of the object." annotatedObject="mmuuid/4c6cb901-2507-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:44f66700-60a8-1ed2-a91e-94785e58cb05" description="The fully qualified name of the object." annotatedObject="mmuuid/4f67a980-2507-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:48b7b4c0-60a8-1ed2-a91e-94785e58cb05" description="The type of the object." annotatedObject="mmuuid/53a30940-2507-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:4a90ba80-60a8-1ed2-a91e-94785e58cb05" description="The fully qualified name of the object." annotatedObject="mmuuid/56056340-2507-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:4d5de440-60a8-1ed2-a91e-94785e58cb05" description="The type of the object." annotatedObject="mmuuid/5a3180c0-2507-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:502b0e00-60a8-1ed2-a91e-94785e58cb05" description="The fully qualified name of the object." annotatedObject="mmuuid/5c93dac0-2507-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:756bcc40-60a8-1ed2-a91e-94785e58cb05" description="The name of the object." annotatedObject="mmuuid/4ded1d80-2dc5-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:7744d200-60a8-1ed2-a91e-94785e58cb05" description="The name of the object as known to the underlying source." annotatedObject="mmuuid/504f7780-2dc5-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:7a11fbc0-60a8-1ed2-a91e-94785e58cb05" description="The fully qualified name of the object." annotatedObject="mmuuid/53e2fe80-2dc5-1ed0-a220-9c522c08a85a"/>
- <annotations xmi:uuid="mmuuid:7b061fc0-60a8-1ed2-a91e-94785e58cb05" description="The type of the object." annotatedObject="mmuuid/56455880-2dc5-1ed0-a220-9c522c08a85a"/>
- </mmcore:AnnotationContainer>
- <relational:BaseTable xmi:uuid="mmuuid:6c9bf840-2506-1ed0-a220-9c522c08a85a" name="MODELS" nameInSource="MODELS.INDEX" system="true" supportsUpdate="false">
- <columns xmi:uuid="mmuuid:6d348ec0-2506-1ed0-a220-9c522c08a85a" name="UUID" nameInSource="UUID" length="50" nullable="NO_NULLS" caseSensitive="false" signed="false" uniqueKeys="mmuuid/7e7d9b40-2506-1ed0-a220-9c522c08a85a">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:6efe5240-2506-1ed0-a220-9c522c08a85a" name="NAME" nameInSource="Name" length="255" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:70c815c0-2506-1ed0-a220-9c522c08a85a" name="NAME_IN_SOURCE" nameInSource="NameInSource" length="255" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:7291d940-2506-1ed0-a220-9c522c08a85a" name="OBJECT_TYPE" nameInSource="RecordType" length="1" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.metamatrix.com/metamodels/SimpleDatatypes-instance#char"/>
- </columns>
- <columns xmi:uuid="mmuuid:73c30640-2506-1ed0-a220-9c522c08a85a" name="MAX_SET_SIZE" nameInSource="MaxSetSize" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#int"/>
- </columns>
- <columns xmi:uuid="mmuuid:758cc9c0-2506-1ed0-a220-9c522c08a85a" name="IS_VISIBLE" nameInSource="isVisible" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#boolean"/>
- </columns>
- <columns xmi:uuid="mmuuid:59189880-3854-1ed0-a220-9c522c08a85a" name="IS_PHYSICAL" nameInSource="isPhysical" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#boolean"/>
- </columns>
- <columns xmi:uuid="mmuuid:76bdf6c0-2506-1ed0-a220-9c522c08a85a" name="SUPPORTS_DISTINCT" nameInSource="supportsDistinct" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#boolean"/>
- </columns>
- <columns xmi:uuid="mmuuid:7887ba40-2506-1ed0-a220-9c522c08a85a" name="SUPPORTS_JOIN" nameInSource="supportsJoin" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#boolean"/>
- </columns>
- <columns xmi:uuid="mmuuid:79b8e740-2506-1ed0-a220-9c522c08a85a" name="SUPPORTS_ORDER_BY" nameInSource="supportsOrderBy" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#boolean"/>
- </columns>
- <columns xmi:uuid="mmuuid:7b82aac0-2506-1ed0-a220-9c522c08a85a" name="SUPPORTS_OUTER_JOIN" nameInSource="supportsOuterJoin" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#boolean"/>
- </columns>
- <columns xmi:uuid="mmuuid:7cb3d7c0-2506-1ed0-a220-9c522c08a85a" name="SUPPORTS_WHERE_ALL" nameInSource="supportsWhereAll" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#boolean"/>
- </columns>
- <columns xmi:uuid="mmuuid:aad46340-385c-1ed0-a220-9c522c08a85a" name="MODEL_TYPE" nameInSource="ModelType" length="15" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#int"/>
- </columns>
- <columns xmi:uuid="mmuuid:bdf33500-e39b-1ee5-b836-ce1850f9b1e5" name="PRIMARY_METAMODEL_URI" nameInSource="PrimaryMetamodelUri" length="255" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <primaryKey xmi:uuid="mmuuid:7e7d9b40-2506-1ed0-a220-9c522c08a85a" name="PK_MODELS" columns="mmuuid/6d348ec0-2506-1ed0-a220-9c522c08a85a"/>
- </relational:BaseTable>
- <relational:BaseTable xmi:uuid="mmuuid:7faec840-2506-1ed0-a220-9c522c08a85a" name="TABLES" nameInSource="TABLES.INDEX" system="true" supportsUpdate="false">
- <columns xmi:uuid="mmuuid:80475ec0-2506-1ed0-a220-9c522c08a85a" name="UUID" nameInSource="UUID" length="50" nullable="NO_NULLS" caseSensitive="false" signed="false" uniqueKeys="mmuuid/906e8080-2506-1ed0-a220-9c522c08a85a">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:81788bc0-2506-1ed0-a220-9c522c08a85a" name="NAME" nameInSource="Name" length="255" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:83519180-2506-1ed0-a220-9c522c08a85a" name="NAME_IN_SOURCE" nameInSource="NameInSource" length="255" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:851b5500-2506-1ed0-a220-9c522c08a85a" name="PATH" nameInSource="PathString" length="2048" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:86e51880-2506-1ed0-a220-9c522c08a85a" name="TABLE_TYPE" nameInSource="TableType" length="20" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#int"/>
- </columns>
- <columns xmi:uuid="mmuuid:88164580-2506-1ed0-a220-9c522c08a85a" name="OBJECT_TYPE" nameInSource="RecordType" length="1" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.metamatrix.com/metamodels/SimpleDatatypes-instance#char"/>
- </columns>
- <columns xmi:uuid="mmuuid:89e00900-2506-1ed0-a220-9c522c08a85a" name="FULLNAME" nameInSource="FullName" length="2048" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:8b113600-2506-1ed0-a220-9c522c08a85a" name="CARDINALITY" nameInSource="Cardinality" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#int"/>
- </columns>
- <columns xmi:uuid="mmuuid:8cdaf980-2506-1ed0-a220-9c522c08a85a" name="IS_VIRTUAL" nameInSource="isVirtual" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#boolean"/>
- </columns>
- <columns xmi:uuid="mmuuid:bc4284c0-382c-1ed0-a220-9c522c08a85a" name="IS_PHYSICAL" nameInSource="isPhysical" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#boolean"/>
- </columns>
- <columns xmi:uuid="mmuuid:8e0c2680-2506-1ed0-a220-9c522c08a85a" name="SUPPORTS_UPDATE" nameInSource="supportsUpdate" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#boolean"/>
- </columns>
- <columns xmi:uuid="mmuuid:8fd5ea00-2506-1ed0-a220-9c522c08a85a" name="MODEL_NAME" nameInSource="ModelName" length="255" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:bdd39080-79c2-1edb-8406-b71b8efe0994" name="IS_SYSTEM" nameInSource="isSystem" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#boolean"/>
- </columns>
- <columns xmi:uuid="mmuuid:d4663f00-04bc-101e-861a-a893857ac5a5" name="IS_MATERIALIZED" nameInSource="isMaterialized" nullable="NO_NULLS" defaultValue="false" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#boolean"/>
- </columns>
- <primaryKey xmi:uuid="mmuuid:906e8080-2506-1ed0-a220-9c522c08a85a" name="PK_TABLES" columns="mmuuid/80475ec0-2506-1ed0-a220-9c522c08a85a"/>
- </relational:BaseTable>
- <relational:BaseTable xmi:uuid="mmuuid:919fad80-2506-1ed0-a220-9c522c08a85a" name="COLUMNS" nameInSource="COLUMNS.INDEX" system="true" supportsUpdate="false">
- <columns xmi:uuid="mmuuid:92384400-2506-1ed0-a220-9c522c08a85a" name="UUID" nameInSource="UUID" length="50" nullable="NO_NULLS" caseSensitive="false" signed="false" uniqueKeys="mmuuid/b7d48fc0-2506-1ed0-a220-9c522c08a85a">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:93697100-2506-1ed0-a220-9c522c08a85a" name="NAME" nameInSource="Name" length="255" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:95333480-2506-1ed0-a220-9c522c08a85a" name="NAME_IN_SOURCE" nameInSource="NameInSource" length="255" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:96fcf800-2506-1ed0-a220-9c522c08a85a" name="MODEL_NAME" nameInSource="ModelName" length="255" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:96fcf801-2506-1ed0-a220-9c522c08a85a" name="PARENT_NAME" nameInSource="ParentFullName" length="255" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:c7728540-3bb8-1ed0-a220-9c522c08a85a" name="PARENT_PATH" nameInSource="ParentPathString" length="2048" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:97958e80-2506-1ed0-a220-9c522c08a85a" name="PARENT_UUID" nameInSource="ParentUUID" length="50" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:98c6bb80-2506-1ed0-a220-9c522c08a85a" name="PATH" nameInSource="PathString" length="2048" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:8292aa00-2906-1ed0-a220-9c522c08a85a" name="POSITION" nameInSource="Position" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#int"/>
- </columns>
- <columns xmi:uuid="mmuuid:9a907f00-2506-1ed0-a220-9c522c08a85a" name="OBJECT_TYPE" nameInSource="RecordType" length="1" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.metamatrix.com/metamodels/SimpleDatatypes-instance#char"/>
- </columns>
- <columns xmi:uuid="mmuuid:9c5a4280-2506-1ed0-a220-9c522c08a85a" name="FULLNAME" nameInSource="FullName" length="2048" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:9e240600-2506-1ed0-a220-9c522c08a85a" name="CHAR_OCTET_LENGTH" nameInSource="CharOctetLength" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#int"/>
- </columns>
- <columns xmi:uuid="mmuuid:9f553300-2506-1ed0-a220-9c522c08a85a" name="RUNTIME_TYPE_NAME" nameInSource="RuntimeType" length="100" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:b9eaf340-3a68-1ed0-a220-9c522c08a85a" name="DATATYPE_UUID" nameInSource="DatatypeUUID" length="50" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:a11ef680-2506-1ed0-a220-9c522c08a85a" name="DEFAULT_VALUE" nameInSource="DefaultValue" length="255" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:a2502380-2506-1ed0-a220-9c522c08a85a" name="FORMAT" nameInSource="Format" length="255" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:a54b1400-2506-1ed0-a220-9c522c08a85a" name="MAX_VALUE" nameInSource="MaxValue" length="255" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:a67c4100-2506-1ed0-a220-9c522c08a85a" name="MIN_VALUE" nameInSource="MinValue" length="255" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:a8460480-2506-1ed0-a220-9c522c08a85a" name="NULL_TYPE" nameInSource="NullType" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#int"/>
- </columns>
- <columns xmi:uuid="mmuuid:a3815080-2506-1ed0-a220-9c522c08a85a" name="LENGTH" nameInSource="Length" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#int"/>
- </columns>
- <columns xmi:uuid="mmuuid:a9773180-2506-1ed0-a220-9c522c08a85a" name="PRECISION" nameInSource="Precision" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#int"/>
- </columns>
- <columns xmi:uuid="mmuuid:aaa85e80-2506-1ed0-a220-9c522c08a85a" name="SCALE" nameInSource="Scale" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#int"/>
- </columns>
- <columns xmi:uuid="mmuuid:661f5600-3bfa-1ed0-a220-9c522c08a85a" name="RADIX" nameInSource="Radix" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#int"/>
- </columns>
- <columns xmi:uuid="mmuuid:ac816440-2506-1ed0-a220-9c522c08a85a" name="SEARCH_TYPE" nameInSource="SearchType" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#int"/>
- </columns>
- <columns xmi:uuid="mmuuid:adb29140-2506-1ed0-a220-9c522c08a85a" name="IS_AUTO_INCREMENTED" nameInSource="isAutoIncrementable" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#boolean"/>
- </columns>
- <columns xmi:uuid="mmuuid:aee3be40-2506-1ed0-a220-9c522c08a85a" name="IS_CASE_SENSITIVE" nameInSource="isCaseSensitive" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#boolean"/>
- </columns>
- <columns xmi:uuid="mmuuid:b0ad81c0-2506-1ed0-a220-9c522c08a85a" name="IS_CURRENCY" nameInSource="isCurrency" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#boolean"/>
- </columns>
- <columns xmi:uuid="mmuuid:b1deaec0-2506-1ed0-a220-9c522c08a85a" name="IS_LENGTH_FIXED" nameInSource="isFixedLength" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#boolean"/>
- </columns>
- <columns xmi:uuid="mmuuid:b30fdbc0-2506-1ed0-a220-9c522c08a85a" name="IS_SELECTABLE" nameInSource="isSelectable" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#boolean"/>
- </columns>
- <columns xmi:uuid="mmuuid:b57235c0-2506-1ed0-a220-9c522c08a85a" name="IS_SIGNED" nameInSource="isSigned" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#boolean"/>
- </columns>
- <columns xmi:uuid="mmuuid:b6a362c0-2506-1ed0-a220-9c522c08a85a" name="SUPPORTS_UPDATES" nameInSource="isUpdatable" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#boolean"/>
- </columns>
- <primaryKey xmi:uuid="mmuuid:b7d48fc0-2506-1ed0-a220-9c522c08a85a" name="PK_COLUMNS" columns="mmuuid/92384400-2506-1ed0-a220-9c522c08a85a"/>
- </relational:BaseTable>
- <relational:BaseTable xmi:uuid="mmuuid:bacf8040-2506-1ed0-a220-9c522c08a85a" name="PRIMARY_KEYS" nameInSource="KEYS.INDEX#K" system="true" supportsUpdate="false">
- <columns xmi:uuid="mmuuid:bacf8041-2506-1ed0-a220-9c522c08a85a" name="UUID" nameInSource="UUID" length="50" nullable="NO_NULLS" caseSensitive="false" signed="false" uniqueKeys="mmuuid/c58a1540-2506-1ed0-a220-9c522c08a85a">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:bc9943c0-2506-1ed0-a220-9c522c08a85a" name="UUID_OF_TABLE" nameInSource="ParentUUID" length="50" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:bdca70c0-2506-1ed0-a220-9c522c08a85a" name="NAME" nameInSource="Name" length="255" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:befb9dc0-2506-1ed0-a220-9c522c08a85a" name="NAME_IN_SOURCE" nameInSource="NameInSource" length="255" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:c0c56140-2506-1ed0-a220-9c522c08a85a" name="MODEL_NAME" nameInSource="ModelName" length="255" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:c0c56141-2506-1ed0-a220-9c522c08a85a" name="TABLE_NAME" nameInSource="ParentFullName" length="255" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:c15df7c0-2506-1ed0-a220-9c522c08a85a" name="PATH" nameInSource="PathString" length="2048" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:c28f24c0-2506-1ed0-a220-9c522c08a85a" name="OBJECT_TYPE" nameInSource="RecordType" length="1" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.metamatrix.com/metamodels/SimpleDatatypes-instance#char"/>
- </columns>
- <columns xmi:uuid="mmuuid:c458e840-2506-1ed0-a220-9c522c08a85a" name="FULLNAME" nameInSource="FullName" length="2048" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <primaryKey xmi:uuid="mmuuid:c58a1540-2506-1ed0-a220-9c522c08a85a" name="PK_PRIMARY_KEYS" columns="mmuuid/bacf8041-2506-1ed0-a220-9c522c08a85a"/>
- </relational:BaseTable>
- <relational:BaseTable xmi:uuid="mmuuid:c6bb4240-2506-1ed0-a220-9c522c08a85a" name="UNIQUE_KEYS" nameInSource="KEYS.INDEX#I" system="true" supportsUpdate="false">
- <columns xmi:uuid="mmuuid:c6bb4241-2506-1ed0-a220-9c522c08a85a" name="UUID" nameInSource="UUID" length="50" nullable="NO_NULLS" caseSensitive="false" signed="false" uniqueKeys="mmuuid/d20e6dc0-2506-1ed0-a220-9c522c08a85a">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:c88505c0-2506-1ed0-a220-9c522c08a85a" name="UUID_OF_TABLE" nameInSource="ParentUUID" length="50" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:c9b632c0-2506-1ed0-a220-9c522c08a85a" name="NAME" nameInSource="Name" length="255" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:cb7ff640-2506-1ed0-a220-9c522c08a85a" name="NAME_IN_SOURCE" nameInSource="NameInSource" length="255" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:ccb12340-2506-1ed0-a220-9c522c08a85a" name="MODEL_NAME" nameInSource="ModelName" length="255" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:ccb12341-2506-1ed0-a220-9c522c08a85a" name="TABLE_NAME" nameInSource="ParentFullName" length="255" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:cd49b9c0-2506-1ed0-a220-9c522c08a85a" name="PATH" nameInSource="PathString" length="2048" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:cf137d40-2506-1ed0-a220-9c522c08a85a" name="OBJECT_TYPE" nameInSource="RecordType" length="1" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.metamatrix.com/metamodels/SimpleDatatypes-instance#char"/>
- </columns>
- <columns xmi:uuid="mmuuid:d044aa40-2506-1ed0-a220-9c522c08a85a" name="FULLNAME" nameInSource="FullName" length="2048" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <primaryKey xmi:uuid="mmuuid:d20e6dc0-2506-1ed0-a220-9c522c08a85a" name="PK_UNIQUE_KEYS" columns="mmuuid/c6bb4241-2506-1ed0-a220-9c522c08a85a"/>
- </relational:BaseTable>
- <relational:BaseTable xmi:uuid="mmuuid:d33f9ac0-2506-1ed0-a220-9c522c08a85a" name="INDEXES" nameInSource="KEYS.INDEX#L" system="true" supportsUpdate="false">
- <columns xmi:uuid="mmuuid:d3d83140-2506-1ed0-a220-9c522c08a85a" name="UUID" nameInSource="UUID" length="50" nullable="NO_NULLS" caseSensitive="false" signed="false" uniqueKeys="mmuuid/de097200-2506-1ed0-a220-9c522c08a85a">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:d5095e40-2506-1ed0-a220-9c522c08a85a" name="NAME" nameInSource="Name" length="255" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:d6e26400-2506-1ed0-a220-9c522c08a85a" name="NAME_IN_SOURCE" nameInSource="NameInSource" length="255" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:d8ac2780-2506-1ed0-a220-9c522c08a85a" name="MODEL_NAME" nameInSource="ModelName" length="255" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:d944be00-2506-1ed0-a220-9c522c08a85a" name="TABLE_NAME" nameInSource="ParentFullName" length="255" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:d944be01-2506-1ed0-a220-9c522c08a85a" name="PATH" nameInSource="PathString" length="2048" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:db0e8180-2506-1ed0-a220-9c522c08a85a" name="OBJECT_TYPE" nameInSource="RecordType" length="1" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.metamatrix.com/metamodels/SimpleDatatypes-instance#char"/>
- </columns>
- <columns xmi:uuid="mmuuid:dcd84500-2506-1ed0-a220-9c522c08a85a" name="FULLNAME" nameInSource="FullName" length="2048" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <primaryKey xmi:uuid="mmuuid:de097200-2506-1ed0-a220-9c522c08a85a" name="PK_INDEXES" columns="mmuuid/d3d83140-2506-1ed0-a220-9c522c08a85a"/>
- </relational:BaseTable>
- <relational:BaseTable xmi:uuid="mmuuid:df3a9f00-2506-1ed0-a220-9c522c08a85a" name="ACCESS_PATTERNS" nameInSource="KEYS.INDEX#H" system="true" supportsUpdate="false">
- <columns xmi:uuid="mmuuid:dfd33580-2506-1ed0-a220-9c522c08a85a" name="UUID" nameInSource="UUID" length="50" nullable="NO_NULLS" caseSensitive="false" signed="false" uniqueKeys="mmuuid/ea8dca80-2506-1ed0-a220-9c522c08a85a">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:e1046280-2506-1ed0-a220-9c522c08a85a" name="UUID_OF_TABLE" nameInSource="ParentUUID" length="50" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:e2358f80-2506-1ed0-a220-9c522c08a85a" name="NAME" nameInSource="Name" length="255" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:e3ff5300-2506-1ed0-a220-9c522c08a85a" name="NAME_IN_SOURCE" nameInSource="NameInSource" length="255" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:e5308000-2506-1ed0-a220-9c522c08a85a" name="MODEL_NAME" nameInSource="ModelName" length="255" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:e5c91680-2506-1ed0-a220-9c522c08a85a" name="TABLE_NAME" nameInSource="ParentFullName" length="255" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:e5c91681-2506-1ed0-a220-9c522c08a85a" name="PATH" nameInSource="PathString" length="2048" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:e792da00-2506-1ed0-a220-9c522c08a85a" name="OBJECT_TYPE" nameInSource="RecordType" length="1" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.metamatrix.com/metamodels/SimpleDatatypes-instance#char"/>
- </columns>
- <columns xmi:uuid="mmuuid:e8c40700-2506-1ed0-a220-9c522c08a85a" name="FULLNAME" nameInSource="FullName" length="2048" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <primaryKey xmi:uuid="mmuuid:ea8dca80-2506-1ed0-a220-9c522c08a85a" name="PK_ACCESS_PATTERNS" columns="mmuuid/dfd33580-2506-1ed0-a220-9c522c08a85a"/>
- </relational:BaseTable>
- <relational:BaseTable xmi:uuid="mmuuid:ebbef780-2506-1ed0-a220-9c522c08a85a" name="FOREIGN_KEYS" nameInSource="KEYS.INDEX#J" system="true" supportsUpdate="false">
- <columns xmi:uuid="mmuuid:ebbef781-2506-1ed0-a220-9c522c08a85a" name="UUID" nameInSource="UUID" length="50" nullable="NO_NULLS" caseSensitive="false" signed="false" uniqueKeys="mmuuid/f7aab980-2506-1ed0-a220-9c522c08a85a">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:ed88bb00-2506-1ed0-a220-9c522c08a85a" name="UUID_OF_TABLE" nameInSource="ParentUUID" length="50" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:ef527e80-2506-1ed0-a220-9c522c08a85a" name="NAME" nameInSource="Name" length="255" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:f11c4200-2506-1ed0-a220-9c522c08a85a" name="NAME_IN_SOURCE" nameInSource="NameInSource" length="255" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:f2e60580-2506-1ed0-a220-9c522c08a85a" name="MODEL_NAME" nameInSource="ModelName" length="255" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:f2e60581-2506-1ed0-a220-9c522c08a85a" name="TABLE_NAME" nameInSource="ParentFullName" length="255" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:f37e9c00-2506-1ed0-a220-9c522c08a85a" name="PATH" nameInSource="PathString" length="2048" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:f4afc900-2506-1ed0-a220-9c522c08a85a" name="OBJECT_TYPE" nameInSource="RecordType" length="1" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.metamatrix.com/metamodels/SimpleDatatypes-instance#char"/>
- </columns>
- <columns xmi:uuid="mmuuid:f6798c80-2506-1ed0-a220-9c522c08a85a" name="FULLNAME" nameInSource="FullName" length="2048" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:1dd99d00-bfa3-1edb-a31f-f0e78084902c" name="UUID_OF_PRIMARY_KEY" nameInSource="UniqueKeyID" length="50" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <primaryKey xmi:uuid="mmuuid:f7aab980-2506-1ed0-a220-9c522c08a85a" name="PK_FOREIGN_KEYS" columns="mmuuid/ebbef781-2506-1ed0-a220-9c522c08a85a"/>
- </relational:BaseTable>
- <relational:BaseTable xmi:uuid="mmuuid:f8dbe680-2506-1ed0-a220-9c522c08a85a" name="PROCS" nameInSource="PROCEDURES.INDEX#E" system="true" supportsUpdate="false">
- <columns xmi:uuid="mmuuid:f9747d00-2506-1ed0-a220-9c522c08a85a" name="UUID" nameInSource="UUID" length="50" nullable="NO_NULLS" caseSensitive="false" signed="false" uniqueKeys="mmuuid/056f8140-2507-1ed0-a220-9c522c08a85a">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:faa5aa00-2506-1ed0-a220-9c522c08a85a" name="NAME" nameInSource="Name" length="255" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:fc6f6d80-2506-1ed0-a220-9c522c08a85a" name="NAME_IN_SOURCE" nameInSource="NameInSource" length="255" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:fe393100-2506-1ed0-a220-9c522c08a85a" name="MODEL_NAME" nameInSource="ModelName" length="255" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:fe393101-2506-1ed0-a220-9c522c08a85a" name="PATH" nameInSource="PathString" length="2048" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:001236c0-2507-1ed0-a220-9c522c08a85a" name="OBJECT_TYPE" nameInSource="RecordType" length="1" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.metamatrix.com/metamodels/SimpleDatatypes-instance#char"/>
- </columns>
- <columns xmi:uuid="mmuuid:014363c0-2507-1ed0-a220-9c522c08a85a" name="FULLNAME" nameInSource="FullName" length="2048" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:030d2740-2507-1ed0-a220-9c522c08a85a" name="FUNCTION" nameInSource="isFunction" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#boolean"/>
- </columns>
- <columns xmi:uuid="mmuuid:043e5440-2507-1ed0-a220-9c522c08a85a" name="RESULT_SET_UUID" nameInSource="ResultSetID" length="50" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:50835100-81e2-1edb-b82b-a644fce32f4b" name="PROC_TYPE" nameInSource="Type" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#short"/>
- </columns>
- <primaryKey xmi:uuid="mmuuid:056f8140-2507-1ed0-a220-9c522c08a85a" name="PK_PROCS" columns="mmuuid/f9747d00-2506-1ed0-a220-9c522c08a85a"/>
- </relational:BaseTable>
- <relational:BaseTable xmi:uuid="mmuuid:06a0ae40-2507-1ed0-a220-9c522c08a85a" name="PROC_PARAMS" nameInSource="PROCEDURES.INDEX#F" system="true" supportsUpdate="false">
- <columns xmi:uuid="mmuuid:073944c0-2507-1ed0-a220-9c522c08a85a" name="UUID" nameInSource="UUID" length="50" nullable="NO_NULLS" caseSensitive="false" signed="false" uniqueKeys="mmuuid/115b4340-2507-1ed0-a220-9c522c08a85a">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:086a71c0-2507-1ed0-a220-9c522c08a85a" name="NAME" nameInSource="Name" length="255" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:099b9ec0-2507-1ed0-a220-9c522c08a85a" name="NAME_IN_SOURCE" nameInSource="NameInSource" length="255" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:0b656240-2507-1ed0-a220-9c522c08a85a" name="MODEL_NAME" nameInSource="ModelName" length="255" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:0b656241-2507-1ed0-a220-9c522c08a85a" name="PROC_NAME" nameInSource="ParentFullName" length="255" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:0bfdf8c0-2507-1ed0-a220-9c522c08a85a" name="PROC_UUID" nameInSource="ParentUUID" length="50" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:0d2f25c0-2507-1ed0-a220-9c522c08a85a" name="PATH" nameInSource="PathString" length="2048" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:0ef8e940-2507-1ed0-a220-9c522c08a85a" name="OBJECT_TYPE" nameInSource="RecordType" length="1" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.metamatrix.com/metamodels/SimpleDatatypes-instance#char"/>
- </columns>
- <columns xmi:uuid="mmuuid:102a1640-2507-1ed0-a220-9c522c08a85a" name="FULLNAME" nameInSource="FullName" length="2048" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:d8b8fb80-79e8-1edb-8406-b71b8efe0994" name="POSITION" nameInSource="Position" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#int"/>
- </columns>
- <columns xmi:uuid="mmuuid:fd097580-7bd9-1edb-8406-b71b8efe0994" name="DIRECTION" nameInSource="Type" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#short"/>
- </columns>
- <columns xmi:uuid="mmuuid:cdfc6900-825f-1edb-b82b-a644fce32f4b" name="RUNTIME_TYPE_NAME" nameInSource="RuntimeType" length="25" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:758a7f40-82bf-1edb-b82b-a644fce32f4b" name="DATATYPE_UUID" nameInSource="DatatypeUUID" length="50" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:7489af80-84cc-1edb-b82b-a644fce32f4b" name="LENGTH" nameInSource="Length" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#int"/>
- </columns>
- <columns xmi:uuid="mmuuid:7c592480-8566-1edb-b82b-a644fce32f4b" name="NULL_TYPE" nameInSource="NullType" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#int"/>
- </columns>
- <columns xmi:uuid="mmuuid:343a2440-85c2-1edb-b82b-a644fce32f4b" name="RADIX" nameInSource="Radix" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#int"/>
- </columns>
- <columns xmi:uuid="mmuuid:393d6080-85c5-1edb-b82b-a644fce32f4b" name="SCALE" nameInSource="Scale" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#int"/>
- </columns>
- <columns xmi:uuid="mmuuid:dae5b540-85ca-1edb-b82b-a644fce32f4b" name="PRECISION" nameInSource="Precision" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#int"/>
- </columns>
- <columns xmi:uuid="mmuuid:df8271c0-d2e0-1edb-9223-85de9ced5f1c" name="IS_OPTIONAL" nameInSource="isOptional" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#boolean"/>
- </columns>
- <primaryKey xmi:uuid="mmuuid:115b4340-2507-1ed0-a220-9c522c08a85a" name="PK_PROC_PARAMS" columns="mmuuid/073944c0-2507-1ed0-a220-9c522c08a85a"/>
- </relational:BaseTable>
- <relational:BaseTable xmi:uuid="mmuuid:132506c0-2507-1ed0-a220-9c522c08a85a" name="PROC_RESULT_SETS" nameInSource="PROCEDURES.INDEX#C" system="true" supportsUpdate="false">
- <columns xmi:uuid="mmuuid:132506c1-2507-1ed0-a220-9c522c08a85a" name="UUID" nameInSource="UUID" length="50" nullable="NO_NULLS" caseSensitive="false" signed="false" uniqueKeys="mmuuid/1ddf9bc0-2507-1ed0-a220-9c522c08a85a">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:14eeca40-2507-1ed0-a220-9c522c08a85a" name="NAME" nameInSource="Name" length="255" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:161ff740-2507-1ed0-a220-9c522c08a85a" name="NAME_IN_SOURCE" nameInSource="NameInSource" length="255" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:17e9bac0-2507-1ed0-a220-9c522c08a85a" name="MODEL_NAME" nameInSource="ModelName" length="255" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:18825140-2507-1ed0-a220-9c522c08a85a" name="PROC_NAME" nameInSource="ParentFullName" length="255" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:18825141-2507-1ed0-a220-9c522c08a85a" name="PROC_UUID" nameInSource="ParentUUID" length="50" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:19b37e40-2507-1ed0-a220-9c522c08a85a" name="PATH" nameInSource="PathString" length="2048" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:1b7d41c0-2507-1ed0-a220-9c522c08a85a" name="OBJECT_TYPE" nameInSource="RecordType" length="1" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.metamatrix.com/metamodels/SimpleDatatypes-instance#char"/>
- </columns>
- <columns xmi:uuid="mmuuid:1cae6ec0-2507-1ed0-a220-9c522c08a85a" name="FULLNAME" nameInSource="FullName" length="2048" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <primaryKey xmi:uuid="mmuuid:1ddf9bc0-2507-1ed0-a220-9c522c08a85a" name="PK_PROC_RESULT_SETS" columns="mmuuid/132506c1-2507-1ed0-a220-9c522c08a85a"/>
- </relational:BaseTable>
- <relational:BaseTable xmi:uuid="mmuuid:1f10c8c0-2507-1ed0-a220-9c522c08a85a" name="DATATYPES" nameInSource="DATATYPES.INDEX" system="true" supportsUpdate="false">
- <columns xmi:uuid="mmuuid:1fa95f40-2507-1ed0-a220-9c522c08a85a" name="UUID" nameInSource="UUID" length="50" nullable="NO_NULLS" caseSensitive="false" signed="false" uniqueKeys="mmuuid/3c54d980-2507-1ed0-a220-9c522c08a85a">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:20da8c40-2507-1ed0-a220-9c522c08a85a" name="NAME" nameInSource="Name" length="100" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:220bb940-2507-1ed0-a220-9c522c08a85a" name="NAME_IN_SOURCE" nameInSource="NameInSource" length="100" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:23d57cc0-2507-1ed0-a220-9c522c08a85a" name="MODEL_NAME" nameInSource="ModelName" length="255" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:23d57cc1-2507-1ed0-a220-9c522c08a85a" name="PATH" nameInSource="PathString" length="2048" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:259f4040-2507-1ed0-a220-9c522c08a85a" name="OBJECT_TYPE" nameInSource="RecordType" length="1" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.metamatrix.com/metamodels/SimpleDatatypes-instance#char"/>
- </columns>
- <columns xmi:uuid="mmuuid:26d06d40-2507-1ed0-a220-9c522c08a85a" name="FULLNAME" nameInSource="FullName" length="2048" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:28a97300-2507-1ed0-a220-9c522c08a85a" name="URL" nameInSource="DatatypeID" length="2048" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:3b92ff80-2fd0-1ed0-a220-9c522c08a85a" name="TYPE" nameInSource="Type" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#short"/>
- </columns>
- <columns xmi:uuid="mmuuid:29daa000-2507-1ed0-a220-9c522c08a85a" name="BASETYPE_URL" nameInSource="BasetypeID" length="2048" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:f34840c0-319e-1ed0-a220-9c522c08a85a" name="BASETYPE_NAME" nameInSource="BasetypeName" length="100" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:2ba46380-2507-1ed0-a220-9c522c08a85a" name="JAVA_CLASS_NAME" nameInSource="JavaClassName" length="500" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:2cd59080-2507-1ed0-a220-9c522c08a85a" name="LENGTH" nameInSource="Length" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#int"/>
- </columns>
- <columns xmi:uuid="mmuuid:2e9f5400-2507-1ed0-a220-9c522c08a85a" name="NULL_TYPE" nameInSource="NullType" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#short"/>
- </columns>
- <columns xmi:uuid="mmuuid:33fc9e80-2507-1ed0-a220-9c522c08a85a" name="SEARCH_TYPE" nameInSource="SearchType" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#short"/>
- </columns>
- <columns xmi:uuid="mmuuid:2fd08100-2507-1ed0-a220-9c522c08a85a" name="PRECISION" nameInSource="PrecisionLength" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#int"/>
- </columns>
- <columns xmi:uuid="mmuuid:3101ae00-2507-1ed0-a220-9c522c08a85a" name="SCALE" nameInSource="Scale" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#int"/>
- </columns>
- <columns xmi:uuid="mmuuid:3232db00-2507-1ed0-a220-9c522c08a85a" name="RADIX" nameInSource="Radix" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#int"/>
- </columns>
- <columns xmi:uuid="mmuuid:352dcb80-2507-1ed0-a220-9c522c08a85a" name="IS_AUTO_INCREMENTED" nameInSource="isAutoIncrement" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#boolean"/>
- </columns>
- <columns xmi:uuid="mmuuid:365ef880-2507-1ed0-a220-9c522c08a85a" name="IS_CASE_SENSITIVE" nameInSource="isCaseSensitive" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#boolean"/>
- </columns>
- <columns xmi:uuid="mmuuid:3828bc00-2507-1ed0-a220-9c522c08a85a" name="IS_SIGNED" nameInSource="isSigned" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#boolean"/>
- </columns>
- <columns xmi:uuid="mmuuid:d915e980-3001-1ed0-a220-9c522c08a85a" name="IS_BUILTIN" nameInSource="isBuiltin" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#boolean"/>
- </columns>
- <columns xmi:uuid="mmuuid:3959e900-2507-1ed0-a220-9c522c08a85a" name="RUNTIME_TYPE_NAME" nameInSource="RuntimeTypeName" length="25" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:3b23ac80-2507-1ed0-a220-9c522c08a85a" name="VARIETY" nameInSource="VarietyType" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#short"/>
- </columns>
- <primaryKey xmi:uuid="mmuuid:3c54d980-2507-1ed0-a220-9c522c08a85a" name="PK_DATATYPES" columns="mmuuid/1fa95f40-2507-1ed0-a220-9c522c08a85a"/>
- </relational:BaseTable>
- <relational:BaseTable xmi:uuid="mmuuid:3eb73380-2507-1ed0-a220-9c522c08a85a" name="SELECT_TRANS" nameInSource="SELECT_TRANSFORM.INDEX" system="true" supportsUpdate="false">
- <columns xmi:uuid="mmuuid:3f4fca00-2507-1ed0-a220-9c522c08a85a" name="OBJECT_TYPE" nameInSource="RecordType" length="1" nullable="NO_NULLS" caseSensitive="false" signed="false" uniqueKeys="mmuuid/44ad1480-2507-1ed0-a220-9c522c08a85a">
- <type href="http://www.metamatrix.com/metamodels/SimpleDatatypes-instance#char"/>
- </columns>
- <columns xmi:uuid="mmuuid:4080f700-2507-1ed0-a220-9c522c08a85a" name="TRANSFORMED_UUID" nameInSource="UUID" length="50" nullable="NO_NULLS" caseSensitive="false" signed="false" uniqueKeys="mmuuid/44ad1480-2507-1ed0-a220-9c522c08a85a">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:41b22400-2507-1ed0-a220-9c522c08a85a" name="TRANSFORMED_PATH" nameInSource="PathString" length="2048" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:437be780-2507-1ed0-a220-9c522c08a85a" name="TRANSFORMATION" nameInSource="Transformation" length="999999" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <primaryKey xmi:uuid="mmuuid:44ad1480-2507-1ed0-a220-9c522c08a85a" name="PK_SELECT_TRANS" columns="mmuuid/3f4fca00-2507-1ed0-a220-9c522c08a85a mmuuid/4080f700-2507-1ed0-a220-9c522c08a85a"/>
- </relational:BaseTable>
- <relational:BaseTable xmi:uuid="mmuuid:4545ab00-2507-1ed0-a220-9c522c08a85a" name="INSERT_TRANS" nameInSource="INSERT_TRANSFORM.INDEX" system="true" supportsUpdate="false">
- <columns xmi:uuid="mmuuid:45de4180-2507-1ed0-a220-9c522c08a85a" name="OBJECT_TYPE" nameInSource="RecordType" length="1" nullable="NO_NULLS" caseSensitive="false" signed="false" uniqueKeys="mmuuid/4b3b8c00-2507-1ed0-a220-9c522c08a85a">
- <type href="http://www.metamatrix.com/metamodels/SimpleDatatypes-instance#char"/>
- </columns>
- <columns xmi:uuid="mmuuid:470f6e80-2507-1ed0-a220-9c522c08a85a" name="TRANSFORMED_UUID" nameInSource="UUID" length="50" nullable="NO_NULLS" caseSensitive="false" signed="false" uniqueKeys="mmuuid/4b3b8c00-2507-1ed0-a220-9c522c08a85a">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:48409b80-2507-1ed0-a220-9c522c08a85a" name="TRANSFORMED_PATH" nameInSource="PathString" length="2048" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:4a0a5f00-2507-1ed0-a220-9c522c08a85a" name="TRANSFORMATION" nameInSource="Transformation" length="999999" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <primaryKey xmi:uuid="mmuuid:4b3b8c00-2507-1ed0-a220-9c522c08a85a" name="PK_INSERT_TRANS" columns="mmuuid/45de4180-2507-1ed0-a220-9c522c08a85a mmuuid/470f6e80-2507-1ed0-a220-9c522c08a85a"/>
- </relational:BaseTable>
- <relational:BaseTable xmi:uuid="mmuuid:4c6cb900-2507-1ed0-a220-9c522c08a85a" name="UPDATE_TRANS" nameInSource="UPDATE_TRANSFORM.INDEX" system="true" supportsUpdate="false">
- <columns xmi:uuid="mmuuid:4c6cb901-2507-1ed0-a220-9c522c08a85a" name="OBJECT_TYPE" nameInSource="RecordType" length="1" nullable="NO_NULLS" caseSensitive="false" signed="false" uniqueKeys="mmuuid/5271dc40-2507-1ed0-a220-9c522c08a85a">
- <type href="http://www.metamatrix.com/metamodels/SimpleDatatypes-instance#char"/>
- </columns>
- <columns xmi:uuid="mmuuid:4d9de600-2507-1ed0-a220-9c522c08a85a" name="TRANSFORMED_UUID" nameInSource="UUID" length="50" nullable="NO_NULLS" caseSensitive="false" signed="false" uniqueKeys="mmuuid/5271dc40-2507-1ed0-a220-9c522c08a85a">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:4f67a980-2507-1ed0-a220-9c522c08a85a" name="TRANSFORMED_PATH" nameInSource="PathString" length="2048" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:51316d00-2507-1ed0-a220-9c522c08a85a" name="TRANSFORMATION" nameInSource="Transformation" length="999999" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <primaryKey xmi:uuid="mmuuid:5271dc40-2507-1ed0-a220-9c522c08a85a" name="PK_UPDATE_TRANS" columns="mmuuid/4c6cb901-2507-1ed0-a220-9c522c08a85a mmuuid/4d9de600-2507-1ed0-a220-9c522c08a85a"/>
- </relational:BaseTable>
- <relational:BaseTable xmi:uuid="mmuuid:530a72c0-2507-1ed0-a220-9c522c08a85a" name="DELETE_TRANS" nameInSource="DELETE_TRANSFORM.INDEX" system="true" supportsUpdate="false">
- <columns xmi:uuid="mmuuid:53a30940-2507-1ed0-a220-9c522c08a85a" name="OBJECT_TYPE" nameInSource="RecordType" length="1" nullable="NO_NULLS" caseSensitive="false" signed="false" uniqueKeys="mmuuid/590053c0-2507-1ed0-a220-9c522c08a85a">
- <type href="http://www.metamatrix.com/metamodels/SimpleDatatypes-instance#char"/>
- </columns>
- <columns xmi:uuid="mmuuid:54d43640-2507-1ed0-a220-9c522c08a85a" name="TRANSFORMED_UUID" nameInSource="UUID" length="50" nullable="NO_NULLS" caseSensitive="false" signed="false" uniqueKeys="mmuuid/590053c0-2507-1ed0-a220-9c522c08a85a">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:56056340-2507-1ed0-a220-9c522c08a85a" name="TRANSFORMED_PATH" nameInSource="PathString" length="2048" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:57cf26c0-2507-1ed0-a220-9c522c08a85a" name="TRANSFORMATION" nameInSource="Transformation" length="999999" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <primaryKey xmi:uuid="mmuuid:590053c0-2507-1ed0-a220-9c522c08a85a" name="PK_DELETE_TRANS" columns="mmuuid/53a30940-2507-1ed0-a220-9c522c08a85a mmuuid/54d43640-2507-1ed0-a220-9c522c08a85a"/>
- </relational:BaseTable>
- <relational:BaseTable xmi:uuid="mmuuid:5998ea40-2507-1ed0-a220-9c522c08a85a" name="PROC_TRANS" nameInSource="PROC_TRANSFORM.INDEX" system="true" supportsUpdate="false">
- <columns xmi:uuid="mmuuid:5a3180c0-2507-1ed0-a220-9c522c08a85a" name="OBJECT_TYPE" nameInSource="RecordType" length="1" nullable="NO_NULLS" caseSensitive="false" signed="false" uniqueKeys="mmuuid/5f8ecb40-2507-1ed0-a220-9c522c08a85a">
- <type href="http://www.metamatrix.com/metamodels/SimpleDatatypes-instance#char"/>
- </columns>
- <columns xmi:uuid="mmuuid:5b62adc0-2507-1ed0-a220-9c522c08a85a" name="TRANSFORMED_UUID" nameInSource="UUID" length="50" nullable="NO_NULLS" caseSensitive="false" signed="false" uniqueKeys="mmuuid/5f8ecb40-2507-1ed0-a220-9c522c08a85a">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:5c93dac0-2507-1ed0-a220-9c522c08a85a" name="TRANSFORMED_PATH" nameInSource="PathString" length="2048" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:5e5d9e40-2507-1ed0-a220-9c522c08a85a" name="TRANSFORMATION" nameInSource="Transformation" length="999999" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <primaryKey xmi:uuid="mmuuid:5f8ecb40-2507-1ed0-a220-9c522c08a85a" name="PK_PROC_TRANS" columns="mmuuid/5a3180c0-2507-1ed0-a220-9c522c08a85a mmuuid/5b62adc0-2507-1ed0-a220-9c522c08a85a"/>
- </relational:BaseTable>
- <relational:BaseTable xmi:uuid="mmuuid:602761c0-2507-1ed0-a220-9c522c08a85a" name="ANNOTATIONS" nameInSource="ANNOTATION.INDEX" system="true" supportsUpdate="false">
- <columns xmi:uuid="mmuuid:60bff840-2507-1ed0-a220-9c522c08a85a" name="ANNOTATED_UUID" nameInSource="UUID" length="50" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:60bff841-2507-1ed0-a220-9c522c08a85a" name="DESCRIPTION" nameInSource="Description" length="255" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- </relational:BaseTable>
- <relational:BaseTable xmi:uuid="mmuuid:61588ec0-2507-1ed0-a220-9c522c08a85a" name="PROPERTIES" nameInSource="PROPERTIES.INDEX" system="true" supportsUpdate="false">
- <columns xmi:uuid="mmuuid:61588ec1-2507-1ed0-a220-9c522c08a85a" name="PROPERTIED_UUID" nameInSource="UUID" length="50" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:61f12540-2507-1ed0-a220-9c522c08a85a" name="PROP_NAME" nameInSource="PropertyName" length="255" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:61f12541-2507-1ed0-a220-9c522c08a85a" name="PROP_VALUE" nameInSource="PropertyValue" length="255" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- </relational:BaseTable>
- <relational:BaseTable xmi:uuid="mmuuid:cede7b00-2f00-1ed0-a220-9c522c08a85a" name="DATATYPE_TYPE_ENUM" nameInSource="DatatypeTypeEnumeration.properties" system="true" supportsUpdate="false">
- <columns xmi:uuid="mmuuid:cf8653c0-2f00-1ed0-a220-9c522c08a85a" name="CODE" nameInSource="Key" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#int"/>
- </columns>
- <columns xmi:uuid="mmuuid:d01eea40-2f00-1ed0-a220-9c522c08a85a" name="NAME" nameInSource="Value" length="20" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- </relational:BaseTable>
- <relational:BaseTable xmi:uuid="mmuuid:eb50a080-2f26-1ed0-a220-9c522c08a85a" name="DATATYPE_VARIETY_ENUM" nameInSource="DatatypeVarietyEnumeration.properties" system="true" supportsUpdate="false">
- <columns xmi:uuid="mmuuid:ebe93700-2f26-1ed0-a220-9c522c08a85a" name="CODE" nameInSource="Key" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#int"/>
- </columns>
- <columns xmi:uuid="mmuuid:ec81cd80-2f26-1ed0-a220-9c522c08a85a" name="NAME" nameInSource="Value" length="20" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- </relational:BaseTable>
- <relational:BaseTable xmi:uuid="mmuuid:d7ca13c0-2fad-1ed0-a220-9c522c08a85a" name="KEY_TYPE_ENUM" nameInSource="KeyTypeEnumeration.properties" system="true" supportsUpdate="false">
- <columns xmi:uuid="mmuuid:d7ca13c1-2fad-1ed0-a220-9c522c08a85a" name="CODE" nameInSource="Key" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#int"/>
- </columns>
- <columns xmi:uuid="mmuuid:d862aa40-2fad-1ed0-a220-9c522c08a85a" name="NAME" nameInSource="Value" length="20" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- </relational:BaseTable>
- <relational:BaseTable xmi:uuid="mmuuid:9a28e580-393c-1ed0-a220-9c522c08a85a" name="MODEL_TYPE_ENUM" nameInSource="ModelTypeEnumeration.properties" system="true" supportsUpdate="false">
- <columns xmi:uuid="mmuuid:9ac17c00-393c-1ed0-a220-9c522c08a85a" name="CODE" nameInSource="Key" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#int"/>
- </columns>
- <columns xmi:uuid="mmuuid:9ac17c01-393c-1ed0-a220-9c522c08a85a" name="NAME" nameInSource="Value" length="20" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- </relational:BaseTable>
- <relational:BaseTable xmi:uuid="mmuuid:b9315540-2c88-1ed0-a220-9c522c08a85a" name="NULL_TYPE_ENUM" nameInSource="NullTypeEnumeration.properties" system="true" supportsUpdate="false">
- <columns xmi:uuid="mmuuid:096da8c0-2c8d-1ed0-a220-9c522c08a85a" name="CODE" nameInSource="Key" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#int"/>
- </columns>
- <columns xmi:uuid="mmuuid:05801380-2c90-1ed0-a220-9c522c08a85a" name="NAME" nameInSource="Value" length="20" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- </relational:BaseTable>
- <relational:BaseTable xmi:uuid="mmuuid:7cf72d00-2fb4-1ed0-a220-9c522c08a85a" name="PROC_TYPE_ENUM" nameInSource="ProcTypeEnumeration.properties" system="true" supportsUpdate="false">
- <columns xmi:uuid="mmuuid:7cf72d01-2fb4-1ed0-a220-9c522c08a85a" name="CODE" nameInSource="Key" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#int"/>
- </columns>
- <columns xmi:uuid="mmuuid:7d8fc380-2fb4-1ed0-a220-9c522c08a85a" name="NAME" nameInSource="Value" length="20" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- </relational:BaseTable>
- <relational:BaseTable xmi:uuid="mmuuid:5eb76440-2d9d-1ed0-a220-9c522c08a85a" name="PROC_PARAM_TYPE_ENUM" nameInSource="ProcParamDirectionEnumeration.properties" system="true" supportsUpdate="false">
- <columns xmi:uuid="mmuuid:5eb76441-2d9d-1ed0-a220-9c522c08a85a" name="CODE" nameInSource="Key" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#int"/>
- </columns>
- <columns xmi:uuid="mmuuid:5f4ffac0-2d9d-1ed0-a220-9c522c08a85a" name="NAME" nameInSource="Value" length="20" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- </relational:BaseTable>
- <relational:BaseTable xmi:uuid="mmuuid:7851fe40-2c9b-1ed0-a220-9c522c08a85a" name="SEARCH_TYPE_ENUM" nameInSource="SearchTypeEnumeration.properties" system="true" supportsUpdate="false">
- <columns xmi:uuid="mmuuid:78ea94c0-2c9b-1ed0-a220-9c522c08a85a" name="CODE" nameInSource="Key" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#int"/>
- </columns>
- <columns xmi:uuid="mmuuid:79832b40-2c9b-1ed0-a220-9c522c08a85a" name="NAME" nameInSource="Value" length="20" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- </relational:BaseTable>
- <relational:BaseTable xmi:uuid="mmuuid:488fd300-2dc5-1ed0-a220-9c522c08a85a" name="ALL_KEYS" nameInSource="KEYS.INDEX" system="true" supportsUpdate="false">
- <columns xmi:uuid="mmuuid:49286980-2dc5-1ed0-a220-9c522c08a85a" name="UUID" nameInSource="UUID" length="50" nullable="NO_NULLS" caseSensitive="false" signed="false" uniqueKeys="mmuuid/5a717600-2dc5-1ed0-a220-9c522c08a85a">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:4b8ac380-2dc5-1ed0-a220-9c522c08a85a" name="UUID_OF_TABLE" nameInSource="ParentUUID" length="50" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:4ded1d80-2dc5-1ed0-a220-9c522c08a85a" name="NAME" nameInSource="Name" length="255" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:504f7780-2dc5-1ed0-a220-9c522c08a85a" name="NAME_IN_SOURCE" nameInSource="NameInSource" length="255" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:52b1d180-2dc5-1ed0-a220-9c522c08a85a" name="MODEL_NAME" nameInSource="ModelName" length="255" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:534a6800-2dc5-1ed0-a220-9c522c08a85a" name="TABLE_NAME" nameInSource="ParentFullName" length="255" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:53e2fe80-2dc5-1ed0-a220-9c522c08a85a" name="PATH" nameInSource="PathString" length="2048" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:56455880-2dc5-1ed0-a220-9c522c08a85a" name="OBJECT_TYPE" nameInSource="RecordType" length="1" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.metamatrix.com/metamodels/SimpleDatatypes-instance#char"/>
- </columns>
- <columns xmi:uuid="mmuuid:58a7b280-2dc5-1ed0-a220-9c522c08a85a" name="FULLNAME" nameInSource="FullName" length="2048" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:7d182900-8298-1edb-b82b-a644fce32f4b" name="KEY_TYPE" nameInSource="Type" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#short"/>
- </columns>
- <primaryKey xmi:uuid="mmuuid:5a717600-2dc5-1ed0-a220-9c522c08a85a" name="PK_PRIMARY_KEYS" columns="mmuuid/49286980-2dc5-1ed0-a220-9c522c08a85a"/>
- </relational:BaseTable>
- <relational:BaseTable xmi:uuid="mmuuid:6cb35480-c650-1edb-a31f-f0e78084902c" name="TABLE_TYPE_ENUM" nameInSource="TableTypeEnumeration.properties" system="true">
- <columns xmi:uuid="mmuuid:9d7e8040-c663-1edb-a31f-f0e78084902c" name="CODE" nameInSource="Key" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#int"/>
- </columns>
- <columns xmi:uuid="mmuuid:9e636200-c663-1edb-a31f-f0e78084902c" name="NAME" nameInSource="Value" length="20" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- </relational:BaseTable>
- <relational:BaseTable xmi:uuid="mmuuid:57d5f780-c66d-1edb-a31f-f0e78084902c" name="KEY_COLUMNS" nameInSource="KEYS.INDEX(getColumnIdEntries)" system="true">
- <columns xmi:uuid="mmuuid:9c22c100-c688-1edb-a31f-f0e78084902c" name="KEY_UUID" nameInSource="UUID" length="50" nullable="NO_NULLS" caseSensitive="false" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:7fd55300-c68d-1edb-a31f-f0e78084902c" name="KEY_TYPE" nameInSource="Type" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#short"/>
- </columns>
- <columns xmi:uuid="mmuuid:32e3b980-c690-1edb-a31f-f0e78084902c" name="COLUMN_UUID" nameInSource="getColumnIdEntries.getUUID" length="50" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:139f9a40-b8b1-1f03-bc32-a70ec9674d30" name="COLUMN_POSITION" nameInSource="getColumnIdEntries.getPosition" length="50" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#int"/>
- </columns>
- </relational:BaseTable>
- <diagram:DiagramContainer xmi:uuid="mmuuid:87086d80-d55f-1eda-b235-cf50afc035e1" name="">
- <diagram xmi:uuid="mmuuid:852f67c0-d55f-1eda-b235-cf50afc035e1" type="packageDiagramType" target="mmuuid/6d490541-276b-1de6-8a38-9d76e1f90f2e">
- <diagramEntity xmi:uuid="mmuuid:6f8ce4c0-e9ae-1eda-b235-cf50afc035e1" xPosition="20" yPosition="20" height="559" width="229"/>
- <diagramEntity xmi:uuid="mmuuid:7165ea80-e9ae-1eda-b235-cf50afc035e1" xPosition="274" yPosition="20" height="253" width="202"/>
- <diagramEntity xmi:uuid="mmuuid:7165ea8b-e9ae-1eda-b235-cf50afc035e1" xPosition="528" yPosition="20" height="145" width="216"/>
- <diagramEntity xmi:uuid="mmuuid:7165ea90-e9ae-1eda-b235-cf50afc035e1" xPosition="782" yPosition="20" height="145" width="212"/>
- <diagramEntity xmi:uuid="mmuuid:7165ea95-e9ae-1eda-b235-cf50afc035e1" xPosition="1036" yPosition="20" height="145" width="169"/>
- <diagramEntity xmi:uuid="mmuuid:725a0e83-e9ae-1eda-b235-cf50afc035e1" xPosition="1290" yPosition="20" height="145" width="165"/>
- <diagramEntity xmi:uuid="mmuuid:725a0e88-e9ae-1eda-b235-cf50afc035e1" xPosition="1544" yPosition="20" height="145" width="190"/>
- <diagramEntity xmi:uuid="mmuuid:725a0e8d-e9ae-1eda-b235-cf50afc035e1" xPosition="1798" yPosition="20" height="649" width="230"/>
- <diagramEntity xmi:uuid="mmuuid:733ef057-e9ae-1eda-b235-cf50afc035e1" xPosition="2052" yPosition="20" height="145" width="193"/>
- <diagramEntity xmi:uuid="mmuuid:74331441-e9ae-1eda-b235-cf50afc035e1" xPosition="2306" yPosition="20" height="145" width="189"/>
- <diagramEntity xmi:uuid="mmuuid:74331446-e9ae-1eda-b235-cf50afc035e1" xPosition="274" yPosition="283" height="289" width="219"/>
- <diagramEntity xmi:uuid="mmuuid:74331453-e9ae-1eda-b235-cf50afc035e1" xPosition="528" yPosition="175" height="145" width="179"/>
- <diagramEntity xmi:uuid="mmuuid:75273844-e9ae-1eda-b235-cf50afc035e1" xPosition="782" yPosition="175" height="145" width="175"/>
- <diagramEntity xmi:uuid="mmuuid:760c1a02-e9ae-1eda-b235-cf50afc035e1" xPosition="1036" yPosition="175" height="145" width="190"/>
- <diagramEntity xmi:uuid="mmuuid:760c1a07-e9ae-1eda-b235-cf50afc035e1" xPosition="1290" yPosition="175" height="253" width="190"/>
- <diagramEntity xmi:uuid="mmuuid:77003e0a-e9ae-1eda-b235-cf50afc035e1" xPosition="1544" yPosition="175" height="145" width="184"/>
- <diagramEntity xmi:uuid="mmuuid:77003e0f-e9ae-1eda-b235-cf50afc035e1" xPosition="1544" yPosition="330" height="145" width="194"/>
- <diagramEntity xmi:uuid="mmuuid:77f46201-e9ae-1eda-b235-cf50afc035e1" xPosition="1544" yPosition="485" height="145" width="190"/>
- <diagramEntity xmi:uuid="mmuuid:77f46206-e9ae-1eda-b235-cf50afc035e1" xPosition="1544" yPosition="640" height="145" width="204"/>
- <diagramEntity xmi:uuid="mmuuid:77f4620b-e9ae-1eda-b235-cf50afc035e1" xPosition="1798" yPosition="679" height="145" width="187"/>
- <diagramEntity xmi:uuid="mmuuid:78d943c4-e9ae-1eda-b235-cf50afc035e1" xPosition="2052" yPosition="175" height="145" width="177"/>
- <diagramEntity xmi:uuid="mmuuid:78d943c9-e9ae-1eda-b235-cf50afc035e1" xPosition="2306" yPosition="175" height="469" width="230"/>
- <diagramEntity xmi:uuid="mmuuid:79cd67d1-e9ae-1eda-b235-cf50afc035e1" xPosition="20" yPosition="589" height="145" width="178"/>
- <diagramEntity xmi:uuid="mmuuid:7ab24980-e9ae-1eda-b235-cf50afc035e1" xPosition="274" yPosition="582" height="145" width="174"/>
- <diagramEntity xmi:uuid="mmuuid:7ab24985-e9ae-1eda-b235-cf50afc035e1" xPosition="528" yPosition="330" height="145" width="195"/>
- <diagramEntity xmi:uuid="mmuuid:7ba66d80-e9ae-1eda-b235-cf50afc035e1" xPosition="782" yPosition="330" height="145" width="203"/>
- <diagramEntity xmi:uuid="mmuuid:7ba66d85-e9ae-1eda-b235-cf50afc035e1" xPosition="1036" yPosition="330" height="235" width="230"/>
- <diagramEntity xmi:uuid="mmuuid:7c9a9182-e9ae-1eda-b235-cf50afc035e1" xPosition="1290" yPosition="438" height="217" width="217"/>
- <diagramEntity xmi:uuid="mmuuid:7d7f7340-e9ae-1eda-b235-cf50afc035e1" xPosition="1290" yPosition="665" height="145" width="188"/>
- <diagramEntity xmi:uuid="mmuuid:7d7f7345-e9ae-1eda-b235-cf50afc035e1" xPosition="1544" yPosition="795" height="145" width="184"/>
- <diagramEntity xmi:uuid="mmuuid:7e739740-e9ae-1eda-b235-cf50afc035e1" xPosition="1798" yPosition="834" height="145" width="205"/>
- <diagramEntity xmi:uuid="mmuuid:7e739745-e9ae-1eda-b235-cf50afc035e1" xPosition="2052" yPosition="330" height="163" width="204"/>
- <diagramEntity xmi:uuid="mmuuid:7f67bb45-e9ae-1eda-b235-cf50afc035e1" xPosition="2052" yPosition="503" height="145" width="213"/>
- <diagramEntity xmi:uuid="mmuuid:7f67bb4a-e9ae-1eda-b235-cf50afc035e1" xPosition="2306" yPosition="654" height="145" width="200"/>
- <diagramEntity xmi:uuid="mmuuid:804c9d04-e9ae-1eda-b235-cf50afc035e1" xPosition="20" yPosition="744" height="163" width="227"/>
- <diagramEntity xmi:uuid="mmuuid:804c9d0a-e9ae-1eda-b235-cf50afc035e1" xPosition="274" yPosition="737" height="307" width="201"/>
- <diagramEntity xmi:uuid="mmuuid:8140c10d-e9ae-1eda-b235-cf50afc035e1" xPosition="528" yPosition="485" height="127" width="210"/>
- <diagramEntity xmi:uuid="mmuuid:8225a2c3-e9ae-1eda-b235-cf50afc035e1" xPosition="782" yPosition="485" height="145" width="201"/>
- <diagramEntity xmi:uuid="mmuuid:8319c6cc-e9ae-1eda-b235-cf50afc035e1" name="MODELS" modelObject="mmuuid/6c9bf840-2506-1ed0-a220-9c522c08a85a" xPosition="246" yPosition="20" height="295" width="241"/>
- <diagramEntity xmi:uuid="mmuuid:84f2cc81-e9ae-1eda-b235-cf50afc035e1" name="TABLES" modelObject="mmuuid/7faec840-2506-1ed0-a220-9c522c08a85a" xPosition="472" yPosition="20" height="280" width="197"/>
- <diagramEntity xmi:uuid="mmuuid:84f2cc8f-e9ae-1eda-b235-cf50afc035e1" name="COLUMNS" modelObject="mmuuid/919fad80-2506-1ed0-a220-9c522c08a85a" xPosition="698" yPosition="20" height="550" width="214"/>
- <diagramEntity xmi:uuid="mmuuid:86db1489-e9ae-1eda-b235-cf50afc035e1" name="PRIMARY_KEYS" modelObject="mmuuid/bacf8040-2506-1ed0-a220-9c522c08a85a" xPosition="924" yPosition="20" height="220" width="197"/>
- <diagramEntity xmi:uuid="mmuuid:87bff640-e9ae-1eda-b235-cf50afc035e1" name="UNIQUE_KEYS" modelObject="mmuuid/c6bb4240-2506-1ed0-a220-9c522c08a85a" xPosition="1150" yPosition="20" height="220" width="197"/>
- <diagramEntity xmi:uuid="mmuuid:87bff64b-e9ae-1eda-b235-cf50afc035e1" name="INDEXES" modelObject="mmuuid/d33f9ac0-2506-1ed0-a220-9c522c08a85a" xPosition="1376" yPosition="20" height="205" width="197"/>
- <diagramEntity xmi:uuid="mmuuid:88b41a49-e9ae-1eda-b235-cf50afc035e1" name="ACCESS_PATTERNS" modelObject="mmuuid/df3a9f00-2506-1ed0-a220-9c522c08a85a" xPosition="20" yPosition="264" height="220" width="197"/>
- <diagramEntity xmi:uuid="mmuuid:8998fc0a-e9ae-1eda-b235-cf50afc035e1" name="FOREIGN_KEYS" modelObject="mmuuid/ebbef780-2506-1ed0-a220-9c522c08a85a" xPosition="246" yPosition="309" height="235" width="219"/>
- <diagramEntity xmi:uuid="mmuuid:8a8d200a-e9ae-1eda-b235-cf50afc035e1" name="PROCS" modelObject="mmuuid/f8dbe680-2506-1ed0-a220-9c522c08a85a" xPosition="472" yPosition="309" height="235" width="197"/>
- <diagramEntity xmi:uuid="mmuuid:8b81440a-e9ae-1eda-b235-cf50afc035e1" name="PROC_PARAMS" modelObject="mmuuid/06a0ae40-2507-1ed0-a220-9c522c08a85a" xPosition="472" yPosition="553" height="370" width="208"/>
- <diagramEntity xmi:uuid="mmuuid:8c6625c8-e9ae-1eda-b235-cf50afc035e1" name="PROC_RESULT_SETS" modelObject="mmuuid/132506c0-2507-1ed0-a220-9c522c08a85a" xPosition="698" yPosition="579" height="220" width="197"/>
- <diagramEntity xmi:uuid="mmuuid:8d5a49c0-e9ae-1eda-b235-cf50afc035e1" name="DATATYPES" modelObject="mmuuid/1f10c8c0-2507-1ed0-a220-9c522c08a85a" xPosition="924" yPosition="249" height="445" width="211"/>
- <diagramEntity xmi:uuid="mmuuid:8e4e6dc6-e9ae-1eda-b235-cf50afc035e1" name="SELECT_TRANS" modelObject="mmuuid/3eb73380-2507-1ed0-a220-9c522c08a85a" xPosition="1150" yPosition="249" height="145" width="218"/>
- <diagramEntity xmi:uuid="mmuuid:8f334f80-e9ae-1eda-b235-cf50afc035e1" name="INSERT_TRANS" modelObject="mmuuid/4545ab00-2507-1ed0-a220-9c522c08a85a" xPosition="1376" yPosition="234" height="145" width="218"/>
- <diagramEntity xmi:uuid="mmuuid:8f334f86-e9ae-1eda-b235-cf50afc035e1" name="UPDATE_TRANS" modelObject="mmuuid/4c6cb900-2507-1ed0-a220-9c522c08a85a" xPosition="1376" yPosition="388" height="145" width="218"/>
- <diagramEntity xmi:uuid="mmuuid:90277385-e9ae-1eda-b235-cf50afc035e1" name="DELETE_TRANS" modelObject="mmuuid/530a72c0-2507-1ed0-a220-9c522c08a85a" xPosition="20" yPosition="493" height="145" width="218"/>
- <diagramEntity xmi:uuid="mmuuid:910c5542-e9ae-1eda-b235-cf50afc035e1" name="PROC_TRANS" modelObject="mmuuid/5998ea40-2507-1ed0-a220-9c522c08a85a" xPosition="246" yPosition="553" height="145" width="218"/>
- <diagramEntity xmi:uuid="mmuuid:92007942-e9ae-1eda-b235-cf50afc035e1" name="ANNOTATIONS" modelObject="mmuuid/602761c0-2507-1ed0-a220-9c522c08a85a" xPosition="246" yPosition="707" height="118" width="191"/>
- <diagramEntity xmi:uuid="mmuuid:92f49d40-e9ae-1eda-b235-cf50afc035e1" name="PROPERTIES" modelObject="mmuuid/61588ec0-2507-1ed0-a220-9c522c08a85a" xPosition="246" yPosition="804" height="103" width="193"/>
- <diagramEntity xmi:uuid="mmuuid:92f49d44-e9ae-1eda-b235-cf50afc035e1" name="DATATYPE_TYPE_ENUM" modelObject="mmuuid/cede7b00-2f00-1ed0-a220-9c522c08a85a" xPosition="246" yPosition="916" height="88" width="173"/>
- <diagramEntity xmi:uuid="mmuuid:93d97f02-e9ae-1eda-b235-cf50afc035e1" name="DATATYPE_VARIETY_ENUM" modelObject="mmuuid/eb50a080-2f26-1ed0-a220-9c522c08a85a" xPosition="472" yPosition="932" height="88" width="194"/>
- <diagramEntity xmi:uuid="mmuuid:93d97f05-e9ae-1eda-b235-cf50afc035e1" name="KEY_TYPE_ENUM" modelObject="mmuuid/d7ca13c0-2fad-1ed0-a220-9c522c08a85a" xPosition="698" yPosition="823" height="88" width="135"/>
- <diagramEntity xmi:uuid="mmuuid:94cda302-e9ae-1eda-b235-cf50afc035e1" name="MODEL_TYPE_ENUM" modelObject="mmuuid/9a28e580-393c-1ed0-a220-9c522c08a85a" xPosition="924" yPosition="703" height="88" width="153"/>
- <diagramEntity xmi:uuid="mmuuid:95c1c702-e9ae-1eda-b235-cf50afc035e1" name="NULL_TYPE_ENUM" modelObject="mmuuid/b9315540-2c88-1ed0-a220-9c522c08a85a" xPosition="1150" yPosition="403" height="88" width="142"/>
- <diagramEntity xmi:uuid="mmuuid:96a6a8c3-e9ae-1eda-b235-cf50afc035e1" name="PROC_TYPE_ENUM" modelObject="mmuuid/7cf72d00-2fb4-1ed0-a220-9c522c08a85a" xPosition="1376" yPosition="542" height="88" width="145"/>
- <diagramEntity xmi:uuid="mmuuid:979accc2-e9ae-1eda-b235-cf50afc035e1" name="PROC_PARAM_TYPE_ENUM" modelObject="mmuuid/5eb76440-2d9d-1ed0-a220-9c522c08a85a" xPosition="20" yPosition="647" height="88" width="193"/>
- <diagramEntity xmi:uuid="mmuuid:987fae82-e9ae-1eda-b235-cf50afc035e1" name="SEARCH_TYPE_ENUM" modelObject="mmuuid/7851fe40-2c9b-1ed0-a220-9c522c08a85a" xPosition="20" yPosition="744" height="88" width="159"/>
- <diagramEntity xmi:uuid="mmuuid:9973d280-e9ae-1eda-b235-cf50afc035e1" name="ALL_KEYS" modelObject="mmuuid/488fd300-2dc5-1ed0-a220-9c522c08a85a" xPosition="20" yPosition="841" height="235" width="197"/>
- <diagramEntity xmi:uuid="mmuuid:655eff80-c651-1edb-a31f-f0e78084902c" name="TABLE_TYPE_ENUM" modelObject="mmuuid/6cb35480-c650-1edb-a31f-f0e78084902c" xPosition="246" yPosition="1013" height="88" width="149"/>
- <diagramEntity xmi:uuid="mmuuid:dcfe1a00-c66d-1edb-a31f-f0e78084902c" name="KEY_COLUMNS" modelObject="mmuuid/57d5f780-c66d-1edb-a31f-f0e78084902c" xPosition="472" yPosition="1029" height="118" width="181"/>
- <diagramEntity xmi:uuid="mmuuid:517c7300-d621-1edb-9223-85de9ced5f1c" name="KEY_REFERENCES" xPosition="10" yPosition="10" height="102" width="216"/>
- <diagramEntity xmi:uuid="mmuuid:70733f80-c9c8-1ede-943a-ad14f214907c" name="VDB_INFO" modelObject="mmuuid/f1ca5240-c9c7-1ede-943a-ad14f214907c" xPosition="698" yPosition="920" height="88" width="143"/>
- <diagramEntity xmi:uuid="mmuuid:4a65f140-3ba5-1f33-9f26-c47bba154acc" name="GET_CHAR_RSRC_CNTNTS" modelObject="mmuuid/0d93d1c0-39ce-1f33-9f26-c47bba154acc"/>
- <diagramEntity xmi:uuid="mmuuid:4a65f141-3ba5-1f33-9f26-c47bba154acc" name="GET_BINARY_RSRC_CNTNTS" modelObject="mmuuid/0d93d1c7-39ce-1f33-9f26-c47bba154acc"/>
- <diagramEntity xmi:uuid="mmuuid:4a65f143-3ba5-1f33-9f26-c47bba154acc" name="GET_VDB_RSRC_INFO" modelObject="mmuuid/0e78b387-39ce-1f33-9f26-c47bba154acc" xPosition="54" yPosition="198"/>
- <diagramEntity xmi:uuid="mmuuid:29dbef40-f52c-1039-bb39-85b7143bc62d" modelObject="mmuuid/bbb4b1c5-f529-1039-bb39-85b7143bc62d"/>
- </diagram>
- <diagram xmi:uuid="mmuuid:c18d0dc0-f52b-1039-bb39-85b7143bc62d" type="packageDiagramType" target="mmuuid/bbb4b1c5-f529-1039-bb39-85b7143bc62d">
- <diagramEntity xmi:uuid="mmuuid:2d663100-f538-1039-bb39-85b7143bc62d" modelObject="mmuuid/250df600-f538-1039-bb39-85b7143bc62d" xPosition="20" yPosition="20"/>
- <diagramEntity xmi:uuid="mmuuid:2e5a5500-f538-1039-bb39-85b7143bc62d" modelObject="mmuuid/250df607-f538-1039-bb39-85b7143bc62d" xPosition="40" yPosition="30"/>
- <diagramEntity xmi:uuid="mmuuid:2e5a5501-f538-1039-bb39-85b7143bc62d" modelObject="mmuuid/250df612-f538-1039-bb39-85b7143bc62d" xPosition="60" yPosition="40"/>
- <diagramEntity xmi:uuid="mmuuid:30335ac0-f538-1039-bb39-85b7143bc62d" modelObject="mmuuid/250df622-f538-1039-bb39-85b7143bc62d" xPosition="80" yPosition="50"/>
- <diagramEntity xmi:uuid="mmuuid:31277ec0-f538-1039-bb39-85b7143bc62d" modelObject="mmuuid/250df62f-f538-1039-bb39-85b7143bc62d" xPosition="100" yPosition="60"/>
- <diagramEntity xmi:uuid="mmuuid:320c6080-f538-1039-bb39-85b7143bc62d" modelObject="mmuuid/250df638-f538-1039-bb39-85b7143bc62d" xPosition="120" yPosition="70"/>
- <diagramEntity xmi:uuid="mmuuid:320c6081-f538-1039-bb39-85b7143bc62d" modelObject="mmuuid/250df640-f538-1039-bb39-85b7143bc62d" xPosition="140" yPosition="80"/>
- <diagramEntity xmi:uuid="mmuuid:33008480-f538-1039-bb39-85b7143bc62d" modelObject="mmuuid/250df648-f538-1039-bb39-85b7143bc62d" xPosition="160" yPosition="90"/>
- <diagramEntity xmi:uuid="mmuuid:33f4a880-f538-1039-bb39-85b7143bc62d" modelObject="mmuuid/250df650-f538-1039-bb39-85b7143bc62d" xPosition="180" yPosition="100"/>
- <diagramEntity xmi:uuid="mmuuid:33f4a881-f538-1039-bb39-85b7143bc62d" modelObject="mmuuid/250df658-f538-1039-bb39-85b7143bc62d" xPosition="200" yPosition="110"/>
- <diagramEntity xmi:uuid="mmuuid:34d98a40-f538-1039-bb39-85b7143bc62d" modelObject="mmuuid/250df660-f538-1039-bb39-85b7143bc62d" xPosition="220" yPosition="120"/>
- <diagramEntity xmi:uuid="mmuuid:35cdae40-f538-1039-bb39-85b7143bc62d" modelObject="mmuuid/250df668-f538-1039-bb39-85b7143bc62d" xPosition="240" yPosition="130"/>
- <diagramEntity xmi:uuid="mmuuid:36b29000-f538-1039-bb39-85b7143bc62d" modelObject="mmuuid/250df670-f538-1039-bb39-85b7143bc62d" xPosition="260" yPosition="140"/>
- <diagramEntity xmi:uuid="mmuuid:36b29001-f538-1039-bb39-85b7143bc62d" modelObject="mmuuid/250df678-f538-1039-bb39-85b7143bc62d" xPosition="280" yPosition="150"/>
- <diagramEntity xmi:uuid="mmuuid:42db5b00-f538-1039-bb39-85b7143bc62d" modelObject="mmuuid/250df681-f538-1039-bb39-85b7143bc62d" xPosition="300" yPosition="160"/>
- <diagramEntity xmi:uuid="mmuuid:42db5b01-f538-1039-bb39-85b7143bc62d" modelObject="mmuuid/250df682-f538-1039-bb39-85b7143bc62d" xPosition="320" yPosition="170"/>
- <diagramEntity xmi:uuid="mmuuid:42db5b02-f538-1039-bb39-85b7143bc62d" modelObject="mmuuid/250df683-f538-1039-bb39-85b7143bc62d" xPosition="340" yPosition="180"/>
- <diagramEntity xmi:uuid="mmuuid:42db5b03-f538-1039-bb39-85b7143bc62d" modelObject="mmuuid/250df684-f538-1039-bb39-85b7143bc62d" xPosition="360" yPosition="190"/>
- <diagramEntity xmi:uuid="mmuuid:43c03cc0-f538-1039-bb39-85b7143bc62d" modelObject="mmuuid/250df685-f538-1039-bb39-85b7143bc62d" xPosition="380" yPosition="200"/>
- </diagram>
- </diagram:DiagramContainer>
- <relational:BaseTable xmi:uuid="mmuuid:f1ca5240-c9c7-1ede-943a-ad14f214907c" name="VDB_INFO" nameInSource="VDBS.INDEX" system="true" supportsUpdate="false">
- <columns xmi:uuid="mmuuid:38317240-c9cd-1ede-943a-ad14f214907c" name="NAME" nameInSource="VdbRuntimeName" length="255" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:39259640-c9cd-1ede-943a-ad14f214907c" name="VERSION" nameInSource="VdbRuntimeVersion" length="50" nullable="NO_NULLS" caseSensitive="false" searchability="UNSEARCHABLE" signed="false">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- </relational:BaseTable>
- <relational:Procedure xmi:uuid="mmuuid:0d93d1c0-39ce-1f33-9f26-c47bba154acc" name="GET_CHAR_RSRC_CNTNTS" nameInSource="FILES.INDEX" updateCount="ZERO">
- <parameters xmi:uuid="mmuuid:0d93d1c2-39ce-1f33-9f26-c47bba154acc" name="PATH_IN_VDB" nameInSource="getPathInVdb" length="50">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </parameters>
- <parameters xmi:uuid="mmuuid:0d93d1c1-39ce-1f33-9f26-c47bba154acc" name="TKNS" nameInSource="setTokens" length="50">
- <type href="http://www.metamatrix.com/metamodels/SimpleDatatypes-instance#object"/>
- </parameters>
- <parameters xmi:uuid="mmuuid:0d93d1c6-39ce-1f33-9f26-c47bba154acc" name="TKN_RPLCMNTS" nameInSource="setTokenReplacements" length="50">
- <type href="http://www.metamatrix.com/metamodels/SimpleDatatypes-instance#object"/>
- </parameters>
- <result xmi:uuid="mmuuid:0d93d1c3-39ce-1f33-9f26-c47bba154acc" name="RSRC_CNTNTS" nameInSource="FILES.INDEX">
- <columns xmi:uuid="mmuuid:0d93d1c4-39ce-1f33-9f26-c47bba154acc" name="PATH_IN_VDB" nameInSource="PathInVdb" length="50">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:0d93d1c5-39ce-1f33-9f26-c47bba154acc" name="RSRC_STRM" nameInSource="FileRecord">
- <type href="http://www.metamatrix.com/metamodels/SimpleDatatypes-instance#clob"/>
- </columns>
- </result>
- </relational:Procedure>
- <relational:Procedure xmi:uuid="mmuuid:0d93d1c7-39ce-1f33-9f26-c47bba154acc" name="GET_BINARY_RSRC_CNTNTS" nameInSource="FILES.INDEX" updateCount="ZERO">
- <parameters xmi:uuid="mmuuid:0e78b383-39ce-1f33-9f26-c47bba154acc" name="PATH_IN_VDB" nameInSource="getPathInVdb" length="50">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </parameters>
- <result xmi:uuid="mmuuid:0e78b380-39ce-1f33-9f26-c47bba154acc" name="RSRC_CNTNTS" nameInSource="FILES.INDEX">
- <columns xmi:uuid="mmuuid:0e78b381-39ce-1f33-9f26-c47bba154acc" name="PATH_IN_VDB" nameInSource="PathInVdb" length="50">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:0e78b382-39ce-1f33-9f26-c47bba154acc" name="RSRC_STRM" nameInSource="FileRecord">
- <type href="http://www.metamatrix.com/metamodels/SimpleDatatypes-instance#blob"/>
- </columns>
- </result>
- </relational:Procedure>
- <relational:Procedure xmi:uuid="mmuuid:0e78b387-39ce-1f33-9f26-c47bba154acc" name="GET_VDB_RSRC_INFO" nameInSource="FILES.INDEX" updateCount="ZERO">
- <result xmi:uuid="mmuuid:0e78b388-39ce-1f33-9f26-c47bba154acc" name="RSRC_INFO" nameInSource="FILES.INDEX">
- <columns xmi:uuid="mmuuid:0e78b38a-39ce-1f33-9f26-c47bba154acc" name="PATH_IN_VDB" nameInSource="getPathInVdb" length="50">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:0e78b389-39ce-1f33-9f26-c47bba154acc" name="IS_BINARY" nameInSource="getBinary">
- <type href="http://www.w3.org/2001/XMLSchema#boolean"/>
- </columns>
- </result>
- </relational:Procedure>
- <relational:Schema xmi:uuid="mmuuid:bbb4b1c5-f529-1039-bb39-85b7143bc62d" name="Metabase">
- <tables xsi:type="relational:BaseTable" xmi:uuid="mmuuid:250df600-f538-1039-bb39-85b7143bc62d" name="Models" nameInSource="MDR_MODELS">
- <columns xmi:uuid="mmuuid:250df601-f538-1039-bb39-85b7143bc62d" name="id" nameInSource="ID" nullable="NO_NULLS" uniqueKeys="mmuuid/250df603-f538-1039-bb39-85b7143bc62d">
- <type href="http://www.w3.org/2001/XMLSchema#long"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df605-f538-1039-bb39-85b7143bc62d" name="name" nameInSource="NAME" length="64" nullable="NO_NULLS" uniqueKeys="mmuuid/250df606-f538-1039-bb39-85b7143bc62d">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df604-f538-1039-bb39-85b7143bc62d" name="path" nameInSource="PATH" length="256" nullable="NO_NULLS" uniqueKeys="mmuuid/250df606-f538-1039-bb39-85b7143bc62d">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df602-f538-1039-bb39-85b7143bc62d" name="isMetamodel" nameInSource="IS_METAMODEL" length="1">
- <type href="http://www.w3.org/2001/XMLSchema#boolean"/>
- </columns>
- <primaryKey xmi:uuid="mmuuid:250df603-f538-1039-bb39-85b7143bc62d" name="mKey" nameInSource="M_KEY" columns="mmuuid/250df601-f538-1039-bb39-85b7143bc62d"/>
- <uniqueConstraints xmi:uuid="mmuuid:250df606-f538-1039-bb39-85b7143bc62d" name="mKeyFqName" nameInSource="M_KEY_FQ_NAME" columns="mmuuid/250df604-f538-1039-bb39-85b7143bc62d mmuuid/250df605-f538-1039-bb39-85b7143bc62d"/>
- </tables>
- <tables xsi:type="relational:BaseTable" xmi:uuid="mmuuid:250df607-f538-1039-bb39-85b7143bc62d" name="Objects" nameInSource="MDR_OBJECTS">
- <columns xmi:uuid="mmuuid:250df611-f538-1039-bb39-85b7143bc62d" name="id" nameInSource="ID" nullable="NO_NULLS" uniqueKeys="mmuuid/250df60a-f538-1039-bb39-85b7143bc62d">
- <type href="http://www.w3.org/2001/XMLSchema#long"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df60e-f538-1039-bb39-85b7143bc62d" name="uuid" nameInSource="UUID" length="64" indexes="mmuuid/250df681-f538-1039-bb39-85b7143bc62d">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df610-f538-1039-bb39-85b7143bc62d" name="name" nameInSource="NAME" length="64" nullable="NO_NULLS" indexes="mmuuid/250df682-f538-1039-bb39-85b7143bc62d">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df60f-f538-1039-bb39-85b7143bc62d" name="path" nameInSource="PATH" length="256" nullable="NO_NULLS" indexes="mmuuid/250df682-f538-1039-bb39-85b7143bc62d">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df609-f538-1039-bb39-85b7143bc62d" name="className" length="64" nullable="NO_NULLS" indexes="mmuuid/250df682-f538-1039-bb39-85b7143bc62d">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df60d-f538-1039-bb39-85b7143bc62d" name="classId" nameInSource="CLASS_ID" indexes="mmuuid/250df683-f538-1039-bb39-85b7143bc62d">
- <type href="http://www.w3.org/2001/XMLSchema#long"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df60c-f538-1039-bb39-85b7143bc62d" name="containerId" nameInSource="CONTAINER_ID" indexes="mmuuid/250df684-f538-1039-bb39-85b7143bc62d">
- <type href="http://www.w3.org/2001/XMLSchema#long"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df60b-f538-1039-bb39-85b7143bc62d" name="modelId" nameInSource="MODEL_ID" indexes="mmuuid/250df685-f538-1039-bb39-85b7143bc62d">
- <type href="http://www.w3.org/2001/XMLSchema#long"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df608-f538-1039-bb39-85b7143bc62d" name="isUnresolved" nameInSource="IS_UNRESOLVED" nullable="NO_NULLS">
- <type href="http://www.w3.org/2001/XMLSchema#boolean"/>
- </columns>
- <primaryKey xmi:uuid="mmuuid:250df60a-f538-1039-bb39-85b7143bc62d" name="oKey" nameInSource="O_KEY" columns="mmuuid/250df611-f538-1039-bb39-85b7143bc62d" foreignKeys="mmuuid/250df630-f538-1039-bb39-85b7143bc62d mmuuid/250df636-f538-1039-bb39-85b7143bc62d mmuuid/250df627-f538-1039-bb39-85b7143bc62d mmuuid/250df61c-f538-1039-bb39-85b7143bc62d mmuuid/250df618-f538-1039-bb39-85b7143bc62d mmuuid/250df665-f538-1039-bb39-85b7143bc62d mmuuid/250df64c-f538-1039-bb39-85b7143bc62d mmuuid/250df647-f538-1039-bb39-85b7143bc62d mmuuid/250df67f-f538-1039-bb39-85b7143bc62d mmuuid/250df66e-f538-1039-bb39-85b7143bc62d mmuuid/250df659-f538-1039-bb39-85b7143bc62d mmuuid/250df654-f538-1039-bb39-85b7143bc62d mmuuid/250df63e-f538-1039-bb39-85b7143bc62d mmuuid/250df673-f538-1039-bb39-85b7143bc62d mmuuid/250df629-f538-1039-bb39-85b7143bc62d"/>
- </tables>
- <tables xsi:type="relational:BaseTable" xmi:uuid="mmuuid:250df612-f538-1039-bb39-85b7143bc62d" name="ReferenceFeatures" nameInSource="MDR_REF_FEATURES">
- <columns xmi:uuid="mmuuid:250df614-f538-1039-bb39-85b7143bc62d" name="id" nameInSource="ID" nullable="NO_NULLS" uniqueKeys="mmuuid/250df619-f538-1039-bb39-85b7143bc62d" foreignKeys="mmuuid/250df61c-f538-1039-bb39-85b7143bc62d">
- <type href="http://www.w3.org/2001/XMLSchema#long"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df621-f538-1039-bb39-85b7143bc62d" name="containerId" nameInSource="CONTAINER_ID" uniqueKeys="mmuuid/250df61d-f538-1039-bb39-85b7143bc62d">
- <type href="http://www.w3.org/2001/XMLSchema#long"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df620-f538-1039-bb39-85b7143bc62d" name="index" nameInSource="NDX" nullable="NO_NULLS" uniqueKeys="mmuuid/250df61d-f538-1039-bb39-85b7143bc62d">
- <type href="http://www.w3.org/2001/XMLSchema#int"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df615-f538-1039-bb39-85b7143bc62d" name="datatypeId" nameInSource="DATATYPE_ID" nullable="NO_NULLS" foreignKeys="mmuuid/250df618-f538-1039-bb39-85b7143bc62d">
- <type href="http://www.w3.org/2001/XMLSchema#long"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df617-f538-1039-bb39-85b7143bc62d" name="lowerBound" nameInSource="LOWER_BOUND">
- <type href="http://www.w3.org/2001/XMLSchema#int"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df613-f538-1039-bb39-85b7143bc62d" name="upperBound" nameInSource="UPPER_BOUND">
- <type href="http://www.w3.org/2001/XMLSchema#int"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df61a-f538-1039-bb39-85b7143bc62d" name="isChangeable" nameInSource="IS_CHANGEABLE" nullable="NO_NULLS">
- <type href="http://www.w3.org/2001/XMLSchema#boolean"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df61e-f538-1039-bb39-85b7143bc62d" name="isUnsettable" nameInSource="IS_UNSETTABLE" nullable="NO_NULLS">
- <type href="http://www.w3.org/2001/XMLSchema#boolean"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df616-f538-1039-bb39-85b7143bc62d" name="isContainment" nameInSource="IS_CONTAINMENT" nullable="NO_NULLS">
- <type href="http://www.w3.org/2001/XMLSchema#boolean"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df61b-f538-1039-bb39-85b7143bc62d" name="oppositeId" nameInSource="OPPOSITE_ID" foreignKeys="mmuuid/250df61f-f538-1039-bb39-85b7143bc62d">
- <type href="http://www.w3.org/2001/XMLSchema#long"/>
- </columns>
- <foreignKeys xmi:uuid="mmuuid:250df61c-f538-1039-bb39-85b7143bc62d" name="rfKeyId" nameInSource="RF_KEY_ID" columns="mmuuid/250df614-f538-1039-bb39-85b7143bc62d" uniqueKey="mmuuid/250df60a-f538-1039-bb39-85b7143bc62d"/>
- <foreignKeys xmi:uuid="mmuuid:250df618-f538-1039-bb39-85b7143bc62d" name="rfKeyDatatype" nameInSource="RF_KEY_DATATYPE" columns="mmuuid/250df615-f538-1039-bb39-85b7143bc62d" uniqueKey="mmuuid/250df60a-f538-1039-bb39-85b7143bc62d"/>
- <foreignKeys xmi:uuid="mmuuid:250df61f-f538-1039-bb39-85b7143bc62d" name="rfKeyOpposite" nameInSource="RF_KEY_OPPOSITE" foreignKeyMultiplicity="ONE" columns="mmuuid/250df61b-f538-1039-bb39-85b7143bc62d" uniqueKey="mmuuid/250df619-f538-1039-bb39-85b7143bc62d"/>
- <primaryKey xmi:uuid="mmuuid:250df619-f538-1039-bb39-85b7143bc62d" name="rfKey" nameInSource="RF_KEY" columns="mmuuid/250df614-f538-1039-bb39-85b7143bc62d" foreignKeys="mmuuid/250df632-f538-1039-bb39-85b7143bc62d mmuuid/250df61f-f538-1039-bb39-85b7143bc62d"/>
- <uniqueConstraints xmi:uuid="mmuuid:250df61d-f538-1039-bb39-85b7143bc62d" name="rfKeyIndex" nameInSource="RF_KEY_NDX" columns="mmuuid/250df621-f538-1039-bb39-85b7143bc62d mmuuid/250df620-f538-1039-bb39-85b7143bc62d"/>
- </tables>
- <tables xsi:type="relational:BaseTable" xmi:uuid="mmuuid:250df622-f538-1039-bb39-85b7143bc62d" name="AttributeFeatures" nameInSource="MDR_ATTR_FEATURES">
- <columns xmi:uuid="mmuuid:250df623-f538-1039-bb39-85b7143bc62d" name="id" nameInSource="ID" nullable="NO_NULLS" uniqueKeys="mmuuid/250df62b-f538-1039-bb39-85b7143bc62d" foreignKeys="mmuuid/250df629-f538-1039-bb39-85b7143bc62d">
- <type href="http://www.w3.org/2001/XMLSchema#long"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df62c-f538-1039-bb39-85b7143bc62d" name="containerId" nameInSource="CONTAINER_ID" uniqueKeys="mmuuid/250df62d-f538-1039-bb39-85b7143bc62d">
- <type href="http://www.w3.org/2001/XMLSchema#long"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df626-f538-1039-bb39-85b7143bc62d" name="index" nameInSource="NDX" nullable="NO_NULLS" uniqueKeys="mmuuid/250df62d-f538-1039-bb39-85b7143bc62d">
- <type href="http://www.w3.org/2001/XMLSchema#int"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df628-f538-1039-bb39-85b7143bc62d" name="datatypeId" nameInSource="DATATYPE_ID" nullable="NO_NULLS" foreignKeys="mmuuid/250df627-f538-1039-bb39-85b7143bc62d">
- <type href="http://www.w3.org/2001/XMLSchema#long"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df62e-f538-1039-bb39-85b7143bc62d" name="lowerBound" nameInSource="LOWER_BOUND">
- <type href="http://www.w3.org/2001/XMLSchema#int"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df625-f538-1039-bb39-85b7143bc62d" name="upperBound" nameInSource="UPPER_BOUND">
- <type href="http://www.w3.org/2001/XMLSchema#int"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df62a-f538-1039-bb39-85b7143bc62d" name="isChangeable" nameInSource="IS_CHANGEABLE" nullable="NO_NULLS">
- <type href="http://www.w3.org/2001/XMLSchema#boolean"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df624-f538-1039-bb39-85b7143bc62d" name="isUnsettable" nameInSource="IS_UNSETTABLE" nullable="NO_NULLS">
- <type href="http://www.w3.org/2001/XMLSchema#boolean"/>
- </columns>
- <foreignKeys xmi:uuid="mmuuid:250df629-f538-1039-bb39-85b7143bc62d" name="afKeyId" nameInSource="AF_KEY_ID" columns="mmuuid/250df623-f538-1039-bb39-85b7143bc62d" uniqueKey="mmuuid/250df60a-f538-1039-bb39-85b7143bc62d"/>
- <foreignKeys xmi:uuid="mmuuid:250df627-f538-1039-bb39-85b7143bc62d" name="afKeyDatatype" nameInSource="AF_KEY_DATATYPE" columns="mmuuid/250df628-f538-1039-bb39-85b7143bc62d" uniqueKey="mmuuid/250df60a-f538-1039-bb39-85b7143bc62d"/>
- <primaryKey xmi:uuid="mmuuid:250df62b-f538-1039-bb39-85b7143bc62d" name="afKey" nameInSource="AF_KEY" columns="mmuuid/250df623-f538-1039-bb39-85b7143bc62d" foreignKeys="mmuuid/250df663-f538-1039-bb39-85b7143bc62d mmuuid/250df64e-f538-1039-bb39-85b7143bc62d mmuuid/250df641-f538-1039-bb39-85b7143bc62d mmuuid/250df67c-f538-1039-bb39-85b7143bc62d mmuuid/250df66b-f538-1039-bb39-85b7143bc62d mmuuid/250df65a-f538-1039-bb39-85b7143bc62d mmuuid/250df656-f538-1039-bb39-85b7143bc62d mmuuid/250df63d-f538-1039-bb39-85b7143bc62d mmuuid/250df672-f538-1039-bb39-85b7143bc62d"/>
- <uniqueConstraints xmi:uuid="mmuuid:250df62d-f538-1039-bb39-85b7143bc62d" name="afKeyIndex" nameInSource="AF_KEY_NDX" columns="mmuuid/250df62c-f538-1039-bb39-85b7143bc62d mmuuid/250df626-f538-1039-bb39-85b7143bc62d"/>
- </tables>
- <tables xsi:type="relational:BaseTable" xmi:uuid="mmuuid:250df62f-f538-1039-bb39-85b7143bc62d" name="References" nameInSource="MDR_REFS">
- <columns xmi:uuid="mmuuid:250df634-f538-1039-bb39-85b7143bc62d" name="objectId" nameInSource="OBJECT_ID" nullable="NO_NULLS" uniqueKeys="mmuuid/250df635-f538-1039-bb39-85b7143bc62d" foreignKeys="mmuuid/250df630-f538-1039-bb39-85b7143bc62d">
- <type href="http://www.w3.org/2001/XMLSchema#long"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df631-f538-1039-bb39-85b7143bc62d" name="featureId" nameInSource="FEATURE_ID" nullable="NO_NULLS" uniqueKeys="mmuuid/250df635-f538-1039-bb39-85b7143bc62d" foreignKeys="mmuuid/250df632-f538-1039-bb39-85b7143bc62d">
- <type href="http://www.w3.org/2001/XMLSchema#long"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df633-f538-1039-bb39-85b7143bc62d" name="index" nameInSource="NDX" nullable="NO_NULLS" uniqueKeys="mmuuid/250df635-f538-1039-bb39-85b7143bc62d">
- <type href="http://www.w3.org/2001/XMLSchema#int"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df637-f538-1039-bb39-85b7143bc62d" name="toId" nameInSource="TO_ID" nullable="NO_NULLS" foreignKeys="mmuuid/250df636-f538-1039-bb39-85b7143bc62d">
- <type href="http://www.w3.org/2001/XMLSchema#long"/>
- </columns>
- <foreignKeys xmi:uuid="mmuuid:250df630-f538-1039-bb39-85b7143bc62d" name="rKeyObject" nameInSource="R_KEY_OBJECT" columns="mmuuid/250df634-f538-1039-bb39-85b7143bc62d" uniqueKey="mmuuid/250df60a-f538-1039-bb39-85b7143bc62d"/>
- <foreignKeys xmi:uuid="mmuuid:250df632-f538-1039-bb39-85b7143bc62d" name="rKeyFeature" nameInSource="R_KEY_FEATURE" columns="mmuuid/250df631-f538-1039-bb39-85b7143bc62d" uniqueKey="mmuuid/250df619-f538-1039-bb39-85b7143bc62d"/>
- <foreignKeys xmi:uuid="mmuuid:250df636-f538-1039-bb39-85b7143bc62d" name="rKeyTo" nameInSource="R_KEY_TO" columns="mmuuid/250df637-f538-1039-bb39-85b7143bc62d" uniqueKey="mmuuid/250df60a-f538-1039-bb39-85b7143bc62d"/>
- <primaryKey xmi:uuid="mmuuid:250df635-f538-1039-bb39-85b7143bc62d" name="rKey" nameInSource="R_KEY" columns="mmuuid/250df631-f538-1039-bb39-85b7143bc62d mmuuid/250df634-f538-1039-bb39-85b7143bc62d mmuuid/250df633-f538-1039-bb39-85b7143bc62d"/>
- </tables>
- <tables xsi:type="relational:BaseTable" xmi:uuid="mmuuid:250df638-f538-1039-bb39-85b7143bc62d" name="BooleanAttributes" nameInSource="MDR_BOOLEAN_ATTRS">
- <columns xmi:uuid="mmuuid:250df63a-f538-1039-bb39-85b7143bc62d" name="objectId" nameInSource="OBJECT_ID" nullable="NO_NULLS" uniqueKeys="mmuuid/250df639-f538-1039-bb39-85b7143bc62d" foreignKeys="mmuuid/250df63e-f538-1039-bb39-85b7143bc62d">
- <type href="http://www.w3.org/2001/XMLSchema#long"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df63c-f538-1039-bb39-85b7143bc62d" name="featureId" nameInSource="FEATURE_ID" nullable="NO_NULLS" uniqueKeys="mmuuid/250df639-f538-1039-bb39-85b7143bc62d" foreignKeys="mmuuid/250df63d-f538-1039-bb39-85b7143bc62d">
- <type href="http://www.w3.org/2001/XMLSchema#long"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df63b-f538-1039-bb39-85b7143bc62d" name="index" nameInSource="NDX" nullable="NO_NULLS" uniqueKeys="mmuuid/250df639-f538-1039-bb39-85b7143bc62d">
- <type href="http://www.w3.org/2001/XMLSchema#int"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df63f-f538-1039-bb39-85b7143bc62d" name="value" nameInSource="VALUE" length="-1" nullable="NO_NULLS">
- <type href="http://www.w3.org/2001/XMLSchema#boolean"/>
- </columns>
- <foreignKeys xmi:uuid="mmuuid:250df63e-f538-1039-bb39-85b7143bc62d" name="boaKeyObject" nameInSource="BOA_KEY_OBJECT" columns="mmuuid/250df63a-f538-1039-bb39-85b7143bc62d" uniqueKey="mmuuid/250df60a-f538-1039-bb39-85b7143bc62d"/>
- <foreignKeys xmi:uuid="mmuuid:250df63d-f538-1039-bb39-85b7143bc62d" name="boaKeyFeature" nameInSource="BOA_KEY_FEATURE" columns="mmuuid/250df63c-f538-1039-bb39-85b7143bc62d" uniqueKey="mmuuid/250df62b-f538-1039-bb39-85b7143bc62d"/>
- <primaryKey xmi:uuid="mmuuid:250df639-f538-1039-bb39-85b7143bc62d" name="boaKey" nameInSource="BOA_KEY" columns="mmuuid/250df63c-f538-1039-bb39-85b7143bc62d mmuuid/250df63a-f538-1039-bb39-85b7143bc62d mmuuid/250df63b-f538-1039-bb39-85b7143bc62d"/>
- </tables>
- <tables xsi:type="relational:BaseTable" xmi:uuid="mmuuid:250df640-f538-1039-bb39-85b7143bc62d" name="ByteAttributes" nameInSource="MDR_BYTE_ATTRS">
- <columns xmi:uuid="mmuuid:250df642-f538-1039-bb39-85b7143bc62d" name="objectId" nameInSource="OBJECT_ID" nullable="NO_NULLS" uniqueKeys="mmuuid/250df644-f538-1039-bb39-85b7143bc62d" foreignKeys="mmuuid/250df647-f538-1039-bb39-85b7143bc62d">
- <type href="http://www.w3.org/2001/XMLSchema#long"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df645-f538-1039-bb39-85b7143bc62d" name="featureId" nameInSource="FEATURE_ID" nullable="NO_NULLS" uniqueKeys="mmuuid/250df644-f538-1039-bb39-85b7143bc62d" foreignKeys="mmuuid/250df641-f538-1039-bb39-85b7143bc62d">
- <type href="http://www.w3.org/2001/XMLSchema#long"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df643-f538-1039-bb39-85b7143bc62d" name="index" nameInSource="NDX" nullable="NO_NULLS" uniqueKeys="mmuuid/250df644-f538-1039-bb39-85b7143bc62d">
- <type href="http://www.w3.org/2001/XMLSchema#int"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df646-f538-1039-bb39-85b7143bc62d" name="value" nameInSource="VALUE" length="-1" nullable="NO_NULLS">
- <type href="http://www.w3.org/2001/XMLSchema#byte"/>
- </columns>
- <foreignKeys xmi:uuid="mmuuid:250df647-f538-1039-bb39-85b7143bc62d" name="byaKeyObject" nameInSource="BYA_KEY_OBJECT" columns="mmuuid/250df642-f538-1039-bb39-85b7143bc62d" uniqueKey="mmuuid/250df60a-f538-1039-bb39-85b7143bc62d"/>
- <foreignKeys xmi:uuid="mmuuid:250df641-f538-1039-bb39-85b7143bc62d" name="byaKeyFeature" nameInSource="BYA_KEY_FEATURE" columns="mmuuid/250df645-f538-1039-bb39-85b7143bc62d" uniqueKey="mmuuid/250df62b-f538-1039-bb39-85b7143bc62d"/>
- <primaryKey xmi:uuid="mmuuid:250df644-f538-1039-bb39-85b7143bc62d" name="byaKey" nameInSource="BYA_KEY" columns="mmuuid/250df645-f538-1039-bb39-85b7143bc62d mmuuid/250df642-f538-1039-bb39-85b7143bc62d mmuuid/250df643-f538-1039-bb39-85b7143bc62d"/>
- </tables>
- <tables xsi:type="relational:BaseTable" xmi:uuid="mmuuid:250df648-f538-1039-bb39-85b7143bc62d" name="CharAttributes" nameInSource="MDR_CHAR_ATTRS">
- <columns xmi:uuid="mmuuid:250df64b-f538-1039-bb39-85b7143bc62d" name="objectId" nameInSource="OBJECT_ID" nullable="NO_NULLS" uniqueKeys="mmuuid/250df64a-f538-1039-bb39-85b7143bc62d" foreignKeys="mmuuid/250df64c-f538-1039-bb39-85b7143bc62d">
- <type href="http://www.w3.org/2001/XMLSchema#long"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df64d-f538-1039-bb39-85b7143bc62d" name="featureId" nameInSource="FEATURE_ID" nullable="NO_NULLS" uniqueKeys="mmuuid/250df64a-f538-1039-bb39-85b7143bc62d" foreignKeys="mmuuid/250df64e-f538-1039-bb39-85b7143bc62d">
- <type href="http://www.w3.org/2001/XMLSchema#long"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df64f-f538-1039-bb39-85b7143bc62d" name="index" nameInSource="NDX" nullable="NO_NULLS" uniqueKeys="mmuuid/250df64a-f538-1039-bb39-85b7143bc62d">
- <type href="http://www.w3.org/2001/XMLSchema#int"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df649-f538-1039-bb39-85b7143bc62d" name="value" nameInSource="VALUE" length="1" nullable="NO_NULLS">
- <type href="http://www.metamatrix.com/metamodels/SimpleDatatypes-instance#char"/>
- </columns>
- <foreignKeys xmi:uuid="mmuuid:250df64c-f538-1039-bb39-85b7143bc62d" name="caKeyObject" nameInSource="CA_KEY_OBJECT" columns="mmuuid/250df64b-f538-1039-bb39-85b7143bc62d" uniqueKey="mmuuid/250df60a-f538-1039-bb39-85b7143bc62d"/>
- <foreignKeys xmi:uuid="mmuuid:250df64e-f538-1039-bb39-85b7143bc62d" name="caKeyFeature" nameInSource="CA_KEY_FEATURE" columns="mmuuid/250df64d-f538-1039-bb39-85b7143bc62d" uniqueKey="mmuuid/250df62b-f538-1039-bb39-85b7143bc62d"/>
- <primaryKey xmi:uuid="mmuuid:250df64a-f538-1039-bb39-85b7143bc62d" name="caKey" nameInSource="CA_KEY" columns="mmuuid/250df64d-f538-1039-bb39-85b7143bc62d mmuuid/250df64b-f538-1039-bb39-85b7143bc62d mmuuid/250df64f-f538-1039-bb39-85b7143bc62d"/>
- </tables>
- <tables xsi:type="relational:BaseTable" xmi:uuid="mmuuid:250df650-f538-1039-bb39-85b7143bc62d" name="DoubleAttributes" nameInSource="MDR_DOUBLE_ATTRS">
- <columns xmi:uuid="mmuuid:250df652-f538-1039-bb39-85b7143bc62d" name="objectId" nameInSource="OBJECT_ID" nullable="NO_NULLS" uniqueKeys="mmuuid/250df653-f538-1039-bb39-85b7143bc62d" foreignKeys="mmuuid/250df654-f538-1039-bb39-85b7143bc62d">
- <type href="http://www.w3.org/2001/XMLSchema#long"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df657-f538-1039-bb39-85b7143bc62d" name="featureId" nameInSource="FEATURE_ID" nullable="NO_NULLS" uniqueKeys="mmuuid/250df653-f538-1039-bb39-85b7143bc62d" foreignKeys="mmuuid/250df656-f538-1039-bb39-85b7143bc62d">
- <type href="http://www.w3.org/2001/XMLSchema#long"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df651-f538-1039-bb39-85b7143bc62d" name="index" nameInSource="NDX" nullable="NO_NULLS" uniqueKeys="mmuuid/250df653-f538-1039-bb39-85b7143bc62d">
- <type href="http://www.w3.org/2001/XMLSchema#int"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df655-f538-1039-bb39-85b7143bc62d" name="value" nameInSource="VALUE" length="-1" nullable="NO_NULLS">
- <type href="http://www.w3.org/2001/XMLSchema#double"/>
- </columns>
- <foreignKeys xmi:uuid="mmuuid:250df654-f538-1039-bb39-85b7143bc62d" name="daKeyObject" nameInSource="DA_KEY_OBJECT" columns="mmuuid/250df652-f538-1039-bb39-85b7143bc62d" uniqueKey="mmuuid/250df60a-f538-1039-bb39-85b7143bc62d"/>
- <foreignKeys xmi:uuid="mmuuid:250df656-f538-1039-bb39-85b7143bc62d" name="daKeyFeature" nameInSource="DA_KEY_FEATURE" columns="mmuuid/250df657-f538-1039-bb39-85b7143bc62d" uniqueKey="mmuuid/250df62b-f538-1039-bb39-85b7143bc62d"/>
- <primaryKey xmi:uuid="mmuuid:250df653-f538-1039-bb39-85b7143bc62d" name="daKey" nameInSource="DA_KEY" columns="mmuuid/250df657-f538-1039-bb39-85b7143bc62d mmuuid/250df652-f538-1039-bb39-85b7143bc62d mmuuid/250df651-f538-1039-bb39-85b7143bc62d"/>
- </tables>
- <tables xsi:type="relational:BaseTable" xmi:uuid="mmuuid:250df658-f538-1039-bb39-85b7143bc62d" name="FloatAttributes" nameInSource="MDR_FLOAT_ATTRS">
- <columns xmi:uuid="mmuuid:250df65e-f538-1039-bb39-85b7143bc62d" name="objectId" nameInSource="OBJECT_ID" nullable="NO_NULLS" uniqueKeys="mmuuid/250df65b-f538-1039-bb39-85b7143bc62d" foreignKeys="mmuuid/250df659-f538-1039-bb39-85b7143bc62d">
- <type href="http://www.w3.org/2001/XMLSchema#long"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df65d-f538-1039-bb39-85b7143bc62d" name="featureId" nameInSource="FEATURE_ID" nullable="NO_NULLS" uniqueKeys="mmuuid/250df65b-f538-1039-bb39-85b7143bc62d" foreignKeys="mmuuid/250df65a-f538-1039-bb39-85b7143bc62d">
- <type href="http://www.w3.org/2001/XMLSchema#long"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df65f-f538-1039-bb39-85b7143bc62d" name="index" nameInSource="NDX" nullable="NO_NULLS" uniqueKeys="mmuuid/250df65b-f538-1039-bb39-85b7143bc62d">
- <type href="http://www.w3.org/2001/XMLSchema#int"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df65c-f538-1039-bb39-85b7143bc62d" name="value" nameInSource="VALUE" length="-1" nullable="NO_NULLS">
- <type href="http://www.w3.org/2001/XMLSchema#float"/>
- </columns>
- <foreignKeys xmi:uuid="mmuuid:250df659-f538-1039-bb39-85b7143bc62d" name="faKeyObject" nameInSource="FA_KEY_OBJECT" columns="mmuuid/250df65e-f538-1039-bb39-85b7143bc62d" uniqueKey="mmuuid/250df60a-f538-1039-bb39-85b7143bc62d"/>
- <foreignKeys xmi:uuid="mmuuid:250df65a-f538-1039-bb39-85b7143bc62d" name="faKeyFeature" nameInSource="FA_KEY_FEATURE" columns="mmuuid/250df65d-f538-1039-bb39-85b7143bc62d" uniqueKey="mmuuid/250df62b-f538-1039-bb39-85b7143bc62d"/>
- <primaryKey xmi:uuid="mmuuid:250df65b-f538-1039-bb39-85b7143bc62d" name="faKey" nameInSource="FA_KEY" columns="mmuuid/250df65d-f538-1039-bb39-85b7143bc62d mmuuid/250df65e-f538-1039-bb39-85b7143bc62d mmuuid/250df65f-f538-1039-bb39-85b7143bc62d"/>
- </tables>
- <tables xsi:type="relational:BaseTable" xmi:uuid="mmuuid:250df660-f538-1039-bb39-85b7143bc62d" name="IntAttributes" nameInSource="MDR_INT_ATTRS">
- <columns xmi:uuid="mmuuid:250df662-f538-1039-bb39-85b7143bc62d" name="objectId" nameInSource="OBJECT_ID" nullable="NO_NULLS" uniqueKeys="mmuuid/250df661-f538-1039-bb39-85b7143bc62d" foreignKeys="mmuuid/250df665-f538-1039-bb39-85b7143bc62d">
- <type href="http://www.w3.org/2001/XMLSchema#long"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df664-f538-1039-bb39-85b7143bc62d" name="featureId" nameInSource="FEATURE_ID" nullable="NO_NULLS" uniqueKeys="mmuuid/250df661-f538-1039-bb39-85b7143bc62d" foreignKeys="mmuuid/250df663-f538-1039-bb39-85b7143bc62d">
- <type href="http://www.w3.org/2001/XMLSchema#long"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df667-f538-1039-bb39-85b7143bc62d" name="index" nameInSource="NDX" nullable="NO_NULLS" uniqueKeys="mmuuid/250df661-f538-1039-bb39-85b7143bc62d">
- <type href="http://www.w3.org/2001/XMLSchema#int"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df666-f538-1039-bb39-85b7143bc62d" name="value" nameInSource="VALUE" length="-1" nullable="NO_NULLS">
- <type href="http://www.w3.org/2001/XMLSchema#int"/>
- </columns>
- <foreignKeys xmi:uuid="mmuuid:250df665-f538-1039-bb39-85b7143bc62d" name="iaKeyObject" nameInSource="IA_KEY_OBJECT" columns="mmuuid/250df662-f538-1039-bb39-85b7143bc62d" uniqueKey="mmuuid/250df60a-f538-1039-bb39-85b7143bc62d"/>
- <foreignKeys xmi:uuid="mmuuid:250df663-f538-1039-bb39-85b7143bc62d" name="iaKeyFeature" nameInSource="IA_KEY_FEATURE" columns="mmuuid/250df664-f538-1039-bb39-85b7143bc62d" uniqueKey="mmuuid/250df62b-f538-1039-bb39-85b7143bc62d"/>
- <primaryKey xmi:uuid="mmuuid:250df661-f538-1039-bb39-85b7143bc62d" name="iaKey" nameInSource="IA_KEY" columns="mmuuid/250df664-f538-1039-bb39-85b7143bc62d mmuuid/250df662-f538-1039-bb39-85b7143bc62d mmuuid/250df667-f538-1039-bb39-85b7143bc62d"/>
- </tables>
- <tables xsi:type="relational:BaseTable" xmi:uuid="mmuuid:250df668-f538-1039-bb39-85b7143bc62d" name="LongAttributes" nameInSource="MDR_LONG_ATTRS">
- <columns xmi:uuid="mmuuid:250df66d-f538-1039-bb39-85b7143bc62d" name="objectId" nameInSource="OBJECT_ID" nullable="NO_NULLS" uniqueKeys="mmuuid/250df66a-f538-1039-bb39-85b7143bc62d" foreignKeys="mmuuid/250df66e-f538-1039-bb39-85b7143bc62d">
- <type href="http://www.w3.org/2001/XMLSchema#long"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df66c-f538-1039-bb39-85b7143bc62d" name="featureId" nameInSource="FEATURE_ID" nullable="NO_NULLS" uniqueKeys="mmuuid/250df66a-f538-1039-bb39-85b7143bc62d" foreignKeys="mmuuid/250df66b-f538-1039-bb39-85b7143bc62d">
- <type href="http://www.w3.org/2001/XMLSchema#long"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df66f-f538-1039-bb39-85b7143bc62d" name="index" nameInSource="NDX" nullable="NO_NULLS" uniqueKeys="mmuuid/250df66a-f538-1039-bb39-85b7143bc62d">
- <type href="http://www.w3.org/2001/XMLSchema#int"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df669-f538-1039-bb39-85b7143bc62d" name="value" nameInSource="VALUE" length="-1" nullable="NO_NULLS">
- <type href="http://www.w3.org/2001/XMLSchema#long"/>
- </columns>
- <foreignKeys xmi:uuid="mmuuid:250df66e-f538-1039-bb39-85b7143bc62d" name="laKeyObject" nameInSource="LA_KEY_OBJECT" columns="mmuuid/250df66d-f538-1039-bb39-85b7143bc62d" uniqueKey="mmuuid/250df60a-f538-1039-bb39-85b7143bc62d"/>
- <foreignKeys xmi:uuid="mmuuid:250df66b-f538-1039-bb39-85b7143bc62d" name="laKeyFeature" nameInSource="LA_KEY_FEATURE" columns="mmuuid/250df66c-f538-1039-bb39-85b7143bc62d" uniqueKey="mmuuid/250df62b-f538-1039-bb39-85b7143bc62d"/>
- <primaryKey xmi:uuid="mmuuid:250df66a-f538-1039-bb39-85b7143bc62d" name="laKey" nameInSource="LA_KEY" columns="mmuuid/250df66c-f538-1039-bb39-85b7143bc62d mmuuid/250df66d-f538-1039-bb39-85b7143bc62d mmuuid/250df66f-f538-1039-bb39-85b7143bc62d"/>
- </tables>
- <tables xsi:type="relational:BaseTable" xmi:uuid="mmuuid:250df670-f538-1039-bb39-85b7143bc62d" name="ShortAttributes" nameInSource="MDR_SHORT_ATTRS">
- <columns xmi:uuid="mmuuid:250df675-f538-1039-bb39-85b7143bc62d" name="objectId" nameInSource="OBJECT_ID" nullable="NO_NULLS" uniqueKeys="mmuuid/250df676-f538-1039-bb39-85b7143bc62d" foreignKeys="mmuuid/250df673-f538-1039-bb39-85b7143bc62d">
- <type href="http://www.w3.org/2001/XMLSchema#long"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df677-f538-1039-bb39-85b7143bc62d" name="featureId" nameInSource="FEATURE_ID" nullable="NO_NULLS" uniqueKeys="mmuuid/250df676-f538-1039-bb39-85b7143bc62d" foreignKeys="mmuuid/250df672-f538-1039-bb39-85b7143bc62d">
- <type href="http://www.w3.org/2001/XMLSchema#long"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df674-f538-1039-bb39-85b7143bc62d" name="index" nameInSource="NDX" nullable="NO_NULLS" uniqueKeys="mmuuid/250df676-f538-1039-bb39-85b7143bc62d">
- <type href="http://www.w3.org/2001/XMLSchema#int"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df671-f538-1039-bb39-85b7143bc62d" name="value" nameInSource="VALUE" length="-1" nullable="NO_NULLS">
- <type href="http://www.w3.org/2001/XMLSchema#short"/>
- </columns>
- <foreignKeys xmi:uuid="mmuuid:250df673-f538-1039-bb39-85b7143bc62d" name="shaKeyObject" nameInSource="SHA_KEY_OBJECT" columns="mmuuid/250df675-f538-1039-bb39-85b7143bc62d" uniqueKey="mmuuid/250df60a-f538-1039-bb39-85b7143bc62d"/>
- <foreignKeys xmi:uuid="mmuuid:250df672-f538-1039-bb39-85b7143bc62d" name="shaKeyFeature" nameInSource="SHA_KEY_FEATURE" columns="mmuuid/250df677-f538-1039-bb39-85b7143bc62d" uniqueKey="mmuuid/250df62b-f538-1039-bb39-85b7143bc62d"/>
- <primaryKey xmi:uuid="mmuuid:250df676-f538-1039-bb39-85b7143bc62d" name="shaKey" nameInSource="SHA_KEY" columns="mmuuid/250df677-f538-1039-bb39-85b7143bc62d mmuuid/250df675-f538-1039-bb39-85b7143bc62d mmuuid/250df674-f538-1039-bb39-85b7143bc62d"/>
- </tables>
- <tables xsi:type="relational:BaseTable" xmi:uuid="mmuuid:250df678-f538-1039-bb39-85b7143bc62d" name="StringAttributes" nameInSource="MDR_STRING_ATTRS">
- <columns xmi:uuid="mmuuid:250df680-f538-1039-bb39-85b7143bc62d" name="objectId" nameInSource="OBJECT_ID" nullable="NO_NULLS" uniqueKeys="mmuuid/250df67e-f538-1039-bb39-85b7143bc62d" foreignKeys="mmuuid/250df67f-f538-1039-bb39-85b7143bc62d">
- <type href="http://www.w3.org/2001/XMLSchema#long"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df67b-f538-1039-bb39-85b7143bc62d" name="featureId" nameInSource="FEATURE_ID" nullable="NO_NULLS" uniqueKeys="mmuuid/250df67e-f538-1039-bb39-85b7143bc62d" foreignKeys="mmuuid/250df67c-f538-1039-bb39-85b7143bc62d">
- <type href="http://www.w3.org/2001/XMLSchema#long"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df679-f538-1039-bb39-85b7143bc62d" name="index" nameInSource="NDX" nullable="NO_NULLS" uniqueKeys="mmuuid/250df67e-f538-1039-bb39-85b7143bc62d">
- <type href="http://www.w3.org/2001/XMLSchema#int"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df67d-f538-1039-bb39-85b7143bc62d" name="value" nameInSource="VALUE" length="4000" nullable="NO_NULLS">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <columns xmi:uuid="mmuuid:250df67a-f538-1039-bb39-85b7143bc62d" name="clob" nameInSource="CLOB" length="2147483647" nullable="NO_NULLS">
- <type href="http://www.w3.org/2001/XMLSchema#string"/>
- </columns>
- <foreignKeys xmi:uuid="mmuuid:250df67f-f538-1039-bb39-85b7143bc62d" name="staKeyObject" nameInSource="STA_KEY_OBJECT" columns="mmuuid/250df680-f538-1039-bb39-85b7143bc62d" uniqueKey="mmuuid/250df60a-f538-1039-bb39-85b7143bc62d"/>
- <foreignKeys xmi:uuid="mmuuid:250df67c-f538-1039-bb39-85b7143bc62d" name="staKeyFeature" nameInSource="STA_KEY_FEATURE" columns="mmuuid/250df67b-f538-1039-bb39-85b7143bc62d" uniqueKey="mmuuid/250df62b-f538-1039-bb39-85b7143bc62d"/>
- <primaryKey xmi:uuid="mmuuid:250df67e-f538-1039-bb39-85b7143bc62d" name="staKey" nameInSource="STA_KEY" columns="mmuuid/250df67b-f538-1039-bb39-85b7143bc62d mmuuid/250df680-f538-1039-bb39-85b7143bc62d mmuuid/250df679-f538-1039-bb39-85b7143bc62d"/>
- </tables>
- <indexes xmi:uuid="mmuuid:250df681-f538-1039-bb39-85b7143bc62d" name="UuidIndex" nameInSource="UUID_INDEX" columns="mmuuid/250df60e-f538-1039-bb39-85b7143bc62d"/>
- <indexes xmi:uuid="mmuuid:250df682-f538-1039-bb39-85b7143bc62d" name="NoUuidIndex" nameInSource="NO_UUID_INDEX" columns="mmuuid/250df610-f538-1039-bb39-85b7143bc62d mmuuid/250df60f-f538-1039-bb39-85b7143bc62d mmuuid/250df609-f538-1039-bb39-85b7143bc62d"/>
- <indexes xmi:uuid="mmuuid:250df683-f538-1039-bb39-85b7143bc62d" name="ClassIdIndex" nameInSource="CLASS_ID_INDEX" columns="mmuuid/250df60d-f538-1039-bb39-85b7143bc62d"/>
- <indexes xmi:uuid="mmuuid:250df684-f538-1039-bb39-85b7143bc62d" name="ContainerIdIndex" nameInSource="CONTAINER_ID_INDEX" columns="mmuuid/250df60c-f538-1039-bb39-85b7143bc62d"/>
- <indexes xmi:uuid="mmuuid:250df685-f538-1039-bb39-85b7143bc62d" name="ModelIndex" nameInSource="MODEL_INDEX" columns="mmuuid/250df60b-f538-1039-bb39-85b7143bc62d"/>
- </relational:Schema>
-</xmi:XMI>
Deleted: trunk/metadata/src/test/java/com/metamatrix/connector/metadata/TestPropertyFileObjectSource.java
===================================================================
--- trunk/metadata/src/test/java/com/metamatrix/connector/metadata/TestPropertyFileObjectSource.java 2009-10-25 02:00:37 UTC (rev 1537)
+++ trunk/metadata/src/test/java/com/metamatrix/connector/metadata/TestPropertyFileObjectSource.java 2009-10-25 02:03:40 UTC (rev 1538)
@@ -1,109 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package com.metamatrix.connector.metadata;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.teiid.connector.metadata.PropertyFileObjectSource;
-
-import junit.framework.TestCase;
-import com.metamatrix.core.MetaMatrixRuntimeException;
-
-public class TestPropertyFileObjectSource extends TestCase {
-
- public TestPropertyFileObjectSource(String name) {
- super(name);
- }
-
- public void testNoneExistentFile() {
- PropertyFileObjectSource source = new PropertyFileObjectSource(null);
- String fileName = "fakeFiles/fake_does_not_exist.properties"; //$NON-NLS-1$
- try {
- source.getObjects(fileName, null);
- fail();
- } catch (MetaMatrixRuntimeException e) {
- assertEquals(fileName + " file not found", e.getMessage()); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- public void testNoProperties() {
- PropertyFileObjectSource source = new PropertyFileObjectSource(null);
- Iterator iterator = source.getObjects("fakeFiles/fake0.properties", null).iterator(); //$NON-NLS-1$
- assertFalse(iterator.hasNext());
- }
-
- public void testOneProperty() {
- PropertyFileObjectSource source = new PropertyFileObjectSource(null);
- Iterator iterator = source.getObjects("fakeFiles/fake1.properties", null).iterator(); //$NON-NLS-1$
- assertTrue(iterator.hasNext());
- Map.Entry next = (Map.Entry) iterator.next();
- assertEquals(new Integer(1), next.getKey());
- assertEquals("value1", (String)next.getValue()); //$NON-NLS-1$
- assertFalse(iterator.hasNext());
- }
-
- public void testTwoProperties() {
- PropertyFileObjectSource source = new PropertyFileObjectSource(null);
- Iterator iterator = source.getObjects("fakeFiles/fake2.properties", null).iterator(); //$NON-NLS-1$
- assertTrue(iterator.hasNext());
- Map.Entry next = (Map.Entry) iterator.next();
- Integer key1 = (Integer) next.getKey();
- if (key1.equals(new Integer(1))) {
- assertEquals(new Integer(1), next.getKey());
- assertEquals("value1", (String)next.getValue()); //$NON-NLS-1$
- assertTrue(iterator.hasNext());
- next = (Map.Entry) iterator.next();
- assertEquals(new Integer(2), next.getKey());
- assertEquals("value2", (String)next.getValue()); //$NON-NLS-1$
- assertFalse(iterator.hasNext());
- } else if (key1.equals(new Integer(2))){
- assertEquals(new Integer(2), next.getKey());
- assertEquals("value2", (String)next.getValue()); //$NON-NLS-1$
- assertTrue(iterator.hasNext());
- next = (Map.Entry) iterator.next();
- assertEquals(new Integer(1), next.getKey());
- assertEquals("value1", (String)next.getValue()); //$NON-NLS-1$
- assertFalse(iterator.hasNext());
- } else {
- fail();
- }
- }
-
- public void testCriteria() {
- PropertyFileObjectSource source = new PropertyFileObjectSource(null);
- try {
- source.getObjects("fakeFiles/fake1.properties", helpGetCriteria()); //$NON-NLS-1$
- fail();
- } catch (UnsupportedOperationException e) {
- assertEquals("Criteria is not supported", e.getMessage()); //$NON-NLS-1$
- }
- }
-
- private Map helpGetCriteria() {
- Map result = new HashMap();
- result.put("key", "key1"); //$NON-NLS-1$ //$NON-NLS-2$
- return result;
- }
-}
Modified: trunk/metadata/src/test/java/com/metamatrix/core/util/TestCharOperation.java
===================================================================
--- trunk/metadata/src/test/java/com/metamatrix/core/util/TestCharOperation.java 2009-10-25 02:00:37 UTC (rev 1537)
+++ trunk/metadata/src/test/java/com/metamatrix/core/util/TestCharOperation.java 2009-10-25 02:03:40 UTC (rev 1538)
@@ -22,7 +22,7 @@
package com.metamatrix.core.util;
-import org.teiid.metadata.index.CharOperation;
+import org.teiid.internal.core.index.CharOperation;
import junit.framework.TestCase;
Modified: trunk/metadata/src/test/java/com/metamatrix/metadata/runtime/FakeMetadataService.java
===================================================================
--- trunk/metadata/src/test/java/com/metamatrix/metadata/runtime/FakeMetadataService.java 2009-10-25 02:00:37 UTC (rev 1537)
+++ trunk/metadata/src/test/java/com/metamatrix/metadata/runtime/FakeMetadataService.java 2009-10-25 02:03:40 UTC (rev 1538)
@@ -28,14 +28,10 @@
import java.util.Map;
import java.util.Properties;
-import org.teiid.connector.metadata.IndexFile;
-import org.teiid.connector.metadata.MetadataConnectorConstants;
-import org.teiid.connector.metadata.MultiObjectSource;
-import org.teiid.connector.metadata.PropertyFileObjectSource;
import org.teiid.connector.metadata.runtime.DatatypeRecordImpl;
import org.teiid.metadata.CompositeMetadataStore;
import org.teiid.metadata.TransformationMetadata;
-import org.teiid.metadata.index.IndexMetadataStore;
+import org.teiid.metadata.index.IndexMetadataFactory;
import com.metamatrix.api.exception.MetaMatrixComponentException;
import com.metamatrix.common.application.ApplicationEnvironment;
@@ -43,9 +39,7 @@
import com.metamatrix.common.application.exception.ApplicationInitializationException;
import com.metamatrix.common.application.exception.ApplicationLifecycleException;
import com.metamatrix.common.vdb.api.VDBArchive;
-import com.metamatrix.connector.metadata.internal.IObjectSource;
import com.metamatrix.core.util.TempDirectoryMonitor;
-import com.metamatrix.dqp.service.FakeVDBService;
import com.metamatrix.dqp.service.MetadataService;
import com.metamatrix.metadata.runtime.api.MetadataSource;
import com.metamatrix.query.metadata.QueryMetadataInterface;
@@ -57,7 +51,7 @@
public FakeMetadataService(URL vdbFile) throws IOException {
TempDirectoryMonitor.turnOn();
MetadataSource source = new VDBArchive(vdbFile.openStream());
- compositeMetadataStore = new CompositeMetadataStore(Arrays.asList(new IndexMetadataStore(source)), source);
+ compositeMetadataStore = new CompositeMetadataStore(Arrays.asList(new IndexMetadataFactory(source).getMetadataStore()), source);
}
public void clear() {
@@ -80,16 +74,8 @@
return new TransformationMetadata(compositeMetadataStore);
}
- public IObjectSource getMetadataObjectSource(String vdbName,String vdbVersion) throws MetaMatrixComponentException {
-
- // build up sources to be used by the index connector
- IObjectSource indexFile = new IndexFile(compositeMetadataStore, vdbName, vdbVersion, new FakeVDBService());
-
- PropertyFileObjectSource propertyFileSource = new PropertyFileObjectSource();
- IObjectSource multiObjectSource = new MultiObjectSource(indexFile, MetadataConnectorConstants.PROPERTIES_FILE_EXTENSION,propertyFileSource);
-
- // return an adapter object that has access to all sources
- return multiObjectSource;
+ public CompositeMetadataStore getMetadataObjectSource(String vdbName,String vdbVersion) throws MetaMatrixComponentException {
+ return compositeMetadataStore;
}
@Override
15 years, 1 month
teiid SVN: r1537 - in trunk/metadata/src/main/java/org/teiid/metadata: index and 1 other directory.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2009-10-24 22:00:37 -0400 (Sat, 24 Oct 2009)
New Revision: 1537
Added:
trunk/metadata/src/main/java/org/teiid/metadata/index/IndexMetadataFactory.java
trunk/metadata/src/main/java/org/teiid/metadata/index/MetadataConstants.java
trunk/metadata/src/main/java/org/teiid/metadata/index/RuntimeMetadataPlugin.java
trunk/metadata/src/main/java/org/teiid/metadata/index/TransformationRecordImpl.java
Removed:
trunk/metadata/src/main/java/org/teiid/metadata/CompositeMetadataStore.java
trunk/metadata/src/main/java/org/teiid/metadata/ConnectorMetadataStore.java
trunk/metadata/src/main/java/org/teiid/metadata/QueryMetadataCache.java
trunk/metadata/src/main/java/org/teiid/metadata/RuntimeMetadataPlugin.java
trunk/metadata/src/main/java/org/teiid/metadata/TransformationMetadata.java
trunk/metadata/src/main/java/org/teiid/metadata/index/CharOperation.java
trunk/metadata/src/main/java/org/teiid/metadata/index/IndexMetadataStore.java
Modified:
trunk/metadata/src/main/java/org/teiid/metadata/index/IndexConstants.java
trunk/metadata/src/main/java/org/teiid/metadata/index/ModelFileUtil.java
trunk/metadata/src/main/java/org/teiid/metadata/index/RecordFactory.java
trunk/metadata/src/main/java/org/teiid/metadata/index/SimpleIndexUtil.java
trunk/metadata/src/main/java/org/teiid/metadata/index/VDBMetadataFactory.java
Log:
TEIID-871 TEIID-792 TEIID-102 TEIID-254 TEIID-869 TEIID-875 further clean up of metadata related logic. The index connector has been removed and the system virtual views promoted to physical tables. some of the tables/procedures have been removed. and minor changes have been made to MMDatabaseMetadata queries.
Deleted: trunk/metadata/src/main/java/org/teiid/metadata/CompositeMetadataStore.java
===================================================================
--- trunk/metadata/src/main/java/org/teiid/metadata/CompositeMetadataStore.java 2009-10-24 18:07:35 UTC (rev 1536)
+++ trunk/metadata/src/main/java/org/teiid/metadata/CompositeMetadataStore.java 2009-10-25 02:00:37 UTC (rev 1537)
@@ -1,174 +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.metadata;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-import org.teiid.connector.metadata.runtime.AbstractMetadataRecord;
-import org.teiid.connector.metadata.runtime.ColumnRecordImpl;
-import org.teiid.connector.metadata.runtime.ModelRecordImpl;
-import org.teiid.connector.metadata.runtime.ProcedureRecordImpl;
-import org.teiid.connector.metadata.runtime.PropertyRecordImpl;
-import org.teiid.connector.metadata.runtime.TableRecordImpl;
-
-import com.metamatrix.api.exception.MetaMatrixComponentException;
-import com.metamatrix.api.exception.query.QueryMetadataException;
-import com.metamatrix.core.MetaMatrixCoreException;
-import com.metamatrix.core.util.StringUtil;
-import com.metamatrix.metadata.runtime.api.MetadataSource;
-import com.metamatrix.query.metadata.MetadataStore;
-
-public class CompositeMetadataStore implements MetadataStore {
-
- private List<? extends MetadataStore> metadataStores;
- private MetadataSource metadataSource;
- private Map<String, MetadataStore> storeMap;
-
- public CompositeMetadataStore(List<? extends MetadataStore> metadataStores, MetadataSource metadataSource) {
- this.metadataStores = metadataStores;
- this.metadataSource = metadataSource;
- this.storeMap = new HashMap<String, MetadataStore>();
- for (MetadataStore metadataStore : metadataStores) {
- for (String model : metadataStore.getModelNames()) {
- storeMap.put(model.toUpperCase(), metadataStore);
- }
- }
- }
-
- @Override
- public Collection<String> getModelNames() {
- return storeMap.keySet();
- }
-
- @Override
- public ModelRecordImpl getModel(String fullName)
- throws QueryMetadataException, MetaMatrixComponentException {
- return getMetadataStore(fullName).getModel(fullName);
- }
-
- @Override
- public ColumnRecordImpl findElement(String fullName)
- throws QueryMetadataException, MetaMatrixComponentException {
- List<String> tokens = StringUtil.getTokens(fullName, TransformationMetadata.DELIMITER_STRING);
- if (tokens.size() < 3) {
- throw new QueryMetadataException(fullName+TransformationMetadata.NOT_EXISTS_MESSAGE);
- }
- return getMetadataStore(tokens.get(0)).findElement(fullName);
- }
-
- @Override
- public TableRecordImpl findGroup(String fullName)
- throws QueryMetadataException, MetaMatrixComponentException {
- List<String> tokens = StringUtil.getTokens(fullName, TransformationMetadata.DELIMITER_STRING);
- if (tokens.size() < 2) {
- throw new QueryMetadataException(fullName+TransformationMetadata.NOT_EXISTS_MESSAGE);
- }
- return getMetadataStore(tokens.get(0)).findGroup(fullName);
- }
-
- @Override
- public Collection<String> getGroupsForPartialName(String partialGroupName)
- throws MetaMatrixComponentException, QueryMetadataException {
- List<String> result = new LinkedList<String>();
- for (MetadataStore store : metadataStores) {
- result.addAll(store.getGroupsForPartialName(partialGroupName));
- }
- return result;
- }
-
- @Override
- public Collection getXMLTempGroups(TableRecordImpl table)
- throws MetaMatrixComponentException {
- return getMetadataStore(table.getModelName()).getXMLTempGroups(table);
- }
-
- @Override
- public ProcedureRecordImpl getStoredProcedure(
- String fullyQualifiedProcedureName)
- throws MetaMatrixComponentException, QueryMetadataException {
- List<String> tokens = StringUtil.getTokens(fullyQualifiedProcedureName, TransformationMetadata.DELIMITER_STRING);
- if (tokens.size() < 2) {
- throw new QueryMetadataException(fullyQualifiedProcedureName+TransformationMetadata.NOT_EXISTS_MESSAGE);
- }
- return getMetadataStore(tokens.get(0)).getStoredProcedure(fullyQualifiedProcedureName);
- }
-
- @Override
- public Collection<? extends AbstractMetadataRecord> findMetadataRecords(char recordType,
- String entityName, boolean isPartialName)
- throws MetaMatrixComponentException {
- LinkedList<AbstractMetadataRecord> result = new LinkedList<AbstractMetadataRecord>();
- for (MetadataStore store : metadataStores) {
- Collection<? extends AbstractMetadataRecord> results = store.findMetadataRecords(recordType, entityName, isPartialName);
- if (!results.isEmpty() && !isPartialName) {
- return results;
- }
- result.addAll(results);
- }
- return result;
- }
-
- public boolean postProcessFindMetadataRecords() {
- for (MetadataStore store : metadataStores) {
- if (store.postProcessFindMetadataRecords()) {
- return true;
- }
- }
- return false;
- }
-
- @Override
- public Collection<AbstractMetadataRecord> findMetadataRecords(String indexName,
- String pattern, boolean isPrefix,
- boolean isCaseSensitive) throws MetaMatrixCoreException {
- LinkedList<AbstractMetadataRecord> result = new LinkedList<AbstractMetadataRecord>();
- for (MetadataStore store : metadataStores) {
- Collection<? extends AbstractMetadataRecord> results = store.findMetadataRecords(indexName, pattern, isPrefix, isCaseSensitive);
- result.addAll(results);
- }
- return result;
- }
-
- @Override
- public Collection<PropertyRecordImpl> getExtensionProperties(AbstractMetadataRecord record)
- throws MetaMatrixComponentException {
- return getMetadataStore(record.getModelName()).getExtensionProperties(record);
- }
-
- public MetadataStore getMetadataStore(String modelName) throws QueryMetadataException {
- MetadataStore store = this.storeMap.get(modelName.toUpperCase());
- if (store == null) {
- throw new QueryMetadataException(modelName+TransformationMetadata.NOT_EXISTS_MESSAGE);
- }
- return store;
- }
-
- public MetadataSource getMetadataSource() {
- return metadataSource;
- }
-
-}
Deleted: trunk/metadata/src/main/java/org/teiid/metadata/ConnectorMetadataStore.java
===================================================================
--- trunk/metadata/src/main/java/org/teiid/metadata/ConnectorMetadataStore.java 2009-10-24 18:07:35 UTC (rev 1536)
+++ trunk/metadata/src/main/java/org/teiid/metadata/ConnectorMetadataStore.java 2009-10-25 02:00:37 UTC (rev 1537)
@@ -1,248 +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.metadata;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.teiid.connector.metadata.runtime.AbstractMetadataRecord;
-import org.teiid.connector.metadata.runtime.ColumnRecordImpl;
-import org.teiid.connector.metadata.runtime.ColumnSetRecordImpl;
-import org.teiid.connector.metadata.runtime.ConnectorMetadata;
-import org.teiid.connector.metadata.runtime.MetadataConstants;
-import org.teiid.connector.metadata.runtime.ModelRecordImpl;
-import org.teiid.connector.metadata.runtime.ProcedureParameterRecordImpl;
-import org.teiid.connector.metadata.runtime.ProcedureRecordImpl;
-import org.teiid.connector.metadata.runtime.PropertyRecordImpl;
-import org.teiid.connector.metadata.runtime.TableRecordImpl;
-import org.teiid.metadata.index.IndexConstants;
-
-import com.metamatrix.api.exception.MetaMatrixComponentException;
-import com.metamatrix.api.exception.query.QueryMetadataException;
-import com.metamatrix.core.MetaMatrixCoreException;
-import com.metamatrix.query.metadata.MetadataStore;
-
-public class ConnectorMetadataStore implements MetadataStore {
-
- private ConnectorMetadata metadata;
- private String modelName;
-
- public ConnectorMetadataStore(String modelName, ConnectorMetadata metadata) {
- this.modelName = modelName;
- this.metadata = metadata;
- }
-
- @Override
- public ModelRecordImpl getModel(String fullName)
- throws QueryMetadataException, MetaMatrixComponentException {
- //there's no need to check the name, the CompositeMetadataStore will have already done that
- return metadata.getModel();
- }
-
- @Override
- public ColumnRecordImpl findElement(String fullName)
- throws QueryMetadataException, MetaMatrixComponentException {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public TableRecordImpl findGroup(String fullName)
- throws QueryMetadataException, MetaMatrixComponentException {
- for (TableRecordImpl tableRecordImpl : metadata.getTables()) {
- if (tableRecordImpl.getFullName().equalsIgnoreCase(fullName)) {
- return tableRecordImpl;
- }
- }
- throw new QueryMetadataException(fullName+TransformationMetadata.NOT_EXISTS_MESSAGE);
- }
-
- @Override
- public Collection<String> getGroupsForPartialName(String partialGroupName)
- throws MetaMatrixComponentException, QueryMetadataException {
- Collection<String> results = new LinkedList<String>();
- for (TableRecordImpl tableRecordImpl : metadata.getTables()) {
- if (tableRecordImpl.getFullName().toLowerCase().endsWith(partialGroupName)) {
- results.add(tableRecordImpl.getFullName());
- }
- }
- return results;
- }
-
- @Override
- public Collection<String> getModelNames() {
- return Arrays.asList(modelName);
- }
-
- @Override
- public ProcedureRecordImpl getStoredProcedure(
- String fullyQualifiedProcedureName)
- throws MetaMatrixComponentException, QueryMetadataException {
- for (ProcedureRecordImpl procedureRecordImpl : metadata.getProcedures()) {
- if (procedureRecordImpl.getFullName().equalsIgnoreCase(fullyQualifiedProcedureName)) {
- return procedureRecordImpl;
- }
- }
- throw new QueryMetadataException(fullyQualifiedProcedureName+TransformationMetadata.NOT_EXISTS_MESSAGE);
- }
-
- @Override
- public Collection getXMLTempGroups(TableRecordImpl table)
- throws MetaMatrixComponentException {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public Collection<? extends AbstractMetadataRecord> findMetadataRecords(char recordType,
- String entityName, boolean isPartialName)
- throws MetaMatrixComponentException {
- throw new UnsupportedOperationException();
- }
-
- private Collection<? extends AbstractMetadataRecord> getRecordsByType(
- char recordType) {
- switch (recordType) {
- case MetadataConstants.RECORD_TYPE.CALLABLE:
- return metadata.getProcedures();
- case MetadataConstants.RECORD_TYPE.CALLABLE_PARAMETER: {
- Collection<ProcedureParameterRecordImpl> results = new ArrayList<ProcedureParameterRecordImpl>();
- for (ProcedureRecordImpl procedure : metadata.getProcedures()) {
- results.addAll(procedure.getParameters());
- }
- return results;
- }
- case MetadataConstants.RECORD_TYPE.RESULT_SET: {
- Collection<ColumnSetRecordImpl> results = new ArrayList<ColumnSetRecordImpl>();
- for (ProcedureRecordImpl procedure : metadata.getProcedures()) {
- if (procedure.getResultSet() != null) {
- results.add(procedure.getResultSet());
- }
- }
- return results;
- }
- case MetadataConstants.RECORD_TYPE.ACCESS_PATTERN: {
- Collection<ColumnSetRecordImpl> results = new ArrayList<ColumnSetRecordImpl>();
- for (TableRecordImpl table : metadata.getTables()) {
- results.addAll(table.getAccessPatterns());
- }
- return results;
- }
- case MetadataConstants.RECORD_TYPE.UNIQUE_KEY: {
- Collection<ColumnSetRecordImpl> results = new ArrayList<ColumnSetRecordImpl>();
- for (TableRecordImpl table : metadata.getTables()) {
- results.addAll(table.getUniqueKeys());
- }
- return results;
- }
- case MetadataConstants.RECORD_TYPE.PRIMARY_KEY: {
- Collection<ColumnSetRecordImpl> results = new ArrayList<ColumnSetRecordImpl>();
- for (TableRecordImpl table : metadata.getTables()) {
- if (table.getPrimaryKey() != null) {
- results.add(table.getPrimaryKey());
- }
- }
- return results;
- }
- case MetadataConstants.RECORD_TYPE.FOREIGN_KEY: {
- Collection<ColumnSetRecordImpl> results = new ArrayList<ColumnSetRecordImpl>();
- for (TableRecordImpl table : metadata.getTables()) {
- results.addAll(table.getForeignKeys());
- }
- return results;
- }
- case MetadataConstants.RECORD_TYPE.INDEX: {
- Collection<ColumnSetRecordImpl> results = new ArrayList<ColumnSetRecordImpl>();
- for (TableRecordImpl table : metadata.getTables()) {
- results.addAll(table.getIndexes());
- }
- return results;
- }
- case MetadataConstants.RECORD_TYPE.MODEL:
- return Arrays.asList(metadata.getModel());
- case MetadataConstants.RECORD_TYPE.TABLE:
- return metadata.getTables();
- case MetadataConstants.RECORD_TYPE.COLUMN: {
- Collection<ColumnRecordImpl> results = new ArrayList<ColumnRecordImpl>();
- for (TableRecordImpl table : metadata.getTables()) {
- results.addAll(table.getColumns());
- }
- return results;
- }
- case MetadataConstants.RECORD_TYPE.ANNOTATION: {
- return metadata.getAnnotations();
- }
- case MetadataConstants.RECORD_TYPE.PROPERTY: {
- return metadata.getProperties();
- }
- }
- return Collections.emptyList();
- }
-
- @Override
- public Collection<? extends AbstractMetadataRecord> findMetadataRecords(String indexName,
- String pattern, boolean isPrefix,
- boolean isCaseSensitive) throws MetaMatrixCoreException {
- if (indexName.equalsIgnoreCase(IndexConstants.INDEX_NAME.COLUMNS_INDEX)) {
- return getRecordsByType(MetadataConstants.RECORD_TYPE.COLUMN);
- } else if (indexName.equalsIgnoreCase(IndexConstants.INDEX_NAME.KEYS_INDEX)) {
- List<AbstractMetadataRecord> result = new ArrayList<AbstractMetadataRecord>();
- result.addAll(getRecordsByType(MetadataConstants.RECORD_TYPE.ACCESS_PATTERN));
- result.addAll(getRecordsByType(MetadataConstants.RECORD_TYPE.UNIQUE_KEY));
- result.addAll(getRecordsByType(MetadataConstants.RECORD_TYPE.PRIMARY_KEY));
- result.addAll(getRecordsByType(MetadataConstants.RECORD_TYPE.FOREIGN_KEY));
- result.addAll(getRecordsByType(MetadataConstants.RECORD_TYPE.INDEX));
- return result;
- } else if (indexName.equalsIgnoreCase(IndexConstants.INDEX_NAME.MODELS_INDEX)) {
- return getRecordsByType(MetadataConstants.RECORD_TYPE.MODEL);
- } else if (indexName.equalsIgnoreCase(IndexConstants.INDEX_NAME.PROCEDURES_INDEX)) {
- List<AbstractMetadataRecord> result = new ArrayList<AbstractMetadataRecord>();
- result.addAll(getRecordsByType(MetadataConstants.RECORD_TYPE.CALLABLE));
- result.addAll(getRecordsByType(MetadataConstants.RECORD_TYPE.CALLABLE_PARAMETER));
- result.addAll(getRecordsByType(MetadataConstants.RECORD_TYPE.RESULT_SET));
- return result;
- } else if (indexName.equalsIgnoreCase(IndexConstants.INDEX_NAME.TABLES_INDEX)) {
- return getRecordsByType(MetadataConstants.RECORD_TYPE.TABLE);
- } else if (indexName.equalsIgnoreCase(IndexConstants.INDEX_NAME.ANNOTATION_INDEX)) {
- return getRecordsByType(MetadataConstants.RECORD_TYPE.ANNOTATION);
- }
- return Collections.emptyList();
- }
-
- @Override
- public boolean postProcessFindMetadataRecords() {
- return true;
- }
-
- @Override
- public Collection<PropertyRecordImpl> getExtensionProperties(AbstractMetadataRecord record)
- throws MetaMatrixComponentException {
- if (record.getExtensionProperties() == null) {
- return Collections.emptyList();
- }
- return record.getExtensionProperties();
- }
-
-}
Deleted: trunk/metadata/src/main/java/org/teiid/metadata/QueryMetadataCache.java
===================================================================
--- trunk/metadata/src/main/java/org/teiid/metadata/QueryMetadataCache.java 2009-10-24 18:07:35 UTC (rev 1536)
+++ trunk/metadata/src/main/java/org/teiid/metadata/QueryMetadataCache.java 2009-10-25 02:00:37 UTC (rev 1537)
@@ -1,277 +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.metadata;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.teiid.connector.metadata.IndexFile;
-import org.teiid.connector.metadata.MetadataConnectorConstants;
-import org.teiid.connector.metadata.MultiObjectSource;
-import org.teiid.connector.metadata.PropertyFileObjectSource;
-import org.teiid.connector.metadata.runtime.ConnectorMetadata;
-import org.teiid.connector.metadata.runtime.DatatypeRecordImpl;
-import org.teiid.metadata.index.IndexMetadataStore;
-
-import com.metamatrix.api.exception.MetaMatrixComponentException;
-import com.metamatrix.common.log.LogManager;
-import com.metamatrix.common.types.DataTypeManager;
-import com.metamatrix.common.types.DataTypeManager.DefaultDataTypes;
-import com.metamatrix.common.vdb.api.VDBArchive;
-import com.metamatrix.connector.metadata.internal.IObjectSource;
-import com.metamatrix.core.CoreConstants;
-import com.metamatrix.core.MetaMatrixRuntimeException;
-import com.metamatrix.dqp.DQPPlugin;
-import com.metamatrix.dqp.service.DataService;
-import com.metamatrix.dqp.service.VDBService;
-import com.metamatrix.dqp.util.LogConstants;
-import com.metamatrix.metadata.runtime.api.MetadataSource;
-import com.metamatrix.query.metadata.MetadataStore;
-import com.metamatrix.query.metadata.QueryMetadataInterface;
-import com.metamatrix.vdb.runtime.VDBKey;
-
-
-/**
- * This caches QueryMetadataInterface implementations for all vdbs, each implementation has access to
- * metadata for a given vdb and the system vdb.
- * @since 4.2
- */
-public class QueryMetadataCache {
-
- private static class QueryMetadataHolder {
- QueryMetadataInterface qmi;
- }
-
- // vdbID to QueryMetadataInterfaceHolder map
- private Map<VDBKey, QueryMetadataHolder> vdbToQueryMetadata = Collections.synchronizedMap(new HashMap<VDBKey, QueryMetadataHolder>());
- // map between vdbID and CompositeIndexSelector for the vdb (RuntimeSelector for the vdb and system vdb)
- private Map<VDBKey, CompositeMetadataStore> vdbToCompositeSelector = Collections.synchronizedMap(new HashMap<VDBKey, CompositeMetadataStore>());
- // RuntimeIndexSelector for the system vdb
- private final VDBArchive systemVDBSelector;
-
- // boolean for the cache being valid
- private boolean isCacheValid = true;
- private IndexMetadataStore indexMetadataStore;
-
- /**
- * Constructor given a URL to a system vdb.
- * @since 4.2
- */
- public QueryMetadataCache(final URL systemVdbUrl) throws MetaMatrixComponentException {
- try {
- this.systemVDBSelector = new VDBArchive(systemVdbUrl.openStream());
- this.indexMetadataStore = new IndexMetadataStore(this.systemVDBSelector);
- } catch(IOException e) {
- throw new MetaMatrixComponentException(e, DQPPlugin.Util.getString("QueryMetadataCache.Failed_creating_Runtime_Index_Selector._4", CoreConstants.SYSTEM_VDB)); //$NON-NLS-1$
- }
- }
-
- /**
- * Constructor given the contents of a system vdb.
- * @since 4.2
- */
- public QueryMetadataCache(final byte[] systemVdbContent) throws MetaMatrixComponentException {
- try {
- this.systemVDBSelector = new VDBArchive(new ByteArrayInputStream(systemVdbContent));
- this.indexMetadataStore = new IndexMetadataStore(this.systemVDBSelector);
- } catch(IOException e) {
- throw new MetaMatrixComponentException(e, DQPPlugin.Util.getString("QueryMetadataCache.Failed_creating_Runtime_Index_Selector._4", CoreConstants.SYSTEM_VDB)); //$NON-NLS-1$
- }
- }
-
- /**
- * Get the composite selector fot the given vdbName, version.
- */
- private CompositeMetadataStore getCompositeSelector(final String vdbName, final String vdbVersion) {
- // check cache status
- assertIsValidCache();
- VDBKey vdbID = toVdbID(vdbName, vdbVersion);
- return this.vdbToCompositeSelector.get(vdbID);
- }
-
- public IObjectSource getCompositeMetadataObjectSource(String vdbName, String vdbVersion, VDBService vdbService){
- CompositeMetadataStore indexSelector = getCompositeSelector(vdbName, vdbVersion);
-
- // build up sources to be used by the index connector
- IObjectSource indexFile = new IndexFile(indexSelector, vdbName, vdbVersion, vdbService);
-
- PropertyFileObjectSource propertyFileSource = new PropertyFileObjectSource();
- IObjectSource multiObjectSource = new MultiObjectSource(indexFile, MetadataConnectorConstants.PROPERTIES_FILE_EXTENSION,propertyFileSource);
- return multiObjectSource;
- }
-
- /**
- * Look up metadata for the given vdbName, version at the given filecontent.
- * @throws MetaMatrixComponentException
- */
- public QueryMetadataInterface lookupMetadata(final String vdbName, final String vdbVersion, MetadataSource iss, DataService dataService) throws MetaMatrixComponentException {
- assertIsValidCache();
- VDBKey vdbID = toVdbID(vdbName, vdbVersion);
- QueryMetadataHolder qmiHolder = null;
- // Enter a synchronized block to find the holder of a QueryMetadataInterface for a VDB
- synchronized(vdbToQueryMetadata) {
- qmiHolder = vdbToQueryMetadata.get(vdbID);
- if ( qmiHolder == null ) {
- qmiHolder = new QueryMetadataHolder();
- vdbToQueryMetadata.put(vdbID, qmiHolder);
- }
- }
- synchronized (qmiHolder) {
- if (qmiHolder.qmi == null) {
- qmiHolder.qmi = loadMetadata(vdbID, iss, dataService);
- }
- }
- return qmiHolder.qmi;
- }
-
- private void assertIsValidCache() {
- if(!this.isCacheValid) {
- throw new MetaMatrixRuntimeException(DQPPlugin.Util.getString("QueryMetadataCache.cache_not_valid")); //$NON-NLS-1$
- }
- }
-
- private QueryMetadataInterface loadMetadata(final VDBKey vdbID, final MetadataSource runtimeSelector, DataService dataService) throws MetaMatrixComponentException {
- // check cache status
- assertIsValidCache();
-
- List<MetadataStore> metadataStores = new ArrayList<MetadataStore>();
- try {
- metadataStores.add(new IndexMetadataStore(runtimeSelector));
- Set<String> modelNames = runtimeSelector.getConnectorMetadataModelNames();
- if (!modelNames.isEmpty()) {
- for (String modelName : modelNames) {
- ConnectorMetadata connectorMetadata = null;
- String savedMetadata = "/META-INF/" + modelName.toLowerCase() + ".ser"; //$NON-NLS-1$ //$NON-NLS-2$
- if (runtimeSelector.cacheConnectorMetadata()) {
- File f = runtimeSelector.getFile(savedMetadata);
- if (f != null) {
- ObjectInputStream ois = null;
- try {
- ois = new ObjectInputStream(new FileInputStream(f));
- connectorMetadata = (ConnectorMetadata)ois.readObject();
- } catch (Exception e) {
-
- } finally {
- if (ois != null) {
- ois.close();
- }
- }
- }
- }
- if (connectorMetadata == null) {
- connectorMetadata = dataService.getConnectorMetadata(vdbID.getName(), vdbID.getVersion(), modelName, runtimeSelector.getModelInfo(modelName).getProperties());
- }
- if (runtimeSelector.cacheConnectorMetadata()) {
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- ObjectOutputStream oos = new ObjectOutputStream(baos);
- oos.writeObject(connectorMetadata);
- oos.close();
- runtimeSelector.saveFile(new ByteArrayInputStream(baos.toByteArray()), savedMetadata);
- }
- metadataStores.add(new ConnectorMetadataStore(modelName, connectorMetadata));
- }
- }
- metadataStores.add(indexMetadataStore);
- } catch (IOException e) {
- throw new MetaMatrixComponentException(e);
- }
- // build a composite selector for the runtimeselectors of this vdb and system vdb
- CompositeMetadataStore composite = new CompositeMetadataStore(metadataStores, runtimeSelector);
- vdbToCompositeSelector.put(vdbID, composite);
- QueryMetadataInterface result = new TransformationMetadata(composite);
- return result;
- }
-
- public Map<String, DatatypeRecordImpl> getBuiltinDatatypes() throws MetaMatrixComponentException {
- Collection<DatatypeRecordImpl> datatypes = this.indexMetadataStore.getDatatypes();
- Map<String, DatatypeRecordImpl> datatypeMap = new HashMap<String, DatatypeRecordImpl>();
- for (String typeName : DataTypeManager.getAllDataTypeNames()) {
- for (DatatypeRecordImpl datatypeRecordImpl : datatypes) {
- if (datatypeRecordImpl.getName().equals("int")) { //$NON-NLS-1$
- datatypeMap.put(DefaultDataTypes.INTEGER, datatypeRecordImpl);
- } else if (datatypeRecordImpl.getName().equals("XMLLiteral")) { //$NON-NLS-1$
- datatypeMap.put(DataTypeManager.DefaultDataTypes.XML, datatypeRecordImpl);
- } else if (datatypeRecordImpl.getName().equals(typeName)) {
- datatypeMap.put(typeName, datatypeRecordImpl);
- }
- }
- }
- return datatypeMap;
- }
-
- /**
- * Clears all state on this cache and also deletes any indexfiles
- * associated with the cache.
- * @since 4.2
- */
- public void clearCache() {
- LogManager.logTrace(LogConstants.CTX_DQP, new Object[] {"QueryMetadataCache Clearing VDB cache"}); //$NON-NLS-1$
- // mark cache invalid
- isCacheValid = false;
- // Clear the holders ...
- vdbToQueryMetadata.clear();
-
- // Clean up the directory for the System VDB ...
- if (this.systemVDBSelector != null) {
- // selector should no longer be used
- this.systemVDBSelector.close();
- }
-
- // Clear the cache of selectors ...
- vdbToCompositeSelector.clear();
- }
-
- /**
- * Remove cache for a given vdb, called when a vdb is actually deleted.
- * Also deletes any temp files associated with the vdb.
- */
- public void removeFromCache(final String vdbName, final String vdbVersion) {
- LogManager.logTrace(LogConstants.CTX_DQP, new Object[] {"QueryMetadataCache Removing vdb from cache", vdbName, vdbVersion}); //$NON-NLS-1$
- if(vdbName != null && vdbVersion != null) {
- final VDBKey vdbID = toVdbID(vdbName, vdbVersion);
- vdbToQueryMetadata.remove(vdbID);
- vdbToCompositeSelector.remove(vdbID);
- }
- }
-
- /**
- * Return unique id for a vdb
- */
- private VDBKey toVdbID(final String vdbName, final String vdbVersion) {
- return new VDBKey(vdbName, vdbVersion);
- }
-
-}
Deleted: trunk/metadata/src/main/java/org/teiid/metadata/RuntimeMetadataPlugin.java
===================================================================
--- trunk/metadata/src/main/java/org/teiid/metadata/RuntimeMetadataPlugin.java 2009-10-24 18:07:35 UTC (rev 1536)
+++ trunk/metadata/src/main/java/org/teiid/metadata/RuntimeMetadataPlugin.java 2009-10-25 02:00:37 UTC (rev 1537)
@@ -1,44 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package org.teiid.metadata;
-
-import java.util.ResourceBundle;
-
-import com.metamatrix.core.BundleUtil;
-
-/**
- * CommonPlugin
- * <p>Used here in <code>metadata.runtime</code> to have access to the new
- * logging framework for <code>LogManager</code>.</p>
- */
-public class RuntimeMetadataPlugin {
-
- /**
- * The plug-in identifier of this plugin
- * (value <code>"com.metamatrix.metadata.runtime"</code>).
- */
- public static final String PLUGIN_ID = "org.teiid.metadata"; //$NON-NLS-1$
-
- public static final BundleUtil Util = new BundleUtil(PLUGIN_ID,
- PLUGIN_ID + ".i18n", ResourceBundle.getBundle(PLUGIN_ID + ".i18n")); //$NON-NLS-1$ //$NON-NLS-2$
-}
Deleted: trunk/metadata/src/main/java/org/teiid/metadata/TransformationMetadata.java
===================================================================
--- trunk/metadata/src/main/java/org/teiid/metadata/TransformationMetadata.java 2009-10-24 18:07:35 UTC (rev 1536)
+++ trunk/metadata/src/main/java/org/teiid/metadata/TransformationMetadata.java 2009-10-25 02:00:37 UTC (rev 1537)
@@ -1,1069 +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.metadata;
-
-import java.io.ByteArrayInputStream;
-import java.io.File;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-
-import org.teiid.connector.metadata.runtime.AbstractMetadataRecord;
-import org.teiid.connector.metadata.runtime.ColumnRecordImpl;
-import org.teiid.connector.metadata.runtime.ColumnSetRecordImpl;
-import org.teiid.connector.metadata.runtime.DatatypeRecordImpl;
-import org.teiid.connector.metadata.runtime.ForeignKeyRecordImpl;
-import org.teiid.connector.metadata.runtime.MetadataConstants;
-import org.teiid.connector.metadata.runtime.ModelRecordImpl;
-import org.teiid.connector.metadata.runtime.ProcedureParameterRecordImpl;
-import org.teiid.connector.metadata.runtime.ProcedureRecordImpl;
-import org.teiid.connector.metadata.runtime.PropertyRecordImpl;
-import org.teiid.connector.metadata.runtime.TableRecordImpl;
-import org.teiid.connector.metadata.runtime.TransformationRecordImpl;
-import org.teiid.metadata.index.IndexConstants;
-
-import com.metamatrix.api.exception.MetaMatrixComponentException;
-import com.metamatrix.api.exception.query.QueryMetadataException;
-import com.metamatrix.common.types.DataTypeManager;
-import com.metamatrix.core.util.ArgCheck;
-import com.metamatrix.core.util.LRUCache;
-import com.metamatrix.core.util.StringUtil;
-import com.metamatrix.core.vdb.ModelType;
-import com.metamatrix.metadata.runtime.api.MetadataSourceUtil;
-import com.metamatrix.query.mapping.relational.QueryNode;
-import com.metamatrix.query.mapping.xml.MappingDocument;
-import com.metamatrix.query.mapping.xml.MappingLoader;
-import com.metamatrix.query.mapping.xml.MappingNode;
-import com.metamatrix.query.metadata.BasicQueryMetadata;
-import com.metamatrix.query.metadata.StoredProcedureInfo;
-import com.metamatrix.query.metadata.SupportConstants;
-import com.metamatrix.query.sql.lang.SPParameter;
-
-/**
- * Modelers implementation of QueryMetadataInterface that reads columns, groups, models etc.
- * index files for various metadata properties.
- */
-public class TransformationMetadata extends BasicQueryMetadata {
-
- //Fix Me: The following constants come from com.metamatrix.metamodels.relational.NullableType
- private static int NULLABLE = 1;
- private static int NULLABLE_UNKNOWN = 2;
- //Fix Me: The following constants come from com.metamatrix.metamodels.relational.SearchabilityType
- private static int SEARCHABLE = 0;
- private static int ALL_EXCEPT_LIKE = 1;
- private static int LIKE_ONLY = 2;
-
- /** Delimiter character used when specifying fully qualified entity names */
- public static final char DELIMITER_CHAR = IndexConstants.NAME_DELIM_CHAR;
- public static final String DELIMITER_STRING = StringUtil.Constants.EMPTY_STRING + IndexConstants.NAME_DELIM_CHAR;
-
- // error message cached to avoid i18n lookup each time
- public static String NOT_EXISTS_MESSAGE = StringUtil.Constants.SPACE+RuntimeMetadataPlugin.Util.getString("TransformationMetadata.does_not_exist._1"); //$NON-NLS-1$
-
- private final CompositeMetadataStore store;
-
- /*
- * TODO: move caching to jboss cache structure
- */
- private final Map<String, Object> metadataCache = Collections.synchronizedMap(new LRUCache<String, Object>(500));
- private final Map<String, TableRecordImpl> groupCache = Collections.synchronizedMap(new LRUCache<String, TableRecordImpl>(2000));
- private final Map<String, StoredProcedureInfo> procedureCache = Collections.synchronizedMap(new LRUCache<String, StoredProcedureInfo>(200));
- private final Map<String, String> partialNameToFullNameCache = Collections.synchronizedMap(new LRUCache<String, String>(1000));
- private final Map<String, ModelRecordImpl> modelCache = Collections.synchronizedMap(new LRUCache<String, ModelRecordImpl>(100));
-
- /**
- * TransformationMetadata constructor
- * @param context Object containing the info needed to lookup metadta.
- */
- public TransformationMetadata(final CompositeMetadataStore store) {
- ArgCheck.isNotNull(store);
- this.store = store;
- }
-
- //==================================================================================
- // I N T E R F A C E M E T H O D S
- //==================================================================================
-
- /* (non-Javadoc)
- * @see com.metamatrix.query.metadata.QueryMetadataInterface#getElementID(java.lang.String)
- */
- public Object getElementID(final String elementName) throws MetaMatrixComponentException, QueryMetadataException {
- ArgCheck.isNotEmpty(elementName);
-
- return getMetadataStore().findElement(elementName);
- }
-
- /* (non-Javadoc)
- * @see com.metamatrix.query.metadata.QueryMetadataInterface#getGroupID(java.lang.String)
- */
- public Object getGroupID(final String groupName) throws MetaMatrixComponentException, QueryMetadataException {
- ArgCheck.isNotEmpty(groupName);
- String upperGroupName = groupName.toUpperCase();
- TableRecordImpl result = this.groupCache.get(upperGroupName);
-
- if (result == null) {
- result = getMetadataStore().findGroup(groupName);
- this.groupCache.put(upperGroupName, result);
- }
- return result;
- }
-
- /* (non-Javadoc)
- * @see com.metamatrix.query.metadata.QueryMetadataInterface#getGroupsForPartialName(java.lang.String)
- */
- public Collection getGroupsForPartialName(final String partialGroupName)
- throws MetaMatrixComponentException, QueryMetadataException {
- ArgCheck.isNotEmpty(partialGroupName);
-
- String groupName = this.partialNameToFullNameCache.get(partialGroupName);
-
- if (groupName != null) {
- return Arrays.asList(groupName);
- }
-
- String partialName = DELIMITER_CHAR + partialGroupName.toLowerCase();
-
- Collection result = getMetadataStore().getGroupsForPartialName(partialName);
-
- if (result.size() == 1) {
- this.partialNameToFullNameCache.put(partialGroupName, (String)result.iterator().next());
- }
- return result;
- }
-
- /* (non-Javadoc)
- * @see com.metamatrix.query.metadata.QueryMetadataInterface#getModelID(java.lang.Object)
- */
- public Object getModelID(final Object groupOrElementID) throws MetaMatrixComponentException, QueryMetadataException {
- if (!(groupOrElementID instanceof TableRecordImpl) && !(groupOrElementID instanceof ColumnRecordImpl)) {
- throw createInvalidRecordTypeException(groupOrElementID);
- }
-
- String modelName = ((AbstractMetadataRecord)groupOrElementID).getModelName();
- return getModel(modelName);
- }
-
- private Object getModel(String modelName) throws QueryMetadataException,
- MetaMatrixComponentException {
- modelName = modelName.toUpperCase();
- ModelRecordImpl model = modelCache.get(modelName);
- if (model == null) {
- model = getMetadataStore().getModel(modelName);
- modelCache.put(modelName, model);
- }
- return model;
- }
-
- /* (non-Javadoc)
- * @see com.metamatrix.query.metadata.QueryMetadataInterface#getFullName(java.lang.Object)
- */
- public String getFullName(final Object metadataID) throws MetaMatrixComponentException, QueryMetadataException {
- ArgCheck.isInstanceOf(AbstractMetadataRecord.class, metadataID);
- AbstractMetadataRecord metadataRecord = (AbstractMetadataRecord) metadataID;
- return metadataRecord.getFullName();
- }
-
- /* (non-Javadoc)
- * @see com.metamatrix.query.metadata.QueryMetadataInterface#getFullElementName(java.lang.String, java.lang.String)
- */
- public String getFullElementName(final String fullGroupName, final String shortElementName)
- throws MetaMatrixComponentException, QueryMetadataException {
- ArgCheck.isNotEmpty(fullGroupName);
- ArgCheck.isNotEmpty(shortElementName);
-
- return fullGroupName + DELIMITER_CHAR + shortElementName;
- }
-
- /* (non-Javadoc)
- * @see com.metamatrix.query.metadata.QueryMetadataInterface#getShortElementName(java.lang.String)
- */
- public String getShortElementName(final String fullElementName) throws MetaMatrixComponentException, QueryMetadataException {
- ArgCheck.isNotEmpty(fullElementName);
- int index = fullElementName.lastIndexOf(DELIMITER_CHAR);
- if(index >= 0) {
- return fullElementName.substring(index+1);
- }
- return fullElementName;
- }
-
- /**
- * Return the text portion of the fullElementName representing a group.
- * That means that this should only return text that is part of the
- * fullElementName and not look up new IDs or do much of anything fancy.
- * This method is used by the resolver to decide which portion of a fully-
- * qualified element name is the group name. It will compare whatever comes
- * back with the actual group names and aliases in the query, which is
- * why it is important not to introduce new metadata here. Also, returning
- * null indicates that no portion of the fullElementName is a
- * group name - that is ok as it will be resolved as an ambiguous element.
- * @see com.metamatrix.query.metadata.QueryMetadataInterface#getGroupName(java.lang.String)
- */
- public String getGroupName(final String fullElementName) throws MetaMatrixComponentException, QueryMetadataException {
- ArgCheck.isNotEmpty(fullElementName);
-
- int index = fullElementName.lastIndexOf(DELIMITER_CHAR);
- if(index >= 0) {
- return fullElementName.substring(0, index);
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see com.metamatrix.query.metadata.QueryMetadataInterface#getElementIDsInGroupID(java.lang.Object)
- */
- public List getElementIDsInGroupID(final Object groupID) throws MetaMatrixComponentException, QueryMetadataException {
- ArgCheck.isInstanceOf(TableRecordImpl.class, groupID);
- return ((TableRecordImpl)groupID).getColumns();
- }
-
- /* (non-Javadoc)
- * @see com.metamatrix.query.metadata.QueryMetadataInterface#getGroupIDForElementID(java.lang.Object)
- */
- public Object getGroupIDForElementID(final Object elementID) throws MetaMatrixComponentException, QueryMetadataException {
- if(elementID instanceof ColumnRecordImpl) {
- ColumnRecordImpl columnRecord = (ColumnRecordImpl) elementID;
- return this.getGroupID(columnRecord.getParentFullName());
- } else if(elementID instanceof ProcedureParameterRecordImpl){
- ProcedureParameterRecordImpl columnRecord = (ProcedureParameterRecordImpl) elementID;
- return this.getGroupID(columnRecord.getParentFullName());
- } else {
- throw createInvalidRecordTypeException(elementID);
- }
- }
-
- /* (non-Javadoc)
- * @see com.metamatrix.query.metadata.QueryMetadataInterface#getStoredProcedureInfoForProcedure(java.lang.String)
- */
- public StoredProcedureInfo getStoredProcedureInfoForProcedure(final String fullyQualifiedProcedureName)
- throws MetaMatrixComponentException, QueryMetadataException {
- ArgCheck.isNotEmpty(fullyQualifiedProcedureName);
- String upperGroupName = fullyQualifiedProcedureName.toUpperCase();
- StoredProcedureInfo procInfo = this.procedureCache.get(upperGroupName);
-
- if (procInfo != null) {
- return procInfo;
- }
-
- ProcedureRecordImpl procRecord = getMetadataStore().getStoredProcedure(fullyQualifiedProcedureName);
-
- String procedureFullName = procRecord.getFullName();
-
- // create the storedProcedure info object that would hold procedure's metadata
- procInfo = new StoredProcedureInfo();
- procInfo.setProcedureCallableName(procRecord.getName());
- procInfo.setProcedureID(procRecord);
-
- // modelID for the procedure
- procInfo.setModelID(getModel(procRecord.getModelName()));
-
- // get the parameter metadata info
- for (ProcedureParameterRecordImpl paramRecord : procRecord.getParameters()) {
- String runtimeType = paramRecord.getRuntimeType();
- int direction = this.convertParamRecordTypeToStoredProcedureType(paramRecord.getType());
- // create a parameter and add it to the procedure object
- SPParameter spParam = new SPParameter(paramRecord.getPosition(), direction, paramRecord.getFullName());
- spParam.setMetadataID(paramRecord);
- spParam.setClassType(DataTypeManager.getDataTypeClass(runtimeType));
- procInfo.addParameter(spParam);
- }
-
- // if the procedure returns a resultSet, obtain resultSet metadata
- if(procRecord.getResultSet() != null) {
- ColumnSetRecordImpl resultRecord = procRecord.getResultSet();
- // resultSet is the last parameter in the procedure
- int lastParamIndex = procInfo.getParameters().size() + 1;
- SPParameter param = new SPParameter(lastParamIndex, SPParameter.RESULT_SET, resultRecord.getFullName());
- param.setClassType(java.sql.ResultSet.class);
- param.setMetadataID(resultRecord);
-
- for (ColumnRecordImpl columnRecord : resultRecord.getColumns()) {
- String colType = columnRecord.getRuntimeType();
- param.addResultSetColumn(columnRecord.getFullName(), DataTypeManager.getDataTypeClass(colType), columnRecord);
- }
-
- procInfo.addParameter(param);
- }
-
- // if this is a virtual procedure get the procedure plan
- if(procRecord.isVirtual()) {
- QueryNode queryNode = new QueryNode(procedureFullName, procRecord.getQueryPlan());
- procInfo.setQueryPlan(queryNode);
- }
-
- //subtract 1, to match up with the server
- procInfo.setUpdateCount(procRecord.getUpdateCount() -1);
-
- this.procedureCache.put(upperGroupName, procInfo);
-
- return procInfo;
- }
-
- /**
- * Method to convert the parameter type returned from a ProcedureParameterRecord
- * to the parameter type expected by StoredProcedureInfo
- * @param parameterType
- * @return
- */
- private int convertParamRecordTypeToStoredProcedureType(final int parameterType) {
- switch (parameterType) {
- case MetadataConstants.PARAMETER_TYPES.IN_PARM : return SPParameter.IN;
- case MetadataConstants.PARAMETER_TYPES.OUT_PARM : return SPParameter.OUT;
- case MetadataConstants.PARAMETER_TYPES.INOUT_PARM : return SPParameter.INOUT;
- case MetadataConstants.PARAMETER_TYPES.RETURN_VALUE : return SPParameter.RETURN_VALUE;
- case MetadataConstants.PARAMETER_TYPES.RESULT_SET : return SPParameter.RESULT_SET;
- default :
- return -1;
- }
- }
-
- /* (non-Javadoc)
- * @see com.metamatrix.query.metadata.QueryMetadataInterface#getElementType(java.lang.Object)
- */
- public String getElementType(final Object elementID) throws MetaMatrixComponentException, QueryMetadataException {
- if(elementID instanceof ColumnRecordImpl) {
- return ((ColumnRecordImpl) elementID).getRuntimeType();
- } else if(elementID instanceof ProcedureParameterRecordImpl){
- return ((ProcedureParameterRecordImpl) elementID).getRuntimeType();
- } else {
- throw createInvalidRecordTypeException(elementID);
- }
- }
-
- /* (non-Javadoc)
- * @see com.metamatrix.query.metadata.QueryMetadataInterface#getDefaultValue(java.lang.String)
- */
- public Object getDefaultValue(final Object elementID) throws MetaMatrixComponentException, QueryMetadataException {
- if(elementID instanceof ColumnRecordImpl) {
- return ((ColumnRecordImpl) elementID).getDefaultValue();
- } else if(elementID instanceof ProcedureParameterRecordImpl){
- return ((ProcedureParameterRecordImpl) elementID).getDefaultValue();
- } else {
- throw createInvalidRecordTypeException(elementID);
- }
- }
-
- public Object getMinimumValue(final Object elementID) throws MetaMatrixComponentException, QueryMetadataException {
- if(elementID instanceof ColumnRecordImpl) {
- return ((ColumnRecordImpl) elementID).getMinValue();
- } else if(elementID instanceof ProcedureParameterRecordImpl){
- return null;
- } else {
- throw createInvalidRecordTypeException(elementID);
- }
- }
-
- public Object getMaximumValue(final Object elementID) throws MetaMatrixComponentException, QueryMetadataException {
- if(elementID instanceof ColumnRecordImpl) {
- return ((ColumnRecordImpl) elementID).getMaxValue();
- } else if(elementID instanceof ProcedureParameterRecordImpl){
- return null;
- } else {
- throw createInvalidRecordTypeException(elementID);
- }
- }
-
- /* (non-Javadoc)
- * @see com.metamatrix.query.metadata.QueryMetadataInterface#isVirtualGroup(java.lang.Object)
- */
- public boolean isVirtualGroup(final Object groupID) throws MetaMatrixComponentException, QueryMetadataException {
- ArgCheck.isInstanceOf(TableRecordImpl.class, groupID);
- return ((TableRecordImpl) groupID).isVirtual();
- }
-
- /**
- * @see com.metamatrix.query.metadata.QueryMetadataInterface#isProcedureInputElement(java.lang.Object)
- * @since 4.2
- */
- public boolean isProcedure(final Object groupID) throws MetaMatrixComponentException, QueryMetadataException {
- if(groupID instanceof ProcedureRecordImpl) {
- return true;
- }
- if(groupID instanceof TableRecordImpl){
- return false;
- }
- throw createInvalidRecordTypeException(groupID);
- }
-
- public boolean isVirtualModel(final Object modelID) throws MetaMatrixComponentException, QueryMetadataException {
- ArgCheck.isInstanceOf(ModelRecordImpl.class, modelID);
- ModelRecordImpl modelRecord = (ModelRecordImpl) modelID;
- return (modelRecord.getModelType() == ModelType.VIRTUAL);
- }
-
- /* (non-Javadoc)
- * @see com.metamatrix.query.metadata.QueryMetadataInterface#getVirtualPlan(java.lang.Object)
- */
- public QueryNode getVirtualPlan(final Object groupID) throws MetaMatrixComponentException, QueryMetadataException {
- ArgCheck.isInstanceOf(TableRecordImpl.class, groupID);
-
- TableRecordImpl tableRecord = (TableRecordImpl) groupID;
- if (!tableRecord.isVirtual()) {
- throw new QueryMetadataException(RuntimeMetadataPlugin.Util.getString("TransformationMetadata.QueryPlan_could_not_be_found_for_physical_group__6")+tableRecord.getFullName()); //$NON-NLS-1$
- }
- TransformationRecordImpl select = tableRecord.getSelectTransformation();
- String transQuery = select.getTransformation();
- QueryNode queryNode = new QueryNode(tableRecord.getFullName(), transQuery);
-
- // get any bindings and add them onto the query node
- List bindings = select.getBindings();
- if(bindings != null) {
- for(Iterator bindIter = bindings.iterator();bindIter.hasNext();) {
- queryNode.addBinding((String)bindIter.next());
- }
- }
-
- return queryNode;
- }
-
- /* (non-Javadoc)
- * @see com.metamatrix.query.metadata.QueryMetadataInterface#getInsertPlan(java.lang.Object)
- */
- public String getInsertPlan(final Object groupID) throws MetaMatrixComponentException, QueryMetadataException {
- ArgCheck.isInstanceOf(TableRecordImpl.class, groupID);
- TableRecordImpl tableRecordImpl = (TableRecordImpl)groupID;
- if (!tableRecordImpl.isVirtual()) {
- throw new QueryMetadataException(RuntimeMetadataPlugin.Util.getString("TransformationMetadata.InsertPlan_could_not_be_found_for_physical_group__8")+tableRecordImpl.getFullName()); //$NON-NLS-1$
- }
- return ((TableRecordImpl)groupID).getInsertPlan();
- }
-
- /* (non-Javadoc)
- * @see com.metamatrix.query.metadata.QueryMetadataInterface#getUpdatePlan(java.lang.Object)
- */
- public String getUpdatePlan(final Object groupID) throws MetaMatrixComponentException, QueryMetadataException {
- ArgCheck.isInstanceOf(TableRecordImpl.class, groupID);
- TableRecordImpl tableRecordImpl = (TableRecordImpl)groupID;
- if (!tableRecordImpl.isVirtual()) {
- throw new QueryMetadataException(RuntimeMetadataPlugin.Util.getString("TransformationMetadata.InsertPlan_could_not_be_found_for_physical_group__10")+tableRecordImpl.getFullName()); //$NON-NLS-1$
- }
- return ((TableRecordImpl)groupID).getUpdatePlan();
- }
-
- /* (non-Javadoc)
- * @see com.metamatrix.query.metadata.QueryMetadataInterface#getDeletePlan(java.lang.Object)
- */
- public String getDeletePlan(final Object groupID) throws MetaMatrixComponentException, QueryMetadataException {
- ArgCheck.isInstanceOf(TableRecordImpl.class, groupID);
- TableRecordImpl tableRecordImpl = (TableRecordImpl)groupID;
- if (!tableRecordImpl.isVirtual()) {
- throw new QueryMetadataException(RuntimeMetadataPlugin.Util.getString("TransformationMetadata.DeletePlan_could_not_be_found_for_physical_group__12")+tableRecordImpl.getFullName()); //$NON-NLS-1$
- }
- return ((TableRecordImpl)groupID).getDeletePlan();
- }
-
- /* (non-Javadoc)
- * @see com.metamatrix.query.metadata.QueryMetadataInterface#modelSupports(java.lang.Object, int)
- */
- public boolean modelSupports(final Object modelID, final int modelConstant)
- throws MetaMatrixComponentException, QueryMetadataException {
- ArgCheck.isInstanceOf(ModelRecordImpl.class, modelID);
-
- switch(modelConstant) {
- default:
- throw new UnsupportedOperationException(RuntimeMetadataPlugin.Util.getString("TransformationMetadata.Unknown_support_constant___12") + modelConstant); //$NON-NLS-1$
- }
- }
-
- /* (non-Javadoc)
- * @see com.metamatrix.query.metadata.QueryMetadataInterface#groupSupports(java.lang.Object, int)
- */
- public boolean groupSupports(final Object groupID, final int groupConstant)
- throws MetaMatrixComponentException, QueryMetadataException {
- ArgCheck.isInstanceOf(TableRecordImpl.class, groupID);
- TableRecordImpl tableRecord = (TableRecordImpl) groupID;
-
- switch(groupConstant) {
- case SupportConstants.Group.UPDATE:
- return tableRecord.supportsUpdate();
- default:
- throw new UnsupportedOperationException(RuntimeMetadataPlugin.Util.getString("TransformationMetadata.Unknown_support_constant___12") + groupConstant); //$NON-NLS-1$
- }
- }
-
- /* (non-Javadoc)
- * @see com.metamatrix.query.metadata.QueryMetadataInterface#elementSupports(java.lang.Object, int)
- */
- public boolean elementSupports(final Object elementID, final int elementConstant)
- throws MetaMatrixComponentException, QueryMetadataException {
-
- if(elementID instanceof ColumnRecordImpl) {
- ColumnRecordImpl columnRecord = (ColumnRecordImpl) elementID;
- switch(elementConstant) {
- case SupportConstants.Element.NULL:
- int ntype1 = columnRecord.getNullType();
- return (ntype1 == NULLABLE);
- case SupportConstants.Element.NULL_UNKNOWN:
- int ntype2 = columnRecord.getNullType();
- return (ntype2 == NULLABLE_UNKNOWN);
- case SupportConstants.Element.SEARCHABLE_COMPARE:
- int stype1 = columnRecord.getSearchType();
- return (stype1 == SEARCHABLE || stype1 == ALL_EXCEPT_LIKE);
- case SupportConstants.Element.SEARCHABLE_LIKE:
- int stype2 = columnRecord.getSearchType();
- return (stype2 == SEARCHABLE || stype2 == LIKE_ONLY);
- case SupportConstants.Element.SELECT:
- return columnRecord.isSelectable();
- case SupportConstants.Element.UPDATE:
- return columnRecord.isUpdatable();
- case SupportConstants.Element.DEFAULT_VALUE:
- Object defaultValue = columnRecord.getDefaultValue();
- if(defaultValue == null) {
- return false;
- }
- return true;
- case SupportConstants.Element.AUTO_INCREMENT:
- return columnRecord.isAutoIncrementable();
- case SupportConstants.Element.CASE_SENSITIVE:
- return columnRecord.isCaseSensitive();
- case SupportConstants.Element.SIGNED:
- return columnRecord.isSigned();
- default:
- throw new UnsupportedOperationException(RuntimeMetadataPlugin.Util.getString("TransformationMetadata.Unknown_support_constant___12") + elementConstant); //$NON-NLS-1$
- }
- } else if(elementID instanceof ProcedureParameterRecordImpl) {
- ProcedureParameterRecordImpl columnRecord = (ProcedureParameterRecordImpl) elementID;
- switch(elementConstant) {
- case SupportConstants.Element.NULL:
- int ntype1 = columnRecord.getNullType();
- return (ntype1 == NULLABLE);
- case SupportConstants.Element.NULL_UNKNOWN:
- int ntype2 = columnRecord.getNullType();
- return (ntype2 == NULLABLE_UNKNOWN);
- case SupportConstants.Element.SEARCHABLE_COMPARE:
- case SupportConstants.Element.SEARCHABLE_LIKE:
- return false;
- case SupportConstants.Element.SELECT:
-
- if (columnRecord.getType() == MetadataConstants.PARAMETER_TYPES.IN_PARM) {
- return false;
- }
-
- return true;
- case SupportConstants.Element.UPDATE:
- return false;
- case SupportConstants.Element.DEFAULT_VALUE:
- Object defaultValue = columnRecord.getDefaultValue();
- if(defaultValue == null) {
- return false;
- }
- return true;
- case SupportConstants.Element.AUTO_INCREMENT:
- return false;
- case SupportConstants.Element.CASE_SENSITIVE:
- return false;
- case SupportConstants.Element.SIGNED:
- return true;
- default:
- throw new UnsupportedOperationException(RuntimeMetadataPlugin.Util.getString("TransformationMetadata.Unknown_support_constant___12") + elementConstant); //$NON-NLS-1$
- }
-
- } else {
- throw createInvalidRecordTypeException(elementID);
- }
- }
-
- private IllegalArgumentException createInvalidRecordTypeException(Object elementID) {
- return new IllegalArgumentException(RuntimeMetadataPlugin.Util.getString("TransformationMetadata.Invalid_type", elementID.getClass().getName())); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see com.metamatrix.query.metadata.QueryMetadataInterface#getMaxSetSize(java.lang.Object)
- */
- public int getMaxSetSize(final Object modelID) throws MetaMatrixComponentException, QueryMetadataException {
- ArgCheck.isInstanceOf(ModelRecordImpl.class, modelID);
- return ((ModelRecordImpl) modelID).getMaxSetSize();
- }
-
- /* (non-Javadoc)
- * @see com.metamatrix.query.metadata.QueryMetadataInterface#getIndexesInGroup(java.lang.Object)
- */
- public Collection getIndexesInGroup(final Object groupID) throws MetaMatrixComponentException, QueryMetadataException {
- ArgCheck.isInstanceOf(TableRecordImpl.class, groupID);
- return ((TableRecordImpl)groupID).getIndexes();
- }
-
- /* (non-Javadoc)
- * @see com.metamatrix.query.metadata.QueryMetadataInterface#getUniqueKeysInGroup(java.lang.Object)
- */
- public Collection getUniqueKeysInGroup(final Object groupID)
- throws MetaMatrixComponentException, QueryMetadataException {
- ArgCheck.isInstanceOf(TableRecordImpl.class, groupID);
- TableRecordImpl tableRecordImpl = (TableRecordImpl)groupID;
- if (tableRecordImpl.getPrimaryKey() != null) {
- ArrayList<ColumnSetRecordImpl> result = new ArrayList<ColumnSetRecordImpl>(tableRecordImpl.getUniqueKeys());
- result.add(tableRecordImpl.getPrimaryKey());
- return result;
- }
- return tableRecordImpl.getUniqueKeys();
- }
-
- /* (non-Javadoc)
- * @see com.metamatrix.query.metadata.QueryMetadataInterface#getForeignKeysInGroup(java.lang.Object)
- */
- public Collection getForeignKeysInGroup(final Object groupID)
- throws MetaMatrixComponentException, QueryMetadataException {
- ArgCheck.isInstanceOf(TableRecordImpl.class, groupID);
- return ((TableRecordImpl)groupID).getForeignKeys();
- }
-
- /* (non-Javadoc)
- * @see com.metamatrix.query.metadata.QueryMetadataInterface#getPrimaryKeyIDForForeignKeyID(java.lang.Object)
- */
- public Object getPrimaryKeyIDForForeignKeyID(final Object foreignKeyID)
- throws MetaMatrixComponentException, QueryMetadataException {
- ArgCheck.isInstanceOf(ForeignKeyRecordImpl.class, foreignKeyID);
- ForeignKeyRecordImpl fkRecord = (ForeignKeyRecordImpl) foreignKeyID;
- return fkRecord.getPrimaryKey();
- }
-
- /* (non-Javadoc)
- * @see com.metamatrix.query.metadata.QueryMetadataInterface#getAccessPatternsInGroup(java.lang.Object)
- */
- public Collection getAccessPatternsInGroup(final Object groupID)
- throws MetaMatrixComponentException, QueryMetadataException {
- ArgCheck.isInstanceOf(TableRecordImpl.class, groupID);
- return ((TableRecordImpl)groupID).getAccessPatterns();
- }
-
- /* (non-Javadoc)
- * @see com.metamatrix.query.metadata.QueryMetadataInterface#getElementIDsInIndex(java.lang.Object)
- */
- public List getElementIDsInIndex(final Object index) throws MetaMatrixComponentException, QueryMetadataException {
- ArgCheck.isInstanceOf(ColumnSetRecordImpl.class, index);
- return ((ColumnSetRecordImpl)index).getColumns();
- }
-
- /* (non-Javadoc)
- * @see com.metamatrix.query.metadata.QueryMetadataInterface#getElementIDsInKey(java.lang.Object)
- */
- public List getElementIDsInKey(final Object key) throws MetaMatrixComponentException, QueryMetadataException {
- ArgCheck.isInstanceOf(ColumnSetRecordImpl.class, key);
- return ((ColumnSetRecordImpl)key).getColumns();
- }
-
- /* (non-Javadoc)
- * @see com.metamatrix.query.metadata.QueryMetadataInterface#getElementIDsInAccessPattern(java.lang.Object)
- */
- public List getElementIDsInAccessPattern(final Object accessPattern)
- throws MetaMatrixComponentException, QueryMetadataException {
- ArgCheck.isInstanceOf(ColumnSetRecordImpl.class, accessPattern);
- return ((ColumnSetRecordImpl)accessPattern).getColumns();
- }
-
- /* (non-Javadoc)
- * @see com.metamatrix.query.metadata.QueryMetadataInterface#isXMLGroup(java.lang.Object)
- */
- public boolean isXMLGroup(final Object groupID) throws MetaMatrixComponentException, QueryMetadataException {
- ArgCheck.isInstanceOf(TableRecordImpl.class, groupID);
-
- TableRecordImpl tableRecord = (TableRecordImpl) groupID;
- if(tableRecord.getTableType() == MetadataConstants.TABLE_TYPES.DOCUMENT_TYPE) {
- return true;
- }
- return false;
- }
-
- /**
- * @see com.metamatrix.query.metadata.QueryMetadataInterface#hasMaterialization(java.lang.Object)
- * @since 4.2
- */
- public boolean hasMaterialization(final Object groupID) throws MetaMatrixComponentException,
- QueryMetadataException {
- ArgCheck.isInstanceOf(TableRecordImpl.class, groupID);
- TableRecordImpl tableRecord = (TableRecordImpl) groupID;
- return tableRecord.isMaterialized();
- }
-
- /**
- * @see com.metamatrix.query.metadata.QueryMetadataInterface#getMaterialization(java.lang.Object)
- * @since 4.2
- */
- public Object getMaterialization(final Object groupID) throws MetaMatrixComponentException,
- QueryMetadataException {
- ArgCheck.isInstanceOf(TableRecordImpl.class, groupID);
- TableRecordImpl tableRecord = (TableRecordImpl) groupID;
- if(tableRecord.isMaterialized()) {
- return this.getGroupID(tableRecord.getMaterializedTableName());
- }
- return null;
- }
-
- /**
- * @see com.metamatrix.query.metadata.QueryMetadataInterface#getMaterializationStage(java.lang.Object)
- * @since 4.2
- */
- public Object getMaterializationStage(final Object groupID) throws MetaMatrixComponentException,
- QueryMetadataException {
- ArgCheck.isInstanceOf(TableRecordImpl.class, groupID);
- TableRecordImpl tableRecord = (TableRecordImpl) groupID;
- if(tableRecord.isMaterialized()) {
- return this.getGroupID(tableRecord.getMaterializedStageTableName());
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see com.metamatrix.query.metadata.QueryMetadataInterface#getMappingNode(java.lang.Object)
- */
- public MappingNode getMappingNode(final Object groupID) throws MetaMatrixComponentException, QueryMetadataException {
- ArgCheck.isInstanceOf(TableRecordImpl.class, groupID);
-
- TableRecordImpl tableRecord = (TableRecordImpl) groupID;
- final String groupName = tableRecord.getFullName();
- if(tableRecord.isVirtual()) {
- // get the transform record for this group
- TransformationRecordImpl transformRecord = null;
- // Query the index files
- Collection results = getMetadataStore().findMetadataRecords(MetadataConstants.RECORD_TYPE.MAPPING_TRANSFORM,groupName,false);
- int resultSize = results.size();
- if(resultSize == 1) {
- // get the columnset record for this result
- transformRecord = (TransformationRecordImpl) results.iterator().next();
- } else {
- if(resultSize == 0) {
- throw new QueryMetadataException(RuntimeMetadataPlugin.Util.getString("TransformationMetadata.Could_not_find_transformation_record_for_the_group__1")+groupName); //$NON-NLS-1$
- }
- // there should be only one for a fully qualified elementName
- if(resultSize > 1) {
- throw new MetaMatrixComponentException(RuntimeMetadataPlugin.Util.getString("TransformationMetadata.Multiple_transformation_records_found_for_the_group___1")+groupName); //$NON-NLS-1$
- }
- }
- // get mappin transform
- String document = transformRecord.getTransformation();
- InputStream inputStream = new ByteArrayInputStream(document.getBytes());
- MappingLoader reader = new MappingLoader();
- MappingDocument mappingDoc = null;
- try{
- mappingDoc = reader.loadDocument(inputStream);
- mappingDoc.setName(groupName);
- } catch (Exception e){
- throw new MetaMatrixComponentException(e, RuntimeMetadataPlugin.Util.getString("TransformationMetadata.Error_trying_to_read_virtual_document_{0},_with_body__n{1}_1", groupName, mappingDoc)); //$NON-NLS-1$
- } finally {
- try {
- inputStream.close();
- } catch(Exception e) {}
- }
- return (MappingDocument)mappingDoc.clone();
- }
-
- return null;
- }
-
- /* (non-Javadoc)
- * @see com.metamatrix.query.metadata.QueryMetadataInterface#getVirtualDatabaseName()
- */
- public String getVirtualDatabaseName() throws MetaMatrixComponentException, QueryMetadataException {
- return this.getMetadataStore().getMetadataSource().getName();
- }
-
- /* (non-Javadoc)
- * @see com.metamatrix.query.metadata.QueryMetadataInterface#getXMLTempGroups(java.lang.Object)
- */
- public Collection getXMLTempGroups(final Object groupID) throws MetaMatrixComponentException, QueryMetadataException {
- ArgCheck.isInstanceOf(TableRecordImpl.class, groupID);
- TableRecordImpl tableRecord = (TableRecordImpl) groupID;
-
- int tableType = tableRecord.getTableType();
- if(tableType == MetadataConstants.TABLE_TYPES.DOCUMENT_TYPE) {
- return getMetadataStore().getXMLTempGroups(tableRecord);
- }
- return Collections.EMPTY_SET;
- }
-
- /* (non-Javadoc)
- * @see com.metamatrix.query.metadata.QueryMetadataInterface#getCardinality(java.lang.Object)
- */
- public int getCardinality(final Object groupID) throws MetaMatrixComponentException, QueryMetadataException {
- ArgCheck.isInstanceOf(TableRecordImpl.class, groupID);
- return ((TableRecordImpl) groupID).getCardinality();
- }
-
- /* (non-Javadoc)
- * @see com.metamatrix.query.metadata.QueryMetadataInterface#getXMLSchemas(java.lang.Object)
- */
- public List getXMLSchemas(final Object groupID) throws MetaMatrixComponentException, QueryMetadataException {
-
- ArgCheck.isInstanceOf(TableRecordImpl.class, groupID);
- TableRecordImpl tableRecord = (TableRecordImpl) groupID;
-
- // lookup transformation record for the group
- String groupName = tableRecord.getFullName();
- TransformationRecordImpl transformRecord = null;
-
- // Query the index files
- Collection results = getMetadataStore().findMetadataRecords(MetadataConstants.RECORD_TYPE.MAPPING_TRANSFORM,groupName,false);
- int resultSize = results.size();
- if(resultSize == 1) {
- // get the columnset record for this result
- transformRecord = (TransformationRecordImpl) results.iterator().next();
- } else {
- if(resultSize == 0) {
- throw new QueryMetadataException(RuntimeMetadataPlugin.Util.getString("TransformationMetadata.Could_not_find_transformation_record_for_the_group__1")+groupName); //$NON-NLS-1$
- }
- // there should be only one for a fully qualified elementName
- if(resultSize > 1) {
- throw new MetaMatrixComponentException(RuntimeMetadataPlugin.Util.getString("TransformationMetadata.Multiple_transformation_records_found_for_the_group___1")+groupName); //$NON-NLS-1$
- }
- }
-
- // get the schema Paths
- List<String> schemaPaths = transformRecord.getSchemaPaths();
-
- List<String> schemas = new LinkedList<String>();
-
- File f = new File(transformRecord.getResourcePath());
- String path = f.getParent();
-
- for (String string : schemaPaths) {
- String schema = getCharacterVDBResource(string);
-
- if (schema == null) {
- schema = getCharacterVDBResource(path + File.separator + string);
- }
-
- if (schema == null) {
- throw new MetaMatrixComponentException(RuntimeMetadataPlugin.Util.getString("TransformationMetadata.Error_trying_to_read_schemas_for_the_document/table____1")+groupName); //$NON-NLS-1$
- }
- }
-
- return schemas;
- }
-
- public String getNameInSource(final Object metadataID) throws MetaMatrixComponentException, QueryMetadataException {
- ArgCheck.isInstanceOf(AbstractMetadataRecord.class, metadataID);
- return ((AbstractMetadataRecord) metadataID).getNameInSource();
- }
-
- public int getElementLength(final Object elementID) throws MetaMatrixComponentException, QueryMetadataException {
- if(elementID instanceof ColumnRecordImpl) {
- return ((ColumnRecordImpl) elementID).getLength();
- } else if(elementID instanceof ProcedureParameterRecordImpl){
- return ((ProcedureParameterRecordImpl) elementID).getLength();
- } else {
- throw createInvalidRecordTypeException(elementID);
- }
- }
-
- public int getPosition(final Object elementID) throws MetaMatrixComponentException, QueryMetadataException {
- if(elementID instanceof ColumnRecordImpl) {
- return ((ColumnRecordImpl) elementID).getPosition();
- } else if(elementID instanceof ProcedureParameterRecordImpl) {
- return ((ProcedureParameterRecordImpl) elementID).getPosition();
- } else {
- throw createInvalidRecordTypeException(elementID);
- }
- }
-
- public int getPrecision(final Object elementID) throws MetaMatrixComponentException, QueryMetadataException {
- if(elementID instanceof ColumnRecordImpl) {
- return ((ColumnRecordImpl) elementID).getPrecision();
- } else if(elementID instanceof ProcedureParameterRecordImpl) {
- return ((ProcedureParameterRecordImpl) elementID).getPrecision();
- } else {
- throw createInvalidRecordTypeException(elementID);
- }
- }
-
- public int getRadix(final Object elementID) throws MetaMatrixComponentException, QueryMetadataException {
- if(elementID instanceof ColumnRecordImpl) {
- return ((ColumnRecordImpl) elementID).getRadix();
- } else if(elementID instanceof ProcedureParameterRecordImpl) {
- return ((ProcedureParameterRecordImpl) elementID).getRadix();
- } else {
- throw createInvalidRecordTypeException(elementID);
- }
- }
-
- public String getFormat(Object elementID) throws MetaMatrixComponentException, QueryMetadataException {
- if(elementID instanceof ColumnRecordImpl) {
- return ((ColumnRecordImpl) elementID).getFormat();
- }
- throw createInvalidRecordTypeException(elementID);
- }
-
- public int getScale(final Object elementID) throws MetaMatrixComponentException, QueryMetadataException {
- if(elementID instanceof ColumnRecordImpl) {
- return ((ColumnRecordImpl) elementID).getScale();
- } else if(elementID instanceof ProcedureParameterRecordImpl) {
- return ((ProcedureParameterRecordImpl) elementID).getScale();
- } else {
- throw createInvalidRecordTypeException(elementID);
- }
- }
-
- public int getDistinctValues(final Object elementID) throws MetaMatrixComponentException, QueryMetadataException {
- if(elementID instanceof ColumnRecordImpl) {
- return ((ColumnRecordImpl) elementID).getDistinctValues();
- } else if(elementID instanceof ProcedureParameterRecordImpl) {
- return -1;
- } else {
- throw createInvalidRecordTypeException(elementID);
- }
- }
-
- public int getNullValues(final Object elementID) throws MetaMatrixComponentException, QueryMetadataException {
- if(elementID instanceof ColumnRecordImpl) {
- return ((ColumnRecordImpl) elementID).getNullValues();
- } else if(elementID instanceof ProcedureParameterRecordImpl) {
- return -1;
- } else {
- throw createInvalidRecordTypeException(elementID);
- }
- }
-
- public String getNativeType(final Object elementID) throws MetaMatrixComponentException, QueryMetadataException {
- if(elementID instanceof ColumnRecordImpl) {
- return ((ColumnRecordImpl) elementID).getNativeType();
- } else if(elementID instanceof ProcedureParameterRecordImpl) {
- return null;
- } else {
- throw createInvalidRecordTypeException(elementID);
- }
- }
-
- /*
- * @see com.metamatrix.query.metadata.QueryMetadataInterface#getExtensionProperties(java.lang.Object)
- */
- public Properties getExtensionProperties(final Object metadataID) throws MetaMatrixComponentException, QueryMetadataException {
- ArgCheck.isInstanceOf(AbstractMetadataRecord.class, metadataID);
- AbstractMetadataRecord metadataRecord = (AbstractMetadataRecord) metadataID;
- if (metadataRecord.getProperties() == null) {
- Properties p = new Properties();
- Collection<PropertyRecordImpl> props = getMetadataStore().getExtensionProperties(metadataRecord);
- for (PropertyRecordImpl propertyRecordImpl : props) {
- p.setProperty(propertyRecordImpl.getPropertyName(), propertyRecordImpl.getPropertyValue());
- }
- metadataRecord.setProperties(p);
- }
- return metadataRecord.getProperties();
- }
-
- /**
- * @see com.metamatrix.query.metadata.BasicQueryMetadata#getBinaryVDBResource(java.lang.String)
- * @since 4.3
- */
- public byte[] getBinaryVDBResource(String resourcePath) throws MetaMatrixComponentException,
- QueryMetadataException {
- String content = this.getCharacterVDBResource(resourcePath);
- if(content != null) {
- return content.getBytes();
- }
- return null;
- }
-
- /**
- * @see com.metamatrix.query.metadata.BasicQueryMetadata#getCharacterVDBResource(java.lang.String)
- * @since 4.3
- */
- public String getCharacterVDBResource(String resourcePath) throws MetaMatrixComponentException,
- QueryMetadataException {
- return MetadataSourceUtil.getFileContentAsString(resourcePath, this.getMetadataStore().getMetadataSource());
- }
-
- protected CompositeMetadataStore getMetadataStore() {
- return this.store;
- }
-
- /**
- * @see com.metamatrix.query.metadata.BasicQueryMetadata#getVDBResourcePaths()
- * @since 4.3
- */
- public String[] getVDBResourcePaths() throws MetaMatrixComponentException,
- QueryMetadataException {
- return getMetadataStore().getMetadataSource().getEntries().toArray(new String[0]);
- }
-
- /**
- * @see com.metamatrix.query.metadata.QueryMetadataInterface#getModeledType(java.lang.Object)
- * @since 5.0
- */
- public String getModeledType(final Object elementID) throws MetaMatrixComponentException, QueryMetadataException {
- DatatypeRecordImpl record = getDatatypeRecord(elementID);
- if (record != null) {
- return record.getDatatypeID();
- }
- return null;
- }
-
- /**
- * @see com.metamatrix.query.metadata.QueryMetadataInterface#getModeledBaseType(java.lang.Object)
- * @since 5.0
- */
- public String getModeledBaseType(final Object elementID) throws MetaMatrixComponentException, QueryMetadataException {
- DatatypeRecordImpl record = getDatatypeRecord(elementID);
- if (record != null) {
- return record.getBasetypeID();
- }
- return null;
- }
-
- /**
- * @see com.metamatrix.query.metadata.QueryMetadataInterface#getModeledPrimitiveType(java.lang.Object)
- * @since 5.0
- */
- public String getModeledPrimitiveType(final Object elementID) throws MetaMatrixComponentException, QueryMetadataException {
- DatatypeRecordImpl record = getDatatypeRecord(elementID);
- if (record != null) {
- return record.getPrimitiveTypeID();
- }
- return null;
- }
-
- private DatatypeRecordImpl getDatatypeRecord(final Object elementID) {
- if (elementID instanceof ColumnRecordImpl) {
- return ((ColumnRecordImpl)elementID).getDatatype();
- } else if (elementID instanceof ProcedureParameterRecordImpl) {
- return ((ProcedureParameterRecordImpl)elementID).getDatatype();
- } else {
- throw createInvalidRecordTypeException(elementID);
- }
- }
-
- @Override
- public Object addToMetadataCache(Object metadataID, String key, Object value)
- throws MetaMatrixComponentException, QueryMetadataException {
- ArgCheck.isInstanceOf(AbstractMetadataRecord.class, metadataID);
- key = getCacheKey(key, (AbstractMetadataRecord)metadataID);
- return this.metadataCache.put(key, value);
- }
-
- @Override
- public Object getFromMetadataCache(Object metadataID, String key)
- throws MetaMatrixComponentException, QueryMetadataException {
- ArgCheck.isInstanceOf(AbstractMetadataRecord.class, metadataID);
- key = getCacheKey(key, (AbstractMetadataRecord)metadataID);
- return this.metadataCache.get(key);
- }
-
- private String getCacheKey(String key, AbstractMetadataRecord record) {
- return record.getRecordType() + "/" + record.getFullName() + "/" + key; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
-}
\ No newline at end of file
Deleted: trunk/metadata/src/main/java/org/teiid/metadata/index/CharOperation.java
===================================================================
--- trunk/metadata/src/main/java/org/teiid/metadata/index/CharOperation.java 2009-10-24 18:07:35 UTC (rev 1536)
+++ trunk/metadata/src/main/java/org/teiid/metadata/index/CharOperation.java 2009-10-25 02:00:37 UTC (rev 1537)
@@ -1,202 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * MetaMatrix, Inc - repackaging and updates for use as a metadata store
- *******************************************************************************/
-
-package org.teiid.metadata.index;
-
-/**
- * This class is a collection of helper methods to manipulate char arrays.
- *
- * @since 2.1
- */
-public final class CharOperation {
-
- /**
- * Answers true if the pattern matches the given name, false otherwise. This
- * char[] pattern matching accepts wild-cards '*' and '?'.
- *
- * When not case sensitive, the pattern is assumed to already be lowercased,
- * the name will be lowercased character per character as comparing. If name
- * is null, the answer is false. If pattern is null, the answer is true if
- * name is not null. <br>
- * <br>
- * For example:
- * <ol>
- * <li>
- *
- * <pre>
- * pattern = { '?', 'b', '*' }
- * name = { 'a', 'b', 'c' , 'd' }
- * isCaseSensitive = true
- * result => true
- * </pre>
- *
- * </li>
- * <li>
- *
- * <pre>
- * pattern = { '?', 'b', '?' }
- * name = { 'a', 'b', 'c' , 'd' }
- * isCaseSensitive = true
- * result => false
- * </pre>
- *
- * </li>
- * <li>
- *
- * <pre>
- * pattern = { 'b', '*' }
- * name = { 'a', 'b', 'c' , 'd' }
- * isCaseSensitive = true
- * result => false
- * </pre>
- *
- * </li>
- * </ol>
- *
- * @param pattern
- * the given pattern
- * @param name
- * the given name
- * @param isCaseSensitive
- * flag to know whether or not the matching should be case
- * sensitive
- * @return true if the pattern matches the given name, false otherwise
- *
- * TODO: this code was derived from eclipse CharOperation.
- * It also lacks the ability to specify an escape character.
- *
- */
- public static final boolean match(char[] pattern, char[] name,
- boolean isCaseSensitive) {
-
- if (name == null)
- return false; // null name cannot match
- if (pattern == null)
- return true; // null pattern is equivalent to '*'
-
- int patternEnd = pattern.length;
- int nameEnd = name.length;
-
- int iPattern = 0;
- int iName = 0;
-
- /* check first segment */
- char patternChar = 0;
- while ((iPattern < patternEnd)
- && (patternChar = pattern[iPattern]) != '*') {
- if (iName == nameEnd)
- return false;
- if (isCaseSensitive && patternChar != name[iName]
- && patternChar != '?') {
- return false;
- } else if (!isCaseSensitive
- && Character.toLowerCase(patternChar) != Character
- .toLowerCase(name[iName]) && patternChar != '?') {
- return false;
- }
- iName++;
- iPattern++;
- }
- /* check sequence of star+segment */
- int segmentStart;
- if (patternChar == '*') {
- if (patternEnd == 1) {
- return true;
- }
- segmentStart = ++iPattern; // skip star
- } else {
- segmentStart = 0; // force iName check
- }
- int prefixStart = iName;
- checkSegment: while (iName < nameEnd) {
- if (iPattern == patternEnd) {
- iPattern = segmentStart; // mismatch - restart current
- // segment
- iName = ++prefixStart;
- continue checkSegment;
- }
- /* segment is ending */
- if ((patternChar = pattern[iPattern]) == '*') {
- segmentStart = ++iPattern; // skip start
- if (segmentStart == patternEnd) {
- return true;
- }
- prefixStart = iName;
- continue checkSegment;
- }
- /* check current name character */
- char matchChar = isCaseSensitive ? name[iName] : Character
- .toLowerCase(name[iName]);
- if ((isCaseSensitive ? ((matchChar != patternChar) && patternChar != '?')
- : (matchChar != Character.toLowerCase(patternChar))
- && patternChar != '?')) {
- iPattern = segmentStart; // mismatch - restart current
- // segment
- iName = ++prefixStart;
- continue checkSegment;
- }
- iName++;
- iPattern++;
- }
-
- return (segmentStart == patternEnd)
- || (iName == nameEnd && iPattern == patternEnd)
- || (iPattern == patternEnd - 1 && pattern[iPattern] == '*');
- }
-
- /**
- * Answers true if the given name starts with the given prefix, false otherwise.
- * isCaseSensitive is used to find out whether or not the comparison should be case sensitive.
- * <br>
- * <br>
- * For example:
- * <ol>
- * <li><pre>
- * prefix = { 'a' , 'B' }
- * name = { 'a' , 'b', 'b', 'a', 'b', 'a' }
- * isCaseSensitive = false
- * result => true
- * </pre>
- * </li>
- * <li><pre>
- * prefix = { 'a' , 'B' }
- * name = { 'a' , 'b', 'b', 'a', 'b', 'a' }
- * isCaseSensitive = true
- * result => false
- * </pre>
- * </li>
- * </ol>
- *
- * @param prefix the given prefix
- * @param name the given name
- * @param isCaseSensitive to find out whether or not the comparison should be case sensitive
- * @return true if the given name starts with the given prefix, false otherwise
- * @exception NullPointerException if the given name is null or if the given prefix is null
- */
- public static final boolean prefixEquals(char[] prefix, char[] name,
- boolean isCaseSensitive) {
-
- int max = prefix.length;
- if (name.length < max)
- return false;
-
- for (int i = max; --i >= 0;) {
- if (prefix[i] == name[i]
- || (isCaseSensitive && Character.toLowerCase(prefix[i]) == Character
- .toLowerCase(name[i]))) {
- continue;
- }
- return false;
- }
- return true;
- }
-}
Modified: trunk/metadata/src/main/java/org/teiid/metadata/index/IndexConstants.java
===================================================================
--- trunk/metadata/src/main/java/org/teiid/metadata/index/IndexConstants.java 2009-10-24 18:07:35 UTC (rev 1536)
+++ trunk/metadata/src/main/java/org/teiid/metadata/index/IndexConstants.java 2009-10-25 02:00:37 UTC (rev 1537)
@@ -22,7 +22,6 @@
package org.teiid.metadata.index;
-import org.teiid.connector.metadata.runtime.MetadataConstants;
/**
* IndexConstants
Copied: trunk/metadata/src/main/java/org/teiid/metadata/index/IndexMetadataFactory.java (from rev 1529, trunk/metadata/src/main/java/org/teiid/metadata/index/IndexMetadataStore.java)
===================================================================
--- trunk/metadata/src/main/java/org/teiid/metadata/index/IndexMetadataFactory.java (rev 0)
+++ trunk/metadata/src/main/java/org/teiid/metadata/index/IndexMetadataFactory.java 2009-10-25 02:00:37 UTC (rev 1537)
@@ -0,0 +1,468 @@
+/*
+ * 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.metadata.index;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.teiid.connector.metadata.runtime.AbstractMetadataRecord;
+import org.teiid.connector.metadata.runtime.ColumnRecordImpl;
+import org.teiid.connector.metadata.runtime.ColumnSetRecordImpl;
+import org.teiid.connector.metadata.runtime.DatatypeRecordImpl;
+import org.teiid.connector.metadata.runtime.ForeignKeyRecordImpl;
+import org.teiid.connector.metadata.runtime.KeyRecord;
+import org.teiid.connector.metadata.runtime.MetadataStore;
+import org.teiid.connector.metadata.runtime.ModelRecordImpl;
+import org.teiid.connector.metadata.runtime.ProcedureParameterRecordImpl;
+import org.teiid.connector.metadata.runtime.ProcedureRecordImpl;
+import org.teiid.connector.metadata.runtime.TableRecordImpl;
+import org.teiid.core.index.IEntryResult;
+import org.teiid.internal.core.index.Index;
+import org.teiid.metadata.TransformationMetadata;
+
+import com.metamatrix.api.exception.query.QueryMetadataException;
+import com.metamatrix.core.MetaMatrixCoreException;
+import com.metamatrix.core.MetaMatrixRuntimeException;
+import com.metamatrix.core.id.UUID;
+import com.metamatrix.core.util.ArgCheck;
+import com.metamatrix.core.util.StringUtil;
+import com.metamatrix.metadata.runtime.api.MetadataSource;
+
+/**
+ * Loads MetadataRecords from index files.
+ */
+public class IndexMetadataFactory {
+
+ private Index[] indexes;
+ private Map<String, DatatypeRecordImpl> datatypeCache;
+ private Map<String, KeyRecord> primaryKeyCache = new HashMap<String, KeyRecord>();
+ private MetadataStore store = new MetadataStore();
+
+ public IndexMetadataFactory(MetadataSource source) throws IOException {
+ ArrayList<Index> tmp = new ArrayList<Index>();
+ for (String fileName : source.getEntries()) {
+ if (SimpleIndexUtil.isIndexFile(fileName)) {
+ File f = source.getFile(fileName);
+ tmp.add( new Index(f.getAbsolutePath(), true) );
+ }
+ }
+ this.indexes = tmp.toArray(new Index[tmp.size()]);
+ getDatatypeCache();
+ getModels();
+ getTables();
+ getProcedures();
+ }
+
+ public MetadataStore getMetadataStore() {
+ return store;
+ }
+
+ public void getModels() {
+ Collection<ModelRecordImpl> records = findMetadataRecords(MetadataConstants.RECORD_TYPE.MODEL, null, false);
+ for (ModelRecordImpl modelRecord : records) {
+ store.addModel(modelRecord);
+ }
+ }
+
+ public void getTables() {
+ Collection<TableRecordImpl> records = findMetadataRecords(MetadataConstants.RECORD_TYPE.TABLE, null, false);
+ for (TableRecordImpl tableRecord : records) {
+ List<ColumnRecordImpl> columns = new ArrayList<ColumnRecordImpl>(findChildRecords(tableRecord, MetadataConstants.RECORD_TYPE.COLUMN));
+ for (ColumnRecordImpl columnRecordImpl : columns) {
+ columnRecordImpl.setDatatype(getDatatypeCache().get(columnRecordImpl.getDatatypeUUID()));
+ }
+ Collections.sort(columns);
+ tableRecord.setColumns(columns);
+ tableRecord.setAccessPatterns(findChildRecords(tableRecord, MetadataConstants.RECORD_TYPE.ACCESS_PATTERN));
+ Map<String, ColumnRecordImpl> uuidColumnMap = new HashMap<String, ColumnRecordImpl>();
+ for (ColumnRecordImpl columnRecordImpl : columns) {
+ uuidColumnMap.put(columnRecordImpl.getUUID(), columnRecordImpl);
+ }
+ for (KeyRecord columnSetRecordImpl : tableRecord.getAccessPatterns()) {
+ loadColumnSetRecords(columnSetRecordImpl, uuidColumnMap);
+ columnSetRecordImpl.setTable(tableRecord);
+ }
+ tableRecord.setForiegnKeys(findChildRecords(tableRecord, MetadataConstants.RECORD_TYPE.FOREIGN_KEY));
+ for (ForeignKeyRecordImpl foreignKeyRecord : tableRecord.getForeignKeys()) {
+ foreignKeyRecord.setPrimaryKey(getPrimaryKey(foreignKeyRecord.getUniqueKeyID()));
+ loadColumnSetRecords(foreignKeyRecord, uuidColumnMap);
+ foreignKeyRecord.setTable(tableRecord);
+ }
+ tableRecord.setUniqueKeys(findChildRecords(tableRecord, MetadataConstants.RECORD_TYPE.UNIQUE_KEY));
+ for (KeyRecord columnSetRecordImpl : tableRecord.getUniqueKeys()) {
+ loadColumnSetRecords(columnSetRecordImpl, uuidColumnMap);
+ columnSetRecordImpl.setTable(tableRecord);
+ }
+ tableRecord.setIndexes(findChildRecords(tableRecord, MetadataConstants.RECORD_TYPE.INDEX));
+ for (KeyRecord columnSetRecordImpl : tableRecord.getIndexes()) {
+ loadColumnSetRecords(columnSetRecordImpl, uuidColumnMap);
+ columnSetRecordImpl.setTable(tableRecord);
+ }
+ if (tableRecord.getPrimaryKey() != null) {
+ KeyRecord primaryKey = getPrimaryKey(tableRecord.getPrimaryKey().getUUID());
+ loadColumnSetRecords(primaryKey, uuidColumnMap);
+ primaryKey.setTable(tableRecord);
+ tableRecord.setPrimaryKey(primaryKey);
+ }
+ String groupName = tableRecord.getFullName();
+ if (tableRecord.isVirtual()) {
+ TransformationRecordImpl update = (TransformationRecordImpl)getRecordByType(groupName, MetadataConstants.RECORD_TYPE.UPDATE_TRANSFORM,false);
+ if (update != null) {
+ tableRecord.setUpdatePlan(update.getTransformation());
+ }
+ TransformationRecordImpl insert = (TransformationRecordImpl)getRecordByType(groupName, MetadataConstants.RECORD_TYPE.INSERT_TRANSFORM,false);
+ if (insert != null) {
+ tableRecord.setInsertPlan(insert.getTransformation());
+ }
+ TransformationRecordImpl delete = (TransformationRecordImpl)getRecordByType(groupName, MetadataConstants.RECORD_TYPE.DELETE_TRANSFORM,false);
+ if (delete != null) {
+ tableRecord.setDeletePlan(delete.getTransformation());
+ }
+ TransformationRecordImpl select = (TransformationRecordImpl)getRecordByType(groupName, MetadataConstants.RECORD_TYPE.SELECT_TRANSFORM,false);
+ // this group may be an xml document
+ if(select == null) {
+ select = (TransformationRecordImpl)getRecordByType(groupName, MetadataConstants.RECORD_TYPE.MAPPING_TRANSFORM,false);
+ }
+ if (select != null) {
+ tableRecord.setSelectTransformation(select.getTransformation());
+ tableRecord.setBindings(select.getBindings());
+ tableRecord.setSchemaPaths(select.getSchemaPaths());
+ tableRecord.setResourcePath(select.getResourcePath());
+ }
+ }
+ if (tableRecord.isMaterialized()) {
+ tableRecord.setMaterializedStageTableName(((TableRecordImpl)getRecordByType(tableRecord.getMaterializedStageTableID(), MetadataConstants.RECORD_TYPE.TABLE)).getFullName());
+ tableRecord.setMaterializedTableName(((TableRecordImpl)getRecordByType(tableRecord.getMaterializedTableID(), MetadataConstants.RECORD_TYPE.TABLE)).getFullName());
+ }
+ this.store.addTable(tableRecord);
+ }
+ }
+
+ private KeyRecord getPrimaryKey(String uuid) {
+ KeyRecord pk = this.primaryKeyCache.get(uuid);
+ if (pk == null) {
+ pk = (KeyRecord)this.getRecordByType(uuid, MetadataConstants.RECORD_TYPE.PRIMARY_KEY);
+ this.primaryKeyCache.put(uuid, pk);
+ }
+ return pk;
+ }
+
+ public Map<String, DatatypeRecordImpl> getDatatypeCache() {
+ if (this.datatypeCache == null) {
+ this.datatypeCache = new HashMap<String, DatatypeRecordImpl>();
+ Collection<DatatypeRecordImpl> dataTypes = findMetadataRecords(MetadataConstants.RECORD_TYPE.DATATYPE, null, false);
+ for (DatatypeRecordImpl datatypeRecordImpl : dataTypes) {
+ datatypeCache.put(datatypeRecordImpl.getUUID(), datatypeRecordImpl);
+ this.store.addDatatype(datatypeRecordImpl);
+ }
+ }
+ return datatypeCache;
+ }
+
+ private ColumnRecordImpl findElement(String fullName) {
+ ColumnRecordImpl columnRecord = (ColumnRecordImpl)getRecordByType(fullName, MetadataConstants.RECORD_TYPE.COLUMN);
+ columnRecord.setDatatype(getDatatypeCache().get(columnRecord.getDatatypeUUID()));
+ return columnRecord;
+ }
+
+ private AbstractMetadataRecord getRecordByType(final String entityName, final char recordType) {
+ return getRecordByType(entityName, recordType, true);
+ }
+
+ private AbstractMetadataRecord getRecordByType(final String entityName, final char recordType, boolean mustExist) {
+ // Query the index files
+ final Collection results = findMetadataRecords(recordType,entityName,false);
+
+ int resultSize = results.size();
+ if(resultSize == 1) {
+ // get the columnset record for this result
+ return (AbstractMetadataRecord) results.iterator().next();
+ }
+ if(resultSize == 0) {
+ if (mustExist) {
+ // there should be only one for the UUID
+ throw new MetaMatrixRuntimeException(entityName+TransformationMetadata.NOT_EXISTS_MESSAGE);
+ }
+ return null;
+ }
+ throw new MetaMatrixRuntimeException(RuntimeMetadataPlugin.Util.getString("TransformationMetadata.0", entityName)); //$NON-NLS-1$
+ }
+
+ public void getProcedures() {
+ Collection<ProcedureRecordImpl> procedureRecordImpls = findMetadataRecords(MetadataConstants.RECORD_TYPE.CALLABLE, null, false);
+ for (ProcedureRecordImpl procedureRecord : procedureRecordImpls) {
+ procedureRecord.setParameters(new ArrayList<ProcedureParameterRecordImpl>(procedureRecord.getParameterIDs().size()));
+
+ // get the parameter metadata info
+ for (String paramID : procedureRecord.getParameterIDs()) {
+ ProcedureParameterRecordImpl paramRecord = (ProcedureParameterRecordImpl) this.getRecordByType(paramID, MetadataConstants.RECORD_TYPE.CALLABLE_PARAMETER);
+ paramRecord.setDatatype(getDatatypeCache().get(paramRecord.getDatatypeUUID()));
+ procedureRecord.getParameters().add(paramRecord);
+ }
+
+ String resultID = procedureRecord.getResultSetID();
+ if(resultID != null) {
+ ColumnSetRecordImpl resultRecord = (ColumnSetRecordImpl) getRecordByType(resultID, MetadataConstants.RECORD_TYPE.RESULT_SET, false);
+ if (resultRecord != null) {
+ loadColumnSetRecords(resultRecord, null);
+ procedureRecord.setResultSet(resultRecord);
+ }
+ //it is ok to be null here. it will happen when a
+ //virtual stored procedure is created from a
+ //physical stored procedrue without a result set
+ //TODO: find a better fix for this
+ }
+
+ // if this is a virtual procedure get the procedure plan
+ if(procedureRecord.isVirtual()) {
+ TransformationRecordImpl transformRecord = (TransformationRecordImpl)getRecordByType(procedureRecord.getFullName(), MetadataConstants.RECORD_TYPE.PROC_TRANSFORM, false);
+ if(transformRecord != null) {
+ procedureRecord.setQueryPlan(transformRecord.getTransformation());
+ }
+ }
+ this.store.addProcedure(procedureRecord);
+ }
+ }
+
+ /**
+ * Finds children by parent uuid - note that this is not the best way to query for columns,
+ * but it removes the need to store the parent uuid
+ * @param parentRecord
+ * @param childRecordType
+ * @return
+ */
+ private List findChildRecords(final AbstractMetadataRecord parentRecord, final char childRecordType) {
+ // construct the pattern string
+ String patternStr = getUUIDMatchPattern(childRecordType, parentRecord.getUUID(), true);
+ // Query the model index files
+ IEntryResult[] results = queryIndex(childRecordType, patternStr.toCharArray(), false, true, false);
+
+ return loadRecords(results);
+ }
+
+ private void loadColumnSetRecords(ColumnSetRecordImpl indexRecord, Map<String, ColumnRecordImpl> columns) {
+ for (int i = 0; i < indexRecord.getColumns().size(); i++) {
+ String uuid = indexRecord.getColumns().get(i).getUUID();
+ if (columns != null) {
+ indexRecord.getColumns().set(i, columns.get(uuid));
+ } else {
+ indexRecord.getColumns().set(i, findElement(uuid));
+ }
+ }
+ }
+
+ private Collection findMetadataRecords(final char recordType,
+ final String entityName, final boolean isPartialName) {
+ IEntryResult[] results = queryIndex(recordType, entityName, isPartialName);
+ Collection<AbstractMetadataRecord> records = loadRecords(results);
+ return records;
+ }
+
+ private List<AbstractMetadataRecord> loadRecords(
+ IEntryResult[] results) {
+ List<AbstractMetadataRecord> records = RecordFactory.getMetadataRecord(results);
+
+ for (AbstractMetadataRecord metadataRecord : records) {
+ String uuid = metadataRecord.getUUID();
+
+ String prefixString = getUUIDMatchPattern(MetadataConstants.RECORD_TYPE.ANNOTATION, uuid, false);
+ IEntryResult[] annotations = queryIndex(MetadataConstants.RECORD_TYPE.ANNOTATION, prefixString.toCharArray(), false, true, true);
+ if (annotations.length > 0) {
+ metadataRecord.setAnnotation(RecordFactory.createAnnotationRecord(annotations[0].getWord()));
+ }
+
+ prefixString = String.valueOf(MetadataConstants.RECORD_TYPE.PROPERTY) + IndexConstants.RECORD_STRING.RECORD_DELIMITER + uuid.trim() + IndexConstants.RECORD_STRING.RECORD_DELIMITER;
+ IEntryResult[] properties = queryIndex(MetadataConstants.RECORD_TYPE.PROPERTY, prefixString.toCharArray(), true, true, true);
+ metadataRecord.setProperties(RecordFactory.createPropertyRecord(properties));
+ }
+ return records;
+ }
+
+ /**
+ * Return the pattern match string that could be used to match a UUID in
+ * an index record. All index records contain a header portion of the form:
+ * recordType|pathInModel|UUID|nameInSource|parentObjectID|
+ * @param uuid The UUID for which the pattern match string is to be constructed.
+ * @return The pattern match string of the form: recordType|*|uuid|*
+ */
+ private String getUUIDMatchPattern(final char recordType, String uuid, boolean parent) {
+ ArgCheck.isNotNull(uuid);
+ // construct the pattern string
+ String patternStr = String.valueOf(recordType) + IndexConstants.RECORD_STRING.RECORD_DELIMITER + IndexConstants.RECORD_STRING.MATCH_CHAR + IndexConstants.RECORD_STRING.RECORD_DELIMITER;
+ if (parent) {
+ for (int i = 0; i < 3; i++) {
+ patternStr += String.valueOf(IndexConstants.RECORD_STRING.MATCH_CHAR) + IndexConstants.RECORD_STRING.RECORD_DELIMITER;
+ }
+ }
+ patternStr += uuid.toLowerCase() + IndexConstants.RECORD_STRING.RECORD_DELIMITER + IndexConstants.RECORD_STRING.MATCH_CHAR;
+ return patternStr;
+ }
+
+ /**
+ * @see com.metamatrix.modeler.core.index.IndexSelector#getIndexes()
+ * @since 4.2
+ */
+ public synchronized Index[] getIndexes() {
+ return this.indexes;
+ }
+
+ /**
+ * Return all index file records that match the specified entity name
+ * @param indexName
+ * @param entityName the name to match
+ * @param isPartialName true if the entity name is a partially qualified
+ * @return results
+ * @throws QueryMetadataException
+ */
+ private IEntryResult[] queryIndex(final char recordType, final String entityName, final boolean isPartialName) {
+
+ IEntryResult[] results = null;
+
+ // Query based on UUID
+ if (StringUtil.startsWithIgnoreCase(entityName,UUID.PROTOCOL)) {
+ String patternString = null;
+ if (recordType == MetadataConstants.RECORD_TYPE.DATATYPE) {
+ patternString = getDatatypeUUIDMatchPattern(entityName);
+ } else {
+ patternString = getUUIDMatchPattern(recordType,entityName, false);
+ }
+ results = queryIndex(recordType, patternString.toCharArray(), false, true, true);
+ }
+
+ // Query based on partially qualified name
+ else if (isPartialName) {
+ String patternString = getMatchPattern(recordType,entityName);
+ results = queryIndex(recordType, patternString.toCharArray(), false, true, false);
+ }
+
+ // Query based on fully qualified name
+ else {
+ String prefixString = getPrefixPattern(recordType,entityName);
+ results = queryIndex(recordType, prefixString.toCharArray(), true, true, true);
+ }
+
+ return results;
+ }
+
+ /**
+ * Return the pattern match string that could be used to match a UUID in
+ * a datatype index record. The RECORD_TYPE.DATATYPE records contain a header portion of the form:
+ * recordType|datatypeID|basetypeID|fullName|objectID|nameInSource|...
+ * @param uuid The UUID for which the pattern match string is to be constructed.
+ * @return The pattern match string of the form: recordType|*|*|*|uuid|*
+ */
+ private String getDatatypeUUIDMatchPattern(final String uuid) {
+ ArgCheck.isNotNull(uuid);
+ String uuidString = uuid;
+ if (StringUtil.startsWithIgnoreCase(uuid,UUID.PROTOCOL)) {
+ uuidString = uuid.toLowerCase();
+ }
+ // construct the pattern string
+ String patternStr = "" //$NON-NLS-1$
+ + MetadataConstants.RECORD_TYPE.DATATYPE //recordType
+ + IndexConstants.RECORD_STRING.RECORD_DELIMITER
+ + IndexConstants.RECORD_STRING.MATCH_CHAR //datatypeID
+ + IndexConstants.RECORD_STRING.RECORD_DELIMITER
+ + IndexConstants.RECORD_STRING.MATCH_CHAR //basetypeID
+ + IndexConstants.RECORD_STRING.RECORD_DELIMITER
+ + IndexConstants.RECORD_STRING.MATCH_CHAR //fullName
+ + IndexConstants.RECORD_STRING.RECORD_DELIMITER
+ + uuidString //objectID
+ + IndexConstants.RECORD_STRING.RECORD_DELIMITER
+ + IndexConstants.RECORD_STRING.MATCH_CHAR;
+ return patternStr;
+ }
+
+ /**
+ * Return the prefix match string that could be used to exactly match a fully
+ * qualified entity name in an index record. All index records
+ * contain a header portion of the form:
+ * recordType|pathInModel|UUID|nameInSource|parentObjectID|
+ * @param name The fully qualified name for which the prefix match
+ * string is to be constructed.
+ * @return The pattern match string of the form: recordType|name|
+ */
+ private String getPrefixPattern(final char recordType, final String name) {
+
+ // construct the pattern string
+ String patternStr = "" //$NON-NLS-1$
+ + recordType
+ + IndexConstants.RECORD_STRING.RECORD_DELIMITER;
+ if(name != null) {
+ patternStr = patternStr + name.trim().toUpperCase() + IndexConstants.RECORD_STRING.RECORD_DELIMITER;
+ }
+
+ return patternStr;
+ }
+
+ /**
+ * Return the pattern match string that could be used to match a
+ * partially/fully qualified entity name in an index record. All index records
+ * contain a header portion of the form:
+ * recordType|pathInModel|UUID|nameInSource|parentObjectID|
+ * @param name The partially/fully qualified name for which
+ * the pattern match string is to be constructed.
+ * @return The pattern match string of the form: recordType|*name|*
+ */
+ private String getMatchPattern(final char recordType, final String name) {
+ ArgCheck.isNotNull(name);
+
+ // construct the pattern string
+ String patternStr = "" //$NON-NLS-1$
+ + recordType
+ + IndexConstants.RECORD_STRING.RECORD_DELIMITER
+ + IndexConstants.RECORD_STRING.MATCH_CHAR;
+ if(name != null) {
+ patternStr = patternStr + name.trim().toUpperCase()
+ + IndexConstants.RECORD_STRING.RECORD_DELIMITER
+ + IndexConstants.RECORD_STRING.MATCH_CHAR;
+ }
+ return patternStr;
+ }
+
+ /**
+ * Return all index file records that match the specified record pattern.
+ * @param indexes the array of MtkIndex instances to query
+ * @param pattern
+ * @return results
+ * @throws QueryMetadataException
+ */
+ private IEntryResult[] queryIndex(char recordType, final char[] pattern, boolean isPrefix, boolean isCaseSensitive, boolean returnFirstMatch) {
+ // The the index file name for the record type
+ final String indexName = SimpleIndexUtil.getIndexFileNameForRecordType(recordType);
+ Index[] search = SimpleIndexUtil.getIndexes(indexName, this.getIndexes());
+
+ try {
+ return SimpleIndexUtil.queryIndex(null, search, pattern, isPrefix, isCaseSensitive, returnFirstMatch);
+ } catch (MetaMatrixCoreException e) {
+ throw new MetaMatrixRuntimeException(e);
+ }
+ }
+
+}
Property changes on: trunk/metadata/src/main/java/org/teiid/metadata/index/IndexMetadataFactory.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: trunk/metadata/src/main/java/org/teiid/metadata/index/IndexMetadataStore.java
===================================================================
--- trunk/metadata/src/main/java/org/teiid/metadata/index/IndexMetadataStore.java 2009-10-24 18:07:35 UTC (rev 1536)
+++ trunk/metadata/src/main/java/org/teiid/metadata/index/IndexMetadataStore.java 2009-10-25 02:00:37 UTC (rev 1537)
@@ -1,593 +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.metadata.index;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.teiid.connector.metadata.runtime.AbstractMetadataRecord;
-import org.teiid.connector.metadata.runtime.ColumnRecordImpl;
-import org.teiid.connector.metadata.runtime.ColumnSetRecordImpl;
-import org.teiid.connector.metadata.runtime.DatatypeRecordImpl;
-import org.teiid.connector.metadata.runtime.ForeignKeyRecordImpl;
-import org.teiid.connector.metadata.runtime.MetadataConstants;
-import org.teiid.connector.metadata.runtime.ModelRecordImpl;
-import org.teiid.connector.metadata.runtime.ProcedureParameterRecordImpl;
-import org.teiid.connector.metadata.runtime.ProcedureRecordImpl;
-import org.teiid.connector.metadata.runtime.PropertyRecordImpl;
-import org.teiid.connector.metadata.runtime.TableRecordImpl;
-import org.teiid.connector.metadata.runtime.TransformationRecordImpl;
-import org.teiid.core.index.IEntryResult;
-import org.teiid.internal.core.index.Index;
-import org.teiid.metadata.RuntimeMetadataPlugin;
-import org.teiid.metadata.TransformationMetadata;
-
-import com.metamatrix.api.exception.MetaMatrixComponentException;
-import com.metamatrix.api.exception.query.QueryMetadataException;
-import com.metamatrix.core.MetaMatrixCoreException;
-import com.metamatrix.core.MetaMatrixRuntimeException;
-import com.metamatrix.core.id.UUID;
-import com.metamatrix.core.util.ArgCheck;
-import com.metamatrix.core.util.StringUtil;
-import com.metamatrix.metadata.runtime.api.MetadataSource;
-import com.metamatrix.query.metadata.MetadataStore;
-
-/**
- * Loads MetadataRecords from index files.
- * Only datatypes are directly cached.
- */
-public class IndexMetadataStore implements MetadataStore {
-
- private Index[] indexes;
- private Map<String, DatatypeRecordImpl> datatypeCache;
-
- public IndexMetadataStore(MetadataSource source) throws IOException {
- ArrayList<Index> tmp = new ArrayList<Index>();
- for (String fileName : source.getEntries()) {
- if (SimpleIndexUtil.isIndexFile(fileName)) {
- File f = source.getFile(fileName);
- tmp.add( new Index(f.getAbsolutePath(), true) );
- }
- }
- this.indexes = tmp.toArray(new Index[tmp.size()]);
- }
-
- @Override
- public boolean postProcessFindMetadataRecords() {
- return false;
- }
-
- @Override
- public Collection<String> getModelNames() {
- Collection<ModelRecordImpl> records;
- try {
- records = findMetadataRecords(MetadataConstants.RECORD_TYPE.MODEL, null, false);
- } catch (MetaMatrixComponentException e) {
- throw new MetaMatrixRuntimeException(e);
- }
- List<String> result = new ArrayList<String>(records.size());
- for (ModelRecordImpl modelRecord : records) {
- result.add(modelRecord.getName());
- }
- return result;
- }
-
- public ModelRecordImpl getModel(String name) throws QueryMetadataException, MetaMatrixComponentException {
- return (ModelRecordImpl)getRecordByType(name, MetadataConstants.RECORD_TYPE.MODEL);
- }
-
- @Override
- public TableRecordImpl findGroup(String groupName) throws QueryMetadataException, MetaMatrixComponentException {
- TableRecordImpl tableRecord = (TableRecordImpl)getRecordByType(groupName, MetadataConstants.RECORD_TYPE.TABLE);
- List<ColumnRecordImpl> columns = new ArrayList<ColumnRecordImpl>(findChildRecords(tableRecord, MetadataConstants.RECORD_TYPE.COLUMN, true));
- for (ColumnRecordImpl columnRecordImpl : columns) {
- columnRecordImpl.setDatatype(getDatatypeCache().get(columnRecordImpl.getDatatypeUUID()));
- }
- Collections.sort(columns);
- tableRecord.setColumns(columns);
- tableRecord.setAccessPatterns(findChildRecords(tableRecord, MetadataConstants.RECORD_TYPE.ACCESS_PATTERN, true));
- Map<String, ColumnRecordImpl> uuidColumnMap = new HashMap<String, ColumnRecordImpl>();
- for (ColumnRecordImpl columnRecordImpl : columns) {
- uuidColumnMap.put(columnRecordImpl.getUUID(), columnRecordImpl);
- }
- for (ColumnSetRecordImpl columnSetRecordImpl : tableRecord.getAccessPatterns()) {
- loadColumnSetRecords(columnSetRecordImpl, uuidColumnMap);
- }
- tableRecord.setForiegnKeys(findChildRecords(tableRecord, MetadataConstants.RECORD_TYPE.FOREIGN_KEY, true));
- for (ForeignKeyRecordImpl foreignKeyRecord : tableRecord.getForeignKeys()) {
- (foreignKeyRecord).setPrimaryKey((ColumnSetRecordImpl)this.getRecordByType(foreignKeyRecord.getUniqueKeyID(), MetadataConstants.RECORD_TYPE.PRIMARY_KEY));
- loadColumnSetRecords(foreignKeyRecord, uuidColumnMap);
- }
- tableRecord.setUniqueKeys(findChildRecords(tableRecord, MetadataConstants.RECORD_TYPE.UNIQUE_KEY, true));
- for (ColumnSetRecordImpl columnSetRecordImpl : tableRecord.getUniqueKeys()) {
- loadColumnSetRecords(columnSetRecordImpl, uuidColumnMap);
- }
- if (tableRecord.getPrimaryKeyID() != null) {
- ColumnSetRecordImpl primaryKey = (ColumnSetRecordImpl)getRecordByType(tableRecord.getPrimaryKeyID(), MetadataConstants.RECORD_TYPE.PRIMARY_KEY);
- loadColumnSetRecords(primaryKey, uuidColumnMap);
- tableRecord.setPrimaryKey(primaryKey);
- }
- if (tableRecord.isVirtual()) {
- TransformationRecordImpl update = (TransformationRecordImpl)getRecordByType(groupName, MetadataConstants.RECORD_TYPE.UPDATE_TRANSFORM,false);
- if (update != null) {
- tableRecord.setUpdatePlan(update.getTransformation());
- }
- TransformationRecordImpl insert = (TransformationRecordImpl)getRecordByType(groupName, MetadataConstants.RECORD_TYPE.INSERT_TRANSFORM,false);
- if (insert != null) {
- tableRecord.setInsertPlan(insert.getTransformation());
- }
- TransformationRecordImpl delete = (TransformationRecordImpl)getRecordByType(groupName, MetadataConstants.RECORD_TYPE.DELETE_TRANSFORM,false);
- if (delete != null) {
- tableRecord.setDeletePlan(delete.getTransformation());
- }
- TransformationRecordImpl select = (TransformationRecordImpl)getRecordByType(groupName, MetadataConstants.RECORD_TYPE.SELECT_TRANSFORM,false);
- // this group may be an xml document
- if(select == null) {
- select = (TransformationRecordImpl)getRecordByType(groupName, MetadataConstants.RECORD_TYPE.MAPPING_TRANSFORM,false);
- }
- tableRecord.setSelectTransformation(select);
- }
- if (tableRecord.isMaterialized()) {
- tableRecord.setMaterializedStageTableName(getRecordByType(tableRecord.getMaterializedStageTableID(), MetadataConstants.RECORD_TYPE.TABLE).getFullName());
- tableRecord.setMaterializedTableName(getRecordByType(tableRecord.getMaterializedTableID(), MetadataConstants.RECORD_TYPE.TABLE).getFullName());
- }
- return tableRecord;
- }
-
- private Map<String, DatatypeRecordImpl> getDatatypeCache() throws MetaMatrixComponentException {
- if (this.datatypeCache == null) {
- this.datatypeCache = new HashMap<String, DatatypeRecordImpl>();
- Collection<DatatypeRecordImpl> dataTypes = findMetadataRecords(MetadataConstants.RECORD_TYPE.DATATYPE, null, false);
- for (DatatypeRecordImpl datatypeRecordImpl : dataTypes) {
- datatypeCache.put(datatypeRecordImpl.getUUID(), datatypeRecordImpl);
- }
- }
- return datatypeCache;
- }
-
- public Collection<DatatypeRecordImpl> getDatatypes() throws MetaMatrixComponentException {
- return getDatatypeCache().values();
- }
-
- @Override
- public ColumnRecordImpl findElement(String fullName) throws QueryMetadataException, MetaMatrixComponentException {
- ColumnRecordImpl columnRecord = (ColumnRecordImpl)getRecordByType(fullName, MetadataConstants.RECORD_TYPE.COLUMN);
- columnRecord.setDatatype(getDatatypeCache().get(columnRecord.getDatatypeUUID()));
- return columnRecord;
- }
-
- @Override
- public Collection<String> getGroupsForPartialName(String partialGroupName)
- throws MetaMatrixComponentException, QueryMetadataException {
- // Query the index files
- Collection<String> tableRecords = findMetadataRecords(MetadataConstants.RECORD_TYPE.TABLE,partialGroupName,true);
-
- // Extract the fully qualified names to return
- final Collection tableNames = new ArrayList(tableRecords.size());
- for(Iterator recordIter = tableRecords.iterator();recordIter.hasNext();) {
- // get the table record for this result
- TableRecordImpl tableRecord = (TableRecordImpl) recordIter.next();
- tableNames.add(tableRecord.getFullName());
- }
- return tableNames;
- }
-
- private AbstractMetadataRecord getRecordByType(final String entityName, final char recordType) throws MetaMatrixComponentException, QueryMetadataException {
- return getRecordByType(entityName, recordType, true);
- }
-
- private AbstractMetadataRecord getRecordByType(final String entityName, final char recordType, boolean mustExist) throws MetaMatrixComponentException, QueryMetadataException {
- // Query the index files
- final Collection results = findMetadataRecords(recordType,entityName,false);
-
- int resultSize = results.size();
- if(resultSize == 1) {
- // get the columnset record for this result
- return (AbstractMetadataRecord) results.iterator().next();
- }
- if(resultSize == 0) {
- if (mustExist) {
- // there should be only one for the UUID
- throw new QueryMetadataException(entityName+TransformationMetadata.NOT_EXISTS_MESSAGE);
- }
- return null;
- }
- throw new QueryMetadataException(RuntimeMetadataPlugin.Util.getString("TransformationMetadata.0", entityName)); //$NON-NLS-1$
- }
-
- @Override
- public ProcedureRecordImpl getStoredProcedure(
- String fullyQualifiedProcedureName)
- throws MetaMatrixComponentException, QueryMetadataException {
- ProcedureRecordImpl procedureRecord = (ProcedureRecordImpl)getRecordByType(fullyQualifiedProcedureName, MetadataConstants.RECORD_TYPE.CALLABLE);
-
- procedureRecord.setParameters(new ArrayList<ProcedureParameterRecordImpl>(procedureRecord.getParameterIDs().size()));
-
- // get the parameter metadata info
- for (String paramID : procedureRecord.getParameterIDs()) {
- ProcedureParameterRecordImpl paramRecord = (ProcedureParameterRecordImpl) this.getRecordByType(paramID, MetadataConstants.RECORD_TYPE.CALLABLE_PARAMETER);
- paramRecord.setDatatype(getDatatypeCache().get(paramRecord.getDatatypeUUID()));
- procedureRecord.getParameters().add(paramRecord);
- }
-
- String resultID = procedureRecord.getResultSetID();
- if(resultID != null) {
- try {
- ColumnSetRecordImpl resultRecord = (ColumnSetRecordImpl) this.getRecordByType(resultID, MetadataConstants.RECORD_TYPE.RESULT_SET);
- loadColumnSetRecords(resultRecord, null);
- procedureRecord.setResultSet(resultRecord);
- } catch (QueryMetadataException e) {
- //it is ok to fail here. it will happen when a
- //virtual stored procedure is created from a
- //physical stored procedrue without a result set
- //TODO: find a better fix for this
- }
- }
-
- // if this is a virtual procedure get the procedure plan
- if(procedureRecord.isVirtual()) {
- TransformationRecordImpl transformRecord = (TransformationRecordImpl)getRecordByType(fullyQualifiedProcedureName, MetadataConstants.RECORD_TYPE.PROC_TRANSFORM, false);
- if(transformRecord != null) {
- procedureRecord.setQueryPlan(transformRecord.getTransformation());
- }
- }
-
- return procedureRecord;
- }
-
- @Override
- public Collection getXMLTempGroups(TableRecordImpl table) throws MetaMatrixComponentException {
- // Query the index files
- final Collection results = findChildRecords(table, MetadataConstants.RECORD_TYPE.TABLE, false);
- Collection tempGroups = new HashSet(results.size());
- for(Iterator resultIter = results.iterator();resultIter.hasNext();) {
- TableRecordImpl record = (TableRecordImpl) resultIter.next();
- if(record.getTableType() == MetadataConstants.TABLE_TYPES.XML_STAGING_TABLE_TYPE) {
- tempGroups.add(record);
- }
- }
- return tempGroups;
- }
-
- private Collection findChildRecords(final AbstractMetadataRecord parentRecord, final char childRecordType, boolean filter) throws MetaMatrixComponentException {
- IEntryResult[] results = queryIndexByParentPath(childRecordType, parentRecord.getFullName());
- Collection records = RecordFactory.getMetadataRecord(results);
-
- if (filter) {
- final String groupUUID = parentRecord.getUUID();
-
- for( Iterator resultsIter = records.iterator(); resultsIter.hasNext(); ) {
- AbstractMetadataRecord record = (AbstractMetadataRecord) resultsIter.next();
- String parentUUID = record.getParentUUID();
-
- if(parentUUID == null || !parentUUID.equalsIgnoreCase(groupUUID)) {
- resultsIter.remove();
- }
- }
- }
-
- return records;
- }
-
- private void loadColumnSetRecords(ColumnSetRecordImpl indexRecord, Map<String, ColumnRecordImpl> columns)
- throws MetaMatrixComponentException, QueryMetadataException {
- List uuids = indexRecord.getColumnIDs();
- List<ColumnRecordImpl> columnRecords = new ArrayList<ColumnRecordImpl>(uuids.size());
-
- for (Iterator uuidIter = uuids.iterator(); uuidIter.hasNext();) {
- String uuid = (String) uuidIter.next();
- if (columns != null) {
- columnRecords.add(columns.get(uuid));
- } else {
- columnRecords.add(findElement(uuid));
- }
- }
- indexRecord.setColumns(columnRecords);
- }
-
- @Override
- public Collection findMetadataRecords(final char recordType,
- final String entityName, final boolean isPartialName)
- throws MetaMatrixComponentException {
- IEntryResult[] results = queryIndex(recordType, entityName, isPartialName);
- Collection records = RecordFactory.getMetadataRecord(results);;
-
- if(StringUtil.startsWithIgnoreCase(entityName,UUID.PROTOCOL)) {
- // Filter out ColumnRecord instances that do not match the specified uuid.
- // Due to the pattern matching used to query index files if an index record
- // matched the specified uuid string anywhere in that record it would be returned
- // in the results (for example, if the parent ObjectID in the index record
- // matched the specified uuid).
- if (entityName != null && records != null) {
- for (final Iterator iter = records.iterator(); iter.hasNext();) {
- final AbstractMetadataRecord record = (AbstractMetadataRecord)iter.next();
- if (record == null || !entityName.equals(record.getUUID())) {
- iter.remove();
- }
- }
- }
- }
-
- return records;
- }
-
- @Override
- public Collection<AbstractMetadataRecord> findMetadataRecords(String indexName,
- String pattern, boolean isPrefix,
- boolean isCaseSensitive) throws MetaMatrixCoreException {
- IEntryResult[] results = SimpleIndexUtil.queryIndex(null, SimpleIndexUtil.getIndexes(indexName, this), pattern==null?null:pattern.toCharArray(), isPrefix, isCaseSensitive, false);
- return RecordFactory.getMetadataRecord(results);
- }
-
- @Override
- public Collection<PropertyRecordImpl> getExtensionProperties(AbstractMetadataRecord metadataRecord) throws MetaMatrixComponentException {
- // find the entities properties records
- String uuid = metadataRecord.getUUID();
- String prefixString = getUUIDPrefixPattern(MetadataConstants.RECORD_TYPE.PROPERTY, uuid);
-
- IEntryResult[] results = queryIndex(MetadataConstants.RECORD_TYPE.PROPERTY, prefixString.toCharArray(), true, true, true);
-
- return RecordFactory.getMetadataRecord(results);
- }
-
- /**
- * Return the pattern match string that could be used to match a UUID in
- * an index record. All index records contain a header portion of the form:
- * recordType|pathInModel|UUID|nameInSource|parentObjectID|
- * @param uuid The UUID for which the pattern match string is to be constructed.
- * @return The pattern match string of the form: recordType|*|uuid|*
- */
- private String getUUIDMatchPattern(final char recordType, final String uuid) {
- ArgCheck.isNotNull(uuid);
- String uuidString = uuid;
- if (StringUtil.startsWithIgnoreCase(uuid,UUID.PROTOCOL)) {
- uuidString = uuid.toLowerCase();
- }
- // construct the pattern string
- String patternStr = "" //$NON-NLS-1$
- + recordType
- + IndexConstants.RECORD_STRING.RECORD_DELIMITER
- + IndexConstants.RECORD_STRING.MATCH_CHAR
- + IndexConstants.RECORD_STRING.RECORD_DELIMITER
- + uuidString
- + IndexConstants.RECORD_STRING.RECORD_DELIMITER
- + IndexConstants.RECORD_STRING.MATCH_CHAR;
- return patternStr;
- }
-
- private String getUUIDPrefixPattern(final char recordType, final String uuid) {
-
- // construct the pattern string
- String patternStr = "" //$NON-NLS-1$
- + recordType
- + IndexConstants.RECORD_STRING.RECORD_DELIMITER;
- if(uuid != null) {
- patternStr = patternStr + uuid.trim() + IndexConstants.RECORD_STRING.RECORD_DELIMITER;
- }
-
- return patternStr;
- }
-
- /**
- * @see com.metamatrix.modeler.core.index.IndexSelector#getIndexes()
- * @since 4.2
- */
- public synchronized Index[] getIndexes() {
- return this.indexes;
- }
-
- /**
- * Return the array of MtkIndex instances representing temporary indexes
- * @param selector
- * @return
- * @throws QueryMetadataException
- */
- private Index[] getIndexes(final char recordType) throws MetaMatrixComponentException {
- // The the index file name for the record type
- try {
- final String indexName = SimpleIndexUtil.getIndexFileNameForRecordType(recordType);
- return SimpleIndexUtil.getIndexes(indexName, this);
- } catch(Exception e) {
- throw new MetaMatrixComponentException(e, RuntimeMetadataPlugin.Util.getString("TransformationMetadata.Error_trying_to_obtain_index_file_using_IndexSelector_1",this)); //$NON-NLS-1$
- }
- }
-
- /**
- * Return all index file records that match the specified entity name
- * @param indexName
- * @param entityName the name to match
- * @param isPartialName true if the entity name is a partially qualified
- * @return results
- * @throws QueryMetadataException
- */
- private IEntryResult[] queryIndexByParentPath(final char recordType, final String parentFullName) throws MetaMatrixComponentException {
-
- // Query based on fully qualified name
- String prefixString = getParentPrefixPattern(recordType,parentFullName);
-
- // Query the model index files
- IEntryResult[] results = queryIndex(recordType, prefixString.toCharArray(), true, true, false);
-
- return results;
- }
-
- /**
- * Return all index file records that match the specified entity name
- * @param indexName
- * @param entityName the name to match
- * @param isPartialName true if the entity name is a partially qualified
- * @return results
- * @throws QueryMetadataException
- */
- private IEntryResult[] queryIndex(final char recordType, final String entityName, final boolean isPartialName) throws MetaMatrixComponentException {
-
- IEntryResult[] results = null;
-
- // Query based on UUID
- if (StringUtil.startsWithIgnoreCase(entityName,UUID.PROTOCOL)) {
- String patternString = null;
- if (recordType == MetadataConstants.RECORD_TYPE.DATATYPE) {
- patternString = getDatatypeUUIDMatchPattern(entityName);
- } else {
- patternString = getUUIDMatchPattern(recordType,entityName);
- }
- results = queryIndex(recordType, patternString.toCharArray(), false, true, true);
- }
-
- // Query based on partially qualified name
- else if (isPartialName) {
- String patternString = getMatchPattern(recordType,entityName);
- results = queryIndex(recordType, patternString.toCharArray(), false, true, false);
- }
-
- // Query based on fully qualified name
- else {
- String prefixString = getPrefixPattern(recordType,entityName);
- results = queryIndex(recordType, prefixString.toCharArray(), true, true, true);
- }
-
- return results;
- }
-
- /**
- * Return the pattern match string that could be used to match a UUID in
- * a datatype index record. The RECORD_TYPE.DATATYPE records contain a header portion of the form:
- * recordType|datatypeID|basetypeID|fullName|objectID|nameInSource|...
- * @param uuid The UUID for which the pattern match string is to be constructed.
- * @return The pattern match string of the form: recordType|*|*|*|uuid|*
- */
- private String getDatatypeUUIDMatchPattern(final String uuid) {
- ArgCheck.isNotNull(uuid);
- String uuidString = uuid;
- if (StringUtil.startsWithIgnoreCase(uuid,UUID.PROTOCOL)) {
- uuidString = uuid.toLowerCase();
- }
- // construct the pattern string
- String patternStr = "" //$NON-NLS-1$
- + MetadataConstants.RECORD_TYPE.DATATYPE //recordType
- + IndexConstants.RECORD_STRING.RECORD_DELIMITER
- + IndexConstants.RECORD_STRING.MATCH_CHAR //datatypeID
- + IndexConstants.RECORD_STRING.RECORD_DELIMITER
- + IndexConstants.RECORD_STRING.MATCH_CHAR //basetypeID
- + IndexConstants.RECORD_STRING.RECORD_DELIMITER
- + IndexConstants.RECORD_STRING.MATCH_CHAR //fullName
- + IndexConstants.RECORD_STRING.RECORD_DELIMITER
- + uuidString //objectID
- + IndexConstants.RECORD_STRING.RECORD_DELIMITER
- + IndexConstants.RECORD_STRING.MATCH_CHAR;
- return patternStr;
- }
-
- /**
- * Return the prefix match string that could be used to exactly match a fully
- * qualified entity name in an index record. All index records
- * contain a header portion of the form:
- * recordType|pathInModel|UUID|nameInSource|parentObjectID|
- * @param name The fully qualified name for which the prefix match
- * string is to be constructed.
- * @return The pattern match string of the form: recordType|name|
- */
- private String getParentPrefixPattern(final char recordType, final String name) {
-
- // construct the pattern string
- String patternStr = "" //$NON-NLS-1$
- + recordType
- + IndexConstants.RECORD_STRING.RECORD_DELIMITER;
- if(name != null) {
- patternStr = patternStr + name.trim().toUpperCase()+ TransformationMetadata.DELIMITER_CHAR;
- }
-
- return patternStr;
- }
-
- /**
- * Return the prefix match string that could be used to exactly match a fully
- * qualified entity name in an index record. All index records
- * contain a header portion of the form:
- * recordType|pathInModel|UUID|nameInSource|parentObjectID|
- * @param name The fully qualified name for which the prefix match
- * string is to be constructed.
- * @return The pattern match string of the form: recordType|name|
- */
- private String getPrefixPattern(final char recordType, final String name) {
-
- // construct the pattern string
- String patternStr = "" //$NON-NLS-1$
- + recordType
- + IndexConstants.RECORD_STRING.RECORD_DELIMITER;
- if(name != null) {
- patternStr = patternStr + name.trim().toUpperCase() + IndexConstants.RECORD_STRING.RECORD_DELIMITER;
- }
-
- return patternStr;
- }
-
- /**
- * Return the pattern match string that could be used to match a
- * partially/fully qualified entity name in an index record. All index records
- * contain a header portion of the form:
- * recordType|pathInModel|UUID|nameInSource|parentObjectID|
- * @param name The partially/fully qualified name for which
- * the pattern match string is to be constructed.
- * @return The pattern match string of the form: recordType|*name|*
- */
- private String getMatchPattern(final char recordType, final String name) {
- ArgCheck.isNotNull(name);
-
- // construct the pattern string
- String patternStr = "" //$NON-NLS-1$
- + recordType
- + IndexConstants.RECORD_STRING.RECORD_DELIMITER
- + IndexConstants.RECORD_STRING.MATCH_CHAR;
- if(name != null) {
- patternStr = patternStr + name.trim().toUpperCase()
- + IndexConstants.RECORD_STRING.RECORD_DELIMITER
- + IndexConstants.RECORD_STRING.MATCH_CHAR;
- }
- return patternStr;
- }
-
- /**
- * Return all index file records that match the specified record pattern.
- * @param indexes the array of MtkIndex instances to query
- * @param pattern
- * @return results
- * @throws QueryMetadataException
- */
- private IEntryResult[] queryIndex(char recordType, final char[] pattern, boolean isPrefix, boolean isCaseSensitive, boolean returnFirstMatch) throws MetaMatrixComponentException {
- try {
- return SimpleIndexUtil.queryIndex(null, getIndexes(recordType), pattern, isPrefix, isCaseSensitive, returnFirstMatch);
- } catch (MetaMatrixCoreException e) {
- throw new MetaMatrixComponentException(e, e.getMessage());
- }
- }
-
-}
Copied: trunk/metadata/src/main/java/org/teiid/metadata/index/MetadataConstants.java (from rev 1529, trunk/connector-api/src/main/java/org/teiid/connector/metadata/runtime/MetadataConstants.java)
===================================================================
--- trunk/metadata/src/main/java/org/teiid/metadata/index/MetadataConstants.java (rev 0)
+++ trunk/metadata/src/main/java/org/teiid/metadata/index/MetadataConstants.java 2009-10-25 02:00:37 UTC (rev 1537)
@@ -0,0 +1,293 @@
+/*
+ * 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.metadata.index;
+
+import com.metamatrix.core.util.StringUtil;
+
+/**
+ * MetadataConstants are all the constant values used to identify all the valid values for a multi-value attribute.
+ * All assigned short values start with 1. Therefore, when the get...TypeName(type) method is called, the
+ * method needs to subtract 1 from the argument.
+ */
+public final class MetadataConstants {
+
+ /** Definition of not defined long type. */
+ public static final long NOT_DEFINED_LONG = Long.MIN_VALUE;
+ /** Definition of not defined int type. */
+ public static final int NOT_DEFINED_INT = Integer.MIN_VALUE;
+ /** Definition of not defined short type. */
+ public static final short NOT_DEFINED_SHORT = Short.MIN_VALUE;
+
+ public final static String BLANK = StringUtil.Constants.EMPTY_STRING;
+
+ //properties
+ public static final String VERSION_DATE = "versionDate"; //$NON-NLS-1$
+
+ /**
+ * These types are associated with a KEY, indicating the type of matching that can be performed on it.
+ */
+ public final static class MATCH_TYPES {
+ public final static short FULL_MATCH = 0;
+ public final static short PARTIAL_MATCH = 1;
+ public final static short NEITHER_MATCH = 2;
+ public final static short NA = 3;
+ public final static String[] TYPE_NAMES = { "Full", //$NON-NLS-1$
+ "Partial", //$NON-NLS-1$
+ "Neither", //$NON-NLS-1$
+ "N/A" }; //$NON-NLS-1$
+ }
+
+ public final static String getMatchTypeName(short type) {
+ return MATCH_TYPES.TYPE_NAMES[type];
+ }
+
+
+ /**
+ * These types indicate the type of KEY it is.
+ * The values must be kept consistent with the values referenced in
+ * KeyTypeEnumeration.properties in connector.metadata
+ */
+ public final static class KEY_TYPES {
+ public final static short PRIMARY_KEY = 0;
+ public final static short FOREIGN_KEY = 1;
+ public final static short UNIQUE_KEY = 2;
+ public final static short NON_UNIQUE_KEY = 3;
+ public final static short ACCESS_PATTERN = 4;
+ public final static short INDEX = 5;
+ public final static String[] TYPE_NAMES = { "Primary", //$NON-NLS-1$
+ "Foreign", //$NON-NLS-1$
+ "Unique", //$NON-NLS-1$
+ "NonUnique", //$NON-NLS-1$
+ "AccessPattern", //$NON-NLS-1$
+ "Index" }; //$NON-NLS-1$
+ }
+ public final static String getKeyTypeName(short type) {
+ return KEY_TYPES.TYPE_NAMES[type];
+ }
+
+ /**
+ * These types indicate the type of COLUMN_SET it is.
+ * The values must be kept consistent with the values referenced in
+ * KeyTypeEnumeration.properties in connector.metadata
+ */
+ public final static class COLUMN_SET_TYPES {
+ public final static short FOREIGN_KEY = 0;
+ public final static short UNIQUE_KEY = 1;
+ public final static short ACCESS_PATTERN = 2;
+ public final static short INDEX = 3;
+ public final static short PROCEDURE_RESULT = 4;
+ public final static short TABLE = 5;
+ public final static String[] TYPE_NAMES = { "Foreign", //$NON-NLS-1$
+ "Unique", //$NON-NLS-1$
+ "AccessPattern", //$NON-NLS-1$
+ "Index", //$NON-NLS-1$
+ "Procedure_Result", //$NON-NLS-1$
+ "Table"}; //$NON-NLS-1$
+ }
+ public final static String getColumnSetTypeName(short type) {
+ return KEY_TYPES.TYPE_NAMES[type];
+ }
+
+ /**
+ * These types indicate the type of PROCEDURE it is.
+ * The values must be kept consistent with the values referenced in
+ * ProcTypeEnumeration.properties in connector.metadata
+ */
+ public final static class PROCEDURE_TYPES {
+ public final static short FUNCTION = 0;
+ public final static short STORED_PROCEDURE = 1;
+ public final static short STORED_QUERY = 2;
+ public final static String[] TYPE_NAMES = { "Function", //$NON-NLS-1$
+ "StoredProc", //$NON-NLS-1$
+ "StoredQuery" }; //$NON-NLS-1$
+ }
+ public final static String getProcedureTypeName(short type) {
+ return PROCEDURE_TYPES.TYPE_NAMES[type];
+ }
+
+ /**
+ * These types indicate the type of TRANSFORMATION it it.
+ */
+ public final static class SQL_TRANSFORMATION_TYPES {
+ public final static short MAPPING_DEFN = 0;
+ public final static short QUERY_PLAN_SELECT_QUERY = 1;
+ public final static short QUERY_PLAN_INSERT_QUERY = 2;
+ public final static short QUERY_PLAN_UPDATE_QUERY = 3;
+ public final static short QUERY_PLAN_DELETE_QUERY = 4;
+ public final static short QUERY_PLAN_STORED_QUERY = 5;
+ public final static String[] TYPE_NAMES = { "MappingDefn", //$NON-NLS-1$
+ "QueryPlanSelectQuery", //$NON-NLS-1$
+ "QueryPlanInsertQuery", //$NON-NLS-1$
+ "QueryPlanUpdateQuery", //$NON-NLS-1$
+ "QueryPlanDeleteQuery", //$NON-NLS-1$
+ "QueryPlanStoredQuery"}; //$NON-NLS-1$
+ }
+ public final static String getSqlTransformationTypeName(short type) {
+ return SQL_TRANSFORMATION_TYPES.TYPE_NAMES[type];
+ }
+
+ /**
+ * These types indicate the type of PROCEDURE_PARAMETER it is.
+ * The values must be kept consistent with the DirectionKind enumeration in the relational
+ * metamodel and the values referenced in ProcParamDirectionEnumeration.properties in connector.metadata
+ */
+ public final static class PARAMETER_TYPES {
+ public final static short IN_PARM = 0;
+ public final static short OUT_PARM = 1;
+ public final static short INOUT_PARM = 2;
+ public final static short RETURN_VALUE = 3;
+ public final static short RESULT_SET = 4;
+ public final static String[] TYPE_NAMES = { "In", //$NON-NLS-1$
+ "Out", //$NON-NLS-1$
+ "InOut", //$NON-NLS-1$
+ "ReturnValue", //$NON-NLS-1$
+ "ResultSet" }; //$NON-NLS-1$
+ }
+ public final static String getParameterTypeName(short type) {
+ return PARAMETER_TYPES.TYPE_NAMES[type];
+ }
+
+ /**
+ * These types are associated with the Element having valid search types.
+ * The values must be kept consistent with the SearchabilityType enumeration in the relational
+ * metamodel and the values referenced in SearchTypeEnumeration.properties in connector.metadata
+ */
+ public final static class SEARCH_TYPES {
+ public final static short SEARCHABLE = 0;
+ public final static short ALLEXCEPTLIKE = 1;
+ public final static short LIKE_ONLY = 2;
+ public final static short UNSEARCHABLE = 3;
+ public final static String[] TYPE_NAMES = { "Searchable", //$NON-NLS-1$
+ "All Except Like", //$NON-NLS-1$
+ "Like Only", //$NON-NLS-1$
+ "Unsearchable" }; //$NON-NLS-1$
+ }
+ public final static String getSearchTypeName(short type) {
+ return SEARCH_TYPES.TYPE_NAMES[type];
+ }
+
+ /**
+ * A DataType object will be identified as being of one of these types.
+ * The values must be kept consistent with the values referenced in
+ * DatatypeTypeEnumeration.properties in connector.metadata
+ */
+ public final static class DATATYPE_TYPES {
+ public final static short BASIC = 0;
+ public final static short USER_DEFINED = 1;
+ public final static short RESULT_SET = 2;
+ public final static String[] TYPE_NAMES = { "Basic", //$NON-NLS-1$
+ "UserDefined", //$NON-NLS-1$
+ "ResultSet" }; //$NON-NLS-1$
+ }
+ public final static String getDataTypeTypeName(short type) {
+ return DATATYPE_TYPES.TYPE_NAMES[type];
+ }
+
+ /**
+ * User defined DataType objects will be categorized by a variety
+ * The values must be kept consistent with the XSDVariety enumeration in the xsd
+ * metamodel and the values referenced in DatatypeVarietyEnumeration.properties in
+ * connector.metadata
+ */
+ public final static class DATATYPE_VARIETIES {
+ public final static short ATOMIC = 0;
+ public final static short LIST = 1;
+ public final static short UNION = 2;
+ public final static short COMPLEX = 3;
+ public final static String[] TYPE_NAMES = { "Atomic", //$NON-NLS-1$
+ "List", //$NON-NLS-1$
+ "Union", //$NON-NLS-1$
+ "Complex" }; //$NON-NLS-1$
+ }
+ public final static String getDataTypeVarietyName(short type) {
+ return DATATYPE_VARIETIES.TYPE_NAMES[type];
+ }
+
+ /**
+ * These types represent the type of table a Group is.
+ */
+ public final static class TABLE_TYPES {
+ public static final short TABLE_TYPE = 0;
+ public static final short VIEW_TYPE = 1;
+ public static final short DOCUMENT_TYPE = 2;
+ public static final short XML_MAPPING_CLASS_TYPE = 3;
+ public static final short XML_STAGING_TABLE_TYPE = 4;
+ public static final short MATERIALIZED_TYPE = 5;
+ public final static String[] TYPE_NAMES = { "Table", //$NON-NLS-1$
+ "View", //$NON-NLS-1$
+ "Document", //$NON-NLS-1$
+ "XmlMappingClass", //$NON-NLS-1$
+ "XmlStagingTable", //$NON-NLS-1$
+ "MaterializedTable" }; //$NON-NLS-1$
+ }
+ public final static String getTableTypeName(short type) {
+ return TABLE_TYPES.TYPE_NAMES[type];
+ }
+
+ /**
+ * These types are associated with a DataType or an Element needing the indication of null types.
+ * The values must be kept consistent with the NullableType enumeration in the relational
+ * metamodel and the values referenced in NullTypeEnumeration.properties in connector.metadata
+ */
+ public final static class NULL_TYPES {
+ public static final short NOT_NULL = 0;
+ public static final short NULLABLE = 1;
+ public static final short UNKNOWN = 2;
+ public final static String[] TYPE_NAMES = { "No Nulls", //$NON-NLS-1$
+ "Nullable", //$NON-NLS-1$
+ "Unknown" }; //$NON-NLS-1$
+ }
+ //Record type Constants
+ public static class RECORD_TYPE {
+ public final static char MODEL = 'A';
+ public final static char TABLE = 'B';
+ public final static char RESULT_SET = 'C';
+ public final static char JOIN_DESCRIPTOR = 'D';
+ public final static char CALLABLE = 'E';
+ public final static char CALLABLE_PARAMETER = 'F';
+ public final static char COLUMN = 'G';
+ public final static char ACCESS_PATTERN = 'H';
+ public final static char UNIQUE_KEY = 'I';
+ public final static char FOREIGN_KEY = 'J';
+ public final static char PRIMARY_KEY = 'K';
+ public final static char INDEX = 'L';
+ public final static char DATATYPE = 'M';
+ //public final static char DATATYPE_ELEMENT = 'N';
+ //public final static char DATATYPE_FACET = 'O';
+ public final static char SELECT_TRANSFORM = 'P';
+ public final static char INSERT_TRANSFORM = 'Q';
+ public final static char UPDATE_TRANSFORM = 'R';
+ public final static char DELETE_TRANSFORM = 'S';
+ public final static char PROC_TRANSFORM = 'T';
+ public final static char MAPPING_TRANSFORM = 'U';
+ public final static char VDB_ARCHIVE = 'V';
+ public final static char ANNOTATION = 'W';
+ public final static char PROPERTY = 'X';
+ public final static char FILE = 'Z';
+ public final static char RECORD_CONTINUATION = '&';
+ }
+
+ public final static String getNullTypeName(short type) {
+ return NULL_TYPES.TYPE_NAMES[type];
+ }
+}
\ No newline at end of file
Property changes on: trunk/metadata/src/main/java/org/teiid/metadata/index/MetadataConstants.java
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: trunk/metadata/src/main/java/org/teiid/metadata/index/ModelFileUtil.java
===================================================================
--- trunk/metadata/src/main/java/org/teiid/metadata/index/ModelFileUtil.java 2009-10-24 18:07:35 UTC (rev 1536)
+++ trunk/metadata/src/main/java/org/teiid/metadata/index/ModelFileUtil.java 2009-10-25 02:00:37 UTC (rev 1537)
@@ -30,7 +30,6 @@
import java.util.zip.ZipException;
import java.util.zip.ZipFile;
-import org.teiid.metadata.RuntimeMetadataPlugin;
import com.metamatrix.common.log.LogManager;
@@ -42,11 +41,6 @@
public class ModelFileUtil {
- public interface XmiHeaderCache {
- XMIHeader getCachedXmiHeader(File resource);
- void setXmiHeaderToCache(File resource, XMIHeader header);
- }
-
public static final String MANIFEST_MODEL_NAME = "MetaMatrix-VdbManifestModel.xmi"; //$NON-NLS-1$
public static final String DOT_PROJECT = ".project"; //$NON-NLS-1$
public static final String FILE_COLON = "file:"; //$NON-NLS-1$
@@ -57,12 +51,6 @@
public static final String EXTENSION_ECORE = "ecore"; //$NON-NLS-1$
public static final String EXTENSION_WSDL = "wsdl"; //$NON-NLS-1$
- private static XmiHeaderCache CACHE;
-
- public static void setCache(XmiHeaderCache cache) {
- ModelFileUtil.CACHE = cache;
- }
-
/**
* Return true if the File represents a MetaMatrix model file or an xsd file
* this method does not check if the file exists in a project with
@@ -196,23 +184,11 @@
*/
public static XMIHeader getXmiHeader( final File resource ) {
if (resource != null && resource.isFile() && resource.exists() && resource.canRead() ) {
- //check cache
- if(CACHE != null) {
- XMIHeader header = CACHE.getCachedXmiHeader(resource);
- if(header != null) {
- return header;
- }
- }
-
if(isVdbArchiveFile(resource)) {
return getXmiHeaderForVdbArchive(resource);
}
try {
XMIHeader header = XMIHeaderReader.readHeader(resource);
- //add to cache
- if(CACHE != null) {
- CACHE.setXmiHeaderToCache(resource, header);
- }
return header;
} catch (MetaMatrixCoreException e) {
LogManager.logWarning(RuntimeMetadataPlugin.PLUGIN_ID, e, e.getMessage());
Modified: trunk/metadata/src/main/java/org/teiid/metadata/index/RecordFactory.java
===================================================================
--- trunk/metadata/src/main/java/org/teiid/metadata/index/RecordFactory.java 2009-10-24 18:07:35 UTC (rev 1536)
+++ trunk/metadata/src/main/java/org/teiid/metadata/index/RecordFactory.java 2009-10-25 02:00:37 UTC (rev 1537)
@@ -23,25 +23,24 @@
package org.teiid.metadata.index;
import java.util.ArrayList;
-import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
+import java.util.LinkedHashMap;
import java.util.List;
-import org.teiid.connector.metadata.FileRecordImpl;
import org.teiid.connector.metadata.runtime.AbstractMetadataRecord;
-import org.teiid.connector.metadata.runtime.AnnotationRecordImpl;
import org.teiid.connector.metadata.runtime.ColumnRecordImpl;
import org.teiid.connector.metadata.runtime.ColumnSetRecordImpl;
import org.teiid.connector.metadata.runtime.DatatypeRecordImpl;
import org.teiid.connector.metadata.runtime.ForeignKeyRecordImpl;
-import org.teiid.connector.metadata.runtime.MetadataConstants;
+import org.teiid.connector.metadata.runtime.KeyRecord;
import org.teiid.connector.metadata.runtime.ModelRecordImpl;
import org.teiid.connector.metadata.runtime.ProcedureParameterRecordImpl;
import org.teiid.connector.metadata.runtime.ProcedureRecordImpl;
-import org.teiid.connector.metadata.runtime.PropertyRecordImpl;
import org.teiid.connector.metadata.runtime.TableRecordImpl;
-import org.teiid.connector.metadata.runtime.TransformationRecordImpl;
+import org.teiid.connector.metadata.runtime.BaseColumn.NullType;
+import org.teiid.connector.metadata.runtime.ColumnRecordImpl.SearchType;
+import org.teiid.connector.metadata.runtime.DatatypeRecordImpl.Variety;
import org.teiid.core.index.IEntryResult;
import org.teiid.internal.core.index.EntryResult;
import org.teiid.internal.core.index.IIndexConstants;
@@ -149,8 +148,8 @@
* @param queryResult
* @param container Container reference to be set on the record
*/
- public static Collection getMetadataRecord(final IEntryResult[] queryResult) {
- final Collection records = new ArrayList(queryResult.length);
+ public static List<AbstractMetadataRecord> getMetadataRecord(final IEntryResult[] queryResult) {
+ final List records = new ArrayList(queryResult.length);
for (int i = 0; i < queryResult.length; i++) {
final AbstractMetadataRecord record = getMetadataRecord(queryResult[i].getWord());
if (record != null) {
@@ -176,11 +175,11 @@
case MetadataConstants.RECORD_TYPE.CALLABLE: return createProcedureRecord(record);
case MetadataConstants.RECORD_TYPE.CALLABLE_PARAMETER: return createProcedureParameterRecord(record);
case MetadataConstants.RECORD_TYPE.COLUMN: return createColumnRecord(record);
- case MetadataConstants.RECORD_TYPE.ACCESS_PATTERN:
- case MetadataConstants.RECORD_TYPE.INDEX:
- case MetadataConstants.RECORD_TYPE.RESULT_SET:
- case MetadataConstants.RECORD_TYPE.UNIQUE_KEY:
- case MetadataConstants.RECORD_TYPE.PRIMARY_KEY: return createColumnSetRecord(record);
+ case MetadataConstants.RECORD_TYPE.ACCESS_PATTERN: return createColumnSetRecord(record, new KeyRecord(KeyRecord.Type.AccessPattern));
+ case MetadataConstants.RECORD_TYPE.INDEX: return createColumnSetRecord(record, new KeyRecord(KeyRecord.Type.Index));
+ case MetadataConstants.RECORD_TYPE.RESULT_SET: return createColumnSetRecord(record, new ColumnSetRecordImpl());
+ case MetadataConstants.RECORD_TYPE.UNIQUE_KEY: return createColumnSetRecord(record, new KeyRecord(KeyRecord.Type.Unique));
+ case MetadataConstants.RECORD_TYPE.PRIMARY_KEY: return createColumnSetRecord(record, new KeyRecord(KeyRecord.Type.Primary));
case MetadataConstants.RECORD_TYPE.FOREIGN_KEY: return createForeignKeyRecord(record);
case MetadataConstants.RECORD_TYPE.DATATYPE: return createDatatypeRecord(record);
case MetadataConstants.RECORD_TYPE.SELECT_TRANSFORM:
@@ -189,9 +188,6 @@
case MetadataConstants.RECORD_TYPE.DELETE_TRANSFORM:
case MetadataConstants.RECORD_TYPE.MAPPING_TRANSFORM:
case MetadataConstants.RECORD_TYPE.PROC_TRANSFORM: return createTransformationRecord(record);
- case MetadataConstants.RECORD_TYPE.ANNOTATION: return createAnnotationRecord(record);
- case MetadataConstants.RECORD_TYPE.PROPERTY: return createPropertyRecord(record);
- case MetadataConstants.RECORD_TYPE.FILE: return createFileRecord(record);
default:
throw new IllegalArgumentException("Invalid record type for creating MetadataRecord "+record[0]); //$NON-NLS-1$
}
@@ -325,10 +321,10 @@
(String)tokens.get(tokenIndex++));
// The next token is the max set size
- model.setMaxSetSize( Integer.parseInt((String)tokens.get(tokenIndex++)) );
+ tokenIndex++;
// The next token is the model type
- model.setModelType( Integer.parseInt((String)tokens.get(tokenIndex++)) );
+ model.setModelType(ModelRecordImpl.Type.values()[Integer.parseInt((String)tokens.get(tokenIndex++))]);
// The next token is the primary metamodel Uri
model.setPrimaryMetamodelUri(getObjectValue((String)tokens.get(tokenIndex++)));
@@ -336,11 +332,6 @@
// The next token are the supports flags
char[] supportFlags = ((String)tokens.get(tokenIndex++)).toCharArray();
model.setVisible(getBooleanValue(supportFlags[0]));
- model.setSupportsDistinct(getBooleanValue(supportFlags[1]));
- model.setSupportsJoin(getBooleanValue(supportFlags[2]));
- model.setSupportsOrderBy(getBooleanValue(supportFlags[3]));
- model.setSupportsOuterJoin(getBooleanValue(supportFlags[4]));
- model.setSupportsWhereAll(getBooleanValue(supportFlags[5]));
// The next tokens are footer values - the footer will contain the version number for the index record
setRecordFooterValues(model, tokens, tokenIndex);
@@ -360,15 +351,8 @@
int indexVersion = getIndexVersion(record);
// The tokens are the standard header values
- int tokenIndex = 0;
+ int tokenIndex = 2;
- char recordType = ((String)tokens.get(tokenIndex++)).charAt(0);
-
- // The next token is the transformation type
- transform.setTransformationType(getObjectValue(getTransformTypeForRecordType(recordType)));
- // The next token is the name of the transformed object
- transform.setFullName(getObjectValue(((String)tokens.get(tokenIndex++))));
-
// The next token is the UUID of the transformed object
getObjectValue((String)tokens.get(tokenIndex++));
@@ -394,19 +378,6 @@
return transform;
}
- protected static String getTransformTypeForRecordType(final char recordType) {
- switch (recordType) {
- case MetadataConstants.RECORD_TYPE.SELECT_TRANSFORM: return TransformationRecordImpl.Types.SELECT;
- case MetadataConstants.RECORD_TYPE.INSERT_TRANSFORM: return TransformationRecordImpl.Types.INSERT;
- case MetadataConstants.RECORD_TYPE.UPDATE_TRANSFORM: return TransformationRecordImpl.Types.UPDATE;
- case MetadataConstants.RECORD_TYPE.DELETE_TRANSFORM: return TransformationRecordImpl.Types.DELETE;
- case MetadataConstants.RECORD_TYPE.PROC_TRANSFORM: return TransformationRecordImpl.Types.PROCEDURE;
- case MetadataConstants.RECORD_TYPE.MAPPING_TRANSFORM: return TransformationRecordImpl.Types.MAPPING;
- default:
- throw new IllegalArgumentException("Invalid record type, for key " + recordType); //$NON-NLS-1$
- }
- }
-
protected static short getKeyTypeForRecordType(final char recordType) {
switch (recordType) {
case MetadataConstants.RECORD_TYPE.UNIQUE_KEY: return MetadataConstants.KEY_TYPES.UNIQUE_KEY;
@@ -441,7 +412,7 @@
table.setCardinality( Integer.parseInt((String)tokens.get(tokenIndex++)) );
// The next token is the tableType
- table.setTableType( Integer.parseInt((String)tokens.get(tokenIndex++)) );
+ table.setTableType(TableRecordImpl.Type.values()[Integer.parseInt((String)tokens.get(tokenIndex++))]);
// The next token are the supports flags
char[] supportFlags = ((String)tokens.get(tokenIndex++)).toCharArray();
@@ -452,12 +423,16 @@
table.setMaterialized(getBooleanValue(supportFlags[3]));
}
- // The next token are the UUIDs for the column references
- List uuids = getIDs((String)tokens.get(tokenIndex++), indexVersion);
- table.setColumnIDs(uuids);
+ // The next token are the UUIDs for the column references (no longer stored on the record)
+ tokenIndex++;
// The next token is the UUID of the primary key
- table.setPrimaryKeyID(getObjectValue((String)tokens.get(tokenIndex++)));
+ String id = getObjectValue((String)tokens.get(tokenIndex++));
+ if (id != null) {
+ KeyRecord pk = new KeyRecord(KeyRecord.Type.Primary);
+ pk.setUUID(id);
+ table.setPrimaryKey(pk);
+ }
tokenIndex+=4; //skip reading uuids for associated records
@@ -474,6 +449,16 @@
return table;
}
+ private static List<ColumnRecordImpl> createColumns(List<String> uuids) {
+ List<ColumnRecordImpl> columns = new ArrayList<ColumnRecordImpl>(uuids.size());
+ for (String uuid : uuids) {
+ ColumnRecordImpl column = new ColumnRecordImpl();
+ column.setUUID(uuid);
+ columns.add(column);
+ }
+ return columns;
+ }
+
/**
* Create a ColumnRecord instance from the specified index record
*/
@@ -500,15 +485,12 @@
column.setSigned(getBooleanValue(supportFlags[4]));
column.setCurrency(getBooleanValue(supportFlags[5]));
column.setFixedLength(getBooleanValue(supportFlags[6]));
- if (includeInputParameterFlag(indexVersion)) {
- column.setTransformationInputParameter(getBooleanValue(supportFlags[7]));
- }
// The next token is the search type
- column.setNullType( Integer.parseInt((String)tokens.get(tokenIndex++)) );
+ column.setNullType(NullType.values()[Integer.parseInt((String)tokens.get(tokenIndex++))]);
// The next token is the search type
- column.setSearchType( Integer.parseInt((String)tokens.get(tokenIndex++)) );
+ column.setSearchType(SearchType.values()[3 - Integer.parseInt((String)tokens.get(tokenIndex++))]);
// The next token is the length
column.setLength( Integer.parseInt((String)tokens.get(tokenIndex++)) );
@@ -567,10 +549,9 @@
/**
* Create a ColumnSetRecord instance from the specified index record
*/
- public static ColumnSetRecordImpl createColumnSetRecord(final char[] record) {
+ public static ColumnSetRecordImpl createColumnSetRecord(final char[] record, ColumnSetRecordImpl columnSet) {
final String str = new String(record);
final List tokens = StringUtil.split(str,String.valueOf(IndexConstants.RECORD_STRING.RECORD_DELIMITER));
- final ColumnSetRecordImpl columnSet = new ColumnSetRecordImpl(getKeyTypeForRecordType(record[0]));
// Extract the index version information from the record
int indexVersion = getIndexVersion(record);
@@ -583,7 +564,7 @@
// The next token are the UUIDs for the column references
List uuids = getIDs((String)tokens.get(tokenIndex++), indexVersion);
- columnSet.setColumnIDs(uuids);
+ columnSet.setColumns(createColumns(uuids));
if (record[0] == MetadataConstants.RECORD_TYPE.UNIQUE_KEY || record[0] == MetadataConstants.RECORD_TYPE.PRIMARY_KEY) {
//read the values from the index to update the tokenindex, but we don't actually use them.
@@ -614,7 +595,7 @@
// The next token are the UUIDs for the column references
List uuids = getIDs((String)tokens.get(tokenIndex++), indexVersion);
- fkRecord.setColumnIDs(uuids);
+ fkRecord.setColumns(createColumns(uuids));
// The next token is the UUID of the unique key
fkRecord.setUniqueKeyID(getObjectValue((String)tokens.get(tokenIndex++)));
@@ -640,7 +621,7 @@
int tokenIndex = 0;
// Set the record type
- dt.setRecordType(((String)tokens.get(tokenIndex++)).toCharArray()[0]);
+ tokenIndex++;
// Set the datatype and basetype identifiers
dt.setDatatypeID(getObjectValue((String)tokens.get(tokenIndex++)));
@@ -652,22 +633,21 @@
dt.setNameInSource(getObjectValue((String)tokens.get(tokenIndex++)));
// Set the variety type and its properties
- dt.setVarietyType( Short.parseShort((String)tokens.get(tokenIndex++)) );
- List props = getIDs((String)tokens.get(tokenIndex++), indexVersion);
- dt.setVarietyProps(props);
+ dt.setVarietyType(Variety.values()[Short.parseShort((String)tokens.get(tokenIndex++))]);
+ getIDs((String)tokens.get(tokenIndex++), indexVersion);
// Set the runtime and java class names
dt.setRuntimeTypeName(getObjectValue((String)tokens.get(tokenIndex++)));
dt.setJavaClassName(getObjectValue((String)tokens.get(tokenIndex++)));
// Set the datatype type
- dt.setType( Short.parseShort((String)tokens.get(tokenIndex++)) );
+ dt.setType(DatatypeRecordImpl.Type.values()[Short.parseShort((String)tokens.get(tokenIndex++))]);
// Set the search type
- dt.setSearchType( Short.parseShort((String)tokens.get(tokenIndex++)) );
+ dt.setSearchType(SearchType.values()[3 - Integer.parseInt((String)tokens.get(tokenIndex++))]);
// Set the null type
- dt.setNullType( Short.parseShort((String)tokens.get(tokenIndex++)) );
+ dt.setNullType(NullType.values()[Integer.parseInt((String)tokens.get(tokenIndex++))]);
// Set the boolean flags
char[] booleanValues = ((String)tokens.get(tokenIndex++)).toCharArray();
@@ -780,7 +760,7 @@
paramRd.setScale(Integer.parseInt((String)tokens.get(tokenIndex++)) );
// The next token is the null type
- paramRd.setNullType(Integer.parseInt((String)tokens.get(tokenIndex++)) );
+ paramRd.setNullType(NullType.values()[Integer.parseInt((String)tokens.get(tokenIndex++))]);
// The next token is the precision
paramRd.setPrecision(Integer.parseInt((String)tokens.get(tokenIndex++)) );
@@ -788,8 +768,26 @@
// The next token is the position
paramRd.setPosition(Integer.parseInt((String)tokens.get(tokenIndex++)) );
- // The next token is parameter type
- paramRd.setType(Short.parseShort((String)tokens.get(tokenIndex++)));
+ // The next token is parameter type
+ ProcedureParameterRecordImpl.Type type = null;
+ switch (Short.parseShort((String)tokens.get(tokenIndex++))) {
+ case MetadataConstants.PARAMETER_TYPES.IN_PARM:
+ type = ProcedureParameterRecordImpl.Type.In;
+ break;
+ case MetadataConstants.PARAMETER_TYPES.INOUT_PARM:
+ type = ProcedureParameterRecordImpl.Type.InOut;
+ break;
+ case MetadataConstants.PARAMETER_TYPES.OUT_PARM:
+ type = ProcedureParameterRecordImpl.Type.Out;
+ break;
+ case MetadataConstants.PARAMETER_TYPES.RESULT_SET:
+ type = ProcedureParameterRecordImpl.Type.ResultSet;
+ break;
+ case MetadataConstants.PARAMETER_TYPES.RETURN_VALUE:
+ type = ProcedureParameterRecordImpl.Type.ReturnValue;
+ break;
+ }
+ paramRd.setType(type);
// The next token is flag for parameter optional prop
char[] flags = ((String)tokens.get(tokenIndex++)).toCharArray();
@@ -804,19 +802,15 @@
/**
* Create a AnnotationRecord instance from the specified index record
*/
- public static AnnotationRecordImpl createAnnotationRecord(final char[] record) {
+ public static String createAnnotationRecord(final char[] record) {
final String str = new String(record);
final List tokens = StringUtil.split(str,String.valueOf(IndexConstants.RECORD_STRING.RECORD_DELIMITER));
- final AnnotationRecordImpl annotation = new AnnotationRecordImpl();
// Extract the index version information from the record
int indexVersion = getIndexVersion(record);
// The tokens are the standard header values
- int tokenIndex = 0;
- setRecordHeaderValues(annotation, (String)tokens.get(tokenIndex++), (String)tokens.get(tokenIndex++),
- (String)tokens.get(tokenIndex++), (String)tokens.get(tokenIndex++),
- (String)tokens.get(tokenIndex++), (String)tokens.get(tokenIndex++));
+ int tokenIndex = 6;
if(includeAnnotationProperties(indexVersion)) {
// The next token are the properties, ignore it not going to be read any way
@@ -824,75 +818,32 @@
}
// The next token is the description
- annotation.setDescription((String)tokens.get(tokenIndex++));
-
- // The next tokens are footer values
- setRecordFooterValues(annotation, tokens, tokenIndex);
-
- return annotation;
+ return (String)tokens.get(tokenIndex++);
}
/**
* Create a PropertyRecord instance from the specified index record
*/
- public static PropertyRecordImpl createPropertyRecord(final char[] record) {
- final String str = new String(record);
- final List tokens = StringUtil.split(str,String.valueOf(IndexConstants.RECORD_STRING.RECORD_DELIMITER));
- final PropertyRecordImpl property = new PropertyRecordImpl();
-
- int indexVersion = getIndexVersion(record);
-
- // The tokens are the standard header values
- int tokenIndex = 0;
-
- // The next token is the record type
- String recordType = (String)tokens.get(tokenIndex++);
- property.setRecordType(recordType.toCharArray()[0]);
-
- // The next token is the object ID
- String objectID = (String)tokens.get(tokenIndex++);
- property.setUUID(getObjectValue(objectID));
-
- // The next token is the property name
- property.setPropertyName( (String)tokens.get(tokenIndex++) );
-
- // The next token is the property value
- property.setPropertyValue((String)tokens.get(tokenIndex++));
+ public static LinkedHashMap<String, String> createPropertyRecord(IEntryResult[] records) {
+ if (records == null || records.length == 0) {
+ return null;
+ }
+ LinkedHashMap<String, String> result = new LinkedHashMap<String, String>();
- // for newer records
- if(!includeAnnotationProperties(indexVersion)) {
- // The next token is extension boolean
- tokenIndex++;
- }
+ for (IEntryResult iEntryResult : records) {
+ final String str = new String(iEntryResult.getWord());
+ final List tokens = StringUtil.split(str,String.valueOf(IndexConstants.RECORD_STRING.RECORD_DELIMITER));
- // The next tokens are footer values
- setRecordFooterValues(property, tokens, tokenIndex);
+ // The tokens are the standard header values
+ int tokenIndex = 2;
- return property;
+ result.put( (String)tokens.get(tokenIndex++), (String)tokens.get(tokenIndex++));
+ }
+
+ return result;
}
/**
- * Create a FileRecord instance from the specified index record
- */
- public static FileRecordImpl createFileRecord(final char[] record) {
- final String str = new String(record);
- final List tokens = StringUtil.split(str,String.valueOf(IndexConstants.RECORD_STRING.RECORD_DELIMITER));
- final FileRecordImpl file = new FileRecordImpl();
-
- // The tokens are the standard header values
- int tokenIndex = 0;
-
- // The next token is the record type
- String recordType = (String)tokens.get(tokenIndex++);
- file.setRecordType(recordType.toCharArray()[0]);
-
- // The next token is the relative path to the file in vdb
- file.setPathInVdb((String)tokens.get(tokenIndex++) );
-
- return file;
- }
-
- /**
* Search for and return the version number associated with this record.
* If no version information is found encoded in the record then the
* version number of NONVERSIONED_RECORD_INDEX_VERSION will be returned.
@@ -930,7 +881,7 @@
return false;
}
- public static List getIDs(final String values, final int indexVersionNumber) {
+ public static List<String> getIDs(final String values, final int indexVersionNumber) {
if (StringUtil.isEmpty(values)) {
return Collections.EMPTY_LIST;
}
@@ -1055,11 +1006,9 @@
final String nameInSource,
final String parentObjectID) {
- record.setRecordType(recordType.toCharArray()[0]);
record.setUUID(getObjectValue(objectID));
record.setFullName(fullName);
record.setNameInSource(getObjectValue(nameInSource));
- record.setParentUUID(getObjectValue(parentObjectID));
}
/**
Copied: trunk/metadata/src/main/java/org/teiid/metadata/index/RuntimeMetadataPlugin.java (from rev 1529, trunk/metadata/src/main/java/org/teiid/metadata/RuntimeMetadataPlugin.java)
===================================================================
--- trunk/metadata/src/main/java/org/teiid/metadata/index/RuntimeMetadataPlugin.java (rev 0)
+++ trunk/metadata/src/main/java/org/teiid/metadata/index/RuntimeMetadataPlugin.java 2009-10-25 02:00:37 UTC (rev 1537)
@@ -0,0 +1,44 @@
+/*
+ * 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.metadata.index;
+
+import java.util.ResourceBundle;
+
+import com.metamatrix.core.BundleUtil;
+
+/**
+ * CommonPlugin
+ * <p>Used here in <code>metadata.runtime</code> to have access to the new
+ * logging framework for <code>LogManager</code>.</p>
+ */
+public class RuntimeMetadataPlugin {
+
+ /**
+ * The plug-in identifier of this plugin
+ * (value <code>"com.metamatrix.metadata.runtime"</code>).
+ */
+ public static final String PLUGIN_ID = "org.teiid.metadata"; //$NON-NLS-1$
+
+ public static final BundleUtil Util = new BundleUtil(PLUGIN_ID,
+ PLUGIN_ID + ".i18n", ResourceBundle.getBundle(PLUGIN_ID + ".i18n")); //$NON-NLS-1$ //$NON-NLS-2$
+}
Property changes on: trunk/metadata/src/main/java/org/teiid/metadata/index/RuntimeMetadataPlugin.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/metadata/src/main/java/org/teiid/metadata/index/SimpleIndexUtil.java
===================================================================
--- trunk/metadata/src/main/java/org/teiid/metadata/index/SimpleIndexUtil.java 2009-10-24 18:07:35 UTC (rev 1536)
+++ trunk/metadata/src/main/java/org/teiid/metadata/index/SimpleIndexUtil.java 2009-10-25 02:00:37 UTC (rev 1537)
@@ -27,7 +27,6 @@
import java.util.ArrayList;
import java.util.List;
-import org.teiid.connector.metadata.runtime.MetadataConstants;
import org.teiid.core.index.IEntryResult;
import org.teiid.internal.core.index.Index;
@@ -248,10 +247,9 @@
* @throws MetamatrixCoreException If there is an error looking up indexes
* @since 4.2
*/
- public static Index[] getIndexes(final String indexName, final IndexMetadataStore selector) {
+ public static Index[] getIndexes(final String indexName, Index[] indexes) {
ArgCheck.isNotEmpty(indexName);
// The the index file name for the record type
- final Index[] indexes = selector.getIndexes();
final List<Index> tmp = new ArrayList<Index>(indexes.length);
for (int i = 0; i < indexes.length; i++) {
Index coreIndex = indexes[i];
Copied: trunk/metadata/src/main/java/org/teiid/metadata/index/TransformationRecordImpl.java (from rev 1529, trunk/connector-api/src/main/java/org/teiid/connector/metadata/runtime/TransformationRecordImpl.java)
===================================================================
--- trunk/metadata/src/main/java/org/teiid/metadata/index/TransformationRecordImpl.java (rev 0)
+++ trunk/metadata/src/main/java/org/teiid/metadata/index/TransformationRecordImpl.java 2009-10-25 02:00:37 UTC (rev 1537)
@@ -0,0 +1,142 @@
+/*
+ * 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.metadata.index;
+
+import java.util.List;
+
+import org.teiid.connector.metadata.runtime.AbstractMetadataRecord;
+
+/**
+ * TransformationRecordImpl
+ */
+public class TransformationRecordImpl extends AbstractMetadataRecord {
+
+ public static interface Types {
+ public static final String MAPPING = "Mapping"; //$NON-NLS-1$
+ public static final String SELECT = "Select"; //$NON-NLS-1$
+ public static final String INSERT = "Insert"; //$NON-NLS-1$
+ public static final String UPDATE = "Update"; //$NON-NLS-1$
+ public static final String DELETE = "Delete"; //$NON-NLS-1$
+ public static final String PROCEDURE = "Procedure"; //$NON-NLS-1$
+ }
+
+ private String transformation;
+ private String transformationType;
+ private List bindings;
+ private List schemaPaths;
+ private String resourcePath;
+
+ /**
+ * @see com.metamatrix.modeler.core.metadata.runtime.TransformationRecord#getTransformation()
+ */
+ public String getTransformation() {
+ return transformation;
+ }
+
+ /*
+ * @see com.metamatrix.modeler.core.metadata.runtime.TransformationRecord#getBindings()
+ */
+ public List getBindings() {
+ return this.bindings;
+ }
+
+ /*
+ * @see com.metamatrix.modeler.core.metadata.runtime.TransformationRecord#getSchemaPaths()
+ */
+ public List getSchemaPaths() {
+ return schemaPaths;
+ }
+
+ /*
+ * @see com.metamatrix.modeler.core.metadata.runtime.TransformationRecord#getTransformationType()
+ */
+ public String getTransformationType() {
+ return transformationType;
+ }
+
+ /**
+ * @see com.metamatrix.modeler.core.metadata.runtime.TransformationRecord#getType()
+ */
+ public String getType() {
+ return this.transformationType;
+ }
+
+ // ==================================================================================
+ // P U B L I C M E T H O D S
+ // ==================================================================================
+
+ /**
+ * @param string
+ */
+ public void setTransformation(final String string) {
+ transformation = string;
+ }
+
+ /**
+ * @param string
+ */
+ public void setTransformationType(String string) {
+ transformationType = string;
+ }
+
+ /**
+ * @param collection
+ */
+ public void setBindings(List bindings) {
+ this.bindings = bindings;
+ }
+
+ /**
+ * @param collection
+ */
+ public void setSchemaPaths(List collection) {
+ schemaPaths = collection;
+ }
+
+ /**
+ * @return
+ */
+ public String getResourcePath() {
+ return resourcePath;
+ }
+
+ /**
+ * @param path
+ */
+ public void setResourcePath(String path) {
+ resourcePath = path;
+ }
+
+ public String toString() {
+ StringBuffer sb = new StringBuffer(100);
+ sb.append(getClass().getSimpleName());
+ sb.append(" name="); //$NON-NLS-1$
+ sb.append(getName());
+ sb.append(", nameInSource="); //$NON-NLS-1$
+ sb.append(getNameInSource());
+ sb.append(", uuid="); //$NON-NLS-1$
+ sb.append(getUUID());
+ return sb.toString();
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/metadata/src/main/java/org/teiid/metadata/index/TransformationRecordImpl.java
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: trunk/metadata/src/main/java/org/teiid/metadata/index/VDBMetadataFactory.java
===================================================================
--- trunk/metadata/src/main/java/org/teiid/metadata/index/VDBMetadataFactory.java 2009-10-24 18:07:35 UTC (rev 1536)
+++ trunk/metadata/src/main/java/org/teiid/metadata/index/VDBMetadataFactory.java 2009-10-25 02:00:37 UTC (rev 1537)
@@ -23,44 +23,44 @@
package org.teiid.metadata.index;
import java.io.File;
-import java.io.FileInputStream;
import java.io.IOException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
+import org.teiid.connector.metadata.runtime.MetadataStore;
import org.teiid.metadata.CompositeMetadataStore;
import org.teiid.metadata.TransformationMetadata;
import com.metamatrix.common.vdb.api.VDBArchive;
import com.metamatrix.core.MetaMatrixRuntimeException;
+import com.metamatrix.core.util.LRUCache;
import com.metamatrix.metadata.runtime.api.MetadataSource;
-import com.metamatrix.query.metadata.MetadataStore;
import com.metamatrix.query.metadata.QueryMetadataInterface;
public class VDBMetadataFactory {
+ public static LRUCache<URL, QueryMetadataInterface> VDB_CACHE = new LRUCache<URL, QueryMetadataInterface>(10);
+
public static QueryMetadataInterface getVDBMetadata(String vdbFile) {
- MetadataSource source;
try {
- source = new VDBArchive(new FileInputStream(vdbFile));
+ return getVDBMetadata(new File(vdbFile).toURI().toURL());
} catch (IOException e) {
throw new MetaMatrixRuntimeException(e);
}
- IndexMetadataStore selector;
- try {
- selector = new IndexMetadataStore(source);
- } catch (IOException e) {
- throw new MetaMatrixRuntimeException(e);
- }
- return new TransformationMetadata(new CompositeMetadataStore(Arrays.asList(selector), source));
}
public static QueryMetadataInterface getVDBMetadata(URL vdbURL) throws IOException {
+ QueryMetadataInterface vdb = VDB_CACHE.get(vdbURL);
+ if (vdb != null) {
+ return vdb;
+ }
MetadataSource source = new VDBArchive(vdbURL.openStream());
- IndexMetadataStore selector = new IndexMetadataStore(source);
- return new TransformationMetadata(new CompositeMetadataStore(Arrays.asList(selector), source));
+ IndexMetadataFactory selector = new IndexMetadataFactory(source);
+ vdb = new TransformationMetadata(new CompositeMetadataStore(Arrays.asList(selector.getMetadataStore()), source));
+ VDB_CACHE.put(vdbURL, vdb);
+ return vdb;
}
public static QueryMetadataInterface getVDBMetadata(String[] vdbFile) {
@@ -73,7 +73,7 @@
if (i == 0) {
source = tempSource;
}
- selectors.add(new IndexMetadataStore(tempSource));
+ selectors.add(new IndexMetadataFactory(tempSource).getMetadataStore());
} catch (IOException e) {
throw new MetaMatrixRuntimeException(e);
}
15 years, 1 month
teiid SVN: r1536 - in trunk/engine/src: main/java/com/metamatrix/query/metadata and 9 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2009-10-24 14:07:35 -0400 (Sat, 24 Oct 2009)
New Revision: 1536
Added:
trunk/engine/src/main/java/org/teiid/metadata/
trunk/engine/src/main/java/org/teiid/metadata/CompositeMetadataStore.java
trunk/engine/src/main/java/org/teiid/metadata/TransformationMetadata.java
Removed:
trunk/engine/src/main/java/com/metamatrix/query/metadata/MetadataStore.java
Modified:
trunk/engine/src/main/java/com/metamatrix/dqp/service/DataService.java
trunk/engine/src/main/java/com/metamatrix/dqp/service/MetadataService.java
trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/PlanToProcessConverter.java
trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorManager.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/DataTierManagerImpl.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/capabilities/SharedCachedFinder.java
trunk/engine/src/main/resources/com/metamatrix/dqp/i18n.properties
trunk/engine/src/test/java/com/metamatrix/dqp/service/AutoGenDataService.java
trunk/engine/src/test/java/com/metamatrix/dqp/service/FakeMetadataService.java
trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestDataTierManager.java
Log:
TEIID-871 TEIID-792 TEIID-102 TEIID-254 TEIID-869 TEIID-875 further clean up of metadata related logic. The index connector has been removed and the system virtual views promoted to physical tables. some of the tables/procedures have been removed. and minor changes have been made to MMDatabaseMetadata queries.
Modified: trunk/engine/src/main/java/com/metamatrix/dqp/service/DataService.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/dqp/service/DataService.java 2009-10-24 18:05:58 UTC (rev 1535)
+++ trunk/engine/src/main/java/com/metamatrix/dqp/service/DataService.java 2009-10-24 18:07:35 UTC (rev 1536)
@@ -27,7 +27,7 @@
import java.util.Properties;
import org.teiid.adminapi.ConnectionPool;
-import org.teiid.connector.metadata.runtime.ConnectorMetadata;
+import org.teiid.connector.metadata.runtime.MetadataStore;
import org.teiid.dqp.internal.process.DQPWorkContext;
import com.metamatrix.api.exception.ComponentNotFoundException;
@@ -90,7 +90,7 @@
* @return
* @throws MetaMatrixComponentException
*/
- ConnectorMetadata getConnectorMetadata(String vdbName, String vdbVersion, String modelName, Properties importProperties) throws MetaMatrixComponentException;
+ MetadataStore getConnectorMetadata(String vdbName, String vdbVersion, String modelName, Properties importProperties) throws MetaMatrixComponentException;
/**
* Start the Connector Binding by the name given, if it is already added and not srarted.
Modified: trunk/engine/src/main/java/com/metamatrix/dqp/service/MetadataService.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/dqp/service/MetadataService.java 2009-10-24 18:05:58 UTC (rev 1535)
+++ trunk/engine/src/main/java/com/metamatrix/dqp/service/MetadataService.java 2009-10-24 18:07:35 UTC (rev 1536)
@@ -25,10 +25,10 @@
import java.util.Map;
import org.teiid.connector.metadata.runtime.DatatypeRecordImpl;
+import org.teiid.metadata.CompositeMetadataStore;
import com.metamatrix.api.exception.MetaMatrixComponentException;
import com.metamatrix.common.application.ApplicationService;
-import com.metamatrix.connector.metadata.internal.IObjectSource;
import com.metamatrix.query.metadata.QueryMetadataInterface;
/**
@@ -37,7 +37,7 @@
QueryMetadataInterface lookupMetadata(String vdbName, String vdbVersion) throws MetaMatrixComponentException;
- IObjectSource getMetadataObjectSource(String vdbName, String vdbVersion) throws MetaMatrixComponentException;
+ CompositeMetadataStore getMetadataObjectSource(String vdbName, String vdbVersion) throws MetaMatrixComponentException;
Map<String, DatatypeRecordImpl> getBuiltinDatatypes() throws MetaMatrixComponentException;
Deleted: trunk/engine/src/main/java/com/metamatrix/query/metadata/MetadataStore.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/metadata/MetadataStore.java 2009-10-24 18:05:58 UTC (rev 1535)
+++ trunk/engine/src/main/java/com/metamatrix/query/metadata/MetadataStore.java 2009-10-24 18:07:35 UTC (rev 1536)
@@ -1,107 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package com.metamatrix.query.metadata;
-
-import java.util.Collection;
-
-import org.teiid.connector.metadata.runtime.AbstractMetadataRecord;
-import org.teiid.connector.metadata.runtime.ColumnRecordImpl;
-import org.teiid.connector.metadata.runtime.ModelRecordImpl;
-import org.teiid.connector.metadata.runtime.ProcedureRecordImpl;
-import org.teiid.connector.metadata.runtime.PropertyRecordImpl;
-import org.teiid.connector.metadata.runtime.TableRecordImpl;
-
-import com.metamatrix.api.exception.MetaMatrixComponentException;
-import com.metamatrix.api.exception.query.QueryMetadataException;
-import com.metamatrix.core.MetaMatrixCoreException;
-
-public interface MetadataStore {
-
- ModelRecordImpl getModel(String fullName) throws QueryMetadataException, MetaMatrixComponentException;
-
- TableRecordImpl findGroup(String fullName) throws QueryMetadataException, MetaMatrixComponentException;
-
- /**
- * Returns the fully qualified names of groups matching the given partial name.
- *
- * @param partialGroupName expected to be in lowercase
- * @return
- * @throws MetaMatrixComponentException
- * @throws QueryMetadataException
- */
- Collection<String> getGroupsForPartialName(final String partialGroupName)
- throws MetaMatrixComponentException, QueryMetadataException;
-
- ProcedureRecordImpl getStoredProcedure(final String fullyQualifiedProcedureName)
- throws MetaMatrixComponentException, QueryMetadataException;
-
- Collection<PropertyRecordImpl> getExtensionProperties(AbstractMetadataRecord record) throws MetaMatrixComponentException;
-
- /**
- * Get the set of model names known to this store.
- */
- Collection<String> getModelNames();
-
- /**
- * Search method used by the index connector
- * @param indexName
- * @param patterns
- * @param isPrefix
- * @param isCaseSensitive
- * @return
- * @throws MetaMatrixCoreException
- */
- Collection<? extends AbstractMetadataRecord> findMetadataRecords(final String indexName,
- String pattern, boolean isPrefix,
- boolean isCaseSensitive) throws MetaMatrixCoreException;
-
- boolean postProcessFindMetadataRecords();
-
- /**
- * @deprecated used only for xml
- * @param table
- * @return
- * @throws MetaMatrixComponentException
- */
- Collection getXMLTempGroups(TableRecordImpl table) throws MetaMatrixComponentException;
-
- /**
- * @deprecated used only for xml
- * @param table
- * @return
- * @throws MetaMatrixComponentException
- */
- Collection<? extends AbstractMetadataRecord> findMetadataRecords(final char recordType,
- final String entityName, final boolean isPartialName)
- throws MetaMatrixComponentException;
-
- /**
- * @deprecated used only by xml and uuid resolving
- * @param fullName
- * @return
- * @throws QueryMetadataException
- * @throws MetaMatrixComponentException
- */
- ColumnRecordImpl findElement(String fullName) throws QueryMetadataException, MetaMatrixComponentException;
-
-}
Modified: trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/PlanToProcessConverter.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/PlanToProcessConverter.java 2009-10-24 18:05:58 UTC (rev 1535)
+++ trunk/engine/src/main/java/com/metamatrix/query/optimizer/relational/PlanToProcessConverter.java 2009-10-24 18:07:35 UTC (rev 1536)
@@ -29,6 +29,7 @@
import com.metamatrix.api.exception.MetaMatrixComponentException;
import com.metamatrix.api.exception.query.QueryMetadataException;
import com.metamatrix.api.exception.query.QueryPlannerException;
+import com.metamatrix.core.CoreConstants;
import com.metamatrix.core.id.IDGenerator;
import com.metamatrix.core.id.IntegerID;
import com.metamatrix.core.id.IntegerIDFactory;
@@ -288,7 +289,7 @@
//-- special handling for temp tables. currently they cannot perform projection
try {
if (command instanceof Query) {
- processNode = correctProjectionForTempTable(node, aNode);
+ processNode = correctProjectionInternalTables(node, aNode, (Query)command);
}
} catch (QueryMetadataException err) {
throw new MetaMatrixComponentException(err);
@@ -406,20 +407,23 @@
return processNode;
}
- private RelationalNode correctProjectionForTempTable(PlanNode node,
- AccessNode aNode) throws QueryMetadataException,
+ private RelationalNode correctProjectionInternalTables(PlanNode node,
+ AccessNode aNode, Query query) throws QueryMetadataException,
MetaMatrixComponentException {
if (node.getGroups().size() != 1) {
return aNode;
}
GroupSymbol group = node.getGroups().iterator().next();
- if (!group.isTempTable()) {
+ if (!group.isTempTable() && !CoreConstants.SYSTEM_MODEL.equals(metadata.getFullName(metadata.getModelID(group.getMetadataID())))) {
return aNode;
}
List projectSymbols = (List) node.getProperty(NodeConstants.Info.OUTPUT_COLS);
- List acutalColumns = ResolverUtil.resolveElementsInGroup(group, metadata);
+ List<ElementSymbol> acutalColumns = ResolverUtil.resolveElementsInGroup(group, metadata);
+ if (projectSymbols.equals(acutalColumns)) {
+ return aNode;
+ }
node.setProperty(NodeConstants.Info.OUTPUT_COLS, acutalColumns);
- if (node.getParent().getType() == NodeConstants.Types.PROJECT) {
+ if (node.getParent() != null && node.getParent().getType() == NodeConstants.Types.PROJECT) {
//if the parent is already a project, just correcting the output cols is enough
return aNode;
}
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorManager.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorManager.java 2009-10-24 18:05:58 UTC (rev 1535)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorManager.java 2009-10-24 18:07:35 UTC (rev 1536)
@@ -46,7 +46,7 @@
import org.teiid.connector.api.ExecutionContext;
import org.teiid.connector.api.ConnectorAnnotations.ConnectionPooling;
import org.teiid.connector.api.ConnectorAnnotations.SynchronousWorkers;
-import org.teiid.connector.metadata.runtime.ConnectorMetadata;
+import org.teiid.connector.metadata.runtime.MetadataStore;
import org.teiid.connector.metadata.runtime.MetadataFactory;
import org.teiid.connector.xa.api.XAConnector;
import org.teiid.dqp.internal.cache.DQPContextCache;
@@ -141,7 +141,7 @@
return classloader;
}
- public ConnectorMetadata getMetadata(String modelName, Properties importProperties) throws ConnectorException {
+ public MetadataStore getMetadata(String modelName, Properties importProperties) throws ConnectorException {
MetadataFactory factory;
try {
factory = new MetadataFactory(modelName, this.metadataService.getBuiltinDatatypes(), importProperties);
@@ -156,7 +156,7 @@
} finally {
currentThread.setContextClassLoader(threadContextLoader);
}
- return factory;
+ return factory.getMetadataStore();
}
public SourceCapabilities getCapabilities(RequestID requestID, Serializable executionPayload, DQPWorkContext message) throws ConnectorException {
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 2009-10-24 18:05:58 UTC (rev 1535)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPCore.java 2009-10-24 18:07:35 UTC (rev 1536)
@@ -698,6 +698,7 @@
(DataService) this.environment.findService(DQPServiceNames.DATA_SERVICE),
(VDBService) this.environment.findService(DQPServiceNames.VDB_SERVICE),
(BufferService) this.environment.findService(DQPServiceNames.BUFFER_SERVICE),
+ metadataService,
this.maxCodeTables,
this.maxCodeRecords,
this.maxCodeTableRecords);
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 2009-10-24 18:05:58 UTC (rev 1535)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/DataTierManagerImpl.java 2009-10-24 18:07:35 UTC (rev 1536)
@@ -22,11 +22,30 @@
package org.teiid.dqp.internal.process;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collection;
import java.util.Iterator;
+import java.util.LinkedHashSet;
import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import javax.sql.rowset.serial.SerialBlob;
+import javax.sql.rowset.serial.SerialClob;
+
+import org.teiid.connector.metadata.runtime.ColumnRecordImpl;
+import org.teiid.connector.metadata.runtime.DatatypeRecordImpl;
+import org.teiid.connector.metadata.runtime.ForeignKeyRecordImpl;
+import org.teiid.connector.metadata.runtime.KeyRecord;
+import org.teiid.connector.metadata.runtime.MetadataStore;
+import org.teiid.connector.metadata.runtime.ModelRecordImpl;
+import org.teiid.connector.metadata.runtime.ProcedureParameterRecordImpl;
+import org.teiid.connector.metadata.runtime.ProcedureRecordImpl;
+import org.teiid.connector.metadata.runtime.TableRecordImpl;
import org.teiid.dqp.internal.process.CodeTableCache.CacheKey;
+import org.teiid.metadata.CompositeMetadataStore;
import com.metamatrix.api.exception.MetaMatrixComponentException;
import com.metamatrix.api.exception.MetaMatrixProcessingException;
@@ -35,6 +54,8 @@
import com.metamatrix.common.buffer.TupleSource;
import com.metamatrix.common.comm.api.ResultsReceiver;
import com.metamatrix.common.log.LogManager;
+import com.metamatrix.common.vdb.api.ModelInfo;
+import com.metamatrix.core.CoreConstants;
import com.metamatrix.core.util.Assertion;
import com.metamatrix.dqp.DQPPlugin;
import com.metamatrix.dqp.embedded.DQPEmbeddedProperties;
@@ -46,45 +67,325 @@
import com.metamatrix.dqp.message.RequestMessage;
import com.metamatrix.dqp.service.BufferService;
import com.metamatrix.dqp.service.DataService;
+import com.metamatrix.dqp.service.MetadataService;
import com.metamatrix.dqp.service.VDBService;
import com.metamatrix.dqp.util.LogConstants;
+import com.metamatrix.metadata.runtime.api.MetadataSourceUtil;
import com.metamatrix.query.processor.ProcessorDataManager;
import com.metamatrix.query.processor.QueryProcessor;
import com.metamatrix.query.sql.ReservedWords;
import com.metamatrix.query.sql.lang.Command;
+import com.metamatrix.query.sql.lang.Query;
+import com.metamatrix.query.sql.lang.StoredProcedure;
+import com.metamatrix.query.sql.lang.UnaryFromClause;
+import com.metamatrix.query.sql.symbol.GroupSymbol;
+import com.metamatrix.query.sql.symbol.SingleElementSymbol;
import com.metamatrix.query.util.CommandContext;
public class DataTierManagerImpl implements ProcessorDataManager {
+
+ private enum SystemTables {
+ VIRTUALDATABASES,
+ MODELS,
+ GROUPS,
+ DATATYPES,
+ ELEMENTS,
+ KEYS,
+ PROCEDURES,
+ KEYELEMENTS,
+ PROCEDUREPARAMS,
+ MODELPROPERTIES,
+ GROUPPROPERTIES,
+ DATATYPEPROPERTIES,
+ ELEMENTPROPERTIES,
+ KEYPROPERTIES,
+ PROCEDUREPROPERTIES,
+ PROCEDUREPARAMPROPERTIES,
+ REFERENCEKEYCOLUMNS
+ }
+
+ private enum SystemProcs {
+ GETCHARACTERVDBRESOURCE,
+ GETBINARYVDBRESOURCE,
+ GETVDBRESOURCEPATHS
+ }
+
+ private class CollectionTupleSource implements TupleSource {
+
+ private Iterator<List<Object>> tuples;
+ private List<SingleElementSymbol> schema;
+
+ public CollectionTupleSource(Iterator<List<Object>> tuples,
+ List<SingleElementSymbol> schema) {
+ this.tuples = tuples;
+ this.schema = schema;
+ }
+ @Override
+ public List<?> nextTuple() throws MetaMatrixComponentException,
+ MetaMatrixProcessingException {
+ if (tuples.hasNext()) {
+ return tuples.next();
+ }
+ return null;
+ }
+
+ @Override
+ public List<SingleElementSymbol> getSchema() {
+ return schema;
+ }
+
+ @Override
+ public void closeSource() throws MetaMatrixComponentException {
+
+ }
+ }
+
// Resources
private DQPCore requestMgr;
private DataService dataService;
private VDBService vdbService;
private BufferService bufferService;
+ private MetadataService metadataService;
// Processor state
private CodeTableCache codeTableCache;
public DataTierManagerImpl(DQPCore requestMgr,
- DataService dataService, VDBService vdbService, BufferService bufferService,
+ DataService dataService, VDBService vdbService, BufferService bufferService, MetadataService metadataService,
int maxCodeTables, int maxCodeRecords, int maxCodeTableRecords) {
this.requestMgr = requestMgr;
this.dataService = dataService;
this.vdbService = vdbService;
this.bufferService = bufferService;
+ this.metadataService = metadataService;
this.codeTableCache = new CodeTableCache(maxCodeTables, maxCodeRecords, maxCodeTableRecords);
}
+ @SuppressWarnings("unchecked")
public TupleSource registerRequest(Object processorId, Command command,
String modelName, String connectorBindingId, int nodeID) throws MetaMatrixComponentException, MetaMatrixProcessingException {
RequestWorkItem workItem = requestMgr.getRequestWorkItem((RequestID)processorId);
+
+ if(CoreConstants.SYSTEM_MODEL.equals(modelName)) {
+ String vdbName = workItem.getDqpWorkContext().getVdbName();
+ String vdbVersion = workItem.getDqpWorkContext().getVdbVersion();
+ CompositeMetadataStore metadata = this.metadataService.getMetadataObjectSource(vdbName, vdbVersion);
+ Collection rows = new ArrayList();
+ if (command instanceof Query) {
+ Query query = (Query)command;
+ UnaryFromClause ufc = (UnaryFromClause)query.getFrom().getClauses().get(0);
+ GroupSymbol group = ufc.getGroup();
+ final SystemTables sysTable = SystemTables.valueOf(group.getNonCorrelationName().substring(CoreConstants.SYSTEM_MODEL.length() + 1).toUpperCase());
+ switch (sysTable) {
+ case VIRTUALDATABASES:
+ rows.add(Arrays.asList(vdbName, vdbVersion));
+ break;
+ case MODELS:
+ case MODELPROPERTIES:
+ for (MetadataStore store : metadata.getMetadataStores()) {
+ for (ModelRecordImpl model : store.getModels().values()) {
+ if(checkVisibility(vdbName, vdbVersion, model.getName())) {
+ if (sysTable == SystemTables.MODELS) {
+ rows.add(Arrays.asList(model.getName(), model.isPhysical(), model.getUUID(), model.getAnnotation(), model.getPrimaryMetamodelUri()));
+ } else {
+ for (Map.Entry<String, String> entry : model.getProperties().entrySet()) {
+ rows.add(Arrays.asList(model.getName(), entry.getKey(), entry.getValue(), model.getUUID()));
+ }
+ }
+ }
+ }
+ }
+ break;
+ case DATATYPES:
+ case DATATYPEPROPERTIES:
+ rows = new LinkedHashSet(); //System types are duplicated in each indexed vdb...
+ for (MetadataStore store : metadata.getMetadataStores()) {
+ for (DatatypeRecordImpl datatype : store.getDatatypes()) {
+ if (sysTable == SystemTables.DATATYPES) {
+ rows.add(Arrays.asList(datatype.getName(), datatype.isBuiltin(), datatype.isBuiltin(), datatype.getName(), datatype.getJavaClassName(), datatype.getScale(),
+ datatype.getLength(), datatype.getNullType().toString(), datatype.isSigned(), datatype.isAutoIncrement(), datatype.isCaseSensitive(), datatype.getPrecisionLength(),
+ datatype.getRadix(), datatype.getSearchType().toString(), datatype.getUUID(), datatype.getRuntimeTypeName(), datatype.getBasetypeName(), datatype.getAnnotation()));
+ } else {
+ for (Map.Entry<String, String> entry : datatype.getProperties().entrySet()) {
+ rows.add(Arrays.asList(datatype.getName(), entry.getKey(), entry.getValue(), datatype.getUUID()));
+ }
+ }
+ }
+ }
+ break;
+ case PROCEDURES:
+ case PROCEDUREPROPERTIES:
+ case PROCEDUREPARAMS:
+ case PROCEDUREPARAMPROPERTIES:
+ for (MetadataStore store : metadata.getMetadataStores()) {
+ for (ProcedureRecordImpl proc : store.getProcedures().values()) {
+ if(!checkVisibility(vdbName, vdbVersion, proc.getModelName())) {
+ continue;
+ }
+ switch (sysTable) {
+ case PROCEDURES:
+ ModelRecordImpl model = store.getModels().get(proc.getModelName().toLowerCase());
+ rows.add(Arrays.asList(proc.getModelName(), proc.getName(), proc.getNameInSource(), proc.getResultSetID() != null, model.getUUID(), proc.getUUID(), proc.getAnnotation(), proc.getFullName()));
+ break;
+ case PROCEDUREPROPERTIES:
+ for (Map.Entry<String, String> entry : proc.getProperties().entrySet()) {
+ rows.add(Arrays.asList(proc.getModelName(), proc.getName(), entry.getKey(), entry.getValue(), proc.getUUID()));
+ }
+ break;
+ default:
+ for (ProcedureParameterRecordImpl param : proc.getParameters()) {
+ if (sysTable == SystemTables.PROCEDUREPARAMS) {
+ rows.add(Arrays.asList(proc.getModelName(), proc.getFullName(), param.getName(), param.getDatatype().getRuntimeTypeName(), param.getPosition(), param.getType().toString(), param.isOptional(),
+ param.getPrecision(), param.getLength(), param.getScale(), param.getRadix(), param.getNullType().toString(), param.getUUID()));
+ } else {
+ for (Map.Entry<String, String> entry : param.getProperties().entrySet()) {
+ rows.add(Arrays.asList(proc.getModelName(), proc.getFullName(), param.getName(), entry.getKey(), entry.getValue(), param.getUUID()));
+ }
+ }
+ }
+ if (proc.getResultSetID() != null) {
+ for (ColumnRecordImpl param : proc.getResultSet().getColumns()) {
+ if (sysTable == SystemTables.PROCEDUREPARAMS) {
+ rows.add(Arrays.asList(proc.getModelName(), proc.getFullName(), param.getName(), param.getDatatype().getRuntimeTypeName(), param.getPosition(), ProcedureParameterRecordImpl.Type.ResultSet.toString(), false,
+ param.getPrecision(), param.getLength(), param.getScale(), param.getRadix(), param.getNullType().toString(), param.getUUID()));
+ } else {
+ for (Map.Entry<String, String> entry : param.getProperties().entrySet()) {
+ rows.add(Arrays.asList(proc.getModelName(), proc.getFullName(), param.getName(), entry.getKey(), entry.getValue(), param.getUUID()));
+ }
+ }
+ }
+ }
+ break;
+ }
+ }
+ }
+ break;
+ default:
+ for (MetadataStore store : metadata.getMetadataStores()) {
+ for (TableRecordImpl table : store.getTables().values()) {
+ if(!checkVisibility(vdbName, vdbVersion, table.getModelName())) {
+ continue;
+ }
+ switch (sysTable) {
+ case GROUPS:
+ rows.add(Arrays.asList(table.getModelName(), table.getFullName(), table.getName(), table.getTableType().toString(), table.getNameInSource(),
+ table.isPhysical(), table.getName().toUpperCase(), table.supportsUpdate(), table.getUUID(), table.getCardinality(), table.getAnnotation(), table.isSystem(), table.isMaterialized()));
+ break;
+ case GROUPPROPERTIES:
+ for (Map.Entry<String, String> entry : table.getProperties().entrySet()) {
+ rows.add(Arrays.asList(table.getModelName(), table.getFullName(), entry.getKey(), entry.getValue(), table.getName(), table.getName().toUpperCase(), table.getUUID()));
+ }
+ break;
+ case ELEMENTS:
+ for (ColumnRecordImpl column : table.getColumns()) {
+ if (column.getDatatype() == null) {
+ continue; //some mapping classes don't set the datatype
+ }
+ rows.add(Arrays.asList(table.getModelName(), table.getName(), table.getFullName(), column.getName(), column.getPosition(), column.getNameInSource(),
+ column.getDatatype().getRuntimeTypeName(), column.getScale(), column.getLength(), column.isFixedLength(), column.isSelectable(), column.isUpdatable(),
+ column.isCaseSensitive(), column.isSigned(), column.isCurrency(), column.isAutoIncrementable(), column.getNullType().toString(), column.getMinValue(),
+ column.getMaxValue(), column.getSearchType().toString(), column.getFormat(), column.getDefaultValue(), column.getDatatype().getJavaClassName(), column.getPrecision(),
+ column.getCharOctetLength(), column.getRadix(), table.getName().toUpperCase(), column.getName().toUpperCase(), column.getUUID(), column.getAnnotation()));
+ }
+ break;
+ case ELEMENTPROPERTIES:
+ for (ColumnRecordImpl column : table.getColumns()) {
+ for (Map.Entry<String, String> entry : column.getProperties().entrySet()) {
+ rows.add(Arrays.asList(table.getModelName(), table.getFullName(), column.getName(), entry.getKey(), entry.getValue(), table.getName(), column.getName().toUpperCase(),
+ table.getName().toUpperCase(), column.getUUID()));
+ }
+ }
+ break;
+ case KEYS:
+ for (KeyRecord key : table.getAllKeys()) {
+ rows.add(Arrays.asList(table.getModelName(), table.getFullName(), key.getName(), key.getAnnotation(), key.getNameInSource(), key.getType().toString(),
+ false, table.getName(), table.getName().toUpperCase(), (key instanceof ForeignKeyRecordImpl)?((ForeignKeyRecordImpl)key).getUniqueKeyID():null, key.getUUID()));
+ }
+ break;
+ case KEYPROPERTIES:
+ for (KeyRecord key : table.getAllKeys()) {
+ for (Map.Entry<String, String> entry : key.getProperties().entrySet()) {
+ rows.add(Arrays.asList(table.getModelName(), table.getFullName(), key.getName(), entry.getKey(), entry.getValue(), table.getName(), table.getName().toUpperCase(),
+ key.getUUID()));
+ }
+ }
+ break;
+ case KEYELEMENTS:
+ for (KeyRecord key : table.getAllKeys()) {
+ int postition = 1;
+ for (ColumnRecordImpl column : key.getColumns()) {
+ rows.add(Arrays.asList(table.getModelName(), table.getFullName(), column.getName(), key.getName(), key.getType().toString(), table.getName(), table.getName().toUpperCase(),
+ (key instanceof ForeignKeyRecordImpl)?((ForeignKeyRecordImpl)key).getUniqueKeyID():null, key.getUUID(), postition++));
+ }
+ }
+ break;
+ case REFERENCEKEYCOLUMNS:
+ for (ForeignKeyRecordImpl key : table.getForeignKeys()) {
+ int postition = 0;
+ for (ColumnRecordImpl column : key.getColumns()) {
+ TableRecordImpl pkTable = key.getPrimaryKey().getTable();
+ rows.add(Arrays.asList(null, vdbName, pkTable.getFullName(), key.getPrimaryKey().getColumns().get(postition).getName(), null, vdbName, table.getFullName(), column.getName(),
+ ++postition, 3, 3, key.getName(), key.getPrimaryKey().getName(), 5));
+ }
+ }
+ break;
+ }
+ }
+ }
+ break;
+ }
+ } else {
+ StoredProcedure proc = (StoredProcedure)command;
+ GroupSymbol group = proc.getGroup();
+ final SystemProcs sysTable = SystemProcs.valueOf(group.getCanonicalName().substring(CoreConstants.SYSTEM_MODEL.length() + 1));
+ switch (sysTable) {
+ case GETVDBRESOURCEPATHS:
+ Set<String> filePaths = metadata.getMetadataSource().getEntries();
+ for (String filePath : filePaths) {
+ if (vdbService.getFileVisibility(vdbName, vdbVersion, filePath) != ModelInfo.PUBLIC) {
+ continue;
+ }
+ rows.add(Arrays.asList(filePath, filePath.endsWith(".INDEX"))); //$NON-NLS-1$
+ }
+ break;
+ case GETBINARYVDBRESOURCE:
+ String filePath = (String)proc.getParameter(0).getValue();
+ if (metadata.getMetadataSource().getEntries().contains(filePath) && vdbService.getFileVisibility(vdbName, vdbVersion, filePath) == ModelInfo.PUBLIC) {
+ try {
+ rows.add(Arrays.asList(new SerialBlob(MetadataSourceUtil.getFileContentAsString(filePath, metadata.getMetadataSource()).getBytes())));
+ } catch (SQLException e) {
+ throw new MetaMatrixComponentException(e);
+ }
+ }
+ break;
+ case GETCHARACTERVDBRESOURCE:
+ filePath = (String)proc.getParameter(0).getValue();
+ if (metadata.getMetadataSource().getEntries().contains(filePath) && vdbService.getFileVisibility(vdbName, vdbVersion, filePath) == ModelInfo.PUBLIC) {
+ try {
+ rows.add(Arrays.asList(new SerialClob(MetadataSourceUtil.getFileContentAsString(filePath, metadata.getMetadataSource()).toCharArray())));
+ } catch (SQLException e) {
+ throw new MetaMatrixComponentException(e);
+ }
+ }
+ break;
+ }
+ }
+ return new CollectionTupleSource(rows.iterator(), command.getProjectedSymbols());
+ }
+
AtomicRequestMessage aqr = createRequest(processorId, command, modelName, connectorBindingId, nodeID);
DataTierTupleSource tupleSource = new DataTierTupleSource(aqr.getCommand().getProjectedSymbols(), aqr, this, aqr.getConnectorID(), workItem);
tupleSource.open();
return tupleSource;
}
+
+ private boolean checkVisibility(String vdbName, String vdbVersion,
+ String modelName) throws MetaMatrixComponentException {
+ return vdbService.getModelVisibility(vdbName, vdbVersion, modelName) == ModelInfo.PUBLIC;
+ }
private AtomicRequestMessage createRequest(Object processorId,
Command command, String modelName, String connectorBindingId, int nodeID)
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/capabilities/SharedCachedFinder.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/capabilities/SharedCachedFinder.java 2009-10-24 18:05:58 UTC (rev 1535)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/capabilities/SharedCachedFinder.java 2009-10-24 18:07:35 UTC (rev 1536)
@@ -26,7 +26,9 @@
import java.util.Map;
import com.metamatrix.api.exception.MetaMatrixComponentException;
+import com.metamatrix.core.CoreConstants;
import com.metamatrix.dqp.DQPPlugin;
+import com.metamatrix.query.optimizer.capabilities.BasicSourceCapabilities;
import com.metamatrix.query.optimizer.capabilities.CapabilitiesFinder;
import com.metamatrix.query.optimizer.capabilities.SourceCapabilities;
@@ -34,6 +36,8 @@
*/
public class SharedCachedFinder implements CapabilitiesFinder {
+ private static BasicSourceCapabilities SYSTEM_CAPS = new BasicSourceCapabilities();
+
private CapabilitiesFinder internalFinder;
// Cache of SourceCapabilities by modelName
@@ -48,6 +52,7 @@
public SharedCachedFinder(CapabilitiesFinder internalFinder, Map<String, SourceCapabilities> sharedCache) {
this.internalFinder = internalFinder;
this.capabilityCache = sharedCache;
+ userCache.put(CoreConstants.SYSTEM_MODEL, SYSTEM_CAPS);
}
/**
Copied: trunk/engine/src/main/java/org/teiid/metadata/CompositeMetadataStore.java (from rev 1529, trunk/metadata/src/main/java/org/teiid/metadata/CompositeMetadataStore.java)
===================================================================
--- trunk/engine/src/main/java/org/teiid/metadata/CompositeMetadataStore.java (rev 0)
+++ trunk/engine/src/main/java/org/teiid/metadata/CompositeMetadataStore.java 2009-10-24 18:07:35 UTC (rev 1536)
@@ -0,0 +1,175 @@
+/*
+ * 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.metadata;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.LinkedHashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+import org.teiid.connector.metadata.runtime.ColumnRecordImpl;
+import org.teiid.connector.metadata.runtime.MetadataStore;
+import org.teiid.connector.metadata.runtime.ModelRecordImpl;
+import org.teiid.connector.metadata.runtime.ProcedureRecordImpl;
+import org.teiid.connector.metadata.runtime.TableRecordImpl;
+import org.teiid.connector.metadata.runtime.TableRecordImpl.Type;
+
+import com.metamatrix.api.exception.MetaMatrixComponentException;
+import com.metamatrix.api.exception.query.QueryMetadataException;
+import com.metamatrix.core.id.UUID;
+import com.metamatrix.core.util.StringUtil;
+import com.metamatrix.metadata.runtime.api.MetadataSource;
+
+/**
+ * Aggregates the metadata from multiple stores.
+ * IMPORTANT: All strings queries should be in lower case.
+ */
+public class CompositeMetadataStore {
+
+ private MetadataSource metadataSource;
+ private Map<String, MetadataStore> storeMap = new LinkedHashMap<String, MetadataStore>();
+ private List<MetadataStore> metadataStores;
+
+ public CompositeMetadataStore(List<MetadataStore> metadataStores, MetadataSource metadataSource) {
+ this.metadataSource = metadataSource;
+ this.metadataStores = metadataStores;
+ for (MetadataStore metadataStore : metadataStores) {
+ for (String model : metadataStore.getModels().keySet()) {
+ storeMap.put(model.toLowerCase(), metadataStore);
+ }
+ }
+ }
+
+ public ModelRecordImpl getModel(String fullName)
+ throws QueryMetadataException, MetaMatrixComponentException {
+ ModelRecordImpl result = getMetadataStore(fullName).getModels().get(fullName);
+ if (result == null) {
+ throw new QueryMetadataException(fullName+TransformationMetadata.NOT_EXISTS_MESSAGE);
+ }
+ return result;
+ }
+
+ public TableRecordImpl findGroup(String fullName)
+ throws QueryMetadataException {
+ List<String> tokens = StringUtil.getTokens(fullName, TransformationMetadata.DELIMITER_STRING);
+ if (tokens.size() < 2) {
+ throw new QueryMetadataException(fullName+TransformationMetadata.NOT_EXISTS_MESSAGE);
+ }
+ TableRecordImpl result = getMetadataStore(tokens.get(0)).getTables().get(fullName);
+ if (result == null) {
+ throw new QueryMetadataException(fullName+TransformationMetadata.NOT_EXISTS_MESSAGE);
+ }
+ return result;
+ }
+
+ public Collection<String> getGroupsForPartialName(String partialGroupName) {
+ List<String> result = new LinkedList<String>();
+ for (MetadataStore store : metadataStores) {
+ for (Map.Entry<String, TableRecordImpl> entry : store.getTables().entrySet()) {
+ if (entry.getKey().endsWith(partialGroupName)) {
+ result.add(entry.getValue().getFullName());
+ }
+ }
+ }
+ return result;
+ }
+
+ public ProcedureRecordImpl getStoredProcedure(
+ String fullyQualifiedProcedureName)
+ throws MetaMatrixComponentException, QueryMetadataException {
+ List<String> tokens = StringUtil.getTokens(fullyQualifiedProcedureName, TransformationMetadata.DELIMITER_STRING);
+ if (tokens.size() < 2) {
+ throw new QueryMetadataException(fullyQualifiedProcedureName+TransformationMetadata.NOT_EXISTS_MESSAGE);
+ }
+ ProcedureRecordImpl result = getMetadataStore(tokens.get(0)).getProcedures().get(fullyQualifiedProcedureName);
+ if (result == null) {
+ throw new QueryMetadataException(fullyQualifiedProcedureName+TransformationMetadata.NOT_EXISTS_MESSAGE);
+ }
+ return result;
+ }
+
+ private MetadataStore getMetadataStore(String modelName) throws QueryMetadataException {
+ MetadataStore store = this.storeMap.get(modelName);
+ if (store == null) {
+ throw new QueryMetadataException(modelName+TransformationMetadata.NOT_EXISTS_MESSAGE);
+ }
+ return store;
+ }
+
+ public MetadataSource getMetadataSource() {
+ return metadataSource;
+ }
+
+ public List<MetadataStore> getMetadataStores() {
+ return metadataStores;
+ }
+
+ /*
+ * The next methods are hold overs from XML/UUID resolving and will perform poorly
+ */
+
+ public ColumnRecordImpl findElement(String elementName) throws QueryMetadataException {
+ ColumnRecordImpl result = null;
+ if (StringUtil.startsWithIgnoreCase(elementName,UUID.PROTOCOL)) {
+ for (MetadataStore store : this.metadataStores) {
+ for (TableRecordImpl table : store.getTables().values()) {
+ for (ColumnRecordImpl column : table.getColumns()) {
+ if (column.getUUID().equalsIgnoreCase(elementName)) {
+ return column;
+ }
+ }
+ }
+ }
+ } else {
+ List<String> tokens = StringUtil.getTokens(elementName, TransformationMetadata.DELIMITER_STRING);
+ if (tokens.size() < 3) {
+ throw new QueryMetadataException(elementName+TransformationMetadata.NOT_EXISTS_MESSAGE);
+ }
+ TableRecordImpl table = findGroup(StringUtil.join(tokens.subList(0, tokens.size() - 1), TransformationMetadata.DELIMITER_STRING));
+ for (ColumnRecordImpl column : table.getColumns()) {
+ if (column.getFullName().equalsIgnoreCase(elementName)) {
+ return column;
+ }
+ }
+ }
+ if (result == null) {
+ throw new QueryMetadataException(elementName+TransformationMetadata.NOT_EXISTS_MESSAGE);
+ }
+ return result;
+ }
+
+ public Collection<TableRecordImpl> getXMLTempGroups(TableRecordImpl tableRecord) throws QueryMetadataException {
+ ArrayList<TableRecordImpl> results = new ArrayList<TableRecordImpl>();
+ MetadataStore store = getMetadataStore(tableRecord.getModelName().toLowerCase());
+ String namePrefix = tableRecord.getFullName() + TransformationMetadata.DELIMITER_STRING;
+ for (TableRecordImpl table : store.getTables().values()) {
+ if (table.getTableType() == Type.XmlStagingTable && table.getName().startsWith(namePrefix)) {
+ results.add(table);
+ }
+ }
+ return results;
+ }
+
+}
Property changes on: trunk/engine/src/main/java/org/teiid/metadata/CompositeMetadataStore.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: trunk/engine/src/main/java/org/teiid/metadata/TransformationMetadata.java (from rev 1529, trunk/metadata/src/main/java/org/teiid/metadata/TransformationMetadata.java)
===================================================================
--- trunk/engine/src/main/java/org/teiid/metadata/TransformationMetadata.java (rev 0)
+++ trunk/engine/src/main/java/org/teiid/metadata/TransformationMetadata.java 2009-10-24 18:07:35 UTC (rev 1536)
@@ -0,0 +1,999 @@
+/*
+ * 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.metadata;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
+import org.teiid.connector.metadata.runtime.AbstractMetadataRecord;
+import org.teiid.connector.metadata.runtime.ColumnRecordImpl;
+import org.teiid.connector.metadata.runtime.ColumnSetRecordImpl;
+import org.teiid.connector.metadata.runtime.DatatypeRecordImpl;
+import org.teiid.connector.metadata.runtime.ForeignKeyRecordImpl;
+import org.teiid.connector.metadata.runtime.KeyRecord;
+import org.teiid.connector.metadata.runtime.ModelRecordImpl;
+import org.teiid.connector.metadata.runtime.ProcedureParameterRecordImpl;
+import org.teiid.connector.metadata.runtime.ProcedureRecordImpl;
+import org.teiid.connector.metadata.runtime.TableRecordImpl;
+import org.teiid.connector.metadata.runtime.BaseColumn.NullType;
+import org.teiid.connector.metadata.runtime.ColumnRecordImpl.SearchType;
+import org.teiid.connector.metadata.runtime.ProcedureParameterRecordImpl.Type;
+
+import com.metamatrix.api.exception.MetaMatrixComponentException;
+import com.metamatrix.api.exception.query.QueryMetadataException;
+import com.metamatrix.common.properties.UnmodifiableProperties;
+import com.metamatrix.common.types.DataTypeManager;
+import com.metamatrix.core.util.ArgCheck;
+import com.metamatrix.core.util.LRUCache;
+import com.metamatrix.core.util.StringUtil;
+import com.metamatrix.dqp.DQPPlugin;
+import com.metamatrix.metadata.runtime.api.MetadataSourceUtil;
+import com.metamatrix.query.mapping.relational.QueryNode;
+import com.metamatrix.query.mapping.xml.MappingDocument;
+import com.metamatrix.query.mapping.xml.MappingLoader;
+import com.metamatrix.query.mapping.xml.MappingNode;
+import com.metamatrix.query.metadata.BasicQueryMetadata;
+import com.metamatrix.query.metadata.StoredProcedureInfo;
+import com.metamatrix.query.metadata.SupportConstants;
+import com.metamatrix.query.sql.lang.SPParameter;
+
+/**
+ * Modelers implementation of QueryMetadataInterface that reads columns, groups, models etc.
+ * index files for various metadata properties.
+ */
+public class TransformationMetadata extends BasicQueryMetadata {
+
+ /** Delimiter character used when specifying fully qualified entity names */
+ public static final char DELIMITER_CHAR = StringUtil.Constants.DOT_CHAR;
+ 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$
+
+ private static UnmodifiableProperties EMPTY_PROPS = new UnmodifiableProperties(new Properties());
+
+ private final CompositeMetadataStore store;
+
+ /*
+ * TODO: move caching to jboss cache structure
+ */
+ private final Map<String, Object> metadataCache = Collections.synchronizedMap(new LRUCache<String, Object>(500));
+ private final Map<String, String> partialNameToFullNameCache = Collections.synchronizedMap(new LRUCache<String, String>(1000));
+ private final Map<String, StoredProcedureInfo> procedureCache = Collections.synchronizedMap(new LRUCache<String, StoredProcedureInfo>(200));
+ /**
+ * TransformationMetadata constructor
+ * @param context Object containing the info needed to lookup metadta.
+ */
+ public TransformationMetadata(final CompositeMetadataStore store) {
+ ArgCheck.isNotNull(store);
+ this.store = store;
+ }
+
+ //==================================================================================
+ // I N T E R F A C E M E T H O D S
+ //==================================================================================
+
+ /* (non-Javadoc)
+ * @see com.metamatrix.query.metadata.QueryMetadataInterface#getElementID(java.lang.String)
+ */
+ public Object getElementID(final String elementName) throws MetaMatrixComponentException, QueryMetadataException {
+ return getMetadataStore().findElement(elementName.toLowerCase());
+ }
+
+ /* (non-Javadoc)
+ * @see com.metamatrix.query.metadata.QueryMetadataInterface#getGroupID(java.lang.String)
+ */
+ public Object getGroupID(final String groupName) throws MetaMatrixComponentException, QueryMetadataException {
+ return getMetadataStore().findGroup(groupName.toLowerCase());
+ }
+
+ /* (non-Javadoc)
+ * @see com.metamatrix.query.metadata.QueryMetadataInterface#getGroupsForPartialName(java.lang.String)
+ */
+ public Collection getGroupsForPartialName(final String partialGroupName)
+ throws MetaMatrixComponentException, QueryMetadataException {
+ ArgCheck.isNotEmpty(partialGroupName);
+
+ String groupName = this.partialNameToFullNameCache.get(partialGroupName);
+
+ if (groupName != null) {
+ return Arrays.asList(groupName);
+ }
+
+ String partialName = DELIMITER_CHAR + partialGroupName.toLowerCase();
+
+ Collection result = getMetadataStore().getGroupsForPartialName(partialName);
+
+ if (result.size() == 1) {
+ this.partialNameToFullNameCache.put(partialGroupName, (String)result.iterator().next());
+ }
+ return result;
+ }
+
+ /* (non-Javadoc)
+ * @see com.metamatrix.query.metadata.QueryMetadataInterface#getModelID(java.lang.Object)
+ */
+ public Object getModelID(final Object groupOrElementID) throws MetaMatrixComponentException, QueryMetadataException {
+ if (!(groupOrElementID instanceof TableRecordImpl) && !(groupOrElementID instanceof ColumnRecordImpl)) {
+ throw createInvalidRecordTypeException(groupOrElementID);
+ }
+
+ String modelName = ((AbstractMetadataRecord)groupOrElementID).getModelName();
+ return getModel(modelName);
+ }
+
+ private Object getModel(String modelName) throws QueryMetadataException,
+ MetaMatrixComponentException {
+ return getMetadataStore().getModel(modelName.toLowerCase());
+ }
+
+ /* (non-Javadoc)
+ * @see com.metamatrix.query.metadata.QueryMetadataInterface#getFullName(java.lang.Object)
+ */
+ public String getFullName(final Object metadataID) throws MetaMatrixComponentException, QueryMetadataException {
+ ArgCheck.isInstanceOf(AbstractMetadataRecord.class, metadataID);
+ AbstractMetadataRecord metadataRecord = (AbstractMetadataRecord) metadataID;
+ return metadataRecord.getFullName();
+ }
+
+ /* (non-Javadoc)
+ * @see com.metamatrix.query.metadata.QueryMetadataInterface#getFullElementName(java.lang.String, java.lang.String)
+ */
+ public String getFullElementName(final String fullGroupName, final String shortElementName)
+ throws MetaMatrixComponentException, QueryMetadataException {
+ ArgCheck.isNotEmpty(fullGroupName);
+ ArgCheck.isNotEmpty(shortElementName);
+
+ return fullGroupName + DELIMITER_CHAR + shortElementName;
+ }
+
+ /* (non-Javadoc)
+ * @see com.metamatrix.query.metadata.QueryMetadataInterface#getShortElementName(java.lang.String)
+ */
+ public String getShortElementName(final String fullElementName) throws MetaMatrixComponentException, QueryMetadataException {
+ ArgCheck.isNotEmpty(fullElementName);
+ int index = fullElementName.lastIndexOf(DELIMITER_CHAR);
+ if(index >= 0) {
+ return fullElementName.substring(index+1);
+ }
+ return fullElementName;
+ }
+
+ /**
+ * Return the text portion of the fullElementName representing a group.
+ * That means that this should only return text that is part of the
+ * fullElementName and not look up new IDs or do much of anything fancy.
+ * This method is used by the resolver to decide which portion of a fully-
+ * qualified element name is the group name. It will compare whatever comes
+ * back with the actual group names and aliases in the query, which is
+ * why it is important not to introduce new metadata here. Also, returning
+ * null indicates that no portion of the fullElementName is a
+ * group name - that is ok as it will be resolved as an ambiguous element.
+ * @see com.metamatrix.query.metadata.QueryMetadataInterface#getGroupName(java.lang.String)
+ */
+ public String getGroupName(final String fullElementName) throws MetaMatrixComponentException, QueryMetadataException {
+ ArgCheck.isNotEmpty(fullElementName);
+
+ int index = fullElementName.lastIndexOf(DELIMITER_CHAR);
+ if(index >= 0) {
+ return fullElementName.substring(0, index);
+ }
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see com.metamatrix.query.metadata.QueryMetadataInterface#getElementIDsInGroupID(java.lang.Object)
+ */
+ public List getElementIDsInGroupID(final Object groupID) throws MetaMatrixComponentException, QueryMetadataException {
+ ArgCheck.isInstanceOf(TableRecordImpl.class, groupID);
+ return ((TableRecordImpl)groupID).getColumns();
+ }
+
+ /* (non-Javadoc)
+ * @see com.metamatrix.query.metadata.QueryMetadataInterface#getGroupIDForElementID(java.lang.Object)
+ */
+ public Object getGroupIDForElementID(final Object elementID) throws MetaMatrixComponentException, QueryMetadataException {
+ if(elementID instanceof ColumnRecordImpl) {
+ ColumnRecordImpl columnRecord = (ColumnRecordImpl) elementID;
+ return this.getGroupID(columnRecord.getParentFullName());
+ } else if(elementID instanceof ProcedureParameterRecordImpl){
+ ProcedureParameterRecordImpl columnRecord = (ProcedureParameterRecordImpl) elementID;
+ return this.getGroupID(columnRecord.getParentFullName());
+ } else {
+ throw createInvalidRecordTypeException(elementID);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see com.metamatrix.query.metadata.QueryMetadataInterface#getStoredProcedureInfoForProcedure(java.lang.String)
+ */
+ public StoredProcedureInfo getStoredProcedureInfoForProcedure(final String fullyQualifiedProcedureName)
+ throws MetaMatrixComponentException, QueryMetadataException {
+ ArgCheck.isNotEmpty(fullyQualifiedProcedureName);
+ String lowerGroupName = fullyQualifiedProcedureName.toLowerCase();
+ StoredProcedureInfo procInfo = this.procedureCache.get(lowerGroupName);
+
+ if (procInfo != null) {
+ return procInfo;
+ }
+
+ ProcedureRecordImpl procRecord = getMetadataStore().getStoredProcedure(lowerGroupName);
+
+ String procedureFullName = procRecord.getFullName();
+
+ // create the storedProcedure info object that would hold procedure's metadata
+ procInfo = new StoredProcedureInfo();
+ procInfo.setProcedureCallableName(procRecord.getName());
+ procInfo.setProcedureID(procRecord);
+
+ // modelID for the procedure
+ procInfo.setModelID(getModel(procRecord.getModelName()));
+
+ // get the parameter metadata info
+ for (ProcedureParameterRecordImpl paramRecord : procRecord.getParameters()) {
+ String runtimeType = paramRecord.getRuntimeType();
+ int direction = this.convertParamRecordTypeToStoredProcedureType(paramRecord.getType());
+ // create a parameter and add it to the procedure object
+ SPParameter spParam = new SPParameter(paramRecord.getPosition(), direction, paramRecord.getFullName());
+ spParam.setMetadataID(paramRecord);
+ spParam.setClassType(DataTypeManager.getDataTypeClass(runtimeType));
+ procInfo.addParameter(spParam);
+ }
+
+ // if the procedure returns a resultSet, obtain resultSet metadata
+ if(procRecord.getResultSet() != null) {
+ ColumnSetRecordImpl resultRecord = procRecord.getResultSet();
+ // resultSet is the last parameter in the procedure
+ int lastParamIndex = procInfo.getParameters().size() + 1;
+ SPParameter param = new SPParameter(lastParamIndex, SPParameter.RESULT_SET, resultRecord.getFullName());
+ param.setClassType(java.sql.ResultSet.class);
+ param.setMetadataID(resultRecord);
+
+ for (ColumnRecordImpl columnRecord : resultRecord.getColumns()) {
+ String colType = columnRecord.getRuntimeType();
+ param.addResultSetColumn(columnRecord.getFullName(), DataTypeManager.getDataTypeClass(colType), columnRecord);
+ }
+
+ procInfo.addParameter(param);
+ }
+
+ // if this is a virtual procedure get the procedure plan
+ if(procRecord.isVirtual()) {
+ QueryNode queryNode = new QueryNode(procedureFullName, procRecord.getQueryPlan());
+ procInfo.setQueryPlan(queryNode);
+ }
+
+ //subtract 1, to match up with the server
+ procInfo.setUpdateCount(procRecord.getUpdateCount() -1);
+
+ this.procedureCache.put(lowerGroupName, procInfo);
+
+ return procInfo;
+ }
+
+ /**
+ * Method to convert the parameter type returned from a ProcedureParameterRecord
+ * to the parameter type expected by StoredProcedureInfo
+ * @param parameterType
+ * @return
+ */
+ private int convertParamRecordTypeToStoredProcedureType(final ProcedureParameterRecordImpl.Type parameterType) {
+ switch (parameterType) {
+ case In : return SPParameter.IN;
+ case Out : return SPParameter.OUT;
+ case InOut : return SPParameter.INOUT;
+ case ReturnValue : return SPParameter.RETURN_VALUE;
+ case ResultSet : return SPParameter.RESULT_SET;
+ default :
+ return -1;
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see com.metamatrix.query.metadata.QueryMetadataInterface#getElementType(java.lang.Object)
+ */
+ public String getElementType(final Object elementID) throws MetaMatrixComponentException, QueryMetadataException {
+ if(elementID instanceof ColumnRecordImpl) {
+ return ((ColumnRecordImpl) elementID).getRuntimeType();
+ } else if(elementID instanceof ProcedureParameterRecordImpl){
+ return ((ProcedureParameterRecordImpl) elementID).getRuntimeType();
+ } else {
+ throw createInvalidRecordTypeException(elementID);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see com.metamatrix.query.metadata.QueryMetadataInterface#getDefaultValue(java.lang.String)
+ */
+ public Object getDefaultValue(final Object elementID) throws MetaMatrixComponentException, QueryMetadataException {
+ if(elementID instanceof ColumnRecordImpl) {
+ return ((ColumnRecordImpl) elementID).getDefaultValue();
+ } else if(elementID instanceof ProcedureParameterRecordImpl){
+ return ((ProcedureParameterRecordImpl) elementID).getDefaultValue();
+ } else {
+ throw createInvalidRecordTypeException(elementID);
+ }
+ }
+
+ public Object getMinimumValue(final Object elementID) throws MetaMatrixComponentException, QueryMetadataException {
+ if(elementID instanceof ColumnRecordImpl) {
+ return ((ColumnRecordImpl) elementID).getMinValue();
+ } else if(elementID instanceof ProcedureParameterRecordImpl){
+ return null;
+ } else {
+ throw createInvalidRecordTypeException(elementID);
+ }
+ }
+
+ public Object getMaximumValue(final Object elementID) throws MetaMatrixComponentException, QueryMetadataException {
+ if(elementID instanceof ColumnRecordImpl) {
+ return ((ColumnRecordImpl) elementID).getMaxValue();
+ } else if(elementID instanceof ProcedureParameterRecordImpl){
+ return null;
+ } else {
+ throw createInvalidRecordTypeException(elementID);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see com.metamatrix.query.metadata.QueryMetadataInterface#isVirtualGroup(java.lang.Object)
+ */
+ public boolean isVirtualGroup(final Object groupID) throws MetaMatrixComponentException, QueryMetadataException {
+ ArgCheck.isInstanceOf(TableRecordImpl.class, groupID);
+ return ((TableRecordImpl) groupID).isVirtual();
+ }
+
+ /**
+ * @see com.metamatrix.query.metadata.QueryMetadataInterface#isProcedureInputElement(java.lang.Object)
+ * @since 4.2
+ */
+ public boolean isProcedure(final Object groupID) throws MetaMatrixComponentException, QueryMetadataException {
+ if(groupID instanceof ProcedureRecordImpl) {
+ return true;
+ }
+ if(groupID instanceof TableRecordImpl){
+ return false;
+ }
+ throw createInvalidRecordTypeException(groupID);
+ }
+
+ public boolean isVirtualModel(final Object modelID) throws MetaMatrixComponentException, QueryMetadataException {
+ ArgCheck.isInstanceOf(ModelRecordImpl.class, modelID);
+ ModelRecordImpl modelRecord = (ModelRecordImpl) modelID;
+ return modelRecord.getModelType() == ModelRecordImpl.Type.Virtual;
+ }
+
+ /* (non-Javadoc)
+ * @see com.metamatrix.query.metadata.QueryMetadataInterface#getVirtualPlan(java.lang.Object)
+ */
+ public QueryNode getVirtualPlan(final Object groupID) throws MetaMatrixComponentException, QueryMetadataException {
+ ArgCheck.isInstanceOf(TableRecordImpl.class, groupID);
+
+ TableRecordImpl tableRecord = (TableRecordImpl) 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$
+ }
+ String transQuery = tableRecord.getSelectTransformation();
+ QueryNode queryNode = new QueryNode(tableRecord.getFullName(), transQuery);
+
+ // get any bindings and add them onto the query node
+ List bindings = tableRecord.getBindings();
+ if(bindings != null) {
+ for(Iterator bindIter = bindings.iterator();bindIter.hasNext();) {
+ queryNode.addBinding((String)bindIter.next());
+ }
+ }
+
+ return queryNode;
+ }
+
+ /* (non-Javadoc)
+ * @see com.metamatrix.query.metadata.QueryMetadataInterface#getInsertPlan(java.lang.Object)
+ */
+ public String getInsertPlan(final Object groupID) throws MetaMatrixComponentException, QueryMetadataException {
+ ArgCheck.isInstanceOf(TableRecordImpl.class, groupID);
+ TableRecordImpl tableRecordImpl = (TableRecordImpl)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$
+ }
+ return ((TableRecordImpl)groupID).getInsertPlan();
+ }
+
+ /* (non-Javadoc)
+ * @see com.metamatrix.query.metadata.QueryMetadataInterface#getUpdatePlan(java.lang.Object)
+ */
+ public String getUpdatePlan(final Object groupID) throws MetaMatrixComponentException, QueryMetadataException {
+ ArgCheck.isInstanceOf(TableRecordImpl.class, groupID);
+ TableRecordImpl tableRecordImpl = (TableRecordImpl)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$
+ }
+ return ((TableRecordImpl)groupID).getUpdatePlan();
+ }
+
+ /* (non-Javadoc)
+ * @see com.metamatrix.query.metadata.QueryMetadataInterface#getDeletePlan(java.lang.Object)
+ */
+ public String getDeletePlan(final Object groupID) throws MetaMatrixComponentException, QueryMetadataException {
+ ArgCheck.isInstanceOf(TableRecordImpl.class, groupID);
+ TableRecordImpl tableRecordImpl = (TableRecordImpl)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$
+ }
+ return ((TableRecordImpl)groupID).getDeletePlan();
+ }
+
+ /* (non-Javadoc)
+ * @see com.metamatrix.query.metadata.QueryMetadataInterface#modelSupports(java.lang.Object, int)
+ */
+ public boolean modelSupports(final Object modelID, final int modelConstant)
+ throws MetaMatrixComponentException, QueryMetadataException {
+ ArgCheck.isInstanceOf(ModelRecordImpl.class, modelID);
+
+ switch(modelConstant) {
+ default:
+ throw new UnsupportedOperationException(DQPPlugin.Util.getString("TransformationMetadata.Unknown_support_constant___12") + modelConstant); //$NON-NLS-1$
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see com.metamatrix.query.metadata.QueryMetadataInterface#groupSupports(java.lang.Object, int)
+ */
+ public boolean groupSupports(final Object groupID, final int groupConstant)
+ throws MetaMatrixComponentException, QueryMetadataException {
+ ArgCheck.isInstanceOf(TableRecordImpl.class, groupID);
+ TableRecordImpl tableRecord = (TableRecordImpl) groupID;
+
+ switch(groupConstant) {
+ case SupportConstants.Group.UPDATE:
+ return tableRecord.supportsUpdate();
+ default:
+ throw new UnsupportedOperationException(DQPPlugin.Util.getString("TransformationMetadata.Unknown_support_constant___12") + groupConstant); //$NON-NLS-1$
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see com.metamatrix.query.metadata.QueryMetadataInterface#elementSupports(java.lang.Object, int)
+ */
+ public boolean elementSupports(final Object elementID, final int elementConstant)
+ throws MetaMatrixComponentException, QueryMetadataException {
+
+ if(elementID instanceof ColumnRecordImpl) {
+ ColumnRecordImpl columnRecord = (ColumnRecordImpl) elementID;
+ switch(elementConstant) {
+ case SupportConstants.Element.NULL:
+ return columnRecord.getNullType() == NullType.Nullable;
+ case SupportConstants.Element.NULL_UNKNOWN:
+ return columnRecord.getNullType() == NullType.Unknown;
+ case SupportConstants.Element.SEARCHABLE_COMPARE:
+ return (columnRecord.getSearchType() == SearchType.Searchable || columnRecord.getSearchType() == SearchType.All_Except_Like);
+ case SupportConstants.Element.SEARCHABLE_LIKE:
+ return (columnRecord.getSearchType() == SearchType.Searchable || columnRecord.getSearchType() == SearchType.Like_Only);
+ case SupportConstants.Element.SELECT:
+ return columnRecord.isSelectable();
+ case SupportConstants.Element.UPDATE:
+ return columnRecord.isUpdatable();
+ case SupportConstants.Element.DEFAULT_VALUE:
+ Object defaultValue = columnRecord.getDefaultValue();
+ if(defaultValue == null) {
+ return false;
+ }
+ return true;
+ case SupportConstants.Element.AUTO_INCREMENT:
+ return columnRecord.isAutoIncrementable();
+ case SupportConstants.Element.CASE_SENSITIVE:
+ return columnRecord.isCaseSensitive();
+ case SupportConstants.Element.SIGNED:
+ return columnRecord.isSigned();
+ default:
+ throw new UnsupportedOperationException(DQPPlugin.Util.getString("TransformationMetadata.Unknown_support_constant___12") + elementConstant); //$NON-NLS-1$
+ }
+ } else if(elementID instanceof ProcedureParameterRecordImpl) {
+ ProcedureParameterRecordImpl columnRecord = (ProcedureParameterRecordImpl) elementID;
+ switch(elementConstant) {
+ case SupportConstants.Element.NULL:
+ return columnRecord.getNullType() == NullType.Nullable;
+ case SupportConstants.Element.NULL_UNKNOWN:
+ return columnRecord.getNullType() == NullType.Unknown;
+ case SupportConstants.Element.SEARCHABLE_COMPARE:
+ case SupportConstants.Element.SEARCHABLE_LIKE:
+ return false;
+ case SupportConstants.Element.SELECT:
+ return columnRecord.getType() != Type.In;
+ case SupportConstants.Element.UPDATE:
+ return false;
+ case SupportConstants.Element.DEFAULT_VALUE:
+ Object defaultValue = columnRecord.getDefaultValue();
+ if(defaultValue == null) {
+ return false;
+ }
+ return true;
+ case SupportConstants.Element.AUTO_INCREMENT:
+ return false;
+ case SupportConstants.Element.CASE_SENSITIVE:
+ return false;
+ case SupportConstants.Element.SIGNED:
+ return true;
+ default:
+ throw new UnsupportedOperationException(DQPPlugin.Util.getString("TransformationMetadata.Unknown_support_constant___12") + elementConstant); //$NON-NLS-1$
+ }
+
+ } else {
+ throw createInvalidRecordTypeException(elementID);
+ }
+ }
+
+ private IllegalArgumentException createInvalidRecordTypeException(Object elementID) {
+ return new IllegalArgumentException(DQPPlugin.Util.getString("TransformationMetadata.Invalid_type", elementID.getClass().getName())); //$NON-NLS-1$
+ }
+
+ /* (non-Javadoc)
+ * @see com.metamatrix.query.metadata.QueryMetadataInterface#getMaxSetSize(java.lang.Object)
+ */
+ public int getMaxSetSize(final Object modelID) throws MetaMatrixComponentException, QueryMetadataException {
+ ArgCheck.isInstanceOf(ModelRecordImpl.class, modelID);
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see com.metamatrix.query.metadata.QueryMetadataInterface#getIndexesInGroup(java.lang.Object)
+ */
+ public Collection getIndexesInGroup(final Object groupID) throws MetaMatrixComponentException, QueryMetadataException {
+ ArgCheck.isInstanceOf(TableRecordImpl.class, groupID);
+ return ((TableRecordImpl)groupID).getIndexes();
+ }
+
+ /* (non-Javadoc)
+ * @see com.metamatrix.query.metadata.QueryMetadataInterface#getUniqueKeysInGroup(java.lang.Object)
+ */
+ public Collection getUniqueKeysInGroup(final Object groupID)
+ throws MetaMatrixComponentException, QueryMetadataException {
+ ArgCheck.isInstanceOf(TableRecordImpl.class, groupID);
+ TableRecordImpl tableRecordImpl = (TableRecordImpl)groupID;
+ ArrayList<ColumnSetRecordImpl> result = new ArrayList<ColumnSetRecordImpl>(tableRecordImpl.getUniqueKeys());
+ if (tableRecordImpl.getPrimaryKey() != null) {
+ result.add(tableRecordImpl.getPrimaryKey());
+ }
+ for (KeyRecord key : tableRecordImpl.getIndexes()) {
+ if (key.getType() == KeyRecord.Type.Index) {
+ result.add(key);
+ }
+ }
+ return result;
+ }
+
+ /* (non-Javadoc)
+ * @see com.metamatrix.query.metadata.QueryMetadataInterface#getForeignKeysInGroup(java.lang.Object)
+ */
+ public Collection getForeignKeysInGroup(final Object groupID)
+ throws MetaMatrixComponentException, QueryMetadataException {
+ ArgCheck.isInstanceOf(TableRecordImpl.class, groupID);
+ return ((TableRecordImpl)groupID).getForeignKeys();
+ }
+
+ /* (non-Javadoc)
+ * @see com.metamatrix.query.metadata.QueryMetadataInterface#getPrimaryKeyIDForForeignKeyID(java.lang.Object)
+ */
+ public Object getPrimaryKeyIDForForeignKeyID(final Object foreignKeyID)
+ throws MetaMatrixComponentException, QueryMetadataException {
+ ArgCheck.isInstanceOf(ForeignKeyRecordImpl.class, foreignKeyID);
+ ForeignKeyRecordImpl fkRecord = (ForeignKeyRecordImpl) foreignKeyID;
+ return fkRecord.getPrimaryKey();
+ }
+
+ /* (non-Javadoc)
+ * @see com.metamatrix.query.metadata.QueryMetadataInterface#getAccessPatternsInGroup(java.lang.Object)
+ */
+ public Collection getAccessPatternsInGroup(final Object groupID)
+ throws MetaMatrixComponentException, QueryMetadataException {
+ ArgCheck.isInstanceOf(TableRecordImpl.class, groupID);
+ return ((TableRecordImpl)groupID).getAccessPatterns();
+ }
+
+ /* (non-Javadoc)
+ * @see com.metamatrix.query.metadata.QueryMetadataInterface#getElementIDsInIndex(java.lang.Object)
+ */
+ public List getElementIDsInIndex(final Object index) throws MetaMatrixComponentException, QueryMetadataException {
+ ArgCheck.isInstanceOf(ColumnSetRecordImpl.class, index);
+ return ((ColumnSetRecordImpl)index).getColumns();
+ }
+
+ /* (non-Javadoc)
+ * @see com.metamatrix.query.metadata.QueryMetadataInterface#getElementIDsInKey(java.lang.Object)
+ */
+ public List getElementIDsInKey(final Object key) throws MetaMatrixComponentException, QueryMetadataException {
+ ArgCheck.isInstanceOf(ColumnSetRecordImpl.class, key);
+ return ((ColumnSetRecordImpl)key).getColumns();
+ }
+
+ /* (non-Javadoc)
+ * @see com.metamatrix.query.metadata.QueryMetadataInterface#getElementIDsInAccessPattern(java.lang.Object)
+ */
+ public List getElementIDsInAccessPattern(final Object accessPattern)
+ throws MetaMatrixComponentException, QueryMetadataException {
+ ArgCheck.isInstanceOf(ColumnSetRecordImpl.class, accessPattern);
+ return ((ColumnSetRecordImpl)accessPattern).getColumns();
+ }
+
+ /* (non-Javadoc)
+ * @see com.metamatrix.query.metadata.QueryMetadataInterface#isXMLGroup(java.lang.Object)
+ */
+ public boolean isXMLGroup(final Object groupID) throws MetaMatrixComponentException, QueryMetadataException {
+ ArgCheck.isInstanceOf(TableRecordImpl.class, groupID);
+
+ TableRecordImpl tableRecord = (TableRecordImpl) groupID;
+ return tableRecord.getTableType() == TableRecordImpl.Type.Document;
+ }
+
+ /**
+ * @see com.metamatrix.query.metadata.QueryMetadataInterface#hasMaterialization(java.lang.Object)
+ * @since 4.2
+ */
+ public boolean hasMaterialization(final Object groupID) throws MetaMatrixComponentException,
+ QueryMetadataException {
+ ArgCheck.isInstanceOf(TableRecordImpl.class, groupID);
+ TableRecordImpl tableRecord = (TableRecordImpl) groupID;
+ return tableRecord.isMaterialized();
+ }
+
+ /**
+ * @see com.metamatrix.query.metadata.QueryMetadataInterface#getMaterialization(java.lang.Object)
+ * @since 4.2
+ */
+ public Object getMaterialization(final Object groupID) throws MetaMatrixComponentException,
+ QueryMetadataException {
+ ArgCheck.isInstanceOf(TableRecordImpl.class, groupID);
+ TableRecordImpl tableRecord = (TableRecordImpl) groupID;
+ if(tableRecord.isMaterialized()) {
+ return this.getGroupID(tableRecord.getMaterializedTableName());
+ }
+ return null;
+ }
+
+ /**
+ * @see com.metamatrix.query.metadata.QueryMetadataInterface#getMaterializationStage(java.lang.Object)
+ * @since 4.2
+ */
+ public Object getMaterializationStage(final Object groupID) throws MetaMatrixComponentException,
+ QueryMetadataException {
+ ArgCheck.isInstanceOf(TableRecordImpl.class, groupID);
+ TableRecordImpl tableRecord = (TableRecordImpl) groupID;
+ if(tableRecord.isMaterialized()) {
+ return this.getGroupID(tableRecord.getMaterializedStageTableName());
+ }
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see com.metamatrix.query.metadata.QueryMetadataInterface#getMappingNode(java.lang.Object)
+ */
+ public MappingNode getMappingNode(final Object groupID) throws MetaMatrixComponentException, QueryMetadataException {
+ ArgCheck.isInstanceOf(TableRecordImpl.class, groupID);
+
+ TableRecordImpl tableRecord = (TableRecordImpl) groupID;
+ final String groupName = tableRecord.getFullName();
+ if(tableRecord.isVirtual()) {
+ // get mappin transform
+ String document = tableRecord.getSelectTransformation();
+ InputStream inputStream = new ByteArrayInputStream(document.getBytes());
+ MappingLoader reader = new MappingLoader();
+ MappingDocument mappingDoc = null;
+ try{
+ mappingDoc = reader.loadDocument(inputStream);
+ mappingDoc.setName(groupName);
+ } catch (Exception e){
+ throw new MetaMatrixComponentException(e, DQPPlugin.Util.getString("TransformationMetadata.Error_trying_to_read_virtual_document_{0},_with_body__n{1}_1", groupName, mappingDoc)); //$NON-NLS-1$
+ } finally {
+ try {
+ inputStream.close();
+ } catch(Exception e) {}
+ }
+ return (MappingDocument)mappingDoc.clone();
+ }
+
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see com.metamatrix.query.metadata.QueryMetadataInterface#getVirtualDatabaseName()
+ */
+ public String getVirtualDatabaseName() throws MetaMatrixComponentException, QueryMetadataException {
+ return this.getMetadataStore().getMetadataSource().getName();
+ }
+
+ /* (non-Javadoc)
+ * @see com.metamatrix.query.metadata.QueryMetadataInterface#getXMLTempGroups(java.lang.Object)
+ */
+ public Collection getXMLTempGroups(final Object groupID) throws MetaMatrixComponentException, QueryMetadataException {
+ ArgCheck.isInstanceOf(TableRecordImpl.class, groupID);
+ TableRecordImpl tableRecord = (TableRecordImpl) groupID;
+
+ if(tableRecord.getTableType() == TableRecordImpl.Type.Document) {
+ return this.store.getXMLTempGroups(tableRecord);
+ }
+ return Collections.EMPTY_SET;
+ }
+
+ /* (non-Javadoc)
+ * @see com.metamatrix.query.metadata.QueryMetadataInterface#getCardinality(java.lang.Object)
+ */
+ public int getCardinality(final Object groupID) throws MetaMatrixComponentException, QueryMetadataException {
+ ArgCheck.isInstanceOf(TableRecordImpl.class, groupID);
+ return ((TableRecordImpl) groupID).getCardinality();
+ }
+
+ /* (non-Javadoc)
+ * @see com.metamatrix.query.metadata.QueryMetadataInterface#getXMLSchemas(java.lang.Object)
+ */
+ public List getXMLSchemas(final Object groupID) throws MetaMatrixComponentException, QueryMetadataException {
+
+ ArgCheck.isInstanceOf(TableRecordImpl.class, groupID);
+ TableRecordImpl tableRecord = (TableRecordImpl) groupID;
+
+ // lookup transformation record for the group
+ String groupName = tableRecord.getFullName();
+
+ // get the schema Paths
+ List<String> schemaPaths = tableRecord.getSchemaPaths();
+
+ List<String> schemas = new LinkedList<String>();
+ if (schemaPaths == null) {
+ return schemas;
+ }
+ File f = new File(tableRecord.getResourcePath());
+ String path = f.getParent();
+
+ for (String string : schemaPaths) {
+ String schema = getCharacterVDBResource(string);
+
+ if (schema == null) {
+ schema = getCharacterVDBResource(path + File.separator + string);
+ }
+
+ if (schema == null) {
+ throw new MetaMatrixComponentException(DQPPlugin.Util.getString("TransformationMetadata.Error_trying_to_read_schemas_for_the_document/table____1")+groupName); //$NON-NLS-1$
+ }
+ }
+
+ return schemas;
+ }
+
+ public String getNameInSource(final Object metadataID) throws MetaMatrixComponentException, QueryMetadataException {
+ ArgCheck.isInstanceOf(AbstractMetadataRecord.class, metadataID);
+ return ((AbstractMetadataRecord) metadataID).getNameInSource();
+ }
+
+ public int getElementLength(final Object elementID) throws MetaMatrixComponentException, QueryMetadataException {
+ if(elementID instanceof ColumnRecordImpl) {
+ return ((ColumnRecordImpl) elementID).getLength();
+ } else if(elementID instanceof ProcedureParameterRecordImpl){
+ return ((ProcedureParameterRecordImpl) elementID).getLength();
+ } else {
+ throw createInvalidRecordTypeException(elementID);
+ }
+ }
+
+ public int getPosition(final Object elementID) throws MetaMatrixComponentException, QueryMetadataException {
+ if(elementID instanceof ColumnRecordImpl) {
+ return ((ColumnRecordImpl) elementID).getPosition();
+ } else if(elementID instanceof ProcedureParameterRecordImpl) {
+ return ((ProcedureParameterRecordImpl) elementID).getPosition();
+ } else {
+ throw createInvalidRecordTypeException(elementID);
+ }
+ }
+
+ public int getPrecision(final Object elementID) throws MetaMatrixComponentException, QueryMetadataException {
+ if(elementID instanceof ColumnRecordImpl) {
+ return ((ColumnRecordImpl) elementID).getPrecision();
+ } else if(elementID instanceof ProcedureParameterRecordImpl) {
+ return ((ProcedureParameterRecordImpl) elementID).getPrecision();
+ } else {
+ throw createInvalidRecordTypeException(elementID);
+ }
+ }
+
+ public int getRadix(final Object elementID) throws MetaMatrixComponentException, QueryMetadataException {
+ if(elementID instanceof ColumnRecordImpl) {
+ return ((ColumnRecordImpl) elementID).getRadix();
+ } else if(elementID instanceof ProcedureParameterRecordImpl) {
+ return ((ProcedureParameterRecordImpl) elementID).getRadix();
+ } else {
+ throw createInvalidRecordTypeException(elementID);
+ }
+ }
+
+ public String getFormat(Object elementID) throws MetaMatrixComponentException, QueryMetadataException {
+ if(elementID instanceof ColumnRecordImpl) {
+ return ((ColumnRecordImpl) elementID).getFormat();
+ }
+ throw createInvalidRecordTypeException(elementID);
+ }
+
+ public int getScale(final Object elementID) throws MetaMatrixComponentException, QueryMetadataException {
+ if(elementID instanceof ColumnRecordImpl) {
+ return ((ColumnRecordImpl) elementID).getScale();
+ } else if(elementID instanceof ProcedureParameterRecordImpl) {
+ return ((ProcedureParameterRecordImpl) elementID).getScale();
+ } else {
+ throw createInvalidRecordTypeException(elementID);
+ }
+ }
+
+ public int getDistinctValues(final Object elementID) throws MetaMatrixComponentException, QueryMetadataException {
+ if(elementID instanceof ColumnRecordImpl) {
+ return ((ColumnRecordImpl) elementID).getDistinctValues();
+ } else if(elementID instanceof ProcedureParameterRecordImpl) {
+ return -1;
+ } else {
+ throw createInvalidRecordTypeException(elementID);
+ }
+ }
+
+ public int getNullValues(final Object elementID) throws MetaMatrixComponentException, QueryMetadataException {
+ if(elementID instanceof ColumnRecordImpl) {
+ return ((ColumnRecordImpl) elementID).getNullValues();
+ } else if(elementID instanceof ProcedureParameterRecordImpl) {
+ return -1;
+ } else {
+ throw createInvalidRecordTypeException(elementID);
+ }
+ }
+
+ public String getNativeType(final Object elementID) throws MetaMatrixComponentException, QueryMetadataException {
+ if(elementID instanceof ColumnRecordImpl) {
+ return ((ColumnRecordImpl) elementID).getNativeType();
+ } else if(elementID instanceof ProcedureParameterRecordImpl) {
+ return null;
+ } else {
+ throw createInvalidRecordTypeException(elementID);
+ }
+ }
+
+ /*
+ * @see com.metamatrix.query.metadata.QueryMetadataInterface#getExtensionProperties(java.lang.Object)
+ */
+ public Properties getExtensionProperties(final Object metadataID) throws MetaMatrixComponentException, QueryMetadataException {
+ ArgCheck.isInstanceOf(AbstractMetadataRecord.class, metadataID);
+ AbstractMetadataRecord metadataRecord = (AbstractMetadataRecord) metadataID;
+ Map<String, String> result = metadataRecord.getProperties();
+ if (result == null) {
+ return EMPTY_PROPS;
+ }
+ Properties p = new Properties();
+ p.putAll(result);
+ return p;
+ }
+
+ /**
+ * @see com.metamatrix.query.metadata.BasicQueryMetadata#getBinaryVDBResource(java.lang.String)
+ * @since 4.3
+ */
+ public byte[] getBinaryVDBResource(String resourcePath) throws MetaMatrixComponentException,
+ QueryMetadataException {
+ String content = this.getCharacterVDBResource(resourcePath);
+ if(content != null) {
+ return content.getBytes();
+ }
+ return null;
+ }
+
+ /**
+ * @see com.metamatrix.query.metadata.BasicQueryMetadata#getCharacterVDBResource(java.lang.String)
+ * @since 4.3
+ */
+ public String getCharacterVDBResource(String resourcePath) throws MetaMatrixComponentException,
+ QueryMetadataException {
+ return MetadataSourceUtil.getFileContentAsString(resourcePath, this.getMetadataStore().getMetadataSource());
+ }
+
+ public CompositeMetadataStore getMetadataStore() {
+ return this.store;
+ }
+
+ /**
+ * @see com.metamatrix.query.metadata.BasicQueryMetadata#getVDBResourcePaths()
+ * @since 4.3
+ */
+ public String[] getVDBResourcePaths() throws MetaMatrixComponentException,
+ QueryMetadataException {
+ return getMetadataStore().getMetadataSource().getEntries().toArray(new String[0]);
+ }
+
+ /**
+ * @see com.metamatrix.query.metadata.QueryMetadataInterface#getModeledType(java.lang.Object)
+ * @since 5.0
+ */
+ public String getModeledType(final Object elementID) throws MetaMatrixComponentException, QueryMetadataException {
+ DatatypeRecordImpl record = getDatatypeRecord(elementID);
+ if (record != null) {
+ return record.getDatatypeID();
+ }
+ return null;
+ }
+
+ /**
+ * @see com.metamatrix.query.metadata.QueryMetadataInterface#getModeledBaseType(java.lang.Object)
+ * @since 5.0
+ */
+ public String getModeledBaseType(final Object elementID) throws MetaMatrixComponentException, QueryMetadataException {
+ DatatypeRecordImpl record = getDatatypeRecord(elementID);
+ if (record != null) {
+ return record.getBasetypeID();
+ }
+ return null;
+ }
+
+ /**
+ * @see com.metamatrix.query.metadata.QueryMetadataInterface#getModeledPrimitiveType(java.lang.Object)
+ * @since 5.0
+ */
+ public String getModeledPrimitiveType(final Object elementID) throws MetaMatrixComponentException, QueryMetadataException {
+ DatatypeRecordImpl record = getDatatypeRecord(elementID);
+ if (record != null) {
+ return record.getPrimitiveTypeID();
+ }
+ return null;
+ }
+
+ private DatatypeRecordImpl getDatatypeRecord(final Object elementID) {
+ if (elementID instanceof ColumnRecordImpl) {
+ return ((ColumnRecordImpl)elementID).getDatatype();
+ } else if (elementID instanceof ProcedureParameterRecordImpl) {
+ return ((ProcedureParameterRecordImpl)elementID).getDatatype();
+ } else {
+ throw createInvalidRecordTypeException(elementID);
+ }
+ }
+
+ @Override
+ public Object addToMetadataCache(Object metadataID, String key, Object value)
+ throws MetaMatrixComponentException, QueryMetadataException {
+ ArgCheck.isInstanceOf(AbstractMetadataRecord.class, metadataID);
+ key = getCacheKey(key, (AbstractMetadataRecord)metadataID);
+ return this.metadataCache.put(key, value);
+ }
+
+ @Override
+ public Object getFromMetadataCache(Object metadataID, String key)
+ throws MetaMatrixComponentException, QueryMetadataException {
+ ArgCheck.isInstanceOf(AbstractMetadataRecord.class, metadataID);
+ key = getCacheKey(key, (AbstractMetadataRecord)metadataID);
+ return this.metadataCache.get(key);
+ }
+
+ private String getCacheKey(String key, AbstractMetadataRecord record) {
+ return record.getUUID() + "/" + record.getFullName() + "/" + key; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/engine/src/main/java/org/teiid/metadata/TransformationMetadata.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/engine/src/main/resources/com/metamatrix/dqp/i18n.properties
===================================================================
--- trunk/engine/src/main/resources/com/metamatrix/dqp/i18n.properties 2009-10-24 18:05:58 UTC (rev 1535)
+++ trunk/engine/src/main/resources/com/metamatrix/dqp/i18n.properties 2009-10-24 18:07:35 UTC (rev 1536)
@@ -470,4 +470,36 @@
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}
\ No newline at end of file
+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.Ambigous_index_with_UUID_{0},_found_multiple_indexes_with_the_given_UUID._2=Ambigous 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
\ No newline at end of file
Modified: trunk/engine/src/test/java/com/metamatrix/dqp/service/AutoGenDataService.java
===================================================================
--- trunk/engine/src/test/java/com/metamatrix/dqp/service/AutoGenDataService.java 2009-10-24 18:05:58 UTC (rev 1535)
+++ trunk/engine/src/test/java/com/metamatrix/dqp/service/AutoGenDataService.java 2009-10-24 18:07:35 UTC (rev 1536)
@@ -30,7 +30,7 @@
import java.util.List;
import java.util.Properties;
-import org.teiid.connector.metadata.runtime.ConnectorMetadata;
+import org.teiid.connector.metadata.runtime.MetadataStore;
import org.teiid.dqp.internal.datamgr.impl.ConnectorWorkItem;
import org.teiid.dqp.internal.process.DQPWorkContext;
@@ -249,7 +249,7 @@
}
@Override
- public ConnectorMetadata getConnectorMetadata(String vdbName,
+ public MetadataStore getConnectorMetadata(String vdbName,
String vdbVersion, String modelName, Properties importProperties) {
throw new UnsupportedOperationException();
}
Modified: trunk/engine/src/test/java/com/metamatrix/dqp/service/FakeMetadataService.java
===================================================================
--- trunk/engine/src/test/java/com/metamatrix/dqp/service/FakeMetadataService.java 2009-10-24 18:05:58 UTC (rev 1535)
+++ trunk/engine/src/test/java/com/metamatrix/dqp/service/FakeMetadataService.java 2009-10-24 18:07:35 UTC (rev 1536)
@@ -26,9 +26,9 @@
import java.util.Map;
import org.teiid.connector.metadata.runtime.DatatypeRecordImpl;
+import org.teiid.metadata.CompositeMetadataStore;
import com.metamatrix.api.exception.MetaMatrixComponentException;
-import com.metamatrix.connector.metadata.internal.IObjectSource;
import com.metamatrix.query.metadata.QueryMetadataInterface;
import com.metamatrix.query.unittest.FakeMetadataFactory;
@@ -76,7 +76,7 @@
}
@Override
- public IObjectSource getMetadataObjectSource(String vdbName,
+ public CompositeMetadataStore getMetadataObjectSource(String vdbName,
String vdbVersion) throws MetaMatrixComponentException {
return null;
}
Modified: trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestDataTierManager.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestDataTierManager.java 2009-10-24 18:05:58 UTC (rev 1535)
+++ trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestDataTierManager.java 2009-10-24 18:07:35 UTC (rev 1536)
@@ -29,10 +29,10 @@
import java.util.Map;
import java.util.Properties;
+import org.teiid.connector.metadata.runtime.MetadataStore;
+
import junit.framework.TestCase;
-import org.teiid.connector.metadata.runtime.ConnectorMetadata;
-
import com.metamatrix.api.exception.ComponentNotFoundException;
import com.metamatrix.api.exception.MetaMatrixComponentException;
import com.metamatrix.api.exception.MetaMatrixException;
@@ -53,6 +53,7 @@
import com.metamatrix.dqp.service.ConnectorStatus;
import com.metamatrix.dqp.service.DataService;
import com.metamatrix.dqp.service.FakeBufferService;
+import com.metamatrix.dqp.service.FakeMetadataService;
import com.metamatrix.dqp.service.FakeVDBService;
import com.metamatrix.platform.security.api.MetaMatrixSessionID;
import com.metamatrix.platform.security.api.SessionToken;
@@ -111,6 +112,7 @@
dataService,
vdbService,
bs,
+ new FakeMetadataService(),
20,
1000,
1000);
@@ -394,10 +396,11 @@
throw new MetaMatrixComponentException("Force fail on executeRequest for call # " + calls); //$NON-NLS-1$
}
}
- @Override
- public ConnectorMetadata getConnectorMetadata(String vdbName,
- String vdbVersion, String modelName, Properties importProperties) {
- throw new UnsupportedOperationException();
- }
+ @Override
+ public MetadataStore getConnectorMetadata(String vdbName,
+ String vdbVersion, String modelName, Properties importProperties)
+ throws MetaMatrixComponentException {
+ throw new UnsupportedOperationException();
+ }
}
}
15 years, 1 month
teiid SVN: r1535 - in trunk/connectors: connector-text/src/test/java/com/metamatrix/connector/text and 1 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2009-10-24 14:05:58 -0400 (Sat, 24 Oct 2009)
New Revision: 1535
Modified:
trunk/connectors/connector-jdbc/src/main/java/org/teiid/connector/jdbc/JDBCMetdataProcessor.java
trunk/connectors/connector-text/src/test/java/com/metamatrix/connector/text/TestTextConnector.java
trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestCriteriaDesc.java
Log:
TEIID-871 TEIID-792 TEIID-102 TEIID-254 TEIID-869 TEIID-875 further clean up of metadata related logic. The index connector has been removed and the system virtual views promoted to physical tables. some of the tables/procedures have been removed. and minor changes have been made to MMDatabaseMetadata queries.
Modified: trunk/connectors/connector-jdbc/src/main/java/org/teiid/connector/jdbc/JDBCMetdataProcessor.java
===================================================================
--- trunk/connectors/connector-jdbc/src/main/java/org/teiid/connector/jdbc/JDBCMetdataProcessor.java 2009-10-24 18:00:19 UTC (rev 1534)
+++ trunk/connectors/connector-jdbc/src/main/java/org/teiid/connector/jdbc/JDBCMetdataProcessor.java 2009-10-24 18:05:58 UTC (rev 1535)
@@ -40,7 +40,8 @@
import org.teiid.connector.metadata.runtime.MetadataFactory;
import org.teiid.connector.metadata.runtime.ProcedureRecordImpl;
import org.teiid.connector.metadata.runtime.TableRecordImpl;
-import org.teiid.connector.metadata.runtime.MetadataConstants.PARAMETER_TYPES;
+import org.teiid.connector.metadata.runtime.BaseColumn.NullType;
+import org.teiid.connector.metadata.runtime.ProcedureParameterRecordImpl.Type;
/**
* Reads from {@link DatabaseMetaData} and creates metadata through the {@link MetadataFactory}.
@@ -101,6 +102,7 @@
if (importProcedures) {
getProcedures(metadataFactory, metadata);
}
+
}
private void getProcedures(MetadataFactory metadataFactory,
@@ -128,36 +130,19 @@
record = column;
column.setNativeType(columns.getString(7));
} else {
- record = metadataFactory.addProcedureParameter(columnName, TypeFacility.getDataTypeNameFromSQLType(sqlType), getParameterType(columnType), procedure);
+ record = metadataFactory.addProcedureParameter(columnName, TypeFacility.getDataTypeNameFromSQLType(sqlType), Type.values()[columnType], procedure);
}
record.setPrecision(columns.getInt(8));
record.setLength(columns.getInt(9));
record.setScale(columns.getInt(10));
record.setRadix(columns.getInt(11));
- record.setNullType(columns.getShort(12));
- String remarks = columns.getString(13);
- if (remarks != null) {
- metadataFactory.addAnnotation(remarks, record);
- }
+ record.setNullType(NullType.values()[columns.getShort(12)]);
+ record.setAnnotation(columns.getString(13));
}
}
procedures.close();
}
- private static short getParameterType(short type) {
- switch (type) {
- case DatabaseMetaData.procedureColumnIn:
- return PARAMETER_TYPES.IN_PARM;
- case DatabaseMetaData.procedureColumnInOut:
- return PARAMETER_TYPES.INOUT_PARM;
- case DatabaseMetaData.procedureColumnOut:
- return PARAMETER_TYPES.OUT_PARM;
- case DatabaseMetaData.procedureColumnReturn:
- return PARAMETER_TYPES.RETURN_VALUE;
- }
- throw new AssertionError();
- }
-
private Map<String, TableInfo> getTables(MetadataFactory metadataFactory,
DatabaseMetaData metadata) throws SQLException, ConnectorException {
logger.logDetail("JDBCMetadataProcessor - Importing tables"); //$NON-NLS-1$
@@ -172,9 +157,7 @@
table.setNameInSource(fullName);
table.setSupportsUpdate(true);
String remarks = tables.getString(5);
- if (remarks != null) {
- metadataFactory.addAnnotation(remarks, table);
- }
+ table.setAnnotation(remarks);
tableMap.put(fullName, new TableInfo(tableCatalog, tableSchema, tableName, table));
}
tables.close();
@@ -204,12 +187,10 @@
ColumnRecordImpl column = metadataFactory.addColumn(columnName, TypeFacility.getDataTypeNameFromSQLType(type), tableInfo.table);
column.setNativeType(columns.getString(6));
column.setRadix(columns.getInt(10));
- column.setNullType(columns.getInt(11));
+ column.setNullType(NullType.values()[columns.getShort(11)]);
column.setUpdatable(true);
String remarks = columns.getString(12);
- if (remarks != null) {
- metadataFactory.addAnnotation(remarks, column);
- }
+ column.setAnnotation(remarks);
column.setCharOctetLength(columns.getInt(16));
if (rsColumns >= 23) {
column.setAutoIncrementable("YES".equalsIgnoreCase(columns.getString(23))); //$NON-NLS-1$
@@ -378,5 +359,9 @@
public void setImportProcedures(boolean importProcedures) {
this.importProcedures = importProcedures;
}
-
+
+ public void setImportApproximateIndexes(boolean importApproximateIndexes) {
+ this.importApproximateIndexes = importApproximateIndexes;
+ }
+
}
Modified: trunk/connectors/connector-text/src/test/java/com/metamatrix/connector/text/TestTextConnector.java
===================================================================
--- trunk/connectors/connector-text/src/test/java/com/metamatrix/connector/text/TestTextConnector.java 2009-10-24 18:00:19 UTC (rev 1534)
+++ trunk/connectors/connector-text/src/test/java/com/metamatrix/connector/text/TestTextConnector.java 2009-10-24 18:05:58 UTC (rev 1535)
@@ -25,7 +25,6 @@
import static org.junit.Assert.*;
import java.util.HashMap;
-import java.util.Iterator;
import java.util.Map;
import java.util.Properties;
@@ -71,9 +70,8 @@
datatypes.put(DataTypeManager.DefaultDataTypes.TIMESTAMP, new DatatypeRecordImpl());
MetadataFactory metadata = new MetadataFactory("SummitData", datatypes, new Properties()); //$NON-NLS-1$
connector.getConnectorMetadata(metadata);
- assertFalse(metadata.getProcedures().iterator().hasNext());
- Iterator<TableRecordImpl> tableIter = metadata.getTables().iterator();
- TableRecordImpl group = tableIter.next();
+ assertEquals(0, metadata.getMetadataStore().getProcedures().size());
+ TableRecordImpl group = metadata.getMetadataStore().getTables().get("summitdata.summitdata"); //$NON-NLS-1$
assertEquals("SUMMITDATA", group.getName()); //$NON-NLS-1$
assertEquals("SummitData.SUMMITDATA", group.getFullName()); //$NON-NLS-1$
assertEquals(14, group.getColumns().size());
Modified: trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestCriteriaDesc.java
===================================================================
--- trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestCriteriaDesc.java 2009-10-24 18:00:19 UTC (rev 1534)
+++ trunk/connectors/connector-xml/src/test/java/com/metamatrix/connector/xml/base/TestCriteriaDesc.java 2009-10-24 18:05:58 UTC (rev 1535)
@@ -58,20 +58,6 @@
vdbPath = ProxyObjectFactory.getStateCollegeVDBLocation();
}
- public TestCriteriaDesc() {
- super();
- System.setProperty("metamatrix.config.none", "true");
- }
-
- /**
- * Constructor for CriteriaDescTest.
- * @param arg0
- */
- public TestCriteriaDesc(String arg0) {
- super(arg0);
- System.setProperty("metamatrix.config.none", "true");
- }
-
public void testGetCriteriaDescForColumn() throws Exception {
//case 1: values provided
assertNotNull("vdb path is null", vdbPath);
15 years, 1 month