|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.locomotive.loco.store.user.UserStore | +--org.locomotive.loco.store.user.UserStoreJdbc
Constructor Summary | |
UserStoreJdbc()
|
Method Summary | |
int |
createUser(java.sql.Connection conn,
int uid,
java.lang.String un,
java.lang.String pword,
int locoflg)
Persistantly stores User's data. |
boolean |
exists(java.sql.Connection conn,
int id)
returns true if a user with this userid exists in the user database |
boolean |
exists(java.sql.Connection conn,
java.lang.String un)
returns true if a user in the user database has the same name |
boolean |
existsAnyCase(java.sql.Connection conn,
java.lang.String un)
returns true if a user in the user database has the same name, regardless of case. |
protected java.math.BigInteger |
getNextUserId(java.sql.Connection conn)
returns the next free user id |
java.lang.String |
getUsername(java.sql.Connection conn,
int userid)
Given a userid, return the username |
java.util.Vector |
getUsernames(java.sql.Connection conn,
java.util.Vector userids)
Given a vector of Integer-ized userids, look up each username for them. |
LocoUserRow |
load(java.sql.Connection conn,
int uid)
used by constructor above - loads User based on uid from db |
LocoUserRow |
load(java.sql.Connection conn,
java.lang.String un,
boolean sensitiveToCase)
used by constructor above - loads User based on un from db |
java.lang.String[] |
loadAllUserNames(java.sql.Connection conn)
Returns an array of all the user names in the database. |
User[] |
loadUsers(java.sql.Connection conn,
int[] userids)
Searches the user database and returns a list of Users, based upon userid. |
void |
save(java.sql.Connection conn,
int userid,
java.lang.String username,
java.lang.String password,
int loco_flags)
Updates the User data in the database if changes have been made, silently ignored on anonymous users |
void |
saveLoginTime(java.sql.Connection conn,
int userid)
Updates the user.last_login field in the database. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public UserStoreJdbc()
Method Detail |
protected java.math.BigInteger getNextUserId(java.sql.Connection conn) throws IdException
conn
- a JDBC connection with access to the Loco user databasepublic int createUser(java.sql.Connection conn, int uid, java.lang.String un, java.lang.String pword, int locoflg) throws LoadUserException
conn
- a JDBC connection with access to the Loco user databaseuid
- the userid, system will pick if <= 0un
- username of the new userpword
- password of the new userlocoflg
- flags of the new user for Loco-specific functionspublic boolean exists(java.sql.Connection conn, int id) throws LoadUserException
conn
- a JDBC connection with access to the Loco user databaseid
- the userid of the user to look forpublic boolean exists(java.sql.Connection conn, java.lang.String un) throws LoadUserException
conn
- a JDBC connection with access to the Loco user databaseun
- the username of the user to look forpublic boolean existsAnyCase(java.sql.Connection conn, java.lang.String un) throws LoadUserException
conn
- a JDBC connection with access to the Loco user databaseun
- the username of the user to look forpublic void saveLoginTime(java.sql.Connection conn, int userid) throws LoadUserException
conn
- an active JDBC connectionpublic void save(java.sql.Connection conn, int userid, java.lang.String username, java.lang.String password, int loco_flags) throws LoadUserException
conn
- an active JDBC connectionpublic LocoUserRow load(java.sql.Connection conn, java.lang.String un, boolean sensitiveToCase) throws LoadUserException
public LocoUserRow load(java.sql.Connection conn, int uid) throws LoadUserException
public User[] loadUsers(java.sql.Connection conn, int[] userids) throws LoadUserException
conn
- a JDBC connectionuserids
- a list of userids to retrievepublic java.lang.String[] loadAllUserNames(java.sql.Connection conn) throws LoadUserException
conn
- a JDBC connectionpublic java.util.Vector getUsernames(java.sql.Connection conn, java.util.Vector userids) throws java.sql.SQLException
public java.lang.String getUsername(java.sql.Connection conn, int userid) throws java.sql.SQLException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |