IMediaBrolDao.cs
Description du code
IMediaBrolDao.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# (IMediaBrolDao.cs) (204 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 IMediaBrolDao : IObservable { #region mediabrol /// <summary> /// Insert a mediabrol into the persistant layer /// </summary> /// <param name="brol">(MediaBrol) mediabrol to insert</param> /// <returns>(int) new mediabrol id</returns> int insertMediaBrol(MediaBrol mediabrol); /// <summary> /// Load a mediabrol with the selected id from the persistant layer. /// If this mediabrol shoud be modified, editing bool arg is true /// to avoid concurent modifications (nobody else can save this mediabrol). /// </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> MediaBrol loadMediaBrol(int id, bool editing); /// <summary> /// Load all mediabrols for a brol from the persistant layer. /// </summary> /// <param name="brol"></param> /// <param name="fields">list of fields to load</param> /// <returns>(DataTable) table with selected columns</returns> DataTable loadMediaBrols(Brol brol, List<DAOUtils.MEDIABROL_FIELD> fields); /// <summary> /// Load all available medias for a type from the persistant layer. /// i.e. for a film : DVD, VHS, CD, etc. /// </summary> /// <param name="typeId">(int) selected type (film, book, etc.)</param> /// <returns>List of Qualities</returns> List<Media> loadMedias(int typeId); /// <summary> /// Load all available qualities for a mediabrol from the persistant layer. /// i.e. for a film : sound(DTS), sound(7.1) codec(VOB), etc. /// </summary> /// <param name="typeId">(int) selected mediabrol</param> /// <returns>List of Qualities</returns> List<Quality> loadQualities(int itemBiblioId); /// <summary> /// Load all available qualities for a type from the persistant layer. /// i.e. for a film : sound(DTS), sound(7.1) codec(VOB), etc. /// </summary> /// <param name="typeId">(BrolType) selected type (film, book, etc.)</param> /// <returns>List of Qualities</returns> List<Quality> loadQualities(BrolType brolType); /// <summary> /// Load brols value objects (only selected fields) for a type from the persistant layer. /// </summary> /// <param name="fields">List of fields to load for the mediabrols</param> /// <param name="typeId"> /// (int) selected type (film, book, etc.) /// 0 allow to load all types /// </param> /// <returns>DataTable with selected fields for mediabrols</returns> DataTable loadDataTableVos(List<DAOUtils.MEDIABROL_FIELD> fields, int typeId); /// <summary> /// Load brols value objects (only selected fields) for a type from the persistant layer. /// </summary> /// <param name="fields">List of fields to load for the mediabrols</param> /// <param name="typeId"> /// (int) selected type (film, book, etc.) /// 0 allow to load all types /// </param> /// <param name="categories">List of categories to match</param> /// <returns>DataTable with selected fields for mediabrols</returns> DataTable loadDataTableVos(List<DAOUtils.MEDIABROL_FIELD> fields, int typeId, List<BrolCategory> categories); /// <summary> /// Load brols value objects (only selected fields) for a type from the persistant layer. /// </summary> /// <param name="fields">List of fields to load for the mediabrols</param> /// <param name="typeId"> /// (int) selected type (film, book, etc.) /// 0 allow to load all types /// </param> /// <param name="categories">List of categories to match</param> /// <param name="mediaId">media to match</param> /// <returns>DataTable with selected fields for mediabrols</returns> DataTable loadDataTableVos(List<DAOUtils.MEDIABROL_FIELD> fields, int typeId, List<BrolCategory> categories, int mediaId); /// <summary> /// Load brols value objects (only selected fields) for a type from the persistant layer. /// </summary> /// <param name="fields">List of fields to load for the mediabrols</param> /// <param name="typeId"> /// (int) selected type (film, book, etc.) /// 0 allow to load all types /// </param> /// <param name="categories">List of categories to match</param> /// <param name="mediaId">media to match</param> /// <param name="title">(String) string to find into brol's title</param> /// <returns>DataTable with selected fields for mediabrols</returns> DataTable loadDataTableVos(List<DAOUtils.MEDIABROL_FIELD> fields, int typeId, List<BrolCategory> categories, int mediaId, string title); /// <summary> /// Store new values for a mediabrol. /// </summary> /// <param name="mediaBrol">(MediaBrol) mediaBrol with new values to store</param> /// <returns>(bool) true if update is done</returns> bool updateMediaBrol(MediaBrol mediaBrol); /// <summary> /// Lock mediaBrol to avoid concurent modifications. /// </summary> /// <param name="id">(int) mediaBrol's id to lock</param> /// <returns>(bool) false if a problem occurs (todo : if already locked)</returns> bool lockMediaBrol(int id); /// <summary> /// unlock mediaBrol to allow modifications. /// </summary> /// <param name="id">(int) mediaBrol's id to unlock</param> void unlockMediaBrol(int id); /// <summary> /// If no currents borrows, /// delete a mediaBrol from the persistant layer all associated borrows, /// and all qualities relations /// </summary> /// <param name="mediaBrol">(Brol) mediaBrol to delete</param> /// <returns>(bool) true if deleted</returns> bool deleteMediaBrol(MediaBrol mediaBrol); /// <summary> /// If no currents borrows, /// delete a mediaBrol from the persistant layer all associated borrows, /// and all qualities relations /// </summary> /// <param name="mediabrolId"></param> /// <param name="title"></param> /// <param name="deleteBrol">Set true to delete associated brol</param> /// <returns></returns> bool deleteMediaBrol(int mediabrolId, String title, bool deleteBrol); #endregion #region borrows /// <summary> /// Insert today new borrow for a mediabrol and a person /// </summary> /// <param name="mediabrolId">(int) identifier of a mediabrol object</param> /// <param name="borrower">(int) identifier of a person</param> /// <returns>(bool) true if started</returns> bool startBorrow(int mediabrolId, int borrowerId); /// <summary> /// Update borrow, set endDate to now /// </summary> /// <param name="borrowId"></param> /// <returns>(bool) true if stopped</returns> bool stopBorrow(int borrowId); /// <summary> /// Update borrow, set endDate to now /// </summary> /// <param name="mediabrol">(MediaBrol) borrowed mediabrol</param> /// <returns>(bool) true if stopped</returns> bool stopBorrow(MediaBrol mediabrol); /// <summary> /// Delete all borrows for a mediabrol /// </summary> /// <param name="mediabrolId">(int) mediabrol identifier</param> /// <param name="forceDelete">(bool) set true to force delete a borrow which is not closed</param> /// <returns>(int) -1 if forceDelete = false and a borrow is not closed; number of borrows deleted otherwise</returns> int cleanBorrows(int mediabrolId, bool forceDelete); /// <summary> /// Delete selected borrow /// </summary> /// <param name="selectedBorrowId">(int) borrow identifier</param> void cleanBorrow(int selectedBorrowId); /// <summary> /// Update a borrow /// </summary> /// <param name="borrow"></param> bool updateBorrow(Borrow borrow); /// <summary> /// Load borrows for a person /// </summary> /// <param name="person"></param> /// <returns></returns> List<Borrow> loadBorrows(Person person); /// <summary> /// Load borrows and fill a DataTable. /// If mediabrolId equals 0, all borrows are loaded. /// </summary> /// <param name="mediabrolId">(int) Selected mediabrol id</param> /// <param name="borrowFields">List of fields to load for the borrows</param> /// <param name="typeId"> /// (int) selected type (film, book, etc.) /// 0 allow to load all types /// </param> /// <param name="closed">set true to load closed borrows, false to load only current borrows</param> /// <param name="title">(String) string to find into brol's title</param> /// <returns>(DataTable) DataTable with borrows</returns> DataTable loadBorrows(int mediabrolId, List<DAOUtils.BORROW_FIELD> borrowFields, int typeId, bool closed, string title); /// <summary> /// Load selected borrow /// </summary> /// <param name="mediabrol"></param> /// <returns></returns> Borrow loadBorrow(int borrowId); #endregion } }
Structure et Fichiers du projet
Afficher/masquer...Icône | Nom | Taille | Modification |
Icône | Nom | Taille | Modification |
| _ | Répertoire parent | 0 octets | 1731752973 16/11/2024 11:29:33 |
| _ | 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.
Nederlandse vertaling
U hebt gevraagd om deze site in het Nederlands te bezoeken. Voor nu wordt alleen de interface vertaald, maar nog niet alle inhoud.Als je me wilt helpen met vertalingen, is je bijdrage welkom. Het enige dat u hoeft te doen, is u op de site registreren en mij een bericht sturen waarin u wordt gevraagd om u toe te voegen aan de groep vertalers, zodat u de gewenste pagina's kunt vertalen. Een link onderaan elke vertaalde pagina geeft aan dat u de vertaler bent en heeft een link naar uw profiel.
Bij voorbaat dank.
Document heeft de 16/10/2009 gemaakt, de laatste keer de 26/10/2018 gewijzigd
Bron van het afgedrukte document:https://www.gaudry.be/nl/cs-bibliobrol-source-rf-model/dao//IMediaBrolDao.cs.html
De infobrol is een persoonlijke site waarvan de inhoud uitsluitend mijn verantwoordelijkheid is. De tekst is beschikbaar onder CreativeCommons-licentie (BY-NC-SA). Meer info op de gebruiksvoorwaarden en de auteur.