|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectat.spardat.xma.mdl.WModel
The base class for all WidgetModels.
| Field Summary | |
static int |
S_NULL
Some subclasses require style flags driving their behaviour. |
| Constructor Summary | |
WModel(short id,
Page pm)
Constructor |
|
| Method Summary | |
abstract boolean |
changed()
Yields true if this WidgetModel has changed since the last server side event (or creation). |
void |
cleanUpAfterServerEvent()
A server event has been sucessfully executed. |
abstract void |
clear()
Resets this WModel to an empty status. |
abstract void |
commit()
This method clears the change history. |
void |
describe(DNode n)
describe puts all relevant information about this into the provided node. |
abstract void |
equalsCS(WModel mServer,
int syncPoint)
Compares this widget model (which must be a client side one) with the server buddy mServer and returns true if they are correct with respect to syncPoint. |
abstract int |
estimateMemory()
Provides the estimated number of bytes this widget model consumes in memory, asuming that it is in a committed state, i.e, there are no pending changes. |
short |
getId()
Every widget model has an integer id which identifies the model within the scope of its page. |
abstract boolean |
handle(ModelChangeEvent event)
All events that might change a WidgetModel are executed via this method. |
abstract void |
randomlyChange()
A implementing subclass must make a random change to its widget model. |
abstract void |
rollback()
This method restores this Widget Model to its state immediately after the last server side event (or creation). |
java.lang.String |
toString()
The default implementation is to map this on a debug string. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface at.spardat.xma.mdl.Synchronization |
externalize, internalize |
| Field Detail |
public static final int S_NULL
| Constructor Detail |
public WModel(short id,
Page pm)
id - a unique id identifying this WidgetModel within its page. This constant
is known at compile time and produced by the UI generator.pm - the Page this model belongs to| Method Detail |
public abstract boolean changed()
changed in interface Transactionalpublic abstract void rollback()
rollback in interface Transactionalpublic abstract void commit()
commit in interface Transactionalpublic short getId()
public abstract boolean handle(ModelChangeEvent event)
event - the event carrying the information of a change.
public abstract void clear()
public void describe(DNode n)
Descriptive
describe in interface Descriptiven - the node going to hold information about this.Descriptive.describe(at.spardat.xma.mdl.util.DNode)public java.lang.String toString()
public abstract void randomlyChange()
public abstract void equalsCS(WModel mServer,
int syncPoint)
This method is for debugging purpose and assumes that client and server models are running within the same VM. It tests if the models the programmer views after a synchronization operation are consistent.
This method requires that this is a client side model.
This method does not throw an exception if models are the same in terms of their contained model data. If it is allowed that models differ (for example some one way tables), this method must take this fact into account. If the models differ, this indicates a programming error and a RuntimeException is thrown.
mServer - the server side model partner for this.syncPoint - 0 if the point in time is after a client to server
sychnronization, 1 if the point is after a server to
client synchronization.
java.lang.RuntimeException - if models differpublic abstract int estimateMemory()
public void cleanUpAfterServerEvent()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||