SHARE
TWEET

Scotch UserEmail Model v1

Noah-Huppert Nov 3rd, 2014 (edited) 16 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2.  * A users email
  3.  */
  4. @Entity
  5. public class UserEmail extends Model{
  6.     /**
  7.      * The user in which the email belongs to
  8.      */
  9.     @ManyToOne(cascade = CascadeType.ALL)
  10.     public User user;
  11.  
  12.     /**
  13.      * The email
  14.      */
  15.     @Constraints.Required
  16.     public String email;
  17.  
  18.     /* Constructors */
  19.  
  20.     /**
  21.      * Creates a new UserEmail
  22.      * @param email {@link models.UserEmail#email}
  23.      */
  24.     public UserEmail(String email){
  25.         this.email = email;
  26.     }
  27.  
  28.     /* Actions */
  29.     /**
  30.      * Used to query the database
  31.      */
  32.     public static Finder<Long, UserEmail> find = new Finder<Long, UserEmail>(Long.class, UserEmail.class);
  33. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top