Examples of MedicRemote


Examples of systole.synchronization.remote.entities.MedicRemote

        try {
            this.logger.logDebug("getting medic remote by local medic");
            Session currentSession = FacadeDB.getInstance().getCurrentSession();
            Criteria criteria = currentSession.createCriteria(
                    MedicRemote.class).add(Restrictions.eq("medic", medic)).setMaxResults(1);
            MedicRemote medicRemote = (MedicRemote) criteria.uniqueResult();
            this.logger.logDebug("get successfully");
            return medicRemote;
        } catch (HibernateException e) {
            this.logger.logError("error on get remote medic by medic, msg: " + e.getMessage());
            throw new ExceptionDAO("No se pudieron obtener los médicos", e.fillInStackTrace());
View Full Code Here

Examples of systole.synchronization.remote.entities.MedicRemote

       try {
            this.logger.logDebug("getting last remote medic sync");
            Session currentSession = FacadeDB.getInstance().getCurrentSession();
            Criteria criteria = currentSession.createCriteria(
                    MedicRemote.class).addOrder(Order.desc("remoteId")).setMaxResults(1);
            MedicRemote medicRemote = (MedicRemote) criteria.uniqueResult();
            this.logger.logDebug("get successfully");
            return (medicRemote != null ? medicRemote.getRemoteId() : -1);
        } catch (HibernateException e) {
            this.logger.logError("error on get last remote medic synchronized, msg: " + e.getMessage());
            throw new ExceptionDAO("No se pudieron obtener los médicos", e.fillInStackTrace());
        }
    }
View Full Code Here

Examples of systole.synchronization.remote.entities.MedicRemote

        try {
            this.logger.logDebug("getting medic to upload");
            Session currentSession = FacadeDB.getInstance().getCurrentSession();
            Criteria criteria = currentSession.createCriteria(
                    MedicRemote.class).add(Restrictions.eq("remoteId", remoteId)).setMaxResults(1);
            MedicRemote medicRemote = (MedicRemote) criteria.uniqueResult();
            this.logger.logDebug("get successfully");
            return (medicRemote != null ? medicRemote.getMedic() : null);
        } catch (HibernateException e) {
            this.logger.logError("error on get medic by remote id, msg: " + e.getMessage());
            throw new ExceptionDAO("No se pudieron obtener los médicos", e.fillInStackTrace());
        }
    }
View Full Code Here

Examples of systole.synchronization.remote.entities.MedicRemote

                Medic medic = medicsToUpload.next();
                MedicWs medicWs = this.toRemoteEntity.generateRemoteMedic(medic);
                if (medicWs != null) {
                    int remoteId = this.systoleSync.uploadMedic(medicWs);
                    if (remoteId > 0) {
                        MedicRemote medicRemote = new MedicRemote(medic);
                        medicRemote.setRemoteId(remoteId);
                        FacadeDB.getInstance().startTransaction();
                        FacadeDB.getInstance().getMedicSyncBroker().saveMedicRemote(medicRemote);
                        FacadeDB.getInstance().commitTransaction();
                    }
                }
View Full Code Here

Examples of systole.synchronization.remote.entities.MedicRemote

            return null;
        }
        analysisWs.setPatientId(patientRemote.getRemoteId());

        if (analysis.getMedic() != null) {
            MedicRemote medicRemote = FacadeDB.getInstance().getMedicSyncBroker().getMedicRemoteByMedic(analysis.getMedic());
            analysisWs.setMedicId(medicRemote.getRemoteId());
        }

        SignalFrequencyRemote frequencyRemote = FacadeDB.getInstance().getSignalFrequencySyncBroker().getFrequencyRemoteBySignalFrequency(analysis.getSignalFrequency());

        if (frequencyRemote == null) {
View Full Code Here

Examples of systole.synchronization.remote.entities.MedicRemote

        medic.setCity(medicWs.getCity());
        medic.setEmail(medicWs.getEmail());
        medic.setTelephone(medicWs.getTelephone());
        medic.setIdentityCard(this.convertToLocalIdentityCard(medicWs.getIdentityCard()));
        FacadeDB.getInstance().getMedicBroker().insert(medic);
        MedicRemote medicRemote = new MedicRemote(medic);
        medicRemote.setRemoteId(medicWs.getId());
        FacadeDB.getInstance().getMedicSyncBroker().saveMedicRemote(medicRemote);
        FacadeDB.getInstance().commitTransaction();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.