package al.gov.asp.smc.osgi.kai.model.jpa.entites;
import java.io.Serializable;
import java.util.List;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
/**
* The persistent class for the COMPANY database table.
*
*/
@Entity
@Table(name="COMPANY")
public class Company implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy=GenerationType.IDENTITY)
@Column(unique=true, nullable=false)
private int id;
@Column(length=50)
private String name;
//bi-directional many-to-one association to Person
@OneToMany(mappedBy="company")
private List<Person> persons;
public Company() {
}
public int getId() {
return this.id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
public List<Person> getPersons() {
return this.persons;
}
public void setPersons(List<Person> persons) {
this.persons = persons;
}
}