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

java.lang.Object
  extended byat.spardat.xma.mdl.util.TransAtomTable.TableChangeEvent
      extended byat.spardat.xma.mdl.util.TransAtomTable.RemoveRowChangeEvent
All Implemented Interfaces:
Descriptive
Enclosing class:
TransAtomTable

public final class TransAtomTable.RemoveRowChangeEvent
extends TransAtomTable.TableChangeEvent

Removes a row at a given index from this. This is of time consuming O(n).


Constructor Summary
TransAtomTable.RemoveRowChangeEvent()
          May only be used to call internalize thereafter.
TransAtomTable.RemoveRowChangeEvent(int index)
          Constructor
 
Method Summary
 void describe(DNode n)
          describe puts all relevant information about this into the provided node.
 boolean execute()
          Executes this change event and modifies the table.
 void externalize(XmaOutput out)
          Writes the state to an output stream
 byte getType()
          Returns a type indicator used in serialization
 void internalize(XmaInput in)
          Reads the instance variables from an input stream
 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.RemoveRowChangeEvent

public TransAtomTable.RemoveRowChangeEvent()
May only be used to call internalize thereafter.


TransAtomTable.RemoveRowChangeEvent

public TransAtomTable.RemoveRowChangeEvent(int index)
Constructor

Parameters:
index - the index of the row to delete
Method Detail

execute

public boolean execute()
Description copied from class: TransAtomTable.TableChangeEvent
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.

Specified by:
execute in class TransAtomTable.TableChangeEvent
Returns:
true if modification has been done, false otherwise. If false is returned, this should be considered as severe programming error.
See Also:
TransAtomTable.TableChangeEvent.execute()

getType

public byte getType()
Description copied from class: TransAtomTable.TableChangeEvent
Returns a type indicator used in serialization

Specified by:
getType in class TransAtomTable.TableChangeEvent
See Also:
TransAtomTable.TableChangeEvent.getType()

streamedSize

public int streamedSize()
Description copied from class: TransAtomTable.TableChangeEvent
Returns the number of bytes this event requires when streamed to a byte array

Specified by:
streamedSize in class TransAtomTable.TableChangeEvent
See Also:
TransAtomTable.TableChangeEvent.streamedSize()

externalize

public void externalize(XmaOutput out)
                 throws java.io.IOException
Description copied from class: TransAtomTable.TableChangeEvent
Writes the state to an output stream

Specified by:
externalize in class TransAtomTable.TableChangeEvent
Throws:
java.io.IOException
See Also:
TransAtomTable.TableChangeEvent.externalize(at.spardat.xma.serializer.XmaOutput)

internalize

public void internalize(XmaInput in)
                 throws java.io.IOException,
                        java.lang.ClassNotFoundException
Description copied from class: TransAtomTable.TableChangeEvent
Reads the instance variables from an input stream

Specified by:
internalize in class TransAtomTable.TableChangeEvent
Throws:
java.io.IOException
java.lang.ClassNotFoundException
See Also:
TransAtomTable.TableChangeEvent.internalize(at.spardat.xma.serializer.XmaInput)

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
Overrides:
describe in class TransAtomTable.TableChangeEvent
See Also:
Descriptive.describe(at.spardat.xma.mdl.util.DNode)