View Javadoc
1   /*
2    * Licensed to The Apereo Foundation under one or more contributor license
3    * agreements. See the NOTICE file distributed with this work for additional
4    * information regarding copyright ownership.
5    *
6    *
7    * The Apereo Foundation licenses this file to you under the Educational
8    * Community License, Version 2.0 (the "License"); you may not use this file
9    * except in compliance with the License. You may obtain a copy of the License
10   * at:
11   *
12   *   http://opensource.org/licenses/ecl2.txt
13   *
14   * Unless required by applicable law or agreed to in writing, software
15   * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
17   * License for the specific language governing permissions and limitations under
18   * the License.
19   *
20   */
21  
22  package org.opencastproject.userdirectory.moodle;
23  
24  import java.util.Objects;
25  
26  public class MoodleUser {
27    private String id;
28    private String username;
29    private String fullname;
30    private String idnumber;
31    private String email;
32    private String auth;
33  
34    public String getId() {
35      return id;
36    }
37  
38    public void setId(String id) {
39      this.id = id;
40    }
41  
42    public String getUsername() {
43      return username;
44    }
45  
46    public void setUsername(String username) {
47      this.username = username;
48    }
49  
50    public String getFullname() {
51      return fullname;
52    }
53  
54    public void setFullname(String fullname) {
55      this.fullname = fullname;
56    }
57  
58    public String getIdnumber() {
59      return idnumber;
60    }
61  
62    public void setIdnumber(String idnumber) {
63      this.idnumber = idnumber;
64    }
65  
66    public String getEmail() {
67      return email;
68    }
69  
70    public void setEmail(String email) {
71      this.email = email;
72    }
73  
74    public String getAuth() {
75      return auth;
76    }
77  
78    public void setAuth(String auth) {
79      this.auth = auth;
80    }
81  
82    @Override
83    public boolean equals(Object o) {
84      if (this == o) {
85        return true;
86      }
87      if (o == null || getClass() != o.getClass()) {
88        return false;
89      }
90      MoodleUser that = (MoodleUser) o;
91      return Objects.equals(id, that.id) && Objects.equals(username, that.username) && Objects
92              .equals(fullname, that.fullname) && Objects.equals(idnumber, that.idnumber) && Objects
93              .equals(email, that.email) && Objects.equals(auth, that.auth);
94    }
95  
96    @Override
97    public int hashCode() {
98      return Objects.hash(id, username, fullname, idnumber, email, auth);
99    }
100 
101   @Override
102   public String toString() {
103     return "MoodleUser{" + "id=" + id + ", username='" + username + '\'' + ", fullname='" + fullname + '\''
104             + ", idnumber='" + idnumber + '\'' + ", email='" + email + '\'' + ", auth='" + auth + '\'' + '}';
105   }
106 }