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

All Superinterfaces:
Component
All Known Implementing Classes:
AbstractIdGenerator

public interface IdGenerator
extends 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

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

Method Detail

getNextBigDecimalId

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

Returns:
the next Id.
Throws:
IdException

getNextLongId

public 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

public 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

public 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

public 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 © 1997-2005 The Apache Software Foundation. All Rights Reserved.