Rename JpaPidValueTuples
This commit is contained in:
parent
815a346122
commit
5221a6e52a
|
@ -24,7 +24,7 @@ import ca.uhn.fhir.jpa.api.svc.IIdHelperService;
|
|||
import ca.uhn.fhir.jpa.dao.predicate.SearchFilterParser;
|
||||
import ca.uhn.fhir.jpa.model.dao.JpaPid;
|
||||
import ca.uhn.fhir.jpa.search.builder.sql.ColumnTupleObject;
|
||||
import ca.uhn.fhir.jpa.search.builder.sql.JpaPidValueTupleObject;
|
||||
import ca.uhn.fhir.jpa.search.builder.sql.JpaPidValueTuples;
|
||||
import ca.uhn.fhir.jpa.search.builder.sql.SearchQueryBuilder;
|
||||
import ca.uhn.fhir.jpa.util.QueryParameterUtils;
|
||||
import ca.uhn.fhir.model.api.IQueryParameterType;
|
||||
|
@ -138,7 +138,7 @@ public class ResourceIdPredicateBuilder extends BasePredicateBuilder {
|
|||
} else {
|
||||
if (getSearchQueryBuilder().isIncludePartitionIdInJoins()) {
|
||||
ColumnTupleObject left = new ColumnTupleObject(theSourceJoinColumn);
|
||||
JpaPidValueTupleObject right = JpaPidValueTupleObject.from(getSearchQueryBuilder(), allOrPids);
|
||||
JpaPidValueTuples right = JpaPidValueTuples.from(getSearchQueryBuilder(), allOrPids);
|
||||
return QueryParameterUtils.toInPredicate(
|
||||
left, right, operation == SearchFilterParser.CompareOperation.ne);
|
||||
} else {
|
||||
|
|
|
@ -43,7 +43,7 @@ import ca.uhn.fhir.jpa.search.SearchCoordinatorSvcImpl;
|
|||
import ca.uhn.fhir.jpa.search.builder.QueryStack;
|
||||
import ca.uhn.fhir.jpa.search.builder.models.MissingQueryParameterPredicateParams;
|
||||
import ca.uhn.fhir.jpa.search.builder.sql.ColumnTupleObject;
|
||||
import ca.uhn.fhir.jpa.search.builder.sql.JpaPidValueTupleObject;
|
||||
import ca.uhn.fhir.jpa.search.builder.sql.JpaPidValueTuples;
|
||||
import ca.uhn.fhir.jpa.search.builder.sql.SearchQueryBuilder;
|
||||
import ca.uhn.fhir.jpa.searchparam.MatchUrlService;
|
||||
import ca.uhn.fhir.jpa.searchparam.ResourceMetaParams;
|
||||
|
@ -812,7 +812,7 @@ public class ResourceLinkPredicateBuilder extends BaseJoiningPredicateBuilder im
|
|||
// with ids in or equal to this value
|
||||
if (getSearchQueryBuilder().isIncludePartitionIdInJoins()) {
|
||||
Object left = ColumnTupleObject.from(getJoinColumnsForTarget());
|
||||
JpaPidValueTupleObject right = JpaPidValueTupleObject.from(getSearchQueryBuilder(), theTargetPids);
|
||||
JpaPidValueTuples right = JpaPidValueTuples.from(getSearchQueryBuilder(), theTargetPids);
|
||||
condition = new InCondition(left, right);
|
||||
} else {
|
||||
condition = QueryParameterUtils.toEqualToOrInPredicate(
|
||||
|
|
|
@ -35,11 +35,11 @@ import java.util.List;
|
|||
* Outputs an SQL tuple for a collection of JpaPids, consisting of
|
||||
* ((resId,partitionId),(resId,partitionId),(resId,partitionId),...)
|
||||
*/
|
||||
public class JpaPidValueTupleObject extends Expression {
|
||||
public class JpaPidValueTuples extends Expression {
|
||||
|
||||
private final Collection<String> myValues;
|
||||
|
||||
public JpaPidValueTupleObject(Collection<String> theValues) {
|
||||
public JpaPidValueTuples(Collection<String> theValues) {
|
||||
myValues = theValues;
|
||||
}
|
||||
|
||||
|
@ -72,16 +72,16 @@ public class JpaPidValueTupleObject extends Expression {
|
|||
}
|
||||
}
|
||||
|
||||
public static JpaPidValueTupleObject from(SearchQueryBuilder theSearchQueryBuilder, JpaPid[] thePids) {
|
||||
public static JpaPidValueTuples from(SearchQueryBuilder theSearchQueryBuilder, JpaPid[] thePids) {
|
||||
return from(theSearchQueryBuilder, Arrays.asList(thePids));
|
||||
}
|
||||
|
||||
public static JpaPidValueTupleObject from(SearchQueryBuilder theSearchQueryBuilder, Collection<JpaPid> thePids) {
|
||||
public static JpaPidValueTuples from(SearchQueryBuilder theSearchQueryBuilder, Collection<JpaPid> thePids) {
|
||||
List<String> placeholders = new ArrayList<>(thePids.size() * 2);
|
||||
for (JpaPid next : thePids) {
|
||||
placeholders.add(theSearchQueryBuilder.generatePlaceholder(next.getPartitionId()));
|
||||
placeholders.add(theSearchQueryBuilder.generatePlaceholder(next.getId()));
|
||||
}
|
||||
return new JpaPidValueTupleObject(placeholders);
|
||||
return new JpaPidValueTuples(placeholders);
|
||||
}
|
||||
}
|
|
@ -27,7 +27,7 @@ import ca.uhn.fhir.jpa.entity.SearchTypeEnum;
|
|||
import ca.uhn.fhir.jpa.model.entity.ResourceTable;
|
||||
import ca.uhn.fhir.jpa.model.search.SearchStatusEnum;
|
||||
import ca.uhn.fhir.jpa.search.builder.sql.ColumnTupleObject;
|
||||
import ca.uhn.fhir.jpa.search.builder.sql.JpaPidValueTupleObject;
|
||||
import ca.uhn.fhir.jpa.search.builder.sql.JpaPidValueTuples;
|
||||
import ca.uhn.fhir.jpa.searchparam.SearchParameterMap;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.primitive.InstantDt;
|
||||
|
@ -122,7 +122,7 @@ public class QueryParameterUtils {
|
|||
|
||||
@Nonnull
|
||||
public static Condition toInPredicate(
|
||||
ColumnTupleObject theColumns, JpaPidValueTupleObject theValues, boolean theInverse) {
|
||||
ColumnTupleObject theColumns, JpaPidValueTuples theValues, boolean theInverse) {
|
||||
return new InCondition(theColumns, theValues).setNegate(theInverse);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue