Package systole.domain.signals

Examples of systole.domain.signals.SignalFrequency


    }

    @Override
    protected void loadEntityOnForm() {
        JDialogSignalFrequency formToLoad = (JDialogSignalFrequency) this.editForm;
        SignalFrequency signalFrequencyToLoad = (SignalFrequency) this.curretnEntity;
        formToLoad.getjEdtFrequency().setText(signalFrequencyToLoad.getFrequency().toString());
        formToLoad.getjEdtDescription().setText(signalFrequencyToLoad.getDescription());
    }
View Full Code Here


        formToLoad.getjEdtDescription().setText(signalFrequencyToLoad.getDescription());
    }

    @Override
    protected void loadEntityFromForm() {
        SignalFrequency signalFrequencyToLoad = (SignalFrequency) this.curretnEntity;
        JDialogSignalFrequency formToLoad = (JDialogSignalFrequency) this.editForm;
        signalFrequencyToLoad.setDescription(formToLoad.getjEdtDescription().getText());
        String value = formToLoad.getjEdtFrequency().getText();
        value = value.replace(",", ".");
        signalFrequencyToLoad.setFrequency(new BigDecimal(value));
        signalFrequencyToLoad.setLastUpdate(Calendar.getInstance());
    }
View Full Code Here

    }

    @Override
    protected String valid() {
        JDialogSignalFrequency formToValid = (JDialogSignalFrequency) this.editForm;
        SignalFrequency signalFrequency = (SignalFrequency) this.curretnEntity;

        if ((formToValid.getjEdtDescription().getText() == null) || (formToValid.getjEdtDescription().getText().isEmpty())) {
            return "Debe ingresar la descripción";
        }

        try {
            if (this.facadeDB.getSignalFrequencyBroker().existSignalFrequency(formToValid.getjEdtDescription().getText(), signalFrequency.getId())) {
                return "Ya existe un período de muestreo con el nombre ingresado";
            }

        } catch (ExceptionDAO ex) {
            this.facadeDB.refreshSession();
View Full Code Here

        this.editForm.setIconImage(ImageUtils.buildImage("resources/icons/medic/frequency16.png"));
    }

    @Override
    protected Object createEntity() throws ExceptionDAO {
        return new SignalFrequency();
    }
View Full Code Here

    public boolean uploadSignalFrequency() {
        try {
            this.log.logDebug("Start to upload freguencies");
            Iterator<SignalFrequency> signalFrequenciesToUpload = this.facadeDB.getSignalFrequencySyncBroker().getSignalFrequenciesToUpload().iterator();
            while (signalFrequenciesToUpload.hasNext()) {
                SignalFrequency frequency = signalFrequenciesToUpload.next();
                SignalFrequencyWs signalFrequencyWs = this.toRemoteEntity.generateRemoteSignalFrequency(frequency);
                if (signalFrequencyWs != null) {
                    int remoteId = this.systoleSync.uploadSignalFrequency(signalFrequencyWs);
                    if (remoteId > 0) {
                        SignalFrequencyRemote signalFrequencyRemote = new SignalFrequencyRemote(frequency);
View Full Code Here

    public SignalFrequency getSignalFrequencyById(Integer id)
            throws ExceptionDAO {
        try {
            this.logger.logDebug("getting frequency ");
            Session currentSession = FacadeDB.getInstance().getCurrentSession();
            SignalFrequency instance = (SignalFrequency) currentSession.get(SignalFrequency.class, id);
            this.logger.logDebug("get frequency successfully");
            return instance;
        } catch (HibernateException e) {
            this.logger.logError("error on get frequency, msg: "
                    + e.getMessage());
View Full Code Here

    public void saveSignalFrequency(SignalFrequencyWs signalFrequencyWs) throws ExceptionDAO {
        if (signalFrequencyWs == null) {
            return;
        }
        FacadeDB.getInstance().startTransaction();
        SignalFrequency frequency = FacadeDB.getInstance().getSignalFrequencyBroker().getSignalFrequencyByName(signalFrequencyWs.getName());
        if (frequency == null) {
            frequency = new SignalFrequency();
            frequency.setFrequency(new BigDecimal(signalFrequencyWs.getFrequency()));
            frequency.setDescription(signalFrequencyWs.getName());
            FacadeDB.getInstance().getSignalFrequencyBroker().insert(frequency);
            SignalFrequencyRemote frequencyRemote = new SignalFrequencyRemote(frequency);
            frequencyRemote.setRemoteId(signalFrequencyWs.getId());
            FacadeDB.getInstance().getSignalFrequencySyncBroker().saveSignalFrequencyRemote(frequencyRemote);
        } else {
View Full Code Here

TOP

Related Classes of systole.domain.signals.SignalFrequency

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.