You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by dw...@apache.org on 2009/03/27 16:48:35 UTC

svn commit: r759182 [2/2] - in /geronimo/specs/trunk/geronimo-jpa_2.0_spec: ./ src/main/appended-resources/ src/main/appended-resources/META-INF/ src/main/java/javax/persistence/ src/main/java/javax/persistence/criteria/ src/main/java/javax/persistence...

Added: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/QueryBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/QueryBuilder.java?rev=759182&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/QueryBuilder.java (added)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/QueryBuilder.java Fri Mar 27 15:48:31 2009
@@ -0,0 +1,403 @@
+/*
+ * 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.criteria;
+
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.util.Collection;
+import java.util.Map;
+import java.util.Set;
+import javax.persistence.Parameter;
+
+public interface QueryBuilder {
+
+    CriteriaQuery create();
+    //select new Foo(...) equivalent:
+
+    <Y> Selection<Y> select(Class<Y> result, Selection<?>... selections);
+    //ordering:
+
+    Order asc(Expression<?> x);
+
+    Order desc(Expression<?> x);
+
+  //aggregate functions:
+
+    <N extends Number> Expression<Double> avg(Expression<N> x);
+
+    <N extends Number> Expression<N> sum(Expression<N> x);
+
+    <N extends Number> Expression<N> max(Expression<N> x);
+
+    <N extends Number> Expression<N> min(Expression<N> x);
+
+    <X extends Comparable<X>> Expression<X> greatest(Expression<X> x);
+
+    <X extends Comparable<X>> Expression<X> least(Expression<X> x);
+
+    Expression<Long> count(Expression<?> x);
+
+    Expression<Long> countDistinct(Expression<?> x);
+    //subqueries:
+
+    Predicate exists(Subquery<?> subquery);
+
+    <Y> Expression<Y> all(Subquery<Y> subquery);
+
+    <Y> Expression<Y> some(Subquery<Y> subquery);
+
+    <Y> Expression<Y> any(Subquery<Y> subquery);
+    //boolean functions:
+
+    Predicate and(Expression<Boolean> x, Expression<Boolean> y);
+
+    Predicate or(Expression<Boolean> x, Expression<Boolean> y);
+
+    Predicate and(Predicate... restrictions);
+
+    Predicate or(Predicate... restrictions);
+
+    Predicate not(Expression<Boolean> restriction);
+
+    Predicate conjunction();
+
+    Predicate disjunction();
+    //turn Expression<Boolean> into a Predicate
+    //useful for use with varargs methods
+    Predicate isTrue(Expression<Boolean> x);
+    
+    Predicate isFalse(Expression<Boolean> x);
+    //equality:
+
+    Predicate equal(Expression<?> x, Expression<?> y);
+
+    Predicate notEqual(Expression<?> x, Expression<?> y);
+
+    Predicate equal(Expression<?> x, Object y);
+
+    Predicate notEqual(Expression<?> x, Object y);
+    
+    //comparisons for generic (non-numeric) operands:
+    <Y extends Comparable<Y>> Predicate greaterThan(
+        Expression<? extends Y> x, Expression<? extends Y> y);
+
+    <Y extends Comparable<Y>> Predicate lessThan(
+        Expression<? extends Y> x, Expression<? extends Y> y);
+
+    <Y extends Comparable<Y>> Predicate greaterThanOrEqualTo(
+        Expression<? extends Y> x, Expression<? extends Y> y);
+    
+    <Y extends Comparable<Y>> Predicate lessThanOrEqualTo(
+        Expression<? extends Y> x, Expression<? extends Y> y);
+
+    <Y extends Comparable<Y>> Predicate between(
+        Expression<? extends Y> v, Expression<? extends Y> x, 
+        Expression<? extends Y> y);
+
+    <Y extends Comparable<Y>> Predicate greaterThan(
+        Expression<? extends Y> x, Y y);
+
+    <Y extends Comparable<Y>> Predicate lessThan(
+        Expression<? extends Y> x, Y y);
+
+    <Y extends Comparable<Y>> Predicate greaterThanOrEqualTo(
+        Expression<? extends Y> x, Y y);
+
+    <Y extends Comparable<Y>> Predicate lessThanOrEqualTo(
+        Expression<? extends Y> x, Y y);
+    
+    <Y extends Comparable<Y>> Predicate between(
+        Expression<? extends Y> v, Y x, Y y);
+    
+    //comparisons for numeric operands:
+    Predicate gt(Expression<? extends Number> x, 
+        Expression<? extends Number> y);
+
+    Predicate lt(Expression<? extends Number> x, 
+        Expression<? extends Number> y);
+
+    Predicate ge(Expression<? extends Number> x, 
+        Expression<? extends Number> y);
+
+    Predicate le(Expression<? extends Number> x, 
+        Expression<? extends Number> y);
+
+    Predicate gt(Expression<? extends Number> x, Number y);
+
+    Predicate lt(Expression<? extends Number> x, Number y);
+
+    Predicate ge(Expression<? extends Number> x, Number y);
+
+    Predicate le(Expression<? extends Number> x, Number y);
+    //numerical operations:
+
+    <N extends Number> Expression<N> neg(Expression<N> x);
+
+    <N extends Number> Expression<N> abs(Expression<N> x);
+
+    <N extends Number> Expression<N> sum(Expression<? extends N> x,
+        Expression<? extends N> y);
+
+    <N extends Number> Expression<N> prod(Expression<? extends N> x,
+        Expression<? extends N> y);
+
+    <N extends Number> Expression<N> diff(Expression<? extends N> x,
+        Expression<? extends N> y);
+
+    <N extends Number> Expression<N> sum(Expression<? extends N> x, N y);
+
+    <N extends Number> Expression<N> prod(Expression<? extends N> x, N y);
+
+    <N extends Number> Expression<N> diff(Expression<? extends N> x, N y);
+
+    <N extends Number> Expression<N> sum(N x, Expression<? extends N> y);
+
+    <N extends Number> Expression<N> prod(N x, Expression<? extends N> y);
+
+    <N extends Number> Expression<N> diff(N x, Expression<? extends N> y);
+
+    Expression<Number> quot(Expression<? extends Number> x, 
+        Expression<? extends Number> y);
+
+    Expression<Number> quot(Expression<? extends Number> x, Number y);
+
+    Expression<Number> quot(Number x, Expression<? extends Number> y);
+
+    Expression<Integer> mod(Expression<Integer> x, Expression<Integer> y);
+
+    Expression<Integer> mod(Expression<Integer> x, Integer y);
+
+    Expression<Integer> mod(Integer x, Expression<Integer> y);
+
+    Expression<Double> sqrt(Expression<? extends Number> x);
+
+    //typecasts:
+    Expression<Long> toLong(Expression<? extends Number> number);
+
+    Expression<Integer> toInteger(Expression<? extends Number> number);
+
+    Expression<Float> toFloat(Expression<? extends Number> number);
+
+    Expression<Double> toDouble(Expression<? extends Number> number);
+
+    Expression<BigDecimal> toBigDecimal(Expression<? extends Number> number);
+
+    Expression<BigInteger> toBigInteger(Expression<? extends Number> number);
+
+    Expression<String> toString(Expression<Character> character);
+    //literals:
+
+    <T> Expression<T> literal(T value);
+
+    //parameters:
+    <T> Parameter<T> parameter(Class<T> paramClass);
+
+    <T> Parameter<T> parameter(Class<T> paramClass, String name);
+
+    //collection operations:
+    <C extends Collection<?>> Predicate isEmpty(Expression<C> collection);
+
+    <C extends Collection<?>> Predicate isNotEmpty(Expression<C> collection);
+
+    <C extends Collection<?>> Expression<Integer> size(C collection);
+
+    <C extends java.util.Collection<?>> Expression<Integer>
+        size(Expression<C> collection);
+
+    <E, C extends Collection<E>> Predicate isMember(E elem, 
+        Expression<C> collection);
+    
+    <E, C extends Collection<E>> Predicate isNotMember(E elem, 
+        Expression<C> collection);
+
+    <E, C extends Collection<E>> Predicate isMember(Expression<E> elem, 
+        Expression<C> collection);
+
+    <E, C extends Collection<E>> Predicate isNotMember(Expression<E> elem,
+        Expression<C> collection);
+
+    //get the values and keys collections of the Map, which may then
+    //be passed to size(), isMember(), isEmpty(), etc
+    <V, M extends Map<?, V>> Expression<Collection<V>> values(M map);
+
+    <K, M extends Map<K, ?>> Expression<Set<K>> keys(M map);
+    //string functions:
+
+    Predicate like(Expression<String> x, Expression<String> pattern);
+
+    Predicate like(Expression<String> x, Expression<String> pattern,
+        Expression<Character> escapeChar);
+    
+    Predicate like(Expression<String> x, Expression<String> pattern,
+        char escapeChar);
+
+    Predicate like(Expression<String> x, String pattern);
+
+    Predicate like(Expression<String> x, String pattern, 
+        Expression<Character> escapeChar);
+
+    Predicate like(Expression<String> x, String pattern, 
+        char escapeChar);
+
+    Predicate notLike(Expression<String> x, Expression<String> pattern);
+
+    Predicate notLike(Expression<String> x, Expression<String> pattern,
+        Expression<Character> escapeChar);
+
+    Predicate notLike(Expression<String> x, Expression<String> pattern,
+        char escapeChar);
+
+    Predicate notLike(Expression<String> x, String pattern);
+    
+    Predicate notLike(Expression<String> x, String pattern, 
+        Expression<Character> escapeChar);
+
+    Predicate notLike(Expression<String> x, String pattern, char escapeChar);
+    
+    Expression<String> concat(Expression<String> x, Expression<String> y);
+
+    Expression<String> concat(Expression<String> x, String y);
+
+    Expression<String> concat(String x, Expression<String> y);
+
+    Expression<String> substring(Expression<String> x, 
+        Expression<Integer> from);
+
+    Expression<String> substring(Expression<String> x, int from);
+
+    Expression<String> substring(Expression<String> x, 
+        Expression<Integer> from, Expression<Integer> len);
+
+    Expression<String> substring(Expression<String> x, int from, int len);
+    
+    public static enum Trimspec { LEADING, TRAILING, BOTH }
+
+    Expression<String> trim(Expression<String> x);
+
+    Expression<String> trim(Trimspec ts, Expression<String> x);
+
+    Expression<String> trim(Expression<Character> t, Expression<String> x);
+
+    Expression<String> trim(Trimspec ts, Expression<Character> t,
+        Expression<String> x);
+
+    Expression<String> trim(char t, Expression<String> x);
+
+    Expression<String> trim(Trimspec ts, char t, Expression<String> x);
+
+    Expression<String> lower(Expression<String> x);
+
+    Expression<String> upper(Expression<String> x);
+
+    Expression<Integer> length(Expression<String> x);
+
+    Expression<Integer> locate(Expression<String> x, 
+        Expression<String> pattern);
+
+    Expression<Integer> locate(Expression<String> x, 
+        Expression<String> pattern, Expression<Integer> from);
+
+    Expression<Integer> locate(Expression<String> x, String pattern);
+
+    Expression<Integer> locate(Expression<String> x, String pattern,
+        int from);
+    
+    // Date/time/timestamp functions:
+
+    Expression<java.sql.Date> currentDate();
+
+    Expression<java.sql.Timestamp> currentTimestamp();
+
+    Expression<java.sql.Time> currentTime();
+
+    //in builders:
+
+    public static interface In<T> extends Predicate {
+        
+        Expression<T> getExpression();
+
+        In<T> value(T value);
+
+        In<T> value(Expression<? extends T> value);
+    }
+
+    <T> In<T> in(Expression<? extends T> expression);
+    
+    //coalesce, nullif:
+
+    <Y> Expression<Y> coalesce(Expression<? extends Y> x, 
+        Expression<? extends Y> y);
+
+    <Y> Expression<Y> coalesce(Expression<? extends Y> x, Y y);
+
+    <Y> Expression<Y> nullif(Expression<Y> x, Expression<?> y);
+    
+    <Y> Expression<Y> nullif(Expression<Y> x, Y y);
+
+    // coalesce builder:
+
+    public static interface Coalesce<T> extends Expression<T> {
+
+        Coalesce<T> value(T value);
+        
+        Coalesce<T> value(Expression<? extends T> value);
+    }
+    
+    <T> Coalesce<T> coalesce();
+  //case builders:
+
+    public static interface SimpleCase<C,R> extends Expression<R> {
+
+        Expression<C> getExpression();
+
+        SimpleCase<C, R> when(C condition, R result);
+
+        SimpleCase<C, R> when(C condition, Expression<? extends R> result);
+
+        Expression<R> otherwise(R result);
+
+        Expression<R> otherwise(Expression<? extends R> result);
+    }
+
+    <C, R> SimpleCase<C,R> selectCase(Expression<? extends C> expression);
+    
+    public static interface Case<R> extends Expression<R> {
+
+        Case<R> when(Expression<Boolean> condition, R result);
+
+        Case<R> when(Expression<Boolean> condition, 
+            Expression<? extends R> result);
+
+        Expression<R> otherwise(R result);
+
+        Expression<R> otherwise(Expression<? extends R> result);
+    }
+
+    <R> Case<R> selectCase();
+
+    <T> Expression<T> function(String name, Class<T> type,
+        Expression<?>... args);
+}

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

Added: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/Root.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/Root.java?rev=759182&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/Root.java (added)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/Root.java Fri Mar 27 15:48:31 2009
@@ -0,0 +1,33 @@
+/*
+ * 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.criteria;
+
+import javax.persistence.metamodel.Entity;
+
+public interface Root<X> extends From<X, X> {
+
+    Entity<X> getModel();
+}

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

Added: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/Selection.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/Selection.java?rev=759182&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/Selection.java (added)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/Selection.java Fri Mar 27 15:48:31 2009
@@ -0,0 +1,33 @@
+/*
+ * 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.criteria;
+
+import javax.persistence.ResultItem;
+
+public interface Selection<X> extends ResultItem<X> {
+
+    void setAlias(String name);
+}

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

Added: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/SetJoin.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/SetJoin.java?rev=759182&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/SetJoin.java (added)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/SetJoin.java Fri Mar 27 15:48:31 2009
@@ -0,0 +1,34 @@
+/*
+ * 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.criteria;
+
+import java.util.Set;
+
+public interface SetJoin<Z, E>
+    extends AbstractCollectionJoin<Z, Set<E>, E> {
+    
+    javax.persistence.metamodel.Set<? super Z, E> getModel();
+}

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

Added: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/Subquery.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/Subquery.java?rev=759182&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/Subquery.java (added)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/criteria/Subquery.java Fri Mar 27 15:48:31 2009
@@ -0,0 +1,69 @@
+/*
+ * 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.criteria;
+
+import javax.persistence.metamodel.Collection;
+import javax.persistence.metamodel.List;
+import javax.persistence.metamodel.Map;
+import javax.persistence.metamodel.Set;
+
+public interface Subquery<T> extends AbstractQuery, Expression<T> {
+
+    AbstractQuery getParent();
+
+    Subquery<T> select(Expression<T> expression);
+
+    //override the return type only:
+
+    Subquery<T> where(Expression<Boolean> restriction);
+
+    Subquery<T> where(Predicate... restrictions);
+
+    Subquery<T> groupBy(Expression<?>... grouping);
+
+    Subquery<T> having(Expression<Boolean> restriction);
+
+    Subquery<T> having(Predicate... restrictions);
+
+    Subquery<T> distinct(boolean distinct);
+
+    Expression<T> getSelection();
+
+    <Y> Root<Y> correlate(Root<Y> parentRoot);
+
+    <X, Y> Join<X, Y> correlate(Join<X, Y> parentJoin);
+
+    <X, Y> CollectionJoin<X, Y> correlate(
+        CollectionJoin<X, Y> parentCollection);
+
+    <X, Y> SetJoin<X, Y> correlate(SetJoin<X, Y> parentSet);
+
+    <X, Y> ListJoin<X, Y> correlate(ListJoin<X, Y> parentList);
+
+    <X, K, V> MapJoin<X, K, V> correlate(MapJoin<X, K, V> parentMap);
+
+    java.util.Set<Join<?, ?>> getJoins();
+}

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

Added: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/AbstractCollection.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/AbstractCollection.java?rev=759182&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/AbstractCollection.java (added)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/AbstractCollection.java Fri Mar 27 15:48:31 2009
@@ -0,0 +1,44 @@
+/*
+ * 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.metamodel;
+
+public interface AbstractCollection<X, C, E> 
+    extends Member<X, C>, Bindable<E> {
+    
+    public static enum CollectionType {
+        COLLECTION, SET, LIST, MAP
+    }
+
+    public static enum Multiplicity {
+        MANY_TO_MANY, ONE_TO_MANY, ELEMENT_COLLECTION
+    }
+
+    CollectionType getCollectionType();
+
+    Multiplicity getMultiplicity();
+
+    Type<E> getElementType();
+}

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

Added: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Attribute.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Attribute.java?rev=759182&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Attribute.java (added)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Attribute.java Fri Mar 27 15:48:31 2009
@@ -0,0 +1,43 @@
+/*
+ * 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.metamodel;
+
+public interface Attribute<X, T> extends Member<X, T>, Bindable<T> {
+
+    public static enum Multiplicity {
+        MANY_TO_ONE, ONE_TO_ONE, EMBEDDED, BASIC
+    }
+
+    Multiplicity getMultiplicity();
+
+    boolean isId();
+
+    boolean isVersion();
+
+    boolean isOptional();
+
+    Type<T> getAttributeType();
+}

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

Added: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Basic.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Basic.java?rev=759182&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Basic.java (added)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Basic.java Fri Mar 27 15:48:31 2009
@@ -0,0 +1,29 @@
+/*
+ * 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.metamodel;
+
+public interface Basic<X> extends Type<X> {    
+}

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

Added: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Bindable.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Bindable.java?rev=759182&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Bindable.java (added)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Bindable.java Fri Mar 27 15:48:31 2009
@@ -0,0 +1,37 @@
+/*
+ * 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.metamodel;
+
+public interface Bindable<T> {
+ 
+    public static enum BindableType {
+        ATTRIBUTE, COLLECTION, MANAGED_TYPE
+    }
+
+    BindableType getBindableType();
+
+    Class<T> getJavaType();
+}

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

Added: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Collection.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Collection.java?rev=759182&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Collection.java (added)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Collection.java Fri Mar 27 15:48:31 2009
@@ -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.metamodel;
+
+public interface Collection<X, E>
+    extends AbstractCollection<X, java.util.Collection<E>, E> {
+    
+}

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

Added: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Embeddable.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Embeddable.java?rev=759182&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Embeddable.java (added)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Embeddable.java Fri Mar 27 15:48:31 2009
@@ -0,0 +1,29 @@
+/*
+ * 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.metamodel;
+
+public interface Embeddable<X> extends ManagedType<X> {    
+}

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

Added: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Entity.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Entity.java?rev=759182&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Entity.java (added)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Entity.java Fri Mar 27 15:48:31 2009
@@ -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.metamodel;
+
+public interface Entity<X> extends IdentifiableType<X> {
+
+    String getName();
+}

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

Added: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/IdentifiableType.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/IdentifiableType.java?rev=759182&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/IdentifiableType.java (added)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/IdentifiableType.java Fri Mar 27 15:48:31 2009
@@ -0,0 +1,43 @@
+/*
+ * 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.metamodel;
+
+public interface IdentifiableType<X> extends ManagedType<X> {
+
+    <Y> Attribute<? super X, Y> getId(Class<Y> type);
+
+    <Y> Attribute<? super X, Y> getVersion(Class<Y> type);
+
+    <Y> Attribute<X, Y> getDeclaredId(Class<Y> type);
+
+    <Y> Attribute<X, Y> getDeclaredVersion(Class<Y> type);
+
+    IdentifiableType<? super X> getSupertype();
+
+    boolean hasIdAttribute();
+
+    Type<?> getIdType();
+}

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

Added: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/List.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/List.java?rev=759182&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/List.java (added)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/List.java Fri Mar 27 15:48:31 2009
@@ -0,0 +1,30 @@
+/*
+ * 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.metamodel;
+
+public interface List<X, E>
+    extends AbstractCollection<X, java.util.List<E>, E> {    
+}

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

Added: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/ManagedType.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/ManagedType.java?rev=759182&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/ManagedType.java (added)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/ManagedType.java Fri Mar 27 15:48:31 2009
@@ -0,0 +1,86 @@
+/*
+ * 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.metamodel;
+
+public interface ManagedType<X> extends Type<X>, Bindable<X> {
+
+    <Y> Attribute<? super X, Y> getAttribute(String name,
+        Class<Y> type);
+
+    <Y> Attribute<X, Y> getDeclaredAttribute(String name,
+        Class<Y> type);
+
+    java.util.Set<Attribute<? super X, ?>> getAttributes();
+
+    java.util.Set<Attribute<X, ?>> getDeclaredAttributes();
+
+    <E> Collection<? super X, E> getCollection(String name,
+        Class<E> elementType);
+
+    <E> Set<? super X, E> getSet(String name, Class<E> elementType);
+
+    <E> List<? super X, E> getList(String name, Class<E> elementType);
+
+    <K, V> Map<? super X, K, V> getMap(String name,
+        Class<K> keyType,
+        Class<V> valueType);
+
+    <E> Collection<X, E> getDeclaredCollection(String name,
+        Class<E> elementType);
+
+    <E> Set<X, E> getDeclaredSet(String name, Class<E> elementType);
+
+    <E> List<X, E> getDeclaredList(String name, Class<E> elementType);
+
+    <K, V> Map<X, K, V> getDeclaredMap(String name,
+        Class<K> keyType,
+        Class<V> valueType);
+
+    java.util.Set<AbstractCollection<? super X, ?, ?>> getCollections();
+
+    java.util.Set<AbstractCollection<X, ?, ?>> getDeclaredCollections();
+    
+    //String-based:
+
+    Attribute<? super X, ?> getAttribute(String name);
+
+    Attribute<X, ?> getDeclaredAttribute(String name);
+
+    Collection<? super X, ?> getCollection(String name);
+
+    Set<? super X, ?> getSet(String name);
+
+    List<? super X, ?> getList(String name);
+
+    Map<? super X, ?, ?> getMap(String name);
+
+    Collection<X, ?> getDeclaredCollection(String name);
+
+    Set<X, ?> getDeclaredSet(String name);
+
+    List<X, ?> getDeclaredList(String name);
+
+    Map<X, ?, ?> getDeclaredMap(String name);
+}

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

Added: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Map.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Map.java?rev=759182&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Map.java (added)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Map.java Fri Mar 27 15:48:31 2009
@@ -0,0 +1,34 @@
+/*
+ * 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.metamodel;
+
+public interface Map<X, K, V>
+    extends AbstractCollection<X, java.util.Map<K, V>, V> {
+    
+    Class<K> getKeyJavaType();
+
+    Type<K> getKeyType();
+}

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

Added: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/MappedSuperclass.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/MappedSuperclass.java?rev=759182&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/MappedSuperclass.java (added)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/MappedSuperclass.java Fri Mar 27 15:48:31 2009
@@ -0,0 +1,29 @@
+/*
+ * 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.metamodel;
+
+public interface MappedSuperclass<X> extends IdentifiableType<X> {    
+}

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

Added: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Member.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Member.java?rev=759182&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Member.java (added)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Member.java Fri Mar 27 15:48:31 2009
@@ -0,0 +1,41 @@
+/*
+ * 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.metamodel;
+
+public interface Member<X, Y> {
+
+    String getName();
+
+    ManagedType<X> getDeclaringType();
+
+    Class<Y> getMemberJavaType();
+
+    java.lang.reflect.Member getJavaMember();
+
+    boolean isAssociation();
+
+    boolean isCollection();
+}

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

Added: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Metamodel.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Metamodel.java?rev=759182&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Metamodel.java (added)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Metamodel.java Fri Mar 27 15:48:31 2009
@@ -0,0 +1,41 @@
+/*
+ * 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.metamodel;
+
+public interface Metamodel {
+
+    <X> Entity<X> entity(Class<X> cls);
+
+    <X> ManagedType<X> type(Class<X> cls);
+
+    <X> Embeddable<X> embeddable(Class<X> cls);
+
+    java.util.Set<ManagedType<?>> getManagedTypes();
+
+    java.util.Set<Entity<?>> getEntities();
+
+    java.util.Set<Embeddable<?>> getEmbeddables();
+}

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

Added: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Set.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Set.java?rev=759182&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Set.java (added)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Set.java Fri Mar 27 15:48:31 2009
@@ -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.metamodel;
+
+public interface Set<X, E>
+    extends AbstractCollection<X, java.util.Set<E>, E> {
+    
+}

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

Added: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Type.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Type.java?rev=759182&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Type.java (added)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Type.java Fri Mar 27 15:48:31 2009
@@ -0,0 +1,37 @@
+/*
+ * 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.metamodel;
+
+public interface Type<X> {
+    
+    public static enum PersistenceType {
+        ENTITY, EMBEDDABLE, MAPPED_SUPERCLASS, BASIC
+    }
+
+    PersistenceType getPersistenceType();
+    
+    Class<X> getJavaType();
+}

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

Added: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/TypesafeMetamodel.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/TypesafeMetamodel.java?rev=759182&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/TypesafeMetamodel.java (added)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/TypesafeMetamodel.java Fri Mar 27 15:48:31 2009
@@ -0,0 +1,38 @@
+/*
+ * 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.metamodel;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target(ElementType.TYPE)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface TypesafeMetamodel {
+    
+    Class<?> value();
+}

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

Added: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/spi/LoadState.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/spi/LoadState.java?rev=759182&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/spi/LoadState.java (added)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/spi/LoadState.java Fri Mar 27 15:48:31 2009
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+//
+// 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.spi;
+
+public enum LoadState {
+    LOADED,
+    NOT_LOADED,
+    UNKNOWN
+}

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

Modified: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/spi/PersistenceProvider.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/spi/PersistenceProvider.java?rev=759182&r1=759181&r2=759182&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/spi/PersistenceProvider.java (original)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/spi/PersistenceProvider.java Fri Mar 27 15:48:31 2009
@@ -33,8 +33,18 @@
  */
 public interface PersistenceProvider {
 
-    public EntityManagerFactory createEntityManagerFactory(String emName, Map map);
+    public EntityManagerFactory createEntityManagerFactory(String emName, 
+        Map map);
 
-    public EntityManagerFactory createContainerEntityManagerFactory(PersistenceUnitInfo info, Map map);
+    public EntityManagerFactory createContainerEntityManagerFactory(
+        PersistenceUnitInfo info, Map map);
 
+    public LoadState isLoadedWithoutReference(Object entity, 
+        String attributeName);
+    
+    public LoadState isLoadedWithReference(Object entity, 
+        String attributeName);
+
+    public LoadState isLoaded(Object entity);
 }
