You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openjpa.apache.org by pp...@apache.org on 2009/03/20 20:47:29 UTC
svn commit: r756730 [2/2] - in /openjpa/trunk:
openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/criteria/
openjpa-persistence/src/main/java/org/apache/openjpa/persistence/
openjpa-persistence/src/main/java/org/apache/openjpa/persis...
Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/MemberOfExpression.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/MemberOfExpression.java?rev=756730&r1=756729&r2=756730&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/MemberOfExpression.java (original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/MemberOfExpression.java Fri Mar 20 19:47:26 2009
@@ -18,8 +18,6 @@
*/
package org.apache.openjpa.persistence.query;
-import javax.persistence.Expression;
-
/**
* Denotes e1 MEMBER OF e2 Expression.
*
Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/MinExpression.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/MinExpression.java?rev=756730&r1=756729&r2=756730&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/MinExpression.java (original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/MinExpression.java Fri Mar 20 19:47:26 2009
@@ -18,8 +18,6 @@
*/
package org.apache.openjpa.persistence.query;
-import javax.persistence.Expression;
-
/**
* Denotes MIN(e) Expression.
*
Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/MinusExpression.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/MinusExpression.java?rev=756730&r1=756729&r2=756730&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/MinusExpression.java (original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/MinusExpression.java Fri Mar 20 19:47:26 2009
@@ -18,8 +18,6 @@
*/
package org.apache.openjpa.persistence.query;
-import javax.persistence.Expression;
-
/**
* Denotes (e1 - e2) Expression.
*
Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/NavigationPath.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/NavigationPath.java?rev=756730&r1=756729&r2=756730&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/NavigationPath.java (original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/NavigationPath.java Fri Mar 20 19:47:26 2009
@@ -18,7 +18,6 @@
*/
package org.apache.openjpa.persistence.query;
-import javax.persistence.PathExpression;
import static org.apache.openjpa.persistence.query.PathOperator.NAVIGATION;
/**
* Represents a path resulted by navigation.
Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/NewInstance.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/NewInstance.java?rev=756730&r1=756729&r2=756730&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/NewInstance.java (original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/NewInstance.java Fri Mar 20 19:47:26 2009
@@ -21,9 +21,6 @@
import java.util.Arrays;
import java.util.List;
-import javax.persistence.OrderByItem;
-import javax.persistence.SelectItem;
-
/**
* Denotes NEW fully.qualified.class.name(arg1, arg2,...)
*
Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/NotEqualExpression.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/NotEqualExpression.java?rev=756730&r1=756729&r2=756730&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/NotEqualExpression.java (original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/NotEqualExpression.java Fri Mar 20 19:47:26 2009
@@ -18,8 +18,6 @@
*/
package org.apache.openjpa.persistence.query;
-import javax.persistence.Expression;
-
/**
* Denotes (e1 != e2) Expression.
*
Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/OpenJPAQueryBuilder.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/OpenJPAQueryBuilder.java?rev=756730&r1=756729&r2=756730&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/OpenJPAQueryBuilder.java (original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/OpenJPAQueryBuilder.java Fri Mar 20 19:47:26 2009
@@ -18,18 +18,16 @@
*/
package org.apache.openjpa.persistence.query;
-import javax.persistence.Query;
-import javax.persistence.QueryBuilder;
-import javax.persistence.QueryDefinition;
+import org.apache.openjpa.kernel.Query;
/**
- * An extension of standard JPA Specification interface to add equivalence of
- * QueryDefinition and Query and JPQL String.
+ * Builds dynamic query
*
* @author Pinaki Poddar
*
*/
public interface OpenJPAQueryBuilder extends QueryBuilder {
+
/**
* Create a QueryDefinition from the given JPQL String.
*/
Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/OrPredicate.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/OrPredicate.java?rev=756730&r1=756729&r2=756730&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/OrPredicate.java (original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/OrPredicate.java Fri Mar 20 19:47:26 2009
@@ -18,7 +18,6 @@
*/
package org.apache.openjpa.persistence.query;
-import javax.persistence.Predicate;
import static org.apache.openjpa.persistence.query.ConditionalOperator.*;
/**
Added: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/OrderBy.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/OrderBy.java?rev=756730&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/OrderBy.java (added)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/OrderBy.java Fri Mar 20 19:47:26 2009
@@ -0,0 +1,35 @@
+/*
+ * 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.query;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * @version $Rev: 721048 $ $Date: 2008-11-26 18:23:43 -0600 (Wed, 26 Nov 2008) $
+ */
+@Target({ElementType.METHOD, ElementType.FIELD})
+@Retention(RetentionPolicy.RUNTIME)
+public @interface OrderBy {
+ String value() default "";
+}
+
Added: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/OrderByItem.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/OrderByItem.java?rev=756730&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/OrderByItem.java (added)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/OrderByItem.java Fri Mar 20 19:47:26 2009
@@ -0,0 +1,26 @@
+/*
+ * 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.query;
+
+/**
+ * Instances of this interface can be used as orderBy arguments.
+ */
+public interface OrderByItem {
+}
Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/OrderableItem.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/OrderableItem.java?rev=756730&r1=756729&r2=756730&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/OrderableItem.java (original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/OrderableItem.java Fri Mar 20 19:47:26 2009
@@ -18,8 +18,6 @@
*/
package org.apache.openjpa.persistence.query;
-import javax.persistence.OrderByItem;
-
/**
* Denotes an item of ORDER BY clause.
*
Added: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/PathExpression.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/PathExpression.java?rev=756730&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/PathExpression.java (added)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/PathExpression.java Fri Mar 20 19:47:26 2009
@@ -0,0 +1,117 @@
+/*
+ * 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.query;
+
+/**
+ * Interface for operations over objects reached via paths
+ */
+public interface PathExpression extends Expression {
+ /**
+ * Return a path expression corresponding to the referenced attribute. It is
+ * not permitted to invoke this method on a path expression that corresponds
+ * to a multi-valued association or element collection. The path expression
+ * on which this method is invoked must correspond to a class containing the
+ * referenced attribute.
+ *
+ * @param attributeName -
+ * name of the referenced attribute
+ * @return path expression
+ */
+ PathExpression get(String attributeName);
+
+ /**
+ * Return an expression that corresponds to the type of the entity. This
+ * method can only be invoked on a path expression corresponding to an
+ * entity. It is not permitted to invoke this method on a path expression
+ * that corresponds to a multi-valued association.
+ *
+ * @return expression denoting the entity's type
+ */
+ Expression type();
+
+ /**
+ * Return an expression that corresponds to the number of elements
+ * association or element collection corresponding to the path expression.
+ * This method can only be invoked on a path expression that corresponds to
+ * a multi-valued association or to an element collection.
+ *
+ * @return expression denoting the size
+ */
+ Expression size();
+
+ /**
+ * Add a restriction that the path expression must correspond to an
+ * association or element collection that is empty (has no elements). This
+ * method can only be invoked on a path expression that corresponds to a
+ * multi-valued association or to an element collection.
+ *
+ * @return predicate corresponding to the restriction
+ */
+ Predicate isEmpty();
+
+ /**
+ * Specify that the avg operation is to be applied. The path expression must
+ * correspond to an attribute of a numeric type. It is not permitted to
+ * invoke this method on a path expression that corresponds to a
+ * multi-valued association or element collection.
+ *
+ * @return the resulting aggregate
+ */
+ Aggregate avg();
+
+ /**
+ * Specify that the max operation is to be applied. The path expression must
+ * correspond to an attribute of an orderable type. It is not permitted to
+ * invoke this method on a path expression that corresponds to a
+ * multi-valued association or element collection.
+ *
+ * @return the resulting aggregate
+ */
+ Aggregate max();
+
+ /**
+ * Specify that the min operation is to be applied. The path expression must
+ * correspond to an attribute of an orderable type. It is not permitted to
+ * invoke this method on a path expression that corresponds to a
+ * multi-valued association or element collection.
+ *
+ * @return the resulting aggregate
+ */
+ Aggregate min();
+
+ /**
+ * Specify that the count operation is to be applied. It is not permitted to
+ * invoke this method on a path expression that corresponds to a
+ * multi-valued association or element collection.
+ *
+ * @return the resulting aggregate
+ */
+ Aggregate count();
+
+ /**
+ * Specify that the sum operation is to be applied. The path expression must
+ * correspond to an attribute of a numeric type. It is not permitted to
+ * invoke this method on a path expression that corresponds to a
+ * multi-valued association or element collection.
+ *
+ * @return the resulting aggregate
+ */
+ Aggregate sum();
+}
\ No newline at end of file
Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/PlusExpression.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/PlusExpression.java?rev=756730&r1=756729&r2=756730&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/PlusExpression.java (original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/PlusExpression.java Fri Mar 20 19:47:26 2009
@@ -18,8 +18,6 @@
*/
package org.apache.openjpa.persistence.query;
-import javax.persistence.Expression;
-
/**
* Denotes (e1 + e2) Expression.
*
Added: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/Predicate.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/Predicate.java?rev=756730&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/Predicate.java (added)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/Predicate.java Fri Mar 20 19:47:26 2009
@@ -0,0 +1,53 @@
+/*
+ * 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.query;
+
+/**
+ * Interface used to define compound predicates.
+ */
+public interface Predicate {
+ /**
+ * Creates an AND of the predicate with the argument.
+ *
+ * @param predicate -
+ * A simple or compound predicate
+ * @return the predicate that is the AND of the original simple or compound
+ * predicate and the argument.
+ */
+ Predicate and(Predicate predicate);
+
+ /**
+ * Creates an OR of the predicate with the argument.
+ *
+ * @param predicate -
+ * A simple or compound predicate
+ * @return the predicate that is the OR of the original simple or compound
+ * predicate and the argument.
+ */
+ Predicate or(Predicate predicate);
+
+ /**
+ * Creates a negation of the predicate with the argument.
+ *
+ * @return the predicate that is the negation of the original simple or
+ * compound predicate.
+ */
+ Predicate not();
+}
\ No newline at end of file
Added: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/PredicateOperand.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/PredicateOperand.java?rev=756730&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/PredicateOperand.java (added)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/PredicateOperand.java Fri Mar 20 19:47:26 2009
@@ -0,0 +1,588 @@
+/*
+ * 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.query;
+
+import java.util.Calendar;
+import java.util.Date;
+
+/**
+ * Interface for constructing where-clause and having-clause conditions.
+ * Instances of PredicateOperand are used in constructing predicates passed to
+ * the where or having methods.
+ */
+public interface PredicateOperand {
+ /**
+ * Create a predicate for testing equality with the specified argument.
+ *
+ * @param arg -
+ * PredicateOperand instance or parameter
+ * @return conditional predicate
+ */
+ Predicate equal(PredicateOperand arg);
+
+ /**
+ * Create a predicate for testing equality with the specified argument.
+ *
+ * @param cls -
+ * entity class
+ * @return conditional predicate
+ */
+ Predicate equal(Class cls);
+
+ /**
+ * Create a predicate for testing equality with the specified argument.
+ *
+ * @param arg -
+ * numeric
+ * @return conditional predicate
+ */
+ Predicate equal(Number arg);
+
+ /**
+ * Create a predicate for testing equality with the specified argument.
+ *
+ * @param arg -
+ * string value
+ * @return conditional predicate
+ */
+ Predicate equal(String arg);
+
+ /**
+ * Create a predicate for testing equality with the specified argument.
+ *
+ * @param arg -
+ * boolean value
+ * @return conditional predicate
+ */
+ Predicate equal(boolean arg);
+
+ /**
+ * Create a predicate for testing equality with the specified argument.
+ *
+ * @param arg -
+ * date
+ * @return conditional predicate
+ */
+ Predicate equal(Date arg);
+
+ /**
+ * Create a predicate for testing equality with the specified argument.
+ *
+ * @param arg -
+ * calendar
+ * @return conditional predicate
+ */
+ Predicate equal(Calendar arg);
+
+ /**
+ * Create a predicate for testing equality with the specified argument.
+ *
+ * @param e -
+ * enum
+ * @return conditional predicate
+ */
+ Predicate equal(Enum<?> e);
+
+ /**
+ * Create a predicate for testing inequality with the specified argument.
+ *
+ * @param arg -
+ * PredicateOperand instance or parameter
+ * @return conditional predicate
+ */
+ Predicate notEqual(PredicateOperand arg);
+
+ /**
+ * Create a predicate for testing inequality with the specified argument.
+ *
+ * @param cls -
+ * entity class
+ * @return conditional predicate
+ */
+ Predicate notEqual(Class cls);
+
+ /**
+ * Create a predicate for testing inequality with the specified argument.
+ *
+ * @param arg -
+ * numberic value
+ * @return conditional predicate
+ */
+ Predicate notEqual(Number arg);
+
+ /**
+ * Create a predicate for testing inequality with the specified argument.
+ *
+ * @param arg -
+ * string value
+ * @return conditional predicate
+ */
+ Predicate notEqual(String arg);
+
+ /**
+ * Create a predicate for testing inequality with the specified argument.
+ *
+ * @param arg -
+ * boolean value
+ * @return conditional predicate
+ */
+ Predicate notEqual(boolean arg);
+
+ /**
+ * Create a predicate for testing inequality with the specified argument.
+ *
+ * @param arg -
+ * date
+ * @return conditional predicate
+ */
+ Predicate notEqual(Date arg);
+
+ /**
+ * Create a predicate for testing inequality with the specified argument.
+ *
+ * @param arg -
+ * calendar
+ * @return conditional predicate
+ */
+ Predicate notEqual(Calendar arg);
+
+ /**
+ * Create a predicate for testing inequality with the specified argument.
+ *
+ * @param e -
+ * enum
+ * @return conditional predicate
+ */
+ Predicate notEqual(Enum<?> e);
+
+ /**
+ * Create a predicate for testing whether the PredicateOperand is greater
+ * than the argument.
+ *
+ * @param arg -
+ * PredicateOperand instance or parameter
+ * @return conditional predicate
+ */
+ Predicate greaterThan(PredicateOperand arg);
+
+ /**
+ * Create a predicate for testing whether the PredicateOperand is greater
+ * than the argument.
+ *
+ * @param arg -
+ * numeric
+ * @return conditional predicate
+ */
+ Predicate greaterThan(Number arg);
+
+ /**
+ * Create a predicate for testing whether the PredicateOperand is greater
+ * than the argument.
+ *
+ * @param arg -
+ * string
+ * @return conditional predicate
+ */
+ Predicate greaterThan(String arg);
+
+ /**
+ * Create a predicate for testing whether the PredicateOperand is greater
+ * than the argument.
+ *
+ * @param arg -
+ * date
+ * @return conditional predicate
+ */
+ Predicate greaterThan(Date arg);
+
+ /**
+ * Create a predicate for testing whether the PredicateOperand is greater
+ * than the argument.
+ *
+ * @param arg -
+ * calendar
+ * @return conditional predicate
+ */
+ Predicate greaterThan(Calendar arg);
+
+ /**
+ * Create a predicate for testing whether the PredicateOperand is greater
+ * than or equal to the argument.
+ *
+ * @param arg -
+ * PredicateOperand instance or parameter
+ * @return conditional predicate
+ */
+ Predicate greaterEqual(PredicateOperand arg);
+
+ /**
+ * Create a predicate for testing whether the PredicateOperand is greater
+ * than or equal to the argument.
+ *
+ * @param arg -
+ * numeric
+ * @return conditional predicate
+ */
+ Predicate greaterEqual(Number arg);
+
+ /**
+ * Create a predicate for testing whether the PredicateOperand is greater
+ * than or equal to the argument.
+ *
+ * @param arg -
+ * string
+ * @return conditional predicate
+ */
+ Predicate greaterEqual(String arg);
+
+ /**
+ * Create a predicate for testing whether the PredicateOperand is greater
+ * than or equal to the argument.
+ *
+ * @param arg -
+ * date
+ * @return conditional predicate
+ */
+ Predicate greaterEqual(Date arg);
+
+ /**
+ * Create a predicate for testing whether the PredicateOperand is greater
+ * than or equal to the argument.
+ *
+ * @param arg -
+ * calendar
+ * @return conditional predicate
+ */
+ Predicate greaterEqual(Calendar arg);
+
+ /**
+ * Create a predicate for testing whether the PredicateOperand is less than
+ * the argument.
+ *
+ * @param arg -
+ * PredicateOperand instance or parameter
+ * @return conditional predicate
+ */
+ Predicate lessThan(PredicateOperand arg);
+
+ /**
+ * Create a predicate for testing whether the PredicateOperand is less than
+ * the argument.
+ *
+ * @param arg -
+ * numeric
+ * @return conditional predicate
+ */
+ Predicate lessThan(Number arg);
+
+ /**
+ * Create a predicate for testing whether the PredicateOperand is less than
+ * the argument.
+ *
+ * @param arg -
+ * string
+ * @return conditional predicate
+ */
+ Predicate lessThan(String arg);
+
+ /**
+ * Create a predicate for testing whether the PredicateOperand is less than
+ * the argument.
+ *
+ * @param arg -
+ * date
+ * @return conditional predicate
+ */
+ Predicate lessThan(Date arg);
+
+ /**
+ * Create a predicate for testing whether the PredicateOperand is less than
+ * the argument.
+ *
+ * @param arg -
+ * calendar
+ * @return conditional predicate
+ */
+ Predicate lessThan(Calendar arg);
+
+ /**
+ * Create a predicate for testing whether the PredicateOperand is less than
+ * or equal to the argument.
+ *
+ * @param arg -
+ * PredicateOperand instance or parameter
+ * @return conditional predicate
+ */
+ Predicate lessEqual(PredicateOperand arg);
+
+ /**
+ * Create a predicate for testing whether the PredicateOperand is less than
+ * or equal to the argument.
+ *
+ * @param arg -
+ * numeric
+ * @return conditional predicate
+ */
+ Predicate lessEqual(Number arg);
+
+ /**
+ * Create a predicate for testing whether the PredicateOperand is less than
+ * or equal to the argument.
+ *
+ * @param arg -
+ * string
+ * @return conditional predicate
+ */
+ Predicate lessEqual(String arg);
+
+ /**
+ * Create a predicate for testing whether the PredicateOperand is less than
+ * or equal to the argument.
+ *
+ * @param arg -
+ * date
+ * @return conditional predicate
+ */
+ Predicate lessEqual(Date arg);
+
+ /**
+ * Create a predicate for testing whether the PredicateOperand is less than
+ * or equal to the argument.
+ *
+ * @param arg -
+ * calendar
+ * @return conditional predicate
+ */
+ Predicate lessEqual(Calendar arg);
+
+ /**
+ * Create a predicate for testing whether the PredicateOperand lies between
+ * (inclusive) the two arguments.
+ *
+ * @param arg1 -
+ * PredicateOperand instance or parameter
+ * @param arg2 -
+ * PredicateOperand instance or parameter
+ * @return conditional predicate
+ */
+ Predicate between(PredicateOperand arg1, PredicateOperand arg2);
+
+ /**
+ * Create a predicate for testing whether the PredicateOperand lies between
+ * (inclusive) the two arguments.
+ *
+ * @param arg1 -
+ * PredicateOperand instance or parameter
+ * @param arg2 -
+ * numeric
+ * @return conditional predicate
+ */
+ Predicate between(PredicateOperand arg1, Number arg2);
+
+ /**
+ * Create a predicate for testing whether the PredicateOperand lies between
+ * (inclusive) the two arguments.
+ *
+ * @param arg1 -
+ * numeric
+ * @param arg2 -
+ * PredicateOperand instance or parameter
+ * @return conditional predicate
+ */
+ Predicate between(Number arg1, PredicateOperand arg2);
+
+ /**
+ * Create a predicate for testing whether the PredicateOperand lies between
+ * (inclusive) the two arguments.
+ *
+ * @param arg1 -
+ * numeric
+ * @param arg2 -
+ * numeric
+ * @return conditional predicate
+ */
+ Predicate between(Number arg1, Number arg2);
+
+ /**
+ * Create a predicate for testing whether the PredicateOperand lies between
+ * (inclusive) the two arguments.
+ *
+ * @param arg1 -
+ * PredicateOperand instance or parameter
+ * @param arg2 -
+ * string
+ * @return conditional predicate
+ */
+ Predicate between(PredicateOperand arg1, String arg2);
+
+ /**
+ * Create a predicate for testing whether the PredicateOperand lies between
+ * (inclusive) the two arguments.
+ *
+ * @param arg1 -
+ * string
+ * @param arg2 -
+ * PredicateOperand instance or parameter
+ * @return conditional predicate
+ */
+ Predicate between(String arg1, PredicateOperand arg2);
+
+ /**
+ * Create a predicate for testing whether the PredicateOperand lies between
+ * (inclusive) the two arguments.
+ *
+ * @param arg1 -
+ * string
+ * @param arg2 -
+ * string
+ * @return conditional predicate
+ */
+ Predicate between(String arg1, String arg2);
+
+ /**
+ * Create a predicate for testing whether the PredicateOperand lies between
+ * (inclusive) the two arguments.
+ *
+ * @param arg1 -
+ * PredicateOperand instance or parameter
+ * @param arg2 -
+ * date
+ * @return conditional predicate
+ */
+ Predicate between(PredicateOperand arg1, Date arg2);
+
+ /**
+ * Create a predicate for testing whether the PredicateOperand lies between
+ * (inclusive) the two arguments.
+ *
+ * @param arg1 -
+ * date
+ * @param arg2 -
+ * PredicateOperand instance or parameter
+ * @return conditional predicate
+ */
+ Predicate between(Date arg1, PredicateOperand arg2);
+
+ /**
+ * Create a predicate for testing whether the PredicateOperand lies between
+ * (inclusive) the two arguments.
+ *
+ * @param arg1 -
+ * date
+ * @param arg2 -
+ * date
+ * @return conditional predicate
+ */
+ Predicate between(Date arg1, Date arg2);
+
+ /**
+ * Create a predicate for testing whether the PredicateOperand lies between
+ * (inclusive) the two arguments.
+ *
+ * @param arg1 -
+ * PredicateOperand instance or parameter
+ * @param arg2 -
+ * calendar
+ * @return conditional predicate
+ */
+ Predicate between(PredicateOperand arg1, Calendar arg2);
+
+ /**
+ * Create a predicate for testing whether the PredicateOperand lies between
+ * (inclusive) the two arguments.
+ *
+ * @param arg1 -
+ * calendar
+ * @param arg2 -
+ * PredicateOperand instance or parameter
+ * @return conditional predicate
+ */
+ Predicate between(Calendar arg1, PredicateOperand arg2);
+
+ /**
+ * Create a predicate for testing whether the PredicateOperand lies between
+ * (inclusive) the two arguments.
+ *
+ * @param arg1 -
+ * calendar
+ * @param arg2 -
+ * calendar
+ * @return conditional predicate
+ */
+ Predicate between(Calendar arg1, Calendar arg2);
+
+ /**
+ * Create a predicate for testing whether the PredicateOperand satisfies the
+ * given pattern.
+ *
+ * @param pattern
+ * @return conditional predicate
+ */
+ Predicate like(PredicateOperand pattern);
+
+ /**
+ * Create a predicate for testing whether the PredicateOperand satisfies the
+ * given pattern.
+ *
+ * @param pattern
+ * @param escapeChar
+ * @return conditional predicate
+ */
+ Predicate like(PredicateOperand pattern, PredicateOperand escapeChar);
+
+ /**
+ * Create a predicate for testing whether the PredicateOperand satisfies the
+ * given pattern.
+ *
+ * @param pattern
+ * @param escapeChar
+ * @return conditional predicate
+ */
+ Predicate like(PredicateOperand pattern, char escapeChar);
+
+ /**
+ * Create a predicate for testing whether the PredicateOperand satisfies the
+ * given pattern.
+ *
+ * @param pattern
+ * @return conditional predicate
+ */
+ Predicate like(String pattern);
+
+ /**
+ * Create a predicate for testing whether the PredicateOperand satisfies the
+ * given pattern.
+ *
+ * @param pattern
+ * @param escapeChar
+ * @return conditional predicate
+ */
+ Predicate like(String pattern, PredicateOperand escapeChar);
+
+ /**
+ * Create a predicate for testing whether the PredicateOperand satisfies the
+ * given pattern.
+ *
+ * @param pattern
+ * @param escapeChar
+ * @return conditional predicate
+ */
+ Predicate like(String pattern, char escapeChar);
+}
Added: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/QueryBuilder.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/QueryBuilder.java?rev=756730&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/QueryBuilder.java (added)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/QueryBuilder.java Fri Mar 20 19:47:26 2009
@@ -0,0 +1,57 @@
+/*
+ * 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.query;
+
+/**
+ * Factory interface for query definition objects
+ */
+public interface QueryBuilder {
+ /**
+ * Create an uninitialized query definition object.
+ *
+ * @return query definition instance
+ */
+ QueryDefinition createQueryDefinition();
+
+ /**
+ * Create a query definition object with the given root. The root must be an
+ * entity class.
+ *
+ * @param cls -
+ * an entity class
+ * @return root domain object
+ */
+ DomainObject createQueryDefinition(Class root);
+
+ /**
+ * Create a query definition object whose root is derived from a domain
+ * object of the containing query. Provides support for correlated
+ * subqueries. Joins against the resulting domain object do not affect the
+ * query domain of the containing query. The path expression must correspond
+ * to an entity class. The path expression must not be a domain object of
+ * the containing query.
+ *
+ * @param path -
+ * path expression corresponding to the domain object used to
+ * derive the subquery root.
+ * @return the subquery DomainObject
+ */
+ DomainObject createSubqueryDefinition(PathExpression path);
+}
Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/QueryBuilderImpl.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/QueryBuilderImpl.java?rev=756730&r1=756729&r2=756730&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/QueryBuilderImpl.java (original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/QueryBuilderImpl.java Fri Mar 20 19:47:26 2009
@@ -18,11 +18,7 @@
*/
package org.apache.openjpa.persistence.query;
-import javax.persistence.DomainObject;
-import javax.persistence.PathExpression;
-import javax.persistence.Query;
-import javax.persistence.QueryDefinition;
-
+import org.apache.openjpa.kernel.Query;
import org.apache.openjpa.meta.MetaDataRepository;
import org.apache.openjpa.persistence.OpenJPAEntityManagerFactorySPI;
Added: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/QueryDefinition.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/QueryDefinition.java?rev=756730&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/QueryDefinition.java (added)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/QueryDefinition.java Fri Mar 20 19:47:26 2009
@@ -0,0 +1,556 @@
+/*
+ * 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.query;
+
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * Interface for construction of query definitions
+ */
+public interface QueryDefinition extends Subquery {
+ /**
+ * Add a query root corresponding to the given entity, forming a cartesian
+ * product with any existing roots. The domain object that is returned is
+ * bound as a component of the given query. The argument must be an entity
+ * class.
+ *
+ * @param cls -
+ * an entity class
+ * @return DomainObject corresponding to the specified entity class.
+ */
+ DomainObject addRoot(Class cls);
+
+ /**
+ * Add a root derived from a domain object of the containing query
+ * definition to a query definition used as a subquery. Provides support for
+ * correlated subqueries. Joins against the resulting domain object do not
+ * affect the query domain of the containing query. The path expression must
+ * correspond to an entity class. The path expression must not be a domain
+ * object of the containing query.
+ *
+ * @param path -
+ * path expression corresponding to the domain object used to
+ * derive the subquery root.
+ * @return the subquery DomainObject
+ */
+ DomainObject addSubqueryRoot(PathExpression path);
+
+ /**
+ * Specify the objects / values to be returned. Replaces the previous select
+ * list, if any. If no select items are specified and there is only one
+ * query root, the root entity is assumed to be the result.
+ *
+ * @param selectItems -
+ * one or more SelectItem instances
+ * @return the modified query definition instance
+ */
+ QueryDefinition select(SelectItem... selectItems);
+
+ /**
+ * Specify the objects / values to be returned. Replaces the previous select
+ * list, if any. If no select items are specified and there is only one
+ * query root, the root entity is assumed to be the result.
+ *
+ * @param selectItemList -
+ * a list containing one or more SelectItem instances
+ * @return the modified query definition instance
+ */
+ QueryDefinition select(List<SelectItem> selectItemList);
+
+ /**
+ * Specify the objects / values to be returned. Duplicate results will be
+ * eliminated. Replaces the previous select list, if any. If no select items
+ * are specified and there is only one query root, the root entity is
+ * assumed to be the result.
+ *
+ * @param selectItems -
+ * one or more SelectItem instances
+ * @return the modified query definition instance
+ */
+ QueryDefinition selectDistinct(SelectItem... selectItems);
+
+ /**
+ * Specify the objects / values to be returned. Duplicate results will be
+ * eliminated. Replaces the previous select list, if any. If no select items
+ * are specified, and there is only one query root, the root entity is
+ * assumed to be the result. is assumed to be the result.
+ *
+ * @param selectItemList -
+ * a list containing one or more SelectItem instances
+ * @return the modified query definition instance
+ */
+ QueryDefinition selectDistinct(List<SelectItem> selectItemList);
+
+ /**
+ * Modifies the query definition to restrict the result of the query
+ * according to the specified predicate. Replaces the previously added
+ * restriction(s), if any.
+ *
+ * @param predicate -
+ * a simple or compound conditional predicate
+ * @return the modified QueryDefinition instance
+ */
+ QueryDefinition where(Predicate predicate);
+
+ /**
+ * Specify the items of the select list that are used in ordering the query
+ * results. Replaces the previous order-by list, if any.
+ *
+ * @param orderByItems -
+ * one or more OrderByItem instances
+ * @return the modified QueryDefinition instance
+ */
+ QueryDefinition orderBy(OrderByItem... orderByItems);
+
+ /**
+ * Specify the items of the select list that are used in ordering the query
+ * results. Replaces the previous order-by list, if any.
+ *
+ * @param orderByItemList -
+ * a list containing one or more OrderByItem instances
+ * @return the modified QueryDefinition instance
+ */
+ QueryDefinition orderBy(List<OrderByItem> orderByItemList);
+
+ /**
+ * Specify the items that are used to form groups over the query results.
+ * Replaces the previous group-by list, if any.
+ *
+ * @param pathExprs
+ * @return the modified QueryDefinition instance
+ */
+ QueryDefinition groupBy(PathExpression... pathExprs);
+
+ /**
+ * Specify the items that are used to form groups over the query results.
+ * Replaces the previous group-by list, if any.
+ *
+ * @param pathExprList
+ * @return the modified QueryDefinition instance
+ */
+ QueryDefinition groupBy(List<PathExpression> pathExprList);
+
+ /**
+ * Specify the restrictions over the groups of a query. Replaces the
+ * previous having restriction(s), if any.
+ *
+ * @param predicate
+ * @return the modified QueryDefinition Instance
+ */
+ QueryDefinition having(Predicate predicate);
+
+ /**
+ * Specify that a constructor for the given class is to be applied to the
+ * corresponding query results after the query is executed. The class must
+ * have a constructor that accepts the Java argument types corresponding to
+ * the given select items.
+ *
+ * @param cls -
+ * a class with the correponding constructor
+ * @param args -
+ * select items that correspond to result types that are valid as
+ * arguments to the constructor
+ * @result SelectItem instance representing the constructor
+ */
+ SelectItem newInstance(Class cls, SelectItem... args);
+
+ /**
+ * Use the query definition instance as a subquery in an exists predicate.
+ *
+ * @return the resulting predicate
+ */
+ Predicate exists();
+
+ /**
+ * Use the query definition object in a subquery in an all expression.
+ *
+ * @return the resulting Subquery
+ */
+ Subquery all();
+
+ /**
+ * Use the query definition object in a subquery in an any expression.
+ *
+ * @return the resulting Subquery
+ */
+ Subquery any();
+
+ /**
+ * Use the query definition object in a subquery in a some expression.
+ *
+ * @return the resulting Subquery
+ */
+ Subquery some();
+
+ /**
+ * Create an empty general case expression. A general case expression is of
+ * the form:
+ * <p/>
+ * generalCase() .when(conditional-predicate).then(scalar-expression)
+ * .when(conditional-predicate).then(scalar-expression) ...
+ * .elseCase(scalar-expression)
+ *
+ * @return empty general case expression
+ */
+ CaseExpression generalCase();
+
+ /**
+ * Create a simple case expression with the given case operand. A simple
+ * case expression is of the form:
+ * <p/>
+ * simpleCase(case-operand) .when(scalar-expression).then(scalar-expression)
+ * .when(scalar-expression).then(scalar-expression) ...
+ * .elseCase(scalar-expression)
+ *
+ * @param caseOperand -
+ * expression used for testing against the when scalar
+ * expressions
+ * @return case expression with the given case operand
+ */
+ CaseExpression simpleCase(Expression caseOperand);
+
+ /**
+ * Create a simple case expression with the given case operand. A simple
+ * case expression is of the form:
+ * <p/>
+ * simpleCase(case-operand) .when(scalar-expression).then(scalar-expression)
+ * .when(scalar-expression).then(scalar-expression) ...
+ * .elseCase(scalar-expression)
+ *
+ * @param caseOperand -
+ * numeric value used for testing against the when scalar
+ * expressions
+ * @return case expression with the given case operand
+ */
+ CaseExpression simpleCase(Number caseOperand);
+
+ /**
+ * Create a simple case expression with the given case operand. A simple
+ * case expression is of the form:
+ * <p/>
+ * simpleCase(case-operand) .when(scalar-expression).then(scalar-expression)
+ * .when(scalar-expression).then(scalar-expression) ...
+ * .elseCase(scalar-expression)
+ *
+ * @param caseOperand -
+ * value used for testing against the when scalar expressions
+ * @return case expression with the given case operand
+ */
+ CaseExpression simpleCase(String caseOperand);
+
+ /**
+ * Create a simple case expression with the given case operand. A simple
+ * case expression is of the form:
+ * <p/>
+ * simpleCase(case-operand) .when(scalar-expression).then(scalar-expression)
+ * .when(scalar-expression).then(scalar-expression) ...
+ * .elseCase(scalar-expression)
+ *
+ * @param caseOperand -
+ * value used for testing against the when scalar expressions
+ * @return case expression with the given case operand
+ */
+ CaseExpression simpleCase(Date caseOperand);
+
+ /**
+ * Create a simple case expression with the given case operand. A simple
+ * case expression is of the form:
+ * <p/>
+ * simpleCase(case-operand) .when(scalar-expression).then(scalar-expression)
+ * .when(scalar-expression).then(scalar-expression) ...
+ * .elseCase(scalar-expression)
+ *
+ * @param caseOperand -
+ * value used for testing against the when scalar expressions
+ * @return case expression with the given case operand
+ */
+ CaseExpression simpleCase(Calendar caseOperand);
+
+ /**
+ * Create a simple case expression with the given case operand. A simple
+ * case expression is of the form:
+ * <p/>
+ * simpleCase(case-operand) .when(scalar-expression).then(scalar-expression)
+ * .when(scalar-expression).then(scalar-expression) ...
+ * .elseCase(scalar-expression)
+ *
+ * @param caseOperand -
+ * value used for testing against the when scalar expressions
+ * @return case expression with the given case operand
+ */
+ CaseExpression simpleCase(Class caseOperand);
+
+ /**
+ * Create a simple case expression with the given case operand. A simple
+ * case expression is of the form:
+ * <p/>
+ * simpleCase(case-operand) .when(scalar-expression).then(scalar-expression)
+ * .when(scalar-expression).then(scalar-expression) ...
+ * .elseCase(scalar-expression)
+ *
+ * @param caseOperand -
+ * value used for testing against the when scalar expressions
+ * @return case expression with the given case operand
+ */
+ CaseExpression simpleCase(Enum<?> caseOperand);
+
+ /**
+ * coalesce This is equivalent to a case expression that returns null if all
+ * its arguments evaluate to null, and the value of its first non-null
+ * argument otherwise.
+ *
+ * @param exp -
+ * expressions to be used for testing against null
+ * @return Expression corresponding to the given coalesce expression
+ */
+ Expression coalesce(Expression... exp);
+
+ /**
+ * coalesce This is equivalent to a case expression that returns null if all
+ * its arguments evaluate to null, and the value of its first non-null
+ * argument otherwise.
+ *
+ * @param exp -
+ * expressions to be used for testing against null
+ * @return Expression corresponding to the given coalesce expression
+ */
+ Expression coalesce(String... exp);
+
+ /**
+ * coalesce This is equivalent to a case expression that returns null if all
+ * its arguments evaluate to null, and the value of its first non-null
+ * argument otherwise.
+ *
+ * @param exp -
+ * expressions to be used for testing against null
+ * @return Expression corresponding to the given coalesce expression
+ */
+ Expression coalesce(Date... exp);
+
+ /**
+ * coalesce This is equivalent to a case expression that returns null if all
+ * its arguments evaluate to null, and the value of its first non-null
+ * argument otherwise.
+ *
+ * @param exp -
+ * expressions to be used for testing against null
+ * @return Expression corresponding to the given coalesce expression
+ */
+ Expression coalesce(Calendar... exp);
+
+ /**
+ * nullif This is equivalent to a case expression that tests whether its
+ * arguments are equal, returning null if they are and the value of the
+ * first expression if they are not.
+ *
+ * @param exp1
+ * @param exp2
+ * @return Expression corresponding to the given nullif expression
+ */
+ Expression nullif(Expression exp1, Expression exp2);
+
+ /**
+ * nullif This is equivalent to a case expression that tests whether its
+ * arguments are equal, returning null if they are and the value of the
+ * first expression if they are not.
+ *
+ * @param arg1
+ * @param arg2
+ * @return Expression corresponding to the given nullif expression
+ */
+ Expression nullif(Number arg1, Number arg2);
+
+ /**
+ * nullif This is equivalent to a case expression that tests whether its
+ * arguments are equal, returning null if they are and the value of the
+ * first expression if they are not.
+ *
+ * @param arg1
+ * @param arg2 Criteria API Java Persistence 2.0, Public Review Draft
+ * Criteria API Interfaces 10/31/08 158 JSR-317 Public Review
+ * Draft Sun Microsystems, Inc.
+ * @return Expression corresponding to the given nullif expression
+ */
+ Expression nullif(String arg1, String arg2);
+
+ /**
+ * nullif This is equivalent to a case expression that tests whether its
+ * arguments are equal, returning null if they are and the value of the
+ * first expression if they are not.
+ *
+ * @param arg1
+ * @param arg2
+ * @return Expression corresponding to the given nullif expression
+ */
+ Expression nullif(Date arg1, Date arg2);
+
+ /**
+ * nullif This is equivalent to a case expression that tests whether its
+ * arguments are equal, returning null if they are and the value of the
+ * first expression if they are not.
+ *
+ * @param arg1
+ * @param arg2
+ * @return Expression corresponding to the given nullif expression
+ */
+ Expression nullif(Calendar arg1, Calendar arg2);
+
+ /**
+ * nullif This is equivalent to a case expression that tests whether its
+ * arguments are equal, returning null if they are and the value of the
+ * first expression if they are not.
+ *
+ * @param arg1
+ * @param arg2
+ * @return Expression corresponding to the given nullif expression
+ */
+ Expression nullif(Class arg1, Class arg2);
+
+ /**
+ * nullif This is equivalent to a case expression that tests whether its
+ * arguments are equal, returning null if they are and the value of the
+ * first expression if they are not.
+ *
+ * @param arg1
+ * @param arg2
+ * @return Expression corresponding to the given nullif expression
+ */
+ Expression nullif(Enum<?> arg1, Enum<?> arg2);
+
+ /**
+ * Create a predicate value from the given boolean.
+ *
+ * @param b boolean value
+ * @return a true or false predicate
+ */
+ Predicate predicate(boolean b);
+
+ /**
+ * Create an Expression corresponding to the current time on the database
+ * server at the time of query execution.
+ *
+ * @return the corresponding Expression
+ */
+ Expression currentTime();
+
+ /**
+ * Create an Expression corresponding to the current date on the database
+ * server at the time of query execution.
+ *
+ * @return the corresponding Expression
+ */
+ Expression currentDate();
+
+ /**
+ * Create an Expression corresponding to the current timestamp on the
+ * database server at the time of query execution.
+ *
+ * @return the corresponding Expression
+ */
+ Expression currentTimestamp();
+
+ /**
+ * Create an Expression corresponding to a String value.
+ *
+ * @param s -
+ * string value
+ * @return the corresponding Expression literal
+ */
+ Expression literal(String s);
+
+ /**
+ * Create an Expression corresponding to a numeric value.
+ *
+ * @param n -
+ * numeric value
+ * @return the corresponding Expression literal
+ */
+ Expression literal(Number n);
+
+ /**
+ * Create an Expression corresponding to a boolean value.
+ *
+ * @param b -
+ * boolean value
+ * @return the corresponding Expression literal
+ */
+ Expression literal(boolean b);
+
+ /**
+ * Create an Expression corresponding to a Calendar value.
+ *
+ * @param c -
+ * Calendar value
+ * @return the corresponding Expression literal
+ */
+ Expression literal(Calendar c);
+
+ /**
+ * Create an Expression corresponding to a Date value.
+ *
+ * @param d -
+ * Date value
+ * @return the corresponding Expression literal
+ */
+ Expression literal(Date d);
+
+ /**
+ * Create an Expression corresponding to a character value.
+ *
+ * @param character value
+ * @return the corresponding Expression literal
+ */
+ Expression literal(char c);
+
+ /**
+ * Create an Expression corresponding to an entity class.
+ *
+ * @param cls -
+ * entity class
+ * @return the corresponding Expression literal
+ */
+ Expression literal(Class cls);
+
+ /**
+ * Create an Expression corresponding to an enum.
+ *
+ * @param e -
+ * enum
+ * @return the corresponding Expression literal
+ */
+ Expression literal(Enum<?> e);
+
+ /**
+ * Create an Expression corresponding to a null value.
+ *
+ * @return the corresponding Expression literal
+ */
+ Expression nullLiteral();
+
+ /**
+ * Specify use of a parameter of the given name.
+ *
+ * @param parameter name
+ * @return an Expression corresponding to a named parameter
+ */
+ Expression param(String name);
+}
\ No newline at end of file
Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/QueryDefinitionImpl.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/QueryDefinitionImpl.java?rev=756730&r1=756729&r2=756730&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/QueryDefinitionImpl.java (original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/QueryDefinitionImpl.java Fri Mar 20 19:47:26 2009
@@ -29,16 +29,6 @@
import java.util.LinkedList;
import java.util.List;
-import javax.persistence.CaseExpression;
-import javax.persistence.DomainObject;
-import javax.persistence.Expression;
-import javax.persistence.OrderByItem;
-import javax.persistence.PathExpression;
-import javax.persistence.Predicate;
-import javax.persistence.QueryDefinition;
-import javax.persistence.SelectItem;
-import javax.persistence.Subquery;
-
import org.apache.openjpa.lib.util.Localizer;
/**
Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/QueryExpression.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/QueryExpression.java?rev=756730&r1=756729&r2=756730&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/QueryExpression.java (original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/QueryExpression.java Fri Mar 20 19:47:26 2009
@@ -18,8 +18,6 @@
*/
package org.apache.openjpa.persistence.query;
-import javax.persistence.Subquery;
-
/**
* An expression resulting from operation on a query itself. Can be used as a
* subquery clause in a parent query.
Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/RangeExpression.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/RangeExpression.java?rev=756730&r1=756729&r2=756730&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/RangeExpression.java (original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/RangeExpression.java Fri Mar 20 19:47:26 2009
@@ -18,8 +18,6 @@
*/
package org.apache.openjpa.persistence.query;
-import javax.persistence.Expression;
-
/**
* Denotes a range used by e1 BETWEEN x AND y operation.
*
Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/RootPath.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/RootPath.java?rev=756730&r1=756729&r2=756730&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/RootPath.java (original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/RootPath.java Fri Mar 20 19:47:26 2009
@@ -1,7 +1,5 @@
package org.apache.openjpa.persistence.query;
-import javax.persistence.DomainObject;
-
/**
* Denotes root domain instance representing a persistent type.
*
Added: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/SelectItem.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/SelectItem.java?rev=756730&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/SelectItem.java (added)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/SelectItem.java Fri Mar 20 19:47:26 2009
@@ -0,0 +1,45 @@
+/*
+ * 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.query;
+
+/**
+ * SelectItem instances are used in specifying the query's select list.
+ * <p/>
+ * The methods of this interface are used to define arguments that can be passed
+ * to the orderBy method for use in ordering selected items of the query result.
+ */
+public interface SelectItem extends OrderByItem {
+ /**
+ * Return an OrderByItem referencing the SelectItem and specifying ascending
+ * ordering. The SelectItem must correspond to an orderable value.
+ *
+ * @return order-by item
+ */
+ OrderByItem asc();
+
+ /**
+ * Return an OrderByItem referencing the SelectItem and specifying
+ * descending ordering. The SelectItem must correspond to an orderable
+ * value.
+ *
+ * @return order-by item
+ */
+ OrderByItem desc();
+}
Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/SizeExpression.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/SizeExpression.java?rev=756730&r1=756729&r2=756730&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/SizeExpression.java (original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/SizeExpression.java Fri Mar 20 19:47:26 2009
@@ -18,8 +18,6 @@
*/
package org.apache.openjpa.persistence.query;
-import javax.persistence.Expression;
-
/**
* Denotes SIZE(e) Expression.
*
Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/SomeExpression.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/SomeExpression.java?rev=756730&r1=756729&r2=756730&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/SomeExpression.java (original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/SomeExpression.java Fri Mar 20 19:47:26 2009
@@ -18,8 +18,6 @@
*/
package org.apache.openjpa.persistence.query;
-import javax.persistence.Subquery;
-
/**
* Denotes SOME(Subquery) Expression.
*
Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/SquareRootExpression.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/SquareRootExpression.java?rev=756730&r1=756729&r2=756730&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/SquareRootExpression.java (original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/SquareRootExpression.java Fri Mar 20 19:47:26 2009
@@ -18,8 +18,6 @@
*/
package org.apache.openjpa.persistence.query;
-import javax.persistence.Expression;
-
/**
* Denotes SQRT(e) Expression.
*
Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/SubStringExpression.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/SubStringExpression.java?rev=756730&r1=756729&r2=756730&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/SubStringExpression.java (original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/SubStringExpression.java Fri Mar 20 19:47:26 2009
@@ -18,8 +18,6 @@
*/
package org.apache.openjpa.persistence.query;
-import javax.persistence.Expression;
-
/**
* Denotes SUBSTR(a,i1,i2) Expression.
*
Added: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/Subquery.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/Subquery.java?rev=756730&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/Subquery.java (added)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/Subquery.java Fri Mar 20 19:47:26 2009
@@ -0,0 +1,26 @@
+/*
+ * 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.query;
+
+/**
+ * Instances of this interface can be used as subqueries.
+ */
+public interface Subquery extends PredicateOperand {
+}
Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/SumExpression.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/SumExpression.java?rev=756730&r1=756729&r2=756730&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/SumExpression.java (original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/SumExpression.java Fri Mar 20 19:47:26 2009
@@ -18,8 +18,6 @@
*/
package org.apache.openjpa.persistence.query;
-import javax.persistence.Expression;
-
/**
* Denotes SUM(e) Expression.
*
Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/TimesExpression.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/TimesExpression.java?rev=756730&r1=756729&r2=756730&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/TimesExpression.java (original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/TimesExpression.java Fri Mar 20 19:47:26 2009
@@ -18,8 +18,6 @@
*/
package org.apache.openjpa.persistence.query;
-import javax.persistence.Expression;
-
/**
* Denotes (e1*e2) Expression.
*
Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/TrimExpression.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/TrimExpression.java?rev=756730&r1=756729&r2=756730&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/TrimExpression.java (original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/TrimExpression.java Fri Mar 20 19:47:26 2009
@@ -18,9 +18,6 @@
*/
package org.apache.openjpa.persistence.query;
-import javax.persistence.Expression;
-import javax.persistence.TrimSpec;
-
/**
* Denotes TRIM(e1,x) Expression.
*
Added: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/TrimSpec.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/TrimSpec.java?rev=756730&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/TrimSpec.java (added)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/TrimSpec.java Fri Mar 20 19:47:26 2009
@@ -0,0 +1,27 @@
+/*
+ * 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.query;
+
+/**
+ * Used to specify the trimming of strings
+ */
+public enum TrimSpec {
+ LEADING, TRAILING, BOTH
+}
Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/TypeExpression.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/TypeExpression.java?rev=756730&r1=756729&r2=756730&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/TypeExpression.java (original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/TypeExpression.java Fri Mar 20 19:47:26 2009
@@ -18,8 +18,6 @@
*/
package org.apache.openjpa.persistence.query;
-import javax.persistence.Expression;
-
/**
* Denotes TYPE(e) Expression.
*
Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/UnaryExpressionPredicate.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/UnaryExpressionPredicate.java?rev=756730&r1=756729&r2=756730&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/UnaryExpressionPredicate.java (original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/UnaryExpressionPredicate.java Fri Mar 20 19:47:26 2009
@@ -18,9 +18,6 @@
*/
package org.apache.openjpa.persistence.query;
-import javax.persistence.Expression;
-import javax.persistence.Predicate;
-
/**
* Unary Predicate results from an operator on an Expression.
*
Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/UnaryMinusExpression.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/UnaryMinusExpression.java?rev=756730&r1=756729&r2=756730&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/UnaryMinusExpression.java (original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/UnaryMinusExpression.java Fri Mar 20 19:47:26 2009
@@ -18,8 +18,6 @@
*/
package org.apache.openjpa.persistence.query;
-import javax.persistence.Expression;
-
/**
* Denotes (-e) Expression.
*
Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/UnaryOperatorExpression.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/UnaryOperatorExpression.java?rev=756730&r1=756729&r2=756730&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/UnaryOperatorExpression.java (original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/UnaryOperatorExpression.java Fri Mar 20 19:47:26 2009
@@ -18,9 +18,6 @@
*/
package org.apache.openjpa.persistence.query;
-import javax.persistence.Aggregate;
-import javax.persistence.Expression;
-
class UnaryOperatorExpression extends ExpressionImpl implements Aggregate {
protected final Expression _e;
protected final UnaryFunctionalOperator _op;
Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/UpperExpression.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/UpperExpression.java?rev=756730&r1=756729&r2=756730&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/UpperExpression.java (original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/UpperExpression.java Fri Mar 20 19:47:26 2009
@@ -18,8 +18,6 @@
*/
package org.apache.openjpa.persistence.query;
-import javax.persistence.Expression;
-
/**
* Denotes UPPER(e) Expression.
*
Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/VarArgsExpression.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/VarArgsExpression.java?rev=756730&r1=756729&r2=756730&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/VarArgsExpression.java (original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/VarArgsExpression.java Fri Mar 20 19:47:26 2009
@@ -18,10 +18,6 @@
*/
package org.apache.openjpa.persistence.query;
-import java.util.Arrays;
-
-import javax.persistence.Expression;
-
/**
* A expression that holds an array of Expressions. Used as operand for
* CONCAT(e1,e2,e3,...), for example. Different than {@link ArrayExpression}