Skip to content

Commit

Permalink
Fix queries for topics, connectors, schemas
Browse files Browse the repository at this point in the history
Signed-off-by: muralibasani <[email protected]>
  • Loading branch information
muralibasani committed Oct 5, 2023
1 parent 372b50d commit ea3e3d6
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ public Iterable<SchemaRequest> findSchemaRequestsByExample(
if (userName != null && !userName.isEmpty()) {
request.setRequestor(userName);
}
if (requestOperationType != null) {
if (requestOperationType != null && !requestOperationType.value.equalsIgnoreCase("all")) {
request.setRequestOperationType(requestOperationType.value);
}

Expand Down Expand Up @@ -663,7 +663,7 @@ private void filterAndAddOperationalRequest(
* Query the TopicRequestsRepo by supplying optional search parameters any given search parameters
* will be utilised in the search.
*
* @param requestType The type of topic request Create/claim etc
* @param requestOperationType The type of topic request Create/claim etc
* @param teamId The identifier of the team
* @param environment the environment
* @param status created/declined/approved
Expand All @@ -673,7 +673,7 @@ private void filterAndAddOperationalRequest(
* @return An Iterable of all TopicRequests that match the parameters that have been supplied
*/
private Iterable<TopicRequest> findTopicRequestsByExample(
String requestType,
String requestOperationType,
Integer teamId,
String environment,
String status,
Expand All @@ -684,8 +684,8 @@ private Iterable<TopicRequest> findTopicRequestsByExample(
TopicRequest request = new TopicRequest();
request.setTenantId(tenantId);

if (requestType != null) {
request.setRequestOperationType(requestType);
if (requestOperationType != null && !requestOperationType.equalsIgnoreCase("all")) {
request.setRequestOperationType(requestOperationType);
}
if (environment != null) {
request.setEnvironment(environment);
Expand Down Expand Up @@ -812,7 +812,7 @@ public List<Topic> getTopicsByTopicNameAndTeamId(String topicName, int teamId, i
* Query the KafkaConnectorRequestsRepo by supplying optional search parameters any given search
* parameters will be utilised in the search.
*
* @param requestType The type of topic request Create/claim etc
* @param requestOperationType The type of topic request Create/claim etc
* @param teamId The identifier of the team
* @param environment the environment
* @param status created/declined/approved
Expand All @@ -821,7 +821,7 @@ public List<Topic> getTopicsByTopicNameAndTeamId(String topicName, int teamId, i
* @return An Iterable of all TopicRequests that match the parameters that have been supplied
*/
private Iterable<KafkaConnectorRequest> findKafkaConnectorRequestsByExample(
String requestType,
String requestOperationType,
Integer teamId,
String environment,
String status,
Expand All @@ -832,8 +832,8 @@ private Iterable<KafkaConnectorRequest> findKafkaConnectorRequestsByExample(
KafkaConnectorRequest request = new KafkaConnectorRequest();
request.setTenantId(tenantId);

if (requestType != null) {
request.setRequestOperationType(requestType);
if (requestOperationType != null && !requestOperationType.equalsIgnoreCase("all")) {
request.setRequestOperationType(requestOperationType);
}
if (environment != null) {
request.setEnvironment(environment);
Expand Down

0 comments on commit ea3e3d6

Please sign in to comment.