openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwsut...@apache.org
Subject svn commit: r447584 [7/8] - in /incubator/openjpa/sandboxes/OPENJPA-24: ./ openjpa-all/ openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/ openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/ openjpa-jdbc/src/main/java/org/apache/openjpa/jd...
Date Mon, 18 Sep 2006 21:58:05 GMT
Modified: incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/FetchPlanImpl.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/FetchPlanImpl.java?view=diff&rev=447584&r1=447583&r2=447584
==============================================================================
--- incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/FetchPlanImpl.java (original)
+++ incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/FetchPlanImpl.java Mon Sep 18 14:57:52 2006
@@ -23,7 +23,6 @@
 
 import org.apache.openjpa.kernel.DelegatingFetchConfiguration;
 import org.apache.openjpa.kernel.FetchConfiguration;
-import org.apache.openjpa.meta.FetchGroup;
 
 /**
  * Implements FetchPlan via delegation to FetchConfiguration.
@@ -62,280 +61,148 @@
         return _fetch.getDelegate();
     }
 
-    /**
-     * The maximum fetch depth when loading an object.
-     */
     public int getMaxFetchDepth() {
         return _fetch.getMaxFetchDepth();
     }
 
-    /**
-     * The maximum fetch depth when loading an object.
-     */
     public FetchPlan setMaxFetchDepth(int depth) {
         _fetch.setMaxFetchDepth(depth);
         return this;
     }
 
-    /**
-     * Return the fetch batch size for large result set support.
-     * Defaults to the	<code>openjpa.FetchBatchSize</code> setting. Note
-     * that this property will be ignored under some data stores.
-     */
     public int getFetchBatchSize() {
         return _fetch.getFetchBatchSize();
     }
 
-    /**
-     * Set the fetch batch size for large result set support.
-     * Defaults to the	<code>openjpa.FetchBatchSize</code> setting. Note
-     * that this property will be ignored under some data stores.
-     */
     public FetchPlan setFetchBatchSize(int fetchBatchSize) {
         _fetch.setFetchBatchSize(fetchBatchSize);
         return this;
     }
 
-    /**
-     * Return whether or not query caching is enabled. If this returns
-     * <code>true</code> but the datacache plugin is not installed, caching
-     * will not be enabled. If this
-     * returns <code>false</code>, query caching will not be used
-     * even if the datacache plugin is installed.
-     */
     public boolean getQueryResultCache() {
         return _fetch.getQueryCache();
     }
 
-    /**
-     * Control whether or not query caching is enabled. This has no effect
-     * if the datacache plugin is not installed, or if the query cache size
-     * is set to zero.
-     */
     public FetchPlan setQueryResultCache(boolean cache) {
         _fetch.setQueryCache(cache);
         return this;
     }
 
-    /**
-     * Returns the names of the fetch groups that this component will use
-     * when loading objects. Defaults to the
-     * <code>org.apache.openjpa.FetchGroups</code> setting.
-     */
     public Collection<String> getFetchGroups() {
         return _fetch.getFetchGroups();
     }
 
-    /**
-     * Adds <code>group</code> to the set of fetch group to
-     * use when loading objects.
-     */
     public FetchPlan addFetchGroup(String group) {
         _fetch.addFetchGroup(group);
         return this;
     }
 
-    /**
-     * Adds <code>groups</code> to the set of fetch group names to
-     * use when loading objects.
-     */
     public FetchPlan addFetchGroups(String... groups) {
         return addFetchGroups(Arrays.asList(groups));
     }
 
-    /**
-     * Adds <code>groups</code> to the set of fetch group names to
-     * use when loading objects.
-     */
     public FetchPlan addFetchGroups(Collection groups) {
         _fetch.addFetchGroups(groups);
         return this;
     }
 
-    /**
-     * Remove the given fetch group.
-     */
     public FetchPlan removeFetchGroup(String group) {
         _fetch.removeFetchGroup(group);
         return this;
     }
 
-    /**
-     * Removes <code>groups</code> from the set of fetch group names
-     * to use when loading objects.
-     */
     public FetchPlan removeFetchGroups(String... groups) {
         return removeFetchGroups(Arrays.asList(groups));
     }
 
-    /**
-     * Removes <code>groups</code> from the set of fetch group names
-     * to use when loading objects.
-     */
     public FetchPlan removeFetchGroups(Collection groups) {
         _fetch.removeFetchGroups(groups);
         return this;
     }
 
-    /**
-     * Clears the set of fetch group names to use wen loading
-     * data. After this operation is invoked, only those fields in
-     * the default fetch group (and any requested field) will be
-     * loaded when loading an object.
-     */
     public FetchPlan clearFetchGroups() {
         _fetch.clearFetchGroups();
         return this;
     }
 
-    /**
-     * Resets the set of fetch groups to the list in the global configuration.
-     */
     public FetchPlan resetFetchGroups() {
         _fetch.resetFetchGroups();
         return this;
     }
 
-    /**
-     * Returns the fully qualified names of the fields that this component
-     * will use when loading objects. Defaults to the empty set.
-     */
     public Collection<String> getFields() {
         return (Collection<String>) _fetch.getFields();
     }
 
-    /**
-     * Return true if the given field has been added.
-     */
     public boolean hasField(String field) {
         return _fetch.hasField(field);
     }
 
-    /**
-     * Return true if the given field has been added.
-     */
     public boolean hasField(Class cls, String field) {
         return hasField(toFieldName(cls, field));
     }
 
-    /**
-     * Adds <code>field</code> to the set of fully-qualified field names to
-     * use when loading objects.
-     */
     public FetchPlan addField(String field) {
         _fetch.addField(field);
         return this;
     }
 
-    /**
-     * Adds <code>field</code> to the set of field names to
-     * use when loading objects.
-     */
     public FetchPlan addField(Class cls, String field) {
         return addField(toFieldName(cls, field));
     }
 
-    /**
-     * Adds <code>fields</code> to the set of fully-qualified field names to
-     * use when loading objects.
-     */
     public FetchPlan addFields(String... fields) {
         return addFields(Arrays.asList(fields));
     }
 
-    /**
-     * Adds <code>fields</code> to the set of field names to
-     * use when loading objects.
-     */
     public FetchPlan addFields(Class cls, String... fields) {
         return addFields(cls, Arrays.asList(fields));
     }
 
-    /**
-     * Adds <code>fields</code> to the set of fully-qualified field names to
-     * use when loading objects.
-     */
     public FetchPlan addFields(Collection fields) {
         _fetch.addFields(fields);
         return this;
     }
 
-    /**
-     * Adds <code>fields</code> to the set of field names to
-     * use when loading objects.
-     */
     public FetchPlan addFields(Class cls, Collection fields) {
         return addFields(toFieldNames(cls, fields));
     }
 
-    /**
-     * Remove the given fully-qualified field.
-     */
     public FetchPlan removeField(String field) {
         _fetch.removeField(field);
         return this;
     }
 
-    /**
-     * Remove the given field.
-     */
     public FetchPlan removeField(Class cls, String field) {
         return removeField(toFieldName(cls, field));
     }
 
-    /**
-     * Removes <code>fields</code> from the set of fully-qualified field names
-     * to use when loading objects.
-     */
     public FetchPlan removeFields(String... fields) {
         return removeFields(Arrays.asList(fields));
     }
 
-    /**
-     * Removes <code>fields</code> from the set of field names
-     * to use when loading objects.
-     */
     public FetchPlan removeFields(Class cls, String... fields) {
         return removeFields(cls, Arrays.asList(fields));
     }
 
-    /**
-     * Removes <code>fields</code> from the set of fully-qualified field names
-     * to use when loading objects.
-     */
     public FetchPlan removeFields(Collection fields) {
         _fetch.removeFields(fields);
         return this;
     }
 
