/*
* JBoss, Home of Professional Open Source
* Copyright 2012, JBoss Inc., and individual contributors as indicated
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.teiid.quickstart.hibernate.model;
import java.math.BigDecimal;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
@Entity
//@XmlRootElement
@Table(name = "ProductInfo")
public class ProductInfo implements java.io.Serializable {
/** Default value included to remove warning. Remove or modify at will. **/
private static final long serialVersionUID = 1L;
@Id
private int id;
private String symbol;
private String companyName;
@Column(name="price", insertable=false, updatable=false)
private BigDecimal price;
public ProductInfo() {
}
public ProductInfo(int id) {
this.id = id;
}
public ProductInfo(int id, String symbol, String companyName) {
this.id = id;
this.symbol = symbol;
this.companyName = companyName;
}
public int getId() {
return this.id;
}
public void setId(int id) {
this.id = id;
}
public String getSymbol() {
return this.symbol;
}
public void setSymbol(String symbol) {
this.symbol = symbol;
}
public String getCompanyName() {
return this.companyName;
}
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
public BigDecimal getPrice() {
return this.price;
}
public void setPrice(BigDecimal price) {
this.price = price;
}
public String toString() {
return "Product: (id) " + getId() + " (symbol) " + getSymbol()
+ " (companyName) " + getCompanyName() + " (price) "
+ getPrice();
}
}