buildStatement();
}
private KeyGenerator getKeyGenerator(final SQLEngine engine,
final PersistenceFactory factory) throws MappingException {
KeyGenerator keyGen = null;
if (engine.getDescriptor().getExtends() == null) {
KeyGeneratorDescriptor keyGenDesc =
new ClassDescriptorJDONature(engine.getDescriptor()).getKeyGeneratorDescriptor();
if (keyGenDesc != null) {
FieldDescriptor fldDesc = engine.getDescriptor().getIdentity();
int[] tempType = new FieldDescriptorJDONature(fldDesc).getSQLType();
keyGen = keyGenDesc.getKeyGeneratorRegistry().getKeyGenerator(
factory, keyGenDesc, (tempType == null) ? 0 : tempType[0]);
// Does the key generator support the sql type specified in the mapping?
keyGen.supportsSqlType(tempType[0]);
}
}
return keyGen;
}