Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2019
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.28 KB | None | 0 0
  1. import lombok.Getter;
  2. import lombok.Setter;
  3.  
  4. import javax.persistence.Column;
  5. import javax.persistence.Entity;
  6. import javax.persistence.FetchType;
  7. import javax.persistence.GeneratedValue;
  8. import javax.persistence.GenerationType;
  9. import javax.persistence.Id;
  10. import javax.persistence.OneToMany;
  11. import javax.persistence.Table;
  12. import javax.persistence.Version;
  13. import java.util.HashSet;
  14. import java.util.Set;
  15.  
  16. @Entity
  17. @Table(name = "VENUE")
  18. @Getter
  19. @Setter
  20. public class VenueEntity {
  21.  
  22.     @Id
  23.     @GeneratedValue(strategy = GenerationType.IDENTITY)
  24.     @Column(name = "ID", nullable = false)
  25.     private Long id;
  26.  
  27.     @Column(name = "NAME", nullable = false)
  28.     private String name;
  29.  
  30.     @Column(name = "IMAGE", nullable = false)
  31.     private String image;
  32.  
  33.     @Column(name = "ACTIVE", nullable = false)
  34.     private Boolean active;
  35.  
  36.     @Column(name = "COORDINATES")
  37.     private String coordinates;
  38.  
  39.     @Column(name = "RATING")
  40.     private Long rating;
  41.  
  42.     @Column(name = "COUNTRY")
  43.     private String country;
  44.  
  45.     @Column(name = "CITY")
  46.     private String city;
  47.  
  48.     @OneToMany(mappedBy = "venue", fetch = FetchType.EAGER)
  49.     private Set<ConcertEntity> concert = new HashSet<>();
  50.  
  51.     @Column(name = "VERSION")
  52.     @Version
  53.     private Long version;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement