You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openjpa.apache.org by dw...@apache.org on 2010/02/25 23:08:45 UTC

svn commit: r916476 - in /openjpa/trunk/openjpa-persistence-jdbc/src/test: java/org/apache/openjpa/persistence/jpql/entities/ resources/org/apache/openjpa/persistence/jpql/ resources/org/apache/openjpa/persistence/jpql/expressions/

Author: dwoods
Date: Thu Feb 25 22:08:44 2010
New Revision: 916476

URL: http://svn.apache.org/viewvc?rev=916476&view=rev
Log:
OPENJPA-855 Adding additional JPQL Index tests

Added:
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/INameEntity.java   (with props)
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/IOrderedEntity.java   (with props)
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/OrderedElementEntity.java   (with props)
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/OrderedManyToManyEntity.java   (with props)
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/OrderedOneToManyEntity.java   (with props)
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/UnorderedNameEntity.java   (with props)
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/XMLOrderedElementEntity.java   (with props)
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/XMLOrderedManyToManyEntity.java   (with props)
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/XMLOrderedOneToManyEntity.java   (with props)
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/XMLUnorderedNameEntity.java   (with props)
    openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/jpql/
    openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/jpql/expressions/
    openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/jpql/expressions/orm.xml   (with props)
    openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/jpql/expressions/persistence.xml   (with props)

Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/INameEntity.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/INameEntity.java?rev=916476&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/INameEntity.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/INameEntity.java Thu Feb 25 22:08:44 2010
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.openjpa.persistence.jpql.entities;
+
+public interface INameEntity {
+
+    public int getId();
+
+    public void setId(int id);
+
+    public String getName();
+
+    public void setName(String name);
+
+    public String toString();
+}

Propchange: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/INameEntity.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/IOrderedEntity.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/IOrderedEntity.java?rev=916476&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/IOrderedEntity.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/IOrderedEntity.java Thu Feb 25 22:08:44 2010
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.openjpa.persistence.jpql.entities;
+
+import java.util.List;
+
+public interface IOrderedEntity {
+
+    public int getId();
+
+    public void setId(int id);
+
+    public List<INameEntity> getEntities();
+
+    public void setEntities(List<INameEntity> entities);
+
+    public void addEntities(INameEntity entity);
+    
+    public INameEntity removeEntities(int location);
+    
+    public void insertEntities(int location, INameEntity entity);
+
+    public String toString();
+}

Propchange: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/IOrderedEntity.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/OrderedElementEntity.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/OrderedElementEntity.java?rev=916476&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/OrderedElementEntity.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/OrderedElementEntity.java Thu Feb 25 22:08:44 2010
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.openjpa.persistence.jpql.entities;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.persistence.ElementCollection;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.OrderColumn;
+
+@Entity
+public class OrderedElementEntity implements java.io.Serializable {
+
+    @Id
+    private int id;
+
+    @ElementCollection
+    @OrderColumn
+    private List<String> listElements;  
+    
+    public int getId() {
+        return id;
+    }
+
+    public void setId(int id) {
+        this.id = id;
+    }
+
+    public List<String> getListElements() {
+        return listElements;
+    }
+
+    public void setListElements(List<String> elements) {
+        this.listElements = elements;
+    }
+
+    public void addListElements(String element) {
+        if( listElements == null) {
+            listElements = new ArrayList<String>();
+        }
+        listElements.add(element);
+    }
+    
+    public String removeListElements(int location) {
+        String rtnVal = null;
+        if( listElements != null) {
+            rtnVal = listElements.remove(location);
+        }
+        return rtnVal;
+    }
+    
+    public void insertListElements(int location, String name) {
+        if( listElements == null) {
+            listElements = new ArrayList<String>();
+        }
+        listElements.add(location, name);
+    }
+
+    public String toString() {
+        return "OrderedElementEntity[" + id + "]=" + listElements;
+    }
+}

