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.folder.impl;
18:
19: /**
20: * FolderOrder
21: *
22: * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
23: * @version $Id$
24: */
25: public class FolderOrder {
26: private int id;
27: private int sortOrder;
28: private String name;
29:
30: /**
31: * getSortOrder
32: *
33: * @return sort order
34: */
35: public int getSortOrder() {
36: return sortOrder;
37: }
38:
39: /**
40: * setSortOrder
41: *
42: * @param order sort order
43: */
44: public void setSortOrder(int order) {
45: sortOrder = order;
46: }
47:
48: /**
49: * getName
50: *
51: * @return folder/page/link name
52: */
53: public String getName() {
54: return name;
55: }
56:
57: /**
58: * setName
59: *
60: * @param name folder/page/link name
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 FolderOrder) {
71: if (name != null) {
72: return name.equals(((FolderOrder) o).getName());
73: } else {
74: return (((FolderOrder) o).getName() == null);
75: }
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: }
|