250 words

javax.jdo.datastore.Sequence - JDO interface

javax.jdo.datastore
Interface Sequence

Implementations of this interface can be used to obtain sequences. The behavior with regard to the transaction and rollover behavior are defined in the metadata.
Since:
JDO 2.0
void allocate(int additional)
Provides a hint to the implementation that the application will need additional sequence value objects in short order.
Provides a hint to the implementation that the application will need additional sequence value objects in short order. There is no externally visible behavior of this method. It is used to potentially improve the efficiency of the algorithm of obtaining additional sequence value objects.
Parameters:
additional - the number of additional values to allocate
Since:
JDO 2.0
Object current()
Returns the current sequence value object if it is available.
Returns the current sequence value object if it is available. It is intended to return a sequence value object previously used. If the current sequence value is not available, throw JDODataStoreException.
Returns:
the current value
Since:
JDO 2.0
Returns the current sequence value as a long.
Returns the current sequence value as a long. If the current sequence value is not available or is not numeric, throw JDODataStoreException.
Returns:
the current value
Since:
JDO 2.0
String getName()
Returns the fully qualified name of the Sequence.
Returns the fully qualified name of the Sequence.
Returns:
the name of the sequence
Since:
JDO 2.0
Object next()
Returns the next sequence value as an Object.
Returns the next sequence value as an Object. If the next sequence value is not available, throw JDODataStoreException.
Returns:
the next value
Since:
JDO 2.0
long nextValue()
Returns the next sequence value as a long.
Returns the next sequence value as a long. If the next sequence value is not available or is not numeric, throw JDODataStoreException.
Returns:
the next value
Since:
JDO 2.0

This documentation page is derived (with some adjustments) from the JDO 2.2 API
and is available under the terms of the Apache License, v. 2.0.