package open.dolphin.infomodel;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
/**
*
* @author kazushi
*/
@Entity
@Table(name="demo_rp")
public class DemoRp implements Serializable {
private static final long serialVersionUID = 1L;
@Id
private Long id;
@Column(nullable=false)
private String name;
private String quantity;
private String unit;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof DemoRp)) {
return false;
}
DemoRp other = (DemoRp) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
return false;
}
return true;
}
@Override
public String toString() {
return "open.dolphin.infomodel.DemoRp[id=" + id + "]";
}
/**
* @return the name
*/
public String getName() {
return name;
}
/**
* @param name the name to set
*/
public void setName(String name) {
this.name = name;
}
/**
* @return the quantity
*/
public String getQuantity() {
return quantity;
}
/**
* @param quantity the quantity to set
*/
public void setQuantity(String quantity) {
this.quantity = quantity;
}
/**
* @return the unit
*/
public String getUnit() {
return unit;
}
/**
* @param unit the unit to set
*/
public void setUnit(String unit) {
this.unit = unit;
}
}