/******************************************************************************* * 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.jpa.advanced.criteria; import javax.persistence.*; /** * The type TaxCode * * @author Peter Pilgrim */ @Entity @Table(name="TAX_CODE") public class TaxCode { @Id @Column(name = "TAX_CODE_ID") private int id; @Column(name = "NAME") private String name; public TaxCode() { } public TaxCode(int id, String name) { this.id = id; this.name = name; } public int getId() { return id; } public void setId(int id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } @Override public String toString() { return "TaxCode{" + "id=" + id + ", name='" + name + '\'' + '}'; } @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof TaxCode)) return false; TaxCode taxCode = (TaxCode) o; if (id != taxCode.id) return false; return true; } @Override public int hashCode() { return id; } }