|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.gouv.culture.sdx.utils.SdxObjectImpl
fr.gouv.culture.sdx.documentbase.AbstractIDGenerator
Created by IntelliJ IDEA. User: rpandey Date: Jan 22, 2003 Time: 5:08:49 PM To change this template use Options | File Templates.
| Field Summary | |
protected Database |
_database
|
protected java.lang.String |
ATTRIBUTE_ID_PREFIX
The attribute used to generate a prefix for an id generator. |
protected java.lang.String |
ATTRIBUTE_ID_SUFFIX
The attribute used to generate a suffix for an id generator. |
protected java.lang.String |
idPrefix
Prefix for generated ids. |
protected java.lang.String |
idSuffix
Suffix for generated ids. |
| Fields inherited from class fr.gouv.culture.sdx.utils.SdxObjectImpl |
encoding, logger |
| Fields inherited from interface fr.gouv.culture.sdx.documentbase.IDGenerator |
ATTRIBUTE_CLASS, ATTRIBUTE_VALUE_DEFAULT_ID_GENERATOR_CLASS, CLASS_NAME, ELEMENT_NAME_ID_GENERATOR |
| Constructor Summary | |
AbstractIDGenerator()
|
|
| Method Summary | |
void |
configure(org.apache.avalon.framework.configuration.Configuration configuration)
|
java.lang.String |
generate()
Generates an id using configured prefix and suffix |
java.lang.String |
getPrefix()
|
java.lang.String |
getSuffix()
|
boolean |
isIdUnique(java.lang.String id)
If no lucene index has been provided (i.e. it is null) this method
will return true as it has no concrete context
by which it can determine uniqueness |
void |
setDatabase(Database database)
Sets the database for verification of a generated id's uniqueness |
void |
setIdFieldName(java.lang.String fieldName)
Set's the field name for the id field in the index for id verification needs |
void |
setIndex(Index docBaseIndex)
Deprecated. No longer useful |
void |
setPrefix(java.lang.String idPrefix)
|
void |
setSuffix(java.lang.String idSuffix)
|
| Methods inherited from class fr.gouv.culture.sdx.utils.SdxObjectImpl |
enableLogging, getChildLogger, setEncoding |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface fr.gouv.culture.sdx.documentbase.IDGenerator |
generate |
| Methods inherited from interface org.apache.avalon.framework.logger.LogEnabled |
enableLogging |
| Field Detail |
protected final java.lang.String ATTRIBUTE_ID_PREFIX
protected final java.lang.String ATTRIBUTE_ID_SUFFIX
protected Database _database
protected java.lang.String idPrefix
protected java.lang.String idSuffix
| Constructor Detail |
public AbstractIDGenerator()
| Method Detail |
public void configure(org.apache.avalon.framework.configuration.Configuration configuration)
throws org.apache.avalon.framework.configuration.ConfigurationException
configure in interface org.apache.avalon.framework.configuration.Configurableorg.apache.avalon.framework.configuration.ConfigurationExceptionpublic java.lang.String getSuffix()
getSuffix in interface IDGeneratorpublic void setSuffix(java.lang.String idSuffix)
setSuffix in interface IDGeneratorpublic java.lang.String getPrefix()
getPrefix in interface IDGeneratorpublic void setPrefix(java.lang.String idPrefix)
setPrefix in interface IDGeneratorpublic void setIndex(Index docBaseIndex)
setIndex in interface IDGeneratorpublic void setDatabase(Database database)
IDGenerator
setDatabase in interface IDGeneratorpublic boolean isIdUnique(java.lang.String id)
null) this method
will return true as it has no concrete context
by which it can determine uniqueness
isIdUnique in interface IDGeneratorid - The id to verify
public void setIdFieldName(java.lang.String fieldName)
IDGenerator
setIdFieldName in interface IDGeneratorpublic java.lang.String generate()
IDGenerator
generate in interface IDGenerator
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||