Class TagHome

java.lang.Object
fr.paris.lutece.plugins.blog.business.TagHome

public final class TagHome extends Object
This class provides instances management methods (create, find, ...) for Tag objects
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    create(int nIdTag, int nIdocument, int nPriority)
    Associating a tag with a document
    static Tag
    create(Tag tag)
    Create an instance of the tag class
    static Tag
    findByName(String strName)
    Returns an instance of a tag whose name is specified in parameter
    static Tag
    findByPrimaryKey(int nKey)
    Returns an instance of a tag whose identifier is specified in parameter
    static List<Tag>
    Load the data of all the tag objects and returns them as a list
    static List<Tag>
    getTagListByDoc(int idDoc)
    Load the Tags associated with the document whose identifier is specified in parameter
    static fr.paris.lutece.util.ReferenceList
    Load the data of all the tag objects and returns them as a list
    static List<Tag>
    loadByDoc(int nIdDco)
    Load the data of the tag objects whose identifier is specified in parameter and returns them as a list
    static void
    remove(int nKey)
    Remove the tag whose identifier is specified in parameter
    static void
    removeTagDoc(int nIdDoc)
    Delete Association a tag with a document whose identifier is specified in parameter
    static Tag
    update(Tag tag)
    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
  • Method Details

    • create

      public static Tag create(Tag tag)
      Create an instance of the tag class
      Parameters:
      tag - The instance of the tag which contains the informations to store
      Returns:
      The instance of tag which has been created with its primary key.
    • update

      public static Tag update(Tag tag)
      Update of the tag which is specified in parameter
      Parameters:
      tag - The instance of the tag which contains the data to store
      Returns:
      The instance of the tag which has been updated
    • remove

      public static void remove(int nKey)
      Remove the tag whose identifier is specified in parameter
      Parameters:
      nKey - The tag Id
    • findByPrimaryKey

      public static Tag findByPrimaryKey(int nKey)
      Returns an instance of a tag whose identifier is specified in parameter
      Parameters:
      nKey - The tag primary key
      Returns:
      an instance of Tag
    • findByName

      public static Tag findByName(String strName)
      Returns an instance of a tag whose name is specified in parameter
      Parameters:
      strName - The tag name
      Returns:
      an instance of Tag
    • getTagList

      public static List<Tag> getTagList()
      Load the data of all the tag objects and returns them as a list
      Returns:
      the list which contains the data of all the tag objects
    • getTagsReferenceList

      public static fr.paris.lutece.util.ReferenceList getTagsReferenceList()
      Load the data of all the tag objects and returns them as a list
      Returns:
      the list which contains the data of all the tag objects
    • loadByDoc

      public static List<Tag> loadByDoc(int nIdDco)
      Load the data of the tag objects whose identifier is specified in parameter and returns them as a list
      Parameters:
      nIdDco - The document identifiant
      Returns:
      returns them as a list of the tag objects
    • create

      public static void create(int nIdTag, int nIdocument, int nPriority)
      Associating a tag with a document
      Parameters:
      nIdTag - the Tag id
      nIdocument - The document identifiant
      nPriority - The priority of the document
    • removeTagDoc

      public static void removeTagDoc(int nIdDoc)
      Delete Association a tag with a document whose identifier is specified in parameter
      Parameters:
      nIdDoc - The Id Document
    • getTagListByDoc

      public static List<Tag> getTagListByDoc(int idDoc)
      Load the Tags associated with the document whose identifier is specified in parameter
      Parameters:
      idDoc - Id Document
      Returns:
      list of Tag