Advertisement
kieni17

Untitled

Mar 24th, 2020
350
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.86 KB | None | 0 0
  1. import javax.persistence.*;
  2.  
  3. import static dst.ass1.jpa.util.Constants.*;
  4.  
  5. @Entity
  6. public class Location implements ILocation {
  7.  
  8.     @Id
  9.     @GeneratedValue
  10.     @Column(name = I_LOCATION)
  11.     private Long id;
  12.  
  13.     @Column(name = M_LOCATION_NAME)
  14.     private String name;
  15.  
  16.     @Column(name = M_LOCATION_LOCATION_ID)
  17.     private long locationId;
  18.  
  19.     @Override
  20.     public Long getId() {
  21.          return id;
  22.     }
  23.  
  24.     @Override
  25.     public void setId(Long id) {
  26.         this.id = id;
  27.     }
  28.  
  29.     @Override
  30.     public String getName() {
  31.         return name;
  32.     }
  33.  
  34.     @Override
  35.     public void setName(String name) {
  36.         this.name = name;
  37.     }
  38.  
  39.     @Override
  40.     public Long getLocationId() {
  41.         return locationId;
  42.     }
  43.  
  44.     @Override
  45.     public void setLocationId(Long locationId) {
  46.         this.locationId = locationId;
  47.     }
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement