|
|||||||||||
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.alias.DbAliasService.DbStorage
Covers for the BaseXmlFileStorage, providing User and AliasEdit parameters
Field Summary | |
protected BaseAliasService.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 | |
DbAliasService.DbStorage(StorageUser user)
Construct. |
Method Summary | |
void |
cancel(AliasEdit edit)
Cancel the changes and release the lock. |
boolean |
check(String id)
Check if an alias with this id exists. |
void |
commit(AliasEdit edit)
Commit the changes and release the lock. |
int |
count()
Count all the aliases. |
int |
countSearch(String criteria)
Count all the aliases with id or target matching criteria. |
AliasEdit |
edit(String id)
Get a lock on the alias with this id, or null if a lock cannot be gotten. |
protected Object[] |
fields(String id,
AliasEdit edit,
boolean idAgain)
Get the fields for the database from the edit for this id, and the id again at the end if needed |
AliasEdit |
get(String id)
Get the alias with this id, or null if not found. |
List |
getAll()
Get all the alias. |
List |
getAll(int first,
int last)
Get all the alias in record range. |
List |
getAll(String target)
Get all the alias that point at this target. |
List |
getAll(String target,
int first,
int last)
Get all the alias that point at this target, in record range. |
AliasEdit |
put(String id)
Add a new alias with this id. |
void |
readProperties(AliasEdit 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(AliasEdit edit)
Remove this alias. |
List |
search(String criteria,
int first,
int last)
Search for aliases with id or target 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.alias.BaseAliasService.Storage |
close, open |
Field Detail |
protected BaseAliasService.Storage m_oldStorage
Constructor Detail |
public DbAliasService.DbStorage(StorageUser user)
user
- The StorageUser class to call back for creation of Resource and Edit objects.Method Detail |
public boolean check(String id)
BaseAliasService.Storage
check
in interface BaseAliasService.Storage
id
- The alias id (case insensitive).
public AliasEdit get(String id)
BaseAliasService.Storage
get
in interface BaseAliasService.Storage
id
- The alias id (case insensitive).
public List getAll()
BaseAliasService.Storage
getAll
in interface BaseAliasService.Storage
public List getAll(int first, int last)
BaseAliasService.Storage
getAll
in interface BaseAliasService.Storage
first
- The first record position to return.last
- The last record position to return.
public int count()
BaseAliasService.Storage
count
in interface BaseAliasService.Storage
public List getAll(String target)
BaseAliasService.Storage
getAll
in interface BaseAliasService.Storage
public List getAll(String target, int first, int last)
BaseAliasService.Storage
getAll
in interface BaseAliasService.Storage
first
- The first record position to return.last
- The last record position to return.
public AliasEdit put(String id)
BaseAliasService.Storage
put
in interface BaseAliasService.Storage
id
- The alias id.
public AliasEdit edit(String id)
BaseAliasService.Storage
edit
in interface BaseAliasService.Storage
id
- The alias id (case insensitive).
public void commit(AliasEdit edit)
BaseAliasService.Storage
commit
in interface BaseAliasService.Storage
public void cancel(AliasEdit edit)
BaseAliasService.Storage
cancel
in interface BaseAliasService.Storage
public void remove(AliasEdit edit)
BaseAliasService.Storage
remove
in interface BaseAliasService.Storage
public List search(String criteria, int first, int last)
BaseAliasService.Storage
search
in interface BaseAliasService.Storage
criteria
- The search criteria.first
- The first record position to return.last
- The last record position to return.
public int countSearch(String criteria)
BaseAliasService.Storage
countSearch
in interface BaseAliasService.Storage
criteria
- The search criteria.
public void readProperties(AliasEdit edit, ResourcePropertiesEdit props)
readProperties
in interface BaseAliasService.Storage
edit
- The user to read properties for.protected Object[] fields(String id, AliasEdit 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 |