Skip to content

Commit 37b33ad

Browse files
Support BIGINT Primary Keys (#912)
1 parent 207eddb commit 37b33ad

File tree

117 files changed

+462
-419
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+462
-419
lines changed

elisa/src/org/labkey/elisa/ElisaAssayProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ public Collection<StatsService.CurveFitType> getCurveFits()
434434
protected void moveAssayResults(List<ExpRun> runs, ExpProtocol protocol, Container sourceContainer, Container targetContainer, User user, AssayMoveData assayMoveData) throws ExperimentException
435435
{
436436
super.moveAssayResults(runs, protocol, sourceContainer, targetContainer, user, assayMoveData); // assay results
437-
List<Integer> runRowIds = runs.stream().map(ExpRun::getRowId).toList();
437+
List<Long> runRowIds = runs.stream().map(ExpRun::getRowId).toList();
438438

439439
// move specimen
440440
String tableName = AssayProtocolSchema.DATA_TABLE_NAME;

elisa/src/org/labkey/elisa/ElisaController.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,17 @@ public ElisaController()
5555

5656
public static class RunDetailsForm
5757
{
58-
private int _protocolId;
59-
private int _runId;
58+
private long _protocolId;
59+
private long _runId;
6060
private String _runName;
6161
private String _schemaName;
6262

63-
public int getRunId()
63+
public long getRunId()
6464
{
6565
return _runId;
6666
}
6767

68-
public void setRunId(int runId)
68+
public void setRunId(long runId)
6969
{
7070
_runId = runId;
7171
}
@@ -90,12 +90,12 @@ public void setSchemaName(String schemaName)
9090
_schemaName = schemaName;
9191
}
9292

93-
public int getProtocolId()
93+
public long getProtocolId()
9494
{
9595
return _protocolId;
9696
}
9797

98-
public void setProtocolId(int protocolId)
98+
public void setProtocolId(long protocolId)
9999
{
100100
_protocolId = protocolId;
101101
}

elisa/src/org/labkey/elisa/ElisaDataHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ public void beforeDeleteData(List<ExpData> datas, User user) throws ExperimentEx
431431
{
432432
super.beforeDeleteData(datas, user);
433433

434-
Set<Integer> runIds = new HashSet<>();
434+
Set<Long> runIds = new HashSet<>();
435435
for (ExpData data : datas)
436436
{
437437
if (null != data.getRunId())

elisa/src/org/labkey/elisa/HighThroughputImportHelper.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import org.labkey.api.assay.plate.PositionImpl;
1111
import org.labkey.api.assay.plate.Well;
1212
import org.labkey.api.assay.plate.WellGroup;
13+
import org.labkey.api.collections.IntHashMap;
1314
import org.labkey.api.data.statistics.CurveFit;
1415
import org.labkey.api.exp.ExperimentException;
1516
import org.labkey.api.exp.api.ExpMaterial;
@@ -139,7 +140,7 @@ public Set<String> getPlates()
139140
@Override
140141
public Map<Integer, Plate> getAnalyteToPlate(String plateName) throws ExperimentException
141142
{
142-
Map<Integer, Plate> analyteToPlate = new HashMap<>();
143+
Map<Integer, Plate> analyteToPlate = new IntHashMap<>();
143144
for (Map.Entry<Integer, double[][]> entry : _plateMap.get(plateName).getDataMap().entrySet())
144145
{
145146
Plate plate = PlateService.get().createPlate(_plateTemplate, entry.getValue(), null);
@@ -171,8 +172,8 @@ public Map<String, Object> getExtraProperties(String plateName, Position positio
171172

172173
private static class AnalytePlate
173174
{
174-
private final Map<Integer, Map<String, Double>> _stdConcentrations = new HashMap<>();
175-
private final Map<Integer, double[][]> _dataMap = new HashMap<>();
175+
private final Map<Integer, Map<String, Double>> _stdConcentrations = new IntHashMap<>();
176+
private final Map<Integer, double[][]> _dataMap = new IntHashMap<>();
176177
private final String _plateName;
177178
private final Plate _plateTemplate;
178179
// contains the mapping of (well/analyte) to extra row data to merge during data import

elisa/src/org/labkey/elisa/ManualImportHelper.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import org.labkey.api.assay.plate.Position;
1111
import org.labkey.api.assay.plate.Well;
1212
import org.labkey.api.assay.plate.WellGroup;
13+
import org.labkey.api.collections.IntHashMap;
1314
import org.labkey.api.data.statistics.CurveFit;
1415
import org.labkey.api.exp.ExperimentException;
1516
import org.labkey.api.exp.api.ExpMaterial;
@@ -45,7 +46,7 @@ public Set<String> getPlates()
4546
@Override
4647
public Map<Integer, Plate> getAnalyteToPlate(String plateName) throws ExperimentException
4748
{
48-
Map<Integer, Plate> analyteMap = new HashMap<>();
49+
Map<Integer, Plate> analyteMap = new IntHashMap<>();
4950
PlateReader reader = _provider.getPlateReader(BioTekPlateReader.LABEL);
5051
if (reader != null)
5152
{

elisa/src/org/labkey/elisa/query/CurveFitDb.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
public class CurveFitDb extends Entity
66
{
77
private Integer _rowId;
8-
private Integer _runId;
9-
private Integer _protocolId;
8+
private Long _runId;
9+
private Long _protocolId;
1010
private String _plateName;
1111
private Integer _spot;
1212
private Double _rSquared;
@@ -27,22 +27,22 @@ public void setRowId(Integer rowId)
2727
_rowId = rowId;
2828
}
2929

30-
public Integer getRunId()
30+
public Long getRunId()
3131
{
3232
return _runId;
3333
}
3434

35-
public void setRunId(Integer runId)
35+
public void setRunId(Long runId)
3636
{
3737
_runId = runId;
3838
}
3939

40-
public Integer getProtocolId()
40+
public Long getProtocolId()
4141
{
4242
return _protocolId;
4343
}
4444

45-
public void setProtocolId(Integer protocolId)
45+
public void setProtocolId(Long protocolId)
4646
{
4747
_protocolId = protocolId;
4848
}

elisa/src/org/labkey/elisa/query/ElisaManager.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ public static CurveFitDb getCurveFit(Container c, ExpRun run, String plateName,
3636
filter.addCondition(FieldKey.fromParts("PlateName"), plateName);
3737
filter.addCondition(FieldKey.fromParts("Spot"), spot);
3838
return new TableSelector(ElisaProtocolSchema.getTableInfoCurveFit(), filter, null).getObject(CurveFitDb.class);
39-
4039
}
4140

4241
public static void deleteContainerData(Container container)

elispotassay/src/org/labkey/elispot/AbstractElispotDataHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ public static Lsid getAntigenRowLsid(String dataLsid, String sampleName)
156156
return dataRowLsid.build();
157157
}
158158

159-
public static Lsid getAntigenLsid(String antigenWellgroupName, String sampleName, int runId, String assayName, String analyte)
159+
public static Lsid getAntigenLsid(String antigenWellgroupName, String sampleName, long runId, String assayName, String analyte)
160160
{
161161
assert (antigenWellgroupName != null);
162162
assert (sampleName != null);

elispotassay/src/org/labkey/elispot/ElispotAssayProvider.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,10 @@ public ElispotAssayProvider()
174174
}
175175

176176
@Override
177-
public Set<ExpData> getDatasForResultRows(Collection<Integer> rowIds, ExpProtocol protocol, ResolverCache cache)
177+
public Set<ExpData> getDatasForResultRows(Collection<Long> rowIds, ExpProtocol protocol, ResolverCache cache)
178178
{
179179
Set<ExpData> result = new HashSet<>();
180-
for (Integer rowId : rowIds)
180+
for (var rowId : rowIds)
181181
{
182182
RunDataRow dataRow = ElispotManager.get().getRunDataRow(rowId);
183183
if (dataRow == null)

elispotassay/src/org/labkey/elispot/ElispotDataHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ public static void populateAntigenRunProperties(ExpRun run, Plate plate, PlateRe
523523
}
524524
}
525525

526-
private static Map<String, Object> makeAntigenRow(int runId, String specimenLsid, String wellgroupName, String antigenName,
526+
private static Map<String, Object> makeAntigenRow(long runId, String specimenLsid, String wellgroupName, String antigenName,
527527
Double mean, Double median, String objectUri, String protocolName,
528528
String antigenWellgroupName, String analyte, Object cytokine)
529529
{

0 commit comments

Comments
 (0)