db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m..@apache.org
Subject svn commit: r580742 - in /db/jdo/trunk/runtime20/src/java/org/apache/jdo/impl/pm: PersistenceManagerFactoryImpl.java PersistenceManagerImpl.java PersistenceManagerWrapper.java
Date Sun, 30 Sep 2007 15:53:57 GMT
Author: mbo
Date: Sun Sep 30 08:53:56 2007
New Revision: 580742

URL: http://svn.apache.org/viewvc?rev=580742&view=rev
Log:
Added dummy implementations of PM.evictAll and the properties copyOnAttach and name to the
PM and PMF implementations

Modified:
    db/jdo/trunk/runtime20/src/java/org/apache/jdo/impl/pm/PersistenceManagerFactoryImpl.java
    db/jdo/trunk/runtime20/src/java/org/apache/jdo/impl/pm/PersistenceManagerImpl.java
    db/jdo/trunk/runtime20/src/java/org/apache/jdo/impl/pm/PersistenceManagerWrapper.java

Modified: db/jdo/trunk/runtime20/src/java/org/apache/jdo/impl/pm/PersistenceManagerFactoryImpl.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/runtime20/src/java/org/apache/jdo/impl/pm/PersistenceManagerFactoryImpl.java?rev=580742&r1=580741&r2=580742&view=diff
==============================================================================
--- db/jdo/trunk/runtime20/src/java/org/apache/jdo/impl/pm/PersistenceManagerFactoryImpl.java
(original)
+++ db/jdo/trunk/runtime20/src/java/org/apache/jdo/impl/pm/PersistenceManagerFactoryImpl.java
Sun Sep 30 08:53:56 2007
@@ -550,6 +550,27 @@
         return detachAllOnCommit;
     }
 