Propchange: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/OrderedElementEntity.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/OrderedManyToManyEntity.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/OrderedManyToManyEntity.java?rev=916476&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/OrderedManyToManyEntity.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/OrderedManyToManyEntity.java Thu Feb 25 22:08:44 2010
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.openjpa.persistence.jpql.entities;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.ManyToMany;
+import javax.persistence.OrderColumn;
+
+@Entity
+public class OrderedManyToManyEntity implements IOrderedEntity, java.io.Serializable {
+
+    @Id
+    private int id;
+
+    @ManyToMany
+    @OrderColumn
+    private List<INameEntity> om2mEntities;
+
+    
+    public int getId() {
+        return id;
+    }
+
+    public void setId(int id) {
+        this.id = id;
+    }
+
+    public List<INameEntity> getEntities() {
+        return om2mEntities;
+    }
+
+    public void setEntities(List<INameEntity> entities) {
+        this.om2mEntities = entities;
+    }
+
+    public void addEntities(INameEntity entity) {
+        if( om2mEntities == null) {
+            om2mEntities = new ArrayList<INameEntity>();
+        }
+        om2mEntities.add(entity);
+    }
+    
+    public INameEntity removeEntities(int location) {
+        INameEntity rtnVal = null;
+        if( om2mEntities != null) {
+            rtnVal = om2mEntities.remove(location);
+        }
+        return rtnVal;
+    }
+    
+    public void insertEntities(int location, INameEntity entity) {
+        if( om2mEntities == null) {
+            om2mEntities = new ArrayList<INameEntity>();
+        }
+        om2mEntities.add(location, entity);
+    }
+
+    public String toString() {
+        return "OrderedManyToManyEntity[" + id + "]=" + om2mEntities;
+    }
+}

Propchange: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/OrderedManyToManyEntity.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/OrderedOneToManyEntity.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/OrderedOneToManyEntity.java?rev=916476&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/OrderedOneToManyEntity.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/OrderedOneToManyEntity.java Thu Feb 25 22:08:44 2010
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.openjpa.persistence.jpql.entities;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.OneToMany;
+import javax.persistence.OrderColumn;
+
+@Entity
+public class OrderedOneToManyEntity implements IOrderedEntity, java.io.Serializable {
+
+    @Id
+    private int id;
+
+    @OneToMany
+    @OrderColumn
+    private List<INameEntity> oo2mEntities;
+
+    
+    public int getId() {
+        return id;
+    }
+
+    public void setId(int id) {
+        this.id = id;
+    }
+
+    public List<INameEntity> getEntities() {
+        return oo2mEntities;
+    }
+
+    public void setEntities(List<INameEntity> names) {
+        this.oo2mEntities = names;
+    }
+
+    public void addEntities(INameEntity name) {
+        if( oo2mEntities == null) {
+            oo2mEntities = new ArrayList<INameEntity>();
+        }
+        oo2mEntities.add(name);
+    }
+    
+    public INameEntity removeEntities(int location) {
+        INameEntity rtnVal = null;
+        if( oo2mEntities != null) {
+            rtnVal = oo2mEntities.remove(location);
+        }
+        return rtnVal;
+    }
+    
+    public void insertEntities(int location, INameEntity name) {
+        if( oo2mEntities == null) {
+            oo2mEntities = new ArrayList<INameEntity>();
+        }
+        oo2mEntities.add(location, name);
+    }
+
+    public String toString() {
+        return "OrderedOneToManyEntity[" + id + "]=" + oo2mEntities;
+    }
+}

