2004.04.29


com.jdc.rdb.sql.dml.clause
Class Commit

java.lang.Object
  |
  +--com.jdc.lang.Object
        |
        +--com.jdc.rdb.sql.SQLClause
              |
              +--com.jdc.rdb.sql.dml.DMLClause
                    |
                    +--com.jdc.rdb.sql.dml.clause.Commit
All Implemented Interfaces:
Clause, DeleteClause, InsertClause, SelectClause, Serializable, UpdateClause

public class Commit
extends DMLClause
implements SelectClause, InsertClause, UpdateClause, DeleteClause

Commit represents a Select, Insert, Update, or Delete statement COMMIT clause. The optional COMMIT clause specifies how the Database will commit an active transaction when the SQL statement is executed and/or whether the commit operation performs an operating system (OS) flush to disk. Normally, an SQL statement implicitly uses a transaction if one is not already active.

Note:
This SQL statement clause is not compatible with the ANSI SQL-92 standard.

Version:
2.0
Author:
Jay Damon
See Also:
Select, Insert, Update, Delete, Serialized Form

Field Summary
 
Fields inherited from class com.jdc.rdb.sql.dml.DMLClause
sqlClause
 
Fields inherited from class com.jdc.lang.Object
string
 
Constructor Summary
Commit()
          Constructs a new Commit clause object.
Commit(boolean forceFlush)
          Constructs a new Commit clause object for the specified flush status.
Commit(int interval)
          Constructs a new Commit clause object for the specified commit interval.
 
Method Summary
 String getKeyword()
          Returns the Commit clause keyword.
 String getValue()
          Returns the Commit clause value.
 Commit setForceFlush()
          Specifies that the SQL statement commit operation should perform an operating system flush to disk.
 Commit setInterval(int interval)
          Specifies the interval that the SQL statement commit operation will use to commit an active transaction.
 String toString()
          Returns a String representation of this Commit clause.
 
Methods inherited from class com.jdc.rdb.sql.dml.DMLClause
getKeyword
 
Methods inherited from class com.jdc.rdb.sql.SQLClause
contains, setKeyword, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Commit

public Commit()
Constructs a new Commit clause object.


Commit

public Commit(boolean forceFlush)
Constructs a new Commit clause object for the specified flush status. If true the force flush status specifies that the SQL statement commit operation should perform an operating system flush to disk.

See Also:
setForceFlush()

Commit

public Commit(int interval)
Constructs a new Commit clause object for the specified commit interval. The commit interval specifies the interval that the SQL statement commit operation will use to commit an active transaction.

Throws:
SQLInvalidException - The interval specified is less than 1 or greater than 9999.
See Also:
setInterval(int)
Method Detail

getKeyword

public String getKeyword()
Returns the Commit clause keyword.

Overrides:
getKeyword in class SQLClause
Returns:
The Commit clause keyword.

getValue

public String getValue()
Returns the Commit clause value.

Overrides:
getValue in class SQLClause
Returns:
The Commit clause value.

setForceFlush

public Commit setForceFlush()
Specifies that the SQL statement commit operation should perform an operating system flush to disk.

Returns:
This Commit clause object.

setInterval

public Commit setInterval(int interval)
Specifies the interval that the SQL statement commit operation will use to commit an active transaction.

Returns:
This Commit clause object.
Throws:
SQLInvalidException - The interval specified is less than 1 or greater than 9999.

toString

public String toString()
Returns a String representation of this Commit clause.

Specified by:
toString in interface SelectClause
Overrides:
toString in class SQLClause
Returns:
A String representation of this Commit clause.

2004.04.29



Copyright © 2004 J. Damon & Co.; All Rights Reserved WorldWide.