Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Entity
- @Table(name = "authority")
- public class Authority extends DefaultTimeStamped implements Serializable {
- private static final long serialVersionUID = 1L;
- @NotNull
- @Size(min = 0, max = 50)
- @Id
- @Column(length = 50)
- private String name;
- public String getName() {
- return name;
- }
- public void setName(String name) {
- this.name = name;
- }
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- Authority authority = (Authority) o;
- if (name != null ? !name.equals(authority.name) : authority.name != null) {
- return false;
- }
- return true;
- }
- @Override
- public int hashCode() {
- return name != null ? name.hashCode() : 0;
- }
- @Override
- public String toString() {
- return "Authority{"
- + "name='" + name + '\''
- + "}";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement