Advertisement
kieni17

Untitled

Mar 26th, 2020
342
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.29 KB | None | 0 0
  1. package dst.ass1.jpa.model.impl;
  2.  
  3. import dst.ass1.jpa.model.IPlatformUser;
  4.  
  5. import javax.persistence.*;
  6.  
  7. import static dst.ass1.jpa.util.Constants.*;
  8.  
  9.  
  10. @Entity
  11. @Table(name = T_PLATFORMUSER)
  12. @Inheritance(strategy = InheritanceType.JOINED)
  13. public abstract class PlatformUser implements IPlatformUser {
  14.  
  15.     @Id
  16.     @GeneratedValue
  17.     @Column(name = I_PLATFORMUSER)
  18.     private Long id;
  19.  
  20.     @Column(name = M_PLATFORMUSER_NAME)
  21.     private String name;
  22.  
  23.     @Column(name = M_PLATFORMUSER_TEL, nullable = false)
  24.     private String tel;
  25.  
  26.     @Column(name = M_PLATFORMUSER_AVG_RATING)
  27.     private Double avgRating;
  28.  
  29.  
  30.     @Override
  31.     public Long getId() {
  32.         return id;
  33.     }
  34.  
  35.     @Override
  36.     public void setId(Long id) {
  37.         this.id = id;
  38.     }
  39.  
  40.     @Override
  41.     public String getName() {
  42.         return name;
  43.     }
  44.  
  45.     @Override
  46.     public void setName(String name) {
  47.         this.name = name;
  48.     }
  49.  
  50.     @Override
  51.     public String getTel() {
  52.         return tel;
  53.     }
  54.  
  55.     @Override
  56.     public void setTel(String tel) {
  57.         this.tel = tel;
  58.     }
  59.  
  60.     @Override
  61.     public Double getAvgRating() {
  62.         return avgRating;
  63.     }
  64.  
  65.     @Override
  66.     public void setAvgRating(Double avgRating) {
  67.         this.avgRating = avgRating;
  68.     }
  69. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement