From 91babe93eddbfd7b64345624362c82f9f02b4aab Mon Sep 17 00:00:00 2001 From: jakubs <jakubs> Date: Fri, 31 Aug 2012 16:15:21 +0000 Subject: [PATCH] BIS-173 - minor renaming SVN: 26498 --- .../HibernateInterceptorsWrapper.java | 18 +++++++++--------- ...r.java => EntityValidationInterceptor.java} | 4 ++-- .../db/OpenBISHibernateTransactionManager.java | 8 ++++---- ...tionTest.java => EntityValidationTest.java} | 4 ++-- 4 files changed, 17 insertions(+), 17 deletions(-) rename openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/{EntityVerificationInterceptor.java => EntityValidationInterceptor.java} (97%) rename openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/plugin/generic/{EntityVerificationTest.java => EntityValidationTest.java} (97%) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/HibernateInterceptorsWrapper.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/HibernateInterceptorsWrapper.java index 06c8b11a206..a271ac4cc2a 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/HibernateInterceptorsWrapper.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/HibernateInterceptorsWrapper.java @@ -23,12 +23,12 @@ import org.hibernate.Transaction; import org.hibernate.type.Type; import ch.systemsx.cisd.openbis.generic.server.dataaccess.db.DynamicPropertiesInterceptor; -import ch.systemsx.cisd.openbis.generic.server.dataaccess.db.EntityVerificationInterceptor; +import ch.systemsx.cisd.openbis.generic.server.dataaccess.db.EntityValidationInterceptor; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.ServiceVersionHolder; /** * A wrapper for two interceptors. {@link DynamicPropertiesInterceptor} and - * {@link EntityVerificationInterceptor}. This class only provides implementation for the three + * {@link EntityValidationInterceptor}. This class only provides implementation for the three * methods implemented in both our implementations. Implemetation assumes, that our interceptors * don't change entities when called, and thus always return false from the methods onFlushDirty and * onSave. @@ -41,13 +41,13 @@ public class HibernateInterceptorsWrapper extends EmptyInterceptor implements Se DynamicPropertiesInterceptor dynamicPropertiesInterceptor; - EntityVerificationInterceptor entityVerificationInterceptor; + EntityValidationInterceptor entityValidationInterceptor; public HibernateInterceptorsWrapper(DynamicPropertiesInterceptor hibernateInterceptor, - EntityVerificationInterceptor entityVerificationInterceptor) + EntityValidationInterceptor entityValidationInterceptor) { this.dynamicPropertiesInterceptor = hibernateInterceptor; - this.entityVerificationInterceptor = entityVerificationInterceptor; + this.entityValidationInterceptor = entityValidationInterceptor; } @Override @@ -56,7 +56,7 @@ public class HibernateInterceptorsWrapper extends EmptyInterceptor implements Se { dynamicPropertiesInterceptor.onFlushDirty(entity, id, currentState, previousState, propertyNames, types); - entityVerificationInterceptor.onFlushDirty(entity, id, currentState, previousState, + entityValidationInterceptor.onFlushDirty(entity, id, currentState, previousState, propertyNames, types); return false; } @@ -66,7 +66,7 @@ public class HibernateInterceptorsWrapper extends EmptyInterceptor implements Se Type[] types) { dynamicPropertiesInterceptor.onSave(entity, id, state, propertyNames, types); - entityVerificationInterceptor.onSave(entity, id, state, propertyNames, types); + entityValidationInterceptor.onSave(entity, id, state, propertyNames, types); return false; } @@ -77,10 +77,10 @@ public class HibernateInterceptorsWrapper extends EmptyInterceptor implements Se dynamicPropertiesInterceptor.afterTransactionCompletion(tx); } - // This method is only overriden in entity verification interceptor + // This method is only overriden in entity validation interceptor @Override public void beforeTransactionCompletion(Transaction tx) { - entityVerificationInterceptor.beforeTransactionCompletion(tx); + entityValidationInterceptor.beforeTransactionCompletion(tx); } } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/EntityVerificationInterceptor.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/EntityValidationInterceptor.java similarity index 97% rename from openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/EntityVerificationInterceptor.java rename to openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/EntityValidationInterceptor.java index 3d2ecaa0fe8..82fea297b59 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/EntityVerificationInterceptor.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/EntityValidationInterceptor.java @@ -45,13 +45,13 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.ScriptPE; * * @author Jakub Straszewski */ -public class EntityVerificationInterceptor extends EmptyInterceptor +public class EntityValidationInterceptor extends EmptyInterceptor { private static final long serialVersionUID = ServiceVersionHolder.VERSION; private IDAOFactory daoFactory; - public EntityVerificationInterceptor(IHibernateTransactionManagerCallback callback, + public EntityValidationInterceptor(IHibernateTransactionManagerCallback callback, IDAOFactory daoFactory) { this.callback = callback; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/OpenBISHibernateTransactionManager.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/OpenBISHibernateTransactionManager.java index 94de1fa7989..aa194994e98 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/OpenBISHibernateTransactionManager.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/OpenBISHibernateTransactionManager.java @@ -33,7 +33,7 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.dto.ServiceVersionHolder; /** * The implementation of {@link HibernateTransactionManager}, that creates a new - * EntityVerificationInterceptor for each hibernate session. + * EntityValidationInterceptor for each hibernate session. * * @author Jakub Straszewski */ @@ -71,11 +71,11 @@ public class OpenBISHibernateTransactionManager extends HibernateTransactionMana @Override public Interceptor getEntityInterceptor() throws IllegalStateException, BeansException { - EntityVerificationInterceptor entityVerificationInterceptor = - new EntityVerificationInterceptor(this, daoFactory); + EntityValidationInterceptor entityValidationInterceptor = + new EntityValidationInterceptor(this, daoFactory); return new HibernateInterceptorsWrapper(dynamicPropertiesInterceptor, - entityVerificationInterceptor); + entityValidationInterceptor); } @Override diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/plugin/generic/EntityVerificationTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/plugin/generic/EntityValidationTest.java similarity index 97% rename from openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/plugin/generic/EntityVerificationTest.java rename to openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/plugin/generic/EntityValidationTest.java index 447cfb7cd35..5a6316b331a 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/plugin/generic/EntityVerificationTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/plugin/generic/EntityValidationTest.java @@ -43,13 +43,13 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.identifier.ExperimentIdentifi import ch.systemsx.cisd.openbis.generic.shared.dto.identifier.SampleIdentifier; /** - * Tests that the entity verification scripts are called when creating or updating the entities + * Tests that the entity validation scripts are called when creating or updating the entities * * @author Jakub Straszewski */ // NOTE: we depend on transaction beeing committed as part of this test. @Transactional(propagation = Propagation.NOT_SUPPORTED) -public class EntityVerificationTest extends GenericSystemTestCase +public class EntityValidationTest extends GenericSystemTestCase { // create sample of a type, that has attached script that forbids creation -- GitLab