// Initialize the class with the package from entity mappings.
MetadataClass entityClass = getMetadataClass(getPackageQualifiedClassName(entity.getClassName()), false);
// Initialize the entity with its metadata descriptor and project.
// This initialization must be done before a potential merge below.
entity.initXMLClassAccessor(entityClass, new MetadataDescriptor(entityClass, entity), m_project, this);
if (allEntities.containsKey(entityClass.getName())) {
// Merge this entity with the existing one.
allEntities.get(entityClass.getName()).merge(entity);
} else {
// Add this entity to the map.
allEntities.put(entityClass.getName(), entity);
}
}
// Process the embeddables.
for (EmbeddableAccessor embeddable : getEmbeddables()) {
// Initialize the class with the package from entity mappings.
MetadataClass embeddableClass = getMetadataClass(getPackageQualifiedClassName(embeddable.getClassName()), false);
// Initialize the embeddable with its metadata descriptor and project.
// This initialization must be done before a potential merge below.
embeddable.initXMLClassAccessor(embeddableClass, new MetadataDescriptor(embeddableClass, embeddable), m_project, this);
if (allEmbeddables.containsKey(embeddableClass.getName())) {
// Merge this embeddable with the existing one.
allEmbeddables.get(embeddableClass.getName()).merge(embeddable);
} else {
// Add this embeddable to the map.
allEmbeddables.put(embeddableClass.getName(), embeddable);
}
}
// Process the mapped superclasses
for (MappedSuperclassAccessor mappedSuperclass : getMappedSuperclasses()) {
// Initialize the class with the package from entity mappings.
MetadataClass mappedSuperclassClass = getMetadataClass(getPackageQualifiedClassName(mappedSuperclass.getClassName()), false);
// Initialize the mapped superclass with a metadata descriptor and project.
// This initialization must be done before a potential merge below.
mappedSuperclass.initXMLClassAccessor(mappedSuperclassClass, new MetadataDescriptor(mappedSuperclassClass, mappedSuperclass), m_project, this);
if (m_project.hasMappedSuperclass(mappedSuperclassClass)) {
// Merge this mapped superclass with the existing one.
m_project.getMappedSuperclassAccessor(mappedSuperclassClass).merge(mappedSuperclass);
} else {