openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p..@apache.org
Subject svn commit: r586284 - in /openjpa/trunk: openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/ openjpa-persistence/src/main/java/org/apache/openjpa/persistence/
Date Fri, 19 Oct 2007 07:02:24 GMT
Author: pcl
Date: Fri Oct 19 00:02:22 2007
New Revision: 586284

URL: http://svn.apache.org/viewvc?rev=586284&view=rev
Log:
OPENJPA-404

Modified:
    openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/JDBCFetchPlan.java
    openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/JDBCFetchPlanImpl.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerImpl.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/Extent.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/FetchPlan.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/FetchPlanImpl.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/Generator.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/OpenJPAEntityManager.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/OpenJPAEntityManagerFactory.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/OpenJPAEntityManagerSPI.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/OpenJPAPersistence.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/OpenJPAQuery.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/QueryResultCache.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/StoreCache.java

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/JDBCFetchPlan.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/JDBCFetchPlan.java?rev=586284&r1=586283&r2=586284&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/JDBCFetchPlan.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/JDBCFetchPlan.java
Fri Oct 19 00:02:22 2007
@@ -21,6 +21,9 @@
 import java.util.Collection;
 import javax.persistence.LockModeType;
 
+import org.apache.openjpa.jdbc.kernel.EagerFetchModes;
+import org.apache.openjpa.jdbc.kernel.LRSSizes;
+import org.apache.openjpa.jdbc.sql.JoinSyntaxes;
 import org.apache.openjpa.persistence.FetchPlan;
 
 /**
@@ -142,4 +145,85 @@
     public JDBCFetchPlan setMaxFetchDepth(int depth);
     public JDBCFetchPlan setReadLockMode(LockModeType mode);
     public JDBCFetchPlan setWriteLockMode(LockModeType mode);
+
+    /**
+     * @deprecated use the {@link FetchMode} enum instead.
+     */
+    public static final int EAGER_NONE = EagerFetchModes.EAGER_NONE;
+
+    /**
+     * @deprecated use the {@link FetchMode} enum instead.
+     */
+    public static final int EAGER_JOIN = EagerFetchModes.EAGER_JOIN;
+
+    /**
+     * @deprecated use the {@link FetchMode} enum instead.
+     */
+    public static final int EAGER_PARALLEL = EagerFetchModes.EAGER_PARALLEL;
+
+    /**
+     * @deprecated use the {@link LRSSizeAlgorithm} enum instead.
+     */
+    public static final int SIZE_UNKNOWN = LRSSizes.SIZE_UNKNOWN;
+
+    /**
+     * @deprecated use the {@link LRSSizeAlgorithm} enum instead.
+     */
+    public static final int SIZE_LAST = LRSSizes.SIZE_LAST;
+
+    /**
+     * @deprecated use the {@link LRSSizeAlgorithm} enum instead.
+     */
+    public static final int SIZE_QUERY = LRSSizes.SIZE_QUERY;
+
+    /**
+     * @deprecated use the {@link JoinSyntax} enum instead.
+     */
+    public static final int SYNTAX_SQL92 = JoinSyntaxes.SYNTAX_SQL92;
+
+    /**
+     * @deprecated use the {@link JoinSyntax} enum instead.
+     */
+    public static final int SYNTAX_TRADITIONAL =
+        JoinSyntaxes.SYNTAX_TRADITIONAL;
+
+    /**
+     * @deprecated use the {@link JoinSyntax} enum instead.
+     */
+    public static final int SYNTAX_DATABASE = JoinSyntaxes.SYNTAX_DATABASE;
+
+    /**
+     * @deprecated use {@link #setEagerFetchMode(FetchMode)} instead.
+     */
+    public JDBCFetchPlan setEagerFetchMode(int mode);
+
+    /**
+     * @deprecated use {@link #setSubclassFetchMode(FetchMode)} instead.
+     */
+    public JDBCFetchPlan setSubclassFetchMode(int mode);
+
+    /**
+     * @deprecated use {@link #setResultSetType(ResultSetType)} instead.
+     */
+    public JDBCFetchPlan setResultSetType(int mode);
+
+    /**
+     * @deprecated use {@link #setFetchDirection(FetchDirection)} instead.
+     */
+    public JDBCFetchPlan setFetchDirection(int direction);
+
+    /**
+     * @deprecated use {@link #getLRSSizeAlgorithm()} instead.
+     */
+    public int getLRSSize();
+
+    /**
+     * @deprecated use {@link #setLRSSizeAlgorithm(LRSSizeAlgorithm)} instead.
+     */
+    public JDBCFetchPlan setLRSSize(int lrsSizeMode);
+
+    /**
+     * @deprecated use {@link #setJoinSyntax(JoinSyntax)} instead.
+     */
+    public JDBCFetchPlan setJoinSyntax(int syntax);
 }

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/JDBCFetchPlanImpl.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/JDBCFetchPlanImpl.java?rev=586284&r1=586283&r2=586284&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/JDBCFetchPlanImpl.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/JDBCFetchPlanImpl.java
Fri Oct 19 00:02:22 2007
@@ -65,6 +65,11 @@
         return this;
     }
 
