Package be.gaudry.model.edu
Class SchoolYear
java.lang.Object
be.gaudry.model.AbstractLightObject
be.gaudry.model.edu.Period
be.gaudry.model.edu.SchoolYear
- All Implemented Interfaces:
IPeriod
,ILightObject
,Serializable
- Since:
- 1.0 Oct 12, 2008
- Author:
- Steph GAUDRY
- See Also:
- Serialized Form
-
Field Summary
Fields inherited from class be.gaudry.model.edu.Period
defaultPeriod
Fields inherited from interface be.gaudry.model.ILightObject
DEFAULT_ID
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Checks if the periods are into this year.void
setPeriods(List<Period> periods)
Sets unsafe the periods for a year.toString()
String representation in YYYY-YYYY formatMethods inherited from class be.gaudry.model.edu.Period
contains, containsEndInclude, containsStartInclude, getDisplay, getEndDate, getId, getIntervalString, getParentPeriod, getStartDate, setDisplay, setEndDate, setId, setParentPeriod, setStartDate
Methods inherited from class be.gaudry.model.AbstractLightObject
equals, hashCode
-
Constructor Details
-
SchoolYear
- Parameters:
id
-startDate
-endDate
-
-
-
Method Details
-
getPeriods
- Returns:
- the periods
-
setPeriods
Sets unsafe the periods for a year. No validity check done on periods starting before the year start date or ending after the year end date.- Parameters:
periods
- the periods to set
-
checkPeriods
Checks if the periods are into this year.- Throws:
OutOfBoundException
- if at least a period is out of this year boundsNullPointerException
- if the periods collection has not been initialized
-
toString
String representation in YYYY-YYYY format- Overrides:
toString
in classPeriod
- Returns:
- a String representation of this LightObject only for debugging
- See Also:
Period.getIntervalString()
-