com.stratelia.webactiv.organization
Class GroupUserRoleTable

java.lang.Object
  extended by com.stratelia.webactiv.organization.Table<GroupUserRoleRow>
      extended by com.stratelia.webactiv.organization.GroupUserRoleTable

public class GroupUserRoleTable
extends Table<GroupUserRoleRow>

A GroupUserRoleTable object manages the ST_GroupUserRole table.


Constructor Summary
GroupUserRoleTable(OrganizationSchema organization)
           
 
Method Summary
 void addGroupInGroupUserRole(int groupId, int groupUserRoleId)
          Adds a group in a groupUserRole.
 void addUserInGroupUserRole(int userId, int groupUserRoleId)
          Add an user in a groupUserRole.
 void createGroupUserRole(GroupUserRoleRow groupUserRole)
          Inserts in the database a new groupUserRole row.
protected  GroupUserRoleRow fetchGroupUserRole(ResultSet rs)
          Fetch the current groupUserRole row from a resultSet.
protected  GroupUserRoleRow fetchRow(ResultSet rs)
          Fetch the current groupUserRole row from a resultSet.
 GroupUserRoleRow getGroupUserRole(int id)
          Returns the GroupUserRole whith the given id.
 GroupUserRoleRow getGroupUserRoleByGroupId(int groupId)
          Returns the GroupUserRole whith the given groupId.
protected  void prepareInsert(String insertQuery, PreparedStatement insert, GroupUserRoleRow usr)
          Set all the parameters of the insert PreparedStatement built from the insertQuery in order to insert the given row.
protected  void prepareUpdate(String updateQuery, PreparedStatement update, GroupUserRoleRow row)
          Set all the parameters of the update PreparedStatement built from the updateQuery in order to update the given row.
 void removeGroupFromGroupUserRole(int groupId, int groupUserRoleId)
          Removes a group from a groupUserRole.
 void removeGroupUserRole(int id)
          Delete the groupUserRole
 void removeUserFromGroupUserRole(int userId, int groupUserRoleId)
          Removes an user from a groupUserRole.
 
Methods inherited from class com.stratelia.webactiv.organization.Table
addIdToQuery, addParamToQuery, addParamToQuery, addParamToQuery, aliasColumns, getCount, getCount, getIds, getIds, getIds, getIds, getInteger, getInteger, getMatchingRows, getNextId, getRows, getRows, getRows, getRows, getUniqueRow, getUniqueRow, getUniqueRow, insertRow, performPrepareStatementParams, truncate, updateRelation, updateRelation, updateRelation, updateRow
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroupUserRoleTable

public GroupUserRoleTable(OrganizationSchema organization)
Method Detail

fetchGroupUserRole

protected GroupUserRoleRow fetchGroupUserRole(ResultSet rs)
                                       throws SQLException
Fetch the current groupUserRole row from a resultSet.

Throws:
SQLException

getGroupUserRole

public GroupUserRoleRow getGroupUserRole(int id)
                                  throws AdminPersistenceException
Returns the GroupUserRole whith the given id.

Throws:
AdminPersistenceException

getGroupUserRoleByGroupId

public GroupUserRoleRow getGroupUserRoleByGroupId(int groupId)
                                           throws AdminPersistenceException
Returns the GroupUserRole whith the given groupId.

Throws:
AdminPersistenceException

createGroupUserRole

public void createGroupUserRole(GroupUserRoleRow groupUserRole)
                         throws AdminPersistenceException
Inserts in the database a new groupUserRole row.

Throws:
AdminPersistenceException

prepareInsert

protected void prepareInsert(String insertQuery,
                             PreparedStatement insert,
                             GroupUserRoleRow usr)
                      throws SQLException
Description copied from class: Table
Set all the parameters of the insert PreparedStatement built from the insertQuery in order to insert the given row.

Specified by:
prepareInsert in class Table<GroupUserRoleRow>
Throws:
SQLException

prepareUpdate

protected void prepareUpdate(String updateQuery,
                             PreparedStatement update,
                             GroupUserRoleRow row)
                      throws SQLException
Description copied from class: Table
Set all the parameters of the update PreparedStatement built from the updateQuery in order to update the given row.

Specified by:
prepareUpdate in class Table<GroupUserRoleRow>
Throws:
SQLException

removeGroupUserRole

public void removeGroupUserRole(int id)
                         throws AdminPersistenceException
Delete the groupUserRole

Throws:
AdminPersistenceException

addUserInGroupUserRole

public void addUserInGroupUserRole(int userId,
                                   int groupUserRoleId)
                            throws AdminPersistenceException
Add an user in a groupUserRole.

Throws:
AdminPersistenceException

removeUserFromGroupUserRole

public void removeUserFromGroupUserRole(int userId,
                                        int groupUserRoleId)
                                 throws AdminPersistenceException
Removes an user from a groupUserRole.

Throws:
AdminPersistenceException

addGroupInGroupUserRole

public void addGroupInGroupUserRole(int groupId,
                                    int groupUserRoleId)
                             throws AdminPersistenceException
Adds a group in a groupUserRole.

Throws:
AdminPersistenceException

removeGroupFromGroupUserRole

public void removeGroupFromGroupUserRole(int groupId,
                                         int groupUserRoleId)
                                  throws AdminPersistenceException
Removes a group from a groupUserRole.

Throws:
AdminPersistenceException

fetchRow

protected GroupUserRoleRow fetchRow(ResultSet rs)
                             throws SQLException
Fetch the current groupUserRole row from a resultSet.

Specified by:
fetchRow in class Table<GroupUserRoleRow>
Returns:
Throws:
SQLException


Copyright © 2016 Silverpeas. All Rights Reserved.