IPersonDao.cs
Description du code
IPersonDao.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# (IPersonDao.cs) (113 lignes)
using System; using System.Collections.Generic; using System.Text; using be.gaudry.observer; namespace be.gaudry.bibliobrol.model.dao { public interface IPersonDao : IObservable { #region person /// <summary> /// Test if a person exists with the same name and firstname /// </summary> /// <param name="person">(Person) person to test</param> /// <returns>(int) id of the person found (-1 if not found)</returns> int personExists(Person person); /// <summary> /// Insert a person into the persistant layer /// </summary> /// <param name="person">(Person) person to insert</param> /// <returns>(int) id of the new person (-1 if a problem occurs)</returns> int insertPerson(Person person); /// <summary> /// Load a person from the persistant layer with an id arg. /// If this person shoud be modified, editing bool arg is true /// to avoid concurent modifications (nobody else can save this person). /// </summary> /// <param name="id">(int) Id of the selected person</param> /// <param name="editing">(bool) Shoud be modified or not</param> /// <returns>Selected person, or a new person if _ found</returns> Person loadPerson(int id, bool editing); /// <summary> /// Load a person from the persistant layer with a lastname and a firstname. /// Search case insensitive. /// </summary> /// <param name="lastName">(string) lastname of the searched person</param> /// <param name="firstName">(string) firstname of the searched person</param> /// <returns>Persons found, or empty list</returns> List<Person> loadPersons(string lastName, string firstName); /// <summary> /// Load all persons from the persistant layer /// </summary> /// <returns>List of Persons</returns> List<Person> loadPersons(); /// <summary> /// Load all persons matches (case insensitive) lastName /// </summary> /// <param name="lastName">(String) lastName to match</param> /// <returns>List of persons with the same lastName</returns> List<Person> loadPersons(String lastName); /// <summary> /// Load persons value objects (only display and id) /// </summary> /// <returns>List of PersonVos</returns> List<PersonLO> loadVos(); /// <summary> /// Load persons value objects with selected role (only display and id) /// If role id is less or equals than 0, all persons are loaded /// </summary> /// <param name="editing">(ActorRole) person's role</param> /// <returns>List of PersonVos</returns> List<PersonLO> loadPersonsVos(ActorRole role); /// <summary> /// Load persons value objects with the same name /// </summary> /// <param name="name">(string) person's lastname</param> /// <returns>List of PersonVos</returns> List<PersonLO> loadPersonsVos(string name); /// <summary> /// Store new values for a person. /// Verify if some phones had been deleted, and delete it from the persistant layer. /// Add new phones if exists. /// Update existing phones. /// </summary> /// <param name="person">Person with new values to store</param> /// <returns>true if update is done</returns> bool updatePerson(Person person); /// <summary> /// Lock person to avoid concurent modifications. /// </summary> /// <param name="id">person's id to lock</param> /// <returns>false if a problem occurs (todo : if already locked)</returns> bool lockPerson(int id); /// <summary> /// unlock person to allow modifications. /// </summary> /// <param name="id">person's id to unlock</param> bool unlockPerson(int id); /// <summary> /// Delete a person from the persistant layer, /// and delete all associated phones /// </summary> /// <param name="p">(Person) person to delete</param> /// <returns>true if deleted</returns> bool deletePerson(Person person); #endregion #region user /// <summary> /// Insert a person into the persistant layer and add it in the bibliobrolusers group /// </summary> /// <param name="person">(Person) person to insert</param> /// <returns>(int) id of the new person (-1 if a problem occurs)</returns> int insertBibliobrolUser(Person person); User loadUser(int persId); int saveUser(User user); void deleteUser(User user, bool deletePerson); #endregion ActorRole getUserRole(); } }
Structure et Fichiers du projet
Afficher/masquer...Icône | Nom | Taille | Modification |
Icône | Nom | Taille | Modification |
| _ | Répertoire parent | 0 octets | 1731754874 16/11/2024 12:01: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//IPersonDao.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.