+    public JDBCFetchPlan setEagerFetchMode(int mode) {
+        _fetch.setEagerFetchMode(mode);
+        return this;
+    }
+
     public FetchMode getSubclassFetchMode() {
         return FetchMode.fromKernelConstant(_fetch.getSubclassFetchMode());
     }
@@ -74,6 +79,11 @@
         return this;
     }
 
+    public JDBCFetchPlan setSubclassFetchMode(int mode) {
+        _fetch.setSubclassFetchMode(mode);
+        return this;
+    }
+
     public ResultSetType getResultSetType() {
         return ResultSetType.fromKernelConstant(_fetch.getResultSetType());
     }
@@ -83,6 +93,11 @@
         return this;
     }
 
+    public JDBCFetchPlan setResultSetType(int mode) {
+        _fetch.setResultSetType(mode);
+        return this;
+    }
+
     public FetchDirection getFetchDirection() {
         return FetchDirection.fromKernelConstant(_fetch.getFetchDirection());
     }
@@ -92,6 +107,11 @@
         return this;
     }
 
+    public JDBCFetchPlan setFetchDirection(int direction) {
+        _fetch.setFetchDirection(direction);
+        return this;
+    }
+
     public LRSSizeAlgorithm getLRSSizeAlgorithm() {
         return LRSSizeAlgorithm.fromKernelConstant(_fetch.getLRSSize());
     }
@@ -101,12 +121,26 @@
         return this;
     }
 
+    public int getLRSSize() {
+        return _fetch.getLRSSize();
+    }
+
+    public JDBCFetchPlan setLRSSize(int lrsSizeMode) {
+        _fetch.setLRSSize(lrsSizeMode);
+        return this;
+    }
+
     public JoinSyntax getJoinSyntax() {
         return JoinSyntax.fromKernelConstant(_fetch.getJoinSyntax());
     }
 
     public JDBCFetchPlanImpl setJoinSyntax(JoinSyntax syntax) {
         _fetch.setJoinSyntax(syntax.toKernelConstant());
+        return this;
+    }
+
+    public JDBCFetchPlan setJoinSyntax(int syntax) {
+        _fetch.setJoinSyntax(syntax);
         return this;
     }
 

Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerImpl.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerImpl.java?rev=586284&r1=586283&r2=586284&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerImpl.java
(original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerImpl.java
Fri Oct 19 00:02:22 2007
@@ -198,6 +198,11 @@
         _broker.setRestoreState(val.toKernelConstant());
     }
 
+    public void setRestoreState(int restore) {
+        assertNotCloseInvoked();
+        _broker.setRestoreState(restore);
+    }
+
     public boolean getRetainState() {
         return _broker.getRetainState();
     }
@@ -216,6 +221,11 @@
         _broker.setAutoClear(val.toKernelConstant());
     }
 
+    public void setAutoClear(int autoClear) {
+        assertNotCloseInvoked();
+        _broker.setAutoClear(autoClear);
+    }
+
     public DetachStateType getDetachState() {
         return DetachStateType.fromKernelConstant(_broker.getDetachState());
     }
@@ -225,6 +235,11 @@
         _broker.setDetachState(type.toKernelConstant());
     }
 
+    public void setDetachState(int detach) {
+        assertNotCloseInvoked();
+        _broker.setDetachState(detach);
+    }
+
     public EnumSet<AutoDetachType> getAutoDetach() {
         return AutoDetachType.toEnumSet(_broker.getAutoDetach());
     }
@@ -239,6 +254,16 @@
         _broker.setAutoDetach(AutoDetachType.fromEnumSet(flags));
     }
 
+    public void setAutoDetach(int autoDetachFlags) {
+        assertNotCloseInvoked();
+        _broker.setAutoDetach(autoDetachFlags);
+    }
+
+    public void setAutoDetach(AutoDetachType value, boolean on) {
+        assertNotCloseInvoked();
+        _broker.setAutoDetach(AutoDetachType.fromEnumSet(EnumSet.of(value)),on);
+    }
+
     public void setAutoDetach(int flag, boolean on) {
         assertNotCloseInvoked();
         _broker.setAutoDetach(flag, on);
@@ -271,6 +296,14 @@
         _broker.setTrackChangesByType(trackByType);
     }
 
+    public boolean isLargeTransaction() {
+        return isTrackChangesByType();
+    }
+
+    public void setLargeTransaction(boolean value) {
+        setTrackChangesByType(value);
+    }
+
     public Object getUserObject(Object key) {
         return _broker.getUserObject(key);
     }
@@ -290,7 +323,7 @@
         _broker.removeTransactionListener(listener);
     }
 
