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

Classes in this File | Line Coverage | Branch Coverage | Complexity
ReleaseMessage |
42% | 6/14
0% | 0/2
| 1.1428571428571428;1.143

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