com.github.gentity.test.test1b_one_to_one.Desk Maven / Gradle / Ivy
package com.github.gentity.test.test1b_one_to_one;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.Table;
@Entity
@Table(name = "DESK")
public class Desk implements Serializable
{
@Id
@Column(name = "INVNO", length = 10)
protected String invno;
@Column(name = "MODEL", length = 100, nullable = false)
protected String model;
@OneToOne(mappedBy = "desk")
protected Employee employee;
public static Desk.Builder builder() {
return new Desk.Builder();
}
public String getInvno() {
return invno;
}
public void setInvno(String invno) {
this.invno = invno;
}
public String getModel() {
return model;
}
public void setModel(String model) {
this.model = model;
}
public Employee getEmployee() {
return employee;
}
public void setEmployee(Employee employee) {
this.employee = employee;
}
public static class Builder {
private final Desk instance = new Desk();
public Desk build() {
return instance;
}
public Desk.Builder invno(String invno) {
instance.invno = invno;
return this;
}
public Desk.Builder model(String model) {
instance.model = model;
return this;
}
public Desk.Builder employee(Employee employee) {
instance.employee = employee;
return this;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy