Skip to content

Commit 205d717

Browse files
Fix spotless issues
1 parent 266e90e commit 205d717

File tree

6 files changed

+29
-15
lines changed

6 files changed

+29
-15
lines changed

entity-service-impl/src/main/java/org/hypertrace/entity/query/service/converter/ValueHelper.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,10 @@ public SubDocumentValue convertToSubDocumentValue(final Value value) throws Conv
171171
throw new ConversionException(String.format("Unsupported value type: %s", type));
172172
}
173173

174-
public List<Document> getDocumentListFromArrayValue(final Value value) throws ConversionException {
175-
final List<Value> values = ARRAY_TO_PRIMITIVE_CONVERTER_MAP.get().get(value.getValueType()).apply(value);
174+
public List<Document> getDocumentListFromArrayValue(final Value value)
175+
throws ConversionException {
176+
final List<Value> values =
177+
ARRAY_TO_PRIMITIVE_CONVERTER_MAP.get().get(value.getValueType()).apply(value);
176178
final List<Document> documents = new ArrayList<>();
177179

178180
for (final Value singleValue : values) {

entity-service-impl/src/main/java/org/hypertrace/entity/query/service/converter/filter/ContainsFilteringExpressionConverter.java

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@
3737
@Singleton
3838
@AllArgsConstructor(onConstructor_ = {@Inject})
3939
public class ContainsFilteringExpressionConverter extends FilteringExpressionConverterBase {
40-
private static final Map<Operator, OperatorPair> OPERATOR_MAP = Map.ofEntries(
41-
entry(Operator.IN, OperatorPair.of(CONTAINS, OR)),
42-
entry(Operator.NOT_IN, OperatorPair.of(NOT_CONTAINS, AND))
43-
);
40+
private static final Map<Operator, OperatorPair> OPERATOR_MAP =
41+
Map.ofEntries(
42+
entry(Operator.IN, OperatorPair.of(CONTAINS, OR)),
43+
entry(Operator.NOT_IN, OperatorPair.of(NOT_CONTAINS, AND)));
4444

4545
private final EntityAttributeMapping entityAttributeMapping;
4646
private final ArrayPathSuffixAddingIdentifierConverter arrayPathSuffixAddingIdentifierConverter;
@@ -76,15 +76,16 @@ public FilterTypeExpression convert(
7676
.operator(operator)
7777
.valueType(valueType)
7878
.build();
79-
final String suffixedSubDocPath = arrayPathSuffixAddingIdentifierConverter.convert(metadata, requestContext);
79+
final String suffixedSubDocPath =
80+
arrayPathSuffixAddingIdentifierConverter.convert(metadata, requestContext);
8081
final IdentifierExpression lhs = IdentifierExpression.of(suffixedSubDocPath);
8182

8283
final List<RelationalExpression> expressions = new ArrayList<>();
8384

8485
for (final Document document : list) {
8586
final ConstantExpression rhs = ConstantExpression.of(document);
86-
final RelationalExpression expression = RelationalExpression.of(lhs,
87-
operatorPair.relationalOperator(), rhs);
87+
final RelationalExpression expression =
88+
RelationalExpression.of(lhs, operatorPair.relationalOperator(), rhs);
8889

8990
expressions.add(expression);
9091
}
@@ -93,7 +94,10 @@ public FilterTypeExpression convert(
9394
return expressions.get(0);
9495
}
9596

96-
return LogicalExpression.builder().operator(operatorPair.logicalOperator()).operands(expressions).build();
97+
return LogicalExpression.builder()
98+
.operator(operatorPair.logicalOperator())
99+
.operands(expressions)
100+
.build();
97101
}
98102

99103
@lombok.Value

entity-service-impl/src/main/java/org/hypertrace/entity/query/service/converter/filter/FilteringExpressionConverterFactory.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88

99
public interface FilteringExpressionConverterFactory {
1010
FilteringExpressionConverter getConverter(
11-
final ColumnIdentifier identifier, final Operator operator, final Value value,
11+
final ColumnIdentifier identifier,
12+
final Operator operator,
13+
final Value value,
1214
final RequestContext context)
1315
throws ConversionException;
1416
}

entity-service-impl/src/main/java/org/hypertrace/entity/query/service/converter/filter/FilteringExpressionConverterFactoryImpl.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ public class FilteringExpressionConverterFactoryImpl
2828

2929
@Override
3030
public FilteringExpressionConverter getConverter(
31-
final ColumnIdentifier identifier, final Operator operator, final Value value,
31+
final ColumnIdentifier identifier,
32+
final Operator operator,
33+
final Value value,
3234
final RequestContext context)
3335
throws ConversionException {
3436
ValueType valueType = value.getValueType();

entity-service-impl/src/main/java/org/hypertrace/entity/query/service/converter/filter/RelationalExpressionConverter.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ public FilterTypeExpression convert(final Filter filter, final RequestContext re
3838
expressionAccessor.access(rhs, rhs.getValueCase(), Set.of(LITERAL));
3939

4040
final FilteringExpressionConverter filteringExpressionConverter =
41-
filteringExpressionConverterFactory.getConverter(identifier, operator, literal.getValue(), requestContext);
41+
filteringExpressionConverterFactory.getConverter(
42+
identifier, operator, literal.getValue(), requestContext);
4243
return filteringExpressionConverter.convert(identifier, operator, literal, requestContext);
4344
}
4445
}

entity-service-impl/src/test/java/org/hypertrace/entity/query/service/converter/filter/RelationalExpressionConverterTest.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,11 @@ void setup() throws ConversionException {
6767
doReturn(constantExpression)
6868
.when(constantExpressionConverter)
6969
.convert(literalConstant, requestContext);
70-
when(filteringExpressionConverterFactory.getConverter(any(ColumnIdentifier.class), any(Operator.class),
71-
any(Value.class), any(RequestContext.class)))
70+
when(filteringExpressionConverterFactory.getConverter(
71+
any(ColumnIdentifier.class),
72+
any(Operator.class),
73+
any(Value.class),
74+
any(RequestContext.class)))
7275
.thenReturn(filteringExpressionConverter);
7376
}
7477

0 commit comments

Comments
 (0)