-    /**
-     * Removes <code>fields</code> from the set of field names
-     * to use when loading objects.
-     */
     public FetchPlan removeFields(Class cls, Collection fields) {
         return removeFields(toFieldNames(cls, fields));
     }
 
-    /**
-     * Clears the set of field names to use wen loading
-     * data. After this operation is invoked, only those fields in
-     * the configured fetch groups will be loaded when loading an object.
-     */
     public FetchPlan clearFields() {
         _fetch.clearFields();
         return this;
     }
 
-    /**
-     * Combine the class and field to a fully-qualified field name.
-     */
     private static String toFieldName(Class cls, String field) {
         return cls.getName() + "." + field;
     }
 
-    /**
-     * Combine the class and fields to fully-qualified field names.
-     */
     private static Collection toFieldNames(Class cls, Collection fields) {
         if (fields.isEmpty())
             return fields;
@@ -345,48 +212,28 @@
         return names;
     }
 
-    /**
-     * The number of milliseconds to wait for an object lock, or -1 for no
-     * limit.
-     */
     public int getLockTimeout() {
         return _fetch.getLockTimeout();
     }
 
-    /**
-     * The number of milliseconds to wait for an object lock, or -1 for no
-     * limit.
-     */
     public FetchPlan setLockTimeout(int timeout) {
         _fetch.setLockTimeout(timeout);
         return this;
     }
 
-    /**
-     * The lock level to use for locking loaded objects.
-     */
     public LockModeType getReadLockMode() {
         return EntityManagerImpl.fromLockLevel(_fetch.getReadLockLevel());
     }
 
-    /**
-     * The lock level to use for locking loaded objects.
-     */
     public FetchPlan setReadLockMode(LockModeType mode) {
         _fetch.setReadLockLevel(EntityManagerImpl.toLockLevel(mode));
         return this;
     }
 
-    /**
-     * The lock level to use for locking dirtied objects.
-     */
     public LockModeType getWriteLockMode() {
         return EntityManagerImpl.fromLockLevel(_fetch.getWriteLockLevel());
     }
 
-    /**
-     * The lock level to use for locking dirtied objects.
-     */
     public FetchPlan setWriteLockMode(LockModeType mode) {
         _fetch.setWriteLockLevel(EntityManagerImpl.toLockLevel(mode));
         return this;

Modified: incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/Generator.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/Generator.java?view=diff&rev=447584&r1=447583&r2=447584
==============================================================================
--- incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/Generator.java (original)
+++ incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/Generator.java Mon Sep 18 14:57:52 2006
@@ -15,16 +15,12 @@
  */
 package org.apache.openjpa.persistence;
 
-import org.apache.openjpa.kernel.DelegatingSeq;
 import org.apache.openjpa.kernel.Seq;
-import org.apache.openjpa.kernel.StoreContext;
-import org.apache.openjpa.meta.ClassMetaData;
 
 /**
  * Represents a store sequence.
  *
  * @author Abe White
- * @author Pinaki Poddar
  * @since 0.4.1
  * @published
  */

Modified: incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/GeneratorImpl.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/GeneratorImpl.java?view=diff&rev=447584&r1=447583&r2=447584
==============================================================================
--- incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/GeneratorImpl.java (original)
+++ incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/GeneratorImpl.java Mon Sep 18 14:57:52 2006
@@ -24,7 +24,6 @@
  * Represents a store sequence.
  *
  * @author Abe White
- * @author Pinaki Poddar
  * @since 0.4.1
  * @nojavadoc
  */

Modified: incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/OpenJPAPersistence.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/OpenJPAPersistence.java?view=diff&rev=447584&r1=447583&r2=447584
==============================================================================
--- incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/OpenJPAPersistence.java (original)
+++ incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/OpenJPAPersistence.java Mon Sep 18 14:57:52 2006
@@ -152,8 +152,7 @@
     public static OpenJPAEntityManager cast(EntityManager em) {
         if (em instanceof OpenJPAEntityManager)
             return (OpenJPAEntityManager) em;
-        else
-            return (OpenJPAEntityManager) em.getDelegate();
+        return (OpenJPAEntityManager) em.getDelegate();
     }
 
     /**
@@ -181,8 +180,7 @@
     public static OpenJPAEntityManagerFactory getEntityManagerFactory(Map map) {
         ConfigurationProvider cp = new MapConfigurationProvider(map);
         try {
-            return toEntityManagerFactory(Bootstrap.getBrokerFactory
-                (cp, null));
+            return toEntityManagerFactory(Bootstrap.getBrokerFactory(cp, null));
         } catch (Exception e) {
             throw PersistenceExceptions.toPersistenceException(e);
         }
@@ -257,8 +255,7 @@
             if (o instanceof PersistenceCapable)
                 return toEntityManager((Broker) ((PersistenceCapable) o).
                     pcGetGenericContext());
-            else
-                return null;
+            return null;
         } catch (Exception e) {
             throw PersistenceExceptions.toPersistenceException(e);
         }

Modified: incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceMetaDataFactory.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceMetaDataFactory.java?view=diff&rev=447584&r1=447583&r2=447584
==============================================================================
--- incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceMetaDataFactory.java (original)
+++ incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceMetaDataFactory.java Mon Sep 18 14:57:52 2006
@@ -30,6 +30,8 @@
 import javax.persistence.MappedSuperclass;
 import javax.persistence.NamedQueries;
 import javax.persistence.NamedQuery;
+import javax.persistence.NamedNativeQueries;
+import javax.persistence.NamedNativeQuery;
 
 import org.apache.openjpa.lib.conf.Configurable;
 import org.apache.openjpa.lib.conf.Configuration;
@@ -230,7 +232,7 @@
         ClassLoader loader = repos.getConfiguration().
             getClassResolverInstance().getClassLoader(cls, envLoader);
         XMLPersistenceMetaDataParser xmlParser = getXMLParser();
-        xmlParser.setClassLoader(loader);
+        xmlParser.setClassLoader(envLoader != null ? envLoader : loader);
         xmlParser.setEnvClassLoader(envLoader);
         xmlParser.setMode(mode);
         try {
@@ -274,8 +276,16 @@
                 (queryName, (NamedQuery) cls.getAnnotation(NamedQuery.class)))
                 return cls;
             if (cls.isAnnotationPresent(NamedQueries.class) &&
-                hasNamedQuery(queryName, ((NamedQueries) cls.getAnnotation
-                    (NamedQueries.class)).value()))
+                hasNamedQuery(queryName, ((NamedQueries) cls.
+                    getAnnotation(NamedQueries.class)).value()))
+                return cls;
+            if (cls.isAnnotationPresent(NamedNativeQuery.class) &&
+                hasNamedNativeQuery(queryName, (NamedNativeQuery) cls.
+                    getAnnotation(NamedNativeQuery.class)))
+                return cls;
+            if (cls.isAnnotationPresent(NamedNativeQueries.class) &&
+                hasNamedNativeQuery(queryName, ((NamedNativeQueries) cls.
+                    getAnnotation(NamedNativeQueries.class)).value()))
                 return cls;
         }
         return null;
@@ -283,6 +293,15 @@
 
     private boolean hasNamedQuery(String query, NamedQuery... queries) {
         for (NamedQuery q : queries) {
+            if (query.equals(q.name()))
+                return true;
+        }
+        return false;
+    }
+
+    private boolean hasNamedNativeQuery(String query,
+        NamedNativeQuery... queries) {
+        for (NamedNativeQuery q : queries) {
             if (query.equals(q.name()))
                 return true;
         }

Modified: incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProviderExtension.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProviderExtension.java?view=diff&rev=447584&r1=447583&r2=447584
==============================================================================
--- incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProviderExtension.java (original)
+++ incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProviderExtension.java Mon Sep 18 14:57:52 2006
@@ -11,16 +11,14 @@
  * @nojavadoc
  */
 public interface PersistenceProviderExtension {
+
 	/**
 	 * Gets the Configuration Provider implementation for this receiver.
-	 * 
 	 */
 	public ConfigurationProviderImpl newConfigurationProviderImpl();
 	
 	/**
 	 * Gets the EntityManagerFactory given a Broker Factory.
-	 * @param factory
-
 	 */
 	public OpenJPAEntityManagerFactory toEntityManagerFactory(BrokerFactory 
 		factory);

Modified: incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/QueryResultCache.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/QueryResultCache.java?view=diff&rev=447584&r1=447583&r2=447584
==============================================================================
--- incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/QueryResultCache.java (original)
+++ incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/QueryResultCache.java Mon Sep 18 14:57:52 2006
@@ -15,13 +15,9 @@
  */
 package org.apache.openjpa.persistence;
 
-import java.util.Collections;
 import javax.persistence.Query;
 
-import org.apache.openjpa.datacache.DelegatingQueryCache;
 import org.apache.openjpa.datacache.QueryCache;
-import org.apache.openjpa.datacache.QueryKey;
-import org.apache.openjpa.datacache.TypesChangedEvent;
 
 /**
  * Query result cache.

Modified: incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/QueryResultCacheImpl.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/QueryResultCacheImpl.java?view=diff&rev=447584&r1=447583&r2=447584
==============================================================================
--- incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/QueryResultCacheImpl.java (original)
+++ incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/QueryResultCacheImpl.java Mon Sep 18 14:57:52 2006
@@ -27,7 +27,6 @@
  * Implements Query result cache via delegation to QueryCache.
  *
  * @author Abe White
- * @author Pinaki Poddar
  * @since 0.4.1
  * @nojavadoc
  */
@@ -44,47 +43,29 @@
             PersistenceExceptions.TRANSLATOR);
     }
 
