/******************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * * Copyright (c) 2013,2014 by Peter Pilgrim, Addiscombe, Surrey, XeNoNiQUe UK * * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU GPL v3.0 * which accompanies this distribution, and is available at: * http://www.gnu.org/licenses/gpl-3.0.txt * * Developers: * Peter Pilgrim -- design, development and implementation * -- Blog: http://www.xenonique.co.uk/blog/ * -- Twitter: @peter_pilgrim * * Contributors: * *******************************************************************************/ package je7hb.basic2.jpa; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.IdClass; import java.io.Serializable; /** * The type ContactConsumer1 * * @author Peter Pilgrim (peter) */ @Entity public class ContactConsumer1 implements Serializable { @Id private long contactId; @Column(name = "FIRST_NAME", nullable = false) private String firstname; @Column(name = "LAST_NAME", nullable = false) private String lastname; public ContactConsumer1() { this(0, null,null); } public ContactConsumer1(int contactId, String firstname, String lastname) { this.contactId = contactId; this.firstname = firstname; this.lastname = lastname; } public long getContactId() { return contactId; } public void setContactId(long contactId) { this.contactId = contactId; } public String getFirstname() { return firstname; } public void setFirstname(String firstname) { this.firstname = firstname; } public String getLastname() { return lastname; } public void setLastname(String lastname) { this.lastname = lastname; } @Override public String toString() { return "ContactConsumer1{" + "contactId=" + contactId + ", firstname='" + firstname + '\'' + ", lastname='" + lastname + '\'' + '}'; } }