Package org.silverpeas.core.tagcloud.dao
Class TagCloudDAO
- java.lang.Object
-
- org.silverpeas.core.tagcloud.dao.TagCloudDAO
-
public class TagCloudDAO extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
createTagCloud(Connection con, TagCloud tagCloud)
static void
deleteAllTagClouds(Connection con, String instanceId)
Deletes all the tag clouds registered for the specified component instance.static void
deleteTagCloud(Connection con, TagCloudPK pk, int type)
static Collection<TagCloud>
getElementTagClouds(Connection con, TagCloudPK pk)
static Collection<TagCloud>
getInstanceTagClouds(Connection con, String instanceId)
static Collection<TagCloud>
getTagCloudsByElement(Connection con, String instanceId, String externalId, int type)
static Collection<TagCloud>
getTagCloudsByTags(Connection con, String tags, String instanceId, int type)
static String
getTagsByElement(Connection con, TagCloudPK pk)
-
-
-
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
-
getTagsByElement
public static String getTagsByElement(Connection con, TagCloudPK pk) throws SQLException
- Throws:
SQLException
-
-