| 1 | |
package com.ctrip.apollo.biz.entity; |
| 2 | |
|
| 3 | |
import org.hibernate.annotations.SQLDelete; |
| 4 | |
import org.hibernate.annotations.Where; |
| 5 | |
|
| 6 | |
import javax.persistence.Column; |
| 7 | |
import javax.persistence.Entity; |
| 8 | |
import javax.persistence.Table; |
| 9 | |
|
| 10 | |
|
| 11 | |
|
| 12 | |
|
| 13 | |
@Entity |
| 14 | |
@Table(name = "ServerConfig") |
| 15 | |
@SQLDelete(sql = "Update ServerConfig set isDeleted = 1 where id = ?") |
| 16 | |
@Where(clause = "isDeleted = 0") |
| 17 | 1 | public class ServerConfig extends BaseEntity { |
| 18 | |
@Column(name = "Key", nullable = false) |
| 19 | |
private String key; |
| 20 | |
|
| 21 | |
@Column(name = "Value", nullable = false) |
| 22 | |
private String value; |
| 23 | |
|
| 24 | |
@Column(name = "Comment", nullable = false) |
| 25 | |
private String comment; |
| 26 | |
|
| 27 | |
public String getKey() { |
| 28 | 0 | return key; |
| 29 | |
} |
| 30 | |
|
| 31 | |
public void setKey(String key) { |
| 32 | 0 | this.key = key; |
| 33 | 0 | } |
| 34 | |
|
| 35 | |
public String getValue() { |
| 36 | 0 | return value; |
| 37 | |
} |
| 38 | |
|
| 39 | |
public void setValue(String value) { |
| 40 | 0 | this.value = value; |
| 41 | 0 | } |
| 42 | |
|
| 43 | |
public String getComment() { |
| 44 | 0 | return comment; |
| 45 | |
} |
| 46 | |
|
| 47 | |
public void setComment(String comment) { |
| 48 | 0 | this.comment = comment; |
| 49 | 0 | } |
| 50 | |
|
| 51 | |
public String toString() { |
| 52 | 0 | return toStringHelper().add("key", key).add("value", value).add("comment", comment).toString(); |
| 53 | |
} |
| 54 | |
} |