You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jdo-commits@db.apache.org by an...@apache.org on 2009/02/01 16:01:04 UTC

svn commit: r739772 - /db/jdo/trunk/api2/src/java/javax/jdo/JDOEnhancer.java

Author: andyj
Date: Sun Feb  1 15:01:03 2009
New Revision: 739772

URL: http://svn.apache.org/viewvc?rev=739772&view=rev
Log:
JDO-591 add methods to get new metadata and to register the metadata with the enhancement process - equivalent to what we have on the PMF for the persistence process. Note that I've not added a getMetadata() method to view metadata of known classes, since the enhancement process will typically only load these when we need to enhance, whereas the persistence process loads when encountered for the first time

Modified:
    db/jdo/trunk/api2/src/java/javax/jdo/JDOEnhancer.java

Modified: db/jdo/trunk/api2/src/java/javax/jdo/JDOEnhancer.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/JDOEnhancer.java?rev=739772&r1=739771&r2=739772&view=diff
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/JDOEnhancer.java (original)
+++ db/jdo/trunk/api2/src/java/javax/jdo/JDOEnhancer.java Sun Feb  1 15:01:03 2009
@@ -19,6 +19,8 @@
 import java.lang.instrument.ClassFileTransformer;
 import java.util.Properties;
 
+import javax.jdo.metadata.JDOMetadata;
+
 /**
  * Interface for a JDO Enhancer.
  * @since 2.3
@@ -127,4 +129,23 @@
      * @return Enhanced bytes
      */
     byte[] getEnhancedBytes(String className);
+
+    /**
+     * Method to register metadata with the enhancement process managed by this
+     * <code>JDOEnhancer</code>.
+     * Metadata can be created using the method {@link #newMetadata}.
+     * If there is already metadata registered for a class contained in this metadata
+     * object then a JDOUserException will be thrown.
+     * @param metadata The Metadata to register.
+     * @since 2.3
+     */
+    void registerMetadata(JDOMetadata metadata);
+
+    /**
+     * Method to return a new metadata object that can be subsequently modified
+     * and registered with the enhancement process using the method {@link #registerMetadata}.
+     * @return The metadata
+     * @since 2.3
+     */
+    JDOMetadata newMetadata();
 }
\ No newline at end of file