Coverage Report - com.ctrip.framework.apollo.common.entity.AppNamespace
 
Classes in this File Line Coverage Branch Coverage Complexity
AppNamespace
0%
0/20
N/A
1
 
 1  
 package com.ctrip.framework.apollo.common.entity;
 2  
 
 3  
 
 4  
 import com.ctrip.framework.apollo.core.enums.ConfigFileFormat;
 5  
 
 6  
 import org.hibernate.annotations.SQLDelete;
 7  
 import org.hibernate.annotations.Where;
 8  
 
 9  
 import javax.persistence.Column;
 10  
 import javax.persistence.Entity;
 11  
 import javax.persistence.Table;
 12  
 
 13  
 @Entity
 14  
 @Table(name = "AppNamespace")
 15  
 @SQLDelete(sql = "Update AppNamespace set isDeleted = 1 where id = ?")
 16  
 @Where(clause = "isDeleted = 0")
 17  0
 public class AppNamespace 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  
   @Column(name = "Format", nullable = false)
 26  
   private String format;
 27  
 
 28  0
   @Column(name = "IsPublic", columnDefinition = "Bit default '0'")
 29  
   private boolean isPublic = false;
 30  
 
 31  
   @Column(name = "Comment")
 32  
   private String comment;
 33  
 
 34  
   public String getAppId() {
 35  0
     return appId;
 36  
   }
 37  
 
 38  
   public String getComment() {
 39  0
     return comment;
 40  
   }
 41  
 
 42  
   public String getName() {
 43  0
     return name;
 44  
   }
 45  
 
 46  
   public void setAppId(String appId) {
 47  0
     this.appId = appId;
 48  0
   }
 49  
 
 50  
   public void setComment(String comment) {
 51  0
     this.comment = comment;
 52  0
   }
 53  
 
 54  
   public void setName(String name) {
 55  0
     this.name = name;
 56  0
   }
 57  
 
 58  
   public boolean isPublic() {
 59  0
     return isPublic;
 60  
   }
 61  
 
 62  
   public void setPublic(boolean aPublic) {
 63  0
     isPublic = aPublic;
 64  0
   }
 65  
 
 66  
   public ConfigFileFormat formatAsEnum() {
 67  0
     return ConfigFileFormat.fromString(this.format);
 68  
   }
 69  
 
 70  
   public String getFormat() {
 71  0
     return format;
 72  
   }
 73  
 
 74  
   public void setFormat(String format) {
 75  0
     this.format = format;
 76  0
   }
 77  
 
 78  
   public String toString() {
 79  0
     return toStringHelper().add("name", name).add("appId", appId).add("comment", comment)
 80  0
         .add("format", format).add("isPublic", isPublic).toString();
 81  
   }
 82  
 }