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

Classes in this File | Line Coverage | Branch Coverage | Complexity
Cluster |
75% | 6/8
N/A | N/A
| 1.0;1

1 |  |
     package com.ctrip.apollo.biz.entity;
2 |  |
3 |  |
     import javax.persistence.Column;
4 |  |
     import javax.persistence.Entity;
5 |  |
     import javax.persistence.Table;
6 |  |
7 |  |
     import org.hibernate.annotations.SQLDelete;
8 |  |
     import org.hibernate.annotations.Where;
9 |  |
10 |  |
     /**
11 |  |
      * @author Jason Song(song_s@ctrip.com)
12 |  |
      */
13 |  |
     @Entity
14 |  |
     @Table(name = "Cluster")
15 |  |
     @SQLDelete(sql = "Update Cluster set isDeleted = 1 where id = ?")
16 |  |
     @Where(clause = "isDeleted = 0")
17 | 5 |
     public class Cluster extends BaseEntity {
18 |  |
19 |  |
       @Column(name = "Name", nullable = false)
20 |  |
       private String name;
21 |  |
22 |  |
       @Column(name = "AppId", nullable = false)
23 |  |
       private String appId;
24 |  |
25 |  |
       public String getAppId() {
26 | 0 |
         return appId;
27 |  |
       }
28 |  |
29 |  |
       public String getName() {
30 | 4 |
         return name;
31 |  |
       }
32 |  |
33 |  |
       public void setAppId(String appId) {
34 | 4 |
         this.appId = appId;
35 | 4 |
       }
36 |  |
37 |  |
       public void setName(String name) {
38 | 4 |
         this.name = name;
39 | 4 |
       }
40 |  |
41 |  |
       public String toString() {
42 | 0 |
         return toStringHelper().add("name", name).add("appId", appId).toString();
43 |  |
       }
44 |  |
     }