}
private SequenceGeneratorDiscriptor processSequenceGenerator(Class<?> clazz, Field idField, EntityMetadata m,
String generatorName)
{
SequenceGeneratorDiscriptor sgd = null;
if (!generatorName.isEmpty())
{
SequenceGenerator sequenceGenerator = idField.getAnnotation(SequenceGenerator.class);
if (sequenceGenerator == null || !sequenceGenerator.name().equals(generatorName))
{
sequenceGenerator = clazz.getAnnotation(SequenceGenerator.class);
}
sgd = new SequenceGeneratorDiscriptor(sequenceGenerator, m.getSchema());
}
else
{
sgd = new SequenceGeneratorDiscriptor(m.getSchema());
}
return sgd;
}