1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.commons.betwixt.io;
17
18
19 /*** <p>Interface allowing pluggable <code>ID</code> attribute value generators.</p>
20 *
21 * <p> <code>IDGenerator</code>'s are used to generate <code>ID</code>
22 * attribute values by <code>BeanWriter</code>.
23 * A user can specify the generation mechanism by passing an implementation to
24 * {@link BeanWriter#setIdGenerator}.</p>
25 *
26 * <p>Standard implementations are included with that supply random and sequantial values.</p>
27 *
28 * @author <a href="mailto:rdonkin@apache.org">Robert Burrell Donkin</a>
29 * @version $Revision: 1.7 $
30 */
31 public interface IDGenerator {
32
33 /***
34 * Get the last <code>ID</code> value generated.
35 *
36 * @return the last value generated
37 */
38 public String getLastId();
39
40 /***
41 * Generate a new <code>ID</code> attribute value.
42 *
43 * @return next value
44 */
45 public String nextId();
46 }