Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * A users email
- */
- @Entity
- public class UserEmail extends Model{
- /**
- * The user in which the email belongs to
- */
- @ManyToOne(cascade = CascadeType.ALL)
- public User user;
- /**
- * The email
- */
- @Constraints.Required
- public String email;
- /* Constructors */
- /**
- * Creates a new UserEmail
- * @param email {@link models.UserEmail#email}
- */
- public UserEmail(String email){
- this.email = email;
- }
- /* Actions */
- /**
- * Used to query the database
- */
- public static Finder<Long, UserEmail> find = new Finder<Long, UserEmail>(Long.class, UserEmail.class);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement