Quadcap Embeddable Database

com.quadcap.sql.DeleteRow Class Reference

Inheritance diagram for com.quadcap.sql.DeleteRow:

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

Detailed Description

Log step to delete a row from a table.

Author:
Stan Bailes

Definition at line 73 of file DeleteRow.java.

Public Member Functions

 DeleteRow ()
 Default constructor.

 DeleteRow (Session session, Table table, long rowId)
 Explicit constructor specifies table and row id.

long getRowId ()
 Return the row id of the deleted row.

void redo (Session session) throws IOException, SQLException
 LogStep.redo implementation.

void undo (Session session) throws IOException, SQLException
 LogStep.undo: Undo the row deletion by putting the old row back! (The row map is used to keep track of the fact that the row may have a new row id now...).

void prepare (Session session) throws IOException, SQLException
 Get ready to delete the row.

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

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

void setExtern (Extern extern)
Extern getExtern ()
String toString ()
 Return displayable string representation.


Package Functions

final Table getTable (Database db) throws IOException
 Get (lazy lookup) the table.


Package Attributes

transient Table table
transient LazyRow row = null
byte[] rowBytes
String tableName = null
long rowId = -1
 Extern = null
 My class's extern object.


Constructor & Destructor Documentation

com.quadcap.sql.DeleteRow.DeleteRow  ) 
 

Default constructor.

Definition at line 84 of file DeleteRow.java.

com.quadcap.sql.DeleteRow.DeleteRow Session  session,
Table  table,
long  rowId
 

Explicit constructor specifies table and row id.

Definition at line 89 of file DeleteRow.java.

References com.quadcap.sql.TupleImpl.getName().


Member Function Documentation

Extern com.quadcap.sql.DeleteRow.getExtern  ) 
 

Definition at line 210 of file DeleteRow.java.

long com.quadcap.sql.DeleteRow.getRowId  ) 
 

Return the row id of the deleted row.

Definition at line 99 of file DeleteRow.java.

References com.quadcap.sql.DeleteRow.rowId.

final Table com.quadcap.sql.DeleteRow.getTable Database  db  )  throws IOException [package]
 

Get (lazy lookup) the table.

Definition at line 104 of file DeleteRow.java.

References com.quadcap.sql.DeleteRow.getTable(), com.quadcap.sql.DeleteRow.table, and com.quadcap.sql.DeleteRow.tableName.

Referenced by com.quadcap.sql.DeleteRow.getTable().

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

Get ready to delete the row.

Reimplemented from com.quadcap.sql.LogStep.

Definition at line 157 of file DeleteRow.java.

References com.quadcap.sql.file.BlockFile.getBytes(), com.quadcap.sql.TupleImpl.getColumnCount(), com.quadcap.sql.Database.getRow(), com.quadcap.sql.Database.inMemory(), com.quadcap.sql.DeleteRow.prepare(), com.quadcap.sql.DeleteRow.row, com.quadcap.sql.DeleteRow.rowBytes, and com.quadcap.sql.DeleteRow.rowId.

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

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

Read me from a stream.

Definition at line 179 of file DeleteRow.java.

References com.quadcap.sql.DeleteRow.readExternal(), com.quadcap.sql.DeleteRow.rowBytes, com.quadcap.sql.DeleteRow.rowId, and com.quadcap.sql.DeleteRow.tableName.

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

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

LogStep.redo implementation.

Delete the row (and blob refs, if any)

Implements com.quadcap.sql.LogStep.

Definition at line 115 of file DeleteRow.java.

References com.quadcap.sql.DeleteRow.redo(), com.quadcap.sql.Database.removeRow(), and com.quadcap.sql.DeleteRow.rowId.

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

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

Definition at line 209 of file DeleteRow.java.

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

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

String com.quadcap.sql.DeleteRow.toString  ) 
 

Return displayable string representation.

Definition at line 216 of file DeleteRow.java.

References com.quadcap.sql.DeleteRow.rowId, and com.quadcap.sql.DeleteRow.tableName.

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

LogStep.undo: Undo the row deletion by putting the old row back! (The row map is used to keep track of the fact that the row may have a new row id now...).

Implements com.quadcap.sql.LogStep.

Definition at line 138 of file DeleteRow.java.

References com.quadcap.sql.Database.inMemory(), com.quadcap.sql.file.BlockFile.putBytes(), com.quadcap.sql.Database.putRow(), com.quadcap.sql.file.Log.putRowMap(), com.quadcap.sql.DeleteRow.row, com.quadcap.sql.DeleteRow.rowBytes, com.quadcap.sql.DeleteRow.rowId, and com.quadcap.sql.DeleteRow.undo().

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

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

Write me to a stream.

Definition at line 193 of file DeleteRow.java.

References com.quadcap.sql.DeleteRow.rowBytes, com.quadcap.sql.DeleteRow.rowId, com.quadcap.sql.DeleteRow.tableName, and com.quadcap.sql.DeleteRow.writeExternal().

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


Member Data Documentation

com.quadcap.sql.DeleteRow.Extern = null [package]
 

My class's extern object.

Definition at line 208 of file DeleteRow.java.

transient LazyRow com.quadcap.sql.DeleteRow.row = null [package]
 

Definition at line 75 of file DeleteRow.java.

Referenced by com.quadcap.sql.DeleteRow.prepare(), and com.quadcap.sql.DeleteRow.undo().

byte [] com.quadcap.sql.DeleteRow.rowBytes [package]
 

Definition at line 77 of file DeleteRow.java.

Referenced by com.quadcap.sql.DeleteRow.prepare(), com.quadcap.sql.DeleteRow.readExternal(), com.quadcap.sql.DeleteRow.undo(), and com.quadcap.sql.DeleteRow.writeExternal().

long com.quadcap.sql.DeleteRow.rowId = -1 [package]
 

Definition at line 79 of file DeleteRow.java.

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

transient Table com.quadcap.sql.DeleteRow.table [package]
 

Definition at line 74 of file DeleteRow.java.

Referenced by com.quadcap.sql.DeleteRow.getTable().

String com.quadcap.sql.DeleteRow.tableName = null [package]
 

Definition at line 78 of file DeleteRow.java.

Referenced by com.quadcap.sql.DeleteRow.getTable(), com.quadcap.sql.DeleteRow.readExternal(), com.quadcap.sql.DeleteRow.toString(), and com.quadcap.sql.DeleteRow.writeExternal().