You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by dj...@apache.org on 2008/11/17 22:07:06 UTC

svn commit: r718380 [1/2] - /geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/

Author: djencks
Date: Mon Nov 17 13:07:05 2008
New Revision: 718380

URL: http://svn.apache.org/viewvc?rev=718380&view=rev
Log:
GERONIMO-4410 first additions for jpa 2.0 spec, thanks to Pinaki Poddar

Added:
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/Aggregate.java   (with props)
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/CaseExpression.java   (with props)
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/DomainObject.java   (with props)
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/Expression.java   (with props)
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/FetchJoinObject.java   (with props)
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/OrderByItem.java   (with props)
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/PathExpression.java   (with props)
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/Predicate.java   (with props)
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/PredicateOperand.java   (with props)
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/QueryBuilder.java   (with props)
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/QueryDefinition.java   (with props)
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/SelectItem.java   (with props)
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/Subquery.java   (with props)
    geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/TrimSpec.java   (with props)

Added: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/Aggregate.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/Aggregate.java?rev=718380&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/Aggregate.java (added)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/Aggregate.java Mon Nov 17 13:07:05 2008
@@ -0,0 +1,36 @@
+/*
+ * 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.
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+package javax.persistence;
+
+/**
+ * Type of the result of an aggregate operation
+ */
+public interface Aggregate extends Expression {
+	/**
+	 * Specify that duplicates are to be removed before the aggregate operation
+	 * is invoked.
+	 */
+	Expression distinct();
+}

