Package systole.exceptions

Examples of systole.exceptions.ExceptionDAO


            AverageByDecadeMale male = (AverageByDecadeMale) currentSession.createCriteria(AverageByDecadeMale.class).add(Restrictions.eq("decade", decade)).setMaxResults(1).uniqueResult();
            this.logger.logDebug("get male average successfully");
            return male;
        } catch (HibernateException e) {
            this.logger.logError("error on get male average, msg: " + e.getMessage());
            throw new ExceptionDAO("No se pudo obtener el promedio", e.fillInStackTrace());
        }
    }
View Full Code Here


            Query query = currentSession.createQuery("delete from AverageByDecade");
            query.executeUpdate();
            this.logger.logDebug("Delete successfully");
        } catch (HibernateException e) {
            this.logger.logError("error on delete averages, msg: " + e.getMessage());
            throw new ExceptionDAO("No se pudieron eliminar los promedios", e.fillInStackTrace());
        }
    }
View Full Code Here

            Session currentSession = FacadeDB.getInstance().getCurrentSession();
            currentSession.save(averageByDecade);
            this.logger.logDebug("Save successfully");
        } catch (HibernateException e) {
            this.logger.logError("error on save average, msg: " + e.getMessage());
            throw new ExceptionDAO("No se pudo guardar los cambios", e.fillInStackTrace());
        }
    }
View Full Code Here

            List<Sport> list = currentSession.createQuery("from Sport s order by upper(s.name)").list();
            this.logger.logDebug("getting sports successfully");
            return list;
        } catch (HibernateException e) {
            this.logger.logError("error on get all sports, msg: " + e.getMessage());
            throw new ExceptionDAO("No se pudieron obtener las actividades físicas", e.fillInStackTrace());
        }
    }
View Full Code Here

            Session currentSession = FacadeDB.getInstance().getCurrentSession();
            currentSession.save(sport);
            this.logger.logDebug("save successfully");
        } catch (HibernateException e) {
            this.logger.logError("error on save sport, msg: " + e.getMessage());
            throw new ExceptionDAO(ErrorMessages.CHANGES_NOT_SAVE, e.fillInStackTrace());
        }
    }
View Full Code Here

            Session currentSession = FacadeDB.getInstance().getCurrentSession();
            currentSession.update(sport);
            this.logger.logDebug("update successfully");
        } catch (HibernateException e) {
            this.logger.logError("error on update sport, msg: " + e.getMessage());
            throw new ExceptionDAO(ErrorMessages.CHANGES_NOT_SAVE, e.fillInStackTrace());
        }
    }
View Full Code Here

            List list = criteria.list();
            this.logger.logDebug("exist Sport successfully");
            return !list.isEmpty();
        } catch (HibernateException e) {
            this.logger.logError("error on exist Sport, msg: " + e.getMessage());
            throw new ExceptionDAO("No se pudo verificar si ya existe la actividad física", e.fillInStackTrace());
        }
    }
View Full Code Here

            Criteria criteria = currentSession.createCriteria(Sport.class).
                    add(Restrictions.eq("name", name)).setMaxResults(1);
            return (Sport) criteria.uniqueResult();
        } catch (HibernateException e) {
            this.logger.logError("error on get Sport by name, msg: " + e.getMessage());
            throw new ExceptionDAO("No se pudo obtener la actividad física", e.fillInStackTrace());
        }
    }
View Full Code Here

            List<Surgery> list = currentSession.createQuery("from Surgery s order by upper(s.name)").list();
            this.logger.logDebug("getting all surgeries successfully");
            return list;
        } catch (HibernateException e) {
            this.logger.logError("error on get all surgeries, msg: " + e.getMessage());
            throw new ExceptionDAO("No se pudieron obtener las Cirugías", e.fillInStackTrace());
        }
    }
View Full Code Here

            Surgery instance = (Surgery) currentSession.get(Surgery.class, id);
            this.logger.logDebug("get surgery successfully");
            return instance;
        } catch (HibernateException e) {
            this.logger.logError("error on get surgery, msg: " + e.getMessage());
            throw new ExceptionDAO("No se pudo obtener la Cirugía", e.fillInStackTrace());
        }
    }
View Full Code Here

TOP

Related Classes of systole.exceptions.ExceptionDAO

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.