test_class.file: request-parameters/src/test/java/eu/neoteric/starter/request/FiltersParserTest.java
test_class.identifier: FiltersParserTest
test_case.body: @Test
      public void testMultipleFieldsWithOperator() throws Exception {
          Map<String, Object> rawFilters = readFiltersFromResources("MultipleFieldsWithOperator.json");
  
          Map<RequestObject, Object> filters = FiltersParser.parseFilters(rawFilters);
          Assertions.assertThat(filters)
                  .hasSize(2)
                  .containsOnlyKeys(RequestField.of("name"), RequestField.of("size"));
  
          assertThat((Map) filters.get(RequestField.of("name")))
                  .containsEntry(RequestOperator.of(OperatorType.EQUAL.getName()), "John");
          assertThat((Map) filters.get(RequestField.of("size")))
                  .containsEntry(RequestOperator.of(OperatorType.GREATER_THAN_EQUAL.getName()), "5");
      }
test_case.class_method_signature: FiltersParserTest.testMultipleFieldsWithOperator()
test_case.full_signature: @Test public void testMultipleFieldsWithOperator()
test_case.identifier: testMultipleFieldsWithOperator
test_case.invocations: readFiltersFromResources parseFilters containsOnlyKeys hasSize assertThat of of containsEntry assertThat get of of getName containsEntry assertThat get of of getName
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testMultipleFieldsWithOperator()
focal_class.declarator: LOG = LoggerFactory.getLogger(FiltersParser.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOG = LoggerFactory.getLogger(FiltersParser.class);
focal_class.type: Logger
focal_class.var_name: LOG
focal_class.file: request-parameters/src/main/java/eu/neoteric/starter/request/FiltersParser.java
focal_class.identifier: FiltersParser
focal_class.class_method_signature: FiltersParser.FiltersParser()
focal_class.full_signature: private  FiltersParser()
focal_class.identifier: FiltersParser
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  FiltersParser()
focal_class.class_method_signature: FiltersParser.parseFilters(Map<String, Object> rawFilters)
focal_class.full_signature: public static Map<RequestObject, Object> parseFilters(Map<String, Object> rawFilters)
focal_class.identifier: parseFilters
focal_class.modifiers: public static
focal_class.parameters: (Map<String, Object> rawFilters)
focal_class.return: Map<RequestObject, Object>
focal_class.signature: Map<RequestObject, Object> parseFilters(Map<String, Object> rawFilters)
focal_class.class_method_signature: FiltersParser.processRootLogicalOperatorValue(Map<String, Object> orEntry)
focal_class.full_signature: private static Map<RequestObject, Object> processRootLogicalOperatorValue(Map<String, Object> orEntry)
focal_class.identifier: processRootLogicalOperatorValue
focal_class.modifiers: private static
focal_class.parameters: (Map<String, Object> orEntry)
focal_class.return: Map<RequestObject, Object>
focal_class.signature: Map<RequestObject, Object> processRootLogicalOperatorValue(Map<String, Object> orEntry)
focal_class.class_method_signature: FiltersParser.processLogicalOperatorValue(Map<String, Object> orEntry)
focal_class.full_signature: private static Map<RequestObject, Object> processLogicalOperatorValue(Map<String, Object> orEntry)
focal_class.identifier: processLogicalOperatorValue
focal_class.modifiers: private static
focal_class.parameters: (Map<String, Object> orEntry)
focal_class.return: Map<RequestObject, Object>
focal_class.signature: Map<RequestObject, Object> processLogicalOperatorValue(Map<String, Object> orEntry)
focal_class.class_method_signature: FiltersParser.processFieldValue(Map<String, Object> fieldEntry)
focal_class.full_signature: private static Map<RequestObject, Object> processFieldValue(Map<String, Object> fieldEntry)
focal_class.identifier: processFieldValue
focal_class.modifiers: private static
focal_class.parameters: (Map<String, Object> fieldEntry)
focal_class.return: Map<RequestObject, Object>
focal_class.signature: Map<RequestObject, Object> processFieldValue(Map<String, Object> fieldEntry)
focal_class.class_method_signature: FiltersParser.isLogicalOperator(String key)
focal_class.full_signature: private static boolean isLogicalOperator(String key)
focal_class.identifier: isLogicalOperator
focal_class.modifiers: private static
focal_class.parameters: (String key)
focal_class.return: boolean
focal_class.signature: boolean isLogicalOperator(String key)
focal_class.class_method_signature: FiltersParser.isOperator(String key)
focal_class.full_signature: private static boolean isOperator(String key)
focal_class.identifier: isOperator
focal_class.modifiers: private static
focal_class.parameters: (String key)
focal_class.return: boolean
focal_class.signature: boolean isOperator(String key)
focal_class.class_method_signature: FiltersParser.isField(String key)
focal_class.full_signature: private static boolean isField(String key)
focal_class.identifier: isField
focal_class.modifiers: private static
focal_class.parameters: (String key)
focal_class.return: boolean
focal_class.signature: boolean isField(String key)
focal_class.class_method_signature: FiltersParser.isNotOperatorNorLogicalOperator(String key)
focal_class.full_signature: private static boolean isNotOperatorNorLogicalOperator(String key)
focal_class.identifier: isNotOperatorNorLogicalOperator
focal_class.modifiers: private static
focal_class.parameters: (String key)
focal_class.return: boolean
focal_class.signature: boolean isNotOperatorNorLogicalOperator(String key)
focal_class.class_method_signature: FiltersParser.isNotFieldNorLogicalOperator(String key)
focal_class.full_signature: private static boolean isNotFieldNorLogicalOperator(String key)
focal_class.identifier: isNotFieldNorLogicalOperator
focal_class.modifiers: private static
focal_class.parameters: (String key)
focal_class.return: boolean
focal_class.signature: boolean isNotFieldNorLogicalOperator(String key)
focal_method.body: public static Map<RequestObject, Object> parseFilters(Map<String, Object> rawFilters) {
          Map<RequestObject, Object> requestParameters = new HashMap<>();
  
          rawFilters.forEach((key, entry) -> {
              if (isNotFieldNorLogicalOperator(key)) {
                  throw new IllegalStateException(key + " isNotFieldNorLogicalOperator");
              }
              if (isField(key)) {
                  if (!(entry instanceof Map)) {
                      throw new IllegalStateException("Bad value (" + entry + ") type for field: " + entry.getClass().toString());
                  }
                  requestParameters.put(RequestField.of(key), processFieldValue((Map) entry));
              } else {
                  if (!(entry instanceof Map)) {
                      throw new IllegalStateException("Bad value (" + entry + ") type for or operation: " + entry.getClass().toString());
                  }
                  requestParameters.put(RequestLogicalOperator.of(key), processRootLogicalOperatorValue((Map) entry));
              }
          });
          LOG.info("Parsed filters: {}", requestParameters);
          return requestParameters;
      }
focal_method.class_method_signature: FiltersParser.parseFilters(Map<String, Object> rawFilters)
focal_method.full_signature: public static Map<RequestObject, Object> parseFilters(Map<String, Object> rawFilters)
focal_method.identifier: parseFilters
focal_method.invocations: forEach isNotFieldNorLogicalOperator isField toString getClass put of processFieldValue toString getClass put of processRootLogicalOperatorValue info
focal_method.modifiers: public static
focal_method.parameters: (Map<String, Object> rawFilters)
focal_method.return: Map<RequestObject, Object>
focal_method.signature: Map<RequestObject, Object> parseFilters(Map<String, Object> rawFilters)