Quadcap Embeddable Database

com.quadcap.sql.AutoNumberStep Class Reference

Inheritance diagram for com.quadcap.sql.AutoNumberStep:

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

Detailed Description

Log step to record allocations of auto numbers...

Author:
Stan Bailes

Definition at line 72 of file AutoNumberStep.java.

Public Member Functions

 AutoNumberStep ()
 Default constructor for serialization.

 AutoNumberStep (Session session, Table table, long num)
 Explicit constructor.

void undo (Session session) throws IOException, SQLException
 We don't bother to undo this -- we don't mind gaps.

void redo (Session session) throws IOException, SQLException
 "Redo" keeps the constraint number in sync.

void prepare (Session session) throws IOException, SQLException
 Perform any actions that are necessary to prepare this log record for being written to the log.

void readExternal (ObjectInput in) throws IOException, ClassNotFoundException
void writeExternal (ObjectOutput out) throws IOException
String toString ()
void setCurrentId (long x)
 Exposed so a careful client can avoid an allocation.

void setExtern (Extern extern)
Extern getExtern ()

Package Attributes

String tableName = null
long num = 0

Static Package Attributes

Extern extern


Constructor & Destructor Documentation

com.quadcap.sql.AutoNumberStep.AutoNumberStep  ) 
 

Default constructor for serialization.

Definition at line 79 of file AutoNumberStep.java.

com.quadcap.sql.AutoNumberStep.AutoNumberStep Session  session,
Table  table,
long  num
 

Explicit constructor.

Definition at line 84 of file AutoNumberStep.java.

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


Member Function Documentation

Extern com.quadcap.sql.AutoNumberStep.getExtern  ) 
 

Definition at line 141 of file AutoNumberStep.java.

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

Perform any actions that are necessary to prepare this log record for being written to the log.

This is called before the log record is written, and before the first invocation of 'redo'. It is not called subsequently, or during recovery.

Reimplemented from com.quadcap.sql.LogStep.

Definition at line 106 of file AutoNumberStep.java.

References com.quadcap.sql.AutoNumberStep.prepare().

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

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

Definition at line 109 of file AutoNumberStep.java.

References com.quadcap.sql.AutoNumberStep.readExternal().

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

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

"Redo" keeps the constraint number in sync.

We don't care about the rows for which this was generated, we just need the max number that we ever gave out....

Implements com.quadcap.sql.LogStep.

Definition at line 100 of file AutoNumberStep.java.

References com.quadcap.sql.AutoNumberStep.num, com.quadcap.sql.AutoNumberStep.redo(), com.quadcap.sql.AutoNumberStep.tableName, and com.quadcap.sql.Database.updateTableIdentity().

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

void com.quadcap.sql.AutoNumberStep.setCurrentId long  x  ) 
 

Exposed so a careful client can avoid an allocation.

Definition at line 137 of file AutoNumberStep.java.

References com.quadcap.sql.AutoNumberStep.setCurrentId().

Referenced by com.quadcap.sql.AutoNumberConstraint.checkInsert(), and com.quadcap.sql.AutoNumberStep.setCurrentId().

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

Definition at line 140 of file AutoNumberStep.java.

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

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

String com.quadcap.sql.AutoNumberStep.toString  ) 
 

Definition at line 124 of file AutoNumberStep.java.

References com.quadcap.sql.AutoNumberStep.num, and com.quadcap.sql.AutoNumberStep.tableName.

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

We don't bother to undo this -- we don't mind gaps.

Implements com.quadcap.sql.LogStep.

Definition at line 93 of file AutoNumberStep.java.

References com.quadcap.sql.AutoNumberStep.undo().

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

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

Definition at line 117 of file AutoNumberStep.java.

References com.quadcap.sql.AutoNumberStep.num, com.quadcap.sql.AutoNumberStep.tableName, and com.quadcap.sql.AutoNumberStep.writeExternal().

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


Member Data Documentation

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

Definition at line 139 of file AutoNumberStep.java.

long com.quadcap.sql.AutoNumberStep.num = 0 [package]
 

Definition at line 74 of file AutoNumberStep.java.

Referenced by com.quadcap.sql.AutoNumberStep.redo(), com.quadcap.sql.AutoNumberStep.toString(), and com.quadcap.sql.AutoNumberStep.writeExternal().

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

Definition at line 73 of file AutoNumberStep.java.

Referenced by com.quadcap.sql.AutoNumberStep.redo(), com.quadcap.sql.AutoNumberStep.toString(), and com.quadcap.sql.AutoNumberStep.writeExternal().