Skip to content
Snippets Groups Projects
Commit ca74597b authored by jakubs's avatar jakubs
Browse files

BIS-153 SP-257 fix a bug in HibernateInterceprotsWrapper

SVN: 26442
parent fa532bb3
No related branches found
No related tags found
No related merge requests found
...@@ -22,8 +22,8 @@ import org.hibernate.EmptyInterceptor; ...@@ -22,8 +22,8 @@ import org.hibernate.EmptyInterceptor;
import org.hibernate.Transaction; import org.hibernate.Transaction;
import org.hibernate.type.Type; import org.hibernate.type.Type;
import ch.systemsx.cisd.openbis.generic.server.dataaccess.db.EntityVerificationInterceptor;
import ch.systemsx.cisd.openbis.generic.server.dataaccess.db.DynamicPropertiesInterceptor; 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.shared.basic.dto.ServiceVersionHolder; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.ServiceVersionHolder;
/** /**
...@@ -54,8 +54,8 @@ public class HibernateInterceptorsWrapper extends EmptyInterceptor implements Se ...@@ -54,8 +54,8 @@ public class HibernateInterceptorsWrapper extends EmptyInterceptor implements Se
public boolean onFlushDirty(Object entity, Serializable id, Object[] currentState, public boolean onFlushDirty(Object entity, Serializable id, Object[] currentState,
Object[] previousState, String[] propertyNames, Type[] types) Object[] previousState, String[] propertyNames, Type[] types)
{ {
dynamicPropertiesInterceptor.onFlushDirty(entity, id, currentState, previousState, propertyNames, dynamicPropertiesInterceptor.onFlushDirty(entity, id, currentState, previousState,
types); propertyNames, types);
entityVerificationInterceptor.onFlushDirty(entity, id, currentState, previousState, entityVerificationInterceptor.onFlushDirty(entity, id, currentState, previousState,
propertyNames, types); propertyNames, types);
return false; return false;
...@@ -70,11 +70,17 @@ public class HibernateInterceptorsWrapper extends EmptyInterceptor implements Se ...@@ -70,11 +70,17 @@ public class HibernateInterceptorsWrapper extends EmptyInterceptor implements Se
return false; return false;
} }
// This method is only overriden in dynamic property interceptor
@Override @Override
public void afterTransactionCompletion(Transaction tx) public void afterTransactionCompletion(Transaction tx)
{ {
dynamicPropertiesInterceptor.afterTransactionCompletion(tx); dynamicPropertiesInterceptor.afterTransactionCompletion(tx);
entityVerificationInterceptor.afterTransactionCompletion(tx);
} }
// This method is only overriden in entity verification interceptor
@Override
public void beforeTransactionCompletion(Transaction tx)
{
entityVerificationInterceptor.beforeTransactionCompletion(tx);
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment