Skip to content
Snippets Groups Projects
Commit 03556297 authored by izabel's avatar izabel
Browse files

[LMS-1609] update spots width/height only when empty

SVN: 17001
parent 9709e4a3
No related branches found
No related tags found
No related merge requests found
......@@ -126,7 +126,7 @@ public class ScreeningContainerDatasetInfoHelper
{
if (updateContainer)
{
dao.updateContainer(containerId, info.getContainerColumns(), info
dao.updateContainerEmptySpots(containerId, info.getContainerColumns(), info
.getContainerRows());
}
return new CreatedOrFetchedEntity(updateContainer == false, containerId);
......
......@@ -125,8 +125,8 @@ public interface IImagingQueryDAO extends TransactionQuery
public long addChannel(ImgChannelDTO channel);
@Update("update CONTAINERS " + "set SPOTS_WIDTH = ?{2}, SPOTS_HEIGHT = ?{3} "
+ "where ID = ?{1}")
public void updateContainer(long id, int columns, int rows);
+ "where ID = ?{1} and SPOTS_WIDTH = 0 and SPOTS_HEIGHT = 0")
public void updateContainerEmptySpots(long id, int columns, int rows);
@Select("insert into CONTAINERS (PERM_ID, SPOTS_WIDTH, SPOTS_HEIGHT, EXPE_ID) values "
+ "(?{1.permId}, ?{1.numberOfColumns}, ?{1.numberOfRows}, ?{1.experimentId}) returning ID")
......
......@@ -89,7 +89,7 @@ public class FeatureStorageProcessorTest extends AbstractFileSystemTestCase
one(dao).tryGetContainerIdPermId(CONTAINER_PERM_ID);
will(returnValue((long) 1));
one(dao).updateContainer(1, 0, 0);
one(dao).updateContainerEmptySpots(1, 0, 0);
one(dao).commit();
ImgDatasetDTO dataSetDTO = new ImgDatasetDTO(DATA_SET_PERM_ID, 3, 2, 1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment