1/*2 * Copyright 2000-2001,2004 The Apache Software Foundation.3 * 4 * Licensed under the Apache License, Version 2.0 (the "License");5 * you may not use this file except in compliance with the License.6 * You may obtain a copy of the License at7 * 8 * http://www.apache.org/licenses/LICENSE-2.09 * 10 * Unless required by applicable law or agreed to in writing, software11 * distributed under the License is distributed on an "AS IS" BASIS,12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.13 * See the License for the specific language governing permissions and14 * limitations under the License.15 */1617packageorg.apache.jetspeed.om.registry.base;
1819importorg.apache.jetspeed.om.registry.*;
2021/***22 * Bean like implementation of the Parameter interface suitable for23 * Castor serialization.24 *25 * @see org.apache.jetspeed.om.registry.Parameter26 * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>27 * @version $Id: BaseCachedParameter.java,v 1.5 2004/02/23 03:08:26 jford Exp $28 */29publicclassBaseCachedParameterextendsBaseParameter30 implements CachedParameter, java.io.Serializable
31 {
32privateboolean cachedOnName = true;
33privateboolean cachedOnValue = true;
3435/***36 * Implements the equals operation so that 2 elements are equal if37 * all their member values are equal.38 */39publicboolean equals(Object object)
40 {
41if (object==null)
42 {
43return false;
44 }
4546BaseCachedParameter obj = (BaseCachedParameter)object;
4748if (cachedOnName != obj.getCachedOnName())
49 {
50return false;
51 }
5253if (cachedOnValue != obj.getCachedOnValue())
54 {
55return false;
56 }
5758returnsuper.equals(object);
59 }
6061publicboolean isCachedOnName()
62 {
63return cachedOnName;
64 }
6566publicboolean isCachedOnValue()
67 {
68return cachedOnValue;
69 }
7071publicvoid setCachedOnName(boolean cached)
72 {
73this.cachedOnName = cached;
74 }
7576publicvoid setCachedOnValue(boolean cached)
77 {
78this.cachedOnValue = cached;
79 }
8081// castor82publicboolean getCachedOnName()
83 {
84return cachedOnName;
85 }
8687publicboolean getCachedOnValue()
88 {
89return cachedOnValue;
90 }
9192 }