org.openanzo.common.rdb.layout
Class Sequence

java.lang.Object
  extended by org.openanzo.common.rdb.layout.Sequence

public class Sequence
extends java.lang.Object

Author:
Stephen Evanchik

Constructor Summary
Sequence(SQLCache sqlCache, java.sql.Connection jdbcConnection, boolean supportsSequences)
          Create a new sequence object that abstracts the database dependent details
 
Method Summary
 java.lang.Long getNext(java.lang.String sequenceName)
          Get the next ID in the node sequence
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Sequence

public Sequence(SQLCache sqlCache,
                java.sql.Connection jdbcConnection,
                boolean supportsSequences)
Create a new sequence object that abstracts the database dependent details

Parameters:
sqlCache - Cache of prepared statements
jdbcConnection - JDBC connection to the databSe
supportsSequences - true if the database engine supports sequences, false otherwise
Method Detail

getNext

public java.lang.Long getNext(java.lang.String sequenceName)
Get the next ID in the node sequence

Parameters:
sequenceName - name of the sequence
Returns:
A Long containing containing the next node ID


Copyright © 2007 Cambridge Semantics Inc.. All Rights Reserved.