test_class.file: server/src/test/java/io/spine/server/storage/memory/EntityQueryMatcherTest.java
test_class.identifier: EntityQueryMatcherTest
test_case.body: @Test
      @DisplayName("match IDs")
      void matchIds() {
          Message genericId = Sample.messageOfType(ProjectId.class);
          Collection<Object> idFilter = singleton(genericId);
          Any entityId = AnyPacker.pack(genericId);
          EntityQuery<?> query = createQuery(idFilter, defaultQueryParameters());
  
          EntityQueryMatcher<?> matcher = new EntityQueryMatcher<>(query);
          EntityRecord matching = EntityRecord.newBuilder()
                                              .setEntityId(entityId)
                                              .build();
          Any otherEntityId = AnyPacker.pack(Sample.messageOfType(ProjectId.class));
          EntityRecord nonMatching = EntityRecord.newBuilder()
                                                 .setEntityId(otherEntityId)
                                                 .build();
          EntityRecordWithColumns matchingRecord =
                  EntityRecordWithColumns.of(matching, Collections.emptyMap());
          EntityRecordWithColumns nonMatchingRecord =
                  EntityRecordWithColumns.of(nonMatching, Collections.emptyMap());
          assertTrue(matcher.test(matchingRecord));
          assertFalse(matcher.test(nonMatchingRecord));
      }
test_case.class_method_signature: EntityQueryMatcherTest.matchIds()
test_case.full_signature: @Test @DisplayName("match IDs") void matchIds()
test_case.identifier: matchIds
test_case.invocations: messageOfType singleton pack createQuery defaultQueryParameters build setEntityId newBuilder pack messageOfType build setEntityId newBuilder of emptyMap of emptyMap assertTrue test assertFalse test
test_case.modifiers: @Test @DisplayName("match IDs")
test_case.parameters: ()
test_case.return: void
test_case.signature: void matchIds()
focal_class.declarator: acceptedIds
focal_class.modifier: private final
focal_class.original_string: private final Set<Any> acceptedIds;
focal_class.type: Set<Any>
focal_class.var_name: acceptedIds
focal_class.declarator: queryParams
focal_class.modifier: private final
focal_class.original_string: private final QueryParameters queryParams;
focal_class.type: QueryParameters
focal_class.var_name: queryParams
focal_class.file: server/src/main/java/io/spine/server/storage/memory/EntityQueryMatcher.java
focal_class.identifier: EntityQueryMatcher
focal_class.interfaces: implements Predicate<@Nullable EntityRecordWithColumns>
focal_class.class_method_signature: EntityQueryMatcher.EntityQueryMatcher(EntityQuery<I> query)
focal_class.full_signature:   EntityQueryMatcher(EntityQuery<I> query)
focal_class.identifier: EntityQueryMatcher
focal_class.parameters: (EntityQuery<I> query)
focal_class.signature:  EntityQueryMatcher(EntityQuery<I> query)
focal_class.class_method_signature: EntityQueryMatcher.test(@Nullable EntityRecordWithColumns input)
focal_class.full_signature: @Override public boolean test(@Nullable EntityRecordWithColumns input)
focal_class.identifier: test
focal_class.modifiers: @Override public
focal_class.parameters: (@Nullable EntityRecordWithColumns input)
focal_class.return: boolean
focal_class.signature: boolean test(@Nullable EntityRecordWithColumns input)
focal_class.class_method_signature: EntityQueryMatcher.idMatches(EntityRecordWithColumns record)
focal_class.full_signature: private boolean idMatches(EntityRecordWithColumns record)
focal_class.identifier: idMatches
focal_class.modifiers: private
focal_class.parameters: (EntityRecordWithColumns record)
focal_class.return: boolean
focal_class.signature: boolean idMatches(EntityRecordWithColumns record)
focal_class.class_method_signature: EntityQueryMatcher.columnValuesMatch(EntityRecordWithColumns record)
focal_class.full_signature: @SuppressWarnings("EnumSwitchStatementWhichMissesCases") // Only valuable cases covered private boolean columnValuesMatch(EntityRecordWithColumns record)
focal_class.identifier: columnValuesMatch
focal_class.modifiers: @SuppressWarnings("EnumSwitchStatementWhichMissesCases") // Only valuable cases covered private
focal_class.parameters: (EntityRecordWithColumns record)
focal_class.return: boolean
focal_class.signature: boolean columnValuesMatch(EntityRecordWithColumns record)
focal_class.class_method_signature: EntityQueryMatcher.checkAll(Multimap<Column, Filter> filters,
                                      EntityRecordWithColumns record)
