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