-    /**
-     * Delegate.
-     */
     public QueryCache getDelegate() {
         return _cache.getDelegate();
     }
 
-    /**
-     * Pin the given query's result to the cache.
-     */
     public void pin(Query q) {
         if (_cache.getDelegate() != null)
             _cache.pin(toQueryKey(q));
     }
 
-    /**
-     * Unpin a previously-pinned query result.
-     */
     public void unpin(Query q) {
         if (_cache.getDelegate() != null)
             _cache.unpin(toQueryKey(q));
     }
 
-    /**
-     * Evict a query result from the cache.
-     */
     public void evict(Query q) {
         if (_cache.getDelegate() != null)
             _cache.remove(toQueryKey(q));
     }
 
-    /**
-     * Clear the cache.
-     */
     public void evictAll() {
         _cache.clear();
     }
 
-    /**
-     * Evict all result for queries involving the given class.
-     */
     public void evictAll(Class cls) {
         _cache.onTypesChanged(new TypesChangedEvent(this,
             Collections.singleton(cls)));

Modified: incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/StoreCache.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/StoreCache.java?view=diff&rev=447584&r1=447583&r2=447584
==============================================================================
--- incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/StoreCache.java (original)
+++ incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/StoreCache.java Mon Sep 18 14:57:52 2006
@@ -15,20 +15,14 @@
  */
 package org.apache.openjpa.persistence;
 
-import java.util.Arrays;
-import java.util.BitSet;
 import java.util.Collection;
 
 import org.apache.openjpa.datacache.DataCache;
-import org.apache.openjpa.datacache.DelegatingDataCache;
-import org.apache.openjpa.meta.ClassMetaData;
-import org.apache.openjpa.meta.MetaDataRepository;
 
 /**
  * Represents the L2 cache over the data store.
  *
  * @author Abe White
- * @author Pinaki Poddar
  * @since 0.4.1
  * @published
  */

Modified: incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/StoreCacheImpl.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/StoreCacheImpl.java?view=diff&rev=447584&r1=447583&r2=447584
==============================================================================
--- incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/StoreCacheImpl.java (original)
+++ incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/StoreCacheImpl.java Mon Sep 18 14:57:52 2006
@@ -29,7 +29,6 @@
  * Implements the L2 cache over the data store via delegation to DataCache.
  *
  * @author Abe White
- * @author Pinaki Poddar
  * @since 0.4.1
  * @nojavadoc
  */
@@ -54,9 +53,8 @@
     }
 
     public boolean contains(Class cls, Object oid) {
-        return _cache.getDelegate() != null
-            && _cache.contains(OpenJPAPersistence.toOpenJPAObjectId
-            (getMetaData(cls), oid));
+        return _cache.getDelegate() != null && _cache.contains
+            (OpenJPAPersistence.toOpenJPAObjectId(getMetaData(cls), oid));
     }
 
     public boolean containsAll(Class cls, Object... oids) {
@@ -77,8 +75,8 @@
 
     public void pin(Class cls, Object oid) {
         if (_cache.getDelegate() != null)
-            _cache.pin(
-                OpenJPAPersistence.toOpenJPAObjectId(getMetaData(cls), oid));
+            _cache.pin(OpenJPAPersistence.toOpenJPAObjectId(getMetaData(cls), 
+                oid));
     }
 
     public void pinAll(Class cls, Object... oids) {
@@ -87,9 +85,8 @@
 
     public void pinAll(Class cls, Collection oids) {
         if (_cache.getDelegate() != null)
-            _cache
-                .pinAll(OpenJPAPersistence.toOpenJPAObjectIds(getMetaData(cls),
-                    oids));
+            _cache.pinAll(OpenJPAPersistence.toOpenJPAObjectIds
+                (getMetaData(cls), oids));
     }
 
     public void unpin(Class cls, Object oid) {
@@ -104,9 +101,8 @@
 
     public void unpinAll(Class cls, Collection oids) {
         if (_cache.getDelegate() != null)
-            _cache.unpinAll(
-                OpenJPAPersistence.toOpenJPAObjectIds(getMetaData(cls),
-                    oids));
+            _cache.unpinAll(OpenJPAPersistence.toOpenJPAObjectIds
+                (getMetaData(cls), oids));
     }
 
     public void evict(Class cls, Object oid) {
@@ -121,9 +117,8 @@
 
     public void evictAll(Class cls, Collection oids) {
         if (_cache.getDelegate() != null)
-            _cache.removeAll(
-                OpenJPAPersistence.toOpenJPAObjectIds(getMetaData(cls),
-                    oids));
+            _cache.removeAll(OpenJPAPersistence.toOpenJPAObjectIds
+                (getMetaData(cls), oids));
     }
 
     public void evictAll() {

Modified: incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java?view=diff&rev=447584&r1=447583&r2=447584
==============================================================================
--- incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java (original)
+++ incubator/openjpa/sandboxes/OPENJPA-24/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java Mon Sep 18 14:57:52 2006
@@ -837,9 +837,9 @@
             props = null;
         } else // plugin
         {
-            seq = null;
             clsName = Configurations.getClassName(seq);
             props = Configurations.getProperties(seq);
+            seq = null;
         }
 
         meta.setSequencePlugin(Configurations.getPlugin(clsName, props));
@@ -1237,7 +1237,7 @@
         throws SAXException {
         String val = attrs.getValue("target-entity");
         if (val != null)
-            fmd.setDeclaredType(classForName(val));
+            fmd.setTypeOverride(classForName(val));
         assertPC(fmd, "OneToOne");
         fmd.setSerialized(false); // override any Lob annotation
         if (!fmd.isDefaultFetchGroupExplicit())
@@ -1251,7 +1251,7 @@
         throws SAXException {
         String val = attrs.getValue("target-entity");
         if (val != null)
-            fmd.setDeclaredType(classForName(val));
+            fmd.setTypeOverride(classForName(val));
         assertPC(fmd, "ManyToOne");
         fmd.setSerialized(false); // override any Lob annotation
         if (!fmd.isDefaultFetchGroupExplicit())
@@ -1528,6 +1528,11 @@
             return false;
         boolean system = currentElement() == null;
 
+        Class type = currentElement() == null ? null :
+            ((ClassMetaData) currentElement()).getDescribedType();
+        if (type == null)
+            type = Object.class;
+
         if (_callbacks == null) {
             _callbacks = (Collection<LifecycleCallbacks>[])
                 new Collection[LifecycleEvent.ALL_EVENTS.length];
@@ -1538,7 +1543,7 @@
         LifecycleCallbacks adapter;
         if (_listener != null)
             adapter = new BeanLifecycleCallbacks(_listener,
-                attrs.getValue("method-name"), false);
+                attrs.getValue("method-name"), false, type);
         else
             adapter = new MethodLifecycleCallbacks(_cls,
                 attrs.getValue("method-name"), false);

Modified: incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/README.txt
URL: http://svn.apache.org/viewvc/incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/README.txt?view=diff&rev=447584&r1=447583&r2=447584
==============================================================================
--- incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/README.txt (original)
+++ incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/README.txt Mon Sep 18 14:57:52 2006
@@ -1,2 +1,6 @@
 
-Thanks!
+Thank you for downloading this incubator release of OpenJPA. For
+documentation and project information, please see:
+
+  http://incubator.apache.org/openjpa/
+

Modified: incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/assembly.xml
URL: http://svn.apache.org/viewvc/incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/assembly.xml?view=diff&rev=447584&r1=447583&r2=447584
==============================================================================
--- incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/assembly.xml (original)
+++ incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/assembly.xml Mon Sep 18 14:57:52 2006
@@ -12,6 +12,7 @@
                 <include>NOTICE*</include>
             </includes>
         </fileSet>
+        <!--
         <fileSet>
             <directory>licenses</directory>
             <outputDirectory>/lib</outputDirectory>
@@ -20,16 +21,25 @@
             </includes>
         </fileSet>
         <fileSet>
-            <directory>target/manual/OpenJPA</directory>
-            <outputDirectory>/manual</outputDirectory>
+            <directory>target/examples</directory>
+            <outputDirectory>/examples</outputDirectory>
         </fileSet>
+        -->
         <fileSet>
-            <directory>../target/site/apidocs</directory>
-            <outputDirectory>/javadoc</outputDirectory>
+            <directory>target/manual</directory>
+            <outputDirectory>docs/manual</outputDirectory>
         </fileSet>
         <fileSet>
-            <directory>target/examples</directory>
-            <outputDirectory>/examples</outputDirectory>
+            <directory>src/doc/manual/img</directory>
+            <outputDirectory>docs/manual/img</outputDirectory>
+        </fileSet>
+        <fileSet>
+            <directory>src/doc/manual/css</directory>
+            <outputDirectory>docs/manual/css</outputDirectory>
+        </fileSet>
+        <fileSet>
+            <directory>../target/site/apidocs</directory>
+            <outputDirectory>docs/javadoc</outputDirectory>
         </fileSet>
     </fileSets>
     <dependencySets>
@@ -65,30 +75,43 @@
 
                 <!-- optional -->
                 <exclude>junit:junit</exclude>
+
+                <!-- these are placed in the modules/ directory -->
+                <exclude>org.apache.openjpa:openjpa-all</exclude>
+                <exclude>org.apache.openjpa:openjpa-lib</exclude>
+                <exclude>org.apache.openjpa:openjpa-kernel</exclude>
+                <exclude>org.apache.openjpa:openjpa-kernel-4</exclude>
+                <exclude>org.apache.openjpa:openjpa-kernel-5</exclude>
+                <exclude>org.apache.openjpa:openjpa-jdbc</exclude>
+                <exclude>org.apache.openjpa:openjpa-jdbc-5</exclude>
+                <exclude>org.apache.openjpa:openjpa-persistence</exclude>
+                <exclude>org.apache.openjpa:openjpa-persistence-jdbc</exclude>
+                <exclude>org.apache.openjpa:openjpa-xmlstore</exclude>
             </excludes>
         </dependencySet>
 
-
-        <!--
         <dependencySet>
-            <outputDirectory>/optional</outputDirectory>
+            <outputDirectory>/modules</outputDirectory>
             <unpack>false</unpack>
-            <scope>runtime</scope>
             <includes>
-                <include>org.apache.derby:derby</include>
+                <include>org.apache.openjpa:openjpa-lib</include>
+                <include>org.apache.openjpa:openjpa-kernel</include>
+                <include>org.apache.openjpa:openjpa-kernel-4</include>
+                <include>org.apache.openjpa:openjpa-kernel-5</include>
+                <include>org.apache.openjpa:openjpa-jdbc</include>
+                <include>org.apache.openjpa:openjpa-jdbc-5</include>
+                <include>org.apache.openjpa:openjpa-persistence</include>
+                <include>org.apache.openjpa:openjpa-persistence-jdbc</include>
+                <include>org.apache.openjpa:openjpa-xmlstore</include>
             </includes>
         </dependencySet>
-        -->
 
-        <!--
-         <dependencySet>
+        <dependencySet>
             <outputDirectory>/</outputDirectory>
             <unpack>false</unpack>
-            <scope>runtime</scope>
             <includes>
                 <include>org.apache.openjpa:openjpa-all</include>
             </includes>
         </dependencySet>
-        -->
     </dependencySets>
 </assembly>

Modified: incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/pom.xml
URL: http://svn.apache.org/viewvc/incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/pom.xml?view=diff&rev=447584&r1=447583&r2=447584
==============================================================================
--- incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/pom.xml (original)
+++ incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/pom.xml Mon Sep 18 14:57:52 2006
@@ -3,7 +3,6 @@
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
         http://maven.apache.org/maven-v4_0_0.xsd">
-
     <!--
         To build the distribution files from project root:
 
@@ -12,7 +11,7 @@
     <modelVersion>4.0.0</modelVersion>
     <artifactId>openjpa-project</artifactId>
     <packaging>pom</packaging>
-    <name>OpenJPA Project</name>
+    <name>OpenJPA Distribution</name>
     <parent>
         <groupId>org.apache.openjpa</groupId>
         <artifactId>openjpa</artifactId>
@@ -33,44 +32,6 @@
         </resources>
 
         <plugins>
-            <!-- build the docs when creating the site from docbook source -->
-            <plugin>
-                <artifactId>maven-antrun-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <phase>site</phase>
-                        <configuration>
-                         <!-- destdir="${project.build.directory}/site/manual" -->
-                            <tasks>
-                            <echo>Building docbook manual</echo>
-                            <style includes="**/manual.xml"
-                                force="true"
-                                basedir="${project.basedir}/src/doc/manual"
-                                destdir="${project.basedir}/target/filtered-site/resources/manual"
-                                style="manual-xhtml.xsl"
-                                classpathref="maven.runtime.classpath">
-                                <factory name="org.apache.xalan.processor.TransformerFactoryImpl">
-                                    <attribute name="http://xml.apache.org/xalan/features/optimize" value="true"/>
-                                </factory>
-                            </style>
-                            <style includes="**/manual.xml"
-                                force="true"
-                                basedir="${project.basedir}/src/doc/manual"
-                                destdir="${project.basedir}/target/filtered-site/resources/manual"
-                                style="manual-xhtml-chunk.xsl"
-                                classpathref="maven.runtime.classpath">
-                                <factory name="org.apache.xalan.processor.TransformerFactoryImpl">
-                                    <attribute name="http://xml.apache.org/xalan/features/optimize" value="true"/>
-                                </factory>
-                            </style>
-                            </tasks>
-                        </configuration>
-                        <goals>
-                            <goal>run</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
             <plugin>
                 <artifactId>maven-assembly-plugin</artifactId>
                 <executions>
@@ -78,7 +39,7 @@
                         <id>bin</id>
                         <phase>package</phase>
                         <goals>
-                            <goal>assembly</goal>
+                            <goal>attached</goal>
                         </goals>
                         <configuration>
                             <descriptor>assembly.xml</descriptor>
@@ -91,7 +52,7 @@
                         <id>sources</id>
                         <phase>package</phase>
                         <goals>
-                            <goal>assembly</goal>
+                            <goal>attached</goal>
                         </goals>
                         <configuration>
                             <descriptor>source-assembly.xml</descriptor>
@@ -132,8 +93,84 @@
         </plugins>
     </build>
 
+    <profiles>
+        <!-- 
+            Docbook profile. Docs can be built by running:
+                mvn package -Dtest=false -Pjavadoc-profile,docbook-profile
+        -->
+        <profile>
+            <id>docbook-profile</id>
+            <build>
+                <plugins>
+                    <!-- build the docs when creating the site from docbook source -->
+                    <plugin>
+                        <artifactId>maven-antrun-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <phase>package</phase>
+                                <configuration>
+                                 <!-- destdir="${project.build.directory}/site/manual" -->
+                                    <tasks>
+                                    <echo>Building docbook manual</echo>
+
+                                    <!-- download stylesheets -->
+                                    <property name="stylesheet" value="1.69.1.tar.bz2"/>
+                                    <property name="stylesheet.dir" value="${project.basedir}/target/stylesheets"/>
+
+                                    <mkdir dir="${stylesheet.dir}"/>
+                                    <get src="http://docbook.sourceforge.net/release/xsl/${stylesheet}" usetimestamp="true" dest="${stylesheet.dir}/${stylesheet}"/>
+                                    <untar src="${stylesheet.dir}/${stylesheet}" dest="${stylesheet.dir}" compression="bzip2" overwrite="false"/>
+
+
+                                    <style includes="**/manual.xml"
+                                        force="true"
+                                        basedir="${project.basedir}/src/doc/manual"
+                                        destdir="${project.basedir}/target/manual"
+                                        style="manual-xhtml.xsl"
+                                        classpathref="maven.runtime.classpath">
+                                        <factory name="org.apache.xalan.processor.TransformerFactoryImpl">
+                                            <attribute name="http://xml.apache.org/xalan/features/optimize" value="true"/>
+                                        </factory>
+                                    </style>
+
+                                    <!--
+                                    <style includes="**/manual.xml"
+                                        force="true"
+                                        basedir="${project.basedir}/src/doc/manual"
+                                        destdir="${project.basedir}/target/manual"
+                                        style="manual-xhtml-chunk.xsl"
+                                        classpathref="maven.runtime.classpath">
+                                        <factory name="org.apache.xalan.processor.TransformerFactoryImpl">
+                                            <attribute name="http://xml.apache.org/xalan/features/optimize" value="true"/>
+                                        </factory>
+                                    </style>
+                                    -->
+                                    </tasks>
+                                </configuration>
+                                <goals>
+                                    <goal>run</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+            <activation>
+                <property>
+                    <name>builddocs</name>
+                    <value>true</value>
+                </property>
+            </activation>
+        </profile>
+    </profiles>
+
     <!-- need to explicitly list dependencies for assembly to work -->
     <dependencies>
+        <dependency>
+            <groupId>org.apache.openjpa</groupId>
+            <artifactId>openjpa-all</artifactId>
+            <version>${pom.version}</version>
+        </dependency>
         <dependency>
             <groupId>org.apache.openjpa</groupId>
             <artifactId>openjpa-lib</artifactId>

Modified: incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/jpa_overview_trans.xml
URL: http://svn.apache.org/viewvc/incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/jpa_overview_trans.xml?view=diff&rev=447584&r1=447583&r2=447584
==============================================================================
--- incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/jpa_overview_trans.xml (original)
+++ incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/jpa_overview_trans.xml Mon Sep 18 14:57:52 2006
@@ -280,11 +280,10 @@
 OpenJPA uses optimistic semantics by default, but supports both optimistic and
 datastore transactions. OpenJPA also offers advanced locking and versioning APIs
 for fine-grained control over database resource allocation and object
-versioning. See <xref linkend="ref_guide_locking"/> and
-<xref linkend="ref_guide_lock_groups"/> of the Reference Guide for details
+versioning. See <xref linkend="ref_guide_locking"/> of the Reference Guide for details
 on locking. <xref linkend="jpa_overview_meta_version"/>
 of this document covers standard object versioning, while
-<xref linkend="ref_guide_mapping_jpa"/> of the Reference Guide discusses 
+<xref linkend="ref_guide_mapping_jpa"/> of the Reference Guide discusses
 additional versioning strategies available in OpenJPA.
             </para>
         </note>
@@ -305,7 +304,7 @@
             <imageobject>
                 <!-- PNG image data, 193 x 157 (see README) -->
                 <imagedata fileref="img/jpa-transaction.png" width="129px"/>
-                
+
             </imageobject>
         </mediaobject>
         <para>

Modified: incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/jpa_tutorials.xml
URL: http://svn.apache.org/viewvc/incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/jpa_tutorials.xml?view=diff&rev=447584&r1=447583&r2=447584
==============================================================================
--- incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/jpa_tutorials.xml (original)
+++ incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/jpa_tutorials.xml Mon Sep 18 14:57:52 2006
@@ -168,10 +168,11 @@
                         <para>
                         <indexterm>
                             <primary>
-                                openjpac
+                                org.apache.openjpa.enhance.PCEnhancer
                             </primary>
                         </indexterm>
-<command>openjpac</command>: Runs the OpenJPA enhancer against the specified
+<command>org.apache.openjpa.enhance.PCEnhancer</command>:
+Runs the OpenJPA enhancer against the specified
 classes. More information is available in <xref linkend="ref_guide_pc_enhance"/>
  of the Reference Guide.
                         </para>
@@ -180,10 +181,11 @@
                         <para>
                         <indexterm>
                             <primary>
-                                mappingtool
+                                org.apache.openjpa.jdbc.meta.MappingTool
                             </primary>
                         </indexterm>
-<command>mappingtool</command>: A utility that can be used to create and
+<command>org.apache.openjpa.jdbc.meta.MappingTool</command>:
+A utility that can be used to create and
 maintain the object-relational mappings and schema of all persistent classes in
 a JDBC-compliant datastore. This functionality allows the underlying mappings
 and schema to be easily kept up-to-date with the Java classes in the system. See
@@ -369,7 +371,7 @@
 Enhance the persistent classes.
                     </para>
 <programlisting>
-openjpac -p persistence.xml Animal.java Dog.java
+java org.apache.openjpa.enhance.PCEnhancer -p persistence.xml Animal.java Dog.java
 </programlisting>
                     <para>
 This step runs the OpenJPA enhancer on the <filename>Animal.java</filename> and
@@ -413,13 +415,13 @@
                         <para>
                         <indexterm>
                             <primary>
-                                mappingtool
+                                org.apache.openjpa.jdbc.meta.MappingTool
                             </primary>
                         </indexterm>
 Create the object-relational mappings and database schema.
                         </para>
 <programlisting>
-mappingtool -p persistence.xml Animal.java Dog.java
+java org.apache.openjpa.jdbc.meta.MappingTool -p persistence.xml Animal.java Dog.java
 </programlisting>
                         <para>
 This command propagates the necessary schema for the specified classes to the
@@ -443,7 +445,7 @@
 classes with OpenJPA's schema tool:
                         </para>
 <programlisting>
-schematool -p persistence.xml -a reflect -f tmp.schema
+java org.apache.openjpa.jdbc.schema.SchemaTool -p persistence.xml -a reflect -f tmp.schema
 </programlisting>
                         <para>
 This will create a <filename>tmp.schema</filename> file with an XML
@@ -801,7 +803,7 @@
 Enhance the <classname>Rabbit</classname> class.
                     </para>
 <programlisting>
-openjpac -p persistence.xml Rabbit.java
+java org.apache.openjpa.enhance.PCEnhancer -p persistence.xml Rabbit.java
 </programlisting>
                 </listitem>
                 <listitem>
@@ -809,7 +811,7 @@
 Refresh the object-relational mappings and database schema.
                     </para>
 <programlisting>
-mappingtool -p persistence.xml Rabbit.java
+java org.apache.openjpa.jdbc.meta.MappingTool -p persistence.xml Rabbit.java
 </programlisting>
                 </listitem>
             </orderedlist>
@@ -889,7 +891,7 @@
 Enhance the class.
                     </para>
 <programlisting>
-openjpac -p persistence.xml Snake.java
+java org.apache.openjpa.enhance.PCEnhancer -p persistence.xml Snake.java
 </programlisting>
                 </listitem>
                 <listitem>
@@ -901,7 +903,7 @@
 change the schema to match. So run the mapping tool:
                     </para>
 <programlisting>
-mappingtool -p persistence.xml Snake.java
+java org.apache.openjpa.jdbc.meta.MappingTool -p persistence.xml Snake.java
 </programlisting>
                 </listitem>
                 <listitem>
@@ -1101,7 +1103,7 @@
                     </para>
 <programlisting>
 javac Snake.java Rabbit.java
-openjpac -p persistence.xml Snake.java Rabbit.java
+java org.apache.openjpa.enhance.PCEnhancer -p persistence.xml Snake.java Rabbit.java
 </programlisting>
                 </listitem>
                 <listitem>
@@ -1109,7 +1111,7 @@
 Refresh the mappings and database.
                     </para>
 <programlisting>
-mappingtool -p persistence.xml Snake.java Rabbit.java
+java org.apache.openjpa.jdbc.meta.MappingTool -p persistence.xml Snake.java Rabbit.java
 </programlisting>
                 </listitem>
             </orderedlist>
@@ -1302,7 +1304,7 @@
 Enhance the Car class.
                 </para>
 <programlisting>
-openjpac -p persistence.xml Car.java
+java org.apache.openjpa.enhance.PCEnhancer -p persistence.xml Car.java
 </programlisting>
                 <para>
 Run the mapping tool; make sure that your <filename> META-INF/persistence.xml
@@ -1315,7 +1317,7 @@
 &lt;config-property name="MetaDataFactory"&gt;Types=samples.persistence.j2ee.Car&lt;/config-property/&gt;
 </programlisting>
 <programlisting>
-mappingtool -p persistence.xml Car.java
+java org.apache.openjpa.jdbc.meta.MappingTool -p persistence.xml Car.java
 </programlisting>
                 <para>
 Build an J2EE application archive by running Ant against the <filename>

Modified: incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/manual-xhtml-chunk.xsl
URL: http://svn.apache.org/viewvc/incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/manual-xhtml-chunk.xsl?view=diff&rev=447584&r1=447583&r2=447584
==============================================================================
--- incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/manual-xhtml-chunk.xsl (original)
+++ incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/manual-xhtml-chunk.xsl Mon Sep 18 14:57:52 2006
@@ -1,9 +1,12 @@
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
 
     <!-- docbook stylesheet customizations for openjpa manual -->
-	<xsl:import href="http://docbook.sourceforge.net/release/xsl/1.69.1/html/chunk.xsl"/>
+	<!-- <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.69.1/html/chunk.xsl"/> -->
+    <!-- locally downloaded cache of stylesheets -->
+	<xsl:import href="../../../target/stylesheets/1.69.1/html/chunk.xsl"/>
 
-	<xsl:param name="html.stylesheet">../css/docbook.css</xsl:param>
+
+	<xsl:param name="html.stylesheet">css/docbook.css</xsl:param>
 
 	<xsl:param name="html.cleanup" select="1"/>
 	<xsl:param name="label.from.part" select="1"/>
@@ -20,5 +23,6 @@
 	<xsl:param name="section.autolabel" select="1"/>
 
 	<xsl:param name="use.id.as.filename" select="'1'"/>
+	<xsl:template name="process.image.attributes"/>
 </xsl:stylesheet>
 

Modified: incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/manual-xhtml.xsl
URL: http://svn.apache.org/viewvc/incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/manual-xhtml.xsl?view=diff&rev=447584&r1=447583&r2=447584
==============================================================================
--- incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/manual-xhtml.xsl (original)
+++ incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/manual-xhtml.xsl Mon Sep 18 14:57:52 2006
@@ -1,9 +1,11 @@
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
 
     <!-- docbook stylesheet customizations for openjpa manual -->
-	<xsl:import href="http://docbook.sourceforge.net/release/xsl/1.69.1/html/docbook.xsl"/>
+	<!-- <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.69.1/html/docbook.xsl"/> -->
+    <!-- locally downloaded cache of stylesheets -->
+	<xsl:import href="../../../target/stylesheets/1.69.1/html/docbook.xsl"/>
 
-	<xsl:param name="html.stylesheet">../css/docbook.css</xsl:param>
+	<xsl:param name="html.stylesheet">css/docbook.css</xsl:param>
 
 	<xsl:param name="html.cleanup" select="1"/>
 	<xsl:param name="label.from.part" select="1"/>
@@ -18,5 +20,6 @@
 	<xsl:param name="preface.autolabel" select="0"/>
 	<xsl:param name="qandadiv.autolabel" select="1"/>
 	<xsl:param name="section.autolabel" select="1"/>
+	<xsl:template name="process.image.attributes"/>
 </xsl:stylesheet>
 

Modified: incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/ref_guide_conf.xml
URL: http://svn.apache.org/viewvc/incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/ref_guide_conf.xml?view=diff&rev=447584&r1=447583&r2=447584
==============================================================================
--- incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/ref_guide_conf.xml (original)
+++ incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/ref_guide_conf.xml Mon Sep 18 14:57:52 2006
@@ -235,7 +235,7 @@
                     Code Formatting with the Reverse Mapping Tool
                 </title>
 <programlisting>
-reversemappingtool -cf.spaceBeforeParen true -cf.tabSpaces 4
+java org.apache.openjpa.jdbc.meta.ReverseMappingTool -cf.spaceBeforeParen true -cf.tabSpaces 4
 </programlisting>
             </example>
         </section>
@@ -2124,7 +2124,8 @@
             </para>
             <para>
 <emphasis role="bold">Description:</emphasis> The maximum depth of relations to
-traverse when eager fetching. Use -1 for no limit. Defaults to 1.
+traverse when eager fetching. Use -1 for no limit. Defaults to 1.  See
+<xref linkend="ref_guide_perfpack_eager"/> for details on eager fetching.
             </para>
         </section>
         <section id="openjpa.MetaDataFactory">

Modified: incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/ref_guide_dbsetup.xml
URL: http://svn.apache.org/viewvc/incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/ref_guide_dbsetup.xml?view=diff&rev=447584&r1=447583&r2=447584
==============================================================================
--- incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/ref_guide_dbsetup.xml (original)
+++ incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/ref_guide_dbsetup.xml Mon Sep 18 14:57:52 2006
@@ -4420,7 +4420,7 @@
 document, but don't drop any data:
             </para>
 <programlisting>
-schematool targetSchema.xml
+java org.apache.openjpa.jdbc.schema.SchemaTool targetSchema.xml
 </programlisting>
         </example>
         <example id="ref_guide_schema_schematool_script">
@@ -4432,13 +4432,13 @@
 database. Instead, write any planned changes to a SQL script:
             </para>
 <programlisting>
-schematool -f script.sql targetSchema.xml
+java org.apache.openjpa.jdbc.schema.SchemaTool -f script.sql targetSchema.xml
 </programlisting>
             <para>
 Write a SQL script that will re-create the current database:
             </para>
 <programlisting>
-schematool -a createDB -f script.sql
+java org.apache.openjpa.jdbc.schema.SchemaTool -a createDB -f script.sql
 </programlisting>
         </example>
         <example id="ref_guide_schema_schematool_drop">
@@ -4449,7 +4449,7 @@
 Drop the current database:
             </para>
 <programlisting>
-schematool -a dropDB
+java org.apache.openjpa.jdbc.schema.SchemaTool -a dropDB
 </programlisting>
         </example>
         <example id="ref_guide_schema_schematool_reflect">
@@ -4472,7 +4472,7 @@
 </filename>.
             </para>
 <programlisting>
-schematool -a reflect -f schema.xml
+java org.apache.openjpa.jdbc.schema.SchemaTool -a reflect -f schema.xml
 </programlisting>
         </example>
     </section>

Modified: incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/ref_guide_integration.xml
URL: http://svn.apache.org/viewvc/incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/ref_guide_integration.xml?view=diff&rev=447584&r1=447583&r2=447584
==============================================================================
--- incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/ref_guide_integration.xml (original)
+++ incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/ref_guide_integration.xml Mon Sep 18 14:57:52 2006
@@ -330,7 +330,7 @@
 definitions, without needing to remember to invoke the mapping tool manually.
 The task's parameters correspond exactly to the long versions of the
 command-line arguments to the <link linkend="ref_guide_mapping_mappingtool">
-<literal> mappingtool</literal></link>.
+<literal>mappingtool</literal></link>.
             </para>
             <para>
 The mapping tool task accepts a nested <literal>fileset</literal> tag to specify

Modified: incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/ref_guide_mapping.xml
URL: http://svn.apache.org/viewvc/incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/ref_guide_mapping.xml?view=diff&rev=447584&r1=447583&r2=447584
==============================================================================
--- incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/ref_guide_mapping.xml (original)
+++ incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/ref_guide_mapping.xml Mon Sep 18 14:57:52 2006
@@ -62,7 +62,7 @@
                 Using the Mapping Tool
             </title>
 <programlisting>
-mappingtool Magazine.java
+java org.apache.openjpa.jdbc.meta.MappingTool Magazine.java
 </programlisting>
         </example>
         <para>
@@ -260,7 +260,7 @@
                     Creating the Relational Schema from Mappings
                 </title>
 <programlisting>
-mappingtool Magazine.java
+java org.apache.openjpa.jdbc.meta.MappingTool Magazine.java
 </programlisting>
             </example>
             <para>
@@ -272,7 +272,7 @@
                     Dropping Mappings and Association Schema
                 </title>
 <programlisting>
-mappingtool -sa drop Magazine.java
+java org.apache.openjpa.jdbc.meta.MappingTool -sa drop Magazine.java
 </programlisting>
             </example>
         </section>
@@ -309,12 +309,12 @@
 writes the SQL to create that schema to <filename>create.sql</filename>.
                 </para>
 <programlisting>
-mappingtool -a buildSchema -sa build -sql create.sql Magazine.java
+java org.apache.openjpa.jdbc.meta.MappingTool -a buildSchema -sa build -sql create.sql Magazine.java
 </programlisting>
             </example>
             <example id="ref_guid_mapping_ddl_part_ddl">
                 <title>
-                    Create DDL to Update Database for Current 
+                    Create DDL to Update Database for Current
         Mappings
                 </title>
                 <para>
@@ -323,7 +323,7 @@
 <filename>update.sql</filename>.
                 </para>
 <programlisting>
-mappingtool -a buildSchema -sql update.sql Magazine.java
+java org.apache.openjpa.jdbc.meta.MappingTool -a buildSchema -sql update.sql Magazine.java
 </programlisting>
             </example>
         </section>
@@ -381,7 +381,7 @@
 The setting above corresponds to running the following command:
                 </para>
 <programlisting>
-mappingtool -a buildSchema -fk true
+java org.apache.openjpa.jdbc.meta.MappingTool -a buildSchema -fk true
 </programlisting>
             </example>
         </section>
@@ -446,7 +446,7 @@
                         Reflection with the Schema Tool
                     </title>
 <programlisting>
-schematool -a reflect -f schema.xml
+java org.apache.openjpa.jdbc.schema.SchemaTool -a reflect -f schema.xml
 </programlisting>
                 </example>
             </listitem>
@@ -480,7 +480,7 @@
                         Using the Reverse Mapping Tool
                     </title>
 <programlisting>
-reversemappingtool -pkg com.xyz -d ~/src -cp customizer.properties schema.xml
+java org.apache.openjpa.jdbc.meta.ReverseMappingTool -pkg com.xyz -d ~/src -cp customizer.properties schema.xml
 </programlisting>
                 </example>
                 <para>
@@ -824,7 +824,7 @@
                     Customizing Reverse Mapping with Properties
                 </title>
 <programlisting>
-reversemappingtool -pkg com.xyz -cp custom.properties schema.xml
+java org.apache.openjpa.jdbc.meta.ReverseMappingTool -pkg com.xyz -cp custom.properties schema.xml
 </programlisting>
                 <para>
 Example <filename>custom.properties</filename>:
@@ -879,7 +879,7 @@
             </see>
         </indexterm>
         <para>
-In the <emphasis>meet-in-the-middle</emphasis>  
+In the <emphasis>meet-in-the-middle</emphasis>
 mapping approach, you control both the relational model and the object model. It
 is up to you to define the mappings between these models.  The mapping
 tool's <literal>validate</literal> action is useful to meet-in-the-middle
@@ -894,7 +894,7 @@
                 Validating Mappings
             </title>
 <programlisting>
-mappingtool -a validate Magazine.java
+java org.apache.openjpa.jdbc.meta.MappingTool -a validate Magazine.java
 </programlisting>
         </example>
         <para>
@@ -916,7 +916,7 @@
                 Creating the Relational Schema from Mappings
             </title>
 <programlisting>
-mappingtool Magazine.java
+java org.apache.openjpa.jdbc.meta.MappingTool Magazine.java
 </programlisting>
         </example>
     </section>
@@ -1126,10 +1126,7 @@
                     </listitem>
                     <listitem>
                         <para>
-<literal>VersionColumnName</literal>: The default name of version columns. If
-you use custom lock groups, this name may be combined with lock group names. See
-<xref linkend="ref_guide_lock_groups"/> for more information on lock
-groups.
+<literal>VersionColumnName</literal>: The default name of version columns.
                         </para>
                     </listitem>
                     <listitem>
@@ -1200,8 +1197,8 @@
                 Configuring Mapping Defaults
             </title>
 <programlisting>
-&lt;property name="openjpa.jdbc.MappingDefaults" 
-    value="ForeignKeyDeleteAction=restrict, 
+&lt;property name="openjpa.jdbc.MappingDefaults"
+    value="ForeignKeyDeleteAction=restrict,
     FieldStrategies='org.mag.data.InfoStruct=org.mag.mapping.InfoStructHandler'"/&gt;
 </programlisting>
         </example>
@@ -1357,7 +1354,7 @@
             <imageobject>
                 <!-- PNG image data, 427 x 211 (see README) -->
                 <imagedata fileref="img/joins-constant.png" width="285px"/>
-                
+
             </imageobject>
         </mediaobject>
         <para>
@@ -1369,7 +1366,7 @@
 <literal>T2.PK2</literal> has the value <literal>a</literal>. Here is how we'd
 accomplish this in mapping metadata.
         </para>
-<programlisting> 
+<programlisting>
 @Entity
 @Table(name="T1")
 public class ...
@@ -1389,7 +1386,7 @@
 need single quotes for numeric constants. For example, the syntax to join
 <literal>T1.R2</literal> to <literal>T2.R4</literal> is:
         </para>
-<programlisting> 
+<programlisting>
 @Entity
 @Table(name="T1")
 public class ...
@@ -1405,7 +1402,7 @@
         <para>
 Finally, from the inverse direction, these joins would look like this:
         </para>
-<programlisting> 
+<programlisting>
 @Entity
 @Table(name="T2")
 public class ...
@@ -1579,9 +1576,7 @@
 You map the surrogate version column with the
 <ulink url="../apidocs/org/apache/openjpa/persistence/jdbc/VersionColumn.html">
 <classname>org.apache.openjpa.persistence.jdbc.VersionColumn</classname></ulink>
-annotation. If you take advantage of OpenJPA's ability to define multiple
-<link linkend="ref_guide_lock_groups">lock groups</link>, you may have multiple
-version columns. In that case, use the
+annotation. You can also use the
 <ulink url="../apidocs/org/apache/openjpa/persistence/jdbc/VersionColumns.html">
 <classname>org.apache.openjpa.persistence.jdbc.VersionColumns</classname>
 </ulink> annotation to declare an array of <classname>VersionColumn</classname>
@@ -1595,11 +1590,6 @@
                 </listitem>
                 <listitem>
                     <para>
-<literal>String lockGroup</literal>
-                    </para>
-                </listitem>
-                <listitem>
-                    <para>
 <literal>int length</literal>
                     </para>
                 </listitem>
@@ -1635,10 +1625,7 @@
                 </listitem>
             </itemizedlist>
             <para>
-The <literal>lockGroup</literal> property allows you to specify that a version
-column is for some lock group other than the default group. See
-<xref linkend="ref_guide_lock_groups"/> for an example. All other
-properties correspond exactly to the same-named properties on the standard
+All properties correspond exactly to the same-named properties on the standard
 <classname>Column</classname> annotation, described in
 <xref linkend="jpa_overview_mapping_column"/>.
             </para>
@@ -2121,7 +2108,7 @@
                 <imageobject>
                     <!-- PNG image data, 392 x 192 (see README) -->
                     <imagedata fileref="img/inv-key-coll.png" width="261"/>
-                    
+
                 </imageobject>
             </mediaobject>
             <para>
@@ -2404,7 +2391,7 @@
                     <imageobject>
                         <!-- PNG image data, 410 x 266 (see README) -->
                         <imagedata fileref="img/string-rel-map.png" width="273px"/>
-                        
+
                     </imageobject>
                 </mediaobject>
             </section>

Modified: incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/ref_guide_meta.xml
URL: http://svn.apache.org/viewvc/incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/ref_guide_meta.xml?view=diff&rev=447584&r1=447583&r2=447584
==============================================================================
--- incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/ref_guide_meta.xml (original)
+++ incubator/openjpa/sandboxes/OPENJPA-24/openjpa-project/src/doc/manual/ref_guide_meta.xml Mon Sep 18 14:57:52 2006
@@ -412,7 +412,7 @@
                 <title>
                     Fetch Groups
                 </title>
-                <indexterm zone="data-cache">
+                <indexterm zone="fetch-groups">
                     <primary>
                         metadata
                     </primary>
@@ -493,31 +493,6 @@
                         </para>
                     </listitem>
                 </itemizedlist>
-                <para>
-The <literal>data-cache</literal> key accepts the following values:
-                </para>
-                <itemizedlist>
-                    <listitem>
-                        <para>
-<literal>true</literal>: Use the default cache, as configured by the
-<link linkend="openjpa.DataCache"><literal>openjpa.DataCache</literal></link>
-configuration property. This is the default when no extension is given, unless a
-superclass names a different cache.
-                        </para>
-                    </listitem>
-                    <listitem>
-                        <para>
-<literal>false</literal>: Data for instances of this class should not be
-cached.
-                        </para>
-                    </listitem>
-                    <listitem>
-                        <para>
-<literal>&lt;cache-name&gt;</literal>: Place data for instances of this class
-into the cache with name <literal>&lt;cache-name&gt;</literal>.
-                        </para>
-                    </listitem>
-                </itemizedlist>
             </section>
             <section id="detached-state-field">
                 <title>
@@ -580,27 +555,6 @@
 must be of type <classname>Object</classname>.
                 </para>
             </section>
-            <section id="lock-groups">
-                <title>
-                    Lock Groups
-                </title>
-                <para>
-OpenJPA requires you to pre-declare subclass lock groups in the least-derived
-mapped class. <phrase> The JPA
-<ulink url="../apidocs/org/apache/openjpa/persistence/LockGroups.html">
-<classname>org.apache.openjpa.persistence.LockGroups</classname></ulink>
-annotation accepts an array of lock group names.</phrase> For details on lock
-groups, see <xref linkend="ref_guide_lock_groups_and_subclasses"/>.
-                </para>
-            </section>
-            <section id="auditable">
-                <title>
-                    Auditable
-                </title>
-                <para>
-Reserved for future use.
-                </para>
-            </section>
         </section>
         <section id="ref_guide_meta_field">
             <title>
@@ -613,7 +567,7 @@
                 <title>
                     Dependent
                 </title>
-                <indexterm zone="data-cache">
+                <indexterm zone="dependent">
                     <primary>
                         metadata
                     </primary>
@@ -664,6 +618,38 @@
                     </listitem>
                 </itemizedlist>
             </section>
+            <section id="load-fetch-group">
+                <title>
+                    Load Fetch Group
+                </title>
+                <indexterm zone="load-fetch-group">
+                    <primary>
+                        metadata
+                    </primary>
+                    <secondary>
+                        extensions
+                    </secondary>
+                    <tertiary>
+                        load fetch group
+                    </tertiary>
+                </indexterm>
+                <indexterm zone="load-fetch-group">
+                    <primary>
+                        fetch groups
+                    </primary>
+                    <secondary>
+                        load fetch group
+                    </secondary>
+                </indexterm>
+                <para>
+The <ulink url="../apidocs/org/apache/openjpa/persistence/LoadFetchGroup.html">
+<classname>org.apache.openjpa.persistence.LoadFetchGroup</classname></ulink>
+annotation specifies a field's load fetch group.
+<xref linkend="ref_guide_fetch"/> discusses OpenJPA's support for fetch groups
+in general; see <xref linkend="ref_guide_fetch_custom"/> for how to use this
+annotation in particular.
+                </para>
+            </section>
             <section id="lrs">
                 <title>
                     LRS
@@ -778,34 +764,6 @@
 extension in detail in <xref linkend="ref_guide_inverses"/>.
                 </para>
             </section>
-            <section id="lock-group">
-                <title>
-                    Lock Group
-                </title>
-                <indexterm zone="lock-group">
-                    <primary>
-                        metadata
-                    </primary>
-                    <secondary>
-                        extensions
-                    </secondary>
-                    <tertiary>
-                        lock group
-                    </tertiary>
-                    <seealso>
-                        locking
-                    </seealso>
-                </indexterm>
-                <para>
-Lock groups allow for fine-grained optimistic locking concurrency. Use <phrase>
-OpenJPA's <ulink url="../apidocs/org/apache/openjpa/persistence/LockGroup.html">
-<classname>org.apache.openjpa.persistence.LockGroup</classname></ulink>
-annotation</phrase> to name the lock group for a field. You can exclude a field
-from optimistic locking with a value of <literal>none</literal>. We discuss
-lock groups and this extension further in <xref linkend="ref_guide_lock_groups"/>
-.
-                </para>
-            </section>
             <section id="read-only">
                 <title>
                     Read-Only
@@ -1057,7 +1015,6 @@
 {
     @ManyToMany
     @LRS
-    @LockGroup(LockGroup.NONE)
     private Collection&lt;Subscriber&gt; subscribers;
 
     @ExternalValues({"true=1", "false=2"})



Mime
View raw message