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

Classes in this File | Line Coverage | Branch Coverage | Complexity
Release |
60% | 15/25
N/A | N/A
| 1.0;1

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.Lob;
9 |  |
     import javax.persistence.Table;
10 |  |
11 |  |
     /**
12 |  |
      * @author Jason Song(song_s@ctrip.com)
13 |  |
      */
14 |  |
     @Entity
15 |  |
     @Table(name = "Release")
16 |  |
     @SQLDelete(sql = "Update Release set isDeleted = 1 where id = ?")
17 |  |
     @Where(clause = "isDeleted = 0")
18 | 2 |
     public class Release extends BaseEntity {
19 |  |
       @Column(name = "ReleaseKey", nullable = false)
20 |  |
       private String releaseKey;
21 |  |
22 |  |
       @Column(name = "Name", nullable = false)
23 |  |
       private String name;
24 |  |
25 |  |
       @Column(name = "AppId", nullable = false)
26 |  |
       private String appId;
27 |  |
28 |  |
       @Column(name = "ClusterName", nullable = false)
29 |  |
       private String clusterName;
30 |  |
31 |  |
       @Column(name = "NamespaceName", nullable = false)
32 |  |
       private String namespaceName;
33 |  |
34 |  |
       @Column(name = "Configurations", nullable = false)
35 |  |
       @Lob
36 |  |
       private String configurations;
37 |  |
38 |  |
       @Column(name = "Comment", nullable = false)
39 |  |
       private String comment;
40 |  |
41 |  |
       public String getReleaseKey() {
42 | 1 |
         return releaseKey;
43 |  |
       }
44 |  |
45 |  |
       public String getAppId() {
46 | 1 |
         return appId;
47 |  |
       }
48 |  |
49 |  |
       public String getClusterName() {
50 | 1 |
         return clusterName;
51 |  |
       }
52 |  |
53 |  |
       public String getComment() {
54 | 0 |
         return comment;
55 |  |
       }
56 |  |
57 |  |
       public String getConfigurations() {
58 | 1 |
         return configurations;
59 |  |
       }
60 |  |
61 |  |
       public String getNamespaceName() {
62 | 0 |
         return namespaceName;
63 |  |
       }
64 |  |
65 |  |
       public String getName() {
66 | 0 |
         return name;
67 |  |
       }
68 |  |
69 |  |
       public void setReleaseKey(String releaseKey) {
70 | 1 |
         this.releaseKey = releaseKey;
71 | 1 |
       }
72 |  |
73 |  |
       public void setAppId(String appId) {
74 | 1 |
         this.appId = appId;
75 | 1 |
       }
76 |  |
77 |  |
       public void setClusterName(String clusterName) {
78 | 1 |
         this.clusterName = clusterName;
79 | 1 |
       }
80 |  |
81 |  |
       public void setComment(String comment) {
82 | 0 |
         this.comment = comment;
83 | 0 |
       }
84 |  |
85 |  |
       public void setConfigurations(String configurations) {
86 | 1 |
         this.configurations = configurations;
87 | 1 |
       }
88 |  |
89 |  |
       public void setNamespaceName(String namespaceName) {
90 | 1 |
         this.namespaceName = namespaceName;
91 | 1 |
       }
92 |  |
93 |  |
       public void setName(String name) {
94 | 0 |
         this.name = name;
95 | 0 |
       }
96 |  |
97 |  |
       public String toString() {
98 | 0 |
         return toStringHelper().add("name", name).add("appId", appId).add("clusterName", clusterName)
99 | 0 |
             .add("namespaceName", namespaceName).add("configurations", configurations)
100 | 0 |
             .add("comment", comment).toString();
101 |  |
       }
102 |  |
     }