|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectpl.kernelpanic.dbmonster.generator.StringKeyGenerator
public class StringKeyGenerator
The string key generator uses sort of string magic known from Perl. in short it starts from i.e. "aaaaa" and increment it by one: "aaaab", "aaaac"....
| Field Summary | |
|---|---|
static char[] |
CHARS
Chars. |
static String |
DEFAULT_VALUE
Default value. |
| Constructor Summary | |
|---|---|
StringKeyGenerator()
|
|
| Method Summary | |
|---|---|
List |
generate()
Generates a primary key. |
String |
getColumnName()
Returns a column name. |
List |
getColumns()
Returns columns. |
Key |
getKey()
Returns the key |
String |
getStartValue()
Returns the start value. |
void |
initialize(DBMonsterContext ctx)
Initializes a class with DBMonsterContext. |
void |
setColumnName(String name)
Sets the column name and sets up the column. |
void |
setKey(Key k)
Sets the key. |
void |
setStartValue(String sv)
Sets the start value |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String DEFAULT_VALUE
public static final char[] CHARS
| Constructor Detail |
|---|
public StringKeyGenerator()
| Method Detail |
|---|
public void setKey(Key k)
setKey in interface KeyGeneratork - the key.public Key getKey()
KeyGenerator
getKey in interface KeyGeneratorpublic List getColumns()
getColumns in interface KeyGenerator
public List generate()
throws Exception
generate in interface KeyGeneratorColumns.
Exception - if generation fails
public void initialize(DBMonsterContext ctx)
throws Exception
InitializableDBMonsterContext.
initialize in interface Initializablectx - context
Exception - if initialization failsInitializable.initialize(DBMonsterContext)public String getColumnName()
public void setColumnName(String name)
name - the name of the column.public String getStartValue()
public void setStartValue(String sv)
sv - The startValue to set.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||