Class SqlStatementGeneratorUtils
java.lang.Object
org.craftercms.studio.api.v2.utils.SqlStatementGeneratorUtils
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic String
deleteDependencyRows
(String siteId, String sourcePath) static String
deleteDependencySourcePathRows
(String siteId, String sourcePath) static String
deleteItemRow
(Long siteId, String path) static String
insertDependencyRow
(String siteId, String sourcePath, String targetPath, String type) static String
insertGitLogRow
(String siteId, String commitId, boolean processed, boolean audited) static String
insertItemRow
(long siteId, String path, String previewUrl, long state, Long lockedBy, Long createdBy, ZonedDateTime createdOn, Long lastModifiedBy, ZonedDateTime lastModifiedOn, ZonedDateTime lastPublishedOn, String label, String contentTypeId, String systemType, String mimeType, String localeCode, Long translationSourceId, Long size, Long parentId, String commitId, String previousPath) static String
moveItemRow
(String site, String oldPath, String newPath, long onStatesBitMap, long offStatesBitMap) static String
updateDeletedPageChildren
(long siteId, String folderPath) Generates the sql statements to update a deleted page children.static String
updateItemRow
(long siteId, String path, String previewUrl, long onStatesBitMap, long offStatesBitMap, Long lastModifiedBy, ZonedDateTime lastModifiedOn, String label, String contentTypeId, String systemType, String mimeType, Long size, String commitId) static String
updateNewPageChildren
(long siteId, String path) Generates the sql statements to update a new page children.static String
updateParentId
(long siteId, String itemPath, String parentPath) static String
updateParentIdSimple
(long parentId, long itemId)
-
Field Details
-
ITEM_INSERT
- See Also:
-
ITEM_UPDATE
- See Also:
-
ITEM_DELETE
- See Also:
-
ITEM_MOVE
- See Also:
-
ITEM_UPDATE_PARENT_ID
- See Also:
-
UPDATE_NEW_PAGE_CHILDREN
- See Also:
-
UPDATE_DELETED_PAGE_CHILDREN
- See Also:
-
ITEM_UPDATE_PARENT_ID_SIMPLE
- See Also:
-
DEPENDENCIES_INSERT
- See Also:
-
DEPENDENCIES_DELETE_SOURCE
- See Also:
-
DEPENDENCIES_DELETE
- See Also:
-
GITLOG_INSERT_IGNORE
- See Also:
-
-
Method Details
-
insertItemRow
public static String insertItemRow(long siteId, String path, String previewUrl, long state, Long lockedBy, Long createdBy, ZonedDateTime createdOn, Long lastModifiedBy, ZonedDateTime lastModifiedOn, ZonedDateTime lastPublishedOn, String label, String contentTypeId, String systemType, String mimeType, String localeCode, Long translationSourceId, Long size, Long parentId, String commitId, String previousPath) -
updateItemRow
-
deleteItemRow
-
moveItemRow
-
updateParentId
-
updateNewPageChildren
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 idpath
- the page to the content (including index.xml)- Returns:
- the sql statement
-
updateDeletedPageChildren
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 idfolderPath
- the folder path to the deleted page- Returns:
- the sql statement
-
updateParentIdSimple
-
insertDependencyRow
-
deleteDependencySourcePathRows
-
deleteDependencyRows
-
insertGitLogRow
-