|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.varia.autonumber.AutoNumberFactory
public class AutoNumberFactory
AutoNumberFactory can persistently auto number items.
| Constructor Summary | |
|---|---|
AutoNumberFactory()
|
|
| Method Summary | |
|---|---|
static Integer |
getNextInteger(String collectionName)
Gets the next key for the given collection. |
static void |
resetAutoNumber(String collectionName)
Resets the given autonumber to zero. |
static void |
setAutoNumber(String collectionName,
Integer value)
Sets the given autonumber to the given value so that it starts counting at the given value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AutoNumberFactory()
| Method Detail |
|---|
public static Integer getNextInteger(String collectionName)
throws ArrayIndexOutOfBoundsException
collectionName - the name of the collection for which you want an autonumber
ArrayIndexOutOfBoundsException - if no more numbers are availablepublic static void resetAutoNumber(String collectionName)
public static void setAutoNumber(String collectionName,
Integer value)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||