You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

TBExternalTable.java 3.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. package vn.azteam.tpf.domain;
  2. import org.hibernate.annotations.Cache;
  3. import org.hibernate.annotations.CacheConcurrencyStrategy;
  4. import javax.persistence.*;
  5. import org.springframework.data.elasticsearch.annotations.Document;
  6. import java.io.Serializable;
  7. import java.util.Objects;
  8. /**
  9. * A TBExternalTable.
  10. */
  11. @Entity
  12. @Table(name = "tb_external_table")
  13. @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
  14. @Document(indexName = "smf_tbexternaltable")
  15. public class TBExternalTable implements Serializable {
  16. private static final long serialVersionUID = 1L;
  17. @Id
  18. @GeneratedValue(strategy = GenerationType.IDENTITY)
  19. private Long id;
  20. @Column(name = "name")
  21. private String name;
  22. @Column(name = "description")
  23. private String description;
  24. @Column(name = "object_type")
  25. private Integer objectType;
  26. @Column(name = "foreign_key")
  27. private String foreignKey;
  28. @Column(name = "relation_table")
  29. private String relationTable;
  30. // jhipster-needle-entity-add-field - JHipster will add fields here, do not remove
  31. public Long getId() {
  32. return id;
  33. }
  34. public void setId(Long id) {
  35. this.id = id;
  36. }
  37. public String getName() {
  38. return name;
  39. }
  40. public TBExternalTable name(String name) {
  41. this.name = name;
  42. return this;
  43. }
  44. public void setName(String name) {
  45. this.name = name;
  46. }
  47. public String getDescription() {
  48. return description;
  49. }
  50. public TBExternalTable description(String description) {
  51. this.description = description;
  52. return this;
  53. }
  54. public void setDescription(String description) {
  55. this.description = description;
  56. }
  57. public String getRelationTable() {
  58. return relationTable;
  59. }
  60. public TBExternalTable relationTable(String relationTable) {
  61. this.relationTable = relationTable;
  62. return this;
  63. }
  64. public void setRelationTable(String relationTable) {
  65. this.relationTable = relationTable;
  66. }
  67. public String getForeignKey() {
  68. return foreignKey;
  69. }
  70. public TBExternalTable foreignKey(String foreignKey) {
  71. this.foreignKey = foreignKey;
  72. return this;
  73. }
  74. public void setForeignKey(String foreignKey) {
  75. this.foreignKey = foreignKey;
  76. }
  77. public Integer getObjectType() {
  78. return objectType;
  79. }
  80. public TBExternalTable objectType(Integer objectType) {
  81. this.objectType = objectType;
  82. return this;
  83. }
  84. public void setObjectType(Integer objectType) {
  85. this.objectType = objectType;
  86. }
  87. // jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here, do not remove
  88. @Override
  89. public boolean equals(Object o) {
  90. if (this == o) {
  91. return true;
  92. }
  93. if (o == null || getClass() != o.getClass()) {
  94. return false;
  95. }
  96. TBExternalTable tBExternalTable = (TBExternalTable) o;
  97. if (tBExternalTable.getId() == null || getId() == null) {
  98. return false;
  99. }
  100. return Objects.equals(getId(), tBExternalTable.getId());
  101. }
  102. @Override
  103. public int hashCode() {
  104. return Objects.hashCode(getId());
  105. }
  106. @Override
  107. public String toString() {
  108. return "TBExternalTable{" +
  109. "id=" + getId() +
  110. ", name='" + getName() + "'" +
  111. ", description='" + getDescription() + "'" +
  112. ", objectType=" + getObjectType() +
  113. "}";
  114. }
  115. }