Class TagDAO

  • All Implemented Interfaces:
    ITagDAO

    public final class TagDAO
    extends java.lang.Object
    implements ITagDAO
    This class provides Data Access methods for TagDAO objects
    • Constructor Summary

      Constructors 
      Constructor Description
      TagDAO()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void delete​(int idTag, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Remove the tag whose identifier is specified in parameter
      void deleteByDoc​(int idDoc, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Delete Association a tag with a document whose identifier is specified in parameter
      void deleteByTAG​(int idTag, int idDoc, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Delete Association a tag with a document whose identifier is specified in parameter
      void insert​(int nIdTag, int nIdDoc, int nPriority, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Associating a tag with a document
      void insert​(Tag tag, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Create an instance of the tag class
      Tag load​(int idTag, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Returns an instance of a tag whose identifier is specified in parameter
      java.util.List<Tag> loadAllTag​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the data of all the tag objects and returns them as a list
      java.util.List<Tag> loadByDoc​(int idDoc, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the data of the tag objects whose identifier is specified in parameter and returns them as a list
      Tag loadByName​(java.lang.String strName, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Returns an instance of a tag whose name is specified in parameter
      java.util.List<Tag> loadListTagByIdDoc​(int idDoc, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the Tags associated with the document whose identifier is specified in parameter
      fr.paris.lutece.util.ReferenceList selectTagsReferenceList​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the data of all the tag objects and returns them as a list
      void store​(Tag tag, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Update of the tag which is specified in parameter
      • Methods inherited from class java.lang.Object

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

      • TagDAO

        public TagDAO()
    • Method Detail

      • insert

        public void insert​(Tag tag,
                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Create an instance of the tag class
        Specified by:
        insert in interface ITagDAO
        Parameters:
        tag - The instance of the tag which contains the informations to store
        plugin - the plugin
      • load

        public Tag load​(int idTag,
                        fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Returns an instance of a tag whose identifier is specified in parameter
        Specified by:
        load in interface ITagDAO
        Parameters:
        idTag - The tag primary key
        plugin - the plugin
        Returns:
        an instance of Tag
      • loadAllTag

        public java.util.List<Tag> loadAllTag​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Load the data of all the tag objects and returns them as a list
        Specified by:
        loadAllTag in interface ITagDAO
        Parameters:
        plugin - the plugin
        Returns:
        the list which contains the data of all the tag objects
      • delete

        public void delete​(int idTag,
                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Remove the tag whose identifier is specified in parameter
        Specified by:
        delete in interface ITagDAO
        Parameters:
        idTag - The tag Id
        plugin - the plugin
      • store

        public void store​(Tag tag,
                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Update of the tag which is specified in parameter
        Specified by:
        store in interface ITagDAO
        Parameters:
        tag - The instance of the tag which contains the data to store
        plugin - the plugin
      • insert

        public void insert​(int nIdTag,
                           int nIdDoc,
                           int nPriority,
                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Associating a tag with a document
        Specified by:
        insert in interface ITagDAO
        Parameters:
        nIdTag - the Tag id
        nIdDoc - The document identifiant
        nPriority - The priority of the document
        plugin - the plugin
      • deleteByTAG

        public void deleteByTAG​(int idTag,
                                int idDoc,
                                fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Delete Association a tag with a document whose identifier is specified in parameter
        Specified by:
        deleteByTAG in interface ITagDAO
        Parameters:
        idTag - Id Tag
        idDoc - Id Document
        plugin - the plugin
      • deleteByDoc

        public void deleteByDoc​(int idDoc,
                                fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Delete Association a tag with a document whose identifier is specified in parameter
        Specified by:
        deleteByDoc in interface ITagDAO
        Parameters:
        idDoc - The Id Document
        plugin - the plugin
      • loadByDoc

        public java.util.List<Tag> loadByDoc​(int idDoc,
                                             fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Load the data of the tag objects whose identifier is specified in parameter and returns them as a list
        Specified by:
        loadByDoc in interface ITagDAO
        Parameters:
        idDoc - The document identifiant
        plugin - the plugin
        Returns:
        returns them as a list of the tag objects
      • selectTagsReferenceList

        public fr.paris.lutece.util.ReferenceList selectTagsReferenceList​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Load the data of all the tag objects and returns them as a list
        Specified by:
        selectTagsReferenceList in interface ITagDAO
        Parameters:
        plugin - the plugin
        Returns:
        the list which contains the data of all the tag objects
      • loadListTagByIdDoc

        public java.util.List<Tag> loadListTagByIdDoc​(int idDoc,
                                                      fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Load the Tags associated with the document whose identifier is specified in parameter
        Specified by:
        loadListTagByIdDoc in interface ITagDAO
        Parameters:
        idDoc - Id Document
        plugin - the plugin
        Returns:
        list of Tag
      • loadByName

        public Tag loadByName​(java.lang.String strName,
                              fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Returns an instance of a tag whose name is specified in parameter
        Specified by:
        loadByName in interface ITagDAO
        Parameters:
        strName - The tag name
        plugin - the plugin
        Returns:
        an instance of Tag