Skip to content
Snippets Groups Projects
Commit ce21d505 authored by kaloyane's avatar kaloyane
Browse files

[LMS-2033] removed get/set Code methods. There is not easy way to support them...

[LMS-2033] removed get/set Code methods. There is not easy way to support them for NewSample/NewExperiment objects in the background.

SVN: 19949
parent 38a2c27c
No related branches found
No related tags found
Loading
......@@ -47,11 +47,6 @@ class Experiment extends ExperimentImmutable implements IExperiment
{
return false;
}
public void setCode(String code)
{
getExperiment().setCode(code);
}
public void setPropertyValue(String propertyCode, String propertyValue)
{
......
......@@ -64,11 +64,6 @@ class ExperimentImmutable implements IExperimentImmutable
return EntityHelper.tryFindPropertyValue(experiment, propertyCode);
}
public String getCode()
{
return experiment.getCode();
}
public String getType()
{
if (experiment.getExperimentType() != null)
......
......@@ -16,8 +16,12 @@
package ch.systemsx.cisd.etlserver.registrator.api.v1.impl;
import java.util.ArrayList;
import java.util.List;
import ch.systemsx.cisd.etlserver.registrator.api.v1.IExperimentImmutable;
import ch.systemsx.cisd.etlserver.registrator.api.v1.ISample;
import ch.systemsx.cisd.openbis.generic.shared.basic.dto.IEntityProperty;
import ch.systemsx.cisd.openbis.generic.shared.basic.dto.SampleType;
import ch.systemsx.cisd.openbis.generic.shared.util.EntityHelper;
......@@ -27,29 +31,28 @@ import ch.systemsx.cisd.openbis.generic.shared.util.EntityHelper;
public class Sample extends SampleImmutable implements ISample
{
public Sample(ch.systemsx.cisd.openbis.generic.shared.basic.dto.Sample sample)
{
super(sample);
}
public Sample(String sampleIdentifier, String permId)
{
super(new ch.systemsx.cisd.openbis.generic.shared.basic.dto.Sample());
getSample().setIdentifier(sampleIdentifier);
getSample().setPermId(permId);
}
public Sample(ch.systemsx.cisd.openbis.generic.shared.basic.dto.Sample sample)
{
super(sample);
List<IEntityProperty> properties = new ArrayList<IEntityProperty>();
getSample().setProperties(properties);
}
public void setExperiment(IExperimentImmutable experiment)
{
ExperimentImmutable exp = (ExperimentImmutable) experiment;
getSample().setExperiment(exp.getExperiment());
}
public void setCode(String code)
{
getSample().setCode(code);
}
public void setPropertyValue(String propertyCode, String propertyValue)
{
EntityHelper.createOrUpdateProperty(getSample(), propertyCode, propertyValue);
......
......@@ -45,11 +45,6 @@ public class SampleImmutable implements ISampleImmutable
return sample.getIdentifier();
}
public String getCode()
{
return sample.getCode();
}
public ch.systemsx.cisd.openbis.generic.shared.basic.dto.Sample getSample()
{
return sample;
......
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