Author: hardy.ferentschik
Date: 2009-03-11 07:04:32 -0400 (Wed, 11 Mar 2009)
New Revision: 16139
Modified:
jpa-api/trunk/pom.xml
jpa-api/trunk/src/main/java/javax/persistence/Persistence.java
Log:
Updated Manifest entries and added a dummy implementation for PersistenceUtil
Modified: jpa-api/trunk/pom.xml
===================================================================
--- jpa-api/trunk/pom.xml 2009-03-11 04:34:32 UTC (rev 16138)
+++ jpa-api/trunk/pom.xml 2009-03-11 11:04:32 UTC (rev 16139)
@@ -80,12 +80,12 @@
<archive>
<manifestEntries>
<Built-By>hibernate.org</Built-By>
- <Specification-Title>EJB
3.0</Specification-Title>
+ <Specification-Title>Java Persistence API, Version
2.0</Specification-Title>
<Specification-Version>${pom.version}</Specification-Version>
<Specification-Vendor>Sun Microsystems,
Inc.</Specification-Vendor>
<Implementation-Version>${pom.version}</Implementation-Version>
<Implementation-Vendor>hibernate.org</Implementation-Vendor>
-
<Implementation-Title>EJB</Implementation-Title>
+ <Implementation-Title>JAP
API</Implementation-Title>
</manifestEntries>
</archive>
</configuration>
@@ -95,21 +95,20 @@
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.5</version>
<configuration>
- <packagenames>javax.persistence.*</packagenames>
<use>true</use>
- <protected>true</protected>
<version>true</version>
<overview>${basedir}/src/main/javadoc/package.html</overview>
<windowtitle>EJB 3.0 Persistence API
Documentation</windowtitle>
<doctitle>EJB 3.0 Persistence API
Documentation</doctitle>
- <
link>http://java.sun.com/j2se/1.5/docs/api</link>
+ <links>
+
<
link>http://java.sun.com/j2se/1.5/docs/api</link>
+ </links>
<stylesheetfile>${basedir}/src/main/javadoc/jdstyle.css</stylesheetfile>
</configuration>
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<configuration>
- <releaseProfiles>release</releaseProfiles>
<goals>package</goals>
</configuration>
</plugin>
Modified: jpa-api/trunk/src/main/java/javax/persistence/Persistence.java
===================================================================
--- jpa-api/trunk/src/main/java/javax/persistence/Persistence.java 2009-03-11 04:34:32 UTC
(rev 16138)
+++ jpa-api/trunk/src/main/java/javax/persistence/Persistence.java 2009-03-11 11:04:32 UTC
(rev 16139)
@@ -1,5 +1,5 @@
-// $Id$
-// EJB3 Specification Copyright 2004-2009 Sun Microsystems, Inc.
+// $Id$
+// EJB3 Specification Copyright 2004-2009 Sun Microsystems, Inc.
package javax.persistence;
import java.io.BufferedReader;
@@ -63,15 +63,25 @@
}
/**
- * Return the PersistenceUtil instance
+ * @return Returns a <code>PersistenceUtil</code> instance.
*/
public PersistenceUtil getPersistenceUtil() {
- return null; //new PersistenceUtilImpl();
+ // return a dummy implementation of PersistenceUtil. Introduced for Hibernate Validator
(HV-104).
+ // Needs to be changed once we start updating EntityManager and introduce JPA2
+ return new PersistenceUtil() {
+
+ public boolean isLoaded(Object entity, String attributeName) {
+ return true;
+ }
+
+ public boolean isLoaded(Object object) {
+ return true;
+ }
+ };
}
// Helper methods
-
private static void findAllProviders() {
try {
ClassLoader loader = Thread.currentThread().getContextClassLoader();