View Javadoc
1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   *   http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  package org.apache.syncope.common.lib.to;
20  
21  import org.apache.commons.lang3.builder.EqualsBuilder;
22  import org.apache.commons.lang3.builder.HashCodeBuilder;
23  
24  public class OrgUnit extends ItemContainer {
25  
26      private static final long serialVersionUID = -1868877794174953177L;
27  
28      private String objectClass;
29  
30      private String connObjectLink;
31  
32      private String syncToken;
33  
34      private boolean ignoreCaseMatch;
35  
36      public String getObjectClass() {
37          return objectClass;
38      }
39  
40      public void setObjectClass(final String objectClass) {
41          this.objectClass = objectClass;
42      }
43  
44      public String getConnObjectLink() {
45          return connObjectLink;
46      }
47  
48      public void setConnObjectLink(final String connObjectLink) {
49          this.connObjectLink = connObjectLink;
50      }
51  
52      public String getSyncToken() {
53          return syncToken;
54      }
55  
56      public void setSyncToken(final String syncToken) {
57          this.syncToken = syncToken;
58      }
59  
60      public boolean isIgnoreCaseMatch() {
61          return ignoreCaseMatch;
62      }
63  
64      public void setIgnoreCaseMatch(final boolean ignoreCaseMatch) {
65          this.ignoreCaseMatch = ignoreCaseMatch;
66      }
67  
68      @Override
69      public boolean equals(final Object obj) {
70          if (this == obj) {
71              return true;
72          }
73          if (obj == null) {
74              return false;
75          }
76          if (getClass() != obj.getClass()) {
77              return false;
78          }
79          OrgUnit other = (OrgUnit) obj;
80          return new EqualsBuilder().
81                  appendSuper(super.equals(obj)).
82                  append(ignoreCaseMatch, other.ignoreCaseMatch).
83                  append(objectClass, other.objectClass).
84                  append(connObjectLink, other.connObjectLink).
85                  append(syncToken, other.syncToken).
86                  build();
87      }
88  
89      @Override
90      public int hashCode() {
91          return new HashCodeBuilder().
92                  appendSuper(super.hashCode()).
93                  append(objectClass).
94                  append(connObjectLink).
95                  append(syncToken).
96                  append(ignoreCaseMatch).
97                  build();
98      }
99  }