Class TagCloudDAO


  • public class TagCloudDAO
    extends Object
    • Method Detail

      • createTagCloud

        public static void createTagCloud​(Connection con,
                                          TagCloud tagCloud)
                                   throws SQLException
        Parameters:
        con - The database connection.
        tagCloud - The tagcloud to insert into database.
        Throws:
        SQLException
      • deleteTagCloud

        public static void deleteTagCloud​(Connection con,
                                          TagCloudPK pk,
                                          int type)
                                   throws SQLException
        Parameters:
        con - The database connection.
        pk - The primary key of the tagcloud to delete from the database.
        Throws:
        SQLException
      • deleteAllTagClouds

        public static void deleteAllTagClouds​(Connection con,
                                              String instanceId)
                                       throws SQLException
        Deletes all the tag clouds registered for the specified component instance.
        Parameters:
        con - the connection to the database.
        instanceId - the unique identifier of the component instance.
        Throws:
        SQLException - if an error occurs while deleting the tag clouds.
      • getInstanceTagClouds

        public static Collection<TagCloud> getInstanceTagClouds​(Connection con,
                                                                String instanceId)
                                                         throws SQLException
        Parameters:
        con - The database connection.
        instanceId - The id of the instance which the tagclouds are searched for.
        Returns:
        The list of tagclouds corresponding to the instance id.
        Throws:
        SQLException
      • getElementTagClouds

        public static Collection<TagCloud> getElementTagClouds​(Connection con,
                                                               TagCloudPK pk)
                                                        throws SQLException
        Parameters:
        con - The database connection.
        pk - The id of the element which the tagclouds are searched for.
        Returns:
        The list of tagclouds corresponding to the element id.
        Throws:
        SQLException
      • getTagCloudsByTags

        public static Collection<TagCloud> getTagCloudsByTags​(Connection con,
                                                              String tags,
                                                              String instanceId,
                                                              int type)
                                                       throws SQLException
        Parameters:
        con - The database connection.
        tags - The tags which returned tagclouds must contain.
        instanceId - The id of the instance.
        type - The type of elements referenced by the tagclouds (publications or forums).
        Returns:
        The list of tagclouds corresponding to the tag and the instance id given as parameters.
        Throws:
        SQLException
      • getTagCloudsByElement

        public static Collection<TagCloud> getTagCloudsByElement​(Connection con,
                                                                 String instanceId,
                                                                 String externalId,
                                                                 int type)
                                                          throws SQLException
        Parameters:
        con - The database connection.
        instanceId - The id of the instance.
        externalId - The id of the element.
        Returns:
        The list of tagclouds corresponding to the ids given as parameters.
        Throws:
        SQLException