use of org.hibernate.boot.model.IdentifierGeneratorDefinition in project hibernate-orm by hibernate.
the class AnnotationBinder method buildLocalGenerators.
private static HashMap<String, IdentifierGeneratorDefinition> buildLocalGenerators(XAnnotatedElement annElt, MetadataBuildingContext context) {
HashMap<String, IdentifierGeneratorDefinition> generators = new HashMap<String, IdentifierGeneratorDefinition>();
TableGenerator tabGen = annElt.getAnnotation(TableGenerator.class);
SequenceGenerator seqGen = annElt.getAnnotation(SequenceGenerator.class);
GenericGenerator genGen = annElt.getAnnotation(GenericGenerator.class);
if (tabGen != null) {
IdentifierGeneratorDefinition idGen = buildIdGenerator(tabGen, context);
generators.put(idGen.getName(), idGen);
}
if (seqGen != null) {
IdentifierGeneratorDefinition idGen = buildIdGenerator(seqGen, context);
generators.put(idGen.getName(), idGen);
}
if (genGen != null) {
IdentifierGeneratorDefinition idGen = buildIdGenerator(genGen, context);
generators.put(idGen.getName(), idGen);
}
return generators;
}
Aggregations