Propchange: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/Aggregate.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/Aggregate.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/Aggregate.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/CaseExpression.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/CaseExpression.java?rev=718380&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/CaseExpression.java (added)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/CaseExpression.java Mon Nov 17 13:07:05 2008
@@ -0,0 +1,305 @@
+/*
+ * 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.
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+package javax.persistence;
+
+import java.util.Date;
+import java.util.Calendar;
+
+/**
+ * Interface for the construction of case expressions
+ */
+public interface CaseExpression {
+	/**
+	 * Add a when predicate clause to a general case expression. The when
+	 * predicate must be followed by the corresponding then case expression that
+	 * specifies the result of the specific case. Clauses are evaluated in the
+	 * order added.
+	 * 
+	 * @param pred -
+	 *            corresponds to the evaluation condition for the specific case
+	 * @return CaseExpression corresponding to the case with the added when
+	 *         clause
+	 */
+	CaseExpression when(Predicate pred);
+
+	/**
+	 * Add a when clause to a simple case expression. The when case expression
+	 * must be followed by the corresponding then case expression that specifies
+	 * the result of the specific case. Clauses are evaluated in the order added
+	 * 
+	 * @param when -
+	 *            corresponds to the value against which the case operand of the
+	 *            simple case is tested
+	 * @return CaseExpression corresponding to the case with the added clause
+	 */
+	CaseExpression when(Expression when);
+
+	/**
+	 * Add a when clause to a simple case expression. The when case expression
+	 * must be followed by the corresponding then case expression that specifies
+	 * the result of the specific case. Clauses are evaluated in the order added
+	 * 
+	 * @param when -
+	 *            corresponds to the value against which the case operand of the
+	 *            simple case is tested
+	 * @return CaseExpression corresponding to the case with the added clause
+	 */
+	CaseExpression when(Number when);
+
+	/**
+	 * Add a when clause to a simple case expression. The when case expression
+	 * must be followed by the corresponding then case expression that specifies
+	 * the result of the specific case. Clauses are evaluated in the order added
+	 * 
+	 * @param when -
+	 *            corresponds to the value against which the
+	 *            case operand of the simple case is tested
+	 * @return CaseExpression corresponding to the case with the added clause
+	 */
+	CaseExpression when(String when);
+
+	/**
+	 * Add a when clause to a simple case expression. The when case expression
+	 * must be followed by the corresponding then case expression that specifies
+	 * the result of the specific case. Clauses are evaluated in the order added
+	 * 
+	 * @param when -
+	 *            corresponds to the value against which the case operand of the
+	 *            simple case is tested
+	 * @return CaseExpression corresponding to the case with the added clause
+	 */
+	CaseExpression when(Date when);
+
+	/**
+	 * Add a when clause to a simple case expression. The when case expression
+	 * must be followed by the corresponding then case expression that specifies
+	 * the result of the specific case. Clauses are evaluated in the order added
+	 * 
+	 * @param when -
+	 *            corresponds to the value against which the case operand of the
+	 *            simple case is tested
+	 * @return CaseExpression corresponding to the case with the added clause
+	 */
+	CaseExpression when(Calendar when);
+
+	/**
+	 * Add a when clause to a simple case expression. The when case expression
+	 * must be followed by the corresponding then case expression that specifies
+	 * the result of the specific case. Clauses are evaluated in the order added
+	 * 
+	 * @param when -
+	 *            corresponds to the value against which the case operand of the
+	 *            simple case is tested
+	 * @return CaseExpression corresponding to the case with the added clause
+	 */
+	CaseExpression when(Class when);
+
+	/**
+	 * Add a when clause to a simple case expression. The when case expression
+	 * must be followed by the corresponding then case expression that specifies
+	 * the result of the specific case. Clauses are evaluated in the order added
+	 * 
+	 * @param when -
+	 *            corresponds to the value against which the case operand of the
+	 *            simple case is tested
+	 * @return CaseExpression corresponding to the case with the added clause
+	 */
+	CaseExpression when(Enum<?> when);
+
+	/**
+	 * Add a then clause to a general or simple case expression. The then clause
+	 * specifies the result corresponding to the immediately preceding when.
+	 * Clauses are evaluated in the order added.
+	 * 
+	 * @param then -
+	 *            corresponds to the result of the case expression if the when
+	 *            is satisfied
+	 * @return CaseExpression corresponding to the case with the added then
+	 *         clause
+	 */
+	CaseExpression then(Expression then);
+
+	/**
+	 * Add a then clause to a general or simple case expression. The then clause
+	 * specifies the result corresponding to the immediately preceding when.
+	 * Clauses are evaluated in the order added.
+	 * 
+	 * @param then -
+	 *            corresponds to the result of the case expression if the when
+	 *            is satisfied
+	 * @return CaseExpression corresponding to the case with the added then
+	 *         clause
+	 */
+	CaseExpression then(Number then);
+
+	/**
+	 * Add a then clause to a general or simple case expression. The then clause
+	 * specifies the result corresponding to the immediately preceding when.
+	 * Clauses are evaluated in the order added.
+	 * 
+	 * @param then -
+	 *            corresponds to the result of the case expression if the when
+	 *            is satisfied
+	 * @return CaseExpression corresponding to the case with the added then
+	 *         clause
+	 */
+	CaseExpression then(String then);
+
+	/**
+	 * Add a then clause to a general or simple case expression. The then clause
+	 * specifies the result corresponding to the immediately preceding when.
+	 * Clauses are evaluated in the order added.
+	 * 
+	 * @param then -
+	 *            corresponds to the result of the case expression if the when
+	 *            is satisfied
+	 * @return CaseExpression corresponding to the case with the added then
+	 *         clause
+	 */
+	CaseExpression then(Date then);
+
+	/**
+	 * Add a then clause to a general or simple case expression. The then clause
+	 * specifies the result corresponding to the immediately preceding when.
+	 * Clauses are evaluated in the order added.
+	 * 
+	 * @param then -
+	 *            corresponds to the result of the case expression if the when
+	 *            is satisfied
+	 * @return CaseExpression corresponding to the case with the added then
+	 *         clause
+	 */
+	CaseExpression then(Calendar then);
+
+	/**
+	 * Add a then clause to a general or simple case expression. The then clause
+	 * specifies the result corresponding to the immediately preceding when.
+	 * Clauses are evaluated in the order added.
+	 * 
+	 * @param then -
+	 *            corresponds to the result of the case expression if the when
+	 *            is satisfied
+	 * @return CaseExpression corresponding to the case with the added then
+	 *         clause
+	 */
+	CaseExpression then(Class then);
+
+	/**
+	 * Add a then clause to a general or simple case expression. The then clause
+	 * specifies the result corresponding to the immediately preceding when.
+	 * Clauses are evaluated in the order added.
+	 * 
+	 * @param then -
+	 *            corresponds to the result of the case expression if the when
+	 *            is satisfied
+	 * @return CaseExpression corresponding to the case with the added then
+	 *         clause
+	 */
+	CaseExpression then(Enum<?> then);
+
+	/**
+	 * Add else to a case expression. A case expression must have an else
+	 * clause.
+	 * 
+	 * @param arg -
+	 *            corresponds to the result of the case expression if the when
+	 *            condition is not satisfied
+	 * @return Expression corresponding to the case expression with the added
+	 *         clause
+	 */
+	Expression elseCase(Expression arg);
+
+	/**
+	 * Add else to a case expression. A case expression must have an else
+	 * clause.
+	 * 
+	 * @param arg -
+	 *            corresponds to the result of the case expression if the when
+	 *            condition is not satisfied
+	 * @return Expression corresponding to the case expression with the added
+	 *         clause
+	 */
+	Expression elseCase(String arg);
+
+	/**
+	 * Add else to a case expression. A case expression must have an else
+	 * clause.
+	 * 
+	 * @param arg -
+	 *            corresponds to the result of the case expression if the when
+	 *            condition is not satisfied
+	 * @return Expression corresponding to the case expression with the added
+	 *         clause
+	 */
+	Expression elseCase(Number arg);
+
+	/**
+	 * Add else to a case expression. A case expression must have an else
+	 * clause.
+	 * 
+	 * @param arg -
+	 *            corresponds to the result of the case expression if the when
+	 *            condition is not satisfied
+	 * @return Expression corresponding to the case expression with the added
+	 *         clause
+	 */
+	Expression elseCase(Date arg);
+
+	/**
+	 * Add else to a case expression. A case expression must have an else
+	 * clause.
+	 * 
+	 * @param arg -
+	 *            corresponds to the result of the case expression if the when
+	 *            condition is not satisfied
+	 * @return Expression corresponding to the case expression with the added
+	 *         clause
+	 */
+	Expression elseCase(Calendar arg);
+
+	/**
+	 * Add else to a case expression. A case expression must have an else
+	 * clause.
+	 * 
+	 * @param arg -
+	 *            corresponds to the result of the case expression if the when
+	 *            condition is not satisfied
+	 * @return Expression corresponding to the case expression with the added
+	 *         clause
+	 */
+	Expression elseCase(Class arg);
+
+	/**
+	 * Add else to a case expression. A case expression must have an else
+	 * clause.
+	 * 
+	 * @param arg -
+	 *            corresponds to the result of the case expression if the when
+	 *            condition is not satisfied
+	 * @return Expression corresponding to the case expression with the added
+	 *         clause
+	 */
+	Expression elseCase(Enum<?> arg);
+}

