addAssociationOverride(new AssociationOverrideMetadata(getAnnotation(AssociationOverride.class), accessibleObject));
}
// Set the column if one if defined.
if (isAnnotationPresent(Column.class)) {
m_column = new ColumnMetadata(getAnnotation(Column.class), accessibleObject, getAttributeName());
}
// Set the collection table if one is defined.
if (isAnnotationPresent(CollectionTable.class)) {
setCollectionTable(new CollectionTableMetadata(getAnnotation(CollectionTable.class), accessibleObject, true));
}
// Set the order if one is present.
if (isAnnotationPresent(OrderBy.class)) {
m_orderBy = (String) getAnnotation(OrderBy.class).getAttribute("value");
// No value means default order-by.
if (m_orderBy == null) {
m_orderBy = "";
}
}
// Set the map key if one is defined.
if (isAnnotationPresent(MapKey.class)) {
m_mapKey = (String) getAnnotation(MapKey.class).getAttribute("name");
}
// Set the map key class if one is defined.
if (isAnnotationPresent(MapKeyClass.class)) {
m_mapKeyClass = getMetadataClass((String) getAnnotation(MapKeyClass.class).getAttribute("value"));
}
// Set the map key enumerated if one is defined.
if (isAnnotationPresent(MapKeyEnumerated.class)) {
m_mapKeyEnumerated = new EnumeratedMetadata(getAnnotation(MapKeyEnumerated.class), accessibleObject);
}
// Set the map key temporal if one is defined.
if (isAnnotationPresent(MapKeyTemporal.class)) {
m_mapKeyTemporal = new TemporalMetadata(getAnnotation(MapKeyTemporal.class), accessibleObject);
}
// Set the map key join columns if some are present.
m_mapKeyJoinColumns = new ArrayList<JoinColumnMetadata>();
// Process all the map key join columns first.
if (isAnnotationPresent(MapKeyJoinColumns.class)) {
for (Object jColumn : (Object[]) getAnnotation(MapKeyJoinColumns.class).getAttributeArray("value")) {
m_mapKeyJoinColumns.add(new JoinColumnMetadata((MetadataAnnotation)jColumn, accessibleObject));
}
}
// Set the map key column if one is defined.
if (isAnnotationPresent(MapKeyColumn.class)) {
m_mapKeyColumn = new ColumnMetadata(getAnnotation(MapKeyColumn.class), accessibleObject, getAttributeName());
}
// Set the convert key if one is defined.
if (isAnnotationPresent(MapKeyConvert.class)) {
m_mapKeyConvert = (String) getAnnotation(MapKeyConvert.class).getAttribute("value");