Package systole.domain.clinicalInformation

Examples of systole.domain.clinicalInformation.SportPatient


        Vector<String> result = new Vector<String>();

        int amount = (maxAmount > 0 ? maxAmount : this.getSports().size());

        while ((it.hasNext()) && (amount > 0)) {
            SportPatient sport = it.next();
            result.add(sport.toString());
            amount--;
        }
        return result;
    }
View Full Code Here


    /* (non-Javadoc)
     * @see systole.view.crud.controller.ControllerEntityEdition#loadEntityFromForm()
     */
    @Override
    protected void loadEntityFromForm() {
        SportPatient sportPatient = (SportPatient) this.curretnEntity;
        JDialogSportByPatient form = (JDialogSportByPatient) this.editForm;
        sportPatient.setSport((Sport) form.getCmbSport().getSelectedItem());
        sportPatient.setHoursXWeek((Integer) form.getjSpnHours().getValue());
        Integer age = (Integer) form.getjSpnYears().getValue();
        sportPatient.setAgeAtStartAsInteger(age);
    }
View Full Code Here

    /* (non-Javadoc)
     * @see systole.view.crud.controller.ControllerEntityEdition#loadEntityOnForm()
     */
    @Override
    protected void loadEntityOnForm() {
        SportPatient sportPatient = (SportPatient) this.curretnEntity;
        JDialogSportByPatient form = (JDialogSportByPatient) this.editForm;
        form.getCmbSport().setSelectedItem(sportPatient.getSport());
        form.getjSpnHours().setValue((sportPatient.getHoursXWeek() == null) ? 0 : sportPatient.getHoursXWeek());     
        form.getjSpnYears().setValue(sportPatient.getAgeAtStartAsInteger());
    }
View Full Code Here

     * @see systole.view.crud.controller.ControllerEntityEdition#save()
     */
    @Override
    protected void save() {
        if (!this.isEditing()) {
            SportPatient sportPatient = (SportPatient) this.curretnEntity;
            sportPatient.setId(new SportPatientId(sportPatient.getSport().getId(), sportPatient.getPatient().getId()));
            this.patient.getSportsPatient().add(sportPatient);
        }
    }
View Full Code Here

    protected void loadIconOnForm() {
    }

    @Override
    protected Object createEntity() throws ExceptionDAO {
        return new SportPatient(this.patient);
    }
View Full Code Here

        }

        if (patientWs.getSports() != null) {
            Iterator<PatientSportWs> sports = patientWs.getSports().iterator();
            while (sports.hasNext()) {
                SportPatient sportPatient = this.convertToLocalPatientSport(sports.next(), patient);
                if (sportPatient != null) {
                    patient.getSportsPatient().add(sportPatient);
                }
            }
        }
View Full Code Here

        }
        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);
        sportPatient.setHoursXWeek(patientSportWs.getHoursXWeek());
        return sportPatient;

    }
View Full Code Here

TOP

Related Classes of systole.domain.clinicalInformation.SportPatient

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.