Environment.DEFAULT_SCHEMA);
for (Iterator<PersistentClass> pcIter = config.getClassMappings(); pcIter.hasNext();) {
PersistentClass pc = pcIter.next();
if (!pc.isInherited()) {
IdentifierGenerator ig = pc.getIdentifier().createIdentifierGenerator(
config.getIdentifierGeneratorFactory(), dialect, defaultCatalog, defaultSchema,
(RootClass) pc);
if (ig instanceof PersistentIdentifierGenerator) {
generators.put(((PersistentIdentifierGenerator) ig).generatorKey(), ig);
} else if (ig instanceof IdentifierGeneratorAggregator) {
((IdentifierGeneratorAggregator) ig).registerPersistentGenerators(generators);
}
}
}
for (Iterator<Collection> collIter = config.getCollectionMappings(); collIter.hasNext();) {
Collection collection = collIter.next();
if (collection.isIdentified()) {
IdentifierGenerator ig = ((IdentifierCollection) collection).getIdentifier()
.createIdentifierGenerator(config.getIdentifierGeneratorFactory(), dialect,
defaultCatalog, defaultSchema, null);
if (ig instanceof PersistentIdentifierGenerator) {
generators.put(((PersistentIdentifierGenerator) ig).generatorKey(), ig);