Advertisement
nikeza

Untitled

Mar 19th, 2020
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.44 KB | None | 0 0
  1. @MappedSuperclass
  2. public abstract class BaseEntity {
  3.  
  4.     @Id
  5.     @GeneratedValue(generator = "uuid-string")
  6.     @GenericGenerator(name = "uuid-string", strategy = "org.hibernate.id.UUIDGenerator")
  7.     @Column(name = "id", nullable = false, unique = true, updatable = false)
  8.     private String id;
  9.  
  10.     public BaseEntity() {
  11.     }
  12.  
  13.  
  14.     public String getId() {
  15.         return id;
  16.     }
  17.  
  18.     public void setId(String id) {
  19.         this.id = id;
  20.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement