} catch (ClassCastException ex) {
if (getSelectQuery() == null) {
throw ValidationException.platformDoesNotSupportSequence(getName(), Helper.getShortClassName(getDatasourcePlatform()), Helper.getShortClassName(this));
}
}
if (!dbPlatform.supportsNativeSequenceNumbers() && (getSelectQuery() == null)) {
throw ValidationException.platformDoesNotSupportSequence(getName(), Helper.getShortClassName(getDatasourcePlatform()), Helper.getShortClassName(this));
}
// Set shouldAcquireValueAfterInsert flag: identity -> true; sequence objects -> false.
if(dbPlatform.supportsIdentity() && shouldUseIdentityIfPlatformSupports()) {
// identity is both supported by platform and desired by the NativeSequence