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;
}
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);
}
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);
}
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());
}
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());
}
Aggregations