|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.sakaiproject.util.storage.BaseDbFlatStorage
org.sakaiproject.component.legacy.user.DbUserService.DbStorage
Covers for the BaseXmlFileStorage, providing User and UserEdit parameters
Field Summary | |
protected BaseUserDirectoryService.Storage |
m_oldStorage
A prior version's storage model. |
Fields inherited from class org.sakaiproject.util.storage.BaseDbFlatStorage |
m_caseInsensitive, m_locking, m_locks, m_locksAreInTable, m_reader, m_resourcePropertyTableName, m_resourceTableDbidField, m_resourceTableIdField, m_resourceTableInsertFields, m_resourceTableInsertValues, m_resourceTableName, m_resourceTableReadFields, m_resourceTableSortField1, m_resourceTableSortField2, m_resourceTableUpdateFields, m_sql |
Constructor Summary | |
DbUserService.DbStorage(StorageUser user)
Construct. |
Method Summary | |
void |
cancel(UserEdit edit)
Cancel the changes and release the lock. |
boolean |
check(String id)
Check if a user by this id exists. |
void |
commit(UserEdit edit)
Commit the changes and release the lock. |
int |
count()
Count all the users. |
int |
countSearch(String criteria)
Count all the users with id or email, first or last name matching criteria. |
UserEdit |
edit(String id)
Get a lock on the user with this id, or null if a lock cannot be gotten. |
protected Object[] |
fields(String id,
UserEdit edit,
boolean idAgain)
Get the fields for the database from the edit for this id, and the id again at the end if needed |
Collection |
findUsersByEmail(String email)
Get the users with this email, or return empty if none found. |
UserEdit |
get(String id)
Get the user with this id, or null if not found. |
List |
getAll()
Get all users. |
List |
getAll(int first,
int last)
Get all the users in record range. |
UserEdit |
put(String id)
Add a new user with this id. |
void |
readProperties(UserEdit edit,
ResourcePropertiesEdit props)
Read properties from storage into the edit's properties. |
Object |
readSqlResultRecord(ResultSet result)
Read from the result one set of fields to create a Resource. |
void |
remove(UserEdit edit)
Remove this user. |
List |
search(String criteria,
int first,
int last)
Search for users with id or email, first or last name matching criteria, in range. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.sakaiproject.component.legacy.user.BaseUserDirectoryService.Storage |
close, open |
Field Detail |
protected BaseUserDirectoryService.Storage m_oldStorage
Constructor Detail |
public DbUserService.DbStorage(StorageUser user)
user
- The StorageUser class to call back for creation of Resource and Edit objects.Method Detail |
public boolean check(String id)
BaseUserDirectoryService.Storage
check
in interface BaseUserDirectoryService.Storage
id
- The user id.
public UserEdit get(String id)
BaseUserDirectoryService.Storage
get
in interface BaseUserDirectoryService.Storage
id
- The user id.
public List getAll()
BaseUserDirectoryService.Storage
getAll
in interface BaseUserDirectoryService.Storage
public List getAll(int first, int last)
BaseUserDirectoryService.Storage
getAll
in interface BaseUserDirectoryService.Storage
first
- The first record position to return.last
- The last record position to return.
public int count()
BaseUserDirectoryService.Storage
count
in interface BaseUserDirectoryService.Storage
public UserEdit put(String id)
BaseUserDirectoryService.Storage
put
in interface BaseUserDirectoryService.Storage
id
- The user id.
public UserEdit edit(String id)
BaseUserDirectoryService.Storage
edit
in interface BaseUserDirectoryService.Storage
id
- The user id.
public void commit(UserEdit edit)
BaseUserDirectoryService.Storage
commit
in interface BaseUserDirectoryService.Storage
edit
- The user to commit.public void cancel(UserEdit edit)
BaseUserDirectoryService.Storage
cancel
in interface BaseUserDirectoryService.Storage
edit
- The user to commit.public void remove(UserEdit edit)
BaseUserDirectoryService.Storage
remove
in interface BaseUserDirectoryService.Storage
edit
- The user to remove.public List search(String criteria, int first, int last)
BaseUserDirectoryService.Storage
search
in interface BaseUserDirectoryService.Storage
criteria
- The search criteria.first
- The first record position to return.last
- The last record position to return.
public int countSearch(String criteria)
BaseUserDirectoryService.Storage
countSearch
in interface BaseUserDirectoryService.Storage
criteria
- The search criteria.
public Collection findUsersByEmail(String email)
findUsersByEmail
in interface BaseUserDirectoryService.Storage
public void readProperties(UserEdit edit, ResourcePropertiesEdit props)
readProperties
in interface BaseUserDirectoryService.Storage
edit
- The user to read properties for.protected Object[] fields(String id, UserEdit edit, boolean idAgain)
id
- The resource idedit
- The edit (may be null in a new)idAgain
- If true, include the id field again at the end, else don't.
public Object readSqlResultRecord(ResultSet result)
readSqlResultRecord
in interface SqlReader
result
- The Sql query result.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |