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.

TBFunction.java 3.4KB

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