Advertisement
kieni17

Untitled

Mar 26th, 2020
362
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.90 KB | None | 0 0
  1. @Entity
  2. @Table(name = T_RIDER, uniqueConstraints = { @UniqueConstraint(columnNames = {M_RIDER_ACCOUNT, M_RIDER_BANK_CODE}) })
  3. public class Rider extends PlatformUser implements IRider {
  4.  
  5.     @Column(name = M_RIDER_EMAIL, unique = true, nullable = false)
  6.     private String email;
  7.  
  8.     @Column(name = M_RIDER_PASSWORD, columnDefinition = "VARBINARY(40)")
  9.     private byte[] password;
  10.  
  11.     @Column(name = M_RIDER_ACCOUNT)
  12.     private String accountNo;
  13.  
  14.     @Column(name = M_RIDER_BANK_CODE)
  15.     private String bankCode;
  16.  
  17.     @Column(name = M_RIDER_TRIPS)
  18.     @OneToMany(targetEntity = Trip.class)
  19.     @JoinTable(name = I_TRIP)
  20.     private Collection<ITrip> trips;
  21.  
  22.     @Column(name = M_RIDER_PREFERENCES)
  23.     @OneToOne(targetEntity = Preferences.class, optional = false, cascade = CascadeType.REMOVE)
  24.     @JoinColumn(name = I_PREFERENCES, unique = true)
  25.     private IPreferences preferences;
  26.  
  27. ...}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement