Skip to content

Commit 2f2108b

Browse files
committed
HSEARCH-3319 Remove now unnecessary withRoot(Reference)
1 parent a48ce8f commit 2f2108b

File tree

6 files changed

+0
-75
lines changed

6 files changed

+0
-75
lines changed

engine/src/main/java/org/hibernate/search/engine/search/aggregation/dsl/SearchAggregationFactory.java

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import java.util.function.Function;
1010

1111
import org.hibernate.search.engine.search.common.NamedValues;
12-
import org.hibernate.search.engine.search.reference.object.ObjectFieldReference;
1312
import org.hibernate.search.util.common.SearchException;
1413
import org.hibernate.search.util.common.annotation.Incubating;
1514

@@ -102,20 +101,6 @@ <T> AggregationFinalStep<T> withParameters(
102101
@Incubating
103102
SearchAggregationFactory<SR> withRoot(String objectFieldPath);
104103

105-
/**
106-
* Create a new aggregation factory whose root for all paths passed to the DSL
107-
* will be the given object field.
108-
* <p>
109-
* See <a href="#field-paths">here</a> for more information.
110-
*
111-
* @param objectFieldReference The reference representing the path from the current root to an object field that will become the new root.
112-
* @return A new aggregation factory using the given object field as root.
113-
*/
114-
@Incubating
115-
default SearchAggregationFactory<SR> withRoot(ObjectFieldReference<? super SR> objectFieldReference) {
116-
return withRoot( objectFieldReference.absolutePath() );
117-
}
118-
119104
/**
120105
* @param relativeFieldPath The path to a field, relative to the {@link #withRoot(String) root} of this factory.
121106
* @return The absolute path of the field, for use in native aggregations for example.

engine/src/main/java/org/hibernate/search/engine/search/predicate/dsl/SearchPredicateFactory.java

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import org.hibernate.search.engine.search.common.BooleanOperator;
1414
import org.hibernate.search.engine.search.common.NamedValues;
1515
import org.hibernate.search.engine.search.predicate.SearchPredicate;
16-
import org.hibernate.search.engine.search.reference.object.ObjectFieldReference;
1716
import org.hibernate.search.engine.search.reference.predicate.NestedPredicateFieldReference;
1817
import org.hibernate.search.util.common.SearchException;
1918
import org.hibernate.search.util.common.annotation.Incubating;
@@ -370,21 +369,6 @@ PredicateFinalStep withParameters(
370369
@Incubating
371370
SearchPredicateFactory<SR> withRoot(String objectFieldPath);
372371

373-
/**
374-
* Create a new predicate factory whose root for all paths passed to the DSL
375-
* will be the given object field.
376-
* <p>
377-
* This is used to call reusable methods that apply the same predicate
378-
* on different object fields that have same structure (same sub-fields).
379-
*
380-
* @param objectFieldReference The reference representing the path from the current root to an object field that will become the new root.
381-
* @return A new predicate factory using the given object field as root.
382-
*/
383-
@Incubating
384-
default SearchPredicateFactory<SR> withRoot(ObjectFieldReference<? super SR> objectFieldReference) {
385-
return withRoot( objectFieldReference.absolutePath() );
386-
}
387-
388372
/**
389373
* @param relativeFieldPath The path to a field, relative to the {@link #withRoot(String) root} of this factory.
390374
* @return The absolute path of the field, for use in native predicates for example.

engine/src/main/java/org/hibernate/search/engine/search/projection/dsl/ExtendedSearchProjectionFactory.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
*/
77
package org.hibernate.search.engine.search.projection.dsl;
88

9-
import org.hibernate.search.engine.search.reference.object.ObjectFieldReference;
10-
119
/**
1210
* A base interface for subtypes of {@link SearchProjectionFactory} allowing to
1311
* easily override the self type for all relevant methods.
@@ -24,9 +22,4 @@ public interface ExtendedSearchProjectionFactory<SR, S extends ExtendedSearchPro
2422
@Override
2523
S withRoot(String objectFieldPath);
2624

27-
28-
@Override
29-
default S withRoot(ObjectFieldReference<? super SR> objectFieldReference) {
30-
return withRoot( objectFieldReference.absolutePath() );
31-
}
3225
}

engine/src/main/java/org/hibernate/search/engine/search/projection/dsl/SearchProjectionFactory.java

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -490,21 +490,6 @@ <T> ProjectionFinalStep<T> withParameters(
490490
@Incubating
491491
SearchProjectionFactory<SR, R, E> withRoot(String objectFieldPath);
492492

493-
/**
494-
* Create a new projection factory whose root for all paths passed to the DSL
495-
* will be the given object field.
496-
* <p>
497-
* This is used to call reusable methods that can apply the same projection
498-
* on different object fields that have same structure (same sub-fields).
499-
*
500-
* @param objectFieldReference The reference representing the path from the current root to an object field that will become the new root.
501-
* @return A new projection factory using the given object field as root.
502-
*/
503-
@Incubating
504-
default SearchProjectionFactory<SR, R, E> withRoot(ObjectFieldReference<? super SR> objectFieldReference) {
505-
return withRoot( objectFieldReference.absolutePath() );
506-
}
507-
508493
/**
509494
* @param relativeFieldPath The path to a field, relative to the {@link #withRoot(String) root} of this factory.
510495
* @return The absolute path of the field, for use in native projections for example.

engine/src/main/java/org/hibernate/search/engine/search/sort/dsl/ExtendedSearchSortFactory.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import java.util.function.Function;
1010

1111
import org.hibernate.search.engine.search.predicate.dsl.SearchPredicateFactory;
12-
import org.hibernate.search.engine.search.reference.object.ObjectFieldReference;
1312
import org.hibernate.search.engine.search.reference.sort.FieldSortFieldReference;
1413
import org.hibernate.search.engine.spatial.GeoPoint;
1514

@@ -33,11 +32,6 @@ public interface ExtendedSearchSortFactory<
3332
@Override
3433
S withRoot(String objectFieldPath);
3534

36-
@Override
37-
default S withRoot(ObjectFieldReference<? super SR> objectFieldReference) {
38-
return withRoot( objectFieldReference.absolutePath() );
39-
}
40-
4135
@Override
4236
FieldSortOptionsStep<SR, ?, PDF> field(String fieldPath);
4337

engine/src/main/java/org/hibernate/search/engine/search/sort/dsl/SearchSortFactory.java

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
import org.hibernate.search.engine.search.common.NamedValues;
1313
import org.hibernate.search.engine.search.predicate.dsl.SearchPredicateFactory;
14-
import org.hibernate.search.engine.search.reference.object.ObjectFieldReference;
1514
import org.hibernate.search.engine.search.reference.sort.FieldSortFieldReference;
1615
import org.hibernate.search.engine.spatial.GeoPoint;
1716
import org.hibernate.search.util.common.SearchException;
@@ -226,21 +225,6 @@ public interface SearchSortFactory<SR> {
226225
@Incubating
227226
SearchSortFactory<SR> withRoot(String objectFieldPath);
228227

229-
/**
230-
* Create a new sort factory whose root for all paths passed to the DSL
231-
* will be the given object field.
232-
* <p>
233-
* This is used to call reusable methods that can apply the same sort
234-
* on different object fields that have same structure (same sub-fields).
235-
*
236-
* @param objectFieldReference The reference representing the path from the current root to an object field that will become the new root.
237-
* @return A new sort factory using the given object field as root.
238-
*/
239-
@Incubating
240-
default SearchSortFactory<SR> withRoot(ObjectFieldReference<? super SR> objectFieldReference) {
241-
return withRoot( objectFieldReference.absolutePath() );
242-
}
243-
244228
/**
245229
* @param relativeFieldPath The path to a field, relative to the {@link #withRoot(String) root} of this factory.
246230
* @return The absolute path of the field, for use in native sorts for example.

0 commit comments

Comments
 (0)