yujian
2019-03-14 4aadf484e193995c23ee1d5bb1971a497d2f9a0d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
package com.yeshi.fanli.entity.system;
 
import java.io.Serializable;
 
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
 
import com.google.gson.annotations.Expose;
 
/**
 * �?��返回给客户端的参�?
 * 
 * @author Administrator
 *
 */
@Entity
@Table(name = "yeshi_ec_system_clientparams",uniqueConstraints={@UniqueConstraint(columnNames={"`name`","`key`", "systemid"})})
public class SystemClientParams implements Serializable{
    /**
     * 
     */
    private static final long serialVersionUID = 1L;
    
    
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(name = "id")
    private long id;
    @ManyToOne(fetch = FetchType.EAGER)
    @JoinColumn(name = "systemid")
    private BusinessSystem system;
    @Column(name = "`key`", length = 50)
    @Expose
    private String key;
    @Column(name = "`value`", length = 1024)
    @Expose
    private String value;
    @Column(name = "`name`", length = 50)
    @Expose
    private String name;
    @Expose
    private long updatetime;
 
    public SystemClientParams() {
        // TODO Auto-generated constructor stub
    }
    
    public SystemClientParams(BusinessSystem system, String key, String value) {
        super();
        this.system = system;
        this.key = key;
        this.value = value;
    }
 
    public long getId() {
        return id;
    }
 
    public void setId(long id) {
        this.id = id;
    }
 
    public BusinessSystem getSystem() {
        return system;
    }
 
    public void setSystem(BusinessSystem system) {
        this.system = system;
    }
 
    public String getKey() {
        return key;
    }
 
    public void setKey(String key) {
        this.key = key;
    }
 
    public String getValue() {
        return value;
    }
 
    public void setValue(String value) {
        this.value = value;
    }
 
    public String getName() {
        return name;
    }
 
    public void setName(String name) {
        this.name = name;
    }
 
    public long getUpdatetime() {
        return updatetime;
    }
 
    public void setUpdatetime(long updatetime) {
        this.updatetime = updatetime;
    }
 
    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((key == null) ? 0 : key.hashCode());
        result = prime * result + ((name == null) ? 0 : name.hashCode());
        result = prime * result + ((value == null) ? 0 : value.hashCode());
        return result;
    }
 
    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        SystemClientParams other = (SystemClientParams) obj;
        if (key == null) {
            if (other.key != null)
                return false;
        } else if (!key.equals(other.key))
            return false;
        if (name == null) {
            if (other.name != null)
                return false;
        } else if (!name.equals(other.name))
            return false;
        if (value == null) {
            if (other.value != null)
                return false;
        } else if (!value.equals(other.value))
            return false;
        return true;
    }
 
}