|
CFEngine API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.recommender.clients.console.ClientDBManager
Created by User: herlock Date: Apr 16, 2003 Time: 8:49:26 AM
Method Summary | |
int |
clientAddNewUser(User user)
Adds the user to the database and returns the assigned userid for this user. |
Item |
clientLookupItem(int itemId)
Check whether there is a client-side record for an item with this server id. |
Item |
clientLookupItem(java.lang.String itemName)
Check whether there is a Item with this name. |
Type |
clientLookupType(int id)
|
Type |
clientLookupType(java.lang.String typeName)
|
Type |
clientLookupType(java.lang.String typeName,
int id)
Check whether there is a Item with this name. |
User |
clientLookupUser(int userId)
Returns a User object with all User information |
User |
clientLookupUser(java.lang.String userName)
Returns a User object with all User information |
User |
clientLookupUser(java.lang.String userName,
int userId)
Returns a User object with all User information returns NULL if invalid user or password is incorrect. |
java.util.Vector |
clientRetrieveAllItems()
Returns a vector of names of all items that the client knows about. |
void |
getConnection()
Get connection with database and cache it in a private instance variable. |
static ClientDBManager |
getInstance()
|
java.util.Vector |
retrieveUserVector()
Fill an array with all the current usernames from the client database. |
java.util.Vector |
retriveAllTypes()
Gets a list of all the types that the client is currently aware of |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static ClientDBManager getInstance()
public void getConnection() throws java.sql.SQLException
java.sql.SQLException
public java.util.Vector retriveAllTypes()
public Item clientLookupItem(int itemId)
itemId
- - cfengine server itemid for the item
public Item clientLookupItem(java.lang.String itemName) throws ClientNoSuchItemException
itemName
-
ClientNoSuchItemException
public Type clientLookupType(java.lang.String typeName, int id)
typeName
- - name of the type. Null indicates id should be used instead.id
- - id of the type. Ignored if typename is non-null.
public Type clientLookupType(java.lang.String typeName)
public Type clientLookupType(int id)
public java.util.Vector retrieveUserVector()
public User clientLookupUser(java.lang.String userName)
userName
- Client-side username.
public User clientLookupUser(int userId)
userId
- server-side userId.
public User clientLookupUser(java.lang.String userName, int userId)
userName
- - null if this is a lookup by userIDuserId
- - ignored if userName is non-null
public int clientAddNewUser(User user)
user
-
public java.util.Vector clientRetrieveAllItems()
|
CFEngine API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |