ModeShape/modeshape — pull request #382 by rhauch (2012-05-17 21:10:05+00:00)
Title: MODE-1468 Corrected JCR-JQOM functionality

Corrected a lot of incorrect JCR-JQOM functionality, especially in the QueryObjectModel instances' string statements, which are now completely parsable as JCR-SQL2. Thus, one can always convert QOM to JCR-SQL2 -- and since we internally parse the JCR-SQL2 as a QOM, we can actually go full circle.

That wasn't the only correction. When using the QOM, literal values can take on a different form; the same form as when using explicit "CAST(...)" functions in JCR-SQL2. But since CASTs are not often used, executing a typical JCR-SQL2 with string literals worked well but executing a QOM with correctly-typed literals didn't. Now, executing a QOM with string-form literals or properly-typed literals works the same way.

Additionally, many of the TCK QOM tests pointed out deficiencies in our QOM validation and results. Most of these were corrected, although several outstanding problems are now described by other issues (MODE-1485, MODE-1095, and JCR-3313).

All tests pass with these changes.