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

Classes in this File | Line Coverage | Branch Coverage | Complexity
Namespace |
66% | 8/12
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 |  |
     @Entity
11 |  |
     @Table(name = "Namespace")
12 |  |
     @SQLDelete(sql = "Update Namespace set isDeleted = 1 where id = ?")
13 |  |
     @Where(clause = "isDeleted = 0")
14 | 5 |
     public class Namespace extends BaseEntity {
15 |  |
16 |  |
       @Column(name = "appId", nullable = false)
17 |  |
       private String appId;
18 |  |
19 |  |
       @Column(name = "ClusterName", nullable = false)
20 |  |
       private String clusterName;
21 |  |
22 |  |
       @Column(name = "NamespaceName", nullable = false)
23 |  |
       private String namespaceName;
24 |  |
25 |  |
       public String getAppId() {
26 | 0 |
         return appId;
27 |  |
       }
28 |  |
29 |  |
       public String getClusterName() {
30 | 0 |
         return clusterName;
31 |  |
       }
32 |  |
33 |  |
       public String getNamespaceName() {
34 | 1 |
         return namespaceName;
35 |  |
       }
36 |  |
37 |  |
       public void setAppId(String appId) {
38 | 4 |
         this.appId = appId;
39 | 4 |
       }
40 |  |
41 |  |
       public void setClusterName(String clusterName) {
42 | 4 |
         this.clusterName = clusterName;
43 | 4 |
       }
44 |  |
45 |  |
       public void setNamespaceName(String namespaceName) {
46 | 4 |
         this.namespaceName = namespaceName;
47 | 4 |
       }
48 |  |
49 |  |
       public String toString() {
50 | 0 |
         return toStringHelper().add("appId", appId).add("clusterName", clusterName)
51 | 0 |
             .add("namespaceName", namespaceName).toString();
52 |  |
       }
53 |  |
     }