Package systole.domain.persons.profession

Examples of systole.domain.persons.profession.Profession


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

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


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

     * @see systole.view.crud.controller.ControllerEntityEdition#valid()
     */
    @Override
    protected String valid() {
        JDialogProfession formToValidate = (JDialogProfession) this.editForm;
        Profession profession = (Profession) this.curretnEntity;

        if ((formToValidate.getjEdtName().getText() == null) || (formToValidate.getjEdtName().getText().isEmpty())) {
            return "Debe ingresar el nombre de la Profesión";
        }

        try {
            if (this.facadeDB.getProfessionBroker().existProfession(formToValidate.getjEdtName().getText(), profession.getId())) {
                return "Ya existe una profesión con el nombre ingresado";
            }
        } catch (ExceptionDAO ex) {
            this.facadeDB.refreshSession();
            return ex.getMessage();
View Full Code Here

       this.editForm.setIconImage(ImageUtils.buildImage("resources/icons/professions/diploma16.png"));
    }

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

    public boolean uploadProfessions() {
        try {
            this.log.logDebug("Start to upload professions");
            Iterator<Profession> professionsToUpload = this.facadeDB.getProfessionSyncBroker().getProfessionsToUpload().iterator();
            while (professionsToUpload.hasNext()) {
                Profession profession = professionsToUpload.next();
                ProfessionWs professionWs = this.toRemoteEntity.generateRemoteProfessionRemote(profession);
                if (professionWs != null) {
                    int remoteId = this.systoleSync.uploadProfession(professionWs);
                    if (remoteId > 0) {
                        ProfessionRemote professionRemote = new ProfessionRemote(profession);
View Full Code Here

    public void saveProfession(ProfessionWs professionWs) throws ExceptionDAO {
        if (professionWs == null) {
            return;
        }
        FacadeDB.getInstance().startTransaction();
        Profession profession = FacadeDB.getInstance().getProfessionBroker().getProfessionByName(professionWs.getName());
        if (profession == null) {
            profession = new Profession();
            profession.setName(professionWs.getName());
            profession.setDescription(professionWs.getDescription());
            FacadeDB.getInstance().getProfessionBroker().insert(profession);
            ProfessionRemote professionRemote = new ProfessionRemote(profession);
            professionRemote.setRemoteId(professionWs.getId());
            FacadeDB.getInstance().getProfessionSyncBroker().saveProfessionRemote(professionRemote);
        } else {
View Full Code Here

TOP

Related Classes of systole.domain.persons.profession.Profession

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.