2
Copyright (C)2003-2004 Commission scolaire de Laval (http://www.cslaval.qc.ca)
4
This program is free software; you can redistribute it and/or modify
5
it under the terms of the GNU General Public License as published by
6
the Free Software Foundation; either version 2 of the License, or
7
(at your option) any later version.
9
This program is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
GNU General Public License for more details.
14
You should have received a copy of the GNU General Public License
15
along with this program; if not, write to the Free Software
16
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18
package ca.qc.cslaval.agenda.connectors.bdcs.data.beans;
20
import java.util.ArrayList;
21
import java.util.Date;
22
import java.util.LinkedHashMap;
23
import java.util.List;
26
import ca.qc.cslaval.agenda.connectors.bdcs.data.FacadeBd;
30
* @author St�phane Bond
33
public class CsGroupGrille extends CsGroup {
34
private CsGroupEcole ecole;
35
private LinkedHashMap mapPeriodes; // Lazy load
36
private List listePeriodes; // Lazy load
37
private CsCalendrier calendrier; // Lazy load
38
private int nbJourCycle;
39
private Date dateDebut;
44
* @see ca.qc.cslaval.agenda.connectors.bdcs.bd.beans.CsGroupe#estActif()
46
public boolean estActif() {
47
long now = (new Date()).getTime();
48
return (getDateDebut().getTime() <= now && now <= getDateFin().getTime());
54
public CsCalendrier getCalendrier() throws Exception {
55
if (calendrier == null) {
56
calendrier = FacadeBd.getCalendrier(getGrpId());
64
public Map getMapPeriodes() throws Exception {
65
if (mapPeriodes == null) {
66
mapPeriodes = FacadeBd.getPeriodes(getGrpId());
74
public List getListePeriodes() throws Exception {
75
if (listePeriodes == null) {
76
listePeriodes = new ArrayList(getMapPeriodes().values());
84
public Date getDateDebut() {
91
public Date getDateFin() {
98
public CsGroupEcole getEcole() {
105
public void setDateDebut(Date date) {
112
public void setDateFin(Date date) {
119
public void setEcole(CsGroupEcole ecole) {
126
public int getNbJourCycle() {
133
public void setNbJourCycle(int i) {