@Override public void setIdentificationBarcode(String identificationBarcode) { this.identificationBarcode = nullifyStringIfBlank(identificationBarcode); }
@Override public void setLocationBarcode(String locationBarcode) { this.locationBarcode = nullifyStringIfBlank(locationBarcode); }
@Override public void setIdentificationBarcode(String identificationBarcode) { this.identificationBarcode = nullifyStringIfBlank(identificationBarcode); }
@Override public void setIdentificationBarcode(String identificationBarcode) { this.identificationBarcode = nullifyStringIfBlank(identificationBarcode); }
@Override public void setSampleType(String sampleType) { this.sampleType = nullifyStringIfBlank(sampleType); }
@Override public void setLocationBarcode(String locationBarcode) { this.locationBarcode = nullifyStringIfBlank(locationBarcode); }
@Override public void setGroupId(String groupId) { this.groupId = nullifyStringIfBlank(groupId); }
@Override public void setGroupDescription(String groupDescription) { this.groupDescription = nullifyStringIfBlank(groupDescription); }
@Override public void setGroupId(String groupId) { this.groupId = nullifyStringIfBlank(groupId); }
@Override public void setGroupDescription(String groupDescription) { this.groupDescription = nullifyStringIfBlank(groupDescription); }
@Override public void setSecondaryIdentifier(String secondaryIdentifier) { this.secondaryIdentifier = nullifyStringIfBlank(secondaryIdentifier); }
@Override public void setRegion(String region) { this.region = nullifyStringIfBlank(region); }
@Override public void setTaxonIdentifier(String taxonIdentifier) { this.taxonIdentifier = nullifyStringIfBlank(taxonIdentifier); }
@Override public void setIdentificationBarcode(String identificationBarcode) { this.identificationBarcode = nullifyStringIfBlank(identificationBarcode); }
private String[] unpack(Sheet sheet, Row row) { if (row == null) return null; int columns = getColumns(sheet, row); boolean seenUseful = false; String[] results = new String[columns]; for (int i = 0; i < columns; i++) { String value = LimsUtils.nullifyStringIfBlank(getColumn(sheet, row, i)); if (value != null) { results[i] = value; seenUseful = true; } } return seenUseful ? results : null; }
private void applyChanges(Box from, Box to) throws IOException { to.setAlias(from.getAlias()); to.setDescription(from.getDescription()); to.setIdentificationBarcode(LimsUtils.nullifyStringIfBlank(from.getIdentificationBarcode())); to.setLocationBarcode(from.getLocationBarcode()); to.setUse(boxStore.getUseById(from.getUse().getId())); to.setStorageLocation(from.getStorageLocation()); }
public static Array to(@Nonnull ArrayDto from) { Array array = new Array(); if (from.getId() != null) { array.setId(from.getId()); } array.setAlias(from.getAlias()); array.setArrayModel(new ArrayModel()); if (from.getArrayModelId() != null) { array.getArrayModel().setId(from.getArrayModelId()); } if (from.getArrayModelAlias() != null) { array.getArrayModel().setAlias(from.getArrayModelAlias()); } array.setSerialNumber(from.getSerialNumber()); array.setDescription(nullifyStringIfBlank(from.getDescription())); array.setSamples(toArraySamples(from.getSamples())); return array; }
/** * Copies modifiable fields from the source LibraryDilution into the target LibraryDilution to be persisted * * @param target the persisted LibraryDilution to modify * @param source the modified LibraryDilution to copy modifiable fields from * @throws IOException */ private void applyChanges(LibraryDilution target, LibraryDilution source) { target.setTargetedSequencing(source.getTargetedSequencing()); target.setIdentificationBarcode(LimsUtils.nullifyStringIfBlank(source.getIdentificationBarcode())); target.setVolume(source.getVolume()); target.setVolumeUnits(target.getVolume() == null ? null : source.getVolumeUnits()); target.setConcentration(source.getConcentration()); target.setConcentrationUnits(target.getConcentration() == null ? null : source.getConcentrationUnits()); target.setNgUsed(source.getNgUsed()); target.setVolumeUsed(source.getVolumeUsed()); }
private long saveNewBox(Box box) throws IOException { authorizationManager.throwIfNotWritable(box); try { box.setName(generateTemporaryName()); box.setSecurityProfile(securityProfileStore.get(securityProfileStore.save(box.getSecurityProfile()))); box.setChangeDetails(authorizationManager.getCurrentUser()); box.setIdentificationBarcode(LimsUtils.nullifyStringIfBlank(box.getIdentificationBarcode())); validateChange(box, null); boxStore.save(box); if (autoGenerateIdBarcodes) { box.setIdentificationBarcode(box.getName() + "::" + box.getAlias()); } box.setName(namingScheme.generateNameFor(box)); validateNameOrThrow(box, namingScheme); if (box.getStorageLocation() != null) { addStorageChangeLog(getFreezer(box), box, true); } return boxStore.save(box); } catch (MisoNamingException e) { throw new IOException("Invalid name for box", e); } }
private static SampleTissue toTissueSample(@Nonnull SampleTissueDto from) { SampleTissue to = new SampleTissueImpl(); to.setPassageNumber(from.getPassageNumber()); to.setTimesReceived(from.getTimesReceived()); to.setTubeNumber(from.getTubeNumber()); to.setRegion(nullifyStringIfBlank(from.getRegion())); to.setSecondaryIdentifier(from.getSecondaryIdentifier()); if (from.getTissueOriginId() != null) { TissueOrigin tissueOrigin = new TissueOriginImpl(); tissueOrigin.setId(from.getTissueOriginId()); to.setTissueOrigin(tissueOrigin); } if (from.getTissueTypeId() != null) { TissueType tissueType = new TissueTypeImpl(); tissueType.setId(from.getTissueTypeId()); to.setTissueType(tissueType); } if (from.getTissueMaterialId() != null) { TissueMaterial tissueMaterial = new TissueMaterialImpl(); tissueMaterial.setId(from.getTissueMaterialId()); to.setTissueMaterial(tissueMaterial); } if (from.getLabId() != null) { Lab lab = new LabImpl(); lab.setId(from.getLabId()); to.setLab(lab); } return to; }