-    public EnumSet<CallbackMode> getTransactionListenerCallbackMode() {
+    public EnumSet<CallbackMode> getTransactionListenerCallbackModes() {
         return CallbackMode.toEnumSet(
             _broker.getTransactionListenerCallbackMode());
     }
@@ -307,6 +340,14 @@
             CallbackMode.fromEnumSet(modes));
     }
 
+    public int getTransactionListenerCallbackMode() {
+        return _broker.getTransactionListenerCallbackMode();
+    }
+
+    public void setTransactionListenerCallbackMode(int callbackMode) {
+        throw new UnsupportedOperationException();
+    }
+
     public void addLifecycleListener(Object listener, Class... classes) {
         assertNotCloseInvoked();
         _broker.addLifecycleListener(listener, classes);
@@ -317,7 +358,7 @@
         _broker.removeLifecycleListener(listener);
     }
 
-    public EnumSet<CallbackMode> getLifecycleListenerCallbackMode() {
+    public EnumSet<CallbackMode> getLifecycleListenerCallbackModes() {
         return CallbackMode.toEnumSet(
             _broker.getLifecycleListenerCallbackMode());
     }
@@ -332,6 +373,15 @@
         assertNotCloseInvoked();
         _broker.setLifecycleListenerCallbackMode(
             CallbackMode.fromEnumSet(modes));
+    }
+
+    public int getLifecycleListenerCallbackMode() {
+        return _broker.getLifecycleListenerCallbackMode();
+    }
+
+    public void setLifecycleListenerCallbackMode(int callbackMode) {
+        assertNotCloseInvoked();
+        _broker.setLifecycleListenerCallbackMode(callbackMode);
     }
 
     @SuppressWarnings("unchecked")

Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/Extent.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/Extent.java?rev=586284&r1=586283&r2=586284&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/Extent.java
(original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/Extent.java
Fri Oct 19 00:02:22 2007
@@ -69,4 +69,10 @@
      * Close all open iterators that are consuming database resources.
      */
     public void closeAll();
+
+    /**
+     * @deprecated cast to {@link ExtentImpl} instead. This
+     * method pierces the published-API boundary, as does the SPI cast.
+     */
+    public org.apache.openjpa.kernel.Extent getDelegate();
 }

Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/FetchPlan.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/FetchPlan.java?rev=586284&r1=586283&r2=586284&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/FetchPlan.java
(original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/FetchPlan.java
Fri Oct 19 00:02:22 2007
@@ -100,6 +100,16 @@
     public FetchPlan setQueryResultCacheEnabled(boolean cache);
 
     /**
+     * @deprecated use {@link #getQueryResultCacheEnabled()} instead.
+     */
+    public boolean getQueryResultCache();
+
+    /**
+     * @deprecated use {@link #setQueryResultCacheEnabled} instead.
+     */
+    public FetchPlan setQueryResultCache(boolean cache);
+
+    /**
      * Returns the names of the fetch groups that this component will use
      * when loading objects. Defaults to the
      * <code>openjpa.FetchGroups</code> setting.
@@ -278,4 +288,10 @@
      * The lock level to use for locking dirtied objects.
      */
     public FetchPlan setWriteLockMode(LockModeType mode);
+
+    /**
+     * @deprecated cast to {@link FetchPlanImpl} instead. This
+     * method pierces the published-API boundary, as does the SPI cast.
+     */
+    public org.apache.openjpa.kernel.FetchConfiguration getDelegate();
 }

Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/FetchPlanImpl.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/FetchPlanImpl.java?rev=586284&r1=586283&r2=586284&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/FetchPlanImpl.java
(original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/FetchPlanImpl.java
Fri Oct 19 00:02:22 2007
@@ -91,6 +91,14 @@
         return this;
     }
 
+    public boolean getQueryResultCache() {
+        return getQueryResultCacheEnabled();
+    }
+
+    public FetchPlan setQueryResultCache(boolean cache) {
+        return setQueryResultCacheEnabled(cache);
+    }
+
     public Collection<String> getFetchGroups() {
         return _fetch.getFetchGroups();
     }

Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/Generator.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/Generator.java?rev=586284&r1=586283&r2=586284&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/Generator.java
(original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/Generator.java
Fri Oct 19 00:02:22 2007
@@ -51,4 +51,10 @@
      * efficiency.
      */
     public void allocate(int additional);
+
+    /**
+     * @deprecated cast to {@link GeneratorImpl} instead. This
+     * method pierces the published-API boundary, as does the SPI cast.
+     */
+    public org.apache.openjpa.kernel.Seq getDelegate();
 }

Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/OpenJPAEntityManager.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/OpenJPAEntityManager.java?rev=586284&r1=586283&r2=586284&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/OpenJPAEntityManager.java
(original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/OpenJPAEntityManager.java
Fri Oct 19 00:02:22 2007
@@ -21,18 +21,29 @@
 import java.util.Collection;
 import java.util.EnumSet;
 import javax.persistence.EntityManager;
+import javax.persistence.EntityTransaction;
 import javax.persistence.LockModeType;
 import javax.persistence.Query;
 
+import org.apache.openjpa.event.CallbackModes;
+import org.apache.openjpa.kernel.AutoClear;
+import org.apache.openjpa.kernel.AutoDetach;
+import org.apache.openjpa.kernel.ConnectionRetainModes;
+import org.apache.openjpa.kernel.DetachState;
+import org.apache.openjpa.kernel.RestoreState;
+
 /**
  * Interface implemented by OpenJPA entity managers.
  *
+ * This interface extends {@link EntityTransaction}, but this extension is
+ * deprecated.
+ *
  * @since 0.4.0
  * @author Abe White
  * @published
  */
 public interface OpenJPAEntityManager
-    extends EntityManager {
+    extends EntityManager, EntityTransaction /* deprecated */ {
 
     /**
      * Return the factory that produced this entity manager.
@@ -202,8 +213,10 @@
     /**
      * Bit flags marked in {@link AutoDetachType} which indicate when persistent
      * managed objects should be automatically detached in-place.
+     *
+     * @since 1.1.0
      */
-    public void setAutoDetach(int flag, boolean on);
+    public void setAutoDetach(AutoDetachType value, boolean on);
 
     /**
      * Whether to also evict an object from the store cache when it is
@@ -251,7 +264,7 @@
      *
      * @since 1.0.0
      */
-    public void setTrackChangesByType(boolean largeTransaction);
+    public void setTrackChangesByType(boolean track);
 
     /**
      * Put the specified key-value pair into the map of user objects. Use
@@ -820,4 +833,264 @@
 	 * Returns the current version indicator for <code>o</code>.
 	 */
 	public Object getVersion (Object o);
+
+    /**
+     * @deprecated use the {@link ConnectionRetainMode} enum instead.
+     */
+    public static final int CONN_RETAIN_DEMAND =
+        ConnectionRetainModes.CONN_RETAIN_DEMAND;
+
+    /**
+     * @deprecated use the {@link ConnectionRetainMode} enum instead.
+     */
+    public static final int CONN_RETAIN_TRANS =
+        ConnectionRetainModes.CONN_RETAIN_TRANS;
+
+    /**
+     * @deprecated use the {@link ConnectionRetainMode} enum instead.
+     */
+    public static final int CONN_RETAIN_ALWAYS =
+        ConnectionRetainModes.CONN_RETAIN_ALWAYS;
+
+    /**
+     * @deprecated use the {@link DetachStateType} enum instead.
+     */
+    public static final int DETACH_FETCH_GROUPS =
+        DetachState.DETACH_FETCH_GROUPS;
+
+    /**
+     * @deprecated use the {@link DetachStateType} enum instead.
+     */
+    public static final int DETACH_FGS = DetachState.DETACH_FGS;
+
+    /**
+     * @deprecated use the {@link DetachStateType} enum instead.
+     */
+    public static final int DETACH_LOADED = DetachState.DETACH_LOADED;
+
+    /**
+     * @deprecated use the {@link DetachStateType} enum instead.
+     */
+    public static final int DETACH_ALL = DetachState.DETACH_ALL;
+
+    /**
+     * @deprecated use the {@link RestoreStateType} enum instead.
+     */
+    public static final int RESTORE_NONE = RestoreState.RESTORE_NONE;
+
+    /**
+     * @deprecated use the {@link RestoreStateType} enum instead.
+     */
+    public static final int RESTORE_IMMUTABLE = RestoreState.RESTORE_IMMUTABLE;
+
+    /**
+     * @deprecated use the {@link RestoreStateType} enum instead.
+     */
+    public static final int RESTORE_ALL = RestoreState.RESTORE_ALL;
+
+    /**
+     * @deprecated use the {@link AutoDetachType} enum instead.
+     */
+    public static final int DETACH_CLOSE = AutoDetach.DETACH_CLOSE;
+
+    /**
+     * @deprecated use the {@link AutoDetachType} enum instead.
+     */
+    public static final int DETACH_COMMIT = AutoDetach.DETACH_COMMIT;
+
+    /**
+     * @deprecated use the {@link AutoDetachType} enum instead.
+     */
+    public static final int DETACH_NONTXREAD = AutoDetach.DETACH_NONTXREAD;
+
+    /**
+     * @deprecated use the {@link AutoDetachType} enum instead.
+     */
+    public static final int DETACH_ROLLBACK = AutoDetach.DETACH_ROLLBACK;
+
+    /**
+     * @deprecated use the {@link AutoClearType} enum instead.
+     */
+    public static final int CLEAR_DATASTORE = AutoClear.CLEAR_DATASTORE;
+
+    /**
+     * @deprecated use the {@link AutoClearType} enum instead.
+     */
+    public static final int CLEAR_ALL = AutoClear.CLEAR_ALL;
+
+    /**
+     * @deprecated use the {@link CallbackMode} enum instead.
+     */
+    public static final int CALLBACK_FAIL_FAST =
+        CallbackModes.CALLBACK_FAIL_FAST;
+
+    /**
+     * @deprecated use the {@link CallbackMode} enum instead.
+     */
+    public static final int CALLBACK_IGNORE = CallbackModes.CALLBACK_IGNORE;
+
+    /**
+     * @deprecated use the {@link CallbackMode} enum instead.
+     */
+    public static final int CALLBACK_LOG = CallbackModes.CALLBACK_LOG;
+
+    /**
+     * @deprecated use the {@link CallbackMode} enum instead.
+     */
+    public static final int CALLBACK_RETHROW = CallbackModes.CALLBACK_RETHROW;
+
+    /**
+     * @deprecated use the {@link CallbackMode} enum instead.
+     */
+    public static final int CALLBACK_ROLLBACK = CallbackModes.CALLBACK_ROLLBACK;
+
+    /**
+     * @deprecated cast to {@link OpenJPAEntityManagerSPI} instead. This
+     * method pierces the published-API boundary, as does the SPI cast.
+     */
+    public org.apache.openjpa.conf.OpenJPAConfiguration getConfiguration();
+
+    /**
+     * @deprecated use {@link #setRestoreState(RestoreStateType)} instead.
+     */
+    public void setRestoreState(int restore);
+
+    /**
+     * @deprecated use {@link #setDetachState(DetachStateType)} instead.
+     */
+    public void setDetachState(int detach);
+
+    /**
+     * @deprecated use {@link #setAutoClear(AutoClearType)} instead.
+     */
+    public void setAutoClear(int autoClear);
+
+    /**
+     * @deprecated use {@link #setAutoDetach(AutoDetachType)} or
+     * {@link #setAutoDetach(java.util.EnumSet)} instead.
+     */
+    public void setAutoDetach(int autoDetachFlags);
+
+    /**
+     * @deprecated use {@link #setAutoDetach(AutoDetachType, boolean)} instead.
+     */
+    public void setAutoDetach(int flag, boolean on);
+
+    /**
+     * @deprecated use {@link #isTrackChangesByType()} instead.
+     */
+    public boolean isLargeTransaction();
+
+    /**
+     * @deprecated use {@link #setTrackChangesByType(boolean)} instead.
+     */
+    public void setLargeTransaction(boolean value);
+
+    /**
+     * @deprecated cast to {@link OpenJPAEntityManagerSPI} instead. This
+     * method pierces the published-API boundary, as does the SPI cast.
+     */
+    public void addTransactionListener(Object listener);
+
+    /**
+     * @deprecated cast to {@link OpenJPAEntityManagerSPI} instead. This
+     * method pierces the published-API boundary, as does the SPI cast.
+     */
+    public void removeTransactionListener(Object listener);
+
+    /**
+     * @deprecated cast to {@link OpenJPAEntityManagerSPI} instead. This
+     * method pierces the published-API boundary, as does the SPI cast.
+     */
+    public int getTransactionListenerCallbackMode();
+
+    /**
+     * @deprecated cast to {@link OpenJPAEntityManagerSPI} instead. This
+     * method pierces the published-API boundary, as does the SPI cast.
+     */
+    public void setTransactionListenerCallbackMode(int callbackMode);
+
+    /**
+     * @deprecated cast to {@link OpenJPAEntityManagerSPI} instead. This
+     * method pierces the published-API boundary, as does the SPI cast.
+     */
+    public void addLifecycleListener(Object listener, Class... classes);
+
+    /**
+     * @deprecated cast to {@link OpenJPAEntityManagerSPI} instead. This
+     * method pierces the published-API boundary, as does the SPI cast.
+     */
+    public void removeLifecycleListener(Object listener);
+
+    /**
+     * @deprecated cast to {@link OpenJPAEntityManagerSPI} instead. This
+     * method pierces the published-API boundary, as does the SPI cast.
+     */
+    public int getLifecycleListenerCallbackMode();
+
+    /**
+     * @deprecated cast to {@link OpenJPAEntityManagerSPI} instead. This
+     * method pierces the published-API boundary, as does the SPI cast.
+     */
+    public void setLifecycleListenerCallbackMode(int callbackMode);
+
+    /**
+     * @deprecated use {@link EntityTransaction#begin}
+     * instead: <code>em.getTransaction().begin()</code>
+     */
+    public void begin();
+
+    /**
+     * @deprecated use {@link EntityTransaction#commit}
+     * instead: <code>em.getTransaction().commit()</code>
+     */
+    public void commit();
+
+    /**
+     * @deprecated use {@link EntityTransaction#rollback}
+     * instead: <code>em.getTransaction().rollback()</code>
+     */
+    public void rollback();
+
+    /**
+     * @deprecated use {@link EntityTransaction#isActive}
+     * instead: <code>em.getTransaction().isActive()</code>
+     */
+    public boolean isActive();
+
+    /**
+     * @deprecated use {@link OpenJPAEntityTransaction#commitAndResume} instead:
+     * <code>em.getTransaction().commitAndResume()</code>
+     */
+    public void commitAndResume();
+
+    /**
+     * @deprecated use {@link OpenJPAEntityTransaction#rollbackAndResume}
+     * instead: <code>em.getTransaction().rollbackAndResume()</code>
+     */
+    public void rollbackAndResume();
+
+    /**
+     * @deprecated use {@link EntityTransaction#setRollbackOnly}
+     * instead: <code>em.getTransaction().setRollbackOnly()</code>
+     */
+    public void setRollbackOnly();
+
+    /**
+     * @deprecated use {@link OpenJPAEntityTransaction#setRollbackOnly}
+     * instead: <code>em.getTransaction().setRollbackOnly()</code>
+     */
+    public void setRollbackOnly(Throwable cause);
+
+    /**
+     * @deprecated use {@link OpenJPAEntityTransaction#getRollbackCause}
+     * instead: <code>em.getTransaction().getRollbackCause()</code>
+     */
+    public Throwable getRollbackCause();
+
+    /**
+     * @deprecated use {@link EntityTransaction#getRollbackOnly}
+     * instead: <code>em.getTransaction().getRollbackOnly()</code>
+     */
+    public boolean getRollbackOnly();
 }

Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/OpenJPAEntityManagerFactory.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/OpenJPAEntityManagerFactory.java?rev=586284&r1=586283&r2=586284&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/OpenJPAEntityManagerFactory.java
(original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/OpenJPAEntityManagerFactory.java
Fri Oct 19 00:02:22 2007
@@ -78,4 +78,49 @@
      * </ul>
      */
     public OpenJPAEntityManager createEntityManager(Map props);
+
+    /**
+     * @deprecated use {@link ConnectionRetainMode} enums instead.
+     */
+    public static final int CONN_RETAIN_DEMAND = 0;
+
+    /**
+     * @deprecated use {@link ConnectionRetainMode} enums instead.
+     */
+    public static final int CONN_RETAIN_TRANS = 1;
+
+    /**
+     * @deprecated use {@link ConnectionRetainMode} enums instead.
+     */
+    public static final int CONN_RETAIN_ALWAYS = 2;
+
+    /**
+     * @deprecated cast to {@link OpenJPAEntityManagerFactorySPI} instead. This
+     * method pierces the published-API boundary, as does the SPI cast.
+     */
+    public org.apache.openjpa.conf.OpenJPAConfiguration getConfiguration();
+
+    /**
+     * @deprecated cast to {@link OpenJPAEntityManagerFactorySPI} instead. This
+     * method pierces the published-API boundary, as does the SPI cast.
+     */
+    public void addLifecycleListener(Object listener, Class... classes);
+
+    /**
+     * @deprecated cast to {@link OpenJPAEntityManagerFactorySPI} instead. This
+     * method pierces the published-API boundary, as does the SPI cast.
+     */
+    public void removeLifecycleListener(Object listener);
+
+    /**
+     * @deprecated cast to {@link OpenJPAEntityManagerFactorySPI} instead. This
+     * method pierces the published-API boundary, as does the SPI cast.
+     */
+    public void addTransactionListener(Object listener);
+
+    /**
+     * @deprecated cast to {@link OpenJPAEntityManagerFactorySPI} instead. This
+     * method pierces the published-API boundary, as does the SPI cast.
+     */
+    public void removeTransactionListener(Object listener);
 }

Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/OpenJPAEntityManagerSPI.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/OpenJPAEntityManagerSPI.java?rev=586284&r1=586283&r2=586284&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/OpenJPAEntityManagerSPI.java
(original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/OpenJPAEntityManagerSPI.java
Fri Oct 19 00:02:22 2007
@@ -53,8 +53,10 @@
     /**
      * The {@link CallbackMode} flags for handling transaction listener
      * exceptions.
+     *
+     * @since 1.1.0
      */
-    public EnumSet<CallbackMode> getTransactionListenerCallbackMode();
+    public EnumSet<CallbackMode> getTransactionListenerCallbackModes();
 
     /**
      * The {@link CallbackMode} flag for handling transaction listener
@@ -85,8 +87,10 @@
     /**
      * The {@link CallbackMode} flags for handling lifecycle listener
      * exceptions.
+     *
+     * @since 1.1.0
      */
-    public EnumSet<CallbackMode> getLifecycleListenerCallbackMode();
+    public EnumSet<CallbackMode> getLifecycleListenerCallbackModes();
 
     /**
      * The {@link CallbackMode} flag for handling lifecycle listener

Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/OpenJPAPersistence.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/OpenJPAPersistence.java?rev=586284&r1=586283&r2=586284&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/OpenJPAPersistence.java
(original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/OpenJPAPersistence.java
Fri Oct 19 00:02:22 2007
@@ -18,6 +18,7 @@
  */
 package org.apache.openjpa.persistence;
 
+import java.util.Collection;
 import java.util.Map;
 import javax.naming.Context;
 import javax.naming.InitialContext;
@@ -196,5 +197,123 @@
         } catch (Exception e) {
             throw PersistenceExceptions.toPersistenceException(e);
         }
+    }
+
+    /**
+     * @deprecated use {@link JPAFacadeHelper} instead. This method pierces
+     * the published-API boundary, as does the JPAFacadeHelper utilization.
+     */
+    public static final String EM_KEY =
+        "org.apache.openjpa.persistence.EntityManager";
+
+    /**
+     * @deprecated use {@link JPAFacadeHelper} instead. This method pierces
+     * the published-API boundary, as does the JPAFacadeHelper utilization.
+     */
+    public static final String EMF_KEY =
+        "org.apache.openjpa.persistence.EntityManagerFactory";
+
+    /**
+     * @deprecated use {@link JPAFacadeHelper} instead. This method pierces
+     * the published-API boundary, as does the JPAFacadeHelper utilization.
+     */
+    public static OpenJPAEntityManagerFactory toEntityManagerFactory(
+        org.apache.openjpa.kernel.BrokerFactory factory) {
+        return JPAFacadeHelper.toEntityManagerFactory(factory);
+    }
+
+    /**
+     * @deprecated use {@link JPAFacadeHelper} instead. This method pierces
+     * the published-API boundary, as does the JPAFacadeHelper utilization.
+     */
+    public static org.apache.openjpa.kernel.BrokerFactory toBrokerFactory(
+        EntityManagerFactory factory) {
+        return JPAFacadeHelper.toBrokerFactory(factory);
+    }
+
+    /**
+     * @deprecated use {@link JPAFacadeHelper} instead. This method pierces
+     * the published-API boundary, as does the JPAFacadeHelper utilization.
+     */
+    public static OpenJPAEntityManager toEntityManager(
+        org.apache.openjpa.kernel.Broker broker) {
+        return JPAFacadeHelper.toEntityManager(broker);
+    }
+
+    /**
+     * @deprecated use {@link JPAFacadeHelper} instead. This method pierces
+     * the published-API boundary, as does the JPAFacadeHelper utilization.
+     */
+    public static Broker toBroker(EntityManager em) {
+        return JPAFacadeHelper.toBroker(em);
+    }
+
+    /**
+     * @deprecated use {@link JPAFacadeHelper} instead. This method pierces
+     * the published-API boundary, as does the JPAFacadeHelper utilization.
+     */
+    public static org.apache.openjpa.meta.ClassMetaData getMetaData(Object o) {
+        return JPAFacadeHelper.getMetaData(o);
+    }
+
+    /**
+     * @deprecated use {@link JPAFacadeHelper} instead. This method pierces
+     * the published-API boundary, as does the JPAFacadeHelper utilization.
+     */
+    public static org.apache.openjpa.meta.ClassMetaData getMetaData(
+        EntityManager em, Class cls) {
+        return JPAFacadeHelper.getMetaData(em, cls);
+    }
+
+    /**
+     * @deprecated use {@link JPAFacadeHelper} instead. This method pierces
+     * the published-API boundary, as does the JPAFacadeHelper utilization.
+     */
+    public static org.apache.openjpa.meta.ClassMetaData getMetaData(
+        EntityManagerFactory factory, Class cls) {
+        return JPAFacadeHelper.getMetaData(factory, cls);
+    }
+
+    /**
+     * @deprecated use {@link JPAFacadeHelper} instead. This method pierces
+     * the published-API boundary, as does the JPAFacadeHelper utilization.
+     */
+    public static Object fromOpenJPAObjectId(Object oid) {
+        return JPAFacadeHelper.fromOpenJPAObjectId(oid);
+    }
+
+    /**
+     * @deprecated use {@link JPAFacadeHelper} instead. This method pierces
+     * the published-API boundary, as does the JPAFacadeHelper utilization.
+     */
+    public static Object toOpenJPAObjectId(
+        org.apache.openjpa.meta.ClassMetaData meta, Object oid) {
+        return JPAFacadeHelper.toOpenJPAObjectId(meta, oid);
+    }
+
+    /**
+     * @deprecated use {@link JPAFacadeHelper} instead. This method pierces
+     * the published-API boundary, as does the JPAFacadeHelper utilization.
+     */
+    public static Object[] toOpenJPAObjectIds(
+        org.apache.openjpa.meta.ClassMetaData meta, Object... oids) {
+        return JPAFacadeHelper.toOpenJPAObjectIds(meta, oids);
+    }
+
+    /**
+     * @deprecated use {@link JPAFacadeHelper} instead. This method pierces
+     * the published-API boundary, as does the JPAFacadeHelper utilization.
+     */
+    public static Collection toOpenJPAObjectIds(
+        org.apache.openjpa.meta.ClassMetaData meta, Collection oids) {
+        return JPAFacadeHelper.toOpenJPAObjectIds(meta, oids);
+    }
+
+    /**
+     * @deprecated use {@link JPAFacadeHelper} instead. This method pierces
+     * the published-API boundary, as does the JPAFacadeHelper utilization.
+     */
+    public static Class fromOpenJPAObjectIdClass(Class oidClass) {
+        return JPAFacadeHelper.fromOpenJPAObjectIdClass(oidClass);
     }
 }

Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/OpenJPAQuery.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/OpenJPAQuery.java?rev=586284&r1=586283&r2=586284&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/OpenJPAQuery.java
(original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/OpenJPAQuery.java
Fri Oct 19 00:02:22 2007
@@ -26,7 +26,9 @@
 import javax.persistence.Query;
 import javax.persistence.TemporalType;
 
+import org.apache.openjpa.kernel.QueryFlushModes;
 import org.apache.openjpa.kernel.QueryHints;
+import org.apache.openjpa.kernel.QueryOperations;
 
 /**
  * Interface implemented by OpenJPA queries.
@@ -194,4 +196,63 @@
      * Return the current flush mode.
 	 */
 	public FlushModeType getFlushMode ();
+
+    /**
+     * @deprecated use the {@link QueryOperationType} instead.
+     */
+    public static final int OP_SELECT = QueryOperations.OP_SELECT;
+
+    /**
+     * @deprecated use the {@link QueryOperationType} instead.
+     */
+    public static final int OP_DELETE = QueryOperations.OP_DELETE;
+
+    /**
+     * @deprecated use the {@link QueryOperationType} instead.
+     */
+    public static final int OP_UPDATE = QueryOperations.OP_DELETE;
+
+    /**
+     * @deprecated use the {@link FlushModeType} enum instead.
+     */
+    public static final int FLUSH_TRUE = QueryFlushModes.FLUSH_TRUE;
+
+    /**
+     * @deprecated use the {@link FlushModeType} enum instead.
+     */
+    public static final int FLUSH_FALSE = QueryFlushModes.FLUSH_FALSE;
+
+    /**
+     * @deprecated use the {@link FlushModeType} enum instead.
+     */
+    public static final int FLUSH_WITH_CONNECTION =
+        QueryFlushModes.FLUSH_WITH_CONNECTION;
+
+    /**
+     * @deprecated cast to {@link QueryImpl} instead. This
+     * method pierces the published-API boundary, as does the SPI cast.
+     */
+    public OpenJPAQuery addFilterListener(
+        org.apache.openjpa.kernel.exps.FilterListener listener);
+
+    /**
+     * @deprecated cast to {@link QueryImpl} instead. This
+     * method pierces the published-API boundary, as does the SPI cast.
+     */
+    public OpenJPAQuery removeFilterListener(
+        org.apache.openjpa.kernel.exps.FilterListener listener);
+
+    /**
+     * @deprecated cast to {@link QueryImpl} instead. This
+     * method pierces the published-API boundary, as does the SPI cast.
+     */
+    public OpenJPAQuery addAggregateListener(
+        org.apache.openjpa.kernel.exps.AggregateListener listener);
+
+    /**
+     * @deprecated cast to {@link QueryImpl} instead. This
+     * method pierces the published-API boundary, as does the SPI cast.
+     */
+    public OpenJPAQuery removeAggregateListener(
+        org.apache.openjpa.kernel.exps.AggregateListener listener);
 }

Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/QueryResultCache.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/QueryResultCache.java?rev=586284&r1=586283&r2=586284&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/QueryResultCache.java
(original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/QueryResultCache.java
Fri Oct 19 00:02:22 2007
@@ -55,4 +55,10 @@
      * Evict all result for queries involving the given class.
      */
     public void evictAll(Class cls);
+
+    /**
+     * @deprecated cast to {@link QueryResultCacheImpl} instead. This
+     * method pierces the published-API boundary, as does the SPI cast.
+     */
+    public QueryCache getDelegate();
 }

Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/StoreCache.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/StoreCache.java?rev=586284&r1=586283&r2=586284&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/StoreCache.java
(original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/StoreCache.java
Fri Oct 19 00:02:22 2007
@@ -96,4 +96,10 @@
      * Clear the cache.
      */
     public void evictAll();
+
+    /**
+     * @deprecated cast to {@link StoreCacheImpl} instead. This
+     * method pierces the published-API boundary, as does the SPI cast.
+     */
+    public DataCache getDelegate();
 }



Mime
View raw message