Class UserDAO

  • All Implemented Interfaces:
    IUserDAO

    public final class UserDAO
    extends java.lang.Object
    implements IUserDAO
    This class provides Data Access methods for User objects
    Author:
    Laurent Payen
    • Constructor Summary

      Constructors 
      Constructor Description
      UserDAO()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void delete​(int nIdUser, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Delete a record from the table
      java.util.List<User> findByEmail​(java.lang.String strEmail, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Return the users by its email
      User findByFirstNameLastNameAndEmail​(java.lang.String strFirstName, java.lang.String strLastName, java.lang.String strEmail, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Return the user by its first name, last name and email
      void insert​(User user, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Insert a new record in the table.
      User select​(int nIdUser, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the data from the table
      User selectByGuid​(java.lang.String strGuid, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the data from the table
      void update​(User user, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Update the record in the table
      • Methods inherited from class java.lang.Object

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

      • UserDAO

        public UserDAO()
    • Method Detail

      • insert

        public void insert​(User user,
                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Description copied from interface: IUserDAO
        Insert a new record in the table.
        Specified by:
        insert in interface IUserDAO
        Parameters:
        user - instance of the user object to insert
        plugin - the Plugin
      • update

        public void update​(User user,
                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Description copied from interface: IUserDAO
        Update the record in the table
        Specified by:
        update in interface IUserDAO
        Parameters:
        user - the reference of the user
        plugin - the Plugin
      • delete

        public void delete​(int nIdUser,
                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Description copied from interface: IUserDAO
        Delete a record from the table
        Specified by:
        delete in interface IUserDAO
        Parameters:
        nIdUser - int identifier of the user to delete
        plugin - the Plugin
      • select

        public User select​(int nIdUser,
                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Description copied from interface: IUserDAO
        Load the data from the table
        Specified by:
        select in interface IUserDAO
        Parameters:
        nIdUser - The identifier of the user
        plugin - the Plugin
        Returns:
        The instance of the user
      • selectByGuid

        public User selectByGuid​(java.lang.String strGuid,
                                 fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Description copied from interface: IUserDAO
        Load the data from the table
        Specified by:
        selectByGuid in interface IUserDAO
        Parameters:
        strGuid - The identifier of the user
        plugin - the Plugin
        Returns:
        The instance of the user
      • findByEmail

        public java.util.List<User> findByEmail​(java.lang.String strEmail,
                                                fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Description copied from interface: IUserDAO
        Return the users by its email
        Specified by:
        findByEmail in interface IUserDAO
        Parameters:
        strEmail - the email of the user
        plugin - the plugin
        Returns:
        The Users found
      • findByFirstNameLastNameAndEmail

        public User findByFirstNameLastNameAndEmail​(java.lang.String strFirstName,
                                                    java.lang.String strLastName,
                                                    java.lang.String strEmail,
                                                    fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Description copied from interface: IUserDAO
        Return the user by its first name, last name and email
        Specified by:
        findByFirstNameLastNameAndEmail in interface IUserDAO
        Parameters:
        strFirstName - the first name of the user
        strLastName - the last name of the user
        strEmail - the email of the user
        plugin - the plugin
        Returns:
        the user found