| 1 | |
package com.ctrip.framework.apollo.biz.entity; |
| 2 | |
|
| 3 | |
import com.ctrip.framework.apollo.common.entity.BaseEntity; |
| 4 | |
|
| 5 | |
import javax.persistence.Column; |
| 6 | |
import javax.persistence.Entity; |
| 7 | |
import javax.persistence.Lob; |
| 8 | |
import javax.persistence.Table; |
| 9 | |
|
| 10 | |
import org.hibernate.annotations.SQLDelete; |
| 11 | |
import org.hibernate.annotations.Where; |
| 12 | |
|
| 13 | |
@Entity |
| 14 | |
@Table(name = "Item") |
| 15 | |
@SQLDelete(sql = "Update Item set isDeleted = 1 where id = ?") |
| 16 | |
@Where(clause = "isDeleted = 0") |
| 17 | 1 | public class Item extends BaseEntity { |
| 18 | |
|
| 19 | |
@Column(name = "NamespaceId", nullable = false) |
| 20 | |
private long namespaceId; |
| 21 | |
|
| 22 | |
@Column(name = "key", nullable = false) |
| 23 | |
private String key; |
| 24 | |
|
| 25 | |
@Column(name = "value") |
| 26 | |
@Lob |
| 27 | |
private String value; |
| 28 | |
|
| 29 | |
@Column(name = "comment") |
| 30 | |
private String comment; |
| 31 | |
|
| 32 | |
@Column(name = "LineNum") |
| 33 | |
private Integer lineNum; |
| 34 | |
|
| 35 | |
public String getComment() { |
| 36 | 0 | return comment; |
| 37 | |
} |
| 38 | |
|
| 39 | |
public String getKey() { |
| 40 | 0 | return key; |
| 41 | |
} |
| 42 | |
|
| 43 | |
public long getNamespaceId() { |
| 44 | 0 | return namespaceId; |
| 45 | |
} |
| 46 | |
|
| 47 | |
public String getValue() { |
| 48 | 0 | return value; |
| 49 | |
} |
| 50 | |
|
| 51 | |
public void setComment(String comment) { |
| 52 | 0 | this.comment = comment; |
| 53 | 0 | } |
| 54 | |
|
| 55 | |
public void setKey(String key) { |
| 56 | 0 | this.key = key; |
| 57 | 0 | } |
| 58 | |
|
| 59 | |
public void setNamespaceId(long namespaceId) { |
| 60 | 0 | this.namespaceId = namespaceId; |
| 61 | 0 | } |
| 62 | |
|
| 63 | |
public void setValue(String value) { |
| 64 | 0 | this.value = value; |
| 65 | 0 | } |
| 66 | |
|
| 67 | |
public Integer getLineNum() { |
| 68 | 0 | return lineNum; |
| 69 | |
} |
| 70 | |
|
| 71 | |
public void setLineNum(Integer lineNum) { |
| 72 | 0 | this.lineNum = lineNum; |
| 73 | 0 | } |
| 74 | |
|
| 75 | |
public String toString() { |
| 76 | 0 | return toStringHelper().add("namespaceId", namespaceId).add("key", key).add("value", value) |
| 77 | 0 | .add("lineNum", lineNum).add("comment", comment).toString(); |
| 78 | |
} |
| 79 | |
} |