Skip to content

Commit

Permalink
Allow adding alternate keys to dataiterator (#6000)
Browse files Browse the repository at this point in the history
- Change getter to return unmodifiable set.
- Add addAlternateKeys
  • Loading branch information
labkey-martyp authored Oct 29, 2024
1 parent 7895f00 commit 60901c5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion api/src/org/labkey/api/dataiterator/DataIteratorContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import org.labkey.api.query.BatchValidationException;
import org.labkey.api.query.QueryUpdateService;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
Expand Down Expand Up @@ -227,7 +228,12 @@ public Set<String> getDontUpdateColumnNames()
@NotNull
public Set<String> getAlternateKeys()
{
return _alternateKeys;
return Collections.unmodifiableSet(_alternateKeys);
}

public void addAlternateKeys(Set<String> alternateKeys)
{
_alternateKeys.addAll(alternateKeys);
}

/** if this etl should be killed, will execute <code>throw _errors;</code> */
Expand Down

0 comments on commit 60901c5

Please sign in to comment.