Propchange: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/CaseExpression.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/CaseExpression.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/CaseExpression.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/DomainObject.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/DomainObject.java?rev=718380&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/DomainObject.java (added)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/DomainObject.java Mon Nov 17 13:07:05 2008
@@ -0,0 +1,129 @@
+/*
+ * 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.
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+package javax.persistence;
+
+/**
+ * Domain objects define the domain over which a query operates. A domain object
+ * plays a role analogous to that of a Java Persistence query language
+ * identification variable.
+ */
+public interface DomainObject extends PathExpression, QueryDefinition {
+	/**
+	 * Extend the query domain by joining with a class that can be navigated to
+	 * or that is embedded in the class corresponding to the domain object on
+	 * which the method is invoked. This method is permitted to be invoked only
+	 * when defining the domain of the query. It must not be invoked within the
+	 * context of the select, where, groupBy, or having operations. The domain
+	 * object must correspond to a class that contains the referenced attribute.
+	 * The query definition is modified to include the newly joined domain
+	 * object.
+	 * 
+	 * @param attribute -
+	 *            name of the attribute that references the target of the join
+	 * @return the new DomainObject that is added for the target of the join
+	 */
+	DomainObject join(String attribute);
+
+	/**
+	 * Extend the query domain by left outer joining with a class that can be
+	 * navigated to or that is embedded in the class corresponding to the domain
+	 * object on which the method is invoked. This method is permitted to be
+	 * invoked only when defining the domain of the query. It must not be
+	 * invoked within the context of the select, where, groupBy, or having
+	 * operations. The domain object must correspond to a class that contains
+	 * the referenced attribute. The query definition is modified to include the
+	 * newly joined domain object.
+	 * 
+	 * @param attribute -
+	 *            name of the attribute that references the target of the join
+	 * @return the new DomainObject that is added for the target of the join
+	 */
+	DomainObject leftJoin(String attribute);
+
+	/**
+	 * Specify that the association or element collection that is referenced by
+	 * the attribute be eagerly fetched through use of an inner join. The domain
+	 * object must correspond to a class that contains the referenced attribute.
+	 * The query is modified to include the joined domain object.
+	 * 
+	 * @param attribute -
+	 *            name of the attribute that references the target of the join
+	 * @return the FetchJoinObject that is added for the target of the join
+	 */
+	FetchJoinObject joinFetch(String attribute);
+
+	/**
+	 * Specify that the association or element collection that is referenced by
+	 * the attribute be eagerly fetched through use of a left outer join. The
+	 * domain object must correspond to a class that contains the referenced
+	 * attribute. The query is modified to include the joined domain object.
+	 * 
+	 * @param attribute -
+	 *            name of the attribute that references the target of the join
+	 * @return the FetchJoinObject that is added for the target of the join
+	 */
+	FetchJoinObject leftJoinFetch(String attribute);
+
+	/**
+	 * Return a path expression corresponding to the value of a map-valued
+	 * association or element collection. This method is only permitted to be
+	 * invoked upon a domain object that corresponds to a map-valued association
+	 * or element collection.
+	 * 
+	 * @return PathExpression corresponding to the map value
+	 */
+	PathExpression value();
+
+	/**
+	 * Return a path expression corresponding to the key of a map-valued
+	 * association or element collection. This method is only permitted to be
+	 * invoked upon a domain object that corresponds to a map-valued association
+	 * or element collection.
+	 * 
+	 * @return PathExpression corresponding to the map key
+	 */
+	PathExpression key();
+
+	/**
+	 * Return a select item corresponding to the map entry of a map-valued
+	 * association or element collection. This method is only permitted to be
+	 * invoked upon a domain object that corresponds to a map-valued association
+	 * or element collection.
+	 * 
+	 * @return SelectItem corresponding to the map entry
+	 */
+	SelectItem entry();
+
+	/**
+	 * Return an expression that corresponds to the index. of the domain object
+	 * in the referenced association or element collection. This method is only
+	 * permitted to be invoked upon a domain object that corresponds to a
+	 * multi-valued association or element collection for which an order column
+	 * has been defined.
+	 * 
+	 * @return Expression denoting the index
+	 */
+	Expression index();
+}

