org.apache.avalon.excalibur.datasource.ids
Interface IdGenerator

All Superinterfaces:
org.apache.avalon.framework.component.Component
All Known Implementing Classes:
AbstractDataSourceBlockIdGenerator, AbstractDataSourceIdGenerator, AbstractIdGenerator, SequenceIdGenerator, TableIdGenerator

public interface IdGenerator
extends org.apache.avalon.framework.component.Component

Since:
4.1
Version:
CVS $Revision: 1.4 $ $Date: 2004/02/28 11:47:17 $
Author:
Avalon Development Team

Field Summary
static java.lang.String ROLE
          The name of the role for convenience
 
Method Summary
 java.math.BigDecimal getNextBigDecimalId()
          Returns the next Id from the pool.
 byte getNextByteId()
          Returns the next Id from the pool.
 int getNextIntegerId()
          Returns the next Id from the pool.
 long getNextLongId()
          Returns the next Id from the pool.
 short getNextShortId()
          Returns the next Id from the pool.
 

Field Detail

ROLE

static final java.lang.String ROLE
The name of the role for convenience

Method Detail

getNextBigDecimalId

java.math.BigDecimal getNextBigDecimalId()
                                         throws IdException
Returns the next Id from the pool.

Returns:
the next Id.
Throws:
IdException

getNextLongId

long getNextLongId()
                   throws IdException
Returns the next Id from the pool.

Returns:
the next Id.
Throws:
java.lang.IllegalStateException - if the next id is outside of the range of valid longs.
IdException

getNextIntegerId

int getNextIntegerId()
                     throws IdException
Returns the next Id from the pool.

Returns:
the next Id.
Throws:
java.lang.IllegalStateException - if the next id is outside of the range of valid integers.
IdException

getNextShortId

short getNextShortId()
                     throws IdException
Returns the next Id from the pool.

Returns:
the next Id.
Throws:
java.lang.IllegalStateException - if the next id is outside of the range of valid shorts.
IdException

getNextByteId

byte getNextByteId()
                   throws IdException
Returns the next Id from the pool.

Returns:
the next Id.
Throws:
java.lang.IllegalStateException - if the next id is outside of the range of valid bytes.
IdException


Copyright © 2003-2010 Apache Software Foundation. All Rights Reserved.