diff --git a/modules/apps/journal/journal-service/src/main/java/com/liferay/journal/service/persistence/impl/JournalFolderFinderImpl.java b/modules/apps/journal/journal-service/src/main/java/com/liferay/journal/service/persistence/impl/JournalFolderFinderImpl.java index 25be583687616c..d70dc1942aeb06 100644 --- a/modules/apps/journal/journal-service/src/main/java/com/liferay/journal/service/persistence/impl/JournalFolderFinderImpl.java +++ b/modules/apps/journal/journal-service/src/main/java/com/liferay/journal/service/persistence/impl/JournalFolderFinderImpl.java @@ -90,7 +90,8 @@ public int filterCountF_A_ByG_F_DDMSI_NotS( int[] excludedStatuses, QueryDefinition queryDefinition) { return doCountF_A_ByG_F_DDMSI_NotS( - groupId, folderId, ddmStructureId, excludedStatuses, queryDefinition, true); + groupId, folderId, ddmStructureId, excludedStatuses, + queryDefinition, true); } @Override @@ -159,8 +160,9 @@ public List findF_ByNoAssets() { } protected int doCountF_A_ByG_F_DDMSI_NotS( - long groupId, long folderId, long ddmStructureId, int[] excludedStatuses, - QueryDefinition queryDefinition, boolean inlineSQLHelper) { + long groupId, long folderId, long ddmStructureId, + int[] excludedStatuses, QueryDefinition queryDefinition, + boolean inlineSQLHelper) { Session session = null; @@ -459,6 +461,32 @@ protected String getDDMStructureId(long ddmStructureId) { return sb.toString(); } + protected String getExcludedStatuses( + int[] excludedStatuses, String tableName) { + + if (ArrayUtil.isEmpty(excludedStatuses)) { + return StringPool.BLANK; + } + + StringBundler sb = new StringBundler(5); + + sb.append(" and "); + sb.append(tableName); + sb.append(".status not in ("); + + for (int i = 0; i < excludedStatuses.length; i++) { + sb.append(excludedStatuses[i]); + + if (i != (excludedStatuses.length - 1)) { + sb.append(", "); + } + } + + sb.append(")"); + + return sb.toString(); + } + protected String getFolderId(long folderId, String tableName) { if (folderId < 0) { return StringPool.BLANK; @@ -498,34 +526,9 @@ protected String getFoldersSQL( return sql; } - protected String getExcludedStatuses( - int[] excludedStatuses, String tableName) { - - if (ArrayUtil.isEmpty(excludedStatuses)) { - return StringPool.BLANK; - } - - StringBundler sb = new StringBundler(5); - - sb.append(" and "); - sb.append(tableName); - sb.append(".status not in ("); - - for (int i = 0; i < excludedStatuses.length; i++) { - sb.append(excludedStatuses[i]); - - if (i != (excludedStatuses.length - 1)) { - sb.append(", "); - } - } - - sb.append(")"); - - return sb.toString(); - } - protected String updateSQL( - String sql, long folderId, long ddmStructureId, int[] excludedStatuses) { + String sql, long folderId, long ddmStructureId, + int[] excludedStatuses) { return StringUtil.replace( sql,