Package systole.domain.clinicalInformation

Examples of systole.domain.clinicalInformation.Sport


    /* (non-Javadoc)
     * @see systole.view.crud.controller.ControllerEntityEdition#loadEntityFromForm()
     */
    @Override
    protected void loadEntityFromForm() {
        Sport sportToLoad = (Sport) this.curretnEntity;
        JDialogSport formToLoad = (JDialogSport) this.editForm;

        sportToLoad.setName(formToLoad.getjEdtName().getText());
        sportToLoad.setDescription(formToLoad.getjTxtDescription().getText());
        sportToLoad.setLastUpdate(Calendar.getInstance());
    }
View Full Code Here


     * @see systole.view.crud.controller.ControllerEntityEdition#loadEntityOnForm()
     */
    @Override
    protected void loadEntityOnForm() {
        JDialogSport formToLoad = (JDialogSport) this.editForm;
        Sport currentSport = (Sport) this.curretnEntity;
        formToLoad.getjEdtName().setText(currentSport.getName());
        formToLoad.getjTxtDescription().setText(currentSport.getDescription());
    }
View Full Code Here

     * @see systole.view.crud.controller.ControllerEntityEdition#valid()
     */
    @Override
    protected String valid() {
        JDialogSport formToValid = (JDialogSport) this.editForm;
        Sport sport = (Sport) this.curretnEntity;

        if ((formToValid.getjEdtName().getText() == null) || (formToValid.getjEdtName().getText().isEmpty())) {
            return "<html>Debe ingresar el nombre de la actividad física</html>";
        }
        try {
            if (this.facadeDB.getSportBroker().existSport(formToValid.getjEdtName().getText(), sport.getId())) {
                return "<html>Ya existe una actividad física con el nombre ingresado</html>";
            }

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

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

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

    public boolean uploadSports() {
        try {
            this.log.logDebug("Start to upload Sports");
            Iterator<Sport> sportsToUpload = this.facadeDB.getSportSyncBroker().getSportsToUpload().iterator();
            while (sportsToUpload.hasNext()) {
                Sport sport = sportsToUpload.next();
                SportWs sportWs = this.toRemoteEntity.generateRemoteSport(sport);
                if (sportWs != null) {
                    int remoteId = this.systoleSync.uploadSport(sportWs);
                    if (remoteId > 0) {
                        SportRemote sportRemote = new SportRemote(sport);
View Full Code Here

        if ((form.getjSpnHours().getValue() == null) || (((Integer) form.getjSpnHours().getValue()).intValue() <= 0)) {
            return "Debe ingresar la cantidad de horas";
        }
        if (!this.isEditing()) {
            try {
                Sport sport = (Sport) form.getCmbSport().getSelectedItem();
                if (this.facadeDB.getSportByPatientBroker().existSportByPatient(sport, this.patient)) {
                    return "Ya existe la actividad física para el paciente";
                }
            } catch (ExceptionDAO ex) {
                this.facadeDB.refreshSession();
View Full Code Here

        if (sportWs == null) {
            return;
        }
        FacadeDB.getInstance().startTransaction();

        Sport sport = FacadeDB.getInstance().getSportBroker().getSportByName(sportWs.getName());
        if (sport == null) {
            sport = new Sport();
            sport.setName(sportWs.getName());
            sport.setDescription(sportWs.getDescription());
            FacadeDB.getInstance().getSportBroker().insert(sport);
            SportRemote sportRemote = new SportRemote(sport);
            sportRemote.setRemoteId(sportWs.getId());
            FacadeDB.getInstance().getSportSyncBroker().saveSportRemote(sportRemote);
        } else {
View Full Code Here

     */
    private SportPatient convertToLocalPatientSport(PatientSportWs patientSportWs, Patient patient) throws ExceptionDAO {
        if (patientSportWs == null) {
            return null;
        }
        Sport sport = FacadeDB.getInstance().getSportSyncBroker().getSportByRemoteId(patientSportWs.getSportId());
        if (sport == null) {
            return null;
        }
        SportPatient sportPatient = new SportPatient();
        SportPatientId id = new SportPatientId(sport.getId(), patient.getId());
        sportPatient.setId(id);
        sportPatient.setSport(sport);
        sportPatient.setPatient(patient);
        Integer difAges = patient.getAge() - patientSportWs.getAgeAtStart();
        sportPatient.setAgeAtStartAsInteger(difAges);
View Full Code Here

TOP

Related Classes of systole.domain.clinicalInformation.Sport

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.