Class CommentRepository


  • public class CommentRepository
    extends Object
    • Constructor Detail

      • CommentRepository

        public CommentRepository()
    • Method Detail

      • checkCommentsTableExists

        public static boolean checkCommentsTableExists​(int layerId)
                                                throws SQLException
        Checks, 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 SQLException
        Creates 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 SQLException
        Creates a comment diff table from the structure of an comment table. And adds a grpstatus column.
        Parameters:
        dataTable -
        Throws:
        SQLException
      • checkCommentDiffTableExists

        public static boolean checkCommentDiffTableExists​(int layerId)
                                                   throws SQLException
        Checks, if a comment diff table exist for a given layer id.
        Parameters:
        layerId -
        Returns:
        Throws:
        SQLException
      • insertUnreviewedCommentOrWeblink

        public static int insertUnreviewedCommentOrWeblink​(int layerId,
                                                           Integer userId,
                                                           int gfid,
                                                           String commentOrWeblink,
                                                           CommentOrLinkType commentOrLinkType,
                                                           String description)
                                                    throws SQLException
        Inserts a new comment or weblink and returns its id.
        Parameters:
        layerId -
        userId -
        gfid -
        Returns:
        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)