Propchange: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/OrderedOneToManyEntity.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/UnorderedNameEntity.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/UnorderedNameEntity.java?rev=916476&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/UnorderedNameEntity.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/UnorderedNameEntity.java Thu Feb 25 22:08:44 2010
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.openjpa.persistence.jpql.entities;
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+
+@Entity
+public class UnorderedNameEntity implements INameEntity, java.io.Serializable {
+
+    @Id
+    private int id;
+    
+    private String name;
+
+    
+    public UnorderedNameEntity() {
+    }
+
+    public UnorderedNameEntity(String name) {
+        this.id = name.charAt(0) - 'A' + 1;
+        this.name = name;
+    }
+
+    public int getId() {
+        return id;
+    }
+
+    public void setId(int id) {
+        this.id = id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String toString() {
+        return "UnorderedNameEntity[" + id + "]=" + name;
+    }
+}

Propchange: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/UnorderedNameEntity.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/XMLOrderedElementEntity.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/XMLOrderedElementEntity.java?rev=916476&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/XMLOrderedElementEntity.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/XMLOrderedElementEntity.java Thu Feb 25 22:08:44 2010
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.openjpa.persistence.jpql.entities;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class XMLOrderedElementEntity implements java.io.Serializable {
+
+    private int id;
+
+    private List<String> listElements;  
+    
+    public int getId() {
+        return id;
+    }
+
+    public void setId(int id) {
+        this.id = id;
+    }
+
+    public List<String> getListElements() {
+        return listElements;
+    }
+
+    public void setListElements(List<String> elements) {
+        this.listElements = elements;
+    }
+
+    public void addListElements(String element) {
+        if( listElements == null) {
+            listElements = new ArrayList<String>();
+        }
+        listElements.add(element);
+    }
+    
+    public String removeListElements(int location) {
+        String rtnVal = null;
+        if( listElements != null) {
+            rtnVal = listElements.remove(location);
+        }
+        return rtnVal;
+    }
+    
+    public void insertListElements(int location, String name) {
+        if( listElements == null) {
+            listElements = new ArrayList<String>();
+        }
+        listElements.add(location, name);
+    }
+
+    public String toString() {
+        return "XMLOrderedElementEntity[" + id + "]=" + listElements;
+    }
+}

Propchange: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/XMLOrderedElementEntity.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/XMLOrderedManyToManyEntity.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/XMLOrderedManyToManyEntity.java?rev=916476&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/XMLOrderedManyToManyEntity.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/XMLOrderedManyToManyEntity.java Thu Feb 25 22:08:44 2010
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.openjpa.persistence.jpql.entities;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class XMLOrderedManyToManyEntity implements IOrderedEntity, java.io.Serializable {
+
+    private int id;
+
+    private List<INameEntity> xom2mEntities;
+
+    
+    public int getId() {
+        return id;
+    }
+
+    public void setId(int id) {
+        this.id = id;
+    }
+
+    public List<INameEntity> getEntities() {
+        return xom2mEntities;
+    }
+
+    public void setEntities(List<INameEntity> entities) {
+        this.xom2mEntities = entities;
+    }
+
+    public void addEntities(INameEntity entity) {
+        if( xom2mEntities == null) {
+            xom2mEntities = new ArrayList<INameEntity>();
+        }
+        xom2mEntities.add(entity);
+    }
+    
+    public INameEntity removeEntities(int location) {
+        INameEntity rtnVal = null;
+        if( xom2mEntities != null) {
+            rtnVal = xom2mEntities.remove(location);
+        }
+        return rtnVal;
+    }
+    
+    public void insertEntities(int location, INameEntity entity) {
+        if( xom2mEntities == null) {
+            xom2mEntities = new ArrayList<INameEntity>();
+        }
+        xom2mEntities.add(location, entity);
+    }
+
+    public String toString() {
+        return "XMLOrderedManyToManyEntity[" + id + "]=" + xom2mEntities;
+    }
+}

Propchange: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/XMLOrderedManyToManyEntity.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/XMLOrderedOneToManyEntity.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/XMLOrderedOneToManyEntity.java?rev=916476&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/XMLOrderedOneToManyEntity.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/XMLOrderedOneToManyEntity.java Thu Feb 25 22:08:44 2010
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.openjpa.persistence.jpql.entities;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class XMLOrderedOneToManyEntity implements IOrderedEntity, java.io.Serializable {
+
+    private int id;
+
+    private List<INameEntity> xoo2mEntities;
+
+    
+    public int getId() {
+        return id;
+    }
+
+    public void setId(int id) {
+        this.id = id;
+    }
+
+    public List<INameEntity> getEntities() {
+        return xoo2mEntities;
+    }
+
+    public void setEntities(List<INameEntity> entities) {
+        this.xoo2mEntities = entities;
+    }
+
+    public void addEntities(INameEntity entity) {
+        if( xoo2mEntities == null) {
+            xoo2mEntities = new ArrayList<INameEntity>();
+        }
+        xoo2mEntities.add(entity);
+    }
+    
+    public INameEntity removeEntities(int location) {
+        INameEntity rtnVal = null;
+        if( xoo2mEntities != null) {
+            rtnVal = xoo2mEntities.remove(location);
+        }
+        return rtnVal;
+    }
+    
+    public void insertEntities(int location, INameEntity entity) {
+        if( xoo2mEntities == null) {
+            xoo2mEntities = new ArrayList<INameEntity>();
+        }
+        xoo2mEntities.add(location, entity);
+    }
+
+    public String toString() {
+        return "XMLOrderedOneToManyEntity[" + id + "]=" + xoo2mEntities;
+    }
+}

Propchange: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/XMLOrderedOneToManyEntity.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/XMLUnorderedNameEntity.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/XMLUnorderedNameEntity.java?rev=916476&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/XMLUnorderedNameEntity.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/XMLUnorderedNameEntity.java Thu Feb 25 22:08:44 2010
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.openjpa.persistence.jpql.entities;
+
+public class XMLUnorderedNameEntity implements INameEntity, java.io.Serializable {
+
+    private int id;
+    
+    private String name;
+
+    
+    public XMLUnorderedNameEntity() {
+    }
+
+    public XMLUnorderedNameEntity(String name) {
+        this.id = name.charAt(0) - 'A' + 1;
+        this.name = name;
+    }
+
+    public int getId() {
+        return id;
+    }
+
+    public void setId(int id) {
+        this.id = id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String toString() {
+        return "XMLUnorderedNameEntity[" + id + "]=" + name;
+    }
+}

Propchange: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/entities/XMLUnorderedNameEntity.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/jpql/expressions/orm.xml
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/jpql/expressions/orm.xml?rev=916476&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/jpql/expressions/orm.xml (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/jpql/expressions/orm.xml Thu Feb 25 22:08:44 2010
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+<entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm orm_2_0.xsd" version="2.0">
+
+    <entity class="org.apache.openjpa.persistence.jpql.entities.XMLOrderedManyToManyEntity">
+        <attributes>
+            <id name="id" />
+            <many-to-many name="xom2mEntities">
+                <order-column/>
+            </many-to-many>
+        </attributes>
+    </entity>
+
+    <entity class="org.apache.openjpa.persistence.jpql.entities.XMLOrderedOneToManyEntity">
+        <attributes>
+            <id name="id" />
+            <one-to-many name="xoo2mEntities">
+                <order-column/>
+            </one-to-many>
+        </attributes>
+    </entity>
+
+    <entity class="org.apache.openjpa.persistence.jpql.entities.XMLOrderedElementEntity">
+        <attributes>
+            <id name="id" />
+            <element-collection name="listElements">
+                <order-column />
+            </element-collection>
+        </attributes>
+    </entity>
+
+    <entity class="org.apache.openjpa.persistence.jpql.entities.XMLUnorderedNameEntity">
+        <attributes>
+            <id name="id" />
+            <basic name="name" />
+        </attributes>
+    </entity>
+
+</entity-mappings>

Propchange: openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/jpql/expressions/orm.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/jpql/expressions/persistence.xml
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/jpql/expressions/persistence.xml?rev=916476&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/jpql/expressions/persistence.xml (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/jpql/expressions/persistence.xml Thu Feb 25 22:08:44 2010
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+<persistence
+	xmlns="http://java.sun.com/xml/ns/persistence"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
+	version="2.0">
+
+    <persistence-unit name="JPQLIndex" transaction-type="RESOURCE_LOCAL">
+        <description>PU for JPQL Index testing</description>
+        <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
+        <mapping-file>org/apache/openjpa/persistence/jpql/expressions/orm.xml</mapping-file>
+
+        <class>org.apache.openjpa.persistence.jpql.entities.OrderedElementEntity</class>
+        <class>org.apache.openjpa.persistence.jpql.entities.XMLOrderedElementEntity</class>
+        <class>org.apache.openjpa.persistence.jpql.entities.OrderedManyToManyEntity</class>
+        <class>org.apache.openjpa.persistence.jpql.entities.XMLOrderedManyToManyEntity</class>
+        <class>org.apache.openjpa.persistence.jpql.entities.OrderedOneToManyEntity</class>
+        <class>org.apache.openjpa.persistence.jpql.entities.XMLOrderedOneToManyEntity</class>
+        <class>org.apache.openjpa.persistence.jpql.entities.UnorderedNameEntity</class>
+        <class>org.apache.openjpa.persistence.jpql.entities.XMLUnorderedNameEntity</class>
+        <properties>
+            <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema" />
+            <!-- property name="openjpa.Log" value="SQL=TRACE"/ -->
+            <property name="openjpa.RuntimeUnenhancedClasses" value="unsupported"/>
+        </properties>
+    </persistence-unit>
+
+</persistence>

Propchange: openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/jpql/expressions/persistence.xml
------------------------------------------------------------------------------
    svn:eol-style = native