I have moved buildStatement Methods to the following classes
AbstractAfterKeyGenerator
AbstractBeforeKeyGenerator
SequenceDuringKeyGenerator
NoKeyGenerator
I also added method to the KeyGenerator interface
In case of AbstractAfterKeyGenerator and AbstractDuringKeyGenerator, the following code has been added in the catch block
FieldDescriptor fldDesc = _engine.getDescriptor().getIdentity();
int[] sqlTypes = new FieldDescriptorJDONature(fldDesc).getSQLType();
int sqlType = (sqlTypes == null) ? 0 : sqlTypes[0];
try {
NoKeyGeneratorFactory noKeyGenFac = new NoKeyGeneratorFactory();
KeyGenerator keyGen = noKeyGenFac.getKeyGenerator(_factory, null, sqlType);
keyGen.buildStatement(_engine);
return keyGen;
} catch (MappingException ex) {
LOG.fatal(ex);
}
The above code uses NoKeyGenerator. Previously the above implementation was done using the folliwng
_keyGen = null;
buildStatementWithIdentitites();
Regards, Ahmad
I have moved buildStatement Methods to the following classes
I also added method to the KeyGenerator interface
In case of AbstractAfterKeyGenerator and AbstractDuringKeyGenerator, the following code has been added in the catch block
The above code uses NoKeyGenerator. Previously the above implementation was done using the folliwng
_keyGen = null; buildStatementWithIdentitites();Regards, Ahmad