/**
* INTERNAL:
*/
protected AggregateObjectMapping processEmbeddableMapKeyClass(MappedKeyMapAccessor mappedKeyMapAccessor) {
AggregateObjectMapping keyMapping = new AggregateObjectMapping();
MetadataClass mapKeyClass = mappedKeyMapAccessor.getMapKeyClass();
keyMapping.setReferenceClassName(mapKeyClass.getName());
// The embeddable accessor must be processed by now. If it is not then
// we are in trouble since by the time we get here, we are too late in
// the cycle to process embeddable classes and their accessors. See
// MetadataProject processStage3(), processEmbeddableMappingAccessors.
// At this stage all class accessors (embeddable, entity and mapped
// superclass) have to have been processed to gather all their
// relational and embedded mappings.
EmbeddableAccessor mapKeyAccessor = getProject().getEmbeddableAccessor(mapKeyClass);
// Ensure the reference descriptor is marked as an embeddable collection.
mapKeyAccessor.getDescriptor().setIsEmbeddable();
// Process the attribute overrides for this may key embeddable.
processAttributeOverrides(mappedKeyMapAccessor.getMapKeyAttributeOverrides(), keyMapping, mapKeyAccessor.getDescriptor());
// Process the association overrides for this may key embeddable.
processAssociationOverrides(mappedKeyMapAccessor.getMapKeyAssociationOverrides(), keyMapping, mapKeyAccessor.getDescriptor());
// Process a convert key or jpa converter for the map key if specified.
processConverts(getMapKeyConverts(mappedKeyMapAccessor.getMapKeyConverts()), keyMapping, mappedKeyMapAccessor.getMapKeyClass(), true);
keyMapping.setDescriptor(getDescriptor().getClassDescriptor());
return keyMapping;
}