com.arsdigita.kernel
Class DatabaseTransaction

java.lang.Object
  extended bycom.arsdigita.kernel.DatabaseTransaction

public final class DatabaseTransaction
extends Object

Represents a database transaction.

Author:
Justin Ross

Field Summary
static String versionId
           
 
Constructor Summary
DatabaseTransaction()
           
 
Method Summary
 void abort()
          Aborts the transaction if it hasn't already ended.
 void begin()
          Starts the transaction if it hasn't already been started.
 void commit()
          Commits the transaction if it hasn't already ended.
 void end()
          Finishes the transaction if it hasn't already ended.
 boolean isCommitRequested()
          Tells whether the transaction should be committed or aborted at its end.
 void setCommitRequested(boolean isCommitRequested)
          Requests that the transaction be committed or aborted at its end.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

versionId

public static final String versionId
See Also:
Constant Field Values
Constructor Detail

DatabaseTransaction

public DatabaseTransaction()
Method Detail

begin

public final void begin()
Starts the transaction if it hasn't already been started.


end

public final void end()
Finishes the transaction if it hasn't already ended. Commits or aborts based on the value of isCommitRequested().


commit

public final void commit()
Commits the transaction if it hasn't already ended.


abort

public final void abort()
Aborts the transaction if it hasn't already ended.


isCommitRequested

public final boolean isCommitRequested()
Tells whether the transaction should be committed or aborted at its end. Transactions are by default committed.


setCommitRequested

public final void setCommitRequested(boolean isCommitRequested)
Requests that the transaction be committed or aborted at its end.


toString

public String toString()


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 21 2004:2337 UTC