package com.chenyang.nse.bussiness.entity.orm.table.core;

import com.chenyang.nse.bussiness.entity.orm.table.TBaseEntity;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;

@Entity
@Table(
   name = "T_CORE_SUBSET"
)
public class TCoreSubset extends TBaseEntity {
   private String tname;
   private String state;
   private String datasystemid;
   private String tschema;
   private String maintable;
   @Transient
   private String datasystemname;

   public TCoreSubset() {
   }

   public TCoreSubset(String tname, String state, String datasystemid, String tschema, String maintable, String datasystemname) {
      this.tname = tname;
      this.state = state;
      this.datasystemid = datasystemid;
      this.tschema = tschema;
      this.maintable = maintable;
      this.datasystemname = datasystemname;
   }

   public String getState() {
      return this.state;
   }

   public void setState(String state) {
      this.state = state;
   }

   public String getDatasystemid() {
      return this.datasystemid;
   }

   public void setDatasystemid(String datasystemid) {
      this.datasystemid = datasystemid;
   }

   public String getTname() {
      return this.tname;
   }

   public void setTname(String tname) {
      this.tname = tname;
   }

   public String getTschema() {
      return this.tschema;
   }

   public void setTschema(String tschema) {
      this.tschema = tschema;
   }

   public String getMaintable() {
      return this.maintable;
   }

   public void setMaintable(String maintable) {
      this.maintable = maintable;
   }

   public String getDatasystemname() {
      return this.datasystemname;
   }

   public void setDatasystemname(String datasystemname) {
      this.datasystemname = datasystemname;
   }

   public String toString() {
      return "TCoreSubset [name=" + this.tname + ", state=" + this.state + ", datasystemid=" + this.datasystemid + ", schema=" + this.tschema + ", maintable=" + this.maintable + ", datasystemname=" + this.datasystemname + "]";
   }

   public int hashCode() {
      int prime = 31;
      int result = 1;
      result = 31 * result + (this.datasystemid == null ? 0 : this.datasystemid.hashCode());
      result = 31 * result + (this.datasystemname == null ? 0 : this.datasystemname.hashCode());
      result = 31 * result + (this.maintable == null ? 0 : this.maintable.hashCode());
      result = 31 * result + (this.tname == null ? 0 : this.tname.hashCode());
      result = 31 * result + (this.tschema == null ? 0 : this.tschema.hashCode());
      result = 31 * result + (this.state == null ? 0 : this.state.hashCode());
      return result;
   }

   public boolean equals(Object obj) {
      if (this == obj) {
         return true;
      } else if (obj == null) {
         return false;
      } else if (this.getClass() != obj.getClass()) {
         return false;
      } else {
         TCoreSubset other = (TCoreSubset)obj;
         if (this.datasystemid == null) {
            if (other.datasystemid != null) {
               return false;
            }
         } else if (!this.datasystemid.equals(other.datasystemid)) {
            return false;
         }

         if (this.datasystemname == null) {
            if (other.datasystemname != null) {
               return false;
            }
         } else if (!this.datasystemname.equals(other.datasystemname)) {
            return false;
         }

         if (this.maintable == null) {
            if (other.maintable != null) {
               return false;
            }
         } else if (!this.maintable.equals(other.maintable)) {
            return false;
         }

         if (this.tname == null) {
            if (other.tname != null) {
               return false;
            }
         } else if (!this.tname.equals(other.tname)) {
            return false;
         }

         if (this.tschema == null) {
            if (other.tschema != null) {
               return false;
            }
         } else if (!this.tschema.equals(other.tschema)) {
            return false;
         }

         if (this.state == null) {
            if (other.state != null) {
               return false;
            }
         } else if (!this.state.equals(other.state)) {
            return false;
         }

         return true;
      }
   }
}
