org.apache.commons.betwixt.io
Interface IDGenerator

All Known Implementing Classes:
AbstractIDGenerator, RandomIDGenerator, SequentialIDGenerator

public interface IDGenerator

Interface allowing pluggable ID attribute value generators.

IDGenerator's are used to generate ID attribute values by BeanWriter. A user can specify the generation mechanism by passing an implementation to AbstractBeanWriter.setIdGenerator(org.apache.commons.betwixt.io.IDGenerator).

Standard implementations are included with that supply random and sequantial values.

Version:
$Revision: 438373 $
Author:
Robert Burrell Donkin

Method Summary
 java.lang.String getLastId()
          Get the last ID value generated.
 java.lang.String nextId()
          Generate a new ID attribute value.
 

Method Detail

getLastId

java.lang.String getLastId()
Get the last ID value generated.

Returns:
the last value generated

nextId

java.lang.String nextId()
Generate a new ID attribute value.

Returns:
next value


Copyright 2002-2008 The Apache Software Foundation. All Rights Reserved.