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 TypeMethodDescriptionboolean
Indicates whether this object is changed locally or not.boolean
isLocked()
Returns the lock state of this object.void
lock()
Locks this object.void
refresh()
Discardlocal changes
and load actual server version of this objectvoid
save()
Saves this object.void
unlock()
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 locally
it will be refreshed transparent.
In case oflocal changes
aConcurrentModificationException
will be thrown.- Throws:
ConcurrentChangeException
- if this objectis changed
locally 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:
true
if this object is locked,false
otherwise- Since:
- 4.0
-
save
void save()Saves this object. Requires alock
to this object.- Since:
- 4.0
-
isChanged
boolean isChanged()Indicates whether this object is changed locally or not.- Returns:
true
if this object is changed locally,false
otherwise- Since:
- 4.0
-
refresh
void refresh()Discardlocal changes
and load actual server version of this object- Since:
- 4.0
-