Propchange: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/DomainObject.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/DomainObject.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/DomainObject.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/Expression.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/Expression.java?rev=718380&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/Expression.java (added)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/Expression.java Mon Nov 17 13:07:05 2008
@@ -0,0 +1,530 @@
+/*
+ * 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.
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+package javax.persistence;
+
+/**
+ * Instances of this interface can be used either as select list items or as
+ * predicate operands.
+ */
+public interface Expression extends SelectItem, PredicateOperand {
+	/*
+	 * Conditional predicates over expression items
+	 */
+	/**
+	 * Create a predicate for testing whether the expression is a member of the
+	 * association or element collection denoted by the path expression. The
+	 * argument must correspond to a collection-valued association or element
+	 * collection of like type.
+	 * 
+	 * @param arg -
+	 *            a path expression that specifies a collection-valued
+	 *            association or an element collection
+	 * @return conditional predicate
+	 */
+	Predicate member(PathExpression arg);
+
+	/**
+	 * Create a predicate for testing whether the value of the expression is
+	 * null.
+	 * 
+	 * @return conditional predicate
+	 */
+	Predicate isNull();
+
+	/**
+	 * Create a predicate for testing whether the expression value is a member
+	 * of the argument list.
+	 * 
+	 * @param strings
+	 * @return conditional predicate
+	 */
+	Predicate in(String... strings);
+
+	/**
+	 * Create a predicate for testing whether the expression value is a member
+	 * of the argument list.
+	 * 
+	 * @param nums
+	 * @return conditional predicate
+	 */
+	Predicate in(Number... nums);
+
+	/**
+	 * Create a predicate for testing whether the expression value is a member
+	 * of the argument list.
+	 * 
+	 * @param enums
+	 * @return conditional predicate
+	 */
+	Predicate in(Enum<?>... enums);
+
+	/**
+	 * Create a predicate for testing whether the expression value is a member
+	 * of the argument list.
+	 * 
+	 * @param classes
+	 * @return conditional predicate
+	 */
+	Predicate in(Class... classes);
+
+	/**
+	 * Create a predicate for testing whether the expression value is a member
+	 * of the argument list.
+	 * 
+	 * @param params
+	 * @return conditional predicate
+	 */
+	Predicate in(Expression... params);
+
+	/**
+	 * Create a predicate for testing whether the expression value is a member
+	 * of a subquery result.
+	 * 
+	 * @param subquery
+	 * @return conditional predicate
+	 */
+	Predicate in(Subquery subquery);
+
+	/*
+	 * Operations on strings
+	 */
+	/**
+	 * String length This method must be invoked on an expression corresponding
+	 * to a string.
+	 * 
+	 * @return expression denoting the length of the string.
+	 */
+	Expression length();
+
+	/**
+	 * Concatenate a string with other string(s). This method must be invoked on
+	 * an expression corresponding to a string.
+	 * 
+	 * @param str -
+	 *            string(s)
+	 * @return expression denoting the concatenation of the strings, starting
+	 *         with the string corresponding to the expression on which the
+	 *         method was invoked.
+	 */
+	Expression concat(String... str);
+
+	/**
+	 * Concatenate a string with other string(s). This method must be invoked on
+	 * an expression corresponding to a string.
+	 * 
+	 * @param str -
+	 *            expression(s) corresponding to string(s)
+	 * @return expression denoting the concatenation of the strings, starting
+	 *         with the string corresponding to the expression on which the
+	 *         method was invoked.
+	 */
+	Expression concat(Expression... str);
+
+	/**
+	 * Extract a substring starting at specified position through to the end of
+	 * the string. This method must be invoked on an expression corresponding to
+	 * a string.
+	 * 
+	 * @param start -
+	 *            start position (1 indicates first position)
+	 * @return expression denoting the extracted substring
+	 */
+	Expression substring(int start);
+
+	/**
+	 * Extract a substring starting at specified position through to the end of
+	 * the string. This method must be invoked on an expression corresponding to
+	 * a string.
+	 * 
+	 * @param start -
+	 *            expression denoting start position (1 indicates first
+	 *            position)
+	 * @return expression denoting the extracted substring
+	 */
+	Expression substring(Expression start);
+
+	/**
+	 * Extract a substring. This method must be invoked on an expression
+	 * corresponding to a string.
+	 * 
+	 * @param start -
+	 *            start position (1 indicates first position)
+	 * @param len -
+	 *            length of the substring to be returned
+	 * @return expression denoting the extracted substring
+	 */
+	Expression substring(int start, int len);
+
+	/**
+	 * Extract a substring. This method must be invoked on an expression
+	 * corresponding to a string.
+	 * 
+	 * @param start -
+	 *            start position (1 indicates first position)
+	 * @param len -
+	 *            expression denoting length of the substring to return
+	 * @return expression denoting the extracted substring
+	 */
+	Expression substring(int start, Expression len);
+
+	/**
+	 * Extract a substring. This method must be invoked on an expression
+	 * corresponding to a string.
+	 * 
+	 * @param start -
+	 *            expression denoting start position (1 indicates first
+	 *            position)
+	 * @param len -
+	 *            length of the substring to return
+	 * @return expression denoting the extracted substring
+	 */
+	Expression substring(Expression start, int len);
+
+	/**
+	 * Extract a substring. This method must be invoked on an expression
+	 * corresponding to a string.
+	 * 
+	 * @param start -
+	 *            expression denoting start position (1 indicates first
+	 *            position)
+	 * @param len -
+	 *            expression denoting length of the substring to return
+	 * @return expression denoting the extracted substring
+	 */
+	Expression substring(Expression start, Expression len);
+
+	/**
+	 * Convert string to lowercase. This method must be invoked on an expression
+	 * corresponding to a string.
+	 * 
+	 * @return expression denoting the string in lowercase
+	 */
+	Expression lower();
+
+	/**
+	 * Convert string to uppercase. This method must be invoked on an expression
+	 * corresponding to a string.
+	 * 
+	 * @return expression denoting the string in uppercase
+	 */
+	Expression upper();
+
+	/**
+	 * Trim leading and trailing blanks. This method must be invoked on an
+	 * expression corresponding to a string.
+	 * 
+	 * @return expression denoting trimmed string
+	 */
+	Expression trim();
+
+	/**
+	 * Trim leading, trailing blanks (or both) as specified by trim spec. This
+	 * method must be invoked on an expression corresponding to a string.
+	 * 
+	 * @param spec -
+	 *            trim specification
+	 * @return expression denoting trimmed string
+	 */
+	Expression trim(TrimSpec spec);
+
+	/**
+	 * Trim leading and trailing occurrences of character from the string. This
+	 * method must be invoked on an expression corresponding to a string.
+	 * 
+	 * @param c -
+	 *            character to be trimmed
+	 * @return expression denoting trimmed string
+	 */
+	Expression trim(char c);
+
+	/**
+	 * Trim occurrences of the character from leading or trailing (or both)
+	 * positions of the string, as specified by trim spec. This method must be
+	 * invoked on an expression corresponding to a string.
+	 * 
+	 * @param c -
+	 *            character to be trimmed
+	 * @param spec -
+	 *            trim specification
+	 * @return expression denoting trimmed string
+	 */
+	Expression trim(char c, TrimSpec spec);
+
+	/**
+	 * Trim leading and trailing occurrences of character specified by the
+	 * expression argument from the string. This method must be invoked on an
+	 * expression corresponding to a string.
+	 * 
+	 * @param expr -
+	 *            expression corresponding to the character to be trimmed
+	 * @return expression denoting trimmed string
+	 */
+	Expression trim(Expression expr);
+
+	/**
+	 * Trim occurrences of the character specified by the expression argument
+	 * from leading or trailing (or both) positions of the string, as specified
+	 * by trim spec. This method must be invoked on an expression corresponding
+	 * to a string.
+	 * 
+	 * @param expr -
+	 *            expression corresponding to the character to be trimmed
+	 * @param spec -
+	 *            trim specification
+	 * @return expression denoting trimmed string
+	 */
+	Expression trim(Expression expr, TrimSpec spec);
+
+	/**
+	 * Locate a string contained within the string corresponding to the
+	 * expression on which the method was invoked. The search is started at
+	 * position 1 (first string position). This method must be invoked on an
+	 * expression corresponding to a string.
+	 * 
+	 * @param str -
+	 *            string to be located
+	 * @return expression denoting the first position at which the string was
+	 *         found or expression denoting 0 if the string was not found
+	 */
+	Expression locate(String str);
+
+	/**
+	 * Locate a string contained within the string corresponding to the
+	 * expression on which the method was invoked. The search is started at
+	 * position 1 (first string position). This method must be invoked on an
+	 * expression corresponding to a string.
+	 * 
+	 * @param str -
+	 *            expression corresponding to the string to be located
+	 * @return expression denoting the first position at which the string was
+	 *         found or expression denoting 0 if the string was not found
+	 */
+	Expression locate(Expression str);
+
+	/**
+	 * Locate a string contained within the string corresponding to the
+	 * expression on which the method was invoked, starting at a specified
+	 * search position. This method must be invoked on an expression
+	 * corresponding to a string.
+	 * 
+	 * @param str -
+	 *            string to be located
+	 * @param position -
+	 *            position at which to start the search
+	 * @return expression denoting the first position at which the string was
+	 *         found or expression denoting 0 if the string was not found
+	 */
+	Expression locate(String str, int position);
+
+	/**
+	 * Locate a string contained within the string corresponding to the
+	 * expression on which the method was invoked, starting at a specified
+	 * search position. This method must be invoked on an expression
+	 * corresponding to a string.
+	 * 
+	 * @param str -
+	 *            string to be located
+	 * @param position -
+	 *            expression corresponding to position at which to start the
+	 *            search
+	 * @return expression denoting the first position at which the string was
+	 *         found or expression denoting 0 if the string was not found
+	 */
+	Expression locate(String str, Expression position);
+
+	/**
+	 * Locate a string contained within the string corresponding to the
+	 * expression on which the method was invoked, starting at a specified
+	 * search position. This method must be invoked on an expression
+	 * corresponding to a string.
+	 * 
+	 * @param str -
+	 *            expression corresponding to the string to be located
+	 * @param position -
+	 *            position at which to start the search
+	 * @return expression denoting the first position at which the string was
+	 *         found or expression denoting 0 if the string was not found
+	 */
+	Expression locate(Expression str, int position);
+
+	/**
+	 * Locate a string contained within the string corresponding to the
+	 * expression on which the method was invoked, starting at a specified
+	 * search position. This method must be invoked on an expression
+	 * corresponding to a string.
+	 * 
+	 * @param str -
+	 *            expression corresponding to the string to be located
+	 * @param position -
+	 *            expression corresponding to position at which to start the
+	 *            search
+	 * @return expression denoting the first position at which the string was
+	 *         found or expression denoting 0 if the string was not found
+	 */
+	Expression locate(Expression str, Expression position);
+
+	/*
+	 * Arithmetic operations
+	 */
+	/**
+	 * Addition. This method must be invoked on an expression corresponding to a
+	 * number.
+	 * 
+	 * @param num -
+	 *            number to be added
+	 * @return expression denoting the sum
+	 */
+	Expression plus(Number num);
+
+	/**
+	 * Addition. This method must be invoked on an expression corresponding to a
+	 * number.
+	 * 
+	 * @param expr -
+	 *            expression corresponding to number to be added
+	 * @return expression denoting the sum
+	 */
+	Expression plus(Expression expr);
+
+	/**
+	 * Unary minus. This method must be invoked on an expression corresponding
+	 * to a number.
+	 * 
+	 * @return expression denoting the unary minus of the expression
+	 */
+	Expression minus();
+
+	/**
+	 * Subtraction. This method must be invoked on an expression corresponding
+	 * to a number.
+	 * 
+	 * @param num -
+	 *            subtrahend
+	 * @return expression denoting the result of subtracting the argument from
+	 *         the number corresponding to the expression on which the method
+	 *         was invoked.
+	 */
+	Expression minus(Number num);
+
+	/**
+	 * Subtraction. This method must be invoked on an expression corresponding
+	 * to a number.
+	 * 
+	 * @param expr -
+	 *            expression corresponding to subtrahend
+	 * @return expression denoting the result of subtracting the number denoted
+	 *         by the argument from the number corresponding to the expression
+	 *         on which the method was invoked.
+	 */
+	Expression minus(Expression expr);
+
+	/**
+	 * Division. This method must be invoked on an expression corresponding to a
+	 * number.
+	 * 
+	 * @param num -
+	 *            divisor
+	 * @return expression denoting the result of dividing the number
+	 *         corresponding to the expression on which the method was invoked
+	 *         by the argument
+	 */
+	Expression dividedBy(Number num);
+
+	/**
+	 * Division. This method must be invoked on an expression corresponding to a
+	 * number.
+	 * 
+	 * @param expr -
+	 *            expression corresponding to the divisor
+	 * @return expression denoting the result of dividing the number
+	 *         corresponding to the expression on which the method was invoked
+	 *         by the number denoted by the argument
+	 */
+	Expression dividedBy(Expression expr);
+
+	/**
+	 * Multiplication. This method must be invoked on an expression
+	 * corresponding to a number.
+	 * 
+	 * @param num -
+	 *            multiplier
+	 * @return expression denoting the result of multiplying the argument with
+	 *         the number corresponding to the expression on which the method
+	 *         was invoked.
+	 */
+	Expression times(Number num);
+
+	/**
+	 * Multiplication. This method must be invoked on an expression
+	 * corresponding to a number.
+	 * 
+	 * @param expr -
+	 *            expression corresponding to the multiplier
+	 * @return expression denoting the result of multiplying the number denoted
+	 *         by the argument with the number corresponding to the expression
+	 *         on which the method was invoked.
+	 */
+	Expression times(Expression expr);
+
+	/**
+	 * Absolute value. This method must be invoked on an expression
+	 * corresponding to a number.
+	 * 
+	 * @return expression corresponding to the absolute value
+	 */
+	Expression abs();
+
+	/**
+	 * Square root. This method must be invoked on an expression corresponding
+	 * to a number.
+	 * 
+	 * @return expression corresponding to the square root
+	 */
+	Expression sqrt();
+
+	/**
+	 * Modulo operation. This must be invoked on an expression corresponding to
+	 * an integer value
+	 * 
+	 * @param num -
+	 *            integer divisor
+	 * @return expression corresponding to the integer remainder of the division
+	 *         of the integer corresponding to the expression on which the
+	 *         method was invoked by the argument.
+	 */
+	Expression mod(int num);
+
+	/**
+	 * Modulo operation. This must be invoked on an expression corresponding to
+	 * an integer value
+	 * 
+	 * @param expr -
+	 *            expression corresponding to integer divisor
+	 * @return expression corresponding to the integer remainder of the division
+	 *         of the integer corresponding to the expression on which the
+	 *         method was invoked by the argument.
+	 */
+	Expression mod(Expression expr);
+}
\ No newline at end of file

