*/
protected void processDirectMapMapping() {
// Initialize and process common direct collection metadata. This must
// be done before any field processing since field processing requires
// that the collection table be processed before hand.
DirectMapMapping mapping = new DirectMapMapping();
process(mapping);
// Process the container and indirection policies.
processContainerPolicyAndIndirection(mapping);
// Process the key column (we must process this field before the
// call to processConverter, since it may set a field classification)
mapping.setDirectKeyField(getDatabaseField(getReferenceDatabaseTable(), MetadataLogger.MAP_KEY_COLUMN));
// Only process the key converter if this is a basic map accessor. The
// key converter for an element collection case will be taken care of
// in the processContainerPolicyAndIndirection call above.
if (isBasicMap()) {
// To resolve any generic types (or respect an attribute type
// specification) we need to set the attribute classification on the
// mapping to ensure we do the right conversions.
if (hasAttributeType() || getAccessibleObject().isGenericCollectionType()) {
mapping.setDirectKeyFieldClassificationName(getJavaClassName(getMapKeyReferenceClass()));
}
// Process a converter for the key column of this mapping.
processMappingKeyConverter(mapping, getKeyConverter(), null, getMapKeyReferenceClass());
}
// Process the value column (we must process this field before the call
// to processConverter, since it may set a field classification)
mapping.setDirectField(getDatabaseField(getReferenceDatabaseTable(), MetadataLogger.VALUE_COLUMN));
// To resolve any generic types (or respect an attribute type
// specification) we need to set the attribute classification on the
// mapping to ensure we do the right conversions.
if (hasAttributeType() || getAccessibleObject().isGenericCollectionType()) {
mapping.setDirectFieldClassificationName(getJavaClassName(getReferenceClass()));
}
// Process a converter for value column of this mapping.
processMappingValueConverter(mapping, getValueConverter(), getConverts(), getReferenceClass());
}