Package de.espirit.firstspirit.access
Interface Lockable
- All Known Subinterfaces:
ContentPackage,Package,Project,ScheduleEntry,ScheduleTaskTemplate,Task,TemplatePackage
public interface Lockable
This interface provides methods for all elements which supports lock mechanism
Date: 24.07.2006
Time: 07:45:22
- Since:
- 4.0
-
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether this object is changed locally or not.booleanisLocked()Returns the lock state of this object.voidlock()Locks this object.voidrefresh()Discardlocal changesand load actual server version of this objectvoidsave()Saves this object.voidunlock()Unlocks this object.
-
Method Details
-
lock
Locks this object. If the version of this object has been changed on the server and it isn'tchanged locallyit will be refreshed transparent.
In case oflocal changesaConcurrentModificationExceptionwill be thrown.- Throws:
ConcurrentChangeException- if this objectis changedlocally and it has changed on the serverLockException- if the underlying object is already locked by another user- Since:
- 4.0
- See Also:
-
unlock
void unlock()Unlocks this object.- Since:
- 4.0
-
isLocked
boolean isLocked()Returns the lock state of this object.- Returns:
trueif this object is locked,falseotherwise- Since:
- 4.0
-
save
void save()Saves this object. Requires alockto this object.- Since:
- 4.0
-
isChanged
boolean isChanged()Indicates whether this object is changed locally or not.- Returns:
trueif this object is changed locally,falseotherwise- Since:
- 4.0
-
refresh
void refresh()Discardlocal changesand load actual server version of this object- Since:
- 4.0
-