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:raphael@apache.org">Raphaël Luta</a>27 * @version $Id: BaseParameter.java,v 1.4 2004/02/23 03:08:26 jford Exp $28 */29publicclassBaseParameterextendsBaseRegistryEntry30 implements Parameter, java.io.Serializable
31 {
3233private String value = null;
34private String type = null;
3536/***37 * Implements the equals operation so that 2 elements are equal if38 * all their member values are equal.39 */40publicboolean equals(Object object)
41 {
42if (object==null)
43 {
44return false;
45 }
4647BaseParameter obj = (BaseParameter)object;
4849if (value!=null)
50 {
51if (!value.equals(obj.getValue()))
52 {
53return false;
54 }
55 }
56else57 {
58if (obj.getValue()!=null)
59 {
60return false;
61 }
62 }
6364if (type!=null)
65 {
66if(!type.equals(obj.getType()))
67 {
68return false;
69 }
70 }
71else72 {
73if (obj.getType()!=null)
74 {
75return false;
76 }
77 }
7879returnsuper.equals(object);
80 }
8182/*** @return the value for this parameter */83public String getValue()
84 {
85returnthis.value;
86 }
8788/*** Sets the value of this parameter.89 *90 * @param value the new parameter value91 */92publicvoid setValue(String value)
93 {
94this.value = value;
95 }
9697/*** @return the parameter's type */98public String getType()
99 {
100returnthis.type;
101 }
102103/*** Sets the type of this parameter.value.104 *105 * @param type the new parameter type106 */107publicvoid setType(String type)
108 {
109this.type = type;
110 }
111 }