public void refresh(Object entity, LockModeType lockModeType, Map<String, Object> properties) {
checkOpen();
checkTransactionNeeded();
Session session = internalGetSession();
CacheMode previousCacheMode = session.getCacheMode();
CacheMode localCacheMode = determineAppropriateLocalCacheMode( properties );
LockOptions lockOptions = null;
try {
session.setCacheMode( localCacheMode );
if ( !session.contains( entity ) ) {
throw new IllegalArgumentException( "Entity not managed" );