|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.bowstreet.webapp.IDGenerator
public class IDGenerator
The IDGenerator is a helper class for creating unique ID's that are suitable for use in HTML "id" attributes.
Constructor Summary | |
---|---|
IDGenerator()
|
Method Summary | |
---|---|
static java.lang.String |
getCurrentID(WebAppAccess webAppAccess,
java.lang.String key)
Method to get the current unique ID using the the value set by the getNextID(..) method. |
static java.lang.String |
getNextID(WebAppAccess webAppAccess,
java.lang.String key)
Method to get the next unique ID using the current WebApp, Request, and specified key. |
static java.lang.String |
getUniqueRegenID(WebApp webApp,
java.lang.String key)
Get a generation-time unique ID: this value won't collide with other ID's generated similarly across a given webapp. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IDGenerator()
Method Detail |
---|
public static java.lang.String getCurrentID(WebAppAccess webAppAccess, java.lang.String key)
You should call getNextID(..) prior calling this method.
webAppAccess
- The current WebAppAccess.key
- A key to use for this instance. This should be made unique for the current model. For example build a key using the Builder type name plus the builder instance call name (e.g. CalendarBuilder_HireDate).
public static java.lang.String getNextID(WebAppAccess webAppAccess, java.lang.String key)
The ID will be incremented each time this method is called. This shoud be used prior calling the getCurrentID(..) method.
webAppAccess
- The current WebAppAccess.key
- A key to use for this instance. This should be made unique for the current model. For example build a key using the Builder type name plus the builder instance call name (e.g. CalendarBuilder_HireDate).
public static java.lang.String getUniqueRegenID(WebApp webApp, java.lang.String key)
webApp
- key
- prefix, to which a sequence number wil be appended
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |