diff --git a/mapper/orm/src/main/java/org/hibernate/search/mapper/orm/scope/SearchScope.java b/mapper/orm/src/main/java/org/hibernate/search/mapper/orm/scope/SearchScope.java index c6d8d329a97..34f6615976f 100644 --- a/mapper/orm/src/main/java/org/hibernate/search/mapper/orm/scope/SearchScope.java +++ b/mapper/orm/src/main/java/org/hibernate/search/mapper/orm/scope/SearchScope.java @@ -13,12 +13,12 @@ import org.hibernate.search.engine.search.aggregation.dsl.SearchAggregationFactory; import org.hibernate.search.engine.search.predicate.dsl.SearchPredicateFactory; import org.hibernate.search.engine.search.projection.dsl.SearchProjectionFactory; +import org.hibernate.search.engine.search.query.dsl.SearchQueryHitTypeStep; import org.hibernate.search.engine.search.query.dsl.SearchQueryOptionsStep; import org.hibernate.search.engine.search.query.dsl.SearchQueryPredicateStep; import org.hibernate.search.engine.search.sort.dsl.SearchSortFactory; import org.hibernate.search.mapper.orm.massindexing.MassIndexer; import org.hibernate.search.mapper.orm.work.SearchWorkspace; -import org.hibernate.search.mapper.orm.search.query.dsl.HibernateOrmSearchQueryHitTypeStep; import org.hibernate.search.mapper.orm.common.EntityReference; /** @@ -70,7 +70,7 @@ public interface SearchScope { * created using this scope or another scope instance targeting the same indexes. *

* Note this method is only necessary if you do not want to use lambda expressions, - * since you can {@link HibernateOrmSearchQueryHitTypeStep#asProjection(Function)} define projections with lambdas} + * since you can {@link SearchQueryHitTypeStep#asProjection(Function)} define projections with lambdas} * within the search query DSL, * removing the need to create separate objects to represent the projections. * diff --git a/mapper/orm/src/main/java/org/hibernate/search/mapper/orm/search/query/dsl/HibernateOrmSearchQueryHitTypeStep.java b/mapper/orm/src/main/java/org/hibernate/search/mapper/orm/search/query/dsl/HibernateOrmSearchQueryHitTypeStep.java index d66b6bdb412..a5e298e75d4 100644 --- a/mapper/orm/src/main/java/org/hibernate/search/mapper/orm/search/query/dsl/HibernateOrmSearchQueryHitTypeStep.java +++ b/mapper/orm/src/main/java/org/hibernate/search/mapper/orm/search/query/dsl/HibernateOrmSearchQueryHitTypeStep.java @@ -20,7 +20,9 @@ * or where the predicate can be set directly, assuming that query hits are returned as entities. * * @see SearchQueryHitTypeStep + * @deprecated Use {@link SearchQueryHitTypeStep} instead. */ +@Deprecated public interface HibernateOrmSearchQueryHitTypeStep extends SearchQueryHitTypeStep< SearchQueryOptionsStep, @@ -37,7 +39,9 @@ public interface HibernateOrmSearchQueryHitTypeStep * @param fetchSize The fetch size. Must be positive or zero. * @return {@code this} for method chaining. * @see Query#setFetchSize(int) + * @deprecated Call {@code .loading( o -> o.fetchSize( ... )} near the end of the query definition instead. */ + @Deprecated HibernateOrmSearchQueryHitTypeStep fetchSize(int fetchSize); /** @@ -45,7 +49,9 @@ public interface HibernateOrmSearchQueryHitTypeStep * * @param strategy The strategy. * @return {@code this} for method chaining. + * @deprecated Call {@code .loading( o -> o.cacheLookupStrategy( ... )} near the end of the query definition instead. */ + @Deprecated HibernateOrmSearchQueryHitTypeStep cacheLookupStrategy(EntityLoadingCacheLookupStrategy strategy); } diff --git a/mapper/orm/src/main/java/org/hibernate/search/mapper/orm/session/SearchSession.java b/mapper/orm/src/main/java/org/hibernate/search/mapper/orm/session/SearchSession.java index 354ba28b682..d3c3c2b4092 100644 --- a/mapper/orm/src/main/java/org/hibernate/search/mapper/orm/session/SearchSession.java +++ b/mapper/orm/src/main/java/org/hibernate/search/mapper/orm/session/SearchSession.java @@ -14,6 +14,7 @@ import javax.persistence.EntityManager; import org.hibernate.Session; +import org.hibernate.search.engine.search.query.dsl.SearchQueryHitTypeStep; import org.hibernate.search.mapper.orm.scope.SearchScope; import org.hibernate.search.mapper.orm.work.SearchIndexingPlan; import org.hibernate.search.mapper.orm.work.SearchWorkspace; @@ -30,7 +31,7 @@ public interface SearchSession { * @param type An indexed type, or a supertype of all indexed types that will be targeted by the search query. * @param An indexed type, or a supertype of all indexed types that will be targeted by the search query. * @return The initial step of a DSL where the search query can be defined. - * @see HibernateOrmSearchQueryHitTypeStep + * @see SearchQueryHitTypeStep */ default HibernateOrmSearchQueryHitTypeStep search(Class type) { return search( Collections.singleton( type ) ); @@ -44,7 +45,7 @@ default HibernateOrmSearchQueryHitTypeStep search(Class type) { * @param types A collection of indexed types, or supertypes of all indexed types that will be targeted by the search query. * @param A supertype of all indexed types that will be targeted by the search query. * @return The initial step of a DSL where the search query can be defined. - * @see HibernateOrmSearchQueryHitTypeStep + * @see SearchQueryHitTypeStep */ HibernateOrmSearchQueryHitTypeStep search(Collection> types); @@ -56,7 +57,7 @@ default HibernateOrmSearchQueryHitTypeStep search(Class type) { * @param scope A scope representing all indexed types that will be targeted by the search query. * @param A supertype of all types in the given scope. * @return The initial step of a DSL where the search query can be defined. - * @see HibernateOrmSearchQueryHitTypeStep + * @see SearchQueryHitTypeStep */ HibernateOrmSearchQueryHitTypeStep search(SearchScope scope);