Found an even better name

This commit is contained in:
Kai Zimmermann
2016-03-28 10:25:07 +02:00
parent 9849205bea
commit 1146e6a808
3 changed files with 7 additions and 7 deletions

View File

@@ -508,13 +508,13 @@ public class SoftwareManagement {
* @param orderByDistributionId * @param orderByDistributionId
* the ID of distribution set to be ordered on top * the ID of distribution set to be ordered on top
* @param searchText * @param searchText
* to be filtered as "like" on {@link SoftwareModule#getName()} * filtered as "like" on {@link SoftwareModule#getName()}
* @param type * @param type
* to be filtered as "like" on {@link SoftwareModule#getType()} * filtered as "equal" on {@link SoftwareModule#getType()}
* @return the page of found {@link SoftwareModule} * @return the page of found {@link SoftwareModule}
*/ */
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_REPOSITORY) @PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_REPOSITORY)
public Slice<CustomSoftwareModule> findSoftwareModuleOrderByDistributionModuleNameAscModuleVersionAsc( public Slice<CustomSoftwareModule> findSoftwareModuleOrderBySetAssignmentAndModuleNameAscModuleVersionAsc(
@NotNull final Pageable pageable, @NotNull final Long orderByDistributionId, final String searchText, @NotNull final Pageable pageable, @NotNull final Long orderByDistributionId, final String searchText,
final SoftwareModuleType type) { final SoftwareModuleType type) {

View File

@@ -638,14 +638,14 @@ public class SoftwareManagementTest extends AbstractIntegrationTestWithMongoDB {
softwareManagement.deleteSoftwareModule(deleted); softwareManagement.deleteSoftwareModule(deleted);
// with filter on name, version and module type // with filter on name, version and module type
assertThat(softwareManagement.findSoftwareModuleOrderByDistributionModuleNameAscModuleVersionAsc(pageReq, assertThat(softwareManagement.findSoftwareModuleOrderBySetAssignmentAndModuleNameAscModuleVersionAsc(pageReq,
set.getId(), "found", testType).getContent()) set.getId(), "found", testType).getContent())
.as("Found modules with given name, given module type and the assigned ones first") .as("Found modules with given name, given module type and the assigned ones first")
.containsExactly(new CustomSoftwareModule(one, true), new CustomSoftwareModule(two, true), .containsExactly(new CustomSoftwareModule(one, true), new CustomSoftwareModule(two, true),
new CustomSoftwareModule(unassigned, false)); new CustomSoftwareModule(unassigned, false));
// with filter on module type only // with filter on module type only
assertThat(softwareManagement.findSoftwareModuleOrderByDistributionModuleNameAscModuleVersionAsc(pageReq, assertThat(softwareManagement.findSoftwareModuleOrderBySetAssignmentAndModuleNameAscModuleVersionAsc(pageReq,
set.getId(), null, testType).getContent()) set.getId(), null, testType).getContent())
.as("Found modules with given module type and the assigned ones first").containsExactly( .as("Found modules with given module type and the assigned ones first").containsExactly(
new CustomSoftwareModule(differentName, true), new CustomSoftwareModule(one, true), new CustomSoftwareModule(differentName, true), new CustomSoftwareModule(one, true),
@@ -653,7 +653,7 @@ public class SoftwareManagementTest extends AbstractIntegrationTestWithMongoDB {
// without any filter // without any filter
assertThat(softwareManagement assertThat(softwareManagement
.findSoftwareModuleOrderByDistributionModuleNameAscModuleVersionAsc(pageReq, set.getId(), null, null) .findSoftwareModuleOrderBySetAssignmentAndModuleNameAscModuleVersionAsc(pageReq, set.getId(), null, null)
.getContent()).as("Found modules with the assigned ones first").containsExactly( .getContent()).as("Found modules with the assigned ones first").containsExactly(
new CustomSoftwareModule(differentName, true), new CustomSoftwareModule(one, true), new CustomSoftwareModule(differentName, true), new CustomSoftwareModule(one, true),
new CustomSoftwareModule(two, true), new CustomSoftwareModule(four, true), new CustomSoftwareModule(two, true), new CustomSoftwareModule(four, true),

View File

@@ -77,7 +77,7 @@ public class SwModuleBeanQuery extends AbstractBeanQuery<ProxyBaseSwModuleItem>
final Slice<CustomSoftwareModule> swModuleBeans; final Slice<CustomSoftwareModule> swModuleBeans;
final List<ProxyBaseSwModuleItem> proxyBeans = new ArrayList<>(); final List<ProxyBaseSwModuleItem> proxyBeans = new ArrayList<>();
swModuleBeans = getSoftwareManagement().findSoftwareModuleOrderByDistributionModuleNameAscModuleVersionAsc( swModuleBeans = getSoftwareManagement().findSoftwareModuleOrderBySetAssignmentAndModuleNameAscModuleVersionAsc(
new OffsetBasedPageRequest(startIndex, count), orderByDistId, searchText, type); new OffsetBasedPageRequest(startIndex, count), orderByDistId, searchText, type);
for (final CustomSoftwareModule swModule : swModuleBeans) { for (final CustomSoftwareModule swModule : swModuleBeans) {