throw new MetaDataException(_loc.get("no-seq-name", el));
if (_log.isTraceEnabled())
_log.trace(_loc.get("parse-sequence", name));
SequenceMetaData meta = getRepository().getCachedSequenceMetaData
(name);
if (meta != null) {
if (_log.isWarnEnabled())
_log.warn(_loc.get("dup-sequence", name, el));
return;
}
// create new sequence
meta = getRepository().addSequenceMetaData(name);
String seq = gen.sequenceName();
int initial = gen.initialValue();
int allocate = gen.allocationSize();
// don't allow initial of 0 b/c looks like def value
if (initial == 0)
initial = 1;
// create plugin string from info
String clsName, props;
if (StringUtils.isEmpty(seq)) {
clsName = SequenceMetaData.IMPL_NATIVE;
props = null;
} else if (seq.indexOf('(') != -1) // plugin
{
clsName = Configurations.getClassName(seq);
props = Configurations.getProperties(seq);
seq = null;
} else {
clsName = SequenceMetaData.IMPL_NATIVE;
props = null;
}
meta.setSequencePlugin(Configurations.getPlugin(clsName, props));
meta.setSequence(seq);
meta.setInitialValue(initial);
meta.setAllocate(allocate);
meta.setSource(getSourceFile(), (el instanceof Class) ? el : null,
meta.SRC_ANNOTATIONS);
}