Search in sources :

Example 1 with IndexFamily

use of uk.ac.bbsrc.tgac.miso.core.data.IndexFamily in project miso-lims by miso-lims.

the class IndexCheckerTest method makeIndex.

public Index makeIndex(String fakeSequence, String realSequences) {
    Index index = new Index();
    IndexFamily family = new IndexFamily();
    family.setFake(realSequences != null);
    index.setFamily(family);
    index.setName(fakeSequence + " name");
    index.setSequence(fakeSequence);
    index.setRealSequences(realSequences);
    return index;
}
Also used : IndexFamily(uk.ac.bbsrc.tgac.miso.core.data.IndexFamily) Index(uk.ac.bbsrc.tgac.miso.core.data.Index)

Example 2 with IndexFamily

use of uk.ac.bbsrc.tgac.miso.core.data.IndexFamily in project miso-lims by miso-lims.

the class IndexFamilyController method create.

@GetMapping("/new")
public ModelAndView create(ModelMap model) throws IOException {
    model.put("title", "New Index Family");
    model.put(PageMode.PROPERTY, PageMode.CREATE.getLabel());
    return indexFamilyPage(new IndexFamily(), model);
}
Also used : IndexFamily(uk.ac.bbsrc.tgac.miso.core.data.IndexFamily) GetMapping(org.springframework.web.bind.annotation.GetMapping)

Example 3 with IndexFamily

use of uk.ac.bbsrc.tgac.miso.core.data.IndexFamily in project miso-lims by miso-lims.

the class IndexFamilyController method edit.

@GetMapping("/{id}")
public ModelAndView edit(@PathVariable long id, ModelMap model) throws IOException {
    IndexFamily family = indexFamilyService.get(id);
    if (family == null) {
        throw new NotFoundException("No index family found for ID: " + id);
    }
    model.put("title", "Index Family " + id);
    model.put(PageMode.PROPERTY, PageMode.EDIT.getLabel());
    return indexFamilyPage(family, model);
}
Also used : IndexFamily(uk.ac.bbsrc.tgac.miso.core.data.IndexFamily) NotFoundException(org.springframework.security.acls.model.NotFoundException) GetMapping(org.springframework.web.bind.annotation.GetMapping)

Example 4 with IndexFamily

use of uk.ac.bbsrc.tgac.miso.core.data.IndexFamily in project miso-lims by miso-lims.

the class HibernateIndexDaoIT method testGetByFamilyPositionAndName.

@Test
public void testGetByFamilyPositionAndName() throws Exception {
    IndexFamily family = (IndexFamily) currentSession().get(IndexFamily.class, 3L);
    int position = 1;
    String name = "N710";
    Index index = dao.getByFamilyPositionAndName(family, position, name);
    assertNotNull(index);
    assertEquals(family.getId(), index.getFamily().getId());
    assertEquals(position, index.getPosition());
    assertEquals(name, index.getName());
}
Also used : IndexFamily(uk.ac.bbsrc.tgac.miso.core.data.IndexFamily) Index(uk.ac.bbsrc.tgac.miso.core.data.Index) AbstractDAOTest(uk.ac.bbsrc.tgac.miso.AbstractDAOTest) Test(org.junit.Test)

Example 5 with IndexFamily

use of uk.ac.bbsrc.tgac.miso.core.data.IndexFamily in project miso-lims by miso-lims.

the class HibernateIndexFamilyDaoIT method testUpdate.

@Test
public void testUpdate() throws IOException {
    long id = 1L;
    String name = "New Name";
    IndexFamily fam = (IndexFamily) getSessionFactory().getCurrentSession().get(IndexFamily.class, id);
    assertNotEquals(name, fam.getName());
    fam.setName(name);
    sut.update(fam);
    clearSession();
    IndexFamily saved = (IndexFamily) getSessionFactory().getCurrentSession().get(IndexFamily.class, id);
    assertEquals(name, saved.getName());
}
Also used : IndexFamily(uk.ac.bbsrc.tgac.miso.core.data.IndexFamily) AbstractDAOTest(uk.ac.bbsrc.tgac.miso.AbstractDAOTest) Test(org.junit.Test)

Aggregations

IndexFamily (uk.ac.bbsrc.tgac.miso.core.data.IndexFamily)16 Test (org.junit.Test)7 AbstractDAOTest (uk.ac.bbsrc.tgac.miso.AbstractDAOTest)7 Index (uk.ac.bbsrc.tgac.miso.core.data.Index)7 IlluminaNotificationDto (ca.on.oicr.gsi.runscanner.dto.IlluminaNotificationDto)3 NotificationDto (ca.on.oicr.gsi.runscanner.dto.NotificationDto)3 OxfordNanoporeNotificationDto (ca.on.oicr.gsi.runscanner.dto.OxfordNanoporeNotificationDto)3 OrderAliquotDto (uk.ac.bbsrc.tgac.miso.dto.PoolOrderDto.OrderAliquotDto)3 QcHierarchyNodeDto (uk.ac.bbsrc.tgac.miso.dto.dashi.QcHierarchyNodeDto)3 IlluminaRunDto (uk.ac.bbsrc.tgac.miso.dto.run.IlluminaRunDto)3 IonTorrentRunDto (uk.ac.bbsrc.tgac.miso.dto.run.IonTorrentRunDto)3 Ls454RunDto (uk.ac.bbsrc.tgac.miso.dto.run.Ls454RunDto)3 OxfordNanoporeRunDto (uk.ac.bbsrc.tgac.miso.dto.run.OxfordNanoporeRunDto)3 PacBioRunDto (uk.ac.bbsrc.tgac.miso.dto.run.PacBioRunDto)3 RunDto (uk.ac.bbsrc.tgac.miso.dto.run.RunDto)3 RunPositionDto (uk.ac.bbsrc.tgac.miso.dto.run.RunPositionDto)3 SolidRunDto (uk.ac.bbsrc.tgac.miso.dto.run.SolidRunDto)3 GetMapping (org.springframework.web.bind.annotation.GetMapping)2 VolumeUnit (uk.ac.bbsrc.tgac.miso.core.data.VolumeUnit)2 PlatformType (uk.ac.bbsrc.tgac.miso.core.data.type.PlatformType)2