async update(entity) {
                this.#setDAOs(entity);
                let result = new Result();
                let nmClass = entity.constructor.name;
                let msg = await this.#executeRules(entity, "Update");
                if (msg == undefined) {
                    let dao = this.#daos.get(nmClass);
                    try {
                        await dao.update(entity);
                    } catch (err) {
                        console.log(err);
                    };
                }
                else {
                    result.setMsg(msg);
                };
                return result;
            }
//Execute the validation rules and call the respective DAO of the entity, to update the datas of the entity in the DataBase
Execute the validation rules and call the respective DAO of the entity, to update the datas of the entity in the DataBase
Execute the validation rules and call the respective DAO of the entity to update the datas of the entity in the DataBase
async update(entity) {
                this.#setDAOs(entity);
                let result = new Result();
                let nmClass = entity.constructor.name;
                let msg = await this.#executeRules(entity, "Update");
                if (msg == undefined) {
                    let dao = this.#daos.get(nmClass);
                    try {
                        await dao.update(entity);
                    } catch (err) {
                        console.log(err);
                    };
                }
                else {
                    result.setMsg(msg);
                };
                return result;
            }
async update ( entity ) { this . #setDAOs ( entity ) ; let result = new Result ( ) ; let nmClass = entity . constructor . name ; let msg = await this . #executeRules ( entity , "Update" ) ; if ( msg == undefined ) { let dao = this . #daos . get ( nmClass ) ; try { await dao . update ( entity ) ; } catch ( err ) { console . log ( err ) ; } ; } else { result . setMsg ( msg ) ; } ; return result ; }
Execute the validation rules and call the respective DAO of the entity, to update the datas of the entity in the DataBase
Execute the validation rules and call the respective DAO of the entity to update the datas of the entity in the DataBase