01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: package org.apache.jetspeed.om.page.impl;
18:
19: /**
20: * BaseSecurityConstraintsRef
21: *
22: * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
23: * @version $Id$
24: */
25: public class BaseSecurityConstraintsRef {
26: private int id;
27: private int applyOrder;
28: private String name;
29:
30: /**
31: * getApplyOrder
32: *
33: * @return apply order for constraints
34: */
35: public int getApplyOrder() {
36: return applyOrder;
37: }
38:
39: /**
40: * setApplyOrder
41: *
42: * @param order apply order for constraints
43: */
44: public void setApplyOrder(int order) {
45: applyOrder = order;
46: }
47:
48: /**
49: * getName
50: *
51: * @return name of referenced constraint
52: */
53: public String getName() {
54: return name;
55: }
56:
57: /**
58: * setName
59: *
60: * @param name name of referenced constraint
61: */
62: public void setName(String name) {
63: this .name = name;
64: }
65:
66: /* (non-Javadoc)
67: * @see java.lang.Object#equals(java.lang.Object)
68: */
69: public boolean equals(Object o) {
70: if (o instanceof BaseSecurityConstraintsRef) {
71: if (name != null) {
72: return name.equals(((BaseSecurityConstraintsRef) o)
73: .getName());
74: }
75: return (((BaseSecurityConstraintsRef) o).getName() == null);
76: }
77: return false;
78: }
79:
80: /* (non-Javadoc)
81: * @see java.lang.Object#hashCode()
82: */
83: public int hashCode() {
84: if (name != null) {
85: return name.hashCode();
86: }
87: return 0;
88: }
89: }
|