uPortal 2.4.1
API Documentation

org.jasig.portal
Class ReferenceSequenceGenerator

java.lang.Object
  extended byorg.jasig.portal.ReferenceSequenceGenerator
All Implemented Interfaces:
IOIDGenerator, ISequenceGenerator

public class ReferenceSequenceGenerator
extends java.lang.Object
implements ISequenceGenerator

Version:
$Revision: 1.14.2.1 $
Author:
Dan Ellentuck

Constructor Summary
ReferenceSequenceGenerator()
          ReferenceOIDGenerator constructor comment.
 
Method Summary
 void createCounter(java.lang.String tableName)
           
 java.lang.String getNext()
           
 java.lang.String getNext(java.lang.String table)
           
 int getNextInt()
           
 int getNextInt(java.lang.String tableName)
          Increments the counter and returns the incremented value.
 void setCounter(java.lang.String tableName, int newCounterValue)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReferenceSequenceGenerator

public ReferenceSequenceGenerator()
ReferenceOIDGenerator constructor comment.

Method Detail

createCounter

public void createCounter(java.lang.String tableName)
                   throws java.sql.SQLException
Specified by:
createCounter in interface ISequenceGenerator
Parameters:
tableName - java.lang.String
Throws:
java.sql.SQLException

getNext

public java.lang.String getNext()
                         throws java.lang.Exception
Specified by:
getNext in interface IOIDGenerator
Returns:
java.lang.String
Throws:
java.lang.Exception

getNext

public java.lang.String getNext(java.lang.String table)
                         throws java.lang.Exception
Specified by:
getNext in interface IOIDGenerator
Parameters:
table - String
Returns:
java.lang.String
Throws:
java.lang.Exception

getNextInt

public int getNextInt()
               throws java.lang.Exception
Specified by:
getNextInt in interface ISequenceGenerator
Returns:
int
Throws:
java.lang.Exception

getNextInt

public int getNextInt(java.lang.String tableName)
               throws java.lang.Exception
Increments the counter and returns the incremented value. If the counter does not exist, creates and then increments it to verify that it has been created successfully.

Specified by:
getNextInt in interface ISequenceGenerator
Parameters:
tableName - java.lang.String
Returns:
int
Throws:
java.lang.Exception

setCounter

public void setCounter(java.lang.String tableName,
                       int newCounterValue)
                throws java.lang.Exception
Specified by:
setCounter in interface ISequenceGenerator
Parameters:
tableName - java.lang.String
newCounterValue - int
Throws:
java.lang.Exception

uPortal 2.4.1
API Documentation