From b2a10e285f70f888e21ffd02ff09122986556a1e Mon Sep 17 00:00:00 2001 From: Catalina Wei Date: Mon, 28 Jan 2008 09:36:42 +0000 Subject: [PATCH] OPENJPA-477 no need to make changes to BootStrap, StateManagerImpl and PersistenceProviderImpl. These files are restored to their previous version. git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@615806 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/openjpa/kernel/Bootstrap.java | 4 ++-- .../openjpa/kernel/StateManagerImpl.java | 2 +- .../persistence/PersistenceProviderImpl.java | 19 ++----------------- 3 files changed, 5 insertions(+), 20 deletions(-) diff --git a/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/Bootstrap.java b/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/Bootstrap.java index b1f8e4201..4af5d2a8c 100644 --- a/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/Bootstrap.java +++ b/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/Bootstrap.java @@ -39,7 +39,7 @@ import org.apache.openjpa.util.UserException; */ public class Bootstrap { - protected static final Class[] FACTORY_ARGS = + private static final Class[] FACTORY_ARGS = new Class[]{ ConfigurationProvider.class }; private static Localizer s_loc = Localizer.forPackage(Bootstrap.class); @@ -124,7 +124,7 @@ public class Bootstrap { return (BrokerFactory) meth.invoke(null, new Object[]{ conf }); } - protected static String getFactoryClassName(ConfigurationProvider conf, + private static String getFactoryClassName(ConfigurationProvider conf, ClassLoader loader) { try { return getFactoryClass(conf, loader).getName(); diff --git a/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java b/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java index 380c2610e..eb33507a7 100644 --- a/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java +++ b/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java @@ -3001,7 +3001,7 @@ public class StateManagerImpl /** * Mark the field as loaded or unloaded. */ - public void setLoaded(int field, boolean isLoaded) { + private void setLoaded(int field, boolean isLoaded) { // don't continue if loaded state is already correct; otherwise we // can end up clearing _fieldImpl when we shouldn't if (_loaded.get(field) == isLoaded) diff --git a/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProviderImpl.java b/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProviderImpl.java index 9ade648a9..b25353e5b 100644 --- a/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProviderImpl.java +++ b/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProviderImpl.java @@ -71,7 +71,7 @@ public class PersistenceProviderImpl */ public OpenJPAEntityManagerFactory createEntityManagerFactory(String name, String resource, Map m) { - PersistenceProductDerivation pd = newPersistenceProductDerivation(); + PersistenceProductDerivation pd = new PersistenceProductDerivation(); try { Object poolValue = Configurations.removeProperty(EMF_POOL, m); ConfigurationProvider cp = pd.load(resource, name, m); @@ -99,7 +99,7 @@ public class PersistenceProviderImpl } if (poolValue == null || !((Boolean) poolValue).booleanValue()) - return newBrokerFactory(cp, loader); + return Bootstrap.newBrokerFactory(cp, loader); else return Bootstrap.getBrokerFactory(cp, loader); } @@ -199,19 +199,4 @@ public class PersistenceProviderImpl return _trans.transform(cl, name, previousVersion, pd, bytes); } } - - /** - * Return a persistence product deviration with default setting. - */ - public PersistenceProductDerivation newPersistenceProductDerivation() { - return new PersistenceProductDerivation(); - } - - /** - * Return a broker factory for the given configuration and class loader. - */ - public BrokerFactory newBrokerFactory(ConfigurationProvider cp, - ClassLoader loader) { - return Bootstrap.newBrokerFactory(cp, loader); - } }