Subversion Repositories bacoAlunos

Rev

Rev 1312 | Rev 1506 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

package pt.estgp.estgweb.domain.views;

import jomm.utils.AutoFillArrayList;
import jomm.utils.StringsUtils;
import org.apache.log4j.Logger;
import pt.estgp.estgweb.Globals;
import pt.estgp.estgweb.domain.*;
import pt.estgp.estgweb.domain.dao.DaoFactory;
import pt.estgp.estgweb.utils.ConfigProperties;
import pt.estgp.estgweb.utils.DynamicArrayList;
import pt.estgp.estgweb.web.utils.DatesUtils;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

/**
 * @author Jorge Machado
 * @date 2/Mar/2008
 * @time 19:34:49
 * @see pt.estgp.estgweb.domain.views
 */

public class CourseView extends DomainObjectView
{
    private static final 1.5.0/docs/api/java/util/logging/Logger.html">Logger logger = 1.5.0/docs/api/java/util/logging/Logger.html">Logger.getLogger(CourseView.class);



    static HashMap<String,String> degrees = new HashMap<String, String>();
    static
    {
        List<String> degreesProps = ConfigProperties.getListValues("siges.degree.");
        for(1.5.0/docs/api/java/lang/String.html">String degree: degreesProps)
        {
            degrees.put(degree,degree);
        }
    }

    private long id;

    private 1.5.0/docs/api/java/lang/String.html">String code;
    private 1.5.0/docs/api/java/lang/String.html">String area;
    private 1.5.0/docs/api/java/lang/String.html">String name;
    private 1.5.0/docs/api/java/lang/String.html">String degree;
    private 1.5.0/docs/api/java/lang/String.html">String importYear;
    private 1.5.0/docs/api/java/lang/String.html">String description;
    private 1.5.0/docs/api/java/lang/String.html">String institutionalCode;
    private UserView coordinator;
    private UserView director;
    private List<CourseUnitView> courseUnits;

    private List<CourseUnitView> courseUnitsWithNoProgramA;
    private List<CourseUnitView> courseUnitsWithProgramCheckedA;
    private List<CourseUnitView> courseUnitsWithProgramNotCheckedA;

    private List<CourseUnitView> courseUnitsWithNoProgramS1;
    private List<CourseUnitView> courseUnitsWithProgramCheckedS1;
    private List<CourseUnitView> courseUnitsWithProgramNotCheckedS1;

    private List<CourseUnitView> courseUnitsWithNoProgramS2;
    private List<CourseUnitView> courseUnitsWithProgramCheckedS2;
    private List<CourseUnitView> courseUnitsWithProgramNotCheckedS2;

    private List<CourseUnitView> courseUnitsWithNoProgramT1;
    private List<CourseUnitView> courseUnitsWithProgramCheckedT1;
    private List<CourseUnitView> courseUnitsWithProgramNotCheckedT1;

    private List<CourseUnitView> courseUnitsWithNoProgramT2;
    private List<CourseUnitView> courseUnitsWithProgramCheckedT2;
    private List<CourseUnitView> courseUnitsWithProgramNotCheckedT2;

    private List<CourseUnitView> courseUnitsWithNoProgramT3;
    private List<CourseUnitView> courseUnitsWithProgramCheckedT3;
    private List<CourseUnitView> courseUnitsWithProgramNotCheckedT3;

    private List<CourseUnitView> courseUnitsWithNoProgramT4;
    private List<CourseUnitView> courseUnitsWithProgramCheckedT4;
    private List<CourseUnitView> courseUnitsWithProgramNotCheckedT4;

    private 1.5.0/docs/api/java/lang/String.html">String studiesPlanStreamId;
    private RepositoryFileImpl studiesPlan;
    private 1.5.0/docs/api/java/lang/String.html">String htmlResult;
    private 1.5.0/docs/api/java/lang/String.html">String cacheWebDocument;
    private 1.5.0/docs/api/java/lang/String.html">String externalSiteServer;
    private 1.5.0/docs/api/java/lang/String.html">String externalSitePath;
    private 1.5.0/docs/api/java/lang/String.html">String validationRole;
    private boolean status;
    private 1.5.0/docs/api/java/lang/String.html">String userGroupStudents;

    private List<CourseYearView> courseYearViews = new DynamicArrayList<CourseYearView>(CourseYearView.class);

    private List<CourseStudiesPlan> courseStudiesPlans = new DynamicArrayList<CourseStudiesPlan>(CourseStudiesPlan.class);

    public List<CourseStudiesPlan> getCourseStudiesPlans() {
        return courseStudiesPlans;
    }

    public void setCourseStudiesPlans(List<CourseStudiesPlan> courseStudiesPlans) {
        this.courseStudiesPlans = courseStudiesPlans;
    }

    private Course course;

    public boolean isStatus() {
        return status;
    }

    public void setStatus(boolean status) {
        this.status = status;
    }

    public 1.5.0/docs/api/java/lang/Class.html">Class getReferenceClass()
    {
        return CourseImpl.class;
    }

    public 1.5.0/docs/api/java/io/Serializable.html">Serializable getSerializable()
    {
        return id;
    }

    public CourseView()
    {
        coordinator = new UserView();
        director = new UserView();
    }

    public CourseView(Course course)
    {
        super(course);
        init(course,false);
    }

    public CourseView(Course course, boolean initCourseUnits)
    {
        super(course);
        init(course, initCourseUnits);
    }

    private void init(Course course, boolean initCourseUnits)
    {
        for(CourseYear cy: course.getCourseYears())
        {
            CourseYearView courseYearView = new CourseYearView(cy);
            courseYearViews.add(courseYearView);
        }

        this.course = course;
        this.id = course.getId();
        this.code = course.getCode();
        this.area = course.getArea();
        this.name = course.getName();
        this.degree = course.getDegree();
        this.validationRole = course.getValidationRole();
        this.description = course.getDescription();
        this.importYear = course.getImportYear();
        this.institutionalCode = course.getInstitutionalCode();
        this.cacheWebDocument = course.getCacheWebDocument();
        this.externalSitePath = course.getExternalSitePath();
        this.externalSiteServer = course.getExternalSiteServer();
        this.status = course.isStatus();
        this.userGroupStudents = course.getUserGroupStudents();
        if(course.getStudiesPlan() != null)
            this.studiesPlanStreamId = course.getStudiesPlan();
        if(course.getCoordinator() != null)
            coordinator = new UserView(course.getCoordinator());
        if(course.getDirector() != null)
            director = new UserView(course.getDirector());
        if(initCourseUnits)
        {
            if(course.getCourseUnits() != null)
            {
                courseUnits = new ArrayList<CourseUnitView>();
                for(CourseUnit c: course.getCourseUnits())
                {
                    CourseUnitView cUV = new CourseUnitView(c,true,false,false,false);
                    courseUnits.add(cUV);
                }
            }
        }

    }

    public void persistViewInObject(Course c)
    {
        for(CourseYearView cyv: courseYearViews)
        {
            for(CourseYear cy : c.getCourseYears())
            {
                if(cy.getId() == cyv.getId())
                {
                    cy.setSeparatedTurmas(cyv.isSeparatedTurmas());
                }
            }
        }
        c.setCode(code);
//        c.setArea(area);
        CourseDepartment department = DaoFactory.getCourseDepartmentDaoImpl().findBySigla(area);
        if(department != null)
            c.setDepartment(department);

        c.setDegree(degree);
        c.setDescription(description);
        c.setImportYear(importYear);
        c.setInstitutionalCode(institutionalCode);
        c.setName(name);
        c.setExternalSitePath(externalSitePath);
        c.setExternalSiteServer(externalSiteServer);
        c.setValidationRole(validationRole);
        c.setStatus(status);
        c.setUserGroupStudents(userGroupStudents);
        if(coordinator != null && coordinator.getId() > 0)
        {
            Teacher u = DaoFactory.getTeacherDaoImpl().load(coordinator.getId());
            if(c.getCoordinator() == null || c.getCoordinator().getId() != coordinator.getId())
            {
                if(c.getCoordinator() != null)
                {
                    Teacher oldCoordinator = c.getCoordinator();
                    oldCoordinator.getCoordinatorCourses().remove(c);
                    if(oldCoordinator.getCoordinatorCourses().size() == 0)
                    {
                        oldCoordinator.removeRole(Globals.COURSE_COORDINATOR_ROLE);
                    }
                }
                c.setCoordinator(u);
                u.addRole(Globals.COURSE_COORDINATOR_ROLE);
            }
        }
        if(director != null && director.getId() > 0)
        {
            Teacher u = DaoFactory.getTeacherDaoImpl().load(director.getId());
            if(c.getDirector() == null || c.getDirector().getId() != director.getId())
            {
                if(c.getDirector() != null)
                {
                    Teacher oldDirector = c.getDirector();
                    oldDirector.getDirectorCourses().remove(c);
                    if(oldDirector.getDirectorCourses().size() == 0)
                    {
                        oldDirector.removeRole(Globals.COURSE_DIRECTOR_ROLE);
                    }
                }
                c.setDirector(u);
                u.addRole(Globals.COURSE_DIRECTOR_ROLE);
            }
        }
    }



    public long getId()
    {
        return id;
    }

    public void setId(long id)
    {
        this.id = id;
    }

    public 1.5.0/docs/api/java/lang/String.html">String getCode()
    {
        return code;
    }

    public void setCode(1.5.0/docs/api/java/lang/String.html">String code)
    {
        this.code = code;
    }

    public 1.5.0/docs/api/java/lang/String.html">String getArea()
    {
        return area;
    }

    public void setArea(1.5.0/docs/api/java/lang/String.html">String area)
    {
        this.area = area;
    }

    public 1.5.0/docs/api/java/lang/String.html">String getName()
    {
        return name;
    }

    public void setName(1.5.0/docs/api/java/lang/String.html">String name)
    {
        this.name = name;
    }

    public 1.5.0/docs/api/java/lang/String.html">String getDegree()
    {
        return degree;
    }
    public 1.5.0/docs/api/java/lang/String.html">String getDegreeCleanCode()
    {

        if(degree == null || degree.trim().length() > 0)
            if(degrees.get(degree)!=null)
                return degree;
        return Globals.COURSE_DEGREE_UNKNOWN; //for unknown
    }

    public void setDegree(1.5.0/docs/api/java/lang/String.html">String degree)
    {
        this.degree = degree;
    }

    public 1.5.0/docs/api/java/lang/String.html">String getImportYear()
    {
        return importYear;
    }

    public void setImportYear(1.5.0/docs/api/java/lang/String.html">String importYear)
    {
        this.importYear = importYear;
    }

    public 1.5.0/docs/api/java/lang/String.html">String getDescription()
    {
        return description;
    }

    public 1.5.0/docs/api/java/lang/String.html">String getFormatedDescription()
    {
        return StringsUtils.getFormatedText(description);
    }

    public void setDescription(1.5.0/docs/api/java/lang/String.html">String description)
    {
        this.description = description;
    }

    public 1.5.0/docs/api/java/lang/String.html">String getInstitutionalCode()
    {
        return institutionalCode;
    }

    public void setInstitutionalCode(1.5.0/docs/api/java/lang/String.html">String institutionalCode)
    {
        this.institutionalCode = institutionalCode;
    }

    public UserView getCoordinator()
    {
        if(coordinator == null)
            coordinator = new UserView();
        return coordinator;
    }

    public void setCoordinator(UserView coordinator)
    {
        this.coordinator = coordinator;
    }


    public List<CourseUnitView> getCourseUnits()
    {
        return courseUnits;
    }

    public void setCourseUnits(List<CourseUnitView> courseUnits)
    {
        this.courseUnits = courseUnits;
    }

    public 1.5.0/docs/api/java/lang/String.html">String getStudiesPlanStreamId()
    {
        return studiesPlanStreamId;
    }

    public void setStudiesPlanStreamId(1.5.0/docs/api/java/lang/String.html">String studiesPlanStreamId)
    {
        this.studiesPlanStreamId = studiesPlanStreamId;
    }

    public RepositoryFileImpl getStudiesPlan()
    {
        return studiesPlan;
    }

    public void setStudiesPlan(RepositoryFileImpl studiesPlan)
    {
        this.studiesPlan = studiesPlan;
    }

    public int getStudiesPlanSizeKb()
    {
        if(studiesPlan != null)
            return studiesPlan.getLastVersion().getSize() / 1024;
        return 0;
    }

    public 1.5.0/docs/api/java/lang/String.html">String getStudiesPlanDate()
    {
        if(studiesPlan != null)
            return DatesUtils.getStringFromDate(studiesPlan.getLastVersion().getSaveDate());
        return "";
    }

    public UserView getDirector()
    {
        if(director == null)
            director = new UserView();
        return director;
    }

    public void setDirector(UserView director)
    {
        this.director = director;
    }


    public 1.5.0/docs/api/java/lang/String.html">String getHtmlResult()
    {
        return htmlResult;
    }

    public void setHtmlResult(1.5.0/docs/api/java/lang/String.html">String htmlResult)
    {
        this.htmlResult = htmlResult;
    }


    public 1.5.0/docs/api/java/lang/String.html">String getCacheWebDocument()
    {
        return cacheWebDocument;
    }

    public void setCacheWebDocument(1.5.0/docs/api/java/lang/String.html">String cacheWebDocument)
    {
        this.cacheWebDocument = cacheWebDocument;
    }

    public 1.5.0/docs/api/java/lang/String.html">String getExternalSiteServer()
    {
        return externalSiteServer;
    }

    public void setExternalSiteServer(1.5.0/docs/api/java/lang/String.html">String externalSiteServer)
    {
        this.externalSiteServer = externalSiteServer;
    }

    public 1.5.0/docs/api/java/lang/String.html">String getExternalSitePath()
    {
        return externalSitePath;
    }

    public void setExternalSitePath(1.5.0/docs/api/java/lang/String.html">String externalSitePath)
    {
        this.externalSitePath = externalSitePath;
    }


    public List<CourseUnitView> getCourseUnitsWithNoProgramA() { return courseUnitsWithNoProgramA; }
    public List<CourseUnitView> getCourseUnitsWithNoProgramS1() { return courseUnitsWithNoProgramS1; }
    public List<CourseUnitView> getCourseUnitsWithNoProgramS2()
    {
        return courseUnitsWithNoProgramS2;
    }
    public List<CourseUnitView> getCourseUnitsWithNoProgramT1()
    {
        return courseUnitsWithNoProgramT1;
    }
    public List<CourseUnitView> getCourseUnitsWithNoProgramT2()
    {
        return courseUnitsWithNoProgramT2;
    }
    public List<CourseUnitView> getCourseUnitsWithNoProgramT3()
    {
        return courseUnitsWithNoProgramT3;
    }
    public List<CourseUnitView> getCourseUnitsWithNoProgramT4()
    {
        return courseUnitsWithNoProgramT4;
    }


    public 1.5.0/docs/api/java/lang/String.html">String getValidationRole() {
        return validationRole;
    }

    public void setValidationRole(1.5.0/docs/api/java/lang/String.html">String validationRole) {
        this.validationRole = validationRole;
    }

    public void setCourseUnitsWithNoProgramA(List<CourseUnitView> courseUnitsWithNoProgramA)
    {
        this.courseUnitsWithNoProgramA = courseUnitsWithNoProgramA;
    }
    public void setCourseUnitsWithNoProgramS1(List<CourseUnitView> courseUnitsWithNoProgramS1)
    {
        this.courseUnitsWithNoProgramS1 = courseUnitsWithNoProgramS1;
    }
    public void setCourseUnitsWithNoProgramS2(List<CourseUnitView> courseUnitsWithNoProgramS2)
    {
        this.courseUnitsWithNoProgramS2 = courseUnitsWithNoProgramS2;
    }
    public void setCourseUnitsWithNoProgramT1(List<CourseUnitView> courseUnitsWithNoProgramT1)
    {
        this.courseUnitsWithNoProgramT1 = courseUnitsWithNoProgramT1;
    }
    public void setCourseUnitsWithNoProgramT2(List<CourseUnitView> courseUnitsWithNoProgramT2)
    {
        this.courseUnitsWithNoProgramT2 = courseUnitsWithNoProgramT2;
    }
    public void setCourseUnitsWithNoProgramT3(List<CourseUnitView> courseUnitsWithNoProgramT3)
    {
        this.courseUnitsWithNoProgramT3 = courseUnitsWithNoProgramT3;
    }
    public void setCourseUnitsWithNoProgramT4(List<CourseUnitView> courseUnitsWithNoProgramT4)
    {
        this.courseUnitsWithNoProgramT4 = courseUnitsWithNoProgramT4;
    }

    public boolean getHasA() { return getHasCourseUnitsWithNoProgramA() || getHasCourseUnitsWithProgramCheckedA() || getHasCourseUnitsWithProgramNotCheckedA(); }
    public boolean getHasS1() { return getHasCourseUnitsWithNoProgramS1() || getHasCourseUnitsWithProgramCheckedS1() || getHasCourseUnitsWithProgramNotCheckedS1(); }
    public boolean getHasS2() { return getHasCourseUnitsWithNoProgramS2() || getHasCourseUnitsWithProgramCheckedS2() || getHasCourseUnitsWithProgramNotCheckedS2(); }
    public boolean getHasT1() { return getHasCourseUnitsWithNoProgramT1() || getHasCourseUnitsWithProgramCheckedT1() || getHasCourseUnitsWithProgramNotCheckedT1(); }
    public boolean getHasT2() { return getHasCourseUnitsWithNoProgramT2() || getHasCourseUnitsWithProgramCheckedT2() || getHasCourseUnitsWithProgramNotCheckedT2(); }
    public boolean getHasT3() { return getHasCourseUnitsWithNoProgramT3() || getHasCourseUnitsWithProgramCheckedT3() || getHasCourseUnitsWithProgramNotCheckedT3(); }
    public boolean getHasT4() { return getHasCourseUnitsWithNoProgramT4() || getHasCourseUnitsWithProgramCheckedT4() || getHasCourseUnitsWithProgramNotCheckedT4(); }

    public boolean getHasCourseUnitsWithProgramCheckedA() { return courseUnitsWithProgramCheckedA!=null && courseUnitsWithProgramCheckedA.size() > 0; }
    public boolean getHasCourseUnitsWithProgramCheckedS1() { return courseUnitsWithProgramCheckedS1!=null && courseUnitsWithProgramCheckedS1.size() > 0; }
    public boolean getHasCourseUnitsWithProgramCheckedS2() { return courseUnitsWithProgramCheckedS2!=null && courseUnitsWithProgramCheckedS2.size() > 0; }
    public boolean getHasCourseUnitsWithProgramCheckedT1() { return courseUnitsWithProgramCheckedT1!=null && courseUnitsWithProgramCheckedT1.size() > 0; }
    public boolean getHasCourseUnitsWithProgramCheckedT2() { return courseUnitsWithProgramCheckedT2!=null && courseUnitsWithProgramCheckedT2.size() > 0; }
    public boolean getHasCourseUnitsWithProgramCheckedT3() { return courseUnitsWithProgramCheckedT3!=null && courseUnitsWithProgramCheckedT3.size() > 0; }
    public boolean getHasCourseUnitsWithProgramCheckedT4() { return courseUnitsWithProgramCheckedT4!=null && courseUnitsWithProgramCheckedT4.size() > 0; }

    public boolean getHasCourseUnitsWithProgramNotCheckedA() { return courseUnitsWithProgramNotCheckedA!=null && courseUnitsWithProgramNotCheckedA.size() > 0; }
    public boolean getHasCourseUnitsWithProgramNotCheckedS1() { return courseUnitsWithProgramNotCheckedS1!=null && courseUnitsWithProgramNotCheckedS1.size() > 0; }
    public boolean getHasCourseUnitsWithProgramNotCheckedS2() { return courseUnitsWithProgramNotCheckedS2!=null && courseUnitsWithProgramNotCheckedS2.size() > 0; }
    public boolean getHasCourseUnitsWithProgramNotCheckedT1() { return courseUnitsWithProgramNotCheckedT1!=null && courseUnitsWithProgramNotCheckedT1.size() > 0; }
    public boolean getHasCourseUnitsWithProgramNotCheckedT2() { return courseUnitsWithProgramNotCheckedT2!=null && courseUnitsWithProgramNotCheckedT2.size() > 0; }
    public boolean getHasCourseUnitsWithProgramNotCheckedT3() { return courseUnitsWithProgramNotCheckedT3!=null && courseUnitsWithProgramNotCheckedT3.size() > 0; }
    public boolean getHasCourseUnitsWithProgramNotCheckedT4() { return courseUnitsWithProgramNotCheckedT4!=null && courseUnitsWithProgramNotCheckedT4.size() > 0; }

    public boolean getHasCourseUnitsWithNoProgramA() { return courseUnitsWithNoProgramA!=null && courseUnitsWithNoProgramA.size() > 0; }
    public boolean getHasCourseUnitsWithNoProgramS1() { return courseUnitsWithNoProgramS1!=null && courseUnitsWithNoProgramS1.size() > 0; }
    public boolean getHasCourseUnitsWithNoProgramS2() { return courseUnitsWithNoProgramS2!=null && courseUnitsWithNoProgramS2.size() > 0; }
    public boolean getHasCourseUnitsWithNoProgramT1() { return courseUnitsWithNoProgramT1!=null && courseUnitsWithNoProgramT1.size() > 0; }
    public boolean getHasCourseUnitsWithNoProgramT2() { return courseUnitsWithNoProgramT2!=null && courseUnitsWithNoProgramT2.size() > 0; }
    public boolean getHasCourseUnitsWithNoProgramT3() { return courseUnitsWithNoProgramT3!=null && courseUnitsWithNoProgramT3.size() > 0; }
    public boolean getHasCourseUnitsWithNoProgramT4() { return courseUnitsWithNoProgramT4!=null && courseUnitsWithNoProgramT4.size() > 0; }


    public List<CourseUnitView> getCourseUnitsWithProgramCheckedA()
    {
        if(courseUnitsWithProgramCheckedA==null)
            courseUnitsWithProgramCheckedA = new AutoFillArrayList<CourseUnitView>(CourseUnitView.class);
        return courseUnitsWithProgramCheckedA;
    }
    public List<CourseUnitView> getCourseUnitsWithProgramCheckedS1()
    {
        if(courseUnitsWithProgramCheckedS1==null)
            courseUnitsWithProgramCheckedS1 = new AutoFillArrayList<CourseUnitView>(CourseUnitView.class);
        return courseUnitsWithProgramCheckedS1;
    }
    public List<CourseUnitView> getCourseUnitsWithProgramCheckedS2()
    {
        if(courseUnitsWithProgramCheckedS2==null)
            courseUnitsWithProgramCheckedS2 = new AutoFillArrayList<CourseUnitView>(CourseUnitView.class);
        return courseUnitsWithProgramCheckedS2;
    }
    public List<CourseUnitView> getCourseUnitsWithProgramCheckedT1()
    {
        if(courseUnitsWithProgramCheckedT1==null)
            courseUnitsWithProgramCheckedT1 = new AutoFillArrayList<CourseUnitView>(CourseUnitView.class);
        return courseUnitsWithProgramCheckedT1;
    }
    public List<CourseUnitView> getCourseUnitsWithProgramCheckedT2()
    {
        if(courseUnitsWithProgramCheckedT2==null)
            courseUnitsWithProgramCheckedT2 = new AutoFillArrayList<CourseUnitView>(CourseUnitView.class);
        return courseUnitsWithProgramCheckedT2;
    }
    public List<CourseUnitView> getCourseUnitsWithProgramCheckedT3()
    {
        if(courseUnitsWithProgramCheckedT3==null)
            courseUnitsWithProgramCheckedT3 = new AutoFillArrayList<CourseUnitView>(CourseUnitView.class);
        return courseUnitsWithProgramCheckedT3;
    }
    public List<CourseUnitView> getCourseUnitsWithProgramCheckedT4()
    {
        if(courseUnitsWithProgramCheckedT4==null)
            courseUnitsWithProgramCheckedT4 = new AutoFillArrayList<CourseUnitView>(CourseUnitView.class);
        return courseUnitsWithProgramCheckedT4;
    }



    public void setCourseUnitsWithProgramCheckedA(List<CourseUnitView> courseUnitsWithProgramCheckedA) { this.courseUnitsWithProgramCheckedA = courseUnitsWithProgramCheckedA; }
    public void setCourseUnitsWithProgramCheckedS1(List<CourseUnitView> courseUnitsWithProgramCheckedS1) { this.courseUnitsWithProgramCheckedS1 = courseUnitsWithProgramCheckedS1; }
    public void setCourseUnitsWithProgramCheckedS2(List<CourseUnitView> courseUnitsWithProgramCheckedS2)
    {
        this.courseUnitsWithProgramCheckedS2 = courseUnitsWithProgramCheckedS2;
    }
    public void setCourseUnitsWithProgramCheckedT1(List<CourseUnitView> courseUnitsWithProgramCheckedT1)
    {
        this.courseUnitsWithProgramCheckedT1 = courseUnitsWithProgramCheckedT1;
    }
    public void setCourseUnitsWithProgramCheckedT2(List<CourseUnitView> courseUnitsWithProgramCheckedT2)
    {
        this.courseUnitsWithProgramCheckedT2 = courseUnitsWithProgramCheckedT2;
    }
    public void setCourseUnitsWithProgramCheckedT3(List<CourseUnitView> courseUnitsWithProgramCheckedT3)
    {
        this.courseUnitsWithProgramCheckedT3 = courseUnitsWithProgramCheckedT3;
    }
    public void setCourseUnitsWithProgramCheckedT4(List<CourseUnitView> courseUnitsWithProgramCheckedT4)
    {
        this.courseUnitsWithProgramCheckedT4 = courseUnitsWithProgramCheckedT4;
    }


    public List<CourseUnitView> getCourseUnitsWithProgramNotCheckedA()
    {
        if(courseUnitsWithProgramNotCheckedA==null)
            courseUnitsWithProgramNotCheckedA = new AutoFillArrayList<CourseUnitView>(CourseUnitView.class);
        return courseUnitsWithProgramNotCheckedA;
    }

    public List<CourseUnitView> getCourseUnitsWithProgramNotCheckedS1()
    {
        if(courseUnitsWithProgramNotCheckedS1==null)
            courseUnitsWithProgramNotCheckedS1 = new AutoFillArrayList<CourseUnitView>(CourseUnitView.class);
        return courseUnitsWithProgramNotCheckedS1;
    }

    public List<CourseUnitView> getCourseUnitsWithProgramNotCheckedS2()
    {
        if(courseUnitsWithProgramNotCheckedS2==null)
            courseUnitsWithProgramNotCheckedS2 = new AutoFillArrayList<CourseUnitView>(CourseUnitView.class);
        return courseUnitsWithProgramNotCheckedS2;
    }

    public List<CourseUnitView> getCourseUnitsWithProgramNotCheckedT1()
    {
        if(courseUnitsWithProgramNotCheckedT1==null)
            courseUnitsWithProgramNotCheckedT1 = new AutoFillArrayList<CourseUnitView>(CourseUnitView.class);
        return courseUnitsWithProgramNotCheckedT1;
    }

    public List<CourseUnitView> getCourseUnitsWithProgramNotCheckedT2()
    {
        if(courseUnitsWithProgramNotCheckedT2==null)
            courseUnitsWithProgramNotCheckedT2 = new AutoFillArrayList<CourseUnitView>(CourseUnitView.class);
        return courseUnitsWithProgramNotCheckedT2;
    }

    public List<CourseUnitView> getCourseUnitsWithProgramNotCheckedT3()
    {
        if(courseUnitsWithProgramNotCheckedT3==null)
            courseUnitsWithProgramNotCheckedT3 = new AutoFillArrayList<CourseUnitView>(CourseUnitView.class);
        return courseUnitsWithProgramNotCheckedT3;
    }

    public List<CourseUnitView> getCourseUnitsWithProgramNotCheckedT4()
    {
        if(courseUnitsWithProgramNotCheckedT4==null)
            courseUnitsWithProgramNotCheckedT4 = new AutoFillArrayList<CourseUnitView>(CourseUnitView.class);
        return courseUnitsWithProgramNotCheckedT4;
    }



    public void setCourseUnitsWithProgramNotCheckedA(List<CourseUnitView> courseUnitsWithProgramNotCheckedA)
    {
        this.courseUnitsWithProgramNotCheckedA = courseUnitsWithProgramNotCheckedA;
    }
    public void setCourseUnitsWithProgramNotCheckedS1(List<CourseUnitView> courseUnitsWithProgramNotCheckedS1)
    {
        this.courseUnitsWithProgramNotCheckedS1 = courseUnitsWithProgramNotCheckedS1;
    }
    public void setCourseUnitsWithProgramNotCheckedS2(List<CourseUnitView> courseUnitsWithProgramNotCheckedS2)
    {
        this.courseUnitsWithProgramNotCheckedS2 = courseUnitsWithProgramNotCheckedS2;
    }
    public void setCourseUnitsWithProgramNotCheckedT1(List<CourseUnitView> courseUnitsWithProgramNotCheckedT1)
    {
        this.courseUnitsWithProgramNotCheckedT1 = courseUnitsWithProgramNotCheckedT1;
    }
    public void setCourseUnitsWithProgramNotCheckedT2(List<CourseUnitView> courseUnitsWithProgramNotCheckedT2)
    {
        this.courseUnitsWithProgramNotCheckedT2 = courseUnitsWithProgramNotCheckedT2;
    }
    public void setCourseUnitsWithProgramNotCheckedT3(List<CourseUnitView> courseUnitsWithProgramNotCheckedT3)
    {
        this.courseUnitsWithProgramNotCheckedT3 = courseUnitsWithProgramNotCheckedT3;
    }
    public void setCourseUnitsWithProgramNotCheckedT4(List<CourseUnitView> courseUnitsWithProgramNotCheckedT4)
    {
        this.courseUnitsWithProgramNotCheckedT4 = courseUnitsWithProgramNotCheckedT4;
    }


    public List<CourseYearView> getCourseYearViews() {
        return courseYearViews;
    }

    public void setCourseYearViews(List<CourseYearView> courseYearViews) {
        this.courseYearViews = courseYearViews;
    }

    public 1.5.0/docs/api/java/lang/String.html">String getUserGroupStudents() {
        return userGroupStudents;
    }

    public void setUserGroupStudents(1.5.0/docs/api/java/lang/String.html">String userGroupStudents) {
        this.userGroupStudents = userGroupStudents;
    }


    public boolean isSeparatedUnits(1.5.0/docs/api/java/lang/String.html">String year)
    {
        for(CourseYearView cyv: courseYearViews)
        {
            if(cyv.getImportYear().equals(year))
                return cyv.isSeparatedTurmas();
        }
        return false;
    }
    public static class CourseYearView
    {
        private long id;
        private 1.5.0/docs/api/java/lang/String.html">String importYear;
        private boolean separatedTurmas;
        private 1.5.0/docs/api/java/lang/String.html">String updateDate;

        public CourseYearView()
        {
        }
        public CourseYearView(CourseYear cy)
        {
            this.id = cy.getId();
            this.importYear = cy.getImportYear();
            this.separatedTurmas = cy.isSeparatedTurmas();
            this.updateDate = DatesUtils.getStringFromDate(cy.getUpdateDate());
        }

        public long getId() {
            return id;
        }

        public void setId(long id) {
            this.id = id;
        }

        public 1.5.0/docs/api/java/lang/String.html">String getImportYear() {
            return importYear;
        }

        public void setImportYear(1.5.0/docs/api/java/lang/String.html">String importYear) {
            this.importYear = importYear;
        }

        public boolean isSeparatedTurmas() {
            return separatedTurmas;
        }

        public void setSeparatedTurmas(boolean separatedTurmas) {
            this.separatedTurmas = separatedTurmas;
        }

        public 1.5.0/docs/api/java/lang/String.html">String getUpdateDate() {
            return updateDate;
        }

        public void setUpdateDate(1.5.0/docs/api/java/lang/String.html">String updateDate) {
            this.updateDate = updateDate;
        }
    }
}