*/
void setCompanyFounder (final Employee companyFounder);
- /**
- * Getter for list of employees
- * <p>
- * @return List of employees
- */
- List<Employee> getEmployees ();
-
- /**
- * Setter for list of employees
- * <p>
- * @param employees List of employees
- */
- void setEmployees (final List<Employee> employees);
-
/**
* Getter for headquarters data
* <p>
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
-import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
@OneToOne (targetEntity = LoginUser.class, cascade = CascadeType.MERGE, optional = false)
private User contactUserOwner;
- /**
- * Reference to employee list
- */
- @JoinColumn (name = "company_employees_id", nullable = false, updatable = false)
- @OneToMany (targetEntity = CompanyEmployee.class, cascade = CascadeType.ALL)
- private List<Employee> employees;
-
/**
* Reference to headquarters data
*/
this.contactUserOwner = contactUserOwner;
}
- @Override
- public List<Employee> getEmployees () {
- return this.employees;
- }
-
- @Override
- public void setEmployees (final List<Employee> employees) {
- this.employees = employees;
- }
-
@Override
public HeadQuartersData getHeadQuartersData () {
return this.headQuartersData;