commit | author | age
|
c65695
|
1 |
/* |
U |
2 |
* Nutzerverwaltung - User and role management in your browser |
51c9e3
|
3 |
* Copyright (C) 2011-2016 Ulrich Hilger, http://uhilger.de |
c65695
|
4 |
* |
U |
5 |
* This program is free software: you can redistribute it and/or modify |
|
6 |
* it under the terms of the GNU General Public License as published by |
|
7 |
* the Free Software Foundation, either version 3 of the License, or |
|
8 |
* (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program. If not, see http://www.gnu.org/licenses/ |
|
17 |
*/ |
|
18 |
|
|
19 |
package de.uhilger.um.daten; |
|
20 |
|
|
21 |
import java.io.Serializable; |
|
22 |
|
|
23 |
import de.uhilger.baselink.DBColumn; |
|
24 |
import de.uhilger.baselink.DBPrimaryKey; |
|
25 |
import de.uhilger.baselink.DBTable; |
|
26 |
|
|
27 |
|
|
28 |
@DBTable(name="app.methoden_rechte") |
|
29 |
@DBPrimaryKey({"role_name", "mt_id"}) |
|
30 |
public class MethodenRecht implements Serializable { |
|
31 |
|
|
32 |
private static final long serialVersionUID = 8274601049628620767L; |
|
33 |
|
|
34 |
private String roleName; |
|
35 |
private int mtId; |
|
36 |
|
|
37 |
public MethodenRecht() { |
|
38 |
super(); |
|
39 |
} |
|
40 |
|
|
41 |
@DBColumn(name = "role_name") |
|
42 |
public String getRoleName() { |
|
43 |
return roleName; |
|
44 |
} |
|
45 |
|
|
46 |
public void setRoleName(String roleName) { |
|
47 |
this.roleName = roleName; |
|
48 |
} |
|
49 |
|
|
50 |
@DBColumn(name = "mt_id") |
|
51 |
public int getMtId() { |
|
52 |
return mtId; |
|
53 |
} |
|
54 |
|
|
55 |
public void setMtId(int mtId) { |
|
56 |
this.mtId = mtId; |
|
57 |
} |
|
58 |
|
|
59 |
@Override |
|
60 |
public boolean equals(Object obj) { |
|
61 |
boolean isEqual = false; |
|
62 |
if(obj != null && obj instanceof MethodenRecht) { |
|
63 |
MethodenRecht other = (MethodenRecht) obj; |
|
64 |
isEqual = (other.getRoleName().equals(this.getRoleName()) && (other.getMtId() == this.getMtId())); |
|
65 |
} |
|
66 |
return isEqual; |
|
67 |
} |
|
68 |
} |