package cayenne3t.example.hr.auto;

import java.util.List;

/** Class _Department was generated by Cayenne.
  * It is probably a good idea to avoid changing this class manually, 
  * since it may be overwritten next time code is regenerated. 
  * If you need to make any customizations, please use subclass. 
  */
public class _Department extends org.apache.cayenne.CayenneDataObject {

    public static final String DESCRIPTION_PROPERTY = "description";
    public static final String NAME_PROPERTY = "name";
    public static final String EMPLOYEES_PROPERTY = "employees";
    public static final String PROJECTS_PROPERTY = "projects";

    public static final String DEPARTMENT_ID_PK_COLUMN = "department_id";

    public void setDescription(String description) {
        writeProperty("description", description);
    }
    public String getDescription() {
        return (String)readProperty("description");
    }
    
    
    public void setName(String name) {
        writeProperty("name", name);
    }
    public String getName() {
        return (String)readProperty("name");
    }
    
    
    public void addToEmployees(cayenne3t.example.hr.Person obj) {
        addToManyTarget("employees", obj, true);
    }
    public void removeFromEmployees(cayenne3t.example.hr.Person obj) {
        removeToManyTarget("employees", obj, true);
    }
    public List getEmployees() {
        return (List)readProperty("employees");
    }
    
    
    public void addToProjects(cayenne3t.example.hr.Project obj) {
        addToManyTarget("projects", obj, true);
    }
    public void removeFromProjects(cayenne3t.example.hr.Project obj) {
        removeToManyTarget("projects", obj, true);
    }
    public List getProjects() {
        return (List)readProperty("projects");
    }
    
    
}