Propchange: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/Expression.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/Expression.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/Expression.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/FetchJoinObject.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/FetchJoinObject.java?rev=718380&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/FetchJoinObject.java (added)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/FetchJoinObject.java Mon Nov 17 13:07:05 2008
@@ -0,0 +1,31 @@
+/*
+ * 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.
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+package javax.persistence;
+
+/**
+ * Interface used for the result of a fetch join.
+ */
+public interface FetchJoinObject {
+}

Propchange: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/FetchJoinObject.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/FetchJoinObject.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/FetchJoinObject.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/OrderByItem.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/OrderByItem.java?rev=718380&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/OrderByItem.java (added)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/OrderByItem.java Mon Nov 17 13:07:05 2008
@@ -0,0 +1,31 @@
+/*
+ * 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.
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+package javax.persistence;
+
+/**
+ * Instances of this interface can be used as orderBy arguments.
+ */
+public interface OrderByItem {
+}

Propchange: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/OrderByItem.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/OrderByItem.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/OrderByItem.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/PathExpression.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/PathExpression.java?rev=718380&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/PathExpression.java (added)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/PathExpression.java Mon Nov 17 13:07:05 2008
@@ -0,0 +1,122 @@
+/*
+ * 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.
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+package javax.persistence;
+
+/**
+ * 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

Propchange: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/PathExpression.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/PathExpression.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/PathExpression.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/Predicate.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/Predicate.java?rev=718380&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/Predicate.java (added)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/Predicate.java Mon Nov 17 13:07:05 2008
@@ -0,0 +1,58 @@
+/*
+ * 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.
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+package javax.persistence;
+
+/**
+ * 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

Propchange: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/Predicate.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/Predicate.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/Predicate.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/PredicateOperand.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/PredicateOperand.java?rev=718380&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/PredicateOperand.java (added)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/PredicateOperand.java Mon Nov 17 13:07:05 2008
@@ -0,0 +1,593 @@
+/*
+ * 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.
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+package javax.persistence;
+
+import java.util.Date;
+import java.util.Calendar;
+
+/**
+ * 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);
+}

Propchange: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/PredicateOperand.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/PredicateOperand.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/PredicateOperand.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/QueryBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/QueryBuilder.java?rev=718380&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/QueryBuilder.java (added)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/QueryBuilder.java Mon Nov 17 13:07:05 2008
@@ -0,0 +1,62 @@
+/*
+ * 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.
+ */
+
+//
+// This source code implements specifications defined by the Java
+// Community Process. In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+package javax.persistence;
+
+/**
+ * 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);
+}

Propchange: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/QueryBuilder.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/QueryBuilder.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/QueryBuilder.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain