Package modele.alerte

Examples of modele.alerte.AlerteVoiture


        throw new RuntimeException("Pas de champs avec l'index " + columnIndex)
      }
    }

    public Object getValueAt(int rowIndex, int columnIndex) {
      AlerteVoiture alerte = alertes.get(rowIndex);
      switch(columnIndex) {
      case 0:
        return alerte.getVoiture().getNumuroAgglomeration();
      case 1:
        return alerte.getTypeAlerte().getDescription();
      case 2:       
        return new SimpleDateFormat(DATE_TIME_FORMAT).format(alerte.getDateAlerte().getTime());

      default:
        throw new RuntimeException("Pas de champs avec l'index " + columnIndex);
      }
    }
View Full Code Here


              TypeAlerte typeAlerte = TypeAlerte.valueOf(res.getString(3));
             
              Date dateAlerte = new java.sql.Timestamp(res.getTimestamp(4).getTime());
             
              //Date dateAlerte = new Date(res.getDate(4).getTime());
              result[0] = new AlerteVoiture(idAlerte,voiture,typeAlerte, dateAlerte);
            }
          }
          finally {
            try {
              if (res != null) {
View Full Code Here

              Date dateAlerte = new java.sql.Timestamp(res.getTimestamp(4).getTime());
             
              
              //Date dateAlerte = new Date(res.getDate(4).getTime());
             
              alertesVoiture.add(new AlerteVoiture(idAlerte,voiture,typeAlerte, dateAlerte));
            }
          }
          finally {
            try {
              if (res != null) {
View Full Code Here

   * @param nouveauKilometrage
   */
  public void setKilometrage(long nouveauKilometrage) {
    if (this.kilometrage != null) {
      if (palierPourNouveauEntretienAtteint(this.kilometrage, nouveauKilometrage)) {
        AlerteVoiture alerteVoiture = new AlerteVoiture(this, TypeAlerte.KILOMETRAGE_ENTRETIEN_ATTEINT, new Date());
        alertes.add(alerteVoiture);
      }
      if (nouveauKilometrage > kilometrageFinCirculation) {
        AlerteVoiture alerteVoiture = new AlerteVoiture(this, KILOMETRAGE_FIN_CIRCULATION_ATTEINT, new Date());
        alertes.add(alerteVoiture);
      }
    }
    this.kilometrage = nouveauKilometrage;
  }
View Full Code Here

TOP

Related Classes of modele.alerte.AlerteVoiture

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.