+

Added: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/spi/PersistenceProviderResolver.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/spi/PersistenceProviderResolver.java?rev=759182&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/spi/PersistenceProviderResolver.java (added)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/spi/PersistenceProviderResolver.java Fri Mar 27 15:48:31 2009
@@ -0,0 +1,33 @@
+/*
+ * 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.spi;
+
+import java.util.List;
+
+public interface PersistenceProviderResolver {
+
+    List<PersistenceProvider> getPersistenceProviders();
+}

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

Added: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/spi/PersistenceProviderResolverHolder.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/spi/PersistenceProviderResolverHolder.java?rev=759182&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/spi/PersistenceProviderResolverHolder.java (added)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/spi/PersistenceProviderResolverHolder.java Fri Mar 27 15:48:31 2009
@@ -0,0 +1,48 @@
+/*
+ * 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.spi;
+
+/**
+* Holds global PersistenceProviderResolver instance.
+* If no PersistenceProviderResolver is set in the environment,
+* the default PersistenceProviderResolver is used.
+*
+* Implementations must be thread-safe.
+*/
+public class PersistenceProviderResolverHolder {
+    /**
+    * Returns current persistence provider resolver
+    */
+    public static PersistenceProviderResolver getPersistenceProviderResolver() {
+        // TODO
+        return null;
+    }
+    
+    public static void setPersistenceProviderResolver(
+        PersistenceProviderResolver resolver) {
+        // TODO
+    }
+}

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

Modified: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/spi/PersistenceUnitInfo.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/spi/PersistenceUnitInfo.java?rev=759182&r1=759181&r2=759182&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/spi/PersistenceUnitInfo.java (original)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/spi/PersistenceUnitInfo.java Fri Mar 27 15:48:31 2009
@@ -28,6 +28,8 @@
 import java.util.List;
 import java.util.Properties;
 
+import javax.persistence.Caching;
+import javax.persistence.ValidationMode;
 import javax.sql.DataSource;
 
 /**
@@ -55,8 +57,14 @@
 
     public boolean excludeUnlistedClasses();
 
+    public Caching getCaching();
+
+    public ValidationMode getValidationMode();
+
     public Properties getProperties();
 
+    public String PersistenceXMLSchemaVersion();
+
     public ClassLoader getClassLoader();
 
     public void addTransformer(ClassTransformer transformer);