Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,8 @@ Mono<NewPage> findPageByBranchNameAndBasePageId(
Flux<NewPage> findAllByApplicationIdsWithoutPermission(List<String> applicationIds, List<String> includeFields);

Mono<Integer> updateDependencyMap(String pageId, Map<String, List<String>> dependencyMap);

Flux<NewPage> findByApplicationId(String applicationId);

Mono<Long> countByDeletedAtNull();
}
Original file line number Diff line number Diff line change
Expand Up @@ -261,4 +261,16 @@ public Mono<Integer> updateDependencyMap(String pageId, Map<String, List<String>
update.set(NewPage.Fields.unpublishedPage_dependencyMap, dependencyMap);
return queryBuilder().criteria(q).updateFirst(update);
}

@Override
public Flux<NewPage> findByApplicationId(String applicationId) {
final BridgeQuery<NewPage> q = Bridge.equal(NewPage.Fields.applicationId, applicationId);
return queryBuilder().criteria(q).all();
}

@Override
public Mono<Long> countByDeletedAtNull() {
final BridgeQuery<NewPage> q = Bridge.notExists(NewPage.Fields.deletedAt);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AnaghHegde I hope we have verified this.

return queryBuilder().criteria(q).count();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,10 @@
import com.appsmith.server.repositories.BaseRepository;
import com.appsmith.server.repositories.CustomNewPageRepository;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

import java.util.List;

public interface NewPageRepositoryCE extends BaseRepository<NewPage, String>, CustomNewPageRepository {

Flux<NewPage> findByApplicationId(String applicationId);

Mono<Long> countByDeletedAtNull();

Flux<IdPoliciesOnly> findIdsAndPolicyMapByApplicationIdIn(List<String> applicationIds);
}