[teiid-commits] teiid SVN: r2741 - in branches/7.1.x/connectors/translator-jdbc/src: test/java/org/teiid/translator/jdbc/modeshape and 1 other directory.

teiid-commits at lists.jboss.org teiid-commits at lists.jboss.org
Wed Nov 24 11:50:42 EST 2010


Author: vhalbert at redhat.com
Date: 2010-11-24 11:50:41 -0500 (Wed, 24 Nov 2010)
New Revision: 2741

Modified:
   branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/IdentifierFunctionModifier.java
   branches/7.1.x/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/modeshape/TestModeShapeSqlTranslator.java
Log:
TEIID-1369  changed the translator to look for jcr:path, instead of mode:path

Modified: branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/IdentifierFunctionModifier.java
===================================================================
--- branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/IdentifierFunctionModifier.java	2010-11-24 16:06:08 UTC (rev 2740)
+++ branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/modeshape/IdentifierFunctionModifier.java	2010-11-24 16:50:41 UTC (rev 2741)
@@ -62,7 +62,7 @@
     				if ("\"mode:properties\"".equalsIgnoreCase(c.getNameInSource())) { //$NON-NLS-1$
     					dotAll = true;
     					useSelector = true;
-    				} else if ("\"mode:path\"".equalsIgnoreCase(c.getNameInSource())) { //$NON-NLS-1$
+    				} else if ("\"jcr:path\"".equalsIgnoreCase(c.getNameInSource())) { //$NON-NLS-1$
     					useSelector = true;
     				}
     			}

Modified: branches/7.1.x/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/modeshape/TestModeShapeSqlTranslator.java
===================================================================
--- branches/7.1.x/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/modeshape/TestModeShapeSqlTranslator.java	2010-11-24 16:06:08 UTC (rev 2740)
+++ branches/7.1.x/connectors/translator-jdbc/src/test/java/org/teiid/translator/jdbc/modeshape/TestModeShapeSqlTranslator.java	2010-11-24 16:50:41 UTC (rev 2741)
@@ -61,13 +61,13 @@
     	Schema modeshape = RealMetadataFactory.createPhysicalModel("modeshape", store);
     	Table nt_base = RealMetadataFactory.createPhysicalGroup("nt_base", modeshape);
     	nt_base.setNameInSource("\"nt:base\"");
-		List<Column> cols = RealMetadataFactory.createElements(nt_base, new String[] { "mode_path",
+		List<Column> cols = RealMetadataFactory.createElements(nt_base, new String[] { "jcr_path",
 				"mode_properties", "jcr_primaryType", "prop" }, new String[] {
 				TypeFacility.RUNTIME_NAMES.STRING,
 				TypeFacility.RUNTIME_NAMES.STRING,
 				TypeFacility.RUNTIME_NAMES.STRING,
 				TypeFacility.RUNTIME_NAMES.STRING });
-		cols.get(0).setNameInSource("\"mode:path\"");
+		cols.get(0).setNameInSource("\"jcr:path\"");
 		cols.get(1).setNameInSource("\"mode:properties\"");
 		cols.get(2).setNameInSource("\"jcr:primaryType\"");
     	return RealMetadataFactory.createTransformationMetadata(store, "modeshape");
@@ -81,7 +81,7 @@
 	@Test
 	public void testSelectAllFromBase() throws Exception {
 		String input = "select * from nt_base"; //$NON-NLS-1$
-		String output = "SELECT g_0.\"mode:path\", g_0.\"mode:properties\", g_0.\"jcr:primaryType\", g_0.prop FROM \"nt:base\" AS g_0"; //$NON-NLS-1$
+		String output = "SELECT g_0.\"jcr:path\", g_0.\"mode:properties\", g_0.\"jcr:primaryType\", g_0.prop FROM \"nt:base\" AS g_0"; //$NON-NLS-1$
 
 		helpTestVisitor(input, output);
 
@@ -90,7 +90,7 @@
 	@Test
 	public void testPredicate() throws Exception {
 
-		String input = "SELECT x.jcr_primaryType from nt_base inner join nt_base as x on jcr_issamenode(nt_base.mode_path, x.mode_path) = true where jcr_isdescendantnode(nt_base.mode_path, 'x/y/z') = true and jcr_reference(nt_base.mode_properties) = 'x'"; //$NON-NLS-1$
+		String input = "SELECT x.jcr_primaryType from nt_base inner join nt_base as x on jcr_issamenode(nt_base.jcr_path, x.jcr_path) = true where jcr_isdescendantnode(nt_base.jcr_path, 'x/y/z') = true and jcr_reference(nt_base.mode_properties) = 'x'"; //$NON-NLS-1$
 		String output = "SELECT g_1.\"jcr:primaryType\" FROM \"nt:base\" AS g_0 INNER JOIN \"nt:base\" AS g_1 ON issamenode(g_0, g_1) WHERE isdescendantnode(g_0, 'x/y/z') AND reference(g_0.*) = 'x'"; //$NON-NLS-1$
 
 		helpTestVisitor(input, output);



More information about the teiid-commits mailing list