com.jdon.controller.model
Class Model

java.lang.Object
  extended by com.jdon.controller.model.Model
All Implemented Interfaces:
Cacheable, ModelIF, java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
DynamicModel, ModelSelector, UploadFile, UserModel

public class Model
extends java.lang.Object
implements ModelIF

Base domain model it can be DTO or nested Model. it is the important message between business layer and view layer. in view layer, it is created by form object(such as ActionForm object);in business layer, it is created by business components(such as session bean). thi class can be cached, and setModified is important, this method can be used to refresh the cache. because setModified function ,so the class is designed for a class, but not a interface. the difference with setModified and setCacheable; setCacheable to false, the model will never exist in the cache. setModified to true, if the model exists in the cache, the client will not get it from cache, it is same as being deleted from cache . deleting the model from cache must have a condition that the deleting operator can access the cache of the container, if it cann't access the container, it cann't delete the model from cache. such it is EJB.

See Also:
Serialized Form

Constructor Summary
Model()
           
 
Method Summary
 boolean isCacheable()
          in the past version, this method name is isCacheble, now change it after 1.3 !
 boolean isModified()
           
 void setCacheable(boolean cacheable)
          in the past version, this method name is setCacheble, now change it after 1.3 !
 void setModified(boolean modified)
          set the property has been modified such as : setName(String name){ this.name = name; setModified(true); }
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Model

public Model()
Method Detail

isCacheable

public boolean isCacheable()
in the past version, this method name is isCacheble, now change it after 1.3 !

Specified by:
isCacheable in interface Cacheable
Specified by:
isCacheable in interface ModelIF

setCacheable

public void setCacheable(boolean cacheable)
in the past version, this method name is setCacheble, now change it after 1.3 !

Specified by:
setCacheable in interface Cacheable
Specified by:
setCacheable in interface ModelIF

isModified

public boolean isModified()
Specified by:
isModified in interface ModelIF

setModified

public void setModified(boolean modified)
set the property has been modified such as : setName(String name){ this.name = name; setModified(true); }

Specified by:
setModified in interface ModelIF