|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@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.
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 |
---|
long getNextSequenceValue(String sequenceName) throws SequenceNotFoundException, SequenceLimitException, SequencesSystemException
sequenceName
- The name of the sequence to get the next value of.name
.SequenceNotFoundException
- if no sequence exists for sequenceName
.SequenceLimitException
- if the sequence with name sequenceName
reached its maximum value.SequencesSystemException
- if getting the value fails.long[] getNextSequenceValues(String sequenceName, int numValues) throws SequenceNotFoundException, SequenceLimitException, SequencesSystemException
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.name
with a length equal to numValues
.SequenceNotFoundException
- if no sequence exists for sequenceName
.SequenceLimitException
- if the sequence with name sequenceName
reached its maximum value.SequencesSystemException
- if getting values fails.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |