|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Removable
A Removable
item is an item that can be flagged
as removed. This doesn't generally remove the information about the
item from the database, but can be used by client applications
to hide items that the user is not interested in.
For example, all methods generating lists of items, will by default not include those that are flagged as removed.
At regular intervals, a cleanup application is checking the database for items that are flagged to be removed and deletes them permanently.
Reference implementation
public boolean isRemoved() { return getData().isRemoved(); } public void setRemoved(boolean removed) throws PermissionDeniedException { checkPermission(removed ? Permission.DELETE : Permission.WRITE); getData().setRemoved(removed); }
Method Summary | |
---|---|
boolean |
isRemoved()
Check if the removed flag is set for this item. |
void |
setRemoved(boolean removed)
Set the removed flag for this item. |
Methods inherited from interface net.sf.basedb.core.Identifiable |
---|
getId, getType, getVersion |
Methods inherited from interface net.sf.basedb.core.AccessControlled |
---|
checkPermission, getPermissions, hasPermission |
Method Detail |
---|
boolean isRemoved()
void setRemoved(boolean removed) throws PermissionDeniedException
removed
- TRUE if the item should be flagged as removed,
FALSE otherwise
PermissionDeniedException
- If the logged in user doesn't
have Permission.DELETE
permission for setting the flag
to TRUE or Permission.WRITE
permission for setting the
flag to FALSE
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |