Example usage for org.hibernate.service.spi ServiceException ServiceException

List of usage examples for org.hibernate.service.spi ServiceException ServiceException

Introduction

In this page you can find the example usage for org.hibernate.service.spi ServiceException ServiceException.

Prototype

public ServiceException(String message) 

Source Link

Usage

From source file:cm.mycompany.school.ServiceImplement.CoursServiceImpl.java

public Cours createCours(Cours cours) throws ServiceException {
    try {/*from   www . j  a  v a 2  s.  c om*/
        //throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
        return iCoursDao.create(cours);
    } catch (DataAccessException ex) {
        Logger.getLogger(CoursServiceImpl.class.getName()).log(Level.SEVERE, null, ex);
        throw new ServiceException("erreur lors de la creation du cours");
    }
}

From source file:cm.mycompany.school.ServiceImplement.CoursServiceImpl.java

public Cours updateEnseignant(Cours cours) throws ServiceException {
    try {/*from  w w w  .  j  av a2  s. c  om*/
        //throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
        return iCoursDao.update(cours);
    } catch (DataAccessException ex) {
        Logger.getLogger(CoursServiceImpl.class.getName()).log(Level.SEVERE, null, ex);
        throw new ServiceException("erreur lors de la creation de mise a jour du cours");
    }
}

From source file:cm.mycompany.school.ServiceImplement.CoursServiceImpl.java

public void deleteCours(Cours cours) throws ServiceException {
    try {//from   w ww  .  j av a 2  s .com
        // throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
        iCoursDao.delete(cours);
    } catch (DataAccessException ex) {
        Logger.getLogger(CoursServiceImpl.class.getName()).log(Level.SEVERE, null, ex);
        throw new ServiceException("erreur lors de la supression du cours");
    }
}

From source file:cm.mycompany.school.ServiceImplement.CoursServiceImpl.java

public Cours findCoursById(Long id) throws ServiceException {
    try {/*from w w  w .  j  a  v  a 2s  .  co  m*/
        //throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
        return iCoursDao.findById(id);
    } catch (DataAccessException ex) {
        Logger.getLogger(CoursServiceImpl.class.getName()).log(Level.SEVERE, null, ex);
        throw new ServiceException("erreur lors de la recherche par id du cours");
    }
}

From source file:cm.mycompany.school.ServiceImplement.CoursServiceImpl.java

public List<Cours> findAllCours() throws ServiceException {
    try {//from   w  w  w .j  av a 2s.com
        // throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
        return iCoursDao.findAll();
    } catch (DataAccessException ex) {
        Logger.getLogger(CoursServiceImpl.class.getName()).log(Level.SEVERE, null, ex);
        throw new ServiceException("erreur lors de la findAll");
    }
}

From source file:cm.mycompany.school.ServiceImplement.EnseignantServiceImpl.java

public Enseignant createEnseignant(Enseignant enseignant) throws ServiceException {
    try {/*from w  ww .j  av a  2s. co m*/
        // throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
        return iEnseignantDao.create(enseignant);
    } catch (DataAccessException ex) {
        Logger.getLogger(EnseignantServiceImpl.class.getName()).log(Level.SEVERE, null, ex);
        throw new ServiceException("erreur lors de la creation de l'enseignant");
    }
}

From source file:cm.mycompany.school.ServiceImplement.EnseignantServiceImpl.java

public Enseignant updateEnseignant(Enseignant enseignant) throws ServiceException {
    try {/*w w  w . ja v  a  2s . c o  m*/
        //throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
        return iEnseignantDao.update(enseignant);
    } catch (DataAccessException ex) {
        Logger.getLogger(EnseignantServiceImpl.class.getName()).log(Level.SEVERE, null, ex);
        throw new ServiceException("erreur lors de la mise a jour de l'enseignant");
    }
}

From source file:cm.mycompany.school.ServiceImplement.EnseignantServiceImpl.java

public Enseignant findEnseignantById(Long id) throws ServiceException {
    try {/*w  w  w . j  a  va  2  s.  c  om*/
        //throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
        return iEnseignantDao.findById(id);
    } catch (DataAccessException ex) {
        Logger.getLogger(EnseignantServiceImpl.class.getName()).log(Level.SEVERE, null, ex);
        throw new ServiceException("erreur lors de la recherche par id");
    }
}

From source file:cm.mycompany.school.ServiceImplement.EnseignantServiceImpl.java

public List<Enseignant> findAllEnseignant() throws ServiceException {
    try {//from  w w  w. j a  v  a  2s.  com
        //throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
        return iEnseignantDao.findAll();
    } catch (DataAccessException ex) {
        Logger.getLogger(EnseignantServiceImpl.class.getName()).log(Level.SEVERE, null, ex);
        throw new ServiceException("erreur lors du findAll");
    }
}

From source file:com.dresen.dresen.ServiceImplement.AffectationServiceImpl.java

public Affectation createAffectation(Affectation affectation) throws ServiceException {
    try {/* w w  w .  ja  v a 2 s  . c  om*/
        //throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
        return iAffectationDao.create(affectation);
    } catch (DataAccessException ex) {
        Logger.getLogger(AffectationServiceImpl.class.getName()).log(Level.SEVERE, null, ex);
        throw new ServiceException("impossible de crer l'affectation");
    }
}