edu.jhu.tmaj.servlet.request.impl
Class ManyToManyUpdateRequest

java.lang.Object
  extended by edu.jhu.tmaj.servlet.request.BaseRequest
      extended by edu.jhu.tmaj.servlet.request.impl.ManyToManyUpdateRequest
All Implemented Interfaces:
CommandRequest, java.io.Serializable

public final class ManyToManyUpdateRequest
extends BaseRequest
implements java.io.Serializable

This Request is used to update a ManyToMany table. The key represents a primaryKey to update. For example on UsersProjects, if an update was specified for UserID#2 to be assigned to Projects#1,5,9, the key would be 2 and the keys[] would be key[0]=1; key[1]=5; key[2]=9. If UsersProjects had any other keys besides 1,5, and 9, they would be deleted. If isReversed is set to true, it would be you would be assigning UserIDs#1,5,9 to ProjectID#2. This executeCommand() method may only be executed by admin users.

See Also:
edu.jhu.tmaj.beans.ManyToManyBean#syncKeys(int key, int[] newKeys), Serialized Form

Field Summary
 
Fields inherited from class edu.jhu.tmaj.servlet.request.BaseRequest
password, username
 
Constructor Summary
ManyToManyUpdateRequest(ManyToManyBean manyToManyBean, int key, java.util.Set<java.lang.Integer> keySet, java.util.Set<java.lang.Integer> fullKeySet, boolean isReversed)
           
 
Method Summary
 CommandResponse processRequest(UserBean userBean)
          This request is executed on the server assuming the username and password returns a valid UserBean.
 java.lang.String toString()
           
 
Methods inherited from class edu.jhu.tmaj.servlet.request.BaseRequest
executeCommand, getPassword, getUsername
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ManyToManyUpdateRequest

public ManyToManyUpdateRequest(ManyToManyBean manyToManyBean,
                               int key,
                               java.util.Set<java.lang.Integer> keySet,
                               java.util.Set<java.lang.Integer> fullKeySet,
                               boolean isReversed)
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

processRequest

public CommandResponse processRequest(UserBean userBean)
                               throws java.sql.SQLException
Description copied from class: BaseRequest
This request is executed on the server assuming the username and password returns a valid UserBean.

Specified by:
processRequest in class BaseRequest
Throws:
java.sql.SQLException