1 package org.oxerr.freeradius.domain;
2
3 import java.io.Serializable;
4
5 import javax.persistence.Access;
6 import javax.persistence.AccessType;
7 import javax.persistence.Column;
8 import javax.persistence.Entity;
9 import javax.persistence.Id;
10 import javax.persistence.Table;
11
12 @Entity
13 @Access(AccessType.PROPERTY)
14 @Table(name = "radcheck")
15 public class RadCheck implements Serializable {
16
17 private static final long serialVersionUID = 2016101201L;
18
19 private long id;
20 private String userName;
21 private String attribute;
22 private String op;
23 private String value;
24
25 public RadCheck() {
26 }
27
28 public RadCheck(String userName, String attribute, String op, String value) {
29 this.userName = userName;
30 this.attribute = attribute;
31 this.op = op;
32 this.value = value;
33 }
34
35 @Id
36 @Column(name = "id")
37 public long getId() {
38 return id;
39 }
40
41 public void setId(long id) {
42 this.id = id;
43 }
44
45 @Column(name = "username")
46 public String getUserName() {
47 return userName;
48 }
49
50 public void setUserName(String userName) {
51 this.userName = userName;
52 }
53
54 @Column(name = "attribute")
55 public String getAttribute() {
56 return attribute;
57 }
58
59 public void setAttribute(String attribute) {
60 this.attribute = attribute;
61 }
62
63 @Column(name = "op")
64 public String getOp() {
65 return op;
66 }
67
68 public void setOp(String op) {
69 this.op = op;
70 }
71
72 @Column(name = "value")
73 public String getValue() {
74 return value;
75 }
76
77 public void setValue(String value) {
78 this.value = value;
79 }
80
81
82
83
84 @Override
85 public String toString() {
86 return String.format("%s.%s %s %s",
87 getUserName(), getAttribute(), getOp(), getValue());
88 }
89
90 }