commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil Steitz <>
Subject Re: [id] Composite identifiers
Date Mon, 20 Feb 2006 05:27:56 GMT
Jörg Schaible wrote:
> Jörg Schaible wrote on Monday, February 06, 2006 9:07 PM:
>> Hi Phil,
>> Phil Steitz wrote:
>>> I just committed a first cut at a CompositeIdentifierGenerator along
>>> the lines of what we have discussed.  To replace the prefix
>>> generators with this, we either have to modify the factories or
>>> introduce a ConstantIdentifierGenerator.   If others (Michael?) have
>>> better / different ideas on how to handle this, I am happy to review
>>> patches or replace this implementation.
>> Looks fine. I've added the missing minLength/maxLength
>> implementations and made it serializable. I would add a
>> ConstantIdentifierGenerator. 
> What about adding adding a method to StringIdentifierGenerator to deal with StringBuffers?
> StringBuffer nextIdentifier(StringBuffer buffer);
> The implementation should append the next identifier to the buffer and return it. This
would make the concatenation more efficient and may be also useful for other use cases where
the returned id is added to a String.
Finally getting back into this.  Sorry for the latency.  I like the idea 
above from the standpoint of efficiency, but it looks a little odd as an 
API.  Could be nothing wrong with it, just looks odd at first blush to 
me.  Might be better to change the name to appendNextIdentifier, so the 
append semantics are clear. 

I will add ConstantIdentifierGenerator in any case.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message