Package systole.exceptions

Examples of systole.exceptions.ExceptionDAO


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


            List<Patient> list = query.list();
            this.logger.logDebug("getting patients to upload");
            return list;
        } catch (HibernateException e) {
            this.logger.logError("error on get patients to upload, msg: " + e.getMessage());
            throw new ExceptionDAO("No se pudieron obtener los pacientes", e.fillInStackTrace());
        }
    }
View Full Code Here

            PatientRemote patientRemote = (PatientRemote) criteria.uniqueResult();
            this.logger.logDebug("get successfully");
            return (patientRemote != null ? patientRemote.getRemoteId() : -1);
        } catch (HibernateException e) {
            this.logger.logError("error on get last remote patient synchronized, msg: " + e.getMessage());
            throw new ExceptionDAO("No se pudieron obtener los pacientes", e.fillInStackTrace());
        }
    }
View Full Code Here

            PatientRemote sportRemote = (PatientRemote) criteria.uniqueResult();
            this.logger.logDebug("get successfully");
            return sportRemote;
        } catch (HibernateException e) {
            this.logger.logError("error on get remote patient by patient, msg: " + e.getMessage());
            throw new ExceptionDAO("No se pudieron obtener los pacientes", e.fillInStackTrace());
        }
    }
View Full Code Here

            PatientRemote patientRemote = (PatientRemote) criteria.uniqueResult();
            this.logger.logDebug("get successfully");
            return (patientRemote != null ? patientRemote.getPatient() : null);
        } catch (HibernateException e) {
            this.logger.logError("error on get patient by remote id, msg: " + e.getMessage());
            throw new ExceptionDAO("No se pudieron obtener los pacientes", e.fillInStackTrace());
        }
    }
View Full Code Here

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

            List<MedicinePatient> list = currentSession.createCriteria(MedicinePatient.class).add(Restrictions.and(Restrictions.eq("patient", patient), Restrictions.eq("medicine", medicine))).list();
            this.logger.logDebug("exist medicine by patient successfully");
            return !list.isEmpty();
        } catch (HibernateException e) {
            this.logger.logError("error on exist medicine by patient, msg: " + e.getMessage());
            throw new ExceptionDAO("No se pudo verificar si ya existe el medicamento para el paciente", e.fillInStackTrace());
        }
    }
View Full Code Here

            List<MedicinePatient> list = currentSession.createCriteria(MedicinePatient.class).add(Restrictions.eq("patient", patient)).list();
            this.logger.logDebug("get patient medicine");
            return list;
        } catch (HibernateException e) {
            this.logger.logError("error on get all patient medicine, msg: " + e.getMessage());
            throw new ExceptionDAO("No se pudieron obtener los medicamentos del paciente", e.fillInStackTrace());
        }
    }
View Full Code Here

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

            Session currentSession = FacadeDB.getInstance().getCurrentSession();
            currentSession.update(medicinePatient);
            this.logger.logDebug("updated patient medicine");
        } catch (HibernateException e) {
            this.logger.logError("error on update patient medicine, msg: " + e.getMessage());
            throw new ExceptionDAO(ErrorMessages.CHANGES_NOT_SAVE, 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.