|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--fi.helsinki.cs.lohtu.model.UserDAO
This class handles all database connections and creates appropriate classes resembling database table rows.
Constructor Summary | |
protected |
UserDAO(java.sql.Connection conn)
Protected constructor. |
Method Summary | |
protected void |
finalize()
Finalizes UserDAO. |
java.util.Iterator |
getProjectUserIterator(int projectId)
This method returns an iterator to users filling the specified criteria (the project matches the parameter). |
UserVO |
getUser(java.lang.String userName)
Searches for desired username and returns respective VO object or throws some kind of exception. |
void |
saveUser(UserVO user)
When changes have been made, new VO is created and needs to be saved or object needs to be deleted, this method is invoked. |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected UserDAO(java.sql.Connection conn) throws java.lang.IllegalArgumentException
conn
- Connection to the database.
java.lang.IllegalArgumentException
- when no viable connection is
passed.Method Detail |
public java.util.Iterator getProjectUserIterator(int projectId) throws LohdutonException
projectId
- Project from which users are to be fetched.
LohdutonException
- When database query fails real bad.public void saveUser(UserVO user) throws java.lang.Exception
user
- UserVO class that is to be saved/updated/deleted.
java.lang.Exception
- When parameter isn't valid or sql operations fail.public UserVO getUser(java.lang.String userName) throws java.lang.Exception
userName
- Name of the user to be found.
java.lang.Exception
- When something devious happens or no viable
parameter is received.protected void finalize() throws LohdutonException
finalize
in class java.lang.Object
LohdutonException
- when something fails to shut down.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |