Hibernate SVN: r16129 - jpa-api/trunk/src/main/java/javax/persistence.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2009-03-10 10:27:12 -0400 (Tue, 10 Mar 2009)
New Revision: 16129
Modified:
jpa-api/trunk/src/main/java/javax/persistence/Column.java
Log:
Consistently applied a source file header
Modified: jpa-api/trunk/src/main/java/javax/persistence/Column.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/Column.java 2009-03-10 14:01:23 UTC (rev 16128)
+++ jpa-api/trunk/src/main/java/javax/persistence/Column.java 2009-03-10 14:27:12 UTC (rev 16129)
@@ -1,4 +1,5 @@
-//$Id$
+// $Id$
+// EJB3 Specification Copyright 2004-2009 Sun Microsystems, Inc.
package javax.persistence;
import java.lang.annotation.Retention;
15 years, 9 months
Hibernate SVN: r16128 - in jpa-api/trunk/src/main/java/javax/persistence: criteria and 2 other directories.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2009-03-10 10:01:23 -0400 (Tue, 10 Mar 2009)
New Revision: 16128
Added:
jpa-api/trunk/src/main/java/javax/persistence/Access.java
jpa-api/trunk/src/main/java/javax/persistence/AccessType.java
jpa-api/trunk/src/main/java/javax/persistence/Cache.java
jpa-api/trunk/src/main/java/javax/persistence/Cacheable.java
jpa-api/trunk/src/main/java/javax/persistence/Caching.java
jpa-api/trunk/src/main/java/javax/persistence/CollectionTable.java
jpa-api/trunk/src/main/java/javax/persistence/ElementCollection.java
jpa-api/trunk/src/main/java/javax/persistence/LockTimeoutException.java
jpa-api/trunk/src/main/java/javax/persistence/MapKeyClass.java
jpa-api/trunk/src/main/java/javax/persistence/MapKeyColumn.java
jpa-api/trunk/src/main/java/javax/persistence/MapKeyJoinColumn.java
jpa-api/trunk/src/main/java/javax/persistence/MapKeyJoinColumns.java
jpa-api/trunk/src/main/java/javax/persistence/MappedById.java
jpa-api/trunk/src/main/java/javax/persistence/OrderColumn.java
jpa-api/trunk/src/main/java/javax/persistence/PersistenceUtil.java
jpa-api/trunk/src/main/java/javax/persistence/PessimisticLockException.java
jpa-api/trunk/src/main/java/javax/persistence/QueryTimeoutException.java
jpa-api/trunk/src/main/java/javax/persistence/ValidationMode.java
jpa-api/trunk/src/main/java/javax/persistence/spi/LoadState.java
jpa-api/trunk/src/main/java/javax/persistence/spi/PersistenceProviderResolver.java
jpa-api/trunk/src/main/java/javax/persistence/spi/PersistenceProviderResolverHolder.java
Modified:
jpa-api/trunk/src/main/java/javax/persistence/AssociationOverride.java
jpa-api/trunk/src/main/java/javax/persistence/AssociationOverrides.java
jpa-api/trunk/src/main/java/javax/persistence/AttributeOverride.java
jpa-api/trunk/src/main/java/javax/persistence/AttributeOverrides.java
jpa-api/trunk/src/main/java/javax/persistence/Basic.java
jpa-api/trunk/src/main/java/javax/persistence/CascadeType.java
jpa-api/trunk/src/main/java/javax/persistence/Column.java
jpa-api/trunk/src/main/java/javax/persistence/ColumnResult.java
jpa-api/trunk/src/main/java/javax/persistence/DiscriminatorColumn.java
jpa-api/trunk/src/main/java/javax/persistence/DiscriminatorType.java
jpa-api/trunk/src/main/java/javax/persistence/DiscriminatorValue.java
jpa-api/trunk/src/main/java/javax/persistence/Embeddable.java
jpa-api/trunk/src/main/java/javax/persistence/Embedded.java
jpa-api/trunk/src/main/java/javax/persistence/EmbeddedId.java
jpa-api/trunk/src/main/java/javax/persistence/Entity.java
jpa-api/trunk/src/main/java/javax/persistence/EntityExistsException.java
jpa-api/trunk/src/main/java/javax/persistence/EntityListeners.java
jpa-api/trunk/src/main/java/javax/persistence/EntityManager.java
jpa-api/trunk/src/main/java/javax/persistence/EntityManagerFactory.java
jpa-api/trunk/src/main/java/javax/persistence/EntityNotFoundException.java
jpa-api/trunk/src/main/java/javax/persistence/EntityResult.java
jpa-api/trunk/src/main/java/javax/persistence/EntityTransaction.java
jpa-api/trunk/src/main/java/javax/persistence/EnumType.java
jpa-api/trunk/src/main/java/javax/persistence/Enumerated.java
jpa-api/trunk/src/main/java/javax/persistence/ExcludeDefaultListeners.java
jpa-api/trunk/src/main/java/javax/persistence/ExcludeSuperclassListeners.java
jpa-api/trunk/src/main/java/javax/persistence/FetchType.java
jpa-api/trunk/src/main/java/javax/persistence/FieldResult.java
jpa-api/trunk/src/main/java/javax/persistence/FlushModeType.java
jpa-api/trunk/src/main/java/javax/persistence/GeneratedValue.java
jpa-api/trunk/src/main/java/javax/persistence/GenerationType.java
jpa-api/trunk/src/main/java/javax/persistence/Id.java
jpa-api/trunk/src/main/java/javax/persistence/IdClass.java
jpa-api/trunk/src/main/java/javax/persistence/Inheritance.java
jpa-api/trunk/src/main/java/javax/persistence/InheritanceType.java
jpa-api/trunk/src/main/java/javax/persistence/JoinColumn.java
jpa-api/trunk/src/main/java/javax/persistence/JoinColumns.java
jpa-api/trunk/src/main/java/javax/persistence/JoinTable.java
jpa-api/trunk/src/main/java/javax/persistence/Lob.java
jpa-api/trunk/src/main/java/javax/persistence/LockModeType.java
jpa-api/trunk/src/main/java/javax/persistence/ManyToMany.java
jpa-api/trunk/src/main/java/javax/persistence/ManyToOne.java
jpa-api/trunk/src/main/java/javax/persistence/MapKey.java
jpa-api/trunk/src/main/java/javax/persistence/MappedSuperclass.java
jpa-api/trunk/src/main/java/javax/persistence/NamedNativeQueries.java
jpa-api/trunk/src/main/java/javax/persistence/NamedNativeQuery.java
jpa-api/trunk/src/main/java/javax/persistence/NamedQueries.java
jpa-api/trunk/src/main/java/javax/persistence/NamedQuery.java
jpa-api/trunk/src/main/java/javax/persistence/NoResultException.java
jpa-api/trunk/src/main/java/javax/persistence/NonUniqueResultException.java
jpa-api/trunk/src/main/java/javax/persistence/OneToMany.java
jpa-api/trunk/src/main/java/javax/persistence/OneToOne.java
jpa-api/trunk/src/main/java/javax/persistence/OptimisticLockException.java
jpa-api/trunk/src/main/java/javax/persistence/OrderBy.java
jpa-api/trunk/src/main/java/javax/persistence/Persistence.java
jpa-api/trunk/src/main/java/javax/persistence/PersistenceContext.java
jpa-api/trunk/src/main/java/javax/persistence/PersistenceContextType.java
jpa-api/trunk/src/main/java/javax/persistence/PersistenceContexts.java
jpa-api/trunk/src/main/java/javax/persistence/PersistenceException.java
jpa-api/trunk/src/main/java/javax/persistence/PersistenceProperty.java
jpa-api/trunk/src/main/java/javax/persistence/PersistenceUnit.java
jpa-api/trunk/src/main/java/javax/persistence/PersistenceUnits.java
jpa-api/trunk/src/main/java/javax/persistence/PostLoad.java
jpa-api/trunk/src/main/java/javax/persistence/PostPersist.java
jpa-api/trunk/src/main/java/javax/persistence/PostRemove.java
jpa-api/trunk/src/main/java/javax/persistence/PostUpdate.java
jpa-api/trunk/src/main/java/javax/persistence/PrePersist.java
jpa-api/trunk/src/main/java/javax/persistence/PreRemove.java
jpa-api/trunk/src/main/java/javax/persistence/PreUpdate.java
jpa-api/trunk/src/main/java/javax/persistence/PrimaryKeyJoinColumn.java
jpa-api/trunk/src/main/java/javax/persistence/PrimaryKeyJoinColumns.java
jpa-api/trunk/src/main/java/javax/persistence/Query.java
jpa-api/trunk/src/main/java/javax/persistence/QueryHint.java
jpa-api/trunk/src/main/java/javax/persistence/RollbackException.java
jpa-api/trunk/src/main/java/javax/persistence/SecondaryTable.java
jpa-api/trunk/src/main/java/javax/persistence/SecondaryTables.java
jpa-api/trunk/src/main/java/javax/persistence/SequenceGenerator.java
jpa-api/trunk/src/main/java/javax/persistence/SqlResultSetMapping.java
jpa-api/trunk/src/main/java/javax/persistence/SqlResultSetMappings.java
jpa-api/trunk/src/main/java/javax/persistence/Table.java
jpa-api/trunk/src/main/java/javax/persistence/TableGenerator.java
jpa-api/trunk/src/main/java/javax/persistence/Temporal.java
jpa-api/trunk/src/main/java/javax/persistence/TemporalType.java
jpa-api/trunk/src/main/java/javax/persistence/TransactionRequiredException.java
jpa-api/trunk/src/main/java/javax/persistence/Transient.java
jpa-api/trunk/src/main/java/javax/persistence/UniqueConstraint.java
jpa-api/trunk/src/main/java/javax/persistence/Version.java
jpa-api/trunk/src/main/java/javax/persistence/criteria/AbstractCollectionJoin.java
jpa-api/trunk/src/main/java/javax/persistence/criteria/AbstractQuery.java
jpa-api/trunk/src/main/java/javax/persistence/criteria/CollectionJoin.java
jpa-api/trunk/src/main/java/javax/persistence/criteria/CriteriaQuery.java
jpa-api/trunk/src/main/java/javax/persistence/criteria/Expression.java
jpa-api/trunk/src/main/java/javax/persistence/criteria/Fetch.java
jpa-api/trunk/src/main/java/javax/persistence/criteria/FetchParent.java
jpa-api/trunk/src/main/java/javax/persistence/criteria/From.java
jpa-api/trunk/src/main/java/javax/persistence/criteria/Join.java
jpa-api/trunk/src/main/java/javax/persistence/criteria/JoinType.java
jpa-api/trunk/src/main/java/javax/persistence/criteria/ListJoin.java
jpa-api/trunk/src/main/java/javax/persistence/criteria/MapJoin.java
jpa-api/trunk/src/main/java/javax/persistence/criteria/Order.java
jpa-api/trunk/src/main/java/javax/persistence/criteria/Parameter.java
jpa-api/trunk/src/main/java/javax/persistence/criteria/Path.java
jpa-api/trunk/src/main/java/javax/persistence/criteria/Predicate.java
jpa-api/trunk/src/main/java/javax/persistence/criteria/QueryBuilder.java
jpa-api/trunk/src/main/java/javax/persistence/criteria/Result.java
jpa-api/trunk/src/main/java/javax/persistence/criteria/Root.java
jpa-api/trunk/src/main/java/javax/persistence/criteria/Selection.java
jpa-api/trunk/src/main/java/javax/persistence/criteria/SetJoin.java
jpa-api/trunk/src/main/java/javax/persistence/criteria/Subquery.java
jpa-api/trunk/src/main/java/javax/persistence/metamodel/AbstractCollection.java
jpa-api/trunk/src/main/java/javax/persistence/metamodel/Attribute.java
jpa-api/trunk/src/main/java/javax/persistence/metamodel/Basic.java
jpa-api/trunk/src/main/java/javax/persistence/metamodel/Bindable.java
jpa-api/trunk/src/main/java/javax/persistence/metamodel/Collection.java
jpa-api/trunk/src/main/java/javax/persistence/metamodel/Embeddable.java
jpa-api/trunk/src/main/java/javax/persistence/metamodel/Entity.java
jpa-api/trunk/src/main/java/javax/persistence/metamodel/IdentifiableType.java
jpa-api/trunk/src/main/java/javax/persistence/metamodel/List.java
jpa-api/trunk/src/main/java/javax/persistence/metamodel/ManagedType.java
jpa-api/trunk/src/main/java/javax/persistence/metamodel/Map.java
jpa-api/trunk/src/main/java/javax/persistence/metamodel/MappedSuperclass.java
jpa-api/trunk/src/main/java/javax/persistence/metamodel/Member.java
jpa-api/trunk/src/main/java/javax/persistence/metamodel/Metamodel.java
jpa-api/trunk/src/main/java/javax/persistence/metamodel/Set.java
jpa-api/trunk/src/main/java/javax/persistence/metamodel/Type.java
jpa-api/trunk/src/main/java/javax/persistence/metamodel/TypesafeMetamodel.java
jpa-api/trunk/src/main/java/javax/persistence/package-info.java
jpa-api/trunk/src/main/java/javax/persistence/spi/ClassTransformer.java
jpa-api/trunk/src/main/java/javax/persistence/spi/PersistenceProvider.java
jpa-api/trunk/src/main/java/javax/persistence/spi/PersistenceUnitInfo.java
jpa-api/trunk/src/main/java/javax/persistence/spi/PersistenceUnitTransactionType.java
jpa-api/trunk/src/main/java/javax/persistence/spi/package-info.java
Log:
Updated the API according to the latest specs. Enabled svn keyword substitution
Added: jpa-api/trunk/src/main/java/javax/persistence/Access.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/Access.java (rev 0)
+++ jpa-api/trunk/src/main/java/javax/persistence/Access.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -0,0 +1,18 @@
+// $Id$
+package javax.persistence;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+/**
+ * @author Hardy Ferentschik
+ */
+@Target({ TYPE, METHOD, FIELD })
+@Retention(RUNTIME)
+public @interface Access {
+ AccessType value();
+}
\ No newline at end of file
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/Access.java
___________________________________________________________________
Name: svn:keywords
+ Id
Added: jpa-api/trunk/src/main/java/javax/persistence/AccessType.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/AccessType.java (rev 0)
+++ jpa-api/trunk/src/main/java/javax/persistence/AccessType.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -0,0 +1,10 @@
+// $Id$
+package javax.persistence;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public enum AccessType {
+ FIELD,
+ PROPERTY
+}
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/AccessType.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/AssociationOverride.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/AssociationOverride.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/AssociationOverride.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,13 +1,12 @@
-//$Id:$
-//EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc.
+// $Id$
package javax.persistence;
-import java.lang.annotation.Target;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
import java.lang.annotation.Retention;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.FIELD;
+import java.lang.annotation.Target;
/**
* This annotation is used to override a many-to-one or one-to-one mapping of property or field for
@@ -19,16 +18,12 @@
*
* @author Emmanuel Bernard
*/
-@Target({TYPE, METHOD, FIELD}) @Retention(RUNTIME)
+@Target({ TYPE, METHOD, FIELD })
+@Retention(RUNTIME)
public @interface AssociationOverride {
- /**
- * The name of the relationship property whose mapping is being overridden if property-based
- * access is being used, or the name of the relationship field if field-based access is used.
- */
String name();
- /**
- * The join column that is being mapped to the persistent attribute.
- */
- JoinColumn[] joinColumns();
+ JoinColumn[] joinColumns() default { };
+
+ JoinTable joinTable() default @JoinTable;
}
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/AssociationOverride.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/AssociationOverrides.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/AssociationOverrides.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/AssociationOverrides.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,5 +1,4 @@
-//$Id:$
-//EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc.
+//$Id$
package javax.persistence;
import java.lang.annotation.Target;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/AssociationOverrides.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/AttributeOverride.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/AttributeOverride.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/AttributeOverride.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,5 +1,4 @@
-//$Id: AttributeOverride.java 11171 2007-02-08 03:40:51Z epbernard $
-//EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc.
+//$Id$
package javax.persistence;
import java.lang.annotation.Retention;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/AttributeOverride.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/AttributeOverrides.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/AttributeOverrides.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/AttributeOverrides.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,5 +1,4 @@
-//$Id: AttributeOverrides.java 11171 2007-02-08 03:40:51Z epbernard $
-//EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc.
+//$Id$
package javax.persistence;
import java.lang.annotation.Retention;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/AttributeOverrides.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/Basic.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/Basic.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/Basic.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,5 +1,4 @@
-//$Id: Basic.java 11171 2007-02-08 03:40:51Z epbernard $
-//EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc.
+//$Id$
package javax.persistence;
import static java.lang.annotation.ElementType.FIELD;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/Basic.java
___________________________________________________________________
Name: svn:keywords
+ Id
Added: jpa-api/trunk/src/main/java/javax/persistence/Cache.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/Cache.java (rev 0)
+++ jpa-api/trunk/src/main/java/javax/persistence/Cache.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -0,0 +1,30 @@
+// $Id$
+package javax.persistence;
+
+/**
+ * Interface used to interact with the second-level cache.
+ * If a cache is not in use, the methods of this interface have
+ * no effect, except for contains, which returns false.
+ */
+public interface Cache {
+ /**
+ * Whether the cache contains data for the given entity.
+ */
+ public boolean contains(Class cls, Object primaryKey);
+
+ /**
+ * Remove the data for the given entity from the cache.
+ */
+ public void evict(Class cls, Object primaryKey);
+
+ /**
+ * Remove the data for entities of the specified class (and its
+ * subclasses) from the cache.
+ */
+ public void evict(Class cls);
+
+ /**
+ * Clear the cache.
+ */
+ public void evictAll();
+}
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/Cache.java
___________________________________________________________________
Name: svn:keywords
+ Id
Added: jpa-api/trunk/src/main/java/javax/persistence/Cacheable.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/Cacheable.java (rev 0)
+++ jpa-api/trunk/src/main/java/javax/persistence/Cacheable.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -0,0 +1,16 @@
+// $Id$
+package javax.persistence;
+
+import static java.lang.annotation.ElementType.TYPE;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+/**
+ * @author Hardy Ferentschik
+ */
+@Target({ TYPE })
+@Retention(RUNTIME)
+public @interface Cacheable {
+ boolean value() default true;
+}
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/Cacheable.java
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Added: jpa-api/trunk/src/main/java/javax/persistence/Caching.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/Caching.java (rev 0)
+++ jpa-api/trunk/src/main/java/javax/persistence/Caching.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -0,0 +1,13 @@
+// $Id$
+package javax.persistence;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public enum Caching {
+ ALL,
+ NONE,
+ ENABLE_SELECTIVE,
+ DISABLE_SELECTIVE,
+ UNSPECIFIED
+}
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/Caching.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/CascadeType.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/CascadeType.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/CascadeType.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,5 +1,4 @@
-//$Id: CascadeType.java 11171 2007-02-08 03:40:51Z epbernard $
-//EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc.
+//$Id$
package javax.persistence;
/**
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/CascadeType.java
___________________________________________________________________
Name: svn:keywords
+ Id
Added: jpa-api/trunk/src/main/java/javax/persistence/CollectionTable.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/CollectionTable.java (rev 0)
+++ jpa-api/trunk/src/main/java/javax/persistence/CollectionTable.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -0,0 +1,25 @@
+// $Id$
+package javax.persistence;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+/**
+ * @author Hardy Ferentschik
+ */
+@Target({ METHOD, FIELD })
+@Retention(RUNTIME)
+public @interface CollectionTable {
+ String name() default "";
+
+ String catalog() default "";
+
+ String schema() default "";
+
+ JoinColumn[] joinColumns() default { };
+
+ UniqueConstraint[] uniqueConstraints() default { };
+}
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/CollectionTable.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/Column.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/Column.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/Column.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,5 +1,4 @@
-//$Id: Column.java 11171 2007-02-08 03:40:51Z epbernard $
-//EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc.
+//$Id$
package javax.persistence;
import java.lang.annotation.Retention;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/Column.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/ColumnResult.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/ColumnResult.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/ColumnResult.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,5 +1,4 @@
-//$Id: ColumnResult.java 11171 2007-02-08 03:40:51Z epbernard $
-//EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc.
+//$Id$
package javax.persistence;
import java.lang.annotation.Target;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/ColumnResult.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/DiscriminatorColumn.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/DiscriminatorColumn.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/DiscriminatorColumn.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,5 +1,4 @@
-//$Id: DiscriminatorColumn.java 11171 2007-02-08 03:40:51Z epbernard $
-//EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc.
+// $Id$
package javax.persistence;
import java.lang.annotation.Retention;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/DiscriminatorColumn.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/DiscriminatorType.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/DiscriminatorType.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/DiscriminatorType.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,5 +1,4 @@
-//$Id: DiscriminatorType.java 11171 2007-02-08 03:40:51Z epbernard $
-//EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc.
+//$Id$
package javax.persistence;
/**
@@ -20,4 +19,4 @@
* Integer as the discriminator type
*/
INTEGER
-};
+}
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/DiscriminatorType.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/DiscriminatorValue.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/DiscriminatorValue.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/DiscriminatorValue.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id: DiscriminatorValue.java 11171 2007-02-08 03:40:51Z epbernard $
+//$Id$
package javax.persistence;
import java.lang.annotation.Target;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/DiscriminatorValue.java
___________________________________________________________________
Name: svn:keywords
+ Id
Added: jpa-api/trunk/src/main/java/javax/persistence/ElementCollection.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/ElementCollection.java (rev 0)
+++ jpa-api/trunk/src/main/java/javax/persistence/ElementCollection.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -0,0 +1,20 @@
+// $Id$
+package javax.persistence;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+import static javax.persistence.FetchType.LAZY;
+
+/**
+ * @author Hardy Ferentschik
+ */
+@Target({ METHOD, FIELD })
+@Retention(RUNTIME)
+public @interface ElementCollection {
+ Class targetClass() default void.class;
+
+ FetchType fetch() default LAZY;
+}
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/ElementCollection.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/Embeddable.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/Embeddable.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/Embeddable.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,14 +1,12 @@
-//$Id: Embeddable.java 11171 2007-02-08 03:40:51Z epbernard $
-//EJB Specification Copyright 2004 Sun Microsystems, Inc.
+// $Id$
package javax.persistence;
+import static java.lang.annotation.ElementType.TYPE;
import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Target;
-import static java.lang.annotation.ElementType.*;
-import static java.lang.annotation.RetentionPolicy.*;
-
/**
* Defines a class whose instances are stored as an intrinsic part of an owning entity and share
* the identity of the entity. Each of the persistent properties or fields of the embedded object
@@ -18,5 +16,7 @@
*
* @author Emmanuel Bernard
*/
-@Target({TYPE}) @Retention(RUNTIME)
-public @interface Embeddable {}
+@Target({ TYPE })
+@Retention(RUNTIME)
+public @interface Embeddable {
+}
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/Embeddable.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/Embedded.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/Embedded.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/Embedded.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,5 +1,4 @@
-//$Id: Embedded.java 11171 2007-02-08 03:40:51Z epbernard $
-//EJB Specification Copyright 2004 Sun Microsystems, Inc.
+//$Id$
package javax.persistence;
import java.lang.annotation.Retention;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/Embedded.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/EmbeddedId.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/EmbeddedId.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/EmbeddedId.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,5 +1,4 @@
-//$Id: EmbeddedId.java 11171 2007-02-08 03:40:51Z epbernard $
-//EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc.
+//$Id$
package javax.persistence;
import java.lang.annotation.ElementType;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/EmbeddedId.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/Entity.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/Entity.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/Entity.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id: Entity.java 11171 2007-02-08 03:40:51Z epbernard $
+//$Id$
//EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc.
package javax.persistence;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/Entity.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/EntityExistsException.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/EntityExistsException.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/EntityExistsException.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package javax.persistence;
/**
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/EntityExistsException.java
___________________________________________________________________
Name: svn:keywords
+ Id
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/EntityListeners.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/EntityManager.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/EntityManager.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/EntityManager.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,34 +1,28 @@
-// $Id: EntityManager.java 11171 2007-02-08 03:40:51Z epbernard $
+// $Id$
package javax.persistence;
+import java.util.Map;
+import java.util.Set;
+import javax.persistence.criteria.CriteriaQuery;
+import javax.persistence.criteria.QueryBuilder;
+import javax.persistence.metamodel.Metamodel;
+
/**
* Interface used to interact with the persistence context.
- *
- * An EntityManager instance is associated with a persistence context. A persistence context is a set of
- * entity instances in which for any persistent entity identity there is a unique entity instance.
- * Within the persistence context, the entity instances and their lifecycle are managed. This interface
- * defines the methods that are used to interact with the persistence context. The EntityManager API is
- * used to create and remove persistent entity instances, to find entities by their primary key, and to
- * query over entities.
- *
- * The set of entities that can be managed by a given EntityManager instance is defined by a persistence unit.
- * A persistence unit defines the set of all classes that are related or grouped by the application, and
- * which must be colocated in their mapping to a single database.
- *
- * @author Emmanuel Bernard
*/
public interface EntityManager {
/**
- * Make an entity instance managed and persistent.
+ * Make an instance managed and persistent.
*
* @param entity
+ *
* @throws EntityExistsException if the entity already exists.
- * (The EntityExistsException may be thrown when the persist
- * operation is invoked, or the EntityExistsException or
- * another PersistenceException may be thrown at commit
- * time.)
- * @throws IllegalStateException if this EntityManager has been closed.
- * @throws IllegalArgumentException if not an entity
+ * (If the entity already exists, the EntityExistsException may
+ * be thrown when the persist operation is invoked, or the
+ * EntityExistsException or another PersistenceException may be
+ * thrown at flush or commit time.)
+ * @throws IllegalArgumentException if the instance is not an
+ * entity
* @throws TransactionRequiredException if invoked on a
* container-managed entity manager of type
* PersistenceContextType.TRANSACTION and there is
@@ -41,8 +35,9 @@
* current persistence context.
*
* @param entity
- * @return the instance that the state was merged to
- * @throws IllegalStateException if this EntityManager has been closed
+ *
+ * @return the managed instance that the state was merged to
+ *
* @throws IllegalArgumentException if instance is not an
* entity or is a removed entity
* @throws TransactionRequiredException if invoked on a
@@ -56,9 +51,9 @@
* Remove the entity instance.
*
* @param entity
- * @throws IllegalStateException if this EntityManager has been closed
- * @throws IllegalArgumentException if not an entity
- * or if a detached entity
+ *
+ * @throws IllegalArgumentException if the instance is not an
+ * entity or is a detached entity
* @throws TransactionRequiredException if invoked on a
* container-managed entity manager of type
* PersistenceContextType.TRANSACTION and there is
@@ -68,20 +63,143 @@
/**
* Find by primary key.
+ * Search for an entity of the specified class and primary key.
+ * If the entity instance is contained in the persistence context
+ * it is returned from there.
*
* @param entityClass
* @param primaryKey
+ *
* @return the found entity instance or null
* if the entity does not exist
- * @throws IllegalStateException if this EntityManager has been closed
+ *
* @throws IllegalArgumentException if the first argument does
- * not denote an entity type or the second
- * argument is not a valid type for that
- * entity’s primary key
+ * not denote an entity type or the second argument is
+ * is not a valid type for that entity�s primary key or
+ * is null
*/
public <T> T find(Class<T> entityClass, Object primaryKey);
/**
+ * Find by primary key, using the specified properties.
+ * Search for an entity of the specified class and primary key.
+ * If the entity instance is contained in the persistence context
+ * it is returned from there.
+ * If a vendor-specific property or hint is not recognized,
+ * it is silently ignored.
+ *
+ * @param entityClass
+ * @param primaryKey
+ * @param properties standard and vendor-specific properties
+ *
+ * @return the found entity instance or null
+ * if the entity does not exist
+ *
+ * @throws IllegalArgumentException if the first argument does
+ * not denote an entity type or the second argument is
+ * is not a valid type for that entity�s primary key or
+ * is null
+ */
+ public <T> T find(Class<T> entityClass, Object primaryKey,
+ Map<String, Object> properties);
+
+ /**
+ * Find by primary key and lock.
+ * Search for an entity of the specified class and primary key
+ * and lock it with respect to the specified lock type.
+ * If the entity instance is contained in the persistence context
+ * it is returned from there, and the effect of this method is
+ * the same as if the lock method had been called on the entity.
+ * If the entity is found within the persistence context and the
+ * lock mode type is pessimistic and the entity has a version
+ * attribute, the persistence provider must perform optimistic
+ * version checks when obtaining the database lock. If these
+ * checks fail, the OptimisticLockException will be thrown.
+ * If the lock mode type is pessimistic and the entity instance
+ * is found but cannot be locked:
+ * - the PessimisticLockException will be thrown if the database
+ * locking failure causes transaction-level rollback.
+ * - the LockTimeoutException will be thrown if the database
+ * locking failure causes only statement-level rollback
+ *
+ * @param entityClass
+ * @param primaryKey
+ * @param lockMode
+ *
+ * @return the found entity instance or null if the entity does
+ * not exist
+ *
+ * @throws IllegalArgumentException if the first argument does
+ * not denote an entity type or the second argument is
+ * not a valid type for that entity's primary key or
+ * is null
+ * @throws TransactionRequiredException if there is no
+ * transaction and a lock mode other than NONE is set
+ * @throws OptimisticLockException if the optimistic version
+ * check fails
+ * @throws PessimisticLockException if pessimistic locking
+ * fails and the transaction is rolled back
+ * @throws LockTimeoutException if pessimistic locking fails and
+ * only the statement is rolled back
+ * @throws PersistenceException if an unsupported lock call
+ * is made
+ */
+ public <T> T find(Class<T> entityClass, Object primaryKey,
+ LockModeType lockMode);
+
+ /**
+ * Find by primary key and lock, using the specified properties.
+ * Search for an entity of the specified class and primary key
+ * and lock it with respect to the specified lock type.
+ * If the entity instance is contained in the persistence context
+ * it is returned from there. If the entity is found
+ * within the persistence context and the lock mode type
+ * is pessimistic and the entity has a version attribute, the
+ * persistence provider must perform optimistic version checks
+ * when obtaining the database lock. If these checks fail,
+ * the OptimisticLockException will be thrown.
+ * If the lock mode type is pessimistic and the entity instance
+ * is found but cannot be locked:
+ * - the PessimisticLockException will be thrown if the database
+ * locking failure causes transaction-level rollback.
+ * - the LockTimeoutException will be thrown if the database
+ * locking failure causes only statement-level rollback
+ * If a vendor-specific property or hint is not recognized,
+ * it is silently ignored.
+ * Portable applications should not rely on the standard timeout
+ * hint. Depending on the database in use and the locking
+ * mechanisms used by the provider, the hint may or may not
+ * be observed.
+ *
+ * @param entityClass
+ * @param primaryKey
+ * @param lockMode
+ * @param properties standard and vendor-specific properties
+ * and hints
+ *
+ * @return the found entity instance or null if the entity does
+ * not exist
+ *
+ * @throws IllegalArgumentException if the first argument does
+ * not denote an entity type or the second argument is
+ * not a valid type for that entity's primary key or
+ * is null
+ * @throws TransactionRequiredException if there is no
+ * transaction and a lock mode other than NONE is set
+ * @throws OptimisticLockException if the optimistic version
+ * check fails
+ * @throws PessimisticLockException if pessimistic locking
+ * fails and the transaction is rolled back
+ * @throws LockTimeoutException if pessimistic locking fails and
+ * only the statement is rolled back
+ * @throws PersistenceException if an unsupported lock call
+ * is made
+ */
+ public <T> T find(Class<T> entityClass, Object primaryKey,
+ LockModeType lockMode,
+ Map<String, Object> properties);
+
+ /**
* Get an instance, whose state may be lazily fetched.
* If the requested instance does not exist in the database,
* the EntityNotFoundException is thrown when the instance
@@ -94,22 +212,23 @@
*
* @param entityClass
* @param primaryKey
+ *
* @return the found entity instance
- * @throws IllegalStateException if this EntityManager has been closed
+ *
* @throws IllegalArgumentException if the first argument does
- * not denote an entity type or the second
- * argument is not a valid type for that
- * entity’s primary key
+ * not denote an entity type or the second argument is
+ * not a valid type for that entity�s primary key or
+ * is null
* @throws EntityNotFoundException if the entity state
* cannot be accessed
*/
- public <T> T getReference(Class<T> entityClass, Object primaryKey);
+ public <T> T getReference(Class<T> entityClass,
+ Object primaryKey);
/**
* Synchronize the persistence context to the
* underlying database.
*
- * @throws IllegalStateException if this EntityManager has been closed
* @throws TransactionRequiredException if there is
* no transaction
* @throws PersistenceException if the flush fails
@@ -121,7 +240,6 @@
* in the persistence context.
*
* @param flushMode
- * @throws IllegalStateException if this EntityManager has been closed
*/
public void setFlushMode(FlushModeType flushMode);
@@ -130,34 +248,99 @@
* in the persistence context.
*
* @return flushMode
- * @throws IllegalStateException if this EntityManager has been closed
*/
public FlushModeType getFlushMode();
/**
- * Set the lock mode for an entity object contained
- * in the persistence context.
+ * Lock an entity instance that is contained in the persistence
+ * context with the specified lock mode type.
+ * If a pessimistic lock mode type is specified and the entity
+ * contains a version attribute, the persistence provider must
+ * also perform optimistic version checks when obtaining the
+ * database lock. If these checks fail, the
+ * OptimisticLockException will be thrown.
+ * If the lock mode type is pessimistic and the entity instance
+ * is found but cannot be locked:
+ * - the PessimisticLockException will be thrown if the database
+ * locking failure causes transaction-level rollback.
+ * - the LockTimeoutException will be thrown if the database
+ * locking failure causes only statement-level rollback
*
* @param entity
* @param lockMode
- * @throws IllegalStateException if this EntityManager has been closed
+ *
+ * @throws IllegalArgumentException if the instance is not an
+ * entity or is a detached entity
+ * @throws TransactionRequiredException if there is no
+ * transaction
+ * @throws EntityNotFoundException if the entity does not exist
+ * in the database when pessimistic locking is
+ * performed
+ * @throws OptimisticLockException if the optimistic version
+ * check fails
+ * @throws PessimisticLockException if pessimistic locking fails
+ * and the transaction is rolled back
+ * @throws LockTimeoutException if pessimistic locking fails and
+ * only the statement is rolled back
* @throws PersistenceException if an unsupported lock call
* is made
- * @throws IllegalArgumentException if the instance is not
- * an entity or is a detached entity
+ */
+ public void lock(Object entity, LockModeType lockMode);
+
+ /**
+ * Lock an entity instance that is contained in the persistence
+ * context with the specified lock mode type and with specified
+ * properties.
+ * If a pessimistic lock mode type is specified and the entity
+ * contains a version attribute, the persistence provider must
+ * also perform optimistic version checks when obtaining the
+ * database lock. If these checks fail, the
+ * OptimisticLockException will be thrown.
+ * If the lock mode type is pessimistic and the entity instance
+ * is found but cannot be locked:
+ * - the PessimisticLockException will be thrown if the database
+ * locking failure causes transaction-level rollback.
+ * - the LockTimeoutException will be thrown if the database
+ * locking failure causes only statement-level rollback
+ * If a vendor-specific property or hint is not recognized,
+ * it is silently ignored.
+ * Portable applications should not rely on the standard timeout
+ * hint. Depending on the database in use and the locking
+ * mechanisms used by the provider, the hint may or may not
+ * be observed.
+ *
+ * @param entity
+ * @param lockMode
+ * @param properties standard and vendor-specific properties
+ * and hints
+ *
+ * @throws IllegalArgumentException if the instance is not an
+ * entity or is a detached entity
* @throws TransactionRequiredException if there is no
* transaction
+ * @throws EntityNotFoundException if the entity does not exist
+ * in the database when pessimistic locking is
+ * performed
+ * @throws OptimisticLockException if the optimistic version
+ * check fails
+ * @throws PessimisticLockException if pessimistic locking fails
+ * and the transaction is rolled back
+ * @throws LockTimeoutException if pessimistic locking fails and
+ * only the statement is rolled back
+ * @throws PersistenceException if an unsupported lock call
+ * is made
*/
- public void lock(Object entity, LockModeType lockMode);
+ public void lock(Object entity, LockModeType lockMode,
+ Map<String, Object> properties);
/**
* Refresh the state of the instance from the database,
* overwriting changes made to the entity, if any.
*
* @param entity
- * @throws IllegalStateException if this EntityManager has been closed
- * @throws IllegalArgumentException if not an entity
- * or entity is not managed
+ *
+ * @throws IllegalArgumentException if the instance is not
+ * an entity or the entity is not managed
* @throws TransactionRequiredException if invoked on a
* container-managed entity manager of type
* PersistenceContextType.TRANSACTION and there is
@@ -168,46 +351,218 @@
public void refresh(Object entity);
/**
+ * Refresh the state of the instance from the database, using
+ * the specified properties, and overwriting changes made to
+ * the entity, if any.
+ * If a vendor-specific property or hint is not recognized,
+ * it is silently ignored.
+ *
+ * @param entity
+ * @param properties standard and vendor-specific properties
+ *
+ * @throws IllegalArgumentException if the instance is not
+ * an entity or the entity is not managed
+ * @throws TransactionRequiredException if invoked on a
+ * container-managed entity manager of type
+ * PersistenceContextType.TRANSACTION and there is
+ * no transaction.
+ * @throws EntityNotFoundException if the entity no longer
+ * exists in the database
+ */
+ public void refresh(Object entity,
+ Map<String, Object> properties);
+
+ /**
+ * Refresh the state of the instance from the database,
+ * overwriting changes made to the entity, if any, and
+ * lock it with respect to given lock mode type.
+ * If the lock mode type is pessimistic and the entity instance
+ * is found but cannot be locked:
+ * - the PessimisticLockException will be thrown if the database
+ * locking failure causes transaction-level rollback.
+ * - the LockTimeoutException will be thrown if the
+ * database locking failure causes only statement-level
+ * rollback.
+ *
+ * @param entity
+ * @param lockMode
+ *
+ * @throws IllegalArgumentException if the instance is not
+ * an entity or the entity is not managed
+ * @throws TransactionRequiredException if there is no
+ * transaction
+ * @throws EntityNotFoundException if the entity no longer exists
+ * in the database
+ * @throws PessimisticLockException if pessimistic locking fails
+ * and the transaction is rolled back
+ * @throws LockTimeoutException if pessimistic locking fails and
+ * only the statement is rolled back
+ * @throws PersistenceException if an unsupported lock call
+ * is made
+ */
+ public void refresh(Object entity, LockModeType lockMode);
+
+ /**
+ * Refresh the state of the instance from the database,
+ * overwriting changes made to the entity, if any, and
+ * lock it with respect to given lock mode type and with
+ * specified properties.
+ * If the lock mode type is pessimistic and the entity instance
+ * is found but cannot be locked:
+ * - the PessimisticLockException will be thrown if the database
+ * locking failure causes transaction-level rollback.
+ * - the LockTimeoutException will be thrown if the database
+ * locking failure causes only statement-level rollback
+ * If a vendor-specific property or hint is not recognized,
+ * it is silently ignored.
+ * Portable applications should not rely on the standard timeout
+ * hint. Depending on the database in use and the locking
+ * mechanisms used by the provider, the hint may or may not
+ * be observed.
+ *
+ * @param entity
+ * @param lockMode
+ * @param properties standard and vendor-specific properties
+ * and hints
+ *
+ * @throws IllegalArgumentException if the instance is not
+ * an entity or the entity is not managed
+ * @throws TransactionRequiredException if there is no
+ * transaction
+ * @throws EntityNotFoundException if the entity no longer exists
+ * in the database
+ * @throws PessimisticLockException if pessimistic locking fails
+ * and the transaction is rolled back
+ * @throws LockTimeoutException if pessimistic locking fails and
+ * only the statement is rolled back
+ * @throws PersistenceException if an unsupported lock call
+ * is made
+ */
+ public void refresh(Object entity, LockModeType lockMode,
+ Map<String, Object> properties);
+
+ /**
* Clear the persistence context, causing all managed
* entities to become detached. Changes made to entities that
* have not been flushed to the database will not be
* persisted.
- *
- * @throws IllegalStateException if this EntityManager has been closed
*/
public void clear();
/**
- * Check if the instance belongs to the current persistence
- * context.
+ * Remove the given entity from the persistence context, causing
+ * a managed entity to become detached. Unflushed changes made
+ * to the entity if any (including removal of the entity),
+ * will not be synchronized to the database. Entities which
+ * previously referenced the detached entity will continue to
+ * reference it.
*
* @param entity
- * @return <code>true</code> if the instance belongs to the current persistence context.
- * @throws IllegalStateException if this EntityManager has been closed
+ *
+ * @throws IllegalArgumentException if the instance is not an
+ * entity
+ */
+ public void detach(Object entity);
+
+ /**
+ * Check if the instance is a managed entity instance belonging
+ * to the current persistence context.
+ *
+ * @param entity
+ *
+ * @return
+ *
* @throws IllegalArgumentException if not an entity
*/
public boolean contains(Object entity);
/**
- * Create an instance of Query for executing an
- * EJB QL statement.
+ * Get the current lock mode for the entity instance.
*
- * @param ejbqlString an EJB QL query string
+ * @param entity
+ *
+ * @return lock mode
+ *
+ * @throws TransactionRequiredException if there is no
+ * transaction
+ * @throws IllegalArgumentException if the instance is not a
+ * managed entity and a transaction is active
+ */
+ public LockModeType getLockMode(Object entity);
+
+ /**
+ * Set an entity manager property.
+ * If a vendor-specific property is not recognized, it is
+ * silently ignored.
+ *
+ * @param propertyName
+ * @param value
+ *
+ * @throws IllegalArgumentException if the second argument is not
+ * valid for the implementation
+ */
+ public void setProperty(String propertyName, Object value);
+
+ /**
+ * Get the properties and associated values that are in effect
+ * for the entity manager. Changing the contents of the map does
+ * not change the configuration in effect.
+ */
+ public Map<String, Object> getProperties();
+
+ /**
+ * Get the names of the properties that are supported for use
+ * with the entity manager.
+ * These correspond to properties and hints that may be passed
+ * to the methods of the EntityManager interface that take a
+ * properties argument or used with the PersistenceContext
+ * annotation. These properties include all standard entity
+ * manager hints and properties as well as vendor-specific ones
+ * supported by the provider. These properties may or may not
+ * currently be in effect.
+ *
+ * @return property names
+ */
+ public Set<String> getSupportedProperties();
+
+ /**
+ * Create an instance of Query for executing a
+ * Java Persistence query language statement.
+ *
+ * @param qlString a Java Persistence query string
+ *
* @return the new query instance
- * @throws IllegalStateException if this EntityManager has been closed
- * @throws IllegalArgumentException if query string is not valid
+ *
+ * @throws IllegalArgumentException if the query string is found
+ * to be invalid
*/
- public Query createQuery(String ejbqlString);
+ public Query createQuery(String qlString);
/**
* Create an instance of Query for executing a
- * named query (in EJB QL or native SQL).
+ * criteria query.
*
+ * @param criteriaQuery a Criteria API query definition object
+ *
+ * @return the new query instance
+ *
+ * @throws IllegalArgumentException if the query definition is
+ * found to be invalid
+ */
+ public Query createQuery(CriteriaQuery criteriaQuery);
+
+ /**
+ * Create an instance of Query for executing a
+ * named query (in the Java Persistence query language
+ * or in native SQL).
+ *
* @param name the name of a query defined in metadata
+ *
* @return the new query instance
- * @throws IllegalStateException if this EntityManager has been closed
+ *
* @throws IllegalArgumentException if a query has not been
- * defined with the given name
+ * defined with the given name or if the query string is
+ * found to be invalid
*/
public Query createNamedQuery(String name);
@@ -216,8 +571,8 @@
* a native SQL statement, e.g., for update or delete.
*
* @param sqlString a native SQL query string
+ *
* @return the new query instance
- * @throws IllegalStateException if this EntityManager has been closed
*/
public Query createNativeQuery(String sqlString);
@@ -225,23 +580,25 @@
* Create an instance of Query for executing
* a native SQL query.
*
- * @param sqlString a native SQL query string
+ * @param sqlString a native SQL query string
* @param resultClass the class of the resulting instance(s)
+ *
* @return the new query instance
- * @throws IllegalStateException if this EntityManager has been closed
*/
- public Query createNativeQuery(String sqlString, Class resultClass);
+ public Query createNativeQuery(String sqlString,
+ Class resultClass);
/**
* Create an instance of Query for executing
* a native SQL query.
*
- * @param sqlString a native SQL query string
+ * @param sqlString a native SQL query string
* @param resultSetMapping the name of the result set mapping
+ *
* @return the new query instance
- * @throws IllegalStateException if this EntityManager has been closed
*/
- public Query createNativeQuery(String sqlString, String resultSetMapping);
+ public Query createNativeQuery(String sqlString,
+ String resultSetMapping);
/**
* Indicate to the EntityManager that a JTA transaction is
@@ -250,31 +607,48 @@
* of the active transaction to associate it with the current
* JTA transaction.
*
- * @throws IllegalStateException if this EntityManager has been closed
* @throws TransactionRequiredException if there is
* no transaction.
*/
public void joinTransaction();
- /**
- * Return the underlying provider object for the EntityManager, if available.
- * The result of this method is implementation specific
- *
- * @throws IllegalStateException if this EntityManager has been closed
- */
- public Object getDelegate();
+ /**
+ * Return an object of the specified type to allow access to the
+ * provider-specific API. If the provider's EntityManager
+ * implementation does not support the specified class, the
+ * PersistenceException is thrown.
+ *
+ * @param cls the class of the object to be returned. This is
+ * normally either the underlying EntityManager implementation
+ * class or an interface that it implements.
+ *
+ * @return an instance of the specified class
+ *
+ * @throws PersistenceException if the provider does not
+ * support the call.
+ */
+ public <T> T unwrap(Class<T> cls);
- /**
+ /**
+ * Return the underlying provider object for the EntityManager,
+ * if available. The result of this method is implementation
+ * specific. The unwrap method is to be preferred for new
+ * applications.
+ * /
+ * public Object getDelegate();
+ * /**
* Close an application-managed EntityManager.
* After the close method has been invoked, all methods
* on the EntityManager instance and any Query objects obtained
* from it will throw the IllegalStateException except
- * for getTransaction and isOpen (which will return false).
+ * for getProperties, getSupportedProperties, getTransaction,
+ * and isOpen (which will return false).
* If this method is called when the EntityManager is
* associated with an active transaction, the persistence
* context remains managed until the transaction completes.
*
- * @throws IllegalStateException if the EntityManager is container-managed or has been already closed
+ * @throws IllegalStateException if the EntityManager
+ * is container-managed.
*/
public void close();
@@ -291,8 +665,41 @@
* begin and commit multiple transactions.
*
* @return EntityTransaction instance
+ *
* @throws IllegalStateException if invoked on a JTA
* EntityManager.
*/
public EntityTransaction getTransaction();
+
+ /**
+ * Return the entity manager factory for the entity manager.
+ *
+ * @return EntityManagerFactory instance
+ *
+ * @throws IllegalStateException if the entity manager has
+ * been closed.
+ */
+ public EntityManagerFactory getEntityManagerFactory();
+
+ /**
+ * Return an instance of QueryBuilder for the creation of
+ * Criteria API Query objects.
+ *
+ * @return QueryBuilder instance
+ *
+ * @throws IllegalStateException if the entity manager has
+ * been closed.
+ */
+ public QueryBuilder getQueryBuilder();
+
+ /**
+ * Return an instance of Metamodel interface for access to the
+ * metamodel of the persistence unit.
+ *
+ * @return Metamodel instance
+ *
+ * @throws IllegalStateException if the entity manager has
+ * been closed.
+ */
+ public Metamodel getMetamodel();
}
\ No newline at end of file
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/EntityManager.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/EntityManagerFactory.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/EntityManagerFactory.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/EntityManagerFactory.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,26 +1,25 @@
-//$Id: EntityManagerFactory.java 11171 2007-02-08 03:40:51Z epbernard $
+//$Id$
package javax.persistence;
import java.util.Map;
+import java.util.Set;
+import javax.persistence.criteria.QueryBuilder;
+import javax.persistence.metamodel.Metamodel;
/**
- * The EntityManagerFactory interface is used by the application to obtain an
- * application-managed entity manager. When the application has finished using
- * the entity manager factory, and/or at application shutdown, the application
- * should close the entity manager factory. Once an EntityManagerFactory has been
- * closed, all its entity managers are considered to be in the closed state.
- *
- * @author Emmanuel Bernard
+ * Interface used to interact with the entity manager factory * for the persistence unit.
*/
public interface EntityManagerFactory {
-
/**
* Create a new EntityManager.
* This method returns a new EntityManager instance each time
* it is invoked.
* The isOpen method will return true on the returned instance.
+ *
+ * @throws IllegalStateException if the entity manager factory
+ * has been closed.
*/
- EntityManager createEntityManager();
+ public EntityManager createEntityManager();
/**
* Create a new EntityManager with the specified Map of
@@ -28,22 +27,83 @@
* This method returns a new EntityManager instance each time
* it is invoked.
* The isOpen method will return true on the returned instance.
+ *
+ * @throws IllegalStateException if the entity manager factory
+ * has been closed.
*/
- EntityManager createEntityManager(Map map);
+ public EntityManager createEntityManager(Map map);
/**
+ * Return an instance of QueryBuilder for the creation of
+ * Criteria API objects.
+ *
+ * @return QueryBuilder instance
+ *
+ * @throws IllegalStateException if the entity manager factory
+ * has been closed.
+ */
+ public QueryBuilder getQueryBuilder();
+
+ /**
+ * Return an instance of Metamodel interface for access to the
+ * metamodel of the persistence unit.
+ *
+ * @return Metamodel instance
+ *
+ * @throws IllegalStateException if the entity manager has
+ * been closed.
+ */
+ public Metamodel getMetamodel();
+
+ /**
+ * Indicates whether the factory is open. Returns true
+ * until the factory has been closed.
+ */
+ public boolean isOpen();
+
+ /**
* Close the factory, releasing any resources that it holds.
* After a factory instance is closed, all methods invoked on
* it will throw an IllegalStateException, except for isOpen,
* which will return false. Once an EntityManagerFactory has
* been closed, all its entity managers are considered to be
* in the closed state.
+ *
+ * @throws IllegalStateException if the entity manager factory
+ * has been closed.
*/
- void close();
+ public void close();
/**
- * Indicates whether or not this factory is open. Returns
- * true until a call to close has been made.
+ * Get the properties and associated values that are in effect
+ * for the entity manager factory. Changing the contents of the
+ * map does not change the configuration in effect.
+ *
+ * @return properties
*/
- public boolean isOpen();
+ public Map<String, Object> getProperties();
+
+ /**
+ * Get the names of the properties that are supported for use
+ * with the entity manager factory. These correspond to
+ * properties that may be passed to the methods of the
+ * EntityManagerFactory interface that take a properties
+ * argument. These include all standard properties as well as
+ * vendor-specific properties supported by the provider. These
+ * properties may or may not currently be in effect.
+ *
+ * @return properties and hints
+ */
+ public Set<String> getSupportedProperties();
+
+ /**
+ * Access the cache that is associated with the entity manager
+ * factory (the "second level cache").
+ *
+ * @return instance of the Cache interface
+ *
+ * @throws IllegalStateException if the entity manager factory
+ * has been closed.
+ */
+ public Cache getCache();
}
\ No newline at end of file
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/EntityManagerFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/EntityNotFoundException.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/EntityNotFoundException.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/EntityNotFoundException.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id: EntityNotFoundException.java 11171 2007-02-08 03:40:51Z epbernard $
+//$Id$
package javax.persistence;
/**
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/EntityNotFoundException.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/EntityResult.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/EntityResult.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/EntityResult.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id: EntityResult.java 11171 2007-02-08 03:40:51Z epbernard $
+//$Id$
//EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc.
package javax.persistence;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/EntityResult.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/EntityTransaction.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/EntityTransaction.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/EntityTransaction.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id: EntityTransaction.java 11171 2007-02-08 03:40:51Z epbernard $
+//$Id$
package javax.persistence;
/**
@@ -53,8 +53,9 @@
/**
* Indicate whether a transaction is in progress.
+ *
* @throws PersistenceException if an unexpected error
- * condition is encountered.
+ * condition is encountered.
*/
public boolean isActive();
}
\ No newline at end of file
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/EntityTransaction.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/EnumType.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/EnumType.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/EnumType.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id: EnumType.java 11171 2007-02-08 03:40:51Z epbernard $
+//$Id$
package javax.persistence;
/**
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/EnumType.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/Enumerated.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/Enumerated.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/Enumerated.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id: Enumerated.java 11171 2007-02-08 03:40:51Z epbernard $
+//$Id$
package javax.persistence;
import java.lang.annotation.Retention;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/Enumerated.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/ExcludeDefaultListeners.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/ExcludeDefaultListeners.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/ExcludeDefaultListeners.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id: ExcludeDefaultListeners.java 11171 2007-02-08 03:40:51Z epbernard $
+//$Id$
package javax.persistence;
import static java.lang.annotation.ElementType.TYPE;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/ExcludeDefaultListeners.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/ExcludeSuperclassListeners.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/ExcludeSuperclassListeners.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/ExcludeSuperclassListeners.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id: ExcludeSuperclassListeners.java 11171 2007-02-08 03:40:51Z epbernard $
+//$Id$
package javax.persistence;
import java.lang.annotation.Target;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/ExcludeSuperclassListeners.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/FetchType.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/FetchType.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/FetchType.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id: FetchType.java 11171 2007-02-08 03:40:51Z epbernard $
+//$Id$
//EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc.
package javax.persistence;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/FetchType.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/FieldResult.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/FieldResult.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/FieldResult.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id: FieldResult.java 11171 2007-02-08 03:40:51Z epbernard $
+//$Id$
//EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc.
package javax.persistence;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/FieldResult.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/FlushModeType.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/FlushModeType.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/FlushModeType.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id: FlushModeType.java 11171 2007-02-08 03:40:51Z epbernard $
+//$Id$
package javax.persistence;
/**
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/FlushModeType.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/GeneratedValue.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/GeneratedValue.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/GeneratedValue.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id: GeneratedValue.java 11171 2007-02-08 03:40:51Z epbernard $
+// $Id$
package javax.persistence;
import static java.lang.annotation.ElementType.FIELD;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/GeneratedValue.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/GenerationType.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/GenerationType.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/GenerationType.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id: GenerationType.java 11171 2007-02-08 03:40:51Z epbernard $
+//$Id$
//EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc.
package javax.persistence;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/GenerationType.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/Id.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/Id.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/Id.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id: Id.java 11171 2007-02-08 03:40:51Z epbernard $
+//$Id$
//EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc.
package javax.persistence;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/Id.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/IdClass.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/IdClass.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/IdClass.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id: IdClass.java 11171 2007-02-08 03:40:51Z epbernard $
+//$Id$
//EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc.
package javax.persistence;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/IdClass.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/Inheritance.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/Inheritance.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/Inheritance.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id: Inheritance.java 11171 2007-02-08 03:40:51Z epbernard $
+//$Id$
//EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc.
package javax.persistence;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/Inheritance.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/InheritanceType.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/InheritanceType.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/InheritanceType.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id: InheritanceType.java 11171 2007-02-08 03:40:51Z epbernard $
+//$Id$
//EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc.
package javax.persistence;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/InheritanceType.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/JoinColumn.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/JoinColumn.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/JoinColumn.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id: JoinColumn.java 11171 2007-02-08 03:40:51Z epbernard $
+//$Id$
//EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc.
package javax.persistence;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/JoinColumn.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/JoinColumns.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/JoinColumns.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/JoinColumns.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id: JoinColumns.java 11171 2007-02-08 03:40:51Z epbernard $
+//$Id$
//EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc.
package javax.persistence;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/JoinColumns.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/JoinTable.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/JoinTable.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/JoinTable.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id: JoinTable.java 11171 2007-02-08 03:40:51Z epbernard $
+//$Id$
//EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc.
package javax.persistence;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/JoinTable.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/Lob.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/Lob.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/Lob.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id: Lob.java 11171 2007-02-08 03:40:51Z epbernard $
+//$Id$
//EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc.
package javax.persistence;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/Lob.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/LockModeType.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/LockModeType.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/LockModeType.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,27 +1,27 @@
-//$Id: LockModeType.java 11171 2007-02-08 03:40:51Z epbernard $
+//$Id$
package javax.persistence;
/**
* Lock modes that can be specified by means of the EntityManager.lock() method.
- *
+ * <p/>
* The semantics of requesting locks of type LockModeType.READ and LockModeType.WRITE are t
* he following.
- *
+ * <p/>
* If transaction T1 calls lock(entity, LockModeType.READ) on a versioned object, the entity
* manager must ensure that neither of the following phenomena can occur:
- *
+ * <p/>
* * P1 (Dirty read): Transaction T1 modifies a row. Another transaction T2 then reads
* that row and obtains the modified value, before T1 has committed or rolled back.
* Transaction T2 eventually commits successfully; it does not matter whether T1 commits or rolls
* back and whether it does so before or after T2 commits.
- *
+ * <p/>
* * P2 (Non-repeatable read): Transaction T1 reads a row. Another transaction T2 then modifies
* or deletes that row, before T1 has committed. Both transactions eventually commit successfully.
- *
+ * <p/>
* Lock modes must always prevent the phenomena P1 and P2.
* In addition, calling lock(entity, LockModeType.WRITE) on a versioned object,
* will also force an update (increment) to the entity's version column.
- *
+ * <p/>
* The persistence implementation is not required to support calling EntityManager.lock()
* on a non-versioned object. When it cannot support a such lock call, it must
* throw the PersistenceException.
@@ -33,8 +33,21 @@
* Read lock
*/
READ,
+
/**
* Write lock
*/
- WRITE
+ WRITE,
+
+ OPTIMISTIC,
+
+ OPTIMISTIC_FORCE_INCREMENT,
+
+ PESSIMISTIC_READ,
+
+ PESSIMISTIC_WRITE,
+
+ PESSIMISTIC_FORCE_INCREMENT,
+
+ NONE
}
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/LockModeType.java
___________________________________________________________________
Name: svn:keywords
+ Id
Added: jpa-api/trunk/src/main/java/javax/persistence/LockTimeoutException.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/LockTimeoutException.java (rev 0)
+++ jpa-api/trunk/src/main/java/javax/persistence/LockTimeoutException.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -0,0 +1,24 @@
+// $Id$
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package javax.persistence;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class LockTimeoutException extends RuntimeException {
+}
\ No newline at end of file
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/LockTimeoutException.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/ManyToMany.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/ManyToMany.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/ManyToMany.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id: ManyToMany.java 11171 2007-02-08 03:40:51Z epbernard $
+//$Id$
//EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc.
package javax.persistence;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/ManyToMany.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/ManyToOne.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/ManyToOne.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/ManyToOne.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id: ManyToOne.java 11171 2007-02-08 03:40:51Z epbernard $
+//$Id$
//EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc.
package javax.persistence;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/ManyToOne.java
___________________________________________________________________
Name: svn:keywords
+ Id
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/MapKey.java
___________________________________________________________________
Name: svn:keywords
+ Id
Added: jpa-api/trunk/src/main/java/javax/persistence/MapKeyClass.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/MapKeyClass.java (rev 0)
+++ jpa-api/trunk/src/main/java/javax/persistence/MapKeyClass.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -0,0 +1,33 @@
+// $Id$
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package javax.persistence;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+/**
+ * @author Hardy Ferentschik
+ */
+@Target({ METHOD, FIELD })
+@Retention(RUNTIME)
+public @interface MapKeyClass {
+ Class value();
+}
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/MapKeyClass.java
___________________________________________________________________
Name: svn:keywords
+ Id
Added: jpa-api/trunk/src/main/java/javax/persistence/MapKeyColumn.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/MapKeyColumn.java (rev 0)
+++ jpa-api/trunk/src/main/java/javax/persistence/MapKeyColumn.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -0,0 +1,51 @@
+// $Id$
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package javax.persistence;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+/**
+ * @author Hardy Ferentschik
+ */
+@Target({ METHOD, FIELD })
+@Retention(RUNTIME)
+public @interface MapKeyColumn {
+ String name() default "";
+
+ boolean unique() default false;
+
+ boolean nullable() default false;
+
+ boolean insertable() default true;
+
+ boolean updatable() default true;
+
+ String columnDefinition() default "";
+
+ String table() default "";
+
+ int length() default 255;
+
+ int precision() default 0; // decimal precision
+
+ int scale() default 0; // decimal scale
+}
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/MapKeyColumn.java
___________________________________________________________________
Name: svn:keywords
+ Id
Added: jpa-api/trunk/src/main/java/javax/persistence/MapKeyJoinColumn.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/MapKeyJoinColumn.java (rev 0)
+++ jpa-api/trunk/src/main/java/javax/persistence/MapKeyJoinColumn.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -0,0 +1,47 @@
+// $Id$
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package javax.persistence;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+/**
+ * @author Hardy Ferentschik
+ */
+@Target({ METHOD, FIELD })
+@Retention(RUNTIME)
+public @interface MapKeyJoinColumn {
+ String name() default "";
+
+ String referencedColumnName() default "";
+
+ boolean unique() default false;
+
+ boolean nullable() default false;
+
+ boolean insertable() default true;
+
+ boolean updatable() default true;
+
+ String columnDefinition() default "";
+
+ String table() default "";
+}
\ No newline at end of file
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/MapKeyJoinColumn.java
___________________________________________________________________
Name: svn:keywords
+ Id
Added: jpa-api/trunk/src/main/java/javax/persistence/MapKeyJoinColumns.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/MapKeyJoinColumns.java (rev 0)
+++ jpa-api/trunk/src/main/java/javax/persistence/MapKeyJoinColumns.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -0,0 +1,33 @@
+// $Id$
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package javax.persistence;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+/**
+ * @author Hardy Ferentschik
+ */
+@Target({ METHOD, FIELD })
+@Retention(RUNTIME)
+public @interface MapKeyJoinColumns {
+ MapKeyJoinColumn[] value();
+}
\ No newline at end of file
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/MapKeyJoinColumns.java
___________________________________________________________________
Name: svn:keywords
+ Id
Added: jpa-api/trunk/src/main/java/javax/persistence/MappedById.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/MappedById.java (rev 0)
+++ jpa-api/trunk/src/main/java/javax/persistence/MappedById.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -0,0 +1,33 @@
+// $Id$
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package javax.persistence;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+/**
+ * @author Hardy Ferentschik
+ */
+@Target({ METHOD, FIELD })
+@Retention(RUNTIME)
+public @interface MappedById {
+ String value() default "";
+}
\ No newline at end of file
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/MappedById.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/MappedSuperclass.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/MappedSuperclass.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/MappedSuperclass.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id: MappedSuperclass.java 11171 2007-02-08 03:40:51Z epbernard $
+//$Id$
//EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc.
package javax.persistence;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/MappedSuperclass.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/NamedNativeQueries.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/NamedNativeQueries.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/NamedNativeQueries.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id: NamedNativeQueries.java 11171 2007-02-08 03:40:51Z epbernard $
+//$Id$
//EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc.
package javax.persistence;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/NamedNativeQueries.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/NamedNativeQuery.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/NamedNativeQuery.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/NamedNativeQuery.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id: NamedNativeQuery.java 11171 2007-02-08 03:40:51Z epbernard $
+//$Id$
//EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc.
package javax.persistence;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/NamedNativeQuery.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/NamedQueries.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/NamedQueries.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/NamedQueries.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id: NamedQueries.java 11171 2007-02-08 03:40:51Z epbernard $
+//$Id$
//EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc.
package javax.persistence;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/NamedQueries.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/NamedQuery.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/NamedQuery.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/NamedQuery.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id: NamedQuery.java 11171 2007-02-08 03:40:51Z epbernard $
+//$Id$
//EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc.
package javax.persistence;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/NamedQuery.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/NoResultException.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/NoResultException.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/NoResultException.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id: NoResultException.java 11171 2007-02-08 03:40:51Z epbernard $
+//$Id$
package javax.persistence;
/**
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/NoResultException.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/NonUniqueResultException.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/NonUniqueResultException.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/NonUniqueResultException.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id: NonUniqueResultException.java 11171 2007-02-08 03:40:51Z epbernard $
+//$Id$
package javax.persistence;
/**
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/NonUniqueResultException.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/OneToMany.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/OneToMany.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/OneToMany.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id: OneToMany.java 11171 2007-02-08 03:40:51Z epbernard $
+//$Id$
//EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc.
package javax.persistence;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/OneToMany.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/OneToOne.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/OneToOne.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/OneToOne.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id: OneToOne.java 11171 2007-02-08 03:40:51Z epbernard $
+//$Id$
//EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc.
package javax.persistence;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/OneToOne.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/OptimisticLockException.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/OptimisticLockException.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/OptimisticLockException.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package javax.persistence;
/**
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/OptimisticLockException.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/OrderBy.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/OrderBy.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/OrderBy.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id: OrderBy.java 11171 2007-02-08 03:40:51Z epbernard $
+//$Id$
//EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc.
package javax.persistence;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/OrderBy.java
___________________________________________________________________
Name: svn:keywords
+ Id
Copied: jpa-api/trunk/src/main/java/javax/persistence/OrderColumn.java (from rev 16126, jpa-api/trunk/src/main/java/javax/persistence/OrderBy.java)
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/OrderColumn.java (rev 0)
+++ jpa-api/trunk/src/main/java/javax/persistence/OrderColumn.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -0,0 +1,30 @@
+//$Id$
+//EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc.
+package javax.persistence;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+/**
+ * @author Hardy Ferentschik
+ */
+@Target({ METHOD, FIELD })
+@Retention(RUNTIME)
+public @interface OrderColumn {
+ String name() default "";
+
+ boolean nullable() default true;
+
+ boolean insertable() default true;
+
+ boolean updatable() default true;
+
+ String columnDefinition() default "";
+
+ int base() default 0;
+
+ String table() default "";
+}
\ No newline at end of file
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/OrderColumn.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/Persistence.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/Persistence.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/Persistence.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-// $Id: Persistence.java 11171 2007-02-08 03:40:51Z epbernard $
+// $Id$
package javax.persistence;
import java.io.BufferedReader;
@@ -27,6 +27,7 @@
* Create and return an EntityManagerFactory for the named persistence unit.
*
* @param persistenceUnitName The name of the persistence unit
+ *
* @return The factory that creates EntityManagers configured according to the specified persistence unit
*/
public static EntityManagerFactory createEntityManagerFactory(String persistenceUnitName) {
@@ -39,6 +40,7 @@
* @param persistenceUnitName The name of the persistence unit
* @param properties Additional properties to use when creating the factory. The values of these properties override
* any values that may have been configured elsewhere
+ *
* @return The factory that creates EntityManagers configured according to the specified persistence unit
*/
public static EntityManagerFactory createEntityManagerFactory(String persistenceUnitName, Map properties) {
@@ -49,7 +51,9 @@
}
for ( PersistenceProvider provider : providers ) {
emf = provider.createEntityManagerFactory( persistenceUnitName, properties );
- if ( emf != null ) break;
+ if ( emf != null ) {
+ break;
+ }
}
if ( emf == null ) {
throw new PersistenceException( "No Persistence provider for EntityManager named " + persistenceUnitName );
@@ -57,6 +61,14 @@
return emf;
}
+ /**
+ * Return the PersistenceUtil instance
+ */
+ public PersistenceUtil getPersistenceUtil() {
+ return null; //new PersistenceUtilImpl();
+ }
+
+
// Helper methods
private static void findAllProviders() {
@@ -76,19 +88,19 @@
}
for ( String s : names ) {
Class providerClass = loader.loadClass( s );
- providers.add( (PersistenceProvider) providerClass.newInstance() );
+ providers.add( ( PersistenceProvider ) providerClass.newInstance() );
}
}
- catch (IOException e) {
+ catch ( IOException e ) {
throw new PersistenceException( e );
}
- catch (InstantiationException e) {
+ catch ( InstantiationException e ) {
throw new PersistenceException( e );
}
- catch (IllegalAccessException e) {
+ catch ( IllegalAccessException e ) {
throw new PersistenceException( e );
}
- catch (ClassNotFoundException e) {
+ catch ( ClassNotFoundException e ) {
throw new PersistenceException( e );
}
}
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/Persistence.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/PersistenceContext.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/PersistenceContext.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/PersistenceContext.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-/* $Id: PersistenceContext.java 11171 2007-02-08 03:40:51Z epbernard $
+/* $Id$
* JBoss Inc
*
* Distributable under LGPL license.
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/PersistenceContext.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/PersistenceContextType.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/PersistenceContextType.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/PersistenceContextType.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id: PersistenceContextType.java 11171 2007-02-08 03:40:51Z epbernard $
+//$Id$
package javax.persistence;
/**
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/PersistenceContextType.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/PersistenceContexts.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/PersistenceContexts.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/PersistenceContexts.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-/* $Id: PersistenceContexts.java 11171 2007-02-08 03:40:51Z epbernard $
+/* $Id$
* JBoss Inc
*
* Distributable under LGPL license.
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/PersistenceContexts.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/PersistenceException.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/PersistenceException.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/PersistenceException.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-/* $Id: PersistenceException.java 11171 2007-02-08 03:40:51Z epbernard $
+/* $Id$
* JBoss, Inc
*
* Distributable under LGPL license.
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/PersistenceException.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/PersistenceProperty.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/PersistenceProperty.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/PersistenceProperty.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id: $
+// $Id$
package javax.persistence;
import java.lang.annotation.Retention;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/PersistenceProperty.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/PersistenceUnit.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/PersistenceUnit.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/PersistenceUnit.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-/* $Id: PersistenceUnit.java 11171 2007-02-08 03:40:51Z epbernard $
+/* $Id$
* JBoss Inc
*
* Distributable under LGPL license.
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/PersistenceUnit.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/PersistenceUnits.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/PersistenceUnits.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/PersistenceUnits.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-/* $Id: PersistenceUnits.java 11171 2007-02-08 03:40:51Z epbernard $
+/* $Id$
* JBoss Inc
*
* Distributable under LGPL license.
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/PersistenceUnits.java
___________________________________________________________________
Name: svn:keywords
+ Id
Added: jpa-api/trunk/src/main/java/javax/persistence/PersistenceUtil.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/PersistenceUtil.java (rev 0)
+++ jpa-api/trunk/src/main/java/javax/persistence/PersistenceUtil.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -0,0 +1,54 @@
+// $Id$
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package javax.persistence;
+
+/**
+ * @author Hardy Ferentschik
+ */
+
+/**
+ * Utility interface between the application and the persistence
+ * provider(s).
+ */
+public interface PersistenceUtil {
+ /**
+ * Determine the load state of a given persistent attribute
+ * regardless of the persistence provider that created the
+ * containing entity. * @param attributeName name of attribute whose load state is * to be determined
+ *
+ * @return false if entity's state has not been loaded or
+ * if the attribute state has not been loaded, otherwise true
+ */
+ public boolean isLoaded(Object entity, String attributeName);
+
+ /**
+ * Determine the load state of an entity regardless
+ * of the persistence provider that created it.
+ * This method can be used to determine the load state
+ * of an entity passed as a reference. An entity is
+ * considered loaded if all attributes for which FetchType
+ * EAGER has been specified have been loaded.
+ * The isLoaded(Object, String) method should be used to
+ * determine the load state of an attribute.
+ * Not doing so might lead to unintended loading of state.
+ *
+ * @return false if the entity has not be loaded, otherwise
+ * true.
+ */
+ public boolean isLoaded(Object object);
+}
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/PersistenceUtil.java
___________________________________________________________________
Name: svn:keywords
+ Id
Added: jpa-api/trunk/src/main/java/javax/persistence/PessimisticLockException.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/PessimisticLockException.java (rev 0)
+++ jpa-api/trunk/src/main/java/javax/persistence/PessimisticLockException.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -0,0 +1,24 @@
+// $Id$
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package javax.persistence;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class PessimisticLockException extends RuntimeException {
+}
\ No newline at end of file
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/PessimisticLockException.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/PostLoad.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/PostLoad.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/PostLoad.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-/* $Id: PostLoad.java 11171 2007-02-08 03:40:51Z epbernard $
+/* $Id$
* JBoss Inc
*
* Distributable under LGPL license.
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/PostLoad.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/PostPersist.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/PostPersist.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/PostPersist.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-/* $Id: PostPersist.java 11171 2007-02-08 03:40:51Z epbernard $
+/* $Id$
* JBoss Inc
*
* Distributable under LGPL license.
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/PostPersist.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/PostRemove.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/PostRemove.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/PostRemove.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-/* $Id: PostRemove.java 11171 2007-02-08 03:40:51Z epbernard $
+/* $Id$
* JBoss Inc
*
* Distributable under LGPL license.
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/PostRemove.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/PostUpdate.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/PostUpdate.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/PostUpdate.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-/* $Id: PostUpdate.java 11171 2007-02-08 03:40:51Z epbernard $
+/* $Id$
* JBoss Inc
*
* Distributable under LGPL license.
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/PostUpdate.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/PrePersist.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/PrePersist.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/PrePersist.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-/* $Id: PrePersist.java 11171 2007-02-08 03:40:51Z epbernard $
+/* $Id$
* JBoss Inc
*
* Distributable under LGPL license.
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/PrePersist.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/PreRemove.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/PreRemove.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/PreRemove.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-/* $Id: PreRemove.java 11171 2007-02-08 03:40:51Z epbernard $
+/* $Id$
* JBoss Inc
*
* Distributable under LGPL license.
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/PreRemove.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/PreUpdate.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/PreUpdate.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/PreUpdate.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-/* $Id: PreUpdate.java 11171 2007-02-08 03:40:51Z epbernard $
+/* $Id$
* JBoss Inc
*
* Distributable under LGPL license.
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/PreUpdate.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/PrimaryKeyJoinColumn.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/PrimaryKeyJoinColumn.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/PrimaryKeyJoinColumn.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id: PrimaryKeyJoinColumn.java 11171 2007-02-08 03:40:51Z epbernard $
+//$Id$
//EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc.
package javax.persistence;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/PrimaryKeyJoinColumn.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/PrimaryKeyJoinColumns.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/PrimaryKeyJoinColumns.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/PrimaryKeyJoinColumns.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id: PrimaryKeyJoinColumns.java 11171 2007-02-08 03:40:51Z epbernard $
+//$Id$
//EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc.
package javax.persistence;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/PrimaryKeyJoinColumns.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/Query.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/Query.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/Query.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,148 +1,313 @@
-// $Id: Query.java 11225 2007-02-20 20:55:29Z epbernard $
+// $Id$
package javax.persistence;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
+import java.util.Map;
+import java.util.Set;
-
/**
* Interface used to control query execution.
*/
-public interface Query
-{
- /**
- * Execute the query and return the query results as a List.
- *
- * @return a list of the results
- * @throws IllegalStateException f called for a Java Persistence query language UPDATE or DELETE statement
- */
- public List getResultList();
+public interface Query {
+ /**
+ * Execute a SELECT query and return the query results
+ * as a List.
+ *
+ * @return a list of the results
+ *
+ * @throws IllegalStateException if called for a Java
+ * Persistence query language UPDATE or DELETE statement
+ * @throws QueryTimeoutException if the query execution exceeds
+ * the query timeout value set
+ * @throws TransactionRequiredException if a lock mode has
+ * been set and there is no transaction
+ * @throws PessimisticLockException if pessimistic locking
+ * fails and the transaction is rolled back
+ * @throws LockTimeoutException if pessimistic locking
+ * fails and only the statement is rolled back
+ */
+ public List getResultList();
- /**
- * Execute a SELECT query that returns a single result.
- *
- * @return the result
- * @throws NoResultException if there is no result
- * @throws NonUniqueResultException if more than one result
- * @throws IllegalStateException if called for a Java
- * Persistence query language UPDATE or DELETE statement
- */
- public Object getSingleResult();
+ /**
+ * Execute a SELECT query that returns a single result.
+ *
+ * @return the result
+ *
+ * @throws NoResultException if there is no result
+ * @throws NonUniqueResultException if more than one result
+ * @throws IllegalStateException if called for a Java
+ * Persistence query language UPDATE or DELETE statement
+ * @throws QueryTimeoutException if the query execution exceeds *the query timeout value set
+ * @throws TransactionRequiredException if a lock mode has
+ * been set and there is no transaction
+ * @throws PessimisticLockException if pessimistic locking
+ * fails and the transaction is rolled back
+ * @throws LockTimeoutException if pessimistic locking
+ * fails and only the statement is rolled back
+ */
+ public Object getSingleResult();
- /**
- * Execute an update or delete statement.
- *
- * @return the number of entities updated or deleted
- * @throws IllegalStateException if called for a Java Persistence query language SELECT statement
- * @throws TransactionRequiredException if there is no transaction
- */
- public int executeUpdate();
+ /**
+ * Execute an update or delete statement.
+ *
+ * @return the number of entities updated or deleted
+ *
+ * @throws IllegalStateException if called for a Java
+ * Persistence query language SELECT statement or for
+ * a criteria query
+ * @throws TransactionRequiredException if there is
+ * no transaction
+ * @throws QueryTimeoutException if the statement execution
+ * exceeds the query timeout value set
+ */
+ public int executeUpdate();
- /**
- * Set the maximum number of results to retrieve.
- *
- * @param maxResult
- * @return the same query instance
- * @throws IllegalArgumentException if argument is negative
- */
- public Query setMaxResults(int maxResult);
+ /**
+ * Set the maximum number of results to retrieve.
+ *
+ * @param maxResult
+ *
+ * @return the same query instance
+ *
+ * @throws IllegalArgumentException if argument is negative
+ */
+ public Query setMaxResults(int maxResult);
- /**
- * Set the position of the first result to retrieve.
- *
- * @param startPosition position of the first result, numbered from 0
- * @return the same query instance
- * @throws IllegalArgumentException if argument is negative
- */
- public Query setFirstResult(int startPosition);
+ /**
+ * The maximum number of results the query object was set to
+ * retrieve. Returns Integer.MAX_VALUE if setMaxResults was not
+ * applied to the query object.
+ *
+ * @return maximum number of results
+ */
+ public int getMaxResults();
- /**
- * Set an implementation-specific hint. If the hint name is not recognized, it is silently
- * ignored.
- *
- * @param hintName
- * @param value
- * @return the same query instance
- * @throws IllegalArgumentException if the second argument is not valid for the implementation
- */
- public Query setHint(String hintName, Object value);
+ /**
+ * Set the position of the first result to retrieve.
+ *
+ * @param startPosition position of the first result, numbered from 0
+ *
+ * @return the same query instance
+ *
+ * @throws IllegalArgumentException if argument is negative
+ */
+ public Query setFirstResult(int startPosition);
- /**
- * Bind an argument to a named parameter.
- *
- * @param name the parameter name
- * @param value
- * @return the same query instance
- * @throws IllegalArgumentException if parameter name does not correspond to parameter in query
- * string or argument is of incorrect type
- */
- public Query setParameter(String name, Object value);
+ /**
+ * The position of the first result the query object was set to
+ * retrieve. Returns 0 if setFirstResult was not applied to the
+ * query object.
+ *
+ * @return position of first result
+ */
+ public int getFirstResult();
- /**
- * Bind an instance of java.util.Date to a named parameter.
- *
- * @param name
- * @param value
- * @param temporalType
- * @return the same query instance
- * @throws IllegalArgumentException if parameter name does not correspond to parameter in query
- * string
- */
- public Query setParameter(String name, Date value, TemporalType temporalType);
+ /**
+ * Set a query hint.
+ * If a vendor-specific hint is not recognized, it is silently
+ * ignored.
+ * Portable applications should not rely on the standard timeout
+ * hint. Depending on the database in use and the locking
+ * mechanisms used by the provider, the hint may or may not
+ * be observed.
+ * * @param hintName
+ *
+ * @param value
+ *
+ * @return the same query instance
+ *
+ * @throws IllegalArgumentException if the second argument is not
+ * valid for the implementation
+ */
+ public Query setHint(String hintName, Object value);
- /**
- * Bind an instance of java.util.Calendar to a named parameter.
- *
- * @param name
- * @param value
- * @param temporalType
- * @return the same query instance
- * @throws IllegalArgumentException if parameter name does not correspond to parameter in query
- * string
- */
- public Query setParameter(String name, Calendar value, TemporalType temporalType);
+ /**
+ * Get the hints and associated values that are in effect for
+ * the query instance.
+ *
+ * @return query hints
+ */
+ public Map<String, Object> getHints();
- /**
- * Bind an argument to a positional parameter.
- *
- * @param position
- * @param value
- * @return the same query instance
- * @throws IllegalArgumentException if position does not correspond to positional parameter of
- * query or argument is of incorrect type
- */
- public Query setParameter(int position, Object value);
+ /**
+ * Get the names of the hints that are supported for query
+ * objects. These hints correspond to hints that may be passed
+ * to the methods of the Query interface that take hints as
+ * arguments or used with the NamedQuery and NamedNativeQuery
+ * annotations. These include all standard query hints as well as
+ * vendor-specific hints supported by the provider. These hints
+ * may or may not currently be in effect.
+ *
+ * @return hints
+ */
+ public Set<String> getSupportedHints();
- /**
- * Bind an instance of java.util.Date to a positional parameter.
- *
- * @param position
- * @param value
- * @param temporalType
- * @return the same query instance
- * @throws IllegalArgumentException if position does not correspond to positional parameter of
- * query
- */
- public Query setParameter(int position, Date value, TemporalType temporalType);
+ /**
+ * Bind an argument to a named parameter.
+ *
+ * @param name the parameter name
+ * @param value
+ *
+ * @return the same query instance
+ *
+ * @throws IllegalArgumentException if parameter name does not
+ * correspond to a parameter of the query or if
+ * the argument is of incorrect type
+ */
+ public Query setParameter(String name, Object value);
- /**
- * Bind an instance of java.util.Calendar to a positional parameter.
- *
- * @param position
- * @param value
- * @param temporalType
- * @return the same query instance } correspond to positional parameter of query
- */
- public Query setParameter(int position, Calendar value, TemporalType temporalType);
+ /**
+ * Bind an instance of java.util.Date to a named parameter.
+ *
+ * @param name
+ * @param value
+ * @param temporalType
+ *
+ * @return the same query instance
+ *
+ * @throws IllegalArgumentException if parameter name does not
+ * correspond to a parameter of the query
+ */
+ public Query setParameter(String name, Date value,
+ TemporalType temporalType);
- /**
- * Set the flush mode type to be used for the query execution.
- * The flush mode type applies to the query regardless of the
- * flush mode type in use for the entity manager.
- *
- * @param flushMode
- */
- public Query setFlushMode(FlushModeType flushMode);
+ /**
+ * Bind an instance of java.util.Calendar to a named parameter.
+ *
+ * @param name
+ * @param value
+ * @param temporalType
+ *
+ * @return the same query instance
+ *
+ * @throws IllegalArgumentException if parameter name does not
+ * correspond to a parameter of the query
+ */
+ public Query setParameter(String name, Calendar value,
+ TemporalType temporalType);
-}
\ No newline at end of file
+ /**
+ * Bind an argument to a positional parameter.
+ *
+ * @param position
+ * @param value
+ *
+ * @return the same query instance
+ *
+ * @throws IllegalArgumentException if position does not
+ * correspond to a positional parameter of
+ * the query or if the argument is of incorrect
+ * type
+ */
+ public Query setParameter(int position, Object value);
+
+ /**
+ * Bind an instance of java.util.Date to a positional parameter.
+ *
+ * @param position
+ * @param value
+ * @param temporalType
+ *
+ * @return the same query instance
+ *
+ * @throws IllegalArgumentException if position does not
+ * correspond to a positional parameter of the
+ * query
+ */
+ public Query setParameter(int position, Date value,
+ TemporalType temporalType);
+
+ /**
+ * Bind an instance of java.util.Calendar to a positional
+ * parameter.
+ *
+ * @param position
+ * @param value
+ * @param temporalType
+ *
+ * @return the same query instance
+ *
+ * @throws IllegalArgumentException if position does not
+ * correspond to a positional parameter of the *query
+ */
+ public Query setParameter(int position, Calendar value,
+ TemporalType temporalType);
+
+ /**
+ * Get the parameters names and associated values of the
+ * parameters that are bound for the query instance.
+ * Returns empty map if no parameters have been bound
+ * or if the query does not use named parameters.
+ *
+ * @return named parameters
+ */
+ public Map<String, Object> getNamedParameters();
+
+ /**
+ * Get the values of the positional parameters
+ * that are bound for the query instance.
+ * Positional parameters are listed in order of position.
+ * Returns empty list if no parameters have been bound
+ * or if the query does not use positional parameters.
+ *
+ * @return positional parameters
+ */
+ public List getPositionalParameters();
+
+ /**
+ * Set the flush mode type to be used for the query execution.
+ * The flush mode type applies to the query regardless of the
+ * flush mode type in use for the entity manager.
+ *
+ * @param flushMode
+ */
+ public Query setFlushMode(FlushModeType flushMode);
+
+ /**
+ * The flush mode in effect for the query execution. If a flush
+ * mode has not been set for the query object, returns the flush
+ * mode in effect for the entity manager.
+ *
+ * @return flush mode
+ */
+ public FlushModeType getFlushMode();
+
+ /**
+ * Set the lock mode type to be used for the query execution.
+ *
+ * @param lockMode
+ *
+ * @throws IllegalStateException if the query is found not to be *a Java Persistence query language SELECT query
+ * or a Criteria API query
+ */
+ public Query setLockMode(LockModeType lockMode);
+
+ /**
+ * Get the current lock mode for the query.
+ *
+ * @return lock mode
+ *
+ * @throws IllegalStateException if the query is found not to be *a Java Persistence query language SELECT query
+ * or a Criteria API query
+ */
+ public LockModeType getLockMode();
+
+ /**
+ * Return an object of the specified type to allow access to the
+ * provider-specific API. If the provider's Query implementation
+ * does not support the specified class, the PersistenceException
+ * is thrown.
+ *
+ * @param cls the class of the object to be returned. This is
+ * normally either the underlying Query implementation class
+ * or an interface that it implements.
+ *
+ * @return an instance of the specified class
+ *
+ * @throws PersistenceException if the provider does not support
+ * the call.
+ */
+ public <T> T unwrap(Class<T> cls);
+}
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/Query.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/QueryHint.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/QueryHint.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/QueryHint.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id: QueryHint.java 11171 2007-02-08 03:40:51Z epbernard $
+//$Id$
package javax.persistence;
import java.lang.annotation.Retention;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/QueryHint.java
___________________________________________________________________
Name: svn:keywords
+ Id
Added: jpa-api/trunk/src/main/java/javax/persistence/QueryTimeoutException.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/QueryTimeoutException.java (rev 0)
+++ jpa-api/trunk/src/main/java/javax/persistence/QueryTimeoutException.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -0,0 +1,24 @@
+// $Id$
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package javax.persistence;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class QueryTimeoutException extends RuntimeException {
+}
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/QueryTimeoutException.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/RollbackException.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/RollbackException.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/RollbackException.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id: $
+//$Id$
package javax.persistence;
/**
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/RollbackException.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/SecondaryTable.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/SecondaryTable.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/SecondaryTable.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id: SecondaryTable.java 11171 2007-02-08 03:40:51Z epbernard $
+//$Id$
//EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc.
package javax.persistence;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/SecondaryTable.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/SecondaryTables.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/SecondaryTables.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/SecondaryTables.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id: SecondaryTables.java 11171 2007-02-08 03:40:51Z epbernard $
+//$Id$
//EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc.
package javax.persistence;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/SecondaryTables.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/SequenceGenerator.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/SequenceGenerator.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/SequenceGenerator.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id: SequenceGenerator.java 11171 2007-02-08 03:40:51Z epbernard $
+//$Id$
//EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc.
package javax.persistence;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/SequenceGenerator.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/SqlResultSetMapping.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/SqlResultSetMapping.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/SqlResultSetMapping.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id: SqlResultSetMapping.java 11171 2007-02-08 03:40:51Z epbernard $
+//$Id$
//EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc.
package javax.persistence;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/SqlResultSetMapping.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/SqlResultSetMappings.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/SqlResultSetMappings.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/SqlResultSetMappings.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id: SqlResultSetMapping.java 9044 2006-01-12 20:58:41 -0500 (jeu., 12 janv. 2006) epbernard $
+//$Id$
//EJB3 Specification Copyright 2004 - 2006 Sun Microsystems, Inc.
package javax.persistence;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/SqlResultSetMappings.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/Table.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/Table.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/Table.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id: Table.java 11171 2007-02-08 03:40:51Z epbernard $
+//$Id$
//EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc.
package javax.persistence;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/Table.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/TableGenerator.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/TableGenerator.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/TableGenerator.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id: TableGenerator.java 11171 2007-02-08 03:40:51Z epbernard $
+//$Id$
//EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc.
package javax.persistence;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/TableGenerator.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/Temporal.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/Temporal.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/Temporal.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id: Temporal.java 11171 2007-02-08 03:40:51Z epbernard $
+//$Id$
//EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc.
package javax.persistence;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/Temporal.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/TemporalType.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/TemporalType.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/TemporalType.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id: TemporalType.java 11171 2007-02-08 03:40:51Z epbernard $
+//$Id$
//EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc.
package javax.persistence;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/TemporalType.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/TransactionRequiredException.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/TransactionRequiredException.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/TransactionRequiredException.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id: TransactionRequiredException.java 11171 2007-02-08 03:40:51Z epbernard $
+//$Id$
package javax.persistence;
/**
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/TransactionRequiredException.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/Transient.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/Transient.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/Transient.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id: Transient.java 11171 2007-02-08 03:40:51Z epbernard $
+//$Id$
//EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc.
package javax.persistence;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/Transient.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/UniqueConstraint.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/UniqueConstraint.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/UniqueConstraint.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id: UniqueConstraint.java 11171 2007-02-08 03:40:51Z epbernard $
+//$Id$
//EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc.
package javax.persistence;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/UniqueConstraint.java
___________________________________________________________________
Name: svn:keywords
+ Id
Added: jpa-api/trunk/src/main/java/javax/persistence/ValidationMode.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/ValidationMode.java (rev 0)
+++ jpa-api/trunk/src/main/java/javax/persistence/ValidationMode.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -0,0 +1,27 @@
+// $Id$
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+* http://www.apache.org/licenses/LICENSE-2.0
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package javax.persistence;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public enum ValidationMode {
+ AUTO,
+ CALLBACK,
+ NONE
+}
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/ValidationMode.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/Version.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/Version.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/Version.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id: Version.java 11171 2007-02-08 03:40:51Z epbernard $
+//$Id$
//EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc.
package javax.persistence;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/Version.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/criteria/AbstractCollectionJoin.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/criteria/AbstractCollectionJoin.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/criteria/AbstractCollectionJoin.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,3 +1,4 @@
+// $Id$
package javax.persistence.criteria;
import javax.persistence.metamodel.AbstractCollection;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/criteria/AbstractCollectionJoin.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/criteria/AbstractQuery.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/criteria/AbstractQuery.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/criteria/AbstractQuery.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,3 +1,4 @@
+// $Id$
package javax.persistence.criteria;
import java.util.List;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/criteria/AbstractQuery.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/criteria/CollectionJoin.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/criteria/CollectionJoin.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/criteria/CollectionJoin.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,3 +1,4 @@
+// $Id$
package javax.persistence.criteria;
import java.util.Collection;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/criteria/CollectionJoin.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/criteria/CriteriaQuery.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/criteria/CriteriaQuery.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/criteria/CriteriaQuery.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,3 +1,4 @@
+// $Id$
package javax.persistence.criteria;
import java.util.List;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/criteria/CriteriaQuery.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/criteria/Expression.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/criteria/Expression.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/criteria/Expression.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,3 +1,4 @@
+// $Id$
package javax.persistence.criteria;
/**
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/criteria/Expression.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/criteria/Fetch.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/criteria/Fetch.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/criteria/Fetch.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,3 +1,4 @@
+// $Id$
package javax.persistence.criteria;
import javax.persistence.metamodel.Member;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/criteria/Fetch.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/criteria/FetchParent.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/criteria/FetchParent.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/criteria/FetchParent.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,3 +1,4 @@
+// $Id$
package javax.persistence.criteria;
import javax.persistence.metamodel.AbstractCollection;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/criteria/FetchParent.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/criteria/From.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/criteria/From.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/criteria/From.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,3 +1,4 @@
+// $Id$
package javax.persistence.criteria;
import javax.persistence.metamodel.Attribute;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/criteria/From.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/criteria/Join.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/criteria/Join.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/criteria/Join.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,3 +1,4 @@
+// $Id$
package javax.persistence.criteria;
import javax.persistence.metamodel.Member;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/criteria/Join.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/criteria/JoinType.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/criteria/JoinType.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/criteria/JoinType.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,3 +1,4 @@
+// $Id$
package javax.persistence.criteria;
/**
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/criteria/JoinType.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/criteria/ListJoin.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/criteria/ListJoin.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/criteria/ListJoin.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,3 +1,4 @@
+// $Id$
package javax.persistence.criteria;
import java.util.List;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/criteria/ListJoin.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/criteria/MapJoin.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/criteria/MapJoin.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/criteria/MapJoin.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,3 +1,4 @@
+// $Id$
package javax.persistence.criteria;
import java.util.Map;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/criteria/MapJoin.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/criteria/Order.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/criteria/Order.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/criteria/Order.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,3 +1,4 @@
+// $Id$
package javax.persistence.criteria;
/**
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/criteria/Order.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/criteria/Parameter.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/criteria/Parameter.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/criteria/Parameter.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,3 +1,4 @@
+// $Id$
package javax.persistence.criteria;
/**
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/criteria/Parameter.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/criteria/Path.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/criteria/Path.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/criteria/Path.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,3 +1,4 @@
+// $Id$
package javax.persistence.criteria;
import javax.persistence.metamodel.AbstractCollection;
@@ -31,7 +32,7 @@
/**
* Return the path corresponding to the referenced
* collection-valued attribute.
- * @param model collection-valued attribute
+ * @param collection collection-valued attribute
* @return path corresponding to the referenced attribute
*/
<E, C extends java.util.Collection<E>> Expression<C> get(AbstractCollection<X, C, E> collection);
@@ -39,7 +40,7 @@
/**
* Return the path corresponding to the referenced
* map-valued attribute.
- * @param model map-valued attribute
+ * @param collection map-valued attribute
* @return path corresponding to the referenced attribute
*/
<K, V, M extends java.util.Map<K, V>> Expression<M> get(Map<X, K, V> collection);
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/criteria/Path.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/criteria/Predicate.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/criteria/Predicate.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/criteria/Predicate.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,3 +1,4 @@
+// $Id$
package javax.persistence.criteria;
import java.util.List;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/criteria/Predicate.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/criteria/QueryBuilder.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/criteria/QueryBuilder.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/criteria/QueryBuilder.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,3 +1,4 @@
+// $Id$
package javax.persistence.criteria;
import java.math.BigDecimal;
@@ -156,14 +157,14 @@
/**
* Create a conjunction of the given restriction predicates.
- * @param restriction zero or more restriction predicates
+ * @param restrictions zero or more restriction predicates
* @return and predicate
*/
Predicate and(Predicate... restrictions);
/**
* Create a conjunction of the given restriction predicates.
- * @param restriction zero or more restriction predicates
+ * @param restrictions zero or more restriction predicates
* @return and predicate
*/
Predicate or(Predicate... restrictions);
@@ -590,21 +591,21 @@
/**
* Typecast
- * @param numeric expression
+ * @param number expression
* @return Expression<Long>
*/
Expression<Long> toLong(Expression<? extends Number> number);
/**
* Typecast
- * @param numeric expression
+ * @param number expression
* @return Expression<Integer>
*/
Expression<Integer> toInteger(Expression<? extends Number> number);
/**
* Typecast
- * @param numeric expression
+ * @param number expression
* @return Expression<Float>
*/
Expression<Float> toFloat(Expression<? extends Number> number);
@@ -617,14 +618,14 @@
/**
* Typecast
- * @param numeric expression
+ * @param number expression
* @return Expression<BigDecimal>
*/
Expression<BigDecimal> toBigDecimal(Expression<? extends Number> number);
/**
* Typecast
- * @param numeric expression
+ * @param number expression
* @return Expression<BigInteger>
*/
Expression<BigInteger> toBigInteger(Expression<? extends Number> number);
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/criteria/QueryBuilder.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/criteria/Result.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/criteria/Result.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/criteria/Result.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,3 +1,4 @@
+// $Id$
package javax.persistence.criteria;
public interface Result {
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/criteria/Result.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/criteria/Root.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/criteria/Root.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/criteria/Root.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,3 +1,4 @@
+// $Id$
package javax.persistence.criteria;
import javax.persistence.metamodel.Entity;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/criteria/Root.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/criteria/Selection.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/criteria/Selection.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/criteria/Selection.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,3 +1,4 @@
+// $Id$
package javax.persistence.criteria;
/**
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/criteria/Selection.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/criteria/SetJoin.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/criteria/SetJoin.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/criteria/SetJoin.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,3 +1,4 @@
+// $Id$
package javax.persistence.criteria;
import java.util.Set;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/criteria/SetJoin.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/criteria/Subquery.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/criteria/Subquery.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/criteria/Subquery.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-
+// $Id$
package javax.persistence.criteria;
import javax.persistence.metamodel.Collection;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/criteria/Subquery.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/metamodel/AbstractCollection.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/metamodel/AbstractCollection.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/metamodel/AbstractCollection.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,3 +1,4 @@
+// $Id$
package javax.persistence.metamodel;
/**
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/metamodel/AbstractCollection.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/metamodel/Attribute.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/metamodel/Attribute.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/metamodel/Attribute.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,3 +1,4 @@
+// $Id$
package javax.persistence.metamodel;
/**
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/metamodel/Attribute.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/metamodel/Basic.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/metamodel/Basic.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/metamodel/Basic.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,3 +1,4 @@
+// $Id$
package javax.persistence.metamodel;
/**
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/metamodel/Basic.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/metamodel/Bindable.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/metamodel/Bindable.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/metamodel/Bindable.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,3 +1,4 @@
+// $Id$
package javax.persistence.metamodel;
/**
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/metamodel/Bindable.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/metamodel/Collection.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/metamodel/Collection.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/metamodel/Collection.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,3 +1,4 @@
+// $Id$
package javax.persistence.metamodel;
/**
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/metamodel/Collection.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/metamodel/Embeddable.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/metamodel/Embeddable.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/metamodel/Embeddable.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,3 +1,4 @@
+// $Id$
package javax.persistence.metamodel;
/**
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/metamodel/Embeddable.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/metamodel/Entity.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/metamodel/Entity.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/metamodel/Entity.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,3 +1,4 @@
+// $Id$
package javax.persistence.metamodel;
/**
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/metamodel/Entity.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/metamodel/IdentifiableType.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/metamodel/IdentifiableType.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/metamodel/IdentifiableType.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,3 +1,4 @@
+// $Id$
package javax.persistence.metamodel;
/**
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/metamodel/IdentifiableType.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/metamodel/List.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/metamodel/List.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/metamodel/List.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,3 +1,4 @@
+// $Id$
package javax.persistence.metamodel;
/**
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/metamodel/List.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/metamodel/ManagedType.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/metamodel/ManagedType.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/metamodel/ManagedType.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,3 +1,4 @@
+// $Id$
package javax.persistence.metamodel;
/**
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/metamodel/ManagedType.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/metamodel/Map.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/metamodel/Map.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/metamodel/Map.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,3 +1,4 @@
+// $Id$
package javax.persistence.metamodel;
/**
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/metamodel/Map.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/metamodel/MappedSuperclass.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/metamodel/MappedSuperclass.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/metamodel/MappedSuperclass.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,3 +1,4 @@
+// $Id$
package javax.persistence.metamodel;
/**
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/metamodel/MappedSuperclass.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/metamodel/Member.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/metamodel/Member.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/metamodel/Member.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,3 +1,4 @@
+// $Id$
package javax.persistence.metamodel;
/**
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/metamodel/Member.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/metamodel/Metamodel.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/metamodel/Metamodel.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/metamodel/Metamodel.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,3 +1,4 @@
+// $Id$
package javax.persistence.metamodel;
/**
@@ -4,8 +5,6 @@
* Provides access to the metamodel of persistent
* entities in the persistence unit.
*
- * @param <X> The type of the represented entity, mapped
- * mapped superclass, or embeddable.
*/
public interface Metamodel {
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/metamodel/Metamodel.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/metamodel/Set.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/metamodel/Set.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/metamodel/Set.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,3 +1,4 @@
+// $Id$
package javax.persistence.metamodel;
/**
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/metamodel/Set.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/metamodel/Type.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/metamodel/Type.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/metamodel/Type.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,3 +1,4 @@
+// $Id$
package javax.persistence.metamodel;
/**
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/metamodel/Type.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/metamodel/TypesafeMetamodel.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/metamodel/TypesafeMetamodel.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/metamodel/TypesafeMetamodel.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,3 +1,4 @@
+// $Id$
package javax.persistence.metamodel;
import java.lang.annotation.ElementType;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/metamodel/TypesafeMetamodel.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/package-info.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/package-info.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/package-info.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id:$
+//$Id$
//EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc.
/**
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/package-info.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/spi/ClassTransformer.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/spi/ClassTransformer.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/spi/ClassTransformer.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,39 +1,45 @@
-//$Id: ClassTransformer.java 11171 2007-02-08 03:40:51Z epbernard $
-//EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc.
+//$Id$
package javax.persistence.spi;
+import java.lang.instrument.IllegalClassFormatException;
import java.security.ProtectionDomain;
-import java.lang.instrument.IllegalClassFormatException;
/**
- * A persistence provider provides an instance of this interface
- * to the PersistenceUnitInfo.addTransformer method.
- * The supplied transformer instance will get called to transform
- * entity class files when they are loaded and redefined. The transformation
- * occurs before the class is defined by the JVM
- *
- *
- * @author <a href="mailto:bill@jboss.org">Bill Burke</a>
- * @version $Revision: 11171 $
+ * A persistence provider supplies an instance of this
+ * interface to the PersistenceUnitInfo.addTransformer
+ * method. The supplied transformer instance will get
+ * called to transform entity class files when they are
+ * loaded or redefined. The transformation occurs before
+ * the class is defined by the JVM.
*/
-public interface ClassTransformer
-{
- /**
- * Invoked when a class is being loaded or redefined to add hooks for persistence bytecode manipulation
- *
- * @param loader the defining class loaderof the class being transformed. It may be null if using bootstrap loader
- * @param classname The name of the class being transformed
- * @param classBeingRedefined If an already loaded class is being redefined, then pass this as a parameter
- * @param protectionDomain ProtectionDomain of the class being (re)-defined
- * @param classfileBuffer The input byte buffer in class file format
- * @return A well-formed class file that can be loaded
- *
- * @throws IllegalClassFormatException
- */
- byte[] transform(ClassLoader loader,
- String classname,
- Class<?> classBeingRedefined,
- ProtectionDomain protectionDomain,
- byte[] classfileBuffer)
- throws IllegalClassFormatException;
+public interface ClassTransformer {
+ /**
+ * Invoked when a class is being loaded or redefined.
+ * The implementation of this method may transform the
+ * supplied class file and return a new replacement class
+ * file.
+ *
+ * @param loader The defining loader of the class to be
+ * transformed, may be null if the bootstrap loader
+ * @param className The name of the class in the internal form
+ * of fully qualified class and interface names
+ * @param classBeingRedefined If this is a redefine, the
+ * class being redefined, otherwise null
+ * @param protectionDomain The protection domain of the
+ * class being defined or redefined
+ * @param classfileBuffer The input byte buffer in class
+ * file format - must not be modified
+ *
+ * @return A well-formed class file buffer (the result of
+ * the transform), or null if no transform is performed
+ *
+ * @throws IllegalClassFormatException If the input does
+ * not represent a well-formed class file
+ */
+ byte[] transform(ClassLoader loader,
+ String className,
+ Class<?> classBeingRedefined,
+ ProtectionDomain protectionDomain,
+ byte[] classfileBuffer)
+ throws IllegalClassFormatException;
}
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/spi/ClassTransformer.java
___________________________________________________________________
Name: svn:keywords
+ Id
Added: jpa-api/trunk/src/main/java/javax/persistence/spi/LoadState.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/spi/LoadState.java (rev 0)
+++ jpa-api/trunk/src/main/java/javax/persistence/spi/LoadState.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -0,0 +1,21 @@
+// $Id$
+package javax.persistence.spi;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public enum LoadState {
+ /**
+ * the state of the element is known to have been loaded
+ */
+ LOADED,
+ /**
+ * the state of the element is known not to have been loaded
+ */
+ NOT_LOADED,
+ /**
+ * the load state of the element cannot be determined
+ */
+ UNKNOWN
+}
+
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/spi/LoadState.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/spi/PersistenceProvider.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/spi/PersistenceProvider.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/spi/PersistenceProvider.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,5 +1,4 @@
-//$Id: PersistenceProvider.java 11171 2007-02-08 03:40:51Z epbernard $
-//EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc.
+//$Id$
package javax.persistence.spi;
import java.util.Map;
@@ -7,9 +6,13 @@
/**
* Interface implemented by the persistence provider.
- * This interface is used to create an EntityManagerFactory.
+ * <p/>
* It is invoked by the container in Java EE environments and
- * by the Persistence class in Java SE environments.
+ * by the Persistence class in Java SE environments to
+ * create an EntityManagerFactory.
+ * <p/>
+ * It is also invoked by the PersistenceUtil implementation to
+ * determine the load status of an entity or entity attribute.
*/
public interface PersistenceProvider {
/**
@@ -17,12 +20,13 @@
* is to be created.
*
* @param emName The name of the persistence unit
- * @param map A Map of properties for use by the
- * persistence provider. These properties may be used to
- * override the values of the corresponding elements in
- * the persistence.xml file or specify values for
- * properties not specified in the persistence.xml
- * (and may be null if no properties are specified).
+ * @param map A Map of properties for use by the
+ * persistence provider. These properties may be used to
+ * override the values of the corresponding elements in
+ * the persistence.xml file or specify values for
+ * properties not specified in the persistence.xml
+ * (and may be null if no properties are specified).
+ *
* @return EntityManagerFactory for the persistence unit,
* or null if the provider is not the right provider
*/
@@ -33,11 +37,85 @@
* is to be created.
*
* @param info Metadata for use by the persistence provider
- * @param map A Map of integration-level properties for use
- * by the persistence provider (may be null if no properties
- * are specified).
+ * @param map A Map of integration-level properties for use
+ * by the persistence provider (may be null if no properties
+ * are specified).
+ * If a Bean Validation provider is present in the classpath,
+ * the container must pass the ValidatorFactory instance in
+ * the map with the key "javax.persistence.validation.factory".
+ *
* @return EntityManagerFactory for the persistence unit
* specified by the metadata
*/
public EntityManagerFactory createContainerEntityManagerFactory(PersistenceUnitInfo info, Map map);
+
+ /**
+ * If the provider determines that the entity has been provided
+ * by itself and that the state of the specified attribute has
+ * been loaded, this method returns LoadState.LOADED.
+ * If the provider determines that the entity has been provided
+ * by itself and that either entity attributes with FetchType
+ * EAGER have not been loaded or that the state of the specified
+ * attribute has not been loaded, this methods returns
+ * LoadState.NOT_LOADED.
+ * If a provider cannot determine the load state, this method
+ * returns LoadState.UNKNOWN.
+ * The provider's implementation of this method must not obtain
+ * a reference to an attribute value, as this could trigger the
+ * loading of entity state if the entity has been provided by a
+ * different provider.
+ *
+ * @param entity
+ * @param attributeName name of attribute whose load status is
+ * to be determined
+ *
+ * @return load status of the attribute
+ */
+ public LoadState isLoadedWithoutReference(Object entity, String attributeName);
+
+ /**
+ * If the provider determines that the entity has been provided
+ * by itself and that the state of the specified attribute has
+ * been loaded, this method returns LoadState.LOADED.
+ * If a provider determines that the entity has been provided
+ * by itself and that either the entity attributes with FetchType
+ * EAGER have not been loaded or that the state of the specified
+ * attribute has not been loaded, this method returns
+ * return LoadState.NOT_LOADED.
+ * If the provider cannot determine the load state, this method
+ * returns LoadState.UNKNOWN.
+ * The provider's implementation of this method is permitted to
+ * obtain a reference to the attribute value. (This access is
+ * safe because providers which might trigger the loading of the
+ * attribute state will have already been determined by
+ * isLoadedWithoutReference. )
+ *
+ * @param entity
+ * @param attributeName name of attribute whose load status is
+ * to be determined
+ *
+ * @return load status of the attribute
+ */
+ public LoadState isLoadedWithReference(Object entity, String attributeName);
+
+ /**
+ * If the provider determines that the entity has been provided
+ * by itself and that the state of all attributes for which
+ * FetchType EAGER has been specified have been loaded, this
+ * method returns LoadState.LOADED.
+ * If the provider determines that the entity has been provided
+ * by itself and that not all attributes with FetchType EAGER
+ * have been loaded, this method returns LoadState.NOT_LOADED.
+ * If the provider cannot determine if the entity has been
+ * provided by itself, this method returns LoadState.UNKNOWN.
+ * The provider's implementation of this method must not obtain
+ * a reference to any attribute value, as this could trigger the
+ * loading of entity state if the entity has been provided by a
+ * different provider.
+ *
+ * @param entity whose loaded status is to be determined
+ *
+ * @return load status of the entity
+ */
+ public LoadState isLoaded(Object entity);
}
\ No newline at end of file
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/spi/PersistenceProvider.java
___________________________________________________________________
Name: svn:keywords
+ Id
Added: jpa-api/trunk/src/main/java/javax/persistence/spi/PersistenceProviderResolver.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/spi/PersistenceProviderResolver.java (rev 0)
+++ jpa-api/trunk/src/main/java/javax/persistence/spi/PersistenceProviderResolver.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -0,0 +1,28 @@
+// $Id$
+package javax.persistence.spi;
+
+import java.util.List;
+
+/**
+ * Determine the list of persistence providers available in the
+ * runtime environment
+ * <p/>
+ * Persistence providers are identified by the presence of
+ * META-INF/services/javax.persistence.spi.PersistenceProvider
+ * files following the Service Provider pattern.
+ * <p/>
+ * Each META-INF/services/javax.persistence.spi.PersistenceProvider * file contains the name of the provider implementation class of the
+ * javax.persistence.spi.PersistenceProvider interface.
+ * <p/>
+ * Implementations must be thread-safe.
+ */
+public interface PersistenceProviderResolver {
+ /**
+ * Returns a list of PersistenceProvider implementations
+ * available in the runtime environment.
+ *
+ * @return list of persistence providers available
+ * in the environment
+ */
+ List<PersistenceProvider> getPersistenceProviders();
+}
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/spi/PersistenceProviderResolver.java
___________________________________________________________________
Name: svn:keywords
+ Id
Added: jpa-api/trunk/src/main/java/javax/persistence/spi/PersistenceProviderResolverHolder.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/spi/PersistenceProviderResolverHolder.java (rev 0)
+++ jpa-api/trunk/src/main/java/javax/persistence/spi/PersistenceProviderResolverHolder.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -0,0 +1,23 @@
+// $Id$
+package javax.persistence.spi;
+
+/**
+ * Holds the global PersistenceProviderResolver instance.
+ * If no PersistenceProviderResolver is set by the environment,
+ * the default PersistenceProviderResolver is used. *
+ * Implementations must be thread-safe.
+ */
+public class PersistenceProviderResolverHolder {
+ /**
+ * Returns the current persistence provider resolver
+ */
+ public static PersistenceProviderResolver getPersistenceProviderResolver() {
+ return null;
+ }
+
+ /**
+ * Defines the persistence provider resolver used
+ */
+ public static void setPersistenceProviderResolver(PersistenceProviderResolver resolver) {
+ }
+}
\ No newline at end of file
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/spi/PersistenceProviderResolverHolder.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/spi/PersistenceUnitInfo.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/spi/PersistenceUnitInfo.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/spi/PersistenceUnitInfo.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,27 +1,27 @@
-//$Id: PersistenceUnitInfo.java 11171 2007-02-08 03:40:51Z epbernard $
-//EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc.package javax.persistence.spi;
+//$Id$
package javax.persistence.spi;
import java.net.URL;
import java.util.List;
import java.util.Properties;
+import javax.persistence.Caching;
+import javax.persistence.ValidationMode;
import javax.sql.DataSource;
/**
- * Interface implemented by the container and used by the
- * persistence provider when creating an EntityManagerFactory.
+ * Interface implemented by the container and used by the * persistence provider when creating an EntityManagerFactory.
*/
public interface PersistenceUnitInfo {
/**
* @return The name of the persistence unit.
- * Corresponds to the <name> element in the persistence.xml file.
+ * Corresponds to the name attribute in the persistence.xml file.
*/
public String getPersistenceUnitName();
/**
* @return The fully qualified name of the persistence provider
* implementation class.
- * Corresponds to the <provider> element in the persistence.xml
+ * Corresponds to the provider element in the persistence.xml
* file.
*/
public String getPersistenceProviderClassName();
@@ -37,7 +37,7 @@
/**
* @return The JTA-enabled data source to be used by the
* persistence provider.
- * The data source corresponds to the <jta-data-source>
+ * The data source corresponds to the jta-data-source
* element in the persistence.xml file or is provided at
* deployment or by the container.
*/
@@ -47,7 +47,7 @@
* @return The non-JTA-enabled data source to be used by the
* persistence provider for accessing data outside a JTA
* transaction.
- * The data source corresponds to the named <non-jta-data-source>
+ * The data source corresponds to the non-jta-data-source
* element in the persistence.xml file or provided at
* deployment or by the container.
*/
@@ -59,31 +59,44 @@
* classes. The mapping files must be in the standard XML
* mapping format, be uniquely named and be resource-loadable
* from the application classpath.
- * Each mapping file name corresponds to a <mapping-file>
+ * Each mapping file name corresponds to a mapping-file
* element in the persistence.xml file.
*/
public List<String> getMappingFileNames();
/**
- * @return The list of JAR file URLs that the persistence
- * provider must examine for managed classes of the persistence
- * unit. Each jar file URL corresponds to a named <jar-file>
- * element in the persistence.xml file.
+ * Returns a list of URLs for the jar files or exploded jar
+ * file directories that the persistence provider must examine
+ * for managed classes of the persistence unit. Each URL
+ * corresponds to a jar-file element in the
+ * persistence.xml file. A URL will either be a file:
+ * URL referring to a jar file or referring to a directory
+ * that contains an exploded jar file, or some other URL from
+ * which an InputStream in jar format can be obtained.
+ *
+ * @return a list of URL objects referring to jar files or
+ * directories.
*/
public List<URL> getJarFileUrls();
/**
- * @return The URL for the jar file or directory that is the
- * root of the persistence unit. (If the persistence unit is
- * rooted in the WEB-INF/classes directory, this will be the
- * URL of that directory.)
+ * Returns the URL for the jar file or directory that is the
+ * root of the persistence unit. (If the persistence unit is
+ * rooted in the WEB-INF/classes directory, this will be the
+ * URL of that directory.)
+ * The URL will either be a file: URL referring to a jar file
+ * or referring to a directory that contains an exploded jar
+ * file, or some other URL from which an InputStream in jar
+ * format can be obtained.
+ *
+ * @return a URL referring to a jar file or directory.
*/
public URL getPersistenceUnitRootUrl();
/**
* @return The list of the names of the classes that the
* persistence provider must add it to its set of managed
- * classes. Each name corresponds to a named <class> element
+ * classes. Each name corresponds to a class element
* in the persistence.xml file.
*/
public List<String> getManagedClassNames();
@@ -92,18 +105,39 @@
* @return Whether classes in the root of the persistence
* unit that have not been explicitly listed are to be
* included in the set of managed classes.
- * This value corresponds to the <exclude-unlisted-classes>
+ * This value corresponds to the exclude-unlisted-classes
* element in the persistence.xml file.
*/
public boolean excludeUnlistedClasses();
/**
+ * @return The specification of how the provider must use
+ * a second-level cache for the persistence unit
+ * The result of this method corresponds to the caching
+ * element in the persistence.xml file.
+ */
+ public Caching getCaching();
+
+ /**
+ * @return The validation mode to be used by the
+ * persistence provider for the persistence unit.
+ * The validation mode corresponds to the validation-mode
+ * element in the persistence.xml file.
+ */
+ public ValidationMode getValidationMode();
+
+ /**
* @return Properties object. Each property corresponds
- * to a <property> element in the persistence.xml file
+ * to a property element in the persistence.xml file
*/
public Properties getProperties();
/**
+ * @return persistence.xml schema version
+ */
+ public String PersistenceXMLSchemaVersion();
+
+ /**
* @return ClassLoader that the provider may use to load any
* classes, resources, or open URLs.
*/
@@ -113,15 +147,15 @@
* Add a transformer supplied by the provider that will be
* called for every new class definition or class redefinition
* that gets loaded by the loader returned by the
- * PersistenceInfo.getClassLoader method. The transformer
+ * PersistenceUnitInfo.getClassLoader method. The transformer
* has no effect on the result returned by the
- * PersistenceInfo.getTempClassLoader method.
+ * PersistenceUnitInfo.getNewTempClassLoader method.
* Classes are only transformed once within the same classloading
* scope, regardless of how many persistence units they may be
* a part of.
*
* @param transformer A provider-supplied transformer that the
- * Container invokes at class-(re)definition time
+ * Container invokes at class-(re)definition time
*/
public void addTransformer(ClassTransformer transformer);
@@ -130,13 +164,14 @@
* may use to temporarily load any classes, resources, or
* open URLs. The scope and classpath of this loader is
* exactly the same as that of the loader returned by
- * PersistenceInfo.getClassLoader. None of the classes loaded
+ * PersistenceUnitInfo.getClassLoader. None of the classes loaded
* by this class loader will be visible to application
- * components. The container does not use or maintain references
- * to this class loader after returning it to the provider.
+ * components. The provider may only use this ClassLoader
+ * within the scope of the createContainerEntityManagerFactory
+ * call.
*
* @return Temporary ClassLoader with same visibility as current
- * loader
+ * loader
*/
public ClassLoader getNewTempClassLoader();
}
\ No newline at end of file
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/spi/PersistenceUnitInfo.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/spi/PersistenceUnitTransactionType.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/spi/PersistenceUnitTransactionType.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/spi/PersistenceUnitTransactionType.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id: PersistenceUnitTransactionType.java 11171 2007-02-08 03:40:51Z epbernard $
+//$Id$
//EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc.
package javax.persistence.spi;
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/spi/PersistenceUnitTransactionType.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: jpa-api/trunk/src/main/java/javax/persistence/spi/package-info.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/spi/package-info.java 2009-03-10 11:04:27 UTC (rev 16127)
+++ jpa-api/trunk/src/main/java/javax/persistence/spi/package-info.java 2009-03-10 14:01:23 UTC (rev 16128)
@@ -1,4 +1,4 @@
-//$Id:$
+//$Id$
//EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc.
/**
Property changes on: jpa-api/trunk/src/main/java/javax/persistence/spi/package-info.java
___________________________________________________________________
Name: svn:keywords
+ Id
15 years, 9 months
Hibernate SVN: r16126 - in jpa-api/trunk/src/main/java/javax: persistence and 1 other directory.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2009-03-10 07:03:53 -0400 (Tue, 10 Mar 2009)
New Revision: 16126
Added:
jpa-api/trunk/src/main/java/javax/persistence/criteria/
jpa-api/trunk/src/main/java/javax/persistence/metamodel/
Removed:
jpa-api/trunk/src/main/java/javax/jpa/criteria/
jpa-api/trunk/src/main/java/javax/jpa/metamodel/
Log:
moved packages
Copied: jpa-api/trunk/src/main/java/javax/persistence/criteria (from rev 16112, jpa-api/trunk/src/main/java/javax/jpa/criteria)
Copied: jpa-api/trunk/src/main/java/javax/persistence/metamodel (from rev 16112, jpa-api/trunk/src/main/java/javax/jpa/metamodel)
15 years, 9 months
Hibernate SVN: r16125 - beanvalidation/trunk/validation-api/src/main/java/javax/validation.
by hibernate-commits@lists.jboss.org
Author: epbernard
Date: 2009-03-09 23:52:30 -0400 (Mon, 09 Mar 2009)
New Revision: 16125
Modified:
beanvalidation/trunk/validation-api/src/main/java/javax/validation/TraversableResolver.java
Log:
Javadoc
Modified: beanvalidation/trunk/validation-api/src/main/java/javax/validation/TraversableResolver.java
===================================================================
--- beanvalidation/trunk/validation-api/src/main/java/javax/validation/TraversableResolver.java 2009-03-10 03:33:52 UTC (rev 16124)
+++ beanvalidation/trunk/validation-api/src/main/java/javax/validation/TraversableResolver.java 2009-03-10 03:52:30 UTC (rev 16125)
@@ -34,11 +34,13 @@
* @param traversableObject object hosting <code>traversableProperty</code>.
* @param traversableProperty name of the traversable property.
* @param rootBeanType type of the root object passed to the Validator.
- * @param pathToTraversableObject path from the root object to the <code>traversableProperty</code>
+ * @param pathToTraversableObject path from the root object to
+ * the <code>traversableProperty</code>
* (using the path specification defined by Bean Validator).
* @param elementType either <code>FIELD</code> or <code>METHOD</code>.
*
- * @return <code>true</code> if the property is traversable by Bean Validation, <code>false</code> otherwise.
+ * @return <code>true</code> if the property is traversable by Bean Validation,
+ * <code>false</code> otherwise.
*/
boolean isTraversable(Object traversableObject,
String traversableProperty,
15 years, 9 months
Hibernate SVN: r16124 - beanvalidation/trunk/validation-api/src/main/java/javax/validation.
by hibernate-commits@lists.jboss.org
Author: epbernard
Date: 2009-03-09 23:33:52 -0400 (Mon, 09 Mar 2009)
New Revision: 16124
Modified:
beanvalidation/trunk/validation-api/src/main/java/javax/validation/MessageInterpolator.java
Log:
Javadoc
Modified: beanvalidation/trunk/validation-api/src/main/java/javax/validation/MessageInterpolator.java
===================================================================
--- beanvalidation/trunk/validation-api/src/main/java/javax/validation/MessageInterpolator.java 2009-03-10 03:30:32 UTC (rev 16123)
+++ beanvalidation/trunk/validation-api/src/main/java/javax/validation/MessageInterpolator.java 2009-03-10 03:33:52 UTC (rev 16124)
@@ -20,7 +20,7 @@
import java.util.Locale;
/**
- * Interpolate a given constraint violation message.
+ * Interpolate a given constraint error message.
* Implementations should be as tolerant as possible on syntax errors.
*
* @author Emmanuel Bernard
15 years, 9 months
Hibernate SVN: r16123 - beanvalidation/trunk/validation-api/src/main/java/javax/validation.
by hibernate-commits@lists.jboss.org
Author: epbernard
Date: 2009-03-09 23:30:32 -0400 (Mon, 09 Mar 2009)
New Revision: 16123
Modified:
beanvalidation/trunk/validation-api/src/main/java/javax/validation/ConstraintValidatorContext.java
Log:
Javadoc
Modified: beanvalidation/trunk/validation-api/src/main/java/javax/validation/ConstraintValidatorContext.java
===================================================================
--- beanvalidation/trunk/validation-api/src/main/java/javax/validation/ConstraintValidatorContext.java 2009-03-10 01:40:57 UTC (rev 16122)
+++ beanvalidation/trunk/validation-api/src/main/java/javax/validation/ConstraintValidatorContext.java 2009-03-10 03:30:32 UTC (rev 16123)
@@ -18,7 +18,7 @@
package javax.validation;
/**
- * Provide contextual data and operation when applying a given constraint validator implementation
+ * Provide contextual data and operation when applying a given constraint validator
*
* @author Emmanuel Bernard
*/
15 years, 9 months
Hibernate SVN: r16122 - in beanvalidation/trunk/validation-api/src/main: resources and 1 other directory.
by hibernate-commits@lists.jboss.org
Author: epbernard
Date: 2009-03-09 21:40:57 -0400 (Mon, 09 Mar 2009)
New Revision: 16122
Modified:
beanvalidation/trunk/validation-api/src/main/java/javax/validation/BeanDescriptor.java
beanvalidation/trunk/validation-api/src/main/resources/validation-mapping-1.0.xsd
Log:
JavaDoc, remove stop-constraint-inheritance from schema
Modified: beanvalidation/trunk/validation-api/src/main/java/javax/validation/BeanDescriptor.java
===================================================================
--- beanvalidation/trunk/validation-api/src/main/java/javax/validation/BeanDescriptor.java 2009-03-09 09:42:41 UTC (rev 16121)
+++ beanvalidation/trunk/validation-api/src/main/java/javax/validation/BeanDescriptor.java 2009-03-10 01:40:57 UTC (rev 16122)
@@ -53,7 +53,7 @@
/**
* @return the property names having at least one constraint defined or which are marked
- * as cascaded (@Valid).
+ * as cascaded (@Valid) or an empty set.
*/
Set<String> getConstrainedProperties();
}
Modified: beanvalidation/trunk/validation-api/src/main/resources/validation-mapping-1.0.xsd
===================================================================
--- beanvalidation/trunk/validation-api/src/main/resources/validation-mapping-1.0.xsd 2009-03-09 09:42:41 UTC (rev 16121)
+++ beanvalidation/trunk/validation-api/src/main/resources/validation-mapping-1.0.xsd 2009-03-10 01:40:57 UTC (rev 16122)
@@ -68,7 +68,6 @@
<xs:complexType name="classType">
<xs:sequence>
<xs:element type="groupSequenceType" name="group-sequence" minOccurs="0"/>
- <xs:element type="xs:simpleType" name="stop-constraint-inheritance" fixed="" minOccurs="0"/>
<xs:element type="map:constraintType"
name="constraint"
maxOccurs="unbounded"
@@ -110,7 +109,6 @@
<xs:complexType name="getterType">
<xs:sequence>
<xs:element type="xs:string" name="valid" minOccurs="0" fixed=""/>
- <xs:element type="xs:string" name="stop-constraint-inheritance" minOccurs="0" fixed=""/>
<xs:element type="map:constraintType"
name="constraint"
minOccurs="0"
@@ -131,7 +129,6 @@
<xs:complexType name="fieldType">
<xs:sequence>
<xs:element type="xs:string" name="valid" minOccurs="0" fixed=""/>
- <xs:element type="xs:string" name="stop-constraint-inheritance" minOccurs="0" fixed=""/>
<xs:element type="map:constraintType"
name="constraint"
minOccurs="0"
15 years, 9 months
Hibernate SVN: r16121 - validator/trunk/tck-utils/impl/src/main/java/org/hibernate/tck/report.
by hibernate-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-03-09 05:42:41 -0400 (Mon, 09 Mar 2009)
New Revision: 16121
Modified:
validator/trunk/tck-utils/impl/src/main/java/org/hibernate/tck/report/CoverageReport.java
Log:
minor
Modified: validator/trunk/tck-utils/impl/src/main/java/org/hibernate/tck/report/CoverageReport.java
===================================================================
--- validator/trunk/tck-utils/impl/src/main/java/org/hibernate/tck/report/CoverageReport.java 2009-03-09 00:09:04 UTC (rev 16120)
+++ validator/trunk/tck-utils/impl/src/main/java/org/hibernate/tck/report/CoverageReport.java 2009-03-09 09:42:41 UTC (rev 16121)
@@ -725,6 +725,13 @@
out.write(sb.toString().getBytes());
}
+ else
+ {
+ // We still want to be able to jump to this section by clicking on the links
+ // in the chapter and section summaries
+ out.write(("<div style=\"visibility:hidden\" id=\"" + sectionId + "\"></div>\n").getBytes());
+
+ }
}
}
15 years, 9 months
Hibernate SVN: r16120 - validator/trunk/tck-utils.
by hibernate-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-03-08 20:09:04 -0400 (Sun, 08 Mar 2009)
New Revision: 16120
Modified:
validator/trunk/tck-utils/pom.xml
Log:
fix pom
Modified: validator/trunk/tck-utils/pom.xml
===================================================================
--- validator/trunk/tck-utils/pom.xml 2009-03-09 00:08:08 UTC (rev 16119)
+++ validator/trunk/tck-utils/pom.xml 2009-03-09 00:09:04 UTC (rev 16120)
@@ -65,6 +65,13 @@
<name>JBoss Snapshot Repository</name>
<url>dav:https://snapshots.jboss.org/maven2</url>
</snapshotRepository>
+ <repository>
+ <!-- Copy the dist to the local checkout of the JBoss maven2 repo ${maven.repository.root} -->
+ <!-- It is anticipated that ${maven.repository.root} be set in user's settings.xml -->
+ <!-- todo : replace this with direct svn access once the svnkit providers are available -->
+ <id>repository.jboss.org</id>
+ <url>file://${maven.repository.root}</url>
+ </repository>
</distributionManagement>
<build>
15 years, 9 months