Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HCMPRE-400 : plan config name - implement fuzzy search #873

Merged
merged 8 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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 @@ -167,4 +167,6 @@ public class ServiceConstants {

public static final String NAME_VALIDATION_DATA = "Data";

public static final String PERCENTAGE_WILDCARD = "%";

}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils;
import static digit.config.ServiceConstants.*;
tanishi-egov marked this conversation as resolved.
Show resolved Hide resolved

@Component
public class PlanConfigQueryBuilder {
Expand Down Expand Up @@ -105,8 +106,8 @@ private String buildPlanConfigSearchQuery(PlanConfigurationSearchCriteria criter

if (criteria.getName() != null) {
addClauseIfRequired(preparedStmtList, builder);
builder.append(" pc.name = ?");
preparedStmtList.add(criteria.getName());
builder.append(" pc.name LIKE ?");
preparedStmtList.add(criteria.getName() + PERCENTAGE_WILDCARD);
}

if (criteria.getStatus() != null) {
Expand Down
Loading