Quadcap Embeddable Database

com.quadcap.sql.AddTable Class Reference

Inheritance diagram for com.quadcap.sql.AddTable:

com.quadcap.sql.LogStep Externalizable LogEntry List of all members.

Detailed Description

Log step to add a table to a database.

Author:
Stan Bailes

Definition at line 57 of file AddTable.java.

Public Member Functions

 AddTable ()
 Default constructor.

 AddTable (Session session, Relation table)
 Explicit constructor from table.

void redo (Session session) throws IOException, SQLException
 LogStep.redo(): Add the table to the database.

void undo (Session session) throws IOException, SQLException
 LogStep.undo(): Remove the table from the database.

void prepare (Session session) throws IOException, SQLException
 LogStep.prepare(): We check for already-existing table and throw exception early, rather than let the user proceed under false illusions.

void readExternal (ObjectInput in) throws IOException, ClassNotFoundException
 Read me from a stream.

void writeExternal (ObjectOutput out) throws IOException
 Write me to a stream.

String toString ()
 Return a displayable representation for debugging.

void setExtern (Extern extern)
Extern getExtern ()

Package Attributes

Relation table

Static Package Attributes

Extern extern


Constructor & Destructor Documentation

com.quadcap.sql.AddTable.AddTable  ) 
 

Default constructor.

Definition at line 63 of file AddTable.java.

com.quadcap.sql.AddTable.AddTable Session  session,
Relation  table
 

Explicit constructor from table.

Definition at line 68 of file AddTable.java.


Member Function Documentation

Extern com.quadcap.sql.AddTable.getExtern  ) 
 

Definition at line 136 of file AddTable.java.

void com.quadcap.sql.AddTable.prepare Session  session  )  throws IOException, SQLException
 

LogStep.prepare(): We check for already-existing table and throw exception early, rather than let the user proceed under false illusions.

Reimplemented from com.quadcap.sql.LogStep.

Definition at line 94 of file AddTable.java.

References com.quadcap.sql.Tuple.getName(), com.quadcap.sql.Database.getRelation(), com.quadcap.sql.AddTable.prepare(), and com.quadcap.sql.AddTable.table.

Referenced by com.quadcap.sql.AddTable.prepare().

void com.quadcap.sql.AddTable.readExternal ObjectInput  in  )  throws IOException, ClassNotFoundException
 

Read me from a stream.

Definition at line 106 of file AddTable.java.

References com.quadcap.sql.AddTable.readExternal(), and com.quadcap.sql.AddTable.table.

Referenced by com.quadcap.sql.AddTable.readExternal().

void com.quadcap.sql.AddTable.redo Session  session  )  throws IOException, SQLException [virtual]
 

LogStep.redo(): Add the table to the database.

Implements com.quadcap.sql.LogStep.

Definition at line 76 of file AddTable.java.

References com.quadcap.sql.Database.addRelation(), com.quadcap.sql.AddTable.redo(), and com.quadcap.sql.AddTable.table.

Referenced by com.quadcap.sql.AddTable.redo().

void com.quadcap.sql.AddTable.setExtern Extern  extern  ) 
 

Definition at line 135 of file AddTable.java.

References com.quadcap.sql.AddTable.setExtern().

Referenced by com.quadcap.sql.AddTable.setExtern().

String com.quadcap.sql.AddTable.toString  ) 
 

Return a displayable representation for debugging.

Definition at line 125 of file AddTable.java.

References com.quadcap.sql.AddTable.table.

void com.quadcap.sql.AddTable.undo Session  session  )  throws IOException, SQLException [virtual]
 

LogStep.undo(): Remove the table from the database.

Implements com.quadcap.sql.LogStep.

Definition at line 84 of file AddTable.java.

References com.quadcap.sql.Tuple.getName(), com.quadcap.sql.Database.removeRelation(), com.quadcap.sql.AddTable.table, and com.quadcap.sql.AddTable.undo().

Referenced by com.quadcap.sql.AddTable.undo().

void com.quadcap.sql.AddTable.writeExternal ObjectOutput  out  )  throws IOException
 

Write me to a stream.

Definition at line 116 of file AddTable.java.

References com.quadcap.sql.AddTable.table, and com.quadcap.sql.AddTable.writeExternal().

Referenced by com.quadcap.sql.AddTable.writeExternal().


Member Data Documentation

Extern com.quadcap.sql.AddTable.extern [static, package]
 

Definition at line 134 of file AddTable.java.

Relation com.quadcap.sql.AddTable.table [package]
 

Definition at line 58 of file AddTable.java.

Referenced by com.quadcap.sql.AddTable.prepare(), com.quadcap.sql.AddTable.readExternal(), com.quadcap.sql.AddTable.redo(), com.quadcap.sql.AddTable.toString(), com.quadcap.sql.AddTable.undo(), and com.quadcap.sql.AddTable.writeExternal().