IBrolDao.cs
Description du code
IBrolDao.cs est un fichier du projet BiblioBrol.Ce fichier est situé dans /var/www/bin/sniplets/bibliobrol/src/.
Projet BiblioBrol :
Gestion de media en CSharp.
Pour plus d'infos, vous pouvez consulter la brève analyse.
Code source ou contenu du fichier
Code c# (IBrolDao.cs) (145 lignes)
using System; using System.Collections.Generic; using System.Text; using System.Data; using be.gaudry.observer; namespace be.gaudry.bibliobrol.model.dao { public interface IBrolDao : IObservable { /// <summary> /// Load all roles /// </summary> /// <returns></returns> List<ActorRole> loadRoles(); /// <summary> /// Load roles for a person /// </summary> /// <param name="person"></param> /// <returns></returns> List<ActorRole> loadRoles(Person person); /// <summary> /// Load the default role for a person /// </summary> /// <param name="person"></param> /// <returns></returns> ActorRole loadDefaultRole(Person person); /// <summary> /// set the default role for a person /// </summary> /// <param name="person"></param> /// <param name="role"></param> void setDefaultRole(Person person, ActorRole role); /// <summary> /// Load person's roles for the selected type /// </summary> /// <param name="brolType"></param> /// <returns>List of roles strings</returns> List<ActorRole> loadRoles(BrolType brolType); /// <summary> /// get a roles with the id /// </summary> /// <param name="roleId">(int) id of the requested role</param> /// <returns>l(ActorRole) requested role</returns> ActorRole loadRole(int roleId); /// <summary> /// get a roles with the name /// </summary> /// <param name="roleName">(string) name of the requested role</param> /// <returns>(ActorRole) requested role</returns> ActorRole loadRole(string roleName); /// <summary> /// get a list of roles with the same name /// </summary> /// <param name="roleName">(string) name of the requested roles</param> /// <returns>(List of ActorRole) requested roles</returns> List<ActorRole> loadRoles(string roleName); /// <summary> /// Insert a new role. Don't check if the role name exists in the db. You must do it before. /// </summary> /// <param name="actor">(ActorRole) role to add</param> /// <returns></returns> bool insertRole(ActorRole role); /// <summary> /// Insert a brol (i.e. a film) into the Access database /// </summary> /// <param name="brol">(Brol) brol to insert</param> /// <returns>(int) new brol id</returns> int insertBrol(Brol brol); int insertBrols(List<Brol> brols, bool insertMediabrol); /// <summary> /// Load a brol with the selected id from the Access database. /// If this brol shoud be modified, editing bool arg is true /// to avoid concurent modifications (nobody else can save this brol). /// </summary> /// <param name="id">(int) Id of the selected bool</param> /// <param name="editing">(bool) Shoud be modified or not</param> /// <returns>Selected bool, or a new bool if _ found</returns> Brol loadBrol(int id, bool editing); /// <summary> /// Load all brols for a type from the persistant layer. /// i.e. films, books, etc. /// typeId 0 allow to load all types /// </summary> /// <returns>List of Brols</returns> List<Brol> loadBrols(int typeId); /// <summary> /// Load all brols for a serie from the persistant layer. /// </summary> /// <param name="serie"></param> /// <returns>List of Brols</returns> List<Brol> loadBrols(Serie serie); /// <summary> /// Load all available categories for a type from the Access database. /// i.e. for a film : Science-fiction, Horror, etc. /// </summary> /// <param name="typeId">(int) selected type (film, book, etc.) negative value to load all</param> /// <returns>List of BrolCategories</returns> List<BrolCategory> loadCategories(int typeId); /// <summary> /// Load brols value objects (only selected fields) for a type from the Access database. /// </summary> /// <param name="fields">List of fields to load for the brols</param> /// <param name="typeId"> /// (int) selected type (film, book, etc.) /// 0 allow to load all types /// </param> /// <returns>DataTable with selected fields for Brols</returns> DataTable loadDataTableVos(List<DAOUtils.BROL_FIELD> fields, int typeId); /// <summary> /// Store new values for a brol. /// Verify if some categories or actors had been deleted, and delete it from the persistant layer. /// Add new categories or actors if exists. /// Update existing categories or actors. /// </summary> /// <param name="person">(Brol) brol with new values to store</param> /// <returns>(bool) true if update is done</returns> bool updateBrol(Brol brol); /// <summary> /// Lock brol to avoid concurent modifications. /// </summary> /// <param name="id">(int) brol's id to lock</param> /// <returns>(bool) false if a problem occurs (todo : if already locked)</returns> bool lockBrol(int id); /// <summary> /// unlock brol to allow modifications. /// </summary> /// <param name="id">(int) brol's id to unlock</param> void unlockBrol(int id); /// <summary> /// Delete a brol from the Access database, /// and delete all associated actors and categories /// </summary> /// <param name="p">(Brol) brol to delete</param> /// <returns>(bool) true if deleted</returns> bool deleteBrol(Brol brol); /// <summary> /// Insert brols from a batch file (batch filePath is stored into application properties file) /// </summary> /// <param name="insertMediabrol">(bool) True if a mediabrol must be inserted for each brol</param> /// <returns>(int) Number of inserted brols</returns> int executeBatch(bool insertMediabrol); } }
Structure et Fichiers du projet
Afficher/masquer...Icône | Nom | Taille | Modification |
Icône | Nom | Taille | Modification |
| _ | Répertoire parent | 0 octets | 1731753134 16/11/2024 11:32:14 |
| _ | msaccess | 0 octets | 1541007197 31/10/2018 18:33:17 |
| _ | config | 0 octets | 1541007197 31/10/2018 18:33:17 |
| _ | mysql | 0 octets | 1541007198 31/10/2018 18:33:18 |
Utilisation de l'explorateur de code
- Navigation :
- Un clic sur une icône de répertoire ouvre ce répertoire pour en afficher les fichiers.
- Lorsque le répertoire en cours ne contient pas de sous-répertoires il est possible de remonter vers le répertoire parent.
- La structure de répertoires en treetable (tableau en forme d'arborescence) n'est plus possibledans cette version.
- Un clic sur une icône de fichier ouvre ce fichier pour en afficher le code avec la coloration syntaxique adaptée en fonction du langage principal utilisé dans le fichier.
- Affichage :
- Il est possible de trier les répertoires ou les fichiers selon certains critères (nom, taille, date).
- Actions :
- Les actions possible sur les fichiers dépendent de vos droits d'utilisateur sur le site. Veuillez activer le mode utilisateur pour activer les actions.
English translation
You have asked to visit this site in English. For now, only the interface is translated, but not all the content yet.If you want to help me in translations, your contribution is welcome. All you need to do is register on the site, and send me a message asking me to add you to the group of translators, which will give you the opportunity to translate the pages you want. A link at the bottom of each translated page indicates that you are the translator, and has a link to your profile.
Thank you in advance.
Document created the 16/10/2009, last modified the 26/10/2018
Source of the printed document:https://www.gaudry.be/en/cs-bibliobrol-source-rf-model/dao//IBrolDao.cs.html
The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.