Package systole.synchronization.remote.entities

Examples of systole.synchronization.remote.entities.AnalysisRemote


         try {
            this.logger.logDebug("getting analysis by remote id");
            Session currentSession = FacadeDB.getInstance().getCurrentSession();
            Criteria criteria = currentSession.createCriteria(
                    AnalysisRemote.class).add(Restrictions.eq("remoteId", remoteId)).setMaxResults(1);
            AnalysisRemote analysisRemote = (AnalysisRemote) criteria.uniqueResult();
            this.logger.logDebug("get successfully");
            return (analysisRemote != null ? analysisRemote.getAnalysis() : null);
        } catch (HibernateException e) {
            this.logger.logError("error on get analysis by remote id, msg: " + e.getMessage());
            throw new ExceptionDAO("No se pudieron obtener los análisis", e.fillInStackTrace());
        }
    }
View Full Code Here


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

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

                Analysis analysis = familyToUpload.next();
                AnalysisWs analysisWs = this.toRemoteEntity.generateRemoteAnalysis(analysis);
                if (analysisWs != null) {
                    int remoteId = this.systoleSync.uploadAnalysis(analysisWs);
                    if (remoteId > 0) {
                        AnalysisRemote analysisRemote = new AnalysisRemote(analysis);
                        analysisRemote.setRemoteId(remoteId);
                        FacadeDB.getInstance().startTransaction();
                        FacadeDB.getInstance().getAnalysisSyncBroker().saveAnalysisRemote(analysisRemote);
                        FacadeDB.getInstance().commitTransaction();
                    }
                }
View Full Code Here

TOP

Related Classes of systole.synchronization.remote.entities.AnalysisRemote

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.