Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gh-3250: GetElementsWithinSet bug fix #3251

Merged
merged 11 commits into from
Jul 19, 2024
Merged
2 changes: 1 addition & 1 deletion rest-api/common-rest/src/main/resources/version.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
gaffer.version=2.2.5-SNAPSHOT
gaffer.version=${project.version}
koryphe.version=${koryphe.version}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016-2020 Crown Copyright
* Copyright 2016-2024 Crown Copyright
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -24,7 +24,7 @@
import uk.gov.gchq.gaffer.data.element.id.EntityId;
import uk.gov.gchq.gaffer.data.elementdefinition.view.View;
import uk.gov.gchq.gaffer.operation.Operation;
import uk.gov.gchq.gaffer.operation.graph.GraphFilters;
import uk.gov.gchq.gaffer.operation.graph.SeededGraphFilters;
import uk.gov.gchq.gaffer.operation.io.InputOutput;
import uk.gov.gchq.gaffer.operation.io.MultiEntityIdInput;
import uk.gov.gchq.gaffer.operation.serialisation.TypeReferenceImpl;
Expand All @@ -44,11 +44,12 @@
public class GetElementsWithinSet implements
InputOutput<Iterable<? extends EntityId>, Iterable<? extends Element>>,
MultiEntityIdInput,
GraphFilters {
SeededGraphFilters {
private View view;
private DirectedType directedType;
private Iterable<? extends EntityId> input;
private Map<String, String> options;
private IncludeIncomingOutgoingType includeIncomingOutGoing;

@Override
public View getView() {
Expand Down Expand Up @@ -95,10 +96,21 @@ public void setOptions(final Map<String, String> options) {
this.options = options;
}

@Override
public IncludeIncomingOutgoingType getIncludeIncomingOutGoing() {
return includeIncomingOutGoing;
}

@Override
public void setIncludeIncomingOutGoing(final IncludeIncomingOutgoingType inOutType) {
this.includeIncomingOutGoing = inOutType;
}

@Override
public GetElementsWithinSet shallowClone() {
return new GetElementsWithinSet.Builder()
.view(view)
.inOutType(includeIncomingOutGoing)
.directedType(directedType)
.input(input)
.options(options)
Expand All @@ -108,7 +120,7 @@ public GetElementsWithinSet shallowClone() {
public static class Builder extends Operation.BaseBuilder<GetElementsWithinSet, Builder> implements
InputOutput.Builder<GetElementsWithinSet, Iterable<? extends EntityId>, Iterable<? extends Element>, Builder>,
MultiEntityIdInput.Builder<GetElementsWithinSet, Builder>,
GraphFilters.Builder<GetElementsWithinSet, Builder> {
SeededGraphFilters.Builder<GetElementsWithinSet, Builder> {
public Builder() {
super(new GetElementsWithinSet());
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2020 Crown Copyright
* Copyright 2017-2024 Crown Copyright
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -18,13 +18,15 @@

import uk.gov.gchq.gaffer.accumulostore.operation.impl.GetElementsWithinSet;
import uk.gov.gchq.gaffer.data.element.Element;
import uk.gov.gchq.gaffer.operation.graph.SeededGraphFilters.IncludeIncomingOutgoingType;

public class GetElementsWithinSetDeletedElementsIT extends AbstractDeletedElementsIT<GetElementsWithinSet, Iterable<? extends Element>> {

@Override
protected GetElementsWithinSet createGetOperation() {
return new GetElementsWithinSet.Builder()
.input((Object[]) VERTICES)
.inOutType(IncludeIncomingOutgoingType.OUTGOING)
.build();
}
}
Loading