Class SqlStatementGeneratorUtils
java.lang.Object
org.craftercms.studio.api.v2.utils.SqlStatementGeneratorUtils
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic StringdeleteDependencyRows(String siteId, String sourcePath) static StringdeleteDependencySourcePathRows(String siteId, String sourcePath) static StringdeleteItemRow(Long siteId, String path) static StringinsertDependencyRow(String siteId, String sourcePath, String targetPath, String type) static StringinsertGitLogRow(String siteId, String commitId, boolean processed, boolean audited) static StringinsertItemRow(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 StringmoveItemRow(String site, String oldPath, String newPath, long onStatesBitMap, long offStatesBitMap) static StringupdateDeletedPageChildren(long siteId, String folderPath) Generates the sql statements to update a deleted page children.static StringupdateItemRow(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 StringupdateNewPageChildren(long siteId, String path) Generates the sql statements to update a new page children.static StringupdateParentId(long siteId, String itemPath, String parentPath) static StringupdateParentIdSimple(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
-