org.jomc.sequences
Interface SequenceOperations

Package class diagram package SequenceOperations

@Generated(value="org.jomc.tools.SourceFileProcessor 1.0",
           comments="See http://jomc.sourceforge.net/jomc/1.0/jomc-tools")
public interface SequenceOperations

Provides operations performed with sequences.

This specification declares a multiplicity of One. An application assembler may provide either no or one implementation of this specification.

Use of class ObjectManager is supported for accessing implementations.

 SequenceOperations object = ObjectManagerFactory.getObjectManager( getClass().getClassLoader() ).getObject( SequenceOperations.class );
 SequenceOperations object = ObjectManagerFactory.getObjectManager( getClass().getClassLoader() ).getObject( SequenceOperations.class, "implementation name" );
   

This specification applies to Singleton scope. The same singleton object is returned whenever requested.

Version:
$Id: SequenceOperations.java 2244 2010-06-29 07:58:09Z schulte2005 $
Author:
Christian Schulte 1.0

Method Summary
Modifier and Type Method and Description
 long getNextSequenceValue(String sequenceName)
          Gets the next value for a named sequence.
 long[] getNextSequenceValues(String sequenceName, int numValues)
          Gets multiple next values for a named sequence.
 

Method Detail

getNextSequenceValue

long getNextSequenceValue(String sequenceName)
                          throws SequenceNotFoundException,
                                 SequenceLimitException,
                                 SequencesSystemException
Gets the next value for a named sequence.

Parameters:
sequenceName - The name of the sequence to get the next value of.
Returns:
The next value of the sequence with name name.
Throws:
SequenceNotFoundException - if no sequence exists for sequenceName.
SequenceLimitException - if the sequence with name sequenceName reached its maximum value.
SequencesSystemException - if getting the value fails.

getNextSequenceValues

long[] getNextSequenceValues(String sequenceName,
                             int numValues)
                             throws SequenceNotFoundException,
                                    SequenceLimitException,
                                    SequencesSystemException
Gets multiple next values for a named sequence.

Parameters:
sequenceName - The name of the sequence to get values of.
numValues - The number of values to get from the sequence with name sequenceName - must be positive.
Returns:
An array of next values of the sequence with name name with a length equal to numValues.
Throws:
SequenceNotFoundException - if no sequence exists for sequenceName.
SequenceLimitException - if the sequence with name sequenceName reached its maximum value.
SequencesSystemException - if getting values fails.


Copyright © 2005-2010 The JOMC Project. All Rights Reserved.