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.core.provisioning.api;
20  
21  import org.apache.commons.lang3.builder.EqualsBuilder;
22  import org.apache.commons.lang3.builder.HashCodeBuilder;
23  import org.apache.commons.lang3.builder.ToStringBuilder;
24  import org.apache.syncope.common.lib.types.AnyTypeKind;
25  import org.apache.syncope.common.lib.types.SchemaType;
26  import org.apache.syncope.core.persistence.api.entity.Schema;
27  
28  public class IntAttrName {
29  
30      private AnyTypeKind anyTypeKind;
31  
32      private String field;
33  
34      private SchemaType schemaType;
35  
36      private Schema schema;
37  
38      private String enclosingGroup;
39  
40      private String relatedUser;
41  
42      private String relatedAnyObject;
43  
44      private String membershipOfGroup;
45  
46      private String privilegesOfApplication;
47  
48      private String relationshipType;
49  
50      private String relationshipAnyType;
51  
52      public AnyTypeKind getAnyTypeKind() {
53          return anyTypeKind;
54      }
55  
56      public void setAnyTypeKind(final AnyTypeKind anyTypeKind) {
57          this.anyTypeKind = anyTypeKind;
58      }
59  
60      public String getField() {
61          return field;
62      }
63  
64      public void setField(final String field) {
65          this.field = field;
66      }
67  
68      public SchemaType getSchemaType() {
69          return schemaType;
70      }
71  
72      public void setSchemaType(final SchemaType schemaType) {
73          this.schemaType = schemaType;
74      }
75  
76      public Schema getSchema() {
77          return schema;
78      }
79  
80      public void setSchema(final Schema schemaName) {
81          this.schema = schemaName;
82      }
83  
84      public String getEnclosingGroup() {
85          return enclosingGroup;
86      }
87  
88      public void setEnclosingGroup(final String enclosingGroup) {
89          this.enclosingGroup = enclosingGroup;
90      }
91  
92      public String getRelatedUser() {
93          return relatedUser;
94      }
95  
96      public void setRelatedUser(final String relatedUser) {
97          this.relatedUser = relatedUser;
98      }
99  
100     public String getRelatedAnyObject() {
101         return relatedAnyObject;
102     }
103 
104     public void setRelatedAnyObject(final String relatedAnyObject) {
105         this.relatedAnyObject = relatedAnyObject;
106     }
107 
108     public String getMembershipOfGroup() {
109         return membershipOfGroup;
110     }
111 
112     public void setMembershipOfGroup(final String membershipOfGroup) {
113         this.membershipOfGroup = membershipOfGroup;
114     }
115 
116     public String getPrivilegesOfApplication() {
117         return privilegesOfApplication;
118     }
119 
120     public void setPrivilegesOfApplication(final String privilegesOfApplication) {
121         this.privilegesOfApplication = privilegesOfApplication;
122     }
123 
124     public String getRelationshipType() {
125         return relationshipType;
126     }
127 
128     public void setRelationshipType(final String relationshipType) {
129         this.relationshipType = relationshipType;
130     }
131 
132     public String getRelationshipAnyType() {
133         return relationshipAnyType;
134     }
135 
136     public void setRelationshipAnyType(final String relationshipAnyType) {
137         this.relationshipAnyType = relationshipAnyType;
138     }
139 
140     @Override
141     public int hashCode() {
142         return new HashCodeBuilder().
143                 append(anyTypeKind).
144                 append(field).
145                 append(schemaType).
146                 append(schema).
147                 append(enclosingGroup).
148                 append(relatedUser).
149                 append(relatedAnyObject).
150                 append(membershipOfGroup).
151                 append(privilegesOfApplication).
152                 append(relationshipType).
153                 append(relationshipAnyType).
154                 build();
155     }
156 
157     @Override
158     public boolean equals(final Object obj) {
159         if (this == obj) {
160             return true;
161         }
162         if (obj == null) {
163             return false;
164         }
165         if (getClass() != obj.getClass()) {
166             return false;
167         }
168         final IntAttrName other = (IntAttrName) obj;
169         return new EqualsBuilder().
170                 append(anyTypeKind, other.anyTypeKind).
171                 append(field, other.field).
172                 append(schemaType, other.schemaType).
173                 append(schema, other.schema).
174                 append(enclosingGroup, other.enclosingGroup).
175                 append(relatedUser, other.relatedUser).
176                 append(relatedAnyObject, other.relatedAnyObject).
177                 append(membershipOfGroup, other.membershipOfGroup).
178                 append(privilegesOfApplication, other.privilegesOfApplication).
179                 append(relationshipType, other.relationshipType).
180                 append(relationshipAnyType, other.relationshipAnyType).
181                 build();
182     }
183 
184     @Override
185     public String toString() {
186         return new ToStringBuilder(this).
187                 append(anyTypeKind).
188                 append(field).
189                 append(schemaType).
190                 append(schema).
191                 append(enclosingGroup).
192                 append(relatedUser).
193                 append(relatedAnyObject).
194                 append(membershipOfGroup).
195                 append(privilegesOfApplication).
196                 append(relationshipType).
197                 append(relationshipAnyType).
198                 build();
199     }
200 }