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/06/17 19:30:53 UTC
svn commit: r785739 [2/2] - in
/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence:
./ criteria/ metamodel/
Modified: 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=785739&r1=785738&r2=785739&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/ManagedType.java (original)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/ManagedType.java Wed Jun 17 17:30:47 2009
@@ -24,63 +24,67 @@
//
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);
+public interface ManagedType<X> extends Type<X> {
java.util.Set<Attribute<? super X, ?>> getAttributes();
java.util.Set<Attribute<X, ?>> getDeclaredAttributes();
- <E> Collection<? super X, E> getCollection(String name,
- Class<E> elementType);
+ <Y> SingularAttribute<? super X, Y> getSingularAttribute(String name, Class<Y> type);
- <E> Set<? super X, E> getSet(String name, Class<E> elementType);
+ <Y> SingularAttribute<X, Y> getDeclaredSingularAttribute(String name, Class<Y> type);
+
+ java.util.Set<SingularAttribute<? super X, ?>> getSingularAttributes();
- <E> List<? super X, E> getList(String name, Class<E> elementType);
+ java.util.Set<SingularAttribute<X, ?>> getDeclaredSingularAttributes();
+
+ <E> CollectionAttribute<? super X, E> getCollection(String name, Class<E> elementType);
- <K, V> Map<? super X, K, V> getMap(String name,
- Class<K> keyType,
- Class<V> valueType);
+ <E> SetAttribute<? super X, E> getSet(String name, Class<E> elementType);
- <E> Collection<X, E> getDeclaredCollection(String name,
- Class<E> elementType);
+ <E> ListAttribute<? super X, E> getList(String name, Class<E> elementType);
- <E> Set<X, E> getDeclaredSet(String name, Class<E> elementType);
+ <K, V> MapAttribute<? super X, K, V> getMap(String name,
+ Class<K> keyType,
+ Class<V> valueType);
- <E> List<X, E> getDeclaredList(String name, Class<E> elementType);
+ <E> CollectionAttribute<X, E> getDeclaredCollection(String name, Class<E> elementType);
- <K, V> Map<X, K, V> getDeclaredMap(String name,
- Class<K> keyType,
- Class<V> valueType);
+ <E> SetAttribute<X, E> getDeclaredSet(String name, Class<E> elementType);
- java.util.Set<AbstractCollection<? super X, ?, ?>> getCollections();
+ <E> ListAttribute<X, E> getDeclaredList(String name, Class<E> elementType);
- java.util.Set<AbstractCollection<X, ?, ?>> getDeclaredCollections();
+ <K, V> MapAttribute<X, K, V> getDeclaredMap(String name,
+ Class<K> keyType,
+ Class<V> valueType);
- //String-based:
+ java.util.Set<PluralAttribute<? super X, ?, ?>> getCollections();
+
+ java.util.Set<PluralAttribute<X, ?, ?>> getDeclaredCollections();
+
+//String-based:
+
+ Attribute<? super X, ?> getAttribute(String name);
+
+ Attribute<X, ?> getDeclaredAttribute(String name);
- Attribute<? super X, ?> getAttribute(String name);
+ SingularAttribute<? super X, ?> getSingularAttribute(String name);
- Attribute<X, ?> getDeclaredAttribute(String name);
+ SingularAttribute<X, ?> getDeclaredSingularAttribute(String name);
- Collection<? super X, ?> getCollection(String name);
+ CollectionAttribute<? super X, ?> getCollection(String name);
- Set<? super X, ?> getSet(String name);
+ SetAttribute<? super X, ?> getSet(String name);
- List<? super X, ?> getList(String name);
+ ListAttribute<? super X, ?> getList(String name);
- Map<? super X, ?, ?> getMap(String name);
+ MapAttribute<? super X, ?, ?> getMap(String name);
- Collection<X, ?> getDeclaredCollection(String name);
+ CollectionAttribute<X, ?> getDeclaredCollection(String name);
- Set<X, ?> getDeclaredSet(String name);
+ SetAttribute<X, ?> getDeclaredSet(String name);
- List<X, ?> getDeclaredList(String name);
+ ListAttribute<X, ?> getDeclaredList(String name);
- Map<X, ?, ?> getDeclaredMap(String name);
+ MapAttribute<X, ?, ?> getDeclaredMap(String name);
}
Added: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/MapAttribute.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/MapAttribute.java?rev=785739&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/MapAttribute.java (added)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/MapAttribute.java Wed Jun 17 17:30:47 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 MapAttribute<X, K, V>
+ extends PluralAttribute<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/MapAttribute.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/MappedSuperclassType.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/MappedSuperclassType.java?rev=785739&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/MappedSuperclassType.java (added)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/MappedSuperclassType.java Wed Jun 17 17:30:47 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 MappedSuperclassType<X> extends IdentifiableType<X> {
+
+}
Propchange: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/MappedSuperclassType.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: 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=785739&r1=785738&r2=785739&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Metamodel.java (original)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Metamodel.java Wed Jun 17 17:30:47 2009
@@ -27,15 +27,15 @@
public interface Metamodel {
- <X> Entity<X> entity(Class<X> cls);
+ <X> EntityType<X> entity(Class<X> cls);
<X> ManagedType<X> type(Class<X> cls);
- <X> Embeddable<X> embeddable(Class<X> cls);
+ <X> EmbeddableType<X> embeddable(Class<X> cls);
java.util.Set<ManagedType<?>> getManagedTypes();
- java.util.Set<Entity<?>> getEntities();
+ java.util.Set<EntityType<?>> getEntities();
- java.util.Set<Embeddable<?>> getEmbeddables();
+ java.util.Set<EmbeddableType<?>> getEmbeddables();
}
Added: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/PluralAttribute.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/PluralAttribute.java?rev=785739&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/PluralAttribute.java (added)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/PluralAttribute.java Wed Jun 17 17:30:47 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 PluralAttribute<X, C, E>
+ extends Attribute<X, C>, Bindable<E> {
+
+ public static enum CollectionType {
+ COLLECTION, SET, LIST, MAP
+ }
+
+ CollectionType getCollectionType();
+
+ Type<E> getElementType();
+}
Propchange: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/PluralAttribute.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/SetAttribute.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/SetAttribute.java?rev=785739&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/SetAttribute.java (added)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/SetAttribute.java Wed Jun 17 17:30:47 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 SetAttribute<X, E>
+ extends PluralAttribute<X, java.util.Set<E>, E> {
+
+}
Propchange: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/SetAttribute.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/SingularAttribute.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/SingularAttribute.java?rev=785739&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/SingularAttribute.java (added)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/SingularAttribute.java Wed Jun 17 17:30:47 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 SingularAttribute<X, T>
+ extends Attribute<X, T>, Bindable<T> {
+
+ boolean isId();
+
+ boolean isVersion();
+
+ boolean isOptional();
+
+ Type<T> getType();
+}
Propchange: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/SingularAttribute.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/StaticMetamodel.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/StaticMetamodel.java?rev=785739&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/StaticMetamodel.java (added)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/StaticMetamodel.java Wed Jun 17 17:30:47 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;
+
+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 StaticMetamodel {
+ Class<?> value();
+}
Propchange: geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/StaticMetamodel.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: 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=785739&r1=785738&r2=785739&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Type.java (original)
+++ geronimo/specs/trunk/geronimo-jpa_2.0_spec/src/main/java/javax/persistence/metamodel/Type.java Wed Jun 17 17:30:47 2009
@@ -30,7 +30,7 @@
public static enum PersistenceType {
ENTITY, EMBEDDABLE, MAPPED_SUPERCLASS, BASIC
}
-
+
PersistenceType getPersistenceType();
Class<X> getJavaType();