KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > cache > loader > bdbje > BdbjeCacheLoaderConfig


1 package org.jboss.cache.loader.bdbje;
2
3 import org.jboss.cache.config.CacheLoaderConfig.IndividualCacheLoaderConfig;
4
5 import java.util.Properties JavaDoc;
6
7 public class BdbjeCacheLoaderConfig extends IndividualCacheLoaderConfig
8 {
9    private static final long serialVersionUID = 4626734068542420865L;
10
11    private String JavaDoc location;
12
13    public BdbjeCacheLoaderConfig()
14    {
15       setClassName(BdbjeCacheLoader.class.getName());
16    }
17
18    /**
19     * For use by {@link BdbjeCacheLoader}.
20     *
21     * @param base generic config object created by XML parsing.
22     */

23    BdbjeCacheLoaderConfig(IndividualCacheLoaderConfig base)
24    {
25       setClassName(BdbjeCacheLoader.class.getName());
26       populateFromBaseConfig(base);
27    }
28
29    public String JavaDoc getLocation()
30    {
31       return location;
32    }
33
34    public void setLocation(String JavaDoc location)
35    {
36       testImmutability("location");
37       this.location = location;
38    }
39
40    public void setProperties(Properties JavaDoc props)
41    {
42       super.setProperties(props);
43       setLocation(props != null ? props.getProperty("location") : null);
44    }
45
46    public boolean equals(Object JavaDoc 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