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