at.spardat.xma.mdl.util
Class TransAtomTable.TableChangeEvent

java.lang.Object
  extended byat.spardat.xma.mdl.util.TransAtomTable.TableChangeEvent
All Implemented Interfaces:
Descriptive
Direct Known Subclasses:
TransAtomTable.AddRowChangeEvent, TransAtomTable.ClearEvent, TransAtomTable.RemoveRowChangeEvent, TransAtomTable.ReplaceAtomChangeEvent, TransAtomTable.ReplaceRowChangeEvent
Enclosing class:
TransAtomTable

public abstract class TransAtomTable.TableChangeEvent
extends java.lang.Object
implements Descriptive

Base class for change events on TransAtomTables. The execute methods of the subclasses may only modify the instance variable data_ and must not perform any error checking on the provided arguments. Furthermore, the instance streamedTableSize_, which holds an estimator of the byte size of the table, must be kept up to date if updateStreamedSize_ is true.


Constructor Summary
TransAtomTable.TableChangeEvent()
           
 
Method Summary
 void describe(DNode n)
          describe puts all relevant information about this into the provided node.
abstract  boolean execute()
          Executes this change event and modifies the table.
abstract  void externalize(XmaOutput out)
          Writes the state to an output stream
abstract  byte getType()
          Returns a type indicator used in serialization
abstract  void internalize(XmaInput in)
          Reads the instance variables from an input stream
abstract  int streamedSize()
          Returns the number of bytes this event requires when streamed to a byte array
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransAtomTable.TableChangeEvent

public TransAtomTable.TableChangeEvent()
Method Detail

execute

public abstract boolean execute()
Executes this change event and modifies the table. This condition holds for all events subclassed from this: There is no need to perform error checking on arguments because this is done by the caller of execute.

Returns:
true if modification has been done, false otherwise. If false is returned, this should be considered as severe programming error.

getType

public abstract byte getType()
Returns a type indicator used in serialization


streamedSize

public abstract int streamedSize()
Returns the number of bytes this event requires when streamed to a byte array


internalize

public abstract void internalize(XmaInput in)
                          throws java.io.IOException,
                                 java.lang.ClassNotFoundException
Reads the instance variables from an input stream

Throws:
java.io.IOException
java.lang.ClassNotFoundException

externalize

public abstract void externalize(XmaOutput out)
                          throws java.io.IOException
Writes the state to an output stream

Throws:
java.io.IOException

describe

public void describe(DNode n)
Description copied from interface: Descriptive
describe puts all relevant information about this into the provided node. The implementing method may construct subnodes of node.

Specified by:
describe in interface Descriptive
Parameters:
n - the node going to hold information about this.
See Also:
Descriptive.describe(at.spardat.xma.mdl.util.DNode)