1 package org.jboss.cache.loader.bdbje; 2 3 import org.jboss.cache.config.CacheLoaderConfig.IndividualCacheLoaderConfig; 4 5 import java.util.Properties ; 6 7 public class BdbjeCacheLoaderConfig extends IndividualCacheLoaderConfig 8 { 9 private static final long serialVersionUID = 4626734068542420865L; 10 11 private String location; 12 13 public BdbjeCacheLoaderConfig() 14 { 15 setClassName(BdbjeCacheLoader.class.getName()); 16 } 17 18 23 BdbjeCacheLoaderConfig(IndividualCacheLoaderConfig base) 24 { 25 setClassName(BdbjeCacheLoader.class.getName()); 26 populateFromBaseConfig(base); 27 } 28 29 public String getLocation() 30 { 31 return location; 32 } 33 34 public void setLocation(String location) 35 { 36 testImmutability("location"); 37 this.location = location; 38 } 39 40 public void setProperties(Properties props) 41 { 42 super.setProperties(props); 43 setLocation(props != null ? props.getProperty("location") : null); 44 } 45 46 public boolean equals(Object obj) 47 { 48 if (obj instanceof BdbjeCacheLoaderConfig && equalsExcludingProperties(obj)) 49 { 50 return safeEquals(location, ((BdbjeCacheLoaderConfig) obj).location); 51 } 52 return false; 53 } 54 55 public int hashCode() 56 { 57 return 31 * hashCodeExcludingProperties() + (location == null ? 0 : location.hashCode()); 58 } 59 60 } | Popular Tags |