if (view != null) {
for (String key : associationMap.keySet()) {
Association association = associationMap.get(key);
if (association != null) {
if (view.compare(association.getEnd1(), association.getEnd2())) {
JPAEdmAssociationEndView associationEnd = associationEndMap.get(association.getName());
if (associationEnd.getJoinColumnName() != null && associationEnd.getJoinColumnReferenceColumnName() != null
&& view.getJoinColumnName() != null && view.getJoinColumnReferenceColumnName() != null) {
if (view.getJoinColumnName().equals(associationEnd.getJoinColumnName())
&& view.getJoinColumnReferenceColumnName()
.equals(associationEnd.getJoinColumnReferenceColumnName())) {
currentAssociation = association;
return association;
}
}
if (associationEnd.getMappedByName() != null) {
if (associationEnd.getMappedByName().equals(view.getOwningPropertyName())) {
currentAssociation = association;
return association;
}
}
if (associationEnd.getOwningPropertyName() != null) {
if (associationEnd.getOwningPropertyName().equals(view.getMappedByName())) {
currentAssociation = association;
return association;
}
}
}