fr.paris.lutece.plugins.mylutece.modules.openiddatabase.authentication.business
Class OpenIdDatabaseUserDAO

java.lang.Object
  extended by fr.paris.lutece.plugins.mylutece.modules.openiddatabase.authentication.business.OpenIdDatabaseUserDAO
All Implemented Interfaces:
IOpenIdDatabaseUserDAO

public final class OpenIdDatabaseUserDAO
extends java.lang.Object
implements IOpenIdDatabaseUserDAO

This class provides Data Access methods for databaseUser objects


Constructor Summary
OpenIdDatabaseUserDAO()
           
 
Method Summary
 boolean checkPassword(java.lang.String strLogin, java.lang.String strPassword, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Check the password for a DatabaseUser
 boolean checkUserLogin(java.lang.String strLogin, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Check the password for a DatabaseUser
 void delete(OpenIdDatabaseUser databaseUser, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete a record from the table
 void insert(OpenIdDatabaseUser databaseUser, java.lang.String strPassword, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Insert a new record in the table.
 OpenIdDatabaseUser load(int nUserId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data of DatabaseUser from the table
 int newPrimaryKey(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Generates a new primary key
 OpenIdDatabaseUser selectDatabaseUserByEmail(java.lang.String strEmail, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the list of a user by a email
 java.util.Collection<OpenIdDatabaseUser> selectDatabaseUserList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the list of databaseUsers
 java.util.Collection<OpenIdDatabaseUser> selectDatabaseUserListForLogin(java.lang.String strLogin, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the list of DatabaseUsers for a login
 java.lang.String selectPasswordByPrimaryKey(int nDatabaseUserId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the password of the specified user
 void store(OpenIdDatabaseUser databaseUser, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Update the record in the table
 void storeByLogin(OpenIdDatabaseUser databaseUser, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Update the record in the table
 void updatePassword(OpenIdDatabaseUser databaseUser, java.lang.String strNewPassword, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Update the record in the table
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpenIdDatabaseUserDAO

public OpenIdDatabaseUserDAO()
Method Detail

newPrimaryKey

public int newPrimaryKey(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Generates a new primary key

Specified by:
newPrimaryKey in interface IOpenIdDatabaseUserDAO
Parameters:
plugin - The Plugin using this data access service
Returns:
The new primary key

insert

public void insert(OpenIdDatabaseUser databaseUser,
                   java.lang.String strPassword,
                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
Insert a new record in the table.

Specified by:
insert in interface IOpenIdDatabaseUserDAO
Parameters:
databaseUser - The databaseUser object
strPassword - The user password
plugin - The Plugin using this data access service

load

public OpenIdDatabaseUser load(int nUserId,
                               fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of DatabaseUser from the table

Specified by:
load in interface IOpenIdDatabaseUserDAO
Parameters:
nUserId - The identifier of User
plugin - The Plugin using this data access service
Returns:
the instance of the DatabaseUser

delete

public void delete(OpenIdDatabaseUser databaseUser,
                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
Delete a record from the table

Specified by:
delete in interface IOpenIdDatabaseUserDAO
Parameters:
databaseUser - The DatabaseUser object
plugin - The Plugin using this data access service

store

public void store(OpenIdDatabaseUser databaseUser,
                  fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update the record in the table

Specified by:
store in interface IOpenIdDatabaseUserDAO
Parameters:
databaseUser - The reference of databaseUser
plugin - The Plugin using this data access service

storeByLogin

public void storeByLogin(OpenIdDatabaseUser databaseUser,
                         fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update the record in the table

Specified by:
storeByLogin in interface IOpenIdDatabaseUserDAO
Parameters:
databaseUser - The reference of databaseUser
plugin - The Plugin using this data access service

updatePassword

public void updatePassword(OpenIdDatabaseUser databaseUser,
                           java.lang.String strNewPassword,
                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update the record in the table

Specified by:
updatePassword in interface IOpenIdDatabaseUserDAO
Parameters:
databaseUser - The reference of databaseUser
strNewPassword - The new password to store
plugin - The Plugin using this data access service

selectPasswordByPrimaryKey

public java.lang.String selectPasswordByPrimaryKey(int nDatabaseUserId,
                                                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the password of the specified user

Specified by:
selectPasswordByPrimaryKey in interface IOpenIdDatabaseUserDAO
Parameters:
nDatabaseUserId - The Primary key of the databaseUser
plugin - The current plugin using this method
Returns:
String the user password

selectDatabaseUserList

public java.util.Collection<OpenIdDatabaseUser> selectDatabaseUserList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the list of databaseUsers

Specified by:
selectDatabaseUserList in interface IOpenIdDatabaseUserDAO
Parameters:
plugin - The Plugin using this data access service
Returns:
The Collection of the databaseUsers

selectDatabaseUserListForLogin

public java.util.Collection<OpenIdDatabaseUser> selectDatabaseUserListForLogin(java.lang.String strLogin,
                                                                               fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the list of DatabaseUsers for a login

Specified by:
selectDatabaseUserListForLogin in interface IOpenIdDatabaseUserDAO
Parameters:
strLogin - The login of DatabaseUser
plugin - The Plugin using this data access service
Returns:
The Collection of the DatabaseUsers

checkPassword

public boolean checkPassword(java.lang.String strLogin,
                             java.lang.String strPassword,
                             fr.paris.lutece.portal.service.plugin.Plugin plugin)
Check the password for a DatabaseUser

Specified by:
checkPassword in interface IOpenIdDatabaseUserDAO
Parameters:
strLogin - The user login of DatabaseUser
strPassword - The password of DatabaseUser
plugin - The Plugin using this data access service
Returns:
true if password is ok for database users

checkUserLogin

public boolean checkUserLogin(java.lang.String strLogin,
                              fr.paris.lutece.portal.service.plugin.Plugin plugin)
Check the password for a DatabaseUser

Specified by:
checkUserLogin in interface IOpenIdDatabaseUserDAO
Parameters:
strLogin - The user login of DatabaseUser
plugin - The Plugin using this data access service
Returns:
true if password is ok

selectDatabaseUserByEmail

public OpenIdDatabaseUser selectDatabaseUserByEmail(java.lang.String strEmail,
                                                    fr.paris.lutece.portal.service.plugin.Plugin plugin)
Description copied from interface: IOpenIdDatabaseUserDAO
Load the list of a user by a email

Specified by:
selectDatabaseUserByEmail in interface IOpenIdDatabaseUserDAO
Parameters:
strEmail - The email of DatabaseUser
plugin - The Plugin using this data access service
Returns:
The Collection of the DatabaseUsers


Copyright © 2010 Mairie de Paris. All Rights Reserved.