com.stratelia.silverpeas.domains.sqldriver
Class SQLUserTable

java.lang.Object
  extended by com.stratelia.silverpeas.domains.sqldriver.SQLUserTable

public class SQLUserTable
extends Object

A UserTable object manages the DomainSQL_User table.


Constructor Summary
SQLUserTable(SQLSettings ds)
           
 
Method Summary
 int createUser(Connection c, UserDetail user)
          Inserts in the database a new user row.
 void deleteUser(Connection c, int userId)
           
protected  UserDetail fetchUser(ResultSet rs)
          Fetch the current user row from a resultSet.
 List<Integer> getAllUserIds(Connection c)
          Returns all the groups in a given userRole (not recursive).
 List<UserDetail> getAllUsers(Connection c)
          Returns all the groups in a given userRole (not recursive).
protected  String getColumns()
           
 UserDetail getUser(Connection c, int userId)
          Returns the User whith the given id.
 String getUserPassword(Connection c, int userId)
          Returns the User whith the given id.
 boolean getUserPasswordValid(Connection c, int userId)
          Returns the User whith the given id.
 List<UserDetail> getUsersBySpecificProperty(Connection c, String propertyName, String value)
          Returns all the groups in a given userRole (not recursive).
 String getUserSpecificProperty(Connection c, int userId, DomainProperty dp)
          Returns the User whith the given id.
 void updateUser(Connection c, UserDetail ud)
           
 void updateUserPassword(Connection c, int userId, String value)
          Inserts in the database a new user row.
 void updateUserPasswordValid(Connection c, int userId, boolean value)
          Inserts in the database a new user row.
 void updateUserSpecificProperty(Connection c, int userId, DomainProperty dp, boolean value)
          Inserts in the database a new user row.
 void updateUserSpecificProperty(Connection c, int userId, DomainProperty dp, String value)
          Inserts in the database a new user row.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SQLUserTable

public SQLUserTable(SQLSettings ds)
Method Detail

createUser

public int createUser(Connection c,
                      UserDetail user)
               throws AdminException
Inserts in the database a new user row.

Throws:
AdminException

deleteUser

public void deleteUser(Connection c,
                       int userId)
                throws AdminException
Throws:
AdminException

updateUser

public void updateUser(Connection c,
                       UserDetail ud)
                throws AdminException
Throws:
AdminException

updateUserSpecificProperty

public void updateUserSpecificProperty(Connection c,
                                       int userId,
                                       DomainProperty dp,
                                       String value)
                                throws AdminException
Inserts in the database a new user row.

Throws:
AdminException

updateUserPassword

public void updateUserPassword(Connection c,
                               int userId,
                               String value)
                        throws AdminException
Inserts in the database a new user row.

Throws:
AdminException

updateUserPasswordValid

public void updateUserPasswordValid(Connection c,
                                    int userId,
                                    boolean value)
                             throws AdminException
Inserts in the database a new user row.

Throws:
AdminException

updateUserSpecificProperty

public void updateUserSpecificProperty(Connection c,
                                       int userId,
                                       DomainProperty dp,
                                       boolean value)
                                throws AdminException
Inserts in the database a new user row.

Throws:
AdminException

getAllUserIds

public List<Integer> getAllUserIds(Connection c)
                            throws AdminException
Returns all the groups in a given userRole (not recursive).

Throws:
AdminException

getAllUsers

public List<UserDetail> getAllUsers(Connection c)
                             throws AdminException
Returns all the groups in a given userRole (not recursive).

Throws:
AdminException

getUsersBySpecificProperty

public List<UserDetail> getUsersBySpecificProperty(Connection c,
                                                   String propertyName,
                                                   String value)
                                            throws AdminException
Returns all the groups in a given userRole (not recursive).

Throws:
AdminException

getUser

public UserDetail getUser(Connection c,
                          int userId)
                   throws AdminException
Returns the User whith the given id.

Throws:
AdminException

getUserSpecificProperty

public String getUserSpecificProperty(Connection c,
                                      int userId,
                                      DomainProperty dp)
                               throws AdminException
Returns the User whith the given id.

Throws:
AdminException

getUserPassword

public String getUserPassword(Connection c,
                              int userId)
                       throws AdminException
Returns the User whith the given id.

Throws:
AdminException

getUserPasswordValid

public boolean getUserPasswordValid(Connection c,
                                    int userId)
                             throws AdminException
Returns the User whith the given id.

Throws:
AdminException

getColumns

protected String getColumns()

fetchUser

protected UserDetail fetchUser(ResultSet rs)
                        throws SQLException
Fetch the current user row from a resultSet.

Throws:
SQLException


Copyright © 2016 Silverpeas. All Rights Reserved.