cmu.jspsurveymanager.data
Class AdminStorage

java.lang.Object
  extended by cmu.jspsurveymanager.data.AdminStorage

public class AdminStorage
extends java.lang.Object


Field Summary
static char DENIED
          Character that represents a denied permission.
static char GRANTED
          Character that represents a granted permission.
 
Constructor Summary
AdminStorage()
           
AdminStorage(DatabaseObjectStorage objectStorage)
           
 
Method Summary
 void deleteAdmin(Admin admin)
           
 Admin getAdmin(int id)
          Loads the admin with the given unique ID.
 Admin getAdmin(java.lang.String username)
           
 Admin[] getAdmins()
          Gets an array of all Admins.
 Admin getNewAdmin(java.lang.String username)
           
 boolean saveAdmin(Admin admin)
          Saves the user, but does not update their id yet!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GRANTED

public static final char GRANTED
Character that represents a granted permission.

See Also:
Constant Field Values

DENIED

public static final char DENIED
Character that represents a denied permission.

See Also:
Constant Field Values
Constructor Detail

AdminStorage

public AdminStorage(DatabaseObjectStorage objectStorage)

AdminStorage

public AdminStorage()
Method Detail

getAdmins

public Admin[] getAdmins()
Gets an array of all Admins.


getNewAdmin

public Admin getNewAdmin(java.lang.String username)

saveAdmin

public boolean saveAdmin(Admin admin)
Saves the user, but does not update their id yet!

Parameters:
admin -
Returns:

getAdmin

public Admin getAdmin(java.lang.String username)

getAdmin

public Admin getAdmin(int id)
Loads the admin with the given unique ID.

Parameters:
id - The ID of the admin.
Returns:
The admin requested, or null on error.

deleteAdmin

public void deleteAdmin(Admin admin)