Right, I think I'm all caught up. You've got a relationship based on a two-column key, but the type column in NcContact, despite having the right name and type, will (almost) always have the wrong value.
There's probably no simple mapping that will fix this. The only simple in-mapping solution that I can think of applies only if the type value that you want is constant, or is stored in some other column in NcContact. In this case, you can change the many-to-one mapping in NcContact to use the "formula" element instead of the "column" element. A formula element passes simple SQL (not HQL) to the query, so you could replace <column name="ORG_UNIT_TYPE"/> in NcContact with <formula>4</formula> if the value was a constant 4; or you could use <formula>ORG_UNIT_OTHER_COLUMN_NAME</formula> if the value is in another column. You can also put other SQL in there; a UDF, a simple mathematical formula, etc. Obviously, this doesn't allow for a user-supplied value.
The in-java solution would be more flexible, but with a bit of an overhead. Map the relationship as a many-to-many with just the ORG_UNIT_ID column specified, and store the resulting NcOrgUnits in a Map. Then you can implement something like this:
Code:
public OrgUnit getOrgUnit()
{
return getOrgUnitMap().get(getOrgUnitTypeToReallyUse());
}