com.fruitioninc.jwc
Class AbstractThreadLocalModel

java.lang.Object
  |
  +--com.fruitioninc.jwc.AbstractModel
        |
        +--com.fruitioninc.jwc.AbstractThreadLocalModel
All Implemented Interfaces:
Model
Direct Known Subclasses:
ThreadLocalTextFieldModel

public abstract class AbstractThreadLocalModel
extends AbstractModel

Abstract base class for models that store their state in thread local storage.


Field Summary
static int SCOPE_REQUEST
          State that persists for the life of the request.
static int SCOPE_SESSION
          State that persists for the life of the session.
 
Constructor Summary
AbstractThreadLocalModel(Component component)
          Creates a model that stores its state in request scope.
AbstractThreadLocalModel(Component component, int scope)
          Creates a model that stores its state in thread local storage.
 
Method Summary
protected  java.lang.Object getProperty(java.lang.String name)
          Returns the value of a property.
protected  void setProperty(java.lang.String name, java.lang.Object value)
          Sets the value of a property.
 
Methods inherited from class com.fruitioninc.jwc.AbstractModel
_getStatefull, _setStatefull
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SCOPE_REQUEST

public static final int SCOPE_REQUEST
State that persists for the life of the request.

See Also:
Constant Field Values

SCOPE_SESSION

public static final int SCOPE_SESSION
State that persists for the life of the session.

See Also:
Constant Field Values
Constructor Detail

AbstractThreadLocalModel

public AbstractThreadLocalModel(Component component)
Creates a model that stores its state in request scope.


AbstractThreadLocalModel

public AbstractThreadLocalModel(Component component,
                                int scope)
Creates a model that stores its state in thread local storage.

Parameters:
scope - scope of the state; either SCOPE_REQUEST or SCOPE_SESSION
Method Detail

getProperty

protected java.lang.Object getProperty(java.lang.String name)
Returns the value of a property.


setProperty

protected void setProperty(java.lang.String name,
                           java.lang.Object value)
Sets the value of a property.