package at.ac.tuwien.inso.entity;

public enum SemesterType {

    WinterSemester("WS"),
    SummerSemester("SS");

    private final String name;

    SemesterType(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return name;
    }

    /**
     * Reverse of toString
     */
    public static SemesterType fromString(String name) {
        for (SemesterType type : SemesterType.values()) {
            if (type.toString().equals(name)) {
                return type;
            }
        }

        throw new IllegalArgumentException("Type '" + name + "' is not a valid SemesterType");
    }
}

@@ -28,16 +28,17 @@
 ntity;%0A%0A
+%0A
 public e
@@ -80,16 +80,23 @@
 ter(%22WS%22
+, 10, 1
 ),%0A    S
@@ -117,16 +117,22 @@
 %22SS%22
+, 3, 1
 );%0A%0A    
 priv
@@ -131,92 +131,552 @@
     
-private final String name;%0A%0A    SemesterType(String name) %7B%0A        this.name = name
+/**%0A     * Name of the semester: WS or SS%0A     */%0A    private final String name;%0A%0A    /**%0A     * Month the semester starts%0A     */%0A    private final int startMonth;%0A%0A    /**%0A     * Day in month the semester starts%0A     */%0A    private final int startDay;%0A%0A%0A    SemesterType(String name, int startMonth, int startDay) %7B%0A        this.name = name;%0A        this.startMonth = startMonth;%0A        this.startDay = startDay;%0A    %7D%0A%0A    public int getStartMonth() %7B%0A        return startMonth;%0A    %7D%0A%0A    public int getStartDay() %7B%0A        return startDay
 ;%0A  

Add start dates to Semester Types