ATTENTION. WIKI SYNTAX. PLEASE VIEW ON ORIGINAL BLOG URL
I convinced myself to write the custom sequenceFactory for kodo because i wanna be on the safe side when refactoring again before i move to kodo 4. For all all kodo users out there still relying on "db-class" as sequence factory in kodo, this might be useful.
This is the Java 1.4 version. If you are on 1.5, you should replace the last if block with the following code:
{code}
if (Boolean.valueOf(useSimpleNames))
return classMapping.getDescribedType().getSimpleName();
else
return classMapping.getDescribedType().getName();
{code}
I also introduced a parameter which controls if simpleNames should be used or not. You can configure this SequenceFactory via normal kodo configuration style syntax. I am exposing it in XML here:
If you use Kodo4. You can use internal factories which are capable of using simple classnames as i read it. But i am quite sure most kodo users are still on 3.x