com.f1j.mvc
Interface Model

All Known Subinterfaces:
Book

public interface Model

This is the base interface for a Model.


Method Summary
 Group getGroup()
          Returns the Group to which this Model belongs.
 void getLock()
          Acquires a lock for the group to which this Model belongs.
 boolean hasLock()
          Returns true if the current thread has acquired a lock for the group containing this Model.
 void releaseLock()
          Releases a lock previously acquired with the getLock() method.
 void rewindLock(int lockCount)
          Rewinds a lock after a call to the unwindlock method.
 int unwindLock()
          Unwinds a lock and returns the previous lock count.
 

Method Detail

getGroup

public Group getGroup()
Returns the Group to which this Model belongs.
Returns:
a Group object.

getLock

public void getLock()
Acquires a lock for the group to which this Model belongs.
See Also:
getLock(), hasLock(), releaseLock(), rewindLock(int), unwindLock()

hasLock

public boolean hasLock()
Returns true if the current thread has acquired a lock for the group containing this Model.
Returns:
boolean. true = the current thread has acquired a lock.
See Also:
getLock(), releaseLock(), rewindLock(int), unwindLock()

releaseLock

public void releaseLock()
Releases a lock previously acquired with the getLock() method.
See Also:
getLock(), hasLock(), rewindLock(int), unwindLock()

rewindLock

public void rewindLock(int lockCount)
Rewinds a lock after a call to the unwindlock method.
Parameters:
lockCount - the value returned by the unwindlock method.
See Also:
getLock(), hasLock(), releaseLock(), unwindLock()

unwindLock

public int unwindLock()
Unwinds a lock and returns the previous lock count. This lock count must be passed to the rewindLock method.
See Also:
getLock(), hasLock(), releaseLock(), rewindLock(int)