1 /**
2 * Copyright 2013 The Kuali Foundation Licensed under the
3 * Educational Community License, Version 2.0 (the "License"); you may
4 * not use this file except in compliance with the License. You may
5 * obtain a copy of the License at
6 *
7 * http://www.osedu.org/licenses/ECL-2.0
8 *
9 * Unless required by applicable law or agreed to in writing,
10 * software distributed under the License is distributed on an "AS IS"
11 * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
12 * or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 *
15 * Created by Charles on 10/7/13
16 */
17 package org.kuali.student.poc.eventproc.handler.constraint;
18
19 /**
20 * Represent an illegal AO state within a SOC state.
21 *
22 * @author Kuali Student Team
23 */
24 public class IllegalAoStateBySocElement {
25 private String socState;
26 private String aoState;
27
28 public IllegalAoStateBySocElement(String socState, String aoState) {
29 this.socState = socState;
30 this.aoState = aoState;
31 }
32
33 @Override
34 public boolean equals(Object o) {
35 if (this == o) {
36 return true;
37 }
38 if (!(o instanceof IllegalAoStateBySocElement)) {
39 return false;
40 }
41
42 IllegalAoStateBySocElement that = (IllegalAoStateBySocElement) o;
43
44 if (!aoState.equals(that.aoState)) {
45 return false;
46 }
47 if (!socState.equals(that.socState)) {
48 return false;
49 }
50
51 return true;
52 }
53
54 @Override
55 public int hashCode() {
56 int result = socState.hashCode();
57 result = 31 * result + aoState.hashCode();
58 return result;
59 }
60
61 public String getSocState() {
62 return socState;
63 }
64
65 public String getAoState() {
66 return aoState;
67 }
68 }