Issue Details (XML | Word | Printable)

Key: JDO-157
Type: New Feature New Feature
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Michael Watzek
Reporter: Michael Watzek
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
JDO

Implement new JDO 2 query tests cases concerning keywords.

Created: 04/Oct/05 07:56 PM   Updated: 13/Oct/05 01:38 AM
Return to search
Component/s: tck2
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works JDO-157.patch 2005-10-06 07:12 PM Michael Watzek 28 kB
File Licensed for inclusion in ASF works JDO-157.patch2 2005-10-13 12:33 AM Michael Watzek 27 kB

Resolution Date: 13/Oct/05 01:38 AM


 Description  « Hide
We need 4 new test classes, one for each of the following assertions:

- A14.4-6: Keywords must not be used as package names, class names, parameter names, or variable names in queries.
- A14.4-7: Keywords are permitted as field names only if they are on the right side of the "." in field access expressions.
- A14.6.13-1: The String version of Query represents all query elements using a single string. The string contains the following structure.
- A14.6.13-2: Keywords, identified above in bold, are either all upper-case or all lower-case. Keywords cannot be mixed case.

Details can be found on Wiki page http://wiki.apache.org/jdo/QueryTests#Keywords.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Michael Watzek added a comment - 06/Oct/05 07:12 PM
This patch implements the assertions above. It depends on patches for JDO-156 and JDO-168, in that order. For this reason, those patches must be checked in first.

Michael Watzek made changes - 06/Oct/05 07:12 PM
Field Original Value New Value
Attachment JDO-157.patch [ 12314748 ]
Repository Revision Date User Message
ASF #314949 Wed Oct 12 15:44:50 UTC 2005 brazil JDO-157: Implement new JDO 2 query tests cases concerning keywords.
Files Changed
MODIFY /incubator/jdo/trunk/tck20/test/sql/derby/applicationidentity/schema.sql
ADD /incubator/jdo/trunk/tck20/test/orm/applicationidentity/org/apache/jdo/tck/pc/query/package-derby.orm
ADD /incubator/jdo/trunk/tck20/test/jdo/datastoreidentity/org/apache/jdo/tck/pc/query/package.jdo
ADD /incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/jdoql/keywords/SingleString.java
ADD /incubator/jdo/trunk/tck20/test/jdo/datastoreidentity/org/apache/jdo/tck/pc/query
ADD /incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/result/classes
ADD /incubator/jdo/trunk/tck20/test/orm/datastoreidentity/org/apache/jdo/tck/pc/query/package-derby.orm
ADD /incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/jdoql/keywords/InvalidUseOfKeywords.java
ADD /incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/pc/query/JDOQLKeywordsAsFieldNames.java
ADD /incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/result/classes/FullName.java
MODIFY /incubator/jdo/trunk/tck20/project.properties
ADD /incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/jdoql/keywords/KeywordsAsFieldNames.java
ADD /incubator/jdo/trunk/tck20/test/orm/applicationidentity/org/apache/jdo/tck/pc/query
ADD /incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/pc/query
MODIFY /incubator/jdo/trunk/tck20/test/sql/derby/datastoreidentity/schema.sql
ADD /incubator/jdo/trunk/tck20/test/orm/datastoreidentity/org/apache/jdo/tck/pc/query
ADD /incubator/jdo/trunk/tck20/test/jdo/applicationidentity/org/apache/jdo/tck/pc/query/package.jdo
MODIFY /incubator/jdo/trunk/tck20/test/conf/alltests.conf
ADD /incubator/jdo/trunk/tck20/test/jdo/applicationidentity/org/apache/jdo/tck/pc/query
ADD /incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/jdoql/keywords/UppercaseLowercase.java

Michael Bouschen added a comment - 12/Oct/05 10:17 PM
Just some minor comments:

Class CompanyModelReader
- The CompanyModelReader change is already checked in as part of patch 156.

Class FullName
- minor: you can shorten the implementation of equals:
     public boolean equals(Object o) {
        FullName other = (FullName) o;
        if (this.firstName == null) {
return other.firstName == null;
        }
        if (this.lastName == null) {
return other.lastName == null;
        }
     ...
- How about adding some class javadoc describing why you added two getter methods getFirstName and getFirstname etc.?

Michael Watzek added a comment - 13/Oct/05 12:33 AM
The second patch contains all the comments.

Michael Watzek made changes - 13/Oct/05 12:33 AM
Attachment JDO-157.patch2 [ 12314842 ]
Michael Bouschen added a comment - 13/Oct/05 12:40 AM
Looks good!

Michael Watzek added a comment - 13/Oct/05 01:38 AM
The second patch has been checked in.

Michael Watzek made changes - 13/Oct/05 01:38 AM
Resolution Fixed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]