db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From an...@apache.org
Subject svn commit: r739772 - /db/jdo/trunk/api2/src/java/javax/jdo/JDOEnhancer.java
Date Sun, 01 Feb 2009 15:01:04 GMT
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



Mime
View raw message