|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.lexevs.dao.database.prefix.CyclingCharDbPrefixGenerator
public class CyclingCharDbPrefixGenerator
The Class CyclingCharDbPrefixGenerator.
Field Summary | |
---|---|
static char[] |
ALPHABET
The ALPHABET. |
static char |
FIRST_CHARACTER
The FIRS t_ character. |
static char |
LAST_CHARACTER
The LAS t_ character. |
Constructor Summary | |
---|---|
CyclingCharDbPrefixGenerator()
|
Method Summary | |
---|---|
protected char[] |
adjustLength(char[] chars)
Adjust length. |
void |
afterPropertiesSet()
|
protected boolean |
doesPrefixAlreadyExistInDatabase(java.lang.String prefix)
|
protected char |
findNextChar(char charToFind)
Find next char. |
java.lang.String |
generateNextDatabasePrefix(java.lang.String currentIdentifier)
Generate next database prefix. |
protected char[] |
generateStartingCyclingPrefix()
Generate starting cycling prefix. |
int |
getPrefixLengthLimit()
Gets the prefix length limit. |
PrefixResolver |
getPrefixResolver()
Gets the prefix resolver. |
Registry |
getRegistry()
|
protected char[] |
incrementByOne(char[] chars)
Increment by one. |
protected boolean |
isInCycle(char[] chars)
Checks if is in cycle. |
static void |
main(java.lang.String[] args)
|
protected boolean |
needsExtraChar(char[] chars)
Needs extra char. |
void |
setPrefixLengthLimit(int prefixLengthLimit)
Sets the prefix length limit. |
void |
setPrefixResolver(PrefixResolver prefixResolver)
Sets the prefix resolver. |
void |
setRegistry(Registry registry)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static char[] ALPHABET
public static char FIRST_CHARACTER
public static char LAST_CHARACTER
Constructor Detail |
---|
public CyclingCharDbPrefixGenerator()
Method Detail |
---|
public static void main(java.lang.String[] args)
public void afterPropertiesSet() throws java.lang.Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
java.lang.Exception
public java.lang.String generateNextDatabasePrefix(java.lang.String currentIdentifier)
NextDatabasePrefixGenerator
generateNextDatabasePrefix
in interface NextDatabasePrefixGenerator
currentIdentifier
- the current identitfier
protected boolean doesPrefixAlreadyExistInDatabase(java.lang.String prefix)
protected char[] incrementByOne(char[] chars)
chars
- the chars
protected boolean isInCycle(char[] chars)
chars
- the chars
protected char[] generateStartingCyclingPrefix()
protected char[] adjustLength(char[] chars)
chars
- the chars
protected boolean needsExtraChar(char[] chars)
chars
- the chars
protected char findNextChar(char charToFind)
charToFind
- the char to find
public void setPrefixLengthLimit(int prefixLengthLimit)
prefixLengthLimit
- the new prefix length limitpublic int getPrefixLengthLimit()
public PrefixResolver getPrefixResolver()
public void setPrefixResolver(PrefixResolver prefixResolver)
prefixResolver
- the new prefix resolverpublic Registry getRegistry()
public void setRegistry(Registry registry)
|
Copyright: (c) 2004-2006 Mayo Foundation for Medical Education and Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the triple-shield Mayo logo are trademarks and service marks of MFMER. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |