##### Coverage Report - com.ctrip.framework.apollo.biz.entity.ReleaseMessage

Classes in this File | Line Coverage | Branch Coverage | Complexity
ReleaseMessage |
55% | 11/20
0% | 0/2
| 1.125;1.125

1 |  |
     package com.ctrip.framework.apollo.biz.entity;
2 |  |
3 |  |
     import com.google.common.base.MoreObjects;
4 |  |
5 |  |
     import java.util.Date;
6 |  |
7 |  |
     import javax.persistence.Column;
8 |  |
     import javax.persistence.Entity;
9 |  |
     import javax.persistence.GeneratedValue;
10 |  |
     import javax.persistence.Id;
11 |  |
     import javax.persistence.PrePersist;
12 |  |
     import javax.persistence.Table;
13 |  |
14 |  |
     /**
15 |  |
      * @author Jason Song(song_s@ctrip.com)
16 |  |
      */
17 |  |
     @Entity
18 |  |
     @Table(name = "ReleaseMessage")
19 |  |
     public class ReleaseMessage {
20 |  |
       @Id
21 |  |
       @GeneratedValue
22 |  |
       @Column(name = "Id")
23 |  |
       private long id;
24 |  |
25 |  |
       @Column(name = "Message", nullable = false)
26 |  |
       private String message;
27 |  |
28 |  |
       @Column(name = "DataChange_LastTime")
29 |  |
       private Date dataChangeLastModifiedTime;
30 |  |
31 |  |
       @PrePersist
32 |  |
       protected void prePersist() {
33 | 0 |
         if (this.dataChangeLastModifiedTime == null) {
34 | 0 |
           dataChangeLastModifiedTime = new Date();
35 |  |
         }
36 | 0 |
       }
37 |  |
38 | 3 |
       public ReleaseMessage() {
39 | 3 |
       }
40 |  |
41 | 1 |
       public ReleaseMessage(String message) {
42 | 1 |
         this.message = message;
43 | 1 |
       }
44 |  |
45 |  |
       public long getId() {
46 | 4 |
         return id;
47 |  |
       }
48 |  |
49 |  |
       public void setId(long id) {
50 | 2 |
         this.id = id;
51 | 2 |
       }
52 |  |
53 |  |
       public String getMessage() {
54 | 3 |
         return message;
55 |  |
       }
56 |  |
57 |  |
       public void setMessage(String message) {
58 | 2 |
         this.message = message;
59 | 2 |
       }
60 |  |
61 |  |
       @Override
62 |  |
       public String toString() {
63 | 0 |
         return MoreObjects.toStringHelper(this)
64 | 0 |
             .omitNullValues()
65 | 0 |
             .add("id", id)
66 | 0 |
             .add("message", message)
67 | 0 |
             .add("dataChangeLastModifiedTime", dataChangeLastModifiedTime)
68 | 0 |
             .toString();
69 |  |
       }
70 |  |
     }