String name = sequenceConfig.getName();
int size = sequenceConfig.getPreallocationSize().intValue();
if (sequenceConfig instanceof DefaultSequenceConfig) {
return new DefaultSequence(name, size);
} else if (sequenceConfig instanceof NativeSequenceConfig) {
return new NativeSequence(name, size);
} else if (sequenceConfig instanceof TableSequenceConfig) {
TableSequenceConfig tsc = (TableSequenceConfig)sequenceConfig;
return new TableSequence(name, size, tsc.getTable(), tsc.getNameField(), tsc.getCounterField());