// Set the primary key join columns if some are present.
// Process all the primary key join columns first.
if (isAnnotationPresent(JPA_PRIMARY_KEY_JOIN_COLUMNS)) {
MetadataAnnotation primaryKeyJoinColumns = getAnnotation(JPA_PRIMARY_KEY_JOIN_COLUMNS);
for (Object primaryKeyJoinColumn : primaryKeyJoinColumns.getAttributeArray("value")) {
m_primaryKeyJoinColumns.add(new PrimaryKeyJoinColumnMetadata((MetadataAnnotation) primaryKeyJoinColumn, this));
}
// Set the primary key foreign key metadata if one is specified.
if (primaryKeyJoinColumns.hasAttribute("foreignKey")) {
setPrimaryKeyForeignKey(new PrimaryKeyForeignKeyMetadata(primaryKeyJoinColumns.getAttributeAnnotation("foreignKey"), this));
}
}
// Process the single primary key join column second.
if (isAnnotationPresent(JPA_PRIMARY_KEY_JOIN_COLUMN)) {
PrimaryKeyJoinColumnMetadata primaryKeyJoinColumn = new PrimaryKeyJoinColumnMetadata(getAnnotation(JPA_PRIMARY_KEY_JOIN_COLUMN), this);
m_primaryKeyJoinColumns.add(primaryKeyJoinColumn);
// Set the primary key foreign key metadata.
if (primaryKeyJoinColumn.hasForeignKey()) {
setPrimaryKeyForeignKey(new PrimaryKeyForeignKeyMetadata(primaryKeyJoinColumn.getForeignKey()));
}
}
// Set the mapped by id if one is present.
if (isAnnotationPresent(JPA_MAPS_ID)) {