Class StyleDAO

  • All Implemented Interfaces:
    IStyleDAO

    public final class StyleDAO
    extends java.lang.Object
    implements IStyleDAO
    This class provides Data Access methods for style objects
    • Constructor Summary

      Constructors 
      Constructor Description
      StyleDAO()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean checkStylePortalComponent​(int nPortalComponentId)
      Checks if a style has been created in the database with the given portal componenet
      void delete​(int nStyleId)
      Delete a record from the table
      void insert​(Style style)
      Insert a new record in the table.
      Style load​(int nStyleId)
      load the data of the Style whose identifier is specified in parameter from the table
      ReferenceList selectPortalComponentList()
      Returns the list of the portal component in form of a ReferenceList
      java.util.Collection<StyleSheet> selectStyleSheetList​(int nStyleId)
      load the data of the StyleSheet which re associated to the given style
      java.util.Collection<Style> selectStylesList()
      Load the list of styles stored in the database
      void store​(Style style)
      Update the record in the table
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • StyleDAO

        public StyleDAO()
    • Method Detail

      • insert

        public void insert​(Style style)
        Insert a new record in the table.
        Specified by:
        insert in interface IStyleDAO
        Parameters:
        style - The Instance of the object Style
      • load

        public Style load​(int nStyleId)
        load the data of the Style whose identifier is specified in parameter from the table
        Specified by:
        load in interface IStyleDAO
        Parameters:
        nStyleId - The identifier of the Style
        Returns:
        an instance of the Style which has been created
      • delete

        public void delete​(int nStyleId)
        Delete a record from the table
        Specified by:
        delete in interface IStyleDAO
        Parameters:
        nStyleId - the identifier of the style to delete
      • store

        public void store​(Style style)
        Update the record in the table
        Specified by:
        store in interface IStyleDAO
        Parameters:
        style - The instance of the Style to update
      • selectStylesList

        public java.util.Collection<Style> selectStylesList()
        Load the list of styles stored in the database
        Specified by:
        selectStylesList in interface IStyleDAO
        Returns:
        The styles list in form of a Collection object
      • selectPortalComponentList

        public ReferenceList selectPortalComponentList()
        Returns the list of the portal component in form of a ReferenceList
        Specified by:
        selectPortalComponentList in interface IStyleDAO
        Returns:
        the list of the portal component
      • selectStyleSheetList

        public java.util.Collection<StyleSheet> selectStyleSheetList​(int nStyleId)
        load the data of the StyleSheet which re associated to the given style
        Specified by:
        selectStyleSheetList in interface IStyleDAO
        Parameters:
        nStyleId - The identifier of the Style
        Returns:
        an instance of the Style which has been created
      • checkStylePortalComponent

        public boolean checkStylePortalComponent​(int nPortalComponentId)
        Checks if a style has been created in the database with the given portal componenet
        Specified by:
        checkStylePortalComponent in interface IStyleDAO
        Parameters:
        nPortalComponentId - The identifier of the portal component
        Returns:
        true if a style has been created for this portal component, false otherwise