Hi folks, Jörg Schaible wrote:
> Rahul Akolkar wrote: [snip] >> >> http://www.nabble.com/forum/Search.jtp?forum=292&local=y&query=id >> >> -Rahul > > thanks, this produces useful results ... Beeing in the process of reviewing and cleaning-up commons-id, I just wonder about the role of the IdentinfierGeneratorFactory interface. I understand the basic purpose to exchange the default implementation of the various IdentifierGenerator types based on a system property, but I don't understand, why the interface defines a method for nearly any implementation. I would have expected something like interface IdentinfierGeneratorFactory { StringIdentifierGenerator getStringIdentifierGenerator(...); LongIdentifierGenerator getLongIdentifierGenerator(...); UUIDIdentifierGenerator getUUDIdentifierGenerator(...); } but not interface IdentinfierGeneratorFactory { StringIdentifierGenerator getStringIdentifierGenerator(...); LongIdentifierGenerator getLongIdentifierGenerator(...); UUIDIdentifierGenerator getUUDIdentifierGenerator(...); StringIdentifierGenerator getAlphaNumIdentifierGenerator(...); StringIdentifierGenerator getPrefixedAlphaNumIdentifierGenerator(...); StringIdentifierGenerator getPrefixedTimeBasedAlphaNumIdentifierGenerator(...); } ... you know what I mean. Point is, either we add methods for *all* implementations or we provide with the factory a set of methods for the sensible types and let our users implement other factories to get other defaults. And note: People programming IoC won't normally use this factory anyway, they define the dependency on one of the IdentifierGenerator interfaces and provide/configure the appropriate generator implementation. Opinions? - Jörg --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
