Class StyleDAO

  • All Implemented Interfaces:
    IStyleDAO

    public final class StyleDAO
    extends Object
    implements IStyleDAO
    This class provides Data Access methods for style objects
    • 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 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 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