test_class.declarator: hibernateSearchService
test_class.modifier: private
test_class.original_string: private HibernateSearchService hibernateSearchService;
test_class.type: HibernateSearchService
test_class.var_name: hibernateSearchService
test_class.file: backend/project-board/src/test/java/de/adesso/projectboard/base/search/HibernateSearchServiceTest.java
test_class.identifier: HibernateSearchServiceTest
test_case.body: @Test
      public void getQuerySearchingForAllIndexedFieldsThrowsExceptionWhenNotAnEntity() {
          // given / when / then
          assertThatThrownBy(() -> hibernateSearchService.getQuerySearchingForAllIndexedFields(String.class, ""))
                  .isInstanceOf(IllegalArgumentException.class)
                  .hasMessage("Given type is not an entity or is not indexed!");
      }
test_case.class_method_signature: HibernateSearchServiceTest.getQuerySearchingForAllIndexedFieldsThrowsExceptionWhenNotAnEntity()
test_case.full_signature: @Test public void getQuerySearchingForAllIndexedFieldsThrowsExceptionWhenNotAnEntity()
test_case.identifier: getQuerySearchingForAllIndexedFieldsThrowsExceptionWhenNotAnEntity
test_case.invocations: hasMessage isInstanceOf assertThatThrownBy getQuerySearchingForAllIndexedFields
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void getQuerySearchingForAllIndexedFieldsThrowsExceptionWhenNotAnEntity()
focal_class.declarator: MAX_CLAUSE_COUNT = 4096
focal_class.modifier: private static final
focal_class.original_string: private static final int MAX_CLAUSE_COUNT = 4096;
focal_class.type: int
focal_class.var_name: MAX_CLAUSE_COUNT
focal_class.declarator: LOB_FIELD_NAME = "lob"
focal_class.modifier: private static final
focal_class.original_string: private static final String LOB_FIELD_NAME = "lob";
focal_class.type: String
focal_class.var_name: LOB_FIELD_NAME
focal_class.declarator: STATUS_FIELD_NAME = "status"
focal_class.modifier: private static final
focal_class.original_string: private static final String STATUS_FIELD_NAME = "status";
focal_class.type: String
focal_class.var_name: STATUS_FIELD_NAME
focal_class.declarator: entityManager
focal_class.modifier: @PersistenceContext
focal_class.original_string: @PersistenceContext
      EntityManager entityManager;
