scone.netobjects
Class UserCache
java.lang.Object
scone.netobjects.UserCache
- All Implemented Interfaces:
- TableRecordCacheInterface
public class UserCache
- extends java.lang.Object
- implements TableRecordCacheInterface
This Class is used to access User objects and cache them in a hashtable.
- Author:
- Harald Weinreich, Volkert Buchmann
Method Summary |
static User |
check(java.lang.String name,
java.lang.String password)
Check if the user exists in Cache or DB AND if password is right. |
static User |
checkById(java.lang.String id)
|
static void |
clean()
save cache to DB |
static User |
get(java.lang.String name)
|
static User |
getById(java.lang.String id)
|
static java.util.Vector |
getUsers(java.lang.String sqlClause)
This method returns a Vector of users to a given query string |
static void |
init(int timeTillCleanUp,
int gcType)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
cache
protected static CacheTable cache
lock
public static java.lang.Object lock
UserCache
public UserCache()
init
public static void init(int timeTillCleanUp,
int gcType)
getById
public static User getById(java.lang.String id)
checkById
public static User checkById(java.lang.String id)
get
public static User get(java.lang.String name)
check
public static User check(java.lang.String name,
java.lang.String password)
- Check if the user exists in Cache or DB AND if password is right.
Return user object if user and password found, otherwise return null.
getUsers
public static java.util.Vector getUsers(java.lang.String sqlClause)
- This method returns a Vector of users to a given query string
- Parameters:
sqlClause
- The where clause for the query string.
clean
public static void clean()
- save cache to DB