From a3237c2386d04f83b60e9897ccfefc79fb233f6f Mon Sep 17 00:00:00 2001 From: erik Date: Wed, 21 Jul 2010 10:45:58 +0000 Subject: [PATCH] --- .../main/java/org/wamblee/persistence/PersistentFactory.java | 3 +++ .../org/wamblee/{persistence => reflection}/Accessor.java | 2 +- .../wamblee/{persistence => reflection}/FieldAccessor.java | 5 +++-- .../{persistence => reflection}/PropertyAccessor.java | 5 +++-- .../java/org/wamblee/persistence/PersistentFactoryTest.java | 3 +++ 5 files changed, 13 insertions(+), 5 deletions(-) rename support/general/src/main/java/org/wamblee/{persistence => reflection}/Accessor.java (96%) rename support/general/src/main/java/org/wamblee/{persistence => reflection}/FieldAccessor.java (94%) rename support/general/src/main/java/org/wamblee/{persistence => reflection}/PropertyAccessor.java (95%) diff --git a/support/general/src/main/java/org/wamblee/persistence/PersistentFactory.java b/support/general/src/main/java/org/wamblee/persistence/PersistentFactory.java index bd1217e6..2f5bb7c2 100644 --- a/support/general/src/main/java/org/wamblee/persistence/PersistentFactory.java +++ b/support/general/src/main/java/org/wamblee/persistence/PersistentFactory.java @@ -26,6 +26,9 @@ import java.util.concurrent.ConcurrentHashMap; import javax.persistence.Id; import javax.persistence.Version; +import org.wamblee.reflection.Accessor; +import org.wamblee.reflection.FieldAccessor; +import org.wamblee.reflection.PropertyAccessor; import org.wamblee.reflection.ReflectionUtils; /** diff --git a/support/general/src/main/java/org/wamblee/persistence/Accessor.java b/support/general/src/main/java/org/wamblee/reflection/Accessor.java similarity index 96% rename from support/general/src/main/java/org/wamblee/persistence/Accessor.java rename to support/general/src/main/java/org/wamblee/reflection/Accessor.java index 58b6cf7f..5285e738 100644 --- a/support/general/src/main/java/org/wamblee/persistence/Accessor.java +++ b/support/general/src/main/java/org/wamblee/reflection/Accessor.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.wamblee.persistence; +package org.wamblee.reflection; /** * Abstraction for accessing fields or properties of an object. diff --git a/support/general/src/main/java/org/wamblee/persistence/FieldAccessor.java b/support/general/src/main/java/org/wamblee/reflection/FieldAccessor.java similarity index 94% rename from support/general/src/main/java/org/wamblee/persistence/FieldAccessor.java rename to support/general/src/main/java/org/wamblee/reflection/FieldAccessor.java index e2de4eec..99f41884 100644 --- a/support/general/src/main/java/org/wamblee/persistence/FieldAccessor.java +++ b/support/general/src/main/java/org/wamblee/reflection/FieldAccessor.java @@ -13,10 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.wamblee.persistence; +package org.wamblee.reflection; import java.lang.reflect.Field; + /** * Utility for interfacing to a field of an object. * @@ -24,7 +25,7 @@ import java.lang.reflect.Field; * * @param Type of the field. */ -class FieldAccessor implements Accessor { +public class FieldAccessor implements Accessor { private Field field; /** diff --git a/support/general/src/main/java/org/wamblee/persistence/PropertyAccessor.java b/support/general/src/main/java/org/wamblee/reflection/PropertyAccessor.java similarity index 95% rename from support/general/src/main/java/org/wamblee/persistence/PropertyAccessor.java rename to support/general/src/main/java/org/wamblee/reflection/PropertyAccessor.java index baf539b0..17794dc5 100644 --- a/support/general/src/main/java/org/wamblee/persistence/PropertyAccessor.java +++ b/support/general/src/main/java/org/wamblee/reflection/PropertyAccessor.java @@ -13,10 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.wamblee.persistence; +package org.wamblee.reflection; import java.lang.reflect.Method; + /** * Accessing a property of an object. * @@ -24,7 +25,7 @@ import java.lang.reflect.Method; * * @param Type of the property. */ -class PropertyAccessor implements Accessor { +public class PropertyAccessor implements Accessor { private Method getter; private Method setter; diff --git a/support/general/src/test/java/org/wamblee/persistence/PersistentFactoryTest.java b/support/general/src/test/java/org/wamblee/persistence/PersistentFactoryTest.java index 82f0beba..b1a7d719 100644 --- a/support/general/src/test/java/org/wamblee/persistence/PersistentFactoryTest.java +++ b/support/general/src/test/java/org/wamblee/persistence/PersistentFactoryTest.java @@ -23,6 +23,9 @@ import javax.persistence.Version; import org.junit.Test; import org.wamblee.persistence.PersistentFactory.EntityAccessor; import org.wamblee.persistence.PersistentFactory.EntityObjectAccessor; +import org.wamblee.reflection.Accessor; +import org.wamblee.reflection.FieldAccessor; +import org.wamblee.reflection.PropertyAccessor; public class PersistentFactoryTest { -- 2.31.1