focal_class.type: EntityManager
focal_class.var_name: entityManager
focal_class.declarator: classIndexedFieldMap
focal_class.modifier: final
focal_class.original_string: final Map<Class<?>, List<String>> classIndexedFieldMap;
focal_class.type: Map<Class<?>, List<String>>
focal_class.var_name: classIndexedFieldMap
focal_class.declarator: statusWithLobConstraint
focal_class.modifier: private final
focal_class.original_string: private final Set<String> statusWithLobConstraint;
focal_class.type: Set<String>
focal_class.var_name: statusWithLobConstraint
focal_class.declarator: excludedStatus
focal_class.modifier: private final
focal_class.original_string: private final Set<String> excludedStatus;
focal_class.type: Set<String>
focal_class.var_name: excludedStatus
focal_class.file: backend/project-board/src/main/java/de/adesso/projectboard/base/search/HibernateSearchService.java
focal_class.identifier: HibernateSearchService
focal_class.class_method_signature: HibernateSearchService.HibernateSearchService(@NotNull Collection<String> statusWithLobConstraint, @NotNull Collection<String> excludedStatus)
focal_class.full_signature: public  HibernateSearchService(@NotNull Collection<String> statusWithLobConstraint, @NotNull Collection<String> excludedStatus)
focal_class.identifier: HibernateSearchService
focal_class.modifiers: public
focal_class.parameters: (@NotNull Collection<String> statusWithLobConstraint, @NotNull Collection<String> excludedStatus)
focal_class.signature:  HibernateSearchService(@NotNull Collection<String> statusWithLobConstraint, @NotNull Collection<String> excludedStatus)
focal_class.class_method_signature: HibernateSearchService.searchProjects(@NonNull String simpleQueryString, String lob)
focal_class.full_signature: @SuppressWarnings("unchecked") public List<Project> searchProjects(@NonNull String simpleQueryString, String lob)
focal_class.identifier: searchProjects
focal_class.modifiers: @SuppressWarnings("unchecked") public
focal_class.parameters: (@NonNull String simpleQueryString, String lob)
focal_class.return: List<Project>
focal_class.signature: List<Project> searchProjects(@NonNull String simpleQueryString, String lob)
focal_class.class_method_signature: HibernateSearchService.searchProjects(@NonNull String simpleQueryString, @NonNull Pageable pageable, String lob)
focal_class.full_signature: @SuppressWarnings("unchecked") public Page<Project> searchProjects(@NonNull String simpleQueryString, @NonNull Pageable pageable, String lob)
focal_class.identifier: searchProjects
focal_class.modifiers: @SuppressWarnings("unchecked") public
focal_class.parameters: (@NonNull String simpleQueryString, @NonNull Pageable pageable, String lob)
focal_class.return: Page<Project>
focal_class.signature: Page<Project> searchProjects(@NonNull String simpleQueryString, @NonNull Pageable pageable, String lob)
focal_class.class_method_signature: HibernateSearchService.searchUserData(@NonNull List<User> users, @NonNull String simpleQueryString)
focal_class.full_signature: @SuppressWarnings("unchecked") public List<UserData> searchUserData(@NonNull List<User> users, @NonNull String simpleQueryString)
focal_class.identifier: searchUserData
focal_class.modifiers: @SuppressWarnings("unchecked") public
focal_class.parameters: (@NonNull List<User> users, @NonNull String simpleQueryString)
focal_class.return: List<UserData>
focal_class.signature: List<UserData> searchUserData(@NonNull List<User> users, @NonNull String simpleQueryString)
focal_class.class_method_signature: HibernateSearchService.getProjectBaseQuery(String simpleQueryString, String lob)
focal_class.full_signature: private Query getProjectBaseQuery(String simpleQueryString, String lob)
focal_class.identifier: getProjectBaseQuery
focal_class.modifiers: private
focal_class.parameters: (String simpleQueryString, String lob)
focal_class.return: Query
focal_class.signature: Query getProjectBaseQuery(String simpleQueryString, String lob)
focal_class.class_method_signature: HibernateSearchService.buildLobIndependentOrLobNullOrEqualQuery(QueryBuilder queryBuilder, String lob)
focal_class.full_signature: private Query buildLobIndependentOrLobNullOrEqualQuery(QueryBuilder queryBuilder, String lob)
focal_class.identifier: buildLobIndependentOrLobNullOrEqualQuery
focal_class.modifiers: private
focal_class.parameters: (QueryBuilder queryBuilder, String lob)
focal_class.return: Query
focal_class.signature: Query buildLobIndependentOrLobNullOrEqualQuery(QueryBuilder queryBuilder, String lob)
focal_class.class_method_signature: HibernateSearchService.buildNotInQuery(QueryBuilder queryBuilder, String fieldName, Collection<String> unwantedValues)
focal_class.full_signature: private Query buildNotInQuery(QueryBuilder queryBuilder, String fieldName, Collection<String> unwantedValues)
focal_class.identifier: buildNotInQuery
focal_class.modifiers: private
focal_class.parameters: (QueryBuilder queryBuilder, String fieldName, Collection<String> unwantedValues)
focal_class.return: Query
focal_class.signature: Query buildNotInQuery(QueryBuilder queryBuilder, String fieldName, Collection<String> unwantedValues)
focal_class.class_method_signature: HibernateSearchService.buildInQuery(QueryBuilder queryBuilder, String fieldName, Collection<String> wantedValues)
focal_class.full_signature: private Query buildInQuery(QueryBuilder queryBuilder, String fieldName, Collection<String> wantedValues)
focal_class.identifier: buildInQuery
focal_class.modifiers: private
focal_class.parameters: (QueryBuilder queryBuilder, String fieldName, Collection<String> wantedValues)
focal_class.return: Query
focal_class.signature: Query buildInQuery(QueryBuilder queryBuilder, String fieldName, Collection<String> wantedValues)
focal_class.class_method_signature: HibernateSearchService.buildFieldValueEqualsQuery(QueryBuilder queryBuilder, String fieldName, String value)
focal_class.full_signature: private Query buildFieldValueEqualsQuery(QueryBuilder queryBuilder, String fieldName, String value)
focal_class.identifier: buildFieldValueEqualsQuery
focal_class.modifiers: private
focal_class.parameters: (QueryBuilder queryBuilder, String fieldName, String value)
focal_class.return: Query
focal_class.signature: Query buildFieldValueEqualsQuery(QueryBuilder queryBuilder, String fieldName, String value)
focal_class.class_method_signature: HibernateSearchService.getQuerySearchingForAllIndexedFields(Class<?> entityType, String simpleQueryString)
focal_class.full_signature:  Query getQuerySearchingForAllIndexedFields(Class<?> entityType, String simpleQueryString)
focal_class.identifier: getQuerySearchingForAllIndexedFields
focal_class.parameters: (Class<?> entityType, String simpleQueryString)
focal_class.return: Query
focal_class.signature: Query getQuerySearchingForAllIndexedFields(Class<?> entityType, String simpleQueryString)
focal_class.class_method_signature: HibernateSearchService.getNamesOfAnnotatedStringFields(Class<?> entityType)
focal_class.full_signature:  List<String> getNamesOfAnnotatedStringFields(Class<?> entityType)
focal_class.identifier: getNamesOfAnnotatedStringFields
focal_class.parameters: (Class<?> entityType)
focal_class.return: List<String>
focal_class.signature: List<String> getNamesOfAnnotatedStringFields(Class<?> entityType)
focal_class.class_method_signature: HibernateSearchService.isIndexedEntity(Class<?> entityType)
focal_class.full_signature:  boolean isIndexedEntity(Class<?> entityType)
focal_class.identifier: isIndexedEntity
focal_class.parameters: (Class<?> entityType)
focal_class.return: boolean
focal_class.signature: boolean isIndexedEntity(Class<?> entityType)
focal_class.class_method_signature: HibernateSearchService.indexExistingEntities(EntityManager initEntityManager)
focal_class.full_signature:  void indexExistingEntities(EntityManager initEntityManager)
focal_class.identifier: indexExistingEntities
focal_class.parameters: (EntityManager initEntityManager)
focal_class.return: void
focal_class.signature: void indexExistingEntities(EntityManager initEntityManager)
focal_class.class_method_signature: HibernateSearchService.getFullTextEntityManager()
focal_class.full_signature:  FullTextEntityManager getFullTextEntityManager()
focal_class.identifier: getFullTextEntityManager
focal_class.parameters: ()
focal_class.return: FullTextEntityManager
focal_class.signature: FullTextEntityManager getFullTextEntityManager()
focal_class.class_method_signature: HibernateSearchService.getQueryBuilder(Class<?> type)
focal_class.full_signature:  QueryBuilder getQueryBuilder(Class<?> type)
focal_class.identifier: getQueryBuilder
focal_class.parameters: (Class<?> type)
focal_class.return: QueryBuilder
focal_class.signature: QueryBuilder getQueryBuilder(Class<?> type)
focal_class.class_method_signature: HibernateSearchService.allToLowerCase(Collection<String> collection)
focal_class.full_signature: private Set<String> allToLowerCase(Collection<String> collection)
focal_class.identifier: allToLowerCase
focal_class.modifiers: private
focal_class.parameters: (Collection<String> collection)
focal_class.return: Set<String>
focal_class.signature: Set<String> allToLowerCase(Collection<String> collection)
focal_method.body: Query getQuerySearchingForAllIndexedFields(Class<?> entityType, String simpleQueryString) {
          if(!isIndexedEntity(entityType)) {
              throw new IllegalArgumentException("Given type is not an entity or is not indexed!");
          }
  
          var annotatedStringFields = getNamesOfAnnotatedStringFields(entityType);
          if(annotatedStringFields.isEmpty()) {
              throw new IllegalArgumentException("No field of type String annotated with @Field!");
          }
  
          var fuzzyAndPrefixQuery = HibernateSimpleQueryUtils.makeQueryPrefixAndFuzzy(simpleQueryString);
  
          var queryBuilder = getQueryBuilder(entityType);
          return queryBuilder.simpleQueryString()
                  .onFields(annotatedStringFields.get(0), annotatedStringFields.subList(1, annotatedStringFields.size()).toArray(String[]::new))
                  .withAndAsDefaultOperator()
                  .matching(fuzzyAndPrefixQuery)
                  .createQuery();
      }
focal_method.class_method_signature: HibernateSearchService.getQuerySearchingForAllIndexedFields(Class<?> entityType, String simpleQueryString)
focal_method.full_signature:  Query getQuerySearchingForAllIndexedFields(Class<?> entityType, String simpleQueryString)
focal_method.identifier: getQuerySearchingForAllIndexedFields
focal_method.invocations: isIndexedEntity getNamesOfAnnotatedStringFields isEmpty makeQueryPrefixAndFuzzy getQueryBuilder createQuery matching withAndAsDefaultOperator onFields simpleQueryString get toArray subList size
focal_method.parameters: (Class<?> entityType, String simpleQueryString)
focal_method.return: Query
focal_method.signature: Query getQuerySearchingForAllIndexedFields(Class<?> entityType, String simpleQueryString)