|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.wso2.carbon.registry.core.jdbc.dao.JDBCCommentsDAO
org.wso2.carbon.registry.core.jdbc.dao.JDBCCommentsVersionDAO
public class JDBCCommentsVersionDAO
An extension of JDBCCommentsVersionDAO implements JDBCCommentsDAO to store
comments on a JDBC-based database, when versioning for comments has been enabled.
| Field Summary |
|---|
| Fields inherited from class org.wso2.carbon.registry.core.jdbc.dao.JDBCCommentsDAO |
|---|
ADD_COMMENT_LOCK |
| Constructor Summary | |
|---|---|
JDBCCommentsVersionDAO(DAOManager daoManager)
Default constructor |
|
| Method Summary | |
|---|---|
int |
addComment(ResourceImpl resource,
String userID,
Comment comment)
Method to persist a comment. |
void |
addComments(ResourceImpl resource,
CommentDO[] commentDOs)
Method to persist comments. |
void |
copyComments(ResourceImpl sourceResource,
ResourceImpl targetResource)
Method to copy comments. |
Comment[] |
getComments(ResourceImpl resource)
Method to get comments added to a given resource. |
String[] |
getResourcePathsOfComments(Long[] commentIDs,
Connection conn)
Method to get resource paths of comments. |
ResourceImpl |
getResourceWithMinimumData(String path)
Gets the resource with sufficient data to differentiate it from another resource. |
void |
moveCommentPaths(ResourceIDImpl source,
ResourceIDImpl target)
Method to move comment paths. |
void |
moveComments(ResourceIDImpl source,
ResourceIDImpl target)
Method to move comments. |
| Methods inherited from class org.wso2.carbon.registry.core.jdbc.dao.JDBCCommentsDAO |
|---|
deleteComment, getComment, removeComments, removeVersionComments, updateComment |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.wso2.carbon.registry.core.dao.CommentsDAO |
|---|
deleteComment, getComment, removeComments, removeVersionComments, updateComment |
| Constructor Detail |
|---|
public JDBCCommentsVersionDAO(DAOManager daoManager)
daoManager - instance of the data access object manager.| Method Detail |
|---|
public int addComment(ResourceImpl resource,
String userID,
Comment comment)
throws RegistryException
addComment in interface CommentsDAOaddComment in class JDBCCommentsDAOresource - the resourceuserID - the id of the user who added the comment.comment - the comment to be persisted.
RegistryException - if some error occurs while adding a comment
public void copyComments(ResourceImpl sourceResource,
ResourceImpl targetResource)
throws RegistryException
copyComments in interface CommentsDAOcopyComments in class JDBCCommentsDAOsourceResource - the source resource.targetResource - the target resource.
RegistryException - if some error occurs while copying comments
public void addComments(ResourceImpl resource,
CommentDO[] commentDOs)
throws RegistryException
addComments in interface CommentsDAOaddComments in class JDBCCommentsDAOresource - the resourcecommentDOs - the comments to be persisted.
RegistryException - if some error occurs while adding comments
public Comment[] getComments(ResourceImpl resource)
throws RegistryException
getComments in interface CommentsDAOgetComments in class JDBCCommentsDAOresource - the resource.
RegistryException - if an error occurs while getting comments.
public String[] getResourcePathsOfComments(Long[] commentIDs,
Connection conn)
throws RegistryException
getResourcePathsOfComments in class JDBCCommentsDAOcommentIDs - the comment id.conn - the connection to use.
RegistryException - if an error occurs.
public ResourceImpl getResourceWithMinimumData(String path)
throws RegistryException
ResourceImpl with the path, name and path identifier
of a resource.
getResourceWithMinimumData in interface CommentsDAOgetResourceWithMinimumData in class JDBCCommentsDAOpath - the path of the resource.
RegistryException - if an error occurs while retrieving resource data.
public void moveComments(ResourceIDImpl source,
ResourceIDImpl target)
throws RegistryException
moveComments in interface CommentsDAOmoveComments in class JDBCCommentsDAOsource - the source resource.target - the target resource.
RegistryException - if some error occurs while moving comments
public void moveCommentPaths(ResourceIDImpl source,
ResourceIDImpl target)
throws RegistryException
moveCommentPaths in interface CommentsDAOmoveCommentPaths in class JDBCCommentsDAOsource - the source resource.target - the target resource.
RegistryException - if some error occurs while moving comment paths
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||