|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpl.kernelpanic.dbmonster.generator.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 final void setKey(Key k)
setKey
in interface KeyGenerator
k
- the key.public Key getKey()
KeyGenerator
getKey
in interface KeyGenerator
public final List getColumns()
getColumns
in interface KeyGenerator
public final List generate() throws Exception
generate
in interface KeyGenerator
Column
s.
Exception
- if generation failspublic final void initialize(DBMonsterContext ctx) throws Exception
Initializable
DBMonsterContext
.
initialize
in interface Initializable
ctx
- context
Exception
- if initialization failsInitializable.initialize(DBMonsterContext)
public final String getColumnName()
public final void setColumnName(String name)
name
- the name of the column.public final String getStartValue()
public final 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 |