Class SqlStatementGeneratorUtils


  • public final class SqlStatementGeneratorUtils
    extends Object
    • Method Detail

      • deleteItemRow

        public static String deleteItemRow​(Long siteId,
                                           String path)
      • moveItemRow

        public static String moveItemRow​(String site,
                                         String oldPath,
                                         String newPath,
                                         long onStatesBitMap,
                                         long offStatesBitMap)
      • updateParentId

        public static String updateParentId​(long siteId,
                                            String itemPath,
                                            String parentPath)
      • updateNewPageChildren

        public static String updateNewPageChildren​(long siteId,
                                                   String path)
        Generates the sql statements to update a new page children. This should be called when a new page (index.xml) is created in an already existing folder
        Parameters:
        siteId - the site id
        path - the page to the content (including index.xml)
        Returns:
        the sql statement
      • updateDeletedPageChildren

        public static String updateDeletedPageChildren​(long siteId,
                                                       String folderPath)
        Generates the sql statements to update a deleted page children. This should be called when a page (index.xml) is deleted via git but its children still exists
        Parameters:
        siteId - the site id
        folderPath - the folder path to the deleted page
        Returns:
        the sql statement
      • updateParentIdSimple

        public static String updateParentIdSimple​(long parentId,
                                                  long itemId)
      • deleteDependencySourcePathRows

        public static String deleteDependencySourcePathRows​(String siteId,
                                                            String sourcePath)
      • deleteDependencyRows

        public static String deleteDependencyRows​(String siteId,
                                                  String sourcePath)
      • insertGitLogRow

        public static String insertGitLogRow​(String siteId,
                                             String commitId,
                                             boolean processed,
                                             boolean audited)