Class UserDao


  • public class UserDao
    extends java.lang.Object
    Data access object for User objects to simplify saving and retrieval.
    • Constructor Summary

      Constructors 
      Constructor Description
      UserDao()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.Optional<User> loadUser​(java.lang.String emailAddress)
      Retrieves the one user with this email address if it exists.
      static void saveUser​(User user)
      Saves the given user, checking that no existing user already exists with this email.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • UserDao

        public UserDao()
    • Method Detail

      • loadUser

        public static java.util.Optional<User> loadUser​(java.lang.String emailAddress)
        Retrieves the one user with this email address if it exists.
      • saveUser

        public static void saveUser​(User user)
        Saves the given user, checking that no existing user already exists with this email.