Class DAOFactory

java.lang.Object
be.gaudry.dao.edu.DAOFactory
All Implemented Interfaces:
IEduDAO, INotifier, PropertyChangeListener, EventListener
Direct Known Subclasses:
DAOAdminFactory, DerbyFactory

public abstract class DAOFactory extends Object implements IEduDAO, PropertyChangeListener
Since:
1.0 Oct 13, 2008
Author:
Steph GAUDRY
  • Field Details

    • instance

      protected static IEduDAO instance
    • daoLanguageRB

      protected ResourceBundle daoLanguageRB
      Since:
      1.0.1-SNAPSHOT (Feb 19, 2009)
  • Constructor Details

    • DAOFactory

      protected DAOFactory()
  • Method Details

    • getInstance

      public static IEduDAO getInstance()
    • registerMessageListener

      public static void registerMessageListener(Consumer<ProgressResult> listener)
      Adds a listener that is interested in whether a new progress message is available
      Parameters:
      listener -
      See Also:
      removeMessageListener(Consumer)
    • removeMessageListener

      public static void removeMessageListener(Consumer<ProgressResult> listener)
      Removes a listener that was interested in whether a new progress message is available
      Parameters:
      listener -
    • reportProgress

      public void reportProgress(String infoStr)
      Specified by:
      reportProgress in interface INotifier
      Parameters:
      infoStr - Informations to display
    • reportProgress

      public void reportProgress(int infoPg, String infoStr)
      Specified by:
      reportProgress in interface INotifier
      Parameters:
      infoPg - PROGRESS_INFO for negative values, or progress percentage
      infoStr - Some additional informations
    • reportProgress

      public void reportProgress(int infoPg, Object[] result)
      Specified by:
      reportProgress in interface INotifier
      Parameters:
      infoPg - PROGRESS_INFO for negative values, or progress percentage
      result - Values to report
    • reportProgress

      public void reportProgress(int infoPg)
      Specified by:
      reportProgress in interface INotifier
      Parameters:
      infoPg - PROGRESS_INFO for negative values, or progress percentage
    • propertyChange

      public void propertyChange(PropertyChangeEvent evt)
      Specified by:
      propertyChange in interface PropertyChangeListener
    • setLanguage

      protected void setLanguage()
      Since:
      1.0.1-SNAPSHOT (Feb 19, 2009)
    • getDAOString

      public static String getDAOString(String languageKey)
      Uses Localized properties to get some strings.
      Parameters:
      languageKey - key to access to the localized string
      Returns:
      localized string or empty string if an error occurs (never returns null)
      Since:
      1.0.1-SNAPSHOT (Feb 19, 2009)
    • getLocaleString

      public String getLocaleString(String languageKey)
      Description copied from interface: IEduDAO
      Uses Localized properties to get some strings.
      Specified by:
      getLocaleString in interface IEduDAO
      Parameters:
      languageKey - key to access to the localized string
      Returns:
      localized string or empty string if an error occurs (never returns null)