focal_class.full_signature: private static boolean checkAll(Multimap<Column, Filter> filters,
                                      EntityRecordWithColumns record)
focal_class.identifier: checkAll
focal_class.modifiers: private static
focal_class.parameters: (Multimap<Column, Filter> filters,
                                      EntityRecordWithColumns record)
focal_class.return: boolean
focal_class.signature: boolean checkAll(Multimap<Column, Filter> filters,
                                      EntityRecordWithColumns record)
focal_class.class_method_signature: EntityQueryMatcher.checkEither(Multimap<Column, Filter> filters,
                                         EntityRecordWithColumns record)
focal_class.full_signature: private static boolean checkEither(Multimap<Column, Filter> filters,
                                         EntityRecordWithColumns record)
focal_class.identifier: checkEither
focal_class.modifiers: private static
focal_class.parameters: (Multimap<Column, Filter> filters,
                                         EntityRecordWithColumns record)
focal_class.return: boolean
focal_class.signature: boolean checkEither(Multimap<Column, Filter> filters,
                                         EntityRecordWithColumns record)
focal_class.class_method_signature: EntityQueryMatcher.matches(EntityRecordWithColumns record,
                                     Map.Entry<Column, Filter> filter)
focal_class.full_signature: private static boolean matches(EntityRecordWithColumns record,
                                     Map.Entry<Column, Filter> filter)
focal_class.identifier: matches
focal_class.modifiers: private static
focal_class.parameters: (EntityRecordWithColumns record,
                                     Map.Entry<Column, Filter> filter)
focal_class.return: boolean
focal_class.signature: boolean matches(EntityRecordWithColumns record,
                                     Map.Entry<Column, Filter> filter)
focal_class.class_method_signature: EntityQueryMatcher.hasColumn(EntityRecordWithColumns record,
                                       Map.Entry<Column, Filter> filter)
focal_class.full_signature: private static boolean hasColumn(EntityRecordWithColumns record,
                                       Map.Entry<Column, Filter> filter)
focal_class.identifier: hasColumn
focal_class.modifiers: private static
focal_class.parameters: (EntityRecordWithColumns record,
                                       Map.Entry<Column, Filter> filter)
focal_class.return: boolean
focal_class.signature: boolean hasColumn(EntityRecordWithColumns record,
                                       Map.Entry<Column, Filter> filter)
focal_class.class_method_signature: EntityQueryMatcher.checkSingleParameter(Filter filter,
                                                  @Nullable Object actualValue,
                                                  Column column)
focal_class.full_signature: private static boolean checkSingleParameter(Filter filter,
                                                  @Nullable Object actualValue,
                                                  Column column)
focal_class.identifier: checkSingleParameter
focal_class.modifiers: private static
focal_class.parameters: (Filter filter,
                                                  @Nullable Object actualValue,
                                                  Column column)
focal_class.return: boolean
focal_class.signature: boolean checkSingleParameter(Filter filter,
                                                  @Nullable Object actualValue,
                                                  Column column)
focal_class.class_method_signature: EntityQueryMatcher.columnValue(EntityRecordWithColumns record,
                                                  Column column)
focal_class.full_signature: private static @Nullable Object columnValue(EntityRecordWithColumns record,
                                                  Column column)
focal_class.identifier: columnValue
focal_class.modifiers: private static @Nullable
focal_class.parameters: (EntityRecordWithColumns record,
                                                  Column column)
focal_class.return: Object
focal_class.signature: Object columnValue(EntityRecordWithColumns record,
                                                  Column column)
focal_method.body: @Override
      public boolean test(@Nullable EntityRecordWithColumns input) {
          if (input == null) {
              return false;
          }
          boolean result = idMatches(input) && columnValuesMatch(input);
          return result;
      }
focal_method.class_method_signature: EntityQueryMatcher.test(@Nullable EntityRecordWithColumns input)
focal_method.full_signature: @Override public boolean test(@Nullable EntityRecordWithColumns input)
focal_method.identifier: test
focal_method.invocations: idMatches columnValuesMatch
focal_method.modifiers: @Override public
focal_method.parameters: (@Nullable EntityRecordWithColumns input)
focal_method.return: boolean
focal_method.signature: boolean test(@Nullable EntityRecordWithColumns input)