Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
f8249bd
checkpoint - migrate to using long/Long to represent any integer ID v…
labkey-matthewb Jul 29, 2025
bd03b00
missed a repo
labkey-matthewb Jul 29, 2025
c910db7
mock fix
labkey-matthewb Jul 29, 2025
69b90bc
Merge remote-tracking branch 'origin/develop' into fb_long_is_the_new…
labkey-matthewb Jul 31, 2025
a248c6d
collections -> collections4
labkey-matthewb Aug 2, 2025
805e28d
fix cast
labkey-matthewb Aug 2, 2025
2a6c47e
getValueMap() -> getValueMap(Class)
labkey-matthewb Aug 4, 2025
2a82104
go all in on IntHashMap and LongHashMap
labkey-matthewb Aug 4, 2025
2853b0b
Nab Integer->Long
labkey-matthewb Aug 4, 2025
76e52c5
Merge remote-tracking branch 'origin/develop' into fb_long_is_the_new…
labkey-matthewb Aug 4, 2025
38c917c
mismatched getter/setter
labkey-matthewb Aug 4, 2025
2e34910
remove (Integer) casts
labkey-matthewb Aug 6, 2025
393b9f9
Merge remote-tracking branch 'origin/develop' into fb_long_is_the_new…
labkey-matthewb Aug 6, 2025
b30b8fe
Update all ObjectIds to BIGINT
labkey-adam Aug 7, 2025
9aaeeb1
Fix typo
labkey-adam Aug 7, 2025
2d6eeff
(Integer)
labkey-matthewb Aug 8, 2025
53337c0
Bump module schema version so protein FK fix script actually runs
labkey-adam Aug 8, 2025
9b5733b
(Integer)
labkey-matthewb Aug 8, 2025
ced69f8
(Integer)
labkey-matthewb Aug 8, 2025
2eb8fe7
Eliminate Elispot Integer cast. Log exceptions.
labkey-adam Aug 9, 2025
03b3943
LongHashSet structural search/replace
labkey-matthewb Aug 12, 2025
1497cba
asInteger()
labkey-matthewb Aug 12, 2025
dfbe83f
instanceof Integer
labkey-matthewb Aug 13, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion elisa/src/org/labkey/elisa/ElisaAssayProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ public Collection<StatsService.CurveFitType> getCurveFits()
protected void moveAssayResults(List<ExpRun> runs, ExpProtocol protocol, Container sourceContainer, Container targetContainer, User user, AssayMoveData assayMoveData) throws ExperimentException
{
super.moveAssayResults(runs, protocol, sourceContainer, targetContainer, user, assayMoveData); // assay results
List<Integer> runRowIds = runs.stream().map(ExpRun::getRowId).toList();
List<Long> runRowIds = runs.stream().map(ExpRun::getRowId).toList();

// move specimen
String tableName = AssayProtocolSchema.DATA_TABLE_NAME;
Expand Down
12 changes: 6 additions & 6 deletions elisa/src/org/labkey/elisa/ElisaController.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,17 @@ public ElisaController()

public static class RunDetailsForm
{
private int _protocolId;
private int _runId;
private long _protocolId;
private long _runId;
private String _runName;
private String _schemaName;

public int getRunId()
public long getRunId()
{
return _runId;
}

public void setRunId(int runId)
public void setRunId(long runId)
{
_runId = runId;
}
Expand All @@ -90,12 +90,12 @@ public void setSchemaName(String schemaName)
_schemaName = schemaName;
}

public int getProtocolId()
public long getProtocolId()
{
return _protocolId;
}

public void setProtocolId(int protocolId)
public void setProtocolId(long protocolId)
{
_protocolId = protocolId;
}
Expand Down
2 changes: 1 addition & 1 deletion elisa/src/org/labkey/elisa/ElisaDataHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ public void beforeDeleteData(List<ExpData> datas, User user) throws ExperimentEx
{
super.beforeDeleteData(datas, user);

Set<Integer> runIds = new HashSet<>();
Set<Long> runIds = new HashSet<>();
for (ExpData data : datas)
{
if (null != data.getRunId())
Expand Down
7 changes: 4 additions & 3 deletions elisa/src/org/labkey/elisa/HighThroughputImportHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import org.labkey.api.assay.plate.PositionImpl;
import org.labkey.api.assay.plate.Well;
import org.labkey.api.assay.plate.WellGroup;
import org.labkey.api.collections.IntHashMap;
import org.labkey.api.data.statistics.CurveFit;
import org.labkey.api.exp.ExperimentException;
import org.labkey.api.exp.api.ExpMaterial;
Expand Down Expand Up @@ -139,7 +140,7 @@ public Set<String> getPlates()
@Override
public Map<Integer, Plate> getAnalyteToPlate(String plateName) throws ExperimentException
{
Map<Integer, Plate> analyteToPlate = new HashMap<>();
Map<Integer, Plate> analyteToPlate = new IntHashMap<>();
for (Map.Entry<Integer, double[][]> entry : _plateMap.get(plateName).getDataMap().entrySet())
{
Plate plate = PlateService.get().createPlate(_plateTemplate, entry.getValue(), null);
Expand Down Expand Up @@ -171,8 +172,8 @@ public Map<String, Object> getExtraProperties(String plateName, Position positio

private static class AnalytePlate
{
private final Map<Integer, Map<String, Double>> _stdConcentrations = new HashMap<>();
private final Map<Integer, double[][]> _dataMap = new HashMap<>();
private final Map<Integer, Map<String, Double>> _stdConcentrations = new IntHashMap<>();
private final Map<Integer, double[][]> _dataMap = new IntHashMap<>();
private final String _plateName;
private final Plate _plateTemplate;
// contains the mapping of (well/analyte) to extra row data to merge during data import
Expand Down
3 changes: 2 additions & 1 deletion elisa/src/org/labkey/elisa/ManualImportHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import org.labkey.api.assay.plate.Position;
import org.labkey.api.assay.plate.Well;
import org.labkey.api.assay.plate.WellGroup;
import org.labkey.api.collections.IntHashMap;
import org.labkey.api.data.statistics.CurveFit;
import org.labkey.api.exp.ExperimentException;
import org.labkey.api.exp.api.ExpMaterial;
Expand Down Expand Up @@ -45,7 +46,7 @@ public Set<String> getPlates()
@Override
public Map<Integer, Plate> getAnalyteToPlate(String plateName) throws ExperimentException
{
Map<Integer, Plate> analyteMap = new HashMap<>();
Map<Integer, Plate> analyteMap = new IntHashMap<>();
PlateReader reader = _provider.getPlateReader(BioTekPlateReader.LABEL);
if (reader != null)
{
Expand Down
12 changes: 6 additions & 6 deletions elisa/src/org/labkey/elisa/query/CurveFitDb.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
public class CurveFitDb extends Entity
{
private Integer _rowId;
private Integer _runId;
private Integer _protocolId;
private Long _runId;
private Long _protocolId;
private String _plateName;
private Integer _spot;
private Double _rSquared;
Expand All @@ -27,22 +27,22 @@ public void setRowId(Integer rowId)
_rowId = rowId;
}

public Integer getRunId()
public Long getRunId()
{
return _runId;
}

public void setRunId(Integer runId)
public void setRunId(Long runId)
{
_runId = runId;
}

public Integer getProtocolId()
public Long getProtocolId()
{
return _protocolId;
}

public void setProtocolId(Integer protocolId)
public void setProtocolId(Long protocolId)
{
_protocolId = protocolId;
}
Expand Down
1 change: 0 additions & 1 deletion elisa/src/org/labkey/elisa/query/ElisaManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ public static CurveFitDb getCurveFit(Container c, ExpRun run, String plateName,
filter.addCondition(FieldKey.fromParts("PlateName"), plateName);
filter.addCondition(FieldKey.fromParts("Spot"), spot);
return new TableSelector(ElisaProtocolSchema.getTableInfoCurveFit(), filter, null).getObject(CurveFitDb.class);

}

public static void deleteContainerData(Container container)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public static Lsid getAntigenRowLsid(String dataLsid, String sampleName)
return dataRowLsid.build();
}

public static Lsid getAntigenLsid(String antigenWellgroupName, String sampleName, int runId, String assayName, String analyte)
public static Lsid getAntigenLsid(String antigenWellgroupName, String sampleName, long runId, String assayName, String analyte)
{
assert (antigenWellgroupName != null);
assert (sampleName != null);
Expand Down
4 changes: 2 additions & 2 deletions elispotassay/src/org/labkey/elispot/ElispotAssayProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,10 @@ public ElispotAssayProvider()
}

@Override
public Set<ExpData> getDatasForResultRows(Collection<Integer> rowIds, ExpProtocol protocol, ResolverCache cache)
public Set<ExpData> getDatasForResultRows(Collection<Long> rowIds, ExpProtocol protocol, ResolverCache cache)
{
Set<ExpData> result = new HashSet<>();
for (Integer rowId : rowIds)
for (var rowId : rowIds)
{
RunDataRow dataRow = ElispotManager.get().getRunDataRow(rowId);
if (dataRow == null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ public static void populateAntigenRunProperties(ExpRun run, Plate plate, PlateRe
}
}

private static Map<String, Object> makeAntigenRow(int runId, String specimenLsid, String wellgroupName, String antigenName,
private static Map<String, Object> makeAntigenRow(long runId, String specimenLsid, String wellgroupName, String antigenName,
Double mean, Double median, String objectUri, String protocolName,
String antigenWellgroupName, String analyte, Object cytokine)
{
Expand Down
23 changes: 9 additions & 14 deletions elispotassay/src/org/labkey/elispot/ElispotManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@
*/
package org.labkey.elispot;

import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.labkey.api.assay.AbstractAssayProvider;
import org.labkey.api.collections.ConcurrentCaseInsensitiveSortedMap;
import org.labkey.api.data.Container;
import org.labkey.api.data.DbSchema;
Expand All @@ -37,16 +38,12 @@
import org.labkey.api.exp.property.Domain;
import org.labkey.api.query.FieldKey;
import org.labkey.api.security.User;
import org.labkey.api.assay.AbstractAssayProvider;

import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;

/**
* Created by davebradlee on 3/19/15.
*/
public class ElispotManager
{
private static final Logger _log = LogManager.getLogger(ElispotManager.class);
Expand Down Expand Up @@ -82,14 +79,13 @@ public static TableInfo getTableInfoElispotAntigen(ExpProtocol protocol)
throw new IllegalStateException("Domain not found for protocol: " + protocol.getName());
}

public int insertRunDataRow(User user, Map<String, Object> fields)
public void insertRunDataRow(User user, Map<String, Object> fields)
{
Map<String, Object> results = Table.insert(user, getTableInfoElispotRunData(), fields);
return (Integer)results.get("RowId");
Table.insert(user, getTableInfoElispotRunData(), fields);
}

@Nullable
public RunDataRow getRunDataRow(int rowId)
public RunDataRow getRunDataRow(long rowId)
{
Filter filter = new SimpleFilter(FieldKey.fromString("RowId"), rowId);
return new TableSelector(getTableInfoElispotRunData()).getObject(filter, RunDataRow.class);
Expand Down Expand Up @@ -135,10 +131,9 @@ public void updateRunDataRow(User user, Map<String, Object> fields)
Table.update(user, getTableInfoElispotRunData(), fields, fields.get("RowId"));
}

public String insertAntigenRow(User user, Map<String, Object> fields, ExpProtocol protocol)
public void insertAntigenRow(User user, Map<String, Object> fields, ExpProtocol protocol)
{
Map<String, Object> results = Table.insert(user, getTableInfoElispotAntigen(protocol), fields);
return results.get("AntigenLsid").toString();
Table.insert(user, getTableInfoElispotAntigen(protocol), fields);
}

public void updateAntigenRow(User user, Map<String, Object> fields, ExpProtocol protocol)
Expand Down Expand Up @@ -184,14 +179,14 @@ public void deleteRunData(List<ExpData> datas)
try (DbScope.Transaction transaction = scope.ensureTransaction())
{
// Delete all rows based on the runId
Set<Integer> runIds = new HashSet<>();
Set<Long> runIds = new HashSet<>();
for (ExpData data : datas)
{
runIds.add(data.getRunId());
}

// Since runIds may be from different folders, delete from each separately
for (Integer runId : runIds)
for (var runId : runIds)
{
if (null != runId)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package org.labkey.elispot;

import org.apache.commons.lang3.math.NumberUtils;
import org.apache.logging.log4j.Logger;
import org.labkey.api.action.SpringActionController;
import org.labkey.api.data.ActionButton;
import org.labkey.api.data.ButtonBar;
Expand Down Expand Up @@ -45,6 +46,7 @@
import org.labkey.api.assay.PreviouslyUploadedDataCollector;
import org.labkey.api.assay.plate.PlateReader;
import org.labkey.api.util.PageFlowUtil;
import org.labkey.api.util.logging.LogHelper;
import org.labkey.api.view.InsertView;
import org.labkey.elispot.plate.PlateInfo;
import org.springframework.validation.BindException;
Expand All @@ -70,6 +72,8 @@
@RequiresPermission(InsertPermission.class)
public class ElispotUploadWizardAction extends UploadWizardAction<ElispotRunUploadForm, ElispotAssayProvider>
{
private static final Logger LOG = LogHelper.getLogger(ElispotUploadWizardAction.class, "Elispot upload errors");

public ElispotUploadWizardAction()
{
super(ElispotRunUploadForm.class);
Expand Down Expand Up @@ -566,6 +570,7 @@ protected ExpRun finishPost(ElispotRunUploadForm form, BindException errors)
}
catch (ExperimentException e)
{
LOG.error("Unexpected exception", e);
errors.reject(SpringActionController.ERROR_MSG, e.getMessage());
}

Expand Down
2 changes: 1 addition & 1 deletion flow/src/org/labkey/flow/FlowServiceImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public List<? extends ExpData> getExpDataByPath(Path path, @Nullable Container c

sql.append(" ORDER BY 1");

Integer[] dataids = new SqlSelector(FlowManager.get().getSchema(), sql).getArray(Integer.class);
Long[] dataids = new SqlSelector(FlowManager.get().getSchema(), sql).getArray(Long.class);

return ExperimentService.get().getExpDatas(Arrays.asList(dataids));
}
Expand Down
4 changes: 2 additions & 2 deletions flow/src/org/labkey/flow/controllers/BaseFlowController.java
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,9 @@ protected void putParam(ActionURL url, Enum<?> param, String value)
url.replaceParameter(param.toString(), value);
}

protected void putParam(ActionURL url, Enum<?> param, int value)
protected void putParam(ActionURL url, Enum<?> param, long value)
{
putParam(url, param, Integer.toString(value));
putParam(url, param, Long.toString(value));
}

public HttpServletRequest getRequest()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ else if (r.saveToDomain())
PipelineService.get().queueJob(job);

// navigate to the job status page
int jobId = PipelineService.get().getJobId(getUser(), getContainer(), job.getJobGUID());
long jobId = PipelineService.get().getJobId(getUser(), getContainer(), job.getJobGUID());
throw new RedirectException(urlProvider(PipelineStatusUrls.class).urlDetails(getContainer(), jobId));
}
}
Expand Down
2 changes: 1 addition & 1 deletion flow/src/org/labkey/flow/controllers/attribute/summary.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
FlowEntry primary = entry.getKey();
Collection<FlowEntry> aliases = entry.getValue();

Map<Integer, Number> counts = FlowManager.get().getUsageCount(primary._type, primary._rowId);
Map<Long, Number> counts = FlowManager.get().getUsageCount(primary._type, primary._rowId);
long totalCount = 0;
for (Number count : counts.values())
totalCount += count.longValue();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,12 @@ public void reset()
_run = FlowRun.fromURL(getViewContext().getActionURL(), getRequest(), getViewContext().getContainer(), getUser());
if (_run != null)
{
FlowPreference.editScriptRunId.setValue(getRequest(), Integer.toString(_run.getRunId()));
FlowPreference.editScriptRunId.setValue(getRequest(), Long.toString(_run.getRunId()));
}
_comp = FlowCompensationMatrix.fromURL(getViewContext().getActionURL(), getRequest(), getContainer(), getUser());
if (_comp != null)
{
FlowPreference.editScriptCompId.setValue(getRequest(), Integer.toString(_comp.getRowId()));
FlowPreference.editScriptCompId.setValue(getRequest(), Long.toString(_comp.getRowId()));
}
String strWellId = getRequest().getParameter(FlowParam.wellId.toString());
if (strWellId != null)
Expand Down Expand Up @@ -320,14 +320,14 @@ public boolean canEdit()
return getContainer().hasPermission(getUser(), UpdatePermission.class) && _runCount == 0;
}

public Map<Integer, String> getExperimentRuns()
public Map<Long, String> getExperimentRuns()
{
return getExperimentRuns(false);
}

public Map<Integer, String> getExperimentRuns(boolean realFiles)
public Map<Long, String> getExperimentRuns(boolean realFiles)
{
LinkedHashMap<Integer, String> ret = new LinkedHashMap<>();
LinkedHashMap<Long, String> ret = new LinkedHashMap<>();
List<FlowRun> runs = realFiles ?
FlowRun.getRunsWithRealFCSFiles(getContainer(), FlowProtocolStep.keywords) :
FlowRun.getRunsForContainer(getContainer(), FlowProtocolStep.keywords);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1216,7 +1216,7 @@ private void resolveSamples(ImportAnalysisForm form, @Nullable FlowRun keywordRu
if (matches != null)
{
FlowFCSFile perfectMatch = matches.first;
int perfectMatchId = perfectMatch != null ? perfectMatch.getRowId() : 0;
long perfectMatchId = perfectMatch != null ? perfectMatch.getRowId() : 0;
List<FlowFCSFile> candidates = matches.second;

if (perfectMatchId != 0 || (candidates != null && !candidates.isEmpty()))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ public void populate(BindException errors)
FlowExperiment analysis = FlowExperiment.getMostRecentAnalysis(getContainer());
if (analysis != null)
{
ff_targetExperimentId = Integer.toString(analysis.getExperimentId());
ff_targetExperimentId = Long.toString(analysis.getExperimentId());
}
}
Collection<FlowScript> availableProtocols = Arrays.asList(FlowScript.getScripts(getContainer()));
Expand Down
Loading