Beispiel #1
0
 public void agregarDia(
     GregorianCalendar fecha, GregorianCalendar entrada, GregorianCalendar salida)
     throws Exception {
   this.getDias();
   Dia aux = this.buscarDia(fecha.get(Calendar.DAY_OF_MONTH));
   if (aux == null) {
     aux = new Dia(fecha, entrada, salida);
     this.dias.add(aux);
     Empresa.getPersistencia().update(this);
   } else {
     throw new Exception(
         "Ya existe el Día " + fecha.get(Calendar.DAY_OF_MONTH) + " en el mes  " + this.mes);
   }
 }
Beispiel #2
0
 public Mes(int mes) {
   this();
   this.mes = mes;
   Empresa.getPersistencia().insert(this);
 }