use of uk.ac.bbsrc.tgac.miso.core.data.impl.SamplePurposeImpl in project miso-lims by miso-lims.
the class Dtos method to.
public static SamplePurpose to(@Nonnull SamplePurposeDto from) {
SamplePurpose to = new SamplePurposeImpl();
setLong(to::setId, from.getId(), false);
setString(to::setAlias, from.getAlias());
setBoolean(to::setArchived, from.isArchived(), false);
return to;
}
use of uk.ac.bbsrc.tgac.miso.core.data.impl.SamplePurposeImpl in project miso-lims by miso-lims.
the class Dtos method toAliquotSample.
private static SampleAliquot toAliquotSample(@Nonnull SampleAliquotDto from) {
SampleAliquot to = null;
if (from.getClass() == SampleAliquotSingleCellDto.class) {
SampleAliquotSingleCellDto scFrom = (SampleAliquotSingleCellDto) from;
SampleAliquotSingleCell sc = new SampleAliquotSingleCellImpl();
setBigDecimal(sc::setInputIntoLibrary, scFrom.getInputIntoLibrary());
to = sc;
} else if (from.getClass() == SampleAliquotRnaDto.class) {
to = new SampleAliquotRnaImpl();
} else {
to = new SampleAliquotImpl();
}
if (from.getSamplePurposeId() != null) {
to.setSamplePurpose(new SamplePurposeImpl());
to.getSamplePurpose().setId(from.getSamplePurposeId());
}
return to;
}
use of uk.ac.bbsrc.tgac.miso.core.data.impl.SamplePurposeImpl in project miso-lims by miso-lims.
the class HibernateSamplePurposeDaoIT method getCreateItem.
@Override
public SamplePurpose getCreateItem() {
SamplePurpose purpose = new SamplePurposeImpl();
purpose.setAlias("New Purpose");
User user = (User) currentSession().get(UserImpl.class, 1L);
purpose.setChangeDetails(user);
return purpose;
}
Aggregations