Package application.exceptions

Examples of application.exceptions.DataFormatException


   *
   */
  public void setIndividu(ModeleIndividu individu) throws DataFormatException
  {
    if(individu == null)
      throw new DataFormatException("L'individu n'est pas defini.");

    _individu = individu;
  }
View Full Code Here


  }

  public void setNbAppritions(int nbAppritions) throws DataFormatException
  {
    if(nbAppritions < 0)
      throw new DataFormatException("Le nombre d'appritions ne peut etre negatif.");

    _nbApparitions = nbAppritions;
  }
View Full Code Here

   *
   */
  public void setNum(int num) throws DataFormatException
  {
    if(num < 1)
      throw new DataFormatException("Le numero d'identifiant du film est incorrect.");

    _num = num;
  }
View Full Code Here

  }

  public void setTitre(String titre) throws DataFormatException
  {
    if(titre.length() < 1 || titre.length() > 50)
      throw new DataFormatException("Le titre du film doit faire entre 1 et 50 caracteres.");

    _titre = titre;
  }
View Full Code Here

   *
   */
  public int ajouter() throws DataFormatException, SQLException
  {
    if((_titre == null) || (_realisateur.getPrenom() == null) || (_realisateur.getNom() == null))
      throw new DataFormatException("Les attributs titre et realisateur doivent etre renseignes.");

    // Ajout dans la base de donnees
    CallableStatement cst = _DB.prepareCall("{? = call majVideotheque.ajouterFilm(?, ?, ?)}");
    cst.setString(2, _titre);
    cst.setString(3, _realisateur.getNom() );
View Full Code Here

   *
   */
  public void setCodeGenre(String codeGenre) throws DataFormatException
  {
    if(codeGenre.length() < 1 || codeGenre.length() > 2)
      throw new DataFormatException("Le code genre doit faire entre 1 et 2 caracteres.");

    _codeGenre = codeGenre;
  }
View Full Code Here

  }

  public void setNumFilm(int numFilm) throws DataFormatException
  {
    if(numFilm < 1)
      throw new DataFormatException("Le numero d'identifiant du film est incorrect.");

    _numFilm = numFilm;
  }
View Full Code Here

   *
   */
  public void ajouter() throws DataFormatException, SQLException
  {
    if((_codeGenre == null) || (_numFilm == 0))
      throw new DataFormatException("Les attributs codeGenre et numFilm doivent etre renseignes.");

    // Ajout dans la base de donnees
    CallableStatement cst = _DB.prepareCall("call majVideotheque.ajouterGenre(" + _numFilm + ", " + _codeGenre + ")");
    cst.execute();
  }
View Full Code Here

   *
   */
  public void ajouter(CallableStatement cst) throws DataFormatException, SQLException
  {
    if((_codeGenre == null) || (_numFilm == 0))
      throw new DataFormatException("Les attributs codeGenre et numFilm doivent etre renseignes.");

    // Ajout dans la base de donnees
    cst.setInt(1, _numFilm);
    cst.setString(2, _codeGenre);
    cst.execute();
View Full Code Here

   *
   */
  public void setGenre(ModeleGenre genre) throws DataFormatException
  {
    if(genre == null)
      throw new DataFormatException("Le genre n'est pas defini.");

    _genre = genre;
  }
View Full Code Here

TOP

Related Classes of application.exceptions.DataFormatException

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.