* Translates contact's gender to human-readable
* <p>
* @param contact Contact instance
+ * <p>
* @return Translates value (from bundle)
*/
public static String getTranslatedGender (final Contact contact) {
if (null == contact) {
// Abort here
throw new NullPointerException("contact is null");
- } else if (contact.getGender() == null) {
+ } else if (contact.getContactGender() == null) {
// Gender is not set
throw new NullPointerException(MessageFormat.format("contact {0} has no gender set.", contact));
}
// Get key from it
- String key = contact.getGender().getMessageKey();
+ String key = contact.getContactGender().getMessageKey();
// Translate and return it
return utils.getMessageStringFromKey(key);