Class CommentOrWeblinkRepository
- java.lang.Object
-
- de.narimo.georepo.server.repository.CommentOrWeblinkRepository
-
public class CommentOrWeblinkRepository extends Object
-
-
Constructor Summary
Constructors Constructor Description CommentOrWeblinkRepository()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidacceptCommentOrWeblink(String commentsTable, String diffCommentsTable, int gfid, int diffCommentId)Accept a comment from a comments diff table.static booleancheckCommentsDiffTableExists(int layerId)static booleancheckCommentsTableExists(int layerId)Checks, whether a comment table exists for a given layer id.static voidcreateCommentDiffTable(int layerId)Creates a comment diff table from the structure of an comment table.static voidcreateCommentsTable(int layerId)Creates a table that stores comments related to a POI of the layer that this table is related to.static voiddeclineCommentOrWeblink(String diffCommentsTable, int gfid, int diffCommentId)static voiddeleteCommentOrWeblink(String commentsTable, int gfid, int commentOrWeblinkId)static List<Weblink>getFeatureCommentsOrWeblinks(de.narimo.commons.dto.User requestingUser, String workspace, int layerId, int gfid, CommentOrLinkType commentOrLinkType)static List<Weblink>getUnreviewedCommentsOrWeblinks(de.narimo.commons.dto.User requestingUser, String workspace, int layerId, CommentOrLinkType commentOrLinkType)static intinsertUnreviewedCommentOrWeblink(int layerId, int userId, int gfid, String commentOrWeblink, CommentOrLinkType commentOrLinkType, String description)Inserts a new comment or weblink and returns its id.
-
-
-
Method Detail
-
checkCommentsTableExists
public static boolean checkCommentsTableExists(int layerId) throws SQLExceptionChecks, whether a comment table exists for a given layer id.- Parameters:
layerId-- Returns:
- Throws:
SQLException
-
checkCommentsDiffTableExists
public static boolean checkCommentsDiffTableExists(int layerId) throws SQLException- Throws:
SQLException
-
createCommentsTable
public static void createCommentsTable(int layerId) throws SQLExceptionCreates a table that stores comments related to a POI of the layer that this table is related to.- Parameters:
layerId-- Throws:
SQLException
-
createCommentDiffTable
public static void createCommentDiffTable(int layerId) throws SQLExceptionCreates a comment diff table from the structure of an comment table. And adds a grpstatus column.- Parameters:
dataTable-- Throws:
SQLException
-
insertUnreviewedCommentOrWeblink
public static int insertUnreviewedCommentOrWeblink(int layerId, int userId, int gfid, String commentOrWeblink, CommentOrLinkType commentOrLinkType, String description) throws SQLExceptionInserts a new comment or weblink and returns its id.- Parameters:
layerId-userId-gfid-- Returns:
- Throws:
SQLException
-
getFeatureCommentsOrWeblinks
public static List<Weblink> getFeatureCommentsOrWeblinks(de.narimo.commons.dto.User requestingUser, String workspace, int layerId, int gfid, CommentOrLinkType commentOrLinkType) throws SQLException
- Throws:
SQLException
-
getUnreviewedCommentsOrWeblinks
public static List<Weblink> getUnreviewedCommentsOrWeblinks(de.narimo.commons.dto.User requestingUser, String workspace, int layerId, CommentOrLinkType commentOrLinkType) throws SQLException
- Throws:
SQLException
-
acceptCommentOrWeblink
public static void acceptCommentOrWeblink(String commentsTable, String diffCommentsTable, int gfid, int diffCommentId)
Accept a comment from a comments diff table.- Parameters:
diffTable-dataTable-grpfid-features-userId-
-
declineCommentOrWeblink
public static void declineCommentOrWeblink(String diffCommentsTable, int gfid, int diffCommentId)
-
deleteCommentOrWeblink
public static void deleteCommentOrWeblink(String commentsTable, int gfid, int commentOrWeblinkId)
-
-