001
014
015 package com.liferay.portal.dao.orm.hibernate.region;
016
017 import net.sf.ehcache.hibernate.regions.EhcacheTimestampsRegion;
018
019 import org.hibernate.cache.CacheException;
020 import org.hibernate.cache.TimestampsRegion;
021
022
025 public class TimestampsRegionWrapper
026 extends BaseRegionWrapper implements TimestampsRegion {
027
028 public TimestampsRegionWrapper(
029 EhcacheTimestampsRegion ehcacheTimestampsRegion) {
030
031 super(ehcacheTimestampsRegion);
032 }
033
034 public void evict(Object key) throws CacheException {
035 EhcacheTimestampsRegion ehcacheTimestampsRegion =
036 getEhcacheTimestampsRegion();
037
038 ehcacheTimestampsRegion.evict(key);
039 }
040
041 public void evictAll() throws CacheException {
042 EhcacheTimestampsRegion ehcacheTimestampsRegion =
043 getEhcacheTimestampsRegion();
044
045 ehcacheTimestampsRegion.evictAll();
046 }
047
048 public Object get(Object key) throws CacheException {
049 EhcacheTimestampsRegion ehcacheTimestampsRegion =
050 getEhcacheTimestampsRegion();
051
052 return ehcacheTimestampsRegion.get(key);
053 }
054
055 public void invalidate() {
056 EhcacheTimestampsRegion ehcacheTimestampsRegion =
057 getEhcacheTimestampsRegion();
058
059 ehcacheTimestampsRegion.evictAll();
060 }
061
062 public void put(Object key, Object value) throws CacheException {
063 EhcacheTimestampsRegion ehcacheTimestampsRegion =
064 getEhcacheTimestampsRegion();
065
066 ehcacheTimestampsRegion.put(key, value);
067 }
068
069 protected EhcacheTimestampsRegion getEhcacheTimestampsRegion() {
070 return (EhcacheTimestampsRegion)getEhcacheDataRegion();
071 }
072
073 }