+    /** Gets the default copyOnAttach setting for all
+     * <code>PersistenceManager</code> instances obtained from this
+     * factory.
+     * @since 2.1
+     * @return the copyOnAttach setting.
+     */
+    public boolean getCopyOnAttach() {
+        throw new UnsupportedOperationException(
+            "Method getCopyOnAttach() not yet implemented");
+    }
+    
+    /** Sets the default copyOnAttach setting for all
+     * <code>PersistenceManager</code> instances obtained from this
+     * factory.
+     * @since 2.1
+     */
+    public void setCopyOnAttach(boolean flag) {
+        throw new UnsupportedOperationException(
+            "Method setCopyOnAttach(boolean) not yet implemented");
+    }
+
     /** Set the default MsWait setting for all PersistenceManager instances
      * obtained from this factory.
      * @param msWait the default MsWait setting.
@@ -633,6 +654,26 @@
      */
     public int getUpdateTimeout() {
         return updateTimeout;
+    }
+    
+    /**
+     * Sets the name of this PersistenceManagerFactory.
+     * @since 2.1
+     * @param name the name of this PMF
+     */
+    public void setName(String name) {
+        throw new UnsupportedOperationException(
+            "Method setName(String) not yet implemented");
+    }
+    
+    /**
+     * Gets the name of this PersistenceManagerFactory.
+     * @since 2.1
+     * @return the name of this PMF
+     */
+    public String getName() {
+        throw new UnsupportedOperationException(
+            "Method getName() not yet implemented");
     }
     
     /**

Modified: db/jdo/trunk/runtime20/src/java/org/apache/jdo/impl/pm/PersistenceManagerImpl.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/runtime20/src/java/org/apache/jdo/impl/pm/PersistenceManagerImpl.java?rev=580742&r1=580741&r2=580742&view=diff
==============================================================================
--- db/jdo/trunk/runtime20/src/java/org/apache/jdo/impl/pm/PersistenceManagerImpl.java (original)
+++ db/jdo/trunk/runtime20/src/java/org/apache/jdo/impl/pm/PersistenceManagerImpl.java Sun
Sep 30 08:53:56 2007
@@ -312,6 +312,25 @@
         return _detachAllOnCommit;
     }
 
+    /** Gets the copyOnAttach setting.
+     * @see javax.jdo.PersistenceManager#getCopyOnAttach()
+     * @since 2.1
+     * @return the copyOnAttach setting.
+     */
+    public boolean getCopyOnAttach() {
+        throw new UnsupportedOperationException(
+            "Method getCopyOnAttach() not yet implemented");
+    }
+
+    /** Sets the copyOnAttach setting.
+     * @see javax.jdo.PersistenceManager#setCopyOnAttach(boolean flag)
+     * @since 2.1
+     */
+    public void setCopyOnAttach(boolean flag) {
+        throw new UnsupportedOperationException(
+            "Method setCopyOnAttach(boolean) not yet implemented");
+    }
+
     /** Set the Multithreaded flag for this PersistenceManager.  Applications
      * that use multiple threads to invoke methods or access fields from 
      * instances managed by this PersistenceManager must set this flag to true.
@@ -1106,6 +1125,16 @@
 
         assertIsOpen();
         evictAllInternal(pcs.toArray());
+    }
+
+    /** Mark the parameter instances as no longer needed in the cache.
+     * @param pcClass the class of instances to evict
+     * @param subclasses if true, mark instances of subclasses also
+     * @since 2.1
+     */
+    public void evictAll(Class pcClass, boolean subclasses) {
+        throw new UnsupportedOperationException(
+            "Method evictAll(Class pcClass, boolean subclasses) not yet implemented");
     }
 
     /** Mark all persistent-nontransactional instances as no longer needed

Modified: db/jdo/trunk/runtime20/src/java/org/apache/jdo/impl/pm/PersistenceManagerWrapper.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/runtime20/src/java/org/apache/jdo/impl/pm/PersistenceManagerWrapper.java?rev=580742&r1=580741&r2=580742&view=diff
==============================================================================
--- db/jdo/trunk/runtime20/src/java/org/apache/jdo/impl/pm/PersistenceManagerWrapper.java
(original)
+++ db/jdo/trunk/runtime20/src/java/org/apache/jdo/impl/pm/PersistenceManagerWrapper.java
Sun Sep 30 08:53:56 2007
@@ -153,6 +153,30 @@
     }
 
     /**
+     * @see javax.jdo.PersistenceManager#setIgnoreCache(boolean flag)
+     */
+    public void setCopyOnAttach(boolean flag) {
+        if (isValid) {
+            pm.setCopyOnAttach(flag);
+        } else {
+            throw new JDOFatalUserException(msg.msg(
+                "EXC_PersistenceManagerClosed"));// NOI18N
+        }
+    }
+
+    /**
+     * @see javax.jdo.PersistenceManager#getCopyOnAttach()
+     */
+    public boolean getCopyOnAttach() {
+        if (isValid) {
+            return pm.getCopyOnAttach();
+        } else {
+            throw new JDOFatalUserException(msg.msg(
+                "EXC_PersistenceManagerClosed"));// NOI18N
+        }
+    }
+
+    /**
      * @see javax.jdo.PersistenceManager#getMultithreaded()
      */
     public boolean getMultithreaded() {
@@ -206,6 +230,18 @@
     public  void evictAll(Collection pcs) {
         if (isValid) {
             pm.evictAll(pcs);
+        } else {
+            throw new JDOFatalUserException(msg.msg(
+                "EXC_PersistenceManagerClosed"));// NOI18N
+        }
+    }
+
+    /**
+     * @see javax.jdo.PersistenceManager#evictAll(Class pcClass, boolean subclasses)
+     */
+    public  void evictAll(Class pcClass, boolean subclasses) {
+        if (isValid) {
+            pm.evictAll(pcClass, subclasses);
         } else {
             throw new JDOFatalUserException(msg.msg(
                 "EXC_PersistenceManagerClosed"));// NOI18N



Mime
View raw message