Geen cache-versie.

Caching uitgeschakeld. Standaardinstelling voor deze pagina:ingeschakeld (code LNG204)
Als het scherm te langzaam is, kunt u de gebruikersmodus uitschakelen om de cacheversie te bekijken.

DAOFactory.cs

Description du code

DAOFactory.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

  1. using be.gaudry.bibliobrol.config;
  2. using be.gaudry.bibliobrol.model.enums;
  3. using be.gaudry.bibliobrol.model.dao.config;
  4.  
  5. namespace be.gaudry.bibliobrol.model.dao
  6. {
  7. /// <summary>
  8. /// Provides concrete persistence classes for the persistent type defined in the user settings
  9. /// </summary>
  10. public abstract class DAOFactory
  11. {
  12.  
  13. #region singleton
  14. protected static DAOFactory instance = null;
  15. static readonly object threadLockObject = new object();
  16. protected DAOFactory() { }
  17. /// <summary>
  18. /// Get unique instance of <code>DAOFactory</code> providing methods to access to the persistent layer.
  19. /// </summary>
  20. public static DAOFactory Instance
  21. {
  22. get
  23. {
  24. lock (threadLockObject)
  25. {
  26. if (instance == null)
  27. {
  28. resetDAO();
  29. }
  30. return instance;
  31. }
  32. }
  33. }
  34. /// <summary>
  35. /// Resets unique instance of <code>DAOFactory</code> to use another persistent layer.<br />
  36. /// <b><u>Be extremly carefull with using this method :</u></b> if application is not restarted,
  37. /// inconsistent data between old persistent layer
  38. /// and new persistent layer will crash the application and the persistent storage.
  39. /// </summary>
  40. public static void resetDAO()
  41. {
  42. PERSISTENCE_TYPE persistentType = Config.PersistentType;
  43.  
  44. switch (persistentType)
  45. {
  46. //case PERSISTENCE_TYPE.SQLExpress:
  47. //case PERSISTENCE_TYPE.MySQL:
  48. // instance = new mysql.MySQLFactory();
  49. // break;
  50. //case PERSISTENCE_TYPE.Access:
  51. default:
  52. instance = new msaccess.AccessFactory();
  53. break;
  54. }
  55. }
  56. #endregion
  57.  
  58. #region getDao methods to implement
  59. public abstract AbstractDBConfig getDBConfig();
  60. public abstract IConfigDao getConfigDao();
  61. public abstract IPersonDao getPersonDao();
  62. public abstract IBrolDao getBrolDao();
  63. public abstract IMediaBrolDao getMediaBrolDao();
  64. public abstract ITaskDao getTaskDao();
  65. public abstract IExporterDao getExporterDao();
  66. public abstract IImporterDao getImporterDao();
  67. public abstract IStatsDao getStatsDao();
  68. public abstract ISerieDao getSerieDao();
  69. #endregion
  70. }
  71. }

Structure et Fichiers du projet

Afficher/masquer...


Répertoires contenus dans /var/www/bin/sniplets/bibliobrol/src/model/dao/ 
IcôneNomTailleModification
IcôneNomTailleModification
| _ Répertoire parent0 octets1719808082 01/07/2024 06:28:02
| _msaccess0 octets1541007197 31/10/2018 18:33:17
| _config0 octets1541007197 31/10/2018 18:33:17
| _mysql0 octets1541007198 31/10/2018 18:33:18
Fichiers contenus dans /var/www/bin/sniplets/bibliobrol/src/model/dao/ 
IcôneNomTailleModificationAction
IcôneNomTailleModificationAction
Afficher le fichier .cs|.csIExporterDao.cs1.98 Ko31/10/2018 18:32:54-refusé-
Afficher le fichier .cs|.csIBrolDao.cs6.25 Ko31/10/2018 18:32:54-refusé-
Afficher le fichier .cs|.csIImporterDao.cs686 octets31/10/2018 18:32:54-refusé-
Afficher le fichier .cs|.csITaskDao.cs351 octets31/10/2018 18:32:54-refusé-
Afficher le fichier .cs|.csDAOFactory.cs2.58 Ko31/10/2018 18:32:54-refusé-
Afficher le fichier .cs|.csIMediaBrolDao.cs9.86 Ko31/10/2018 18:32:54-refusé-
Afficher le fichier .cs|.csIStatsDao.cs431 octets31/10/2018 18:32:54-refusé-
Afficher le fichier .cs|.csIPersonDao.cs4.87 Ko31/10/2018 18:32:54-refusé-
Afficher le fichier .cs|.csDAOUtils.cs2.18 Ko31/10/2018 18:32:54-refusé-
Afficher le fichier .cs|.csISerieDao.cs362 octets31/10/2018 18:32:54-refusé-
Afficher le fichier .cs|.csIConfigDao.cs705 octets31/10/2018 18:32:54-refusé-

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/DAOFactory.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.