@NamedQuery (name = "SearchContactById", query = "SELECT c FROM contacts AS c WHERE c.contactId = :contactId")
}
)
+@SuppressWarnings ("PersistenceUnitPresent")
public class UserContact implements Contact {
/**
/**
* Email address
*/
- @Basic (optional = false)
- @Column (name = "contact_email_address", length = 100, nullable = false)
+ @Column (name = "contact_email_address", length = 100)
private String contactEmailAddress;
/**
@Override
public void copyAll (final Contact contact) {
+ // Contact should be valid
+ if (null == contact) {
+ // Throw NPE
+ throw new NullPointerException("contact is null"); //NOI18N
+ }
+
// Copy all:
// - base data
this.setContactFirstName(contact.getContactFirstName());