|
From: <tri...@tr...> - 2003-06-03 15:45:47
|
Ken: Good points. > I would like to propose a bit of refactoring to the incrementers class > hierarchy to enhance pluggability. As it stands now, there is a lot of > common functionality that is redundant in the concrete classes and could > be pushed up to the AbstractDataFieldMaxValueIncrementer class: > > 1. cacheSize field and setter > 2. prefixWithZero field and setter > 3. dataSource field and setter > 4. sequenceName (Oracle) or tableName (Mysql and Hsql) field and setter, > perhaps renamed to incrementerName > I think it is a good idea to enhance the pluggability for these implementations. What we need to be able to set is Data Source, Sequence/Table Name and Column Name. When Column Nam is not needed, we could just leave it as null. If we use a standard name for the column, then it would be harder to use our framework on already existing databases that use a sequenece table. I believe the way we are doing it for MySQL is a fairly standard approach that is already used by many developers. > NOTE: The interface for RdmsMaxValueIncrementer is inconsistent with the > others and out-of-date. As it is also unsafe, perhaps it should be > removed altogether. It should at least be brought up-to-date. > I would vote for removing it. --Thomas |