Search in sources :

Example 1 with Metric

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

the class AssayMetricDto method to.

public AssayMetric to() {
    AssayMetric to = new AssayMetric();
    setObject(to::setMetric, Metric::new, getId());
    setBigDecimal(to::setMinimumThreshold, getMinimumThreshold());
    setBigDecimal(to::setMaximumThreshold, getMaximumThreshold());
    return to;
}
Also used : AssayMetric(uk.ac.bbsrc.tgac.miso.core.data.impl.AssayMetric) AssayMetric(uk.ac.bbsrc.tgac.miso.core.data.impl.AssayMetric) Metric(uk.ac.bbsrc.tgac.miso.core.data.impl.Metric)

Example 2 with Metric

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

the class HibernateMetricDaoIT method getCreateItem.

@Override
public Metric getCreateItem() {
    Metric metric = new Metric();
    metric.setAlias("New Metric");
    metric.setCategory(MetricCategory.INFORMATICS);
    metric.setThresholdType(ThresholdType.BETWEEN);
    metric.setUnits("%");
    return metric;
}
Also used : Metric(uk.ac.bbsrc.tgac.miso.core.data.impl.Metric)

Example 3 with Metric

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

the class MetricDto method to.

public Metric to() {
    Metric to = new Metric();
    setLong(to::setId, getId(), false);
    setString(to::setAlias, getAlias());
    setObject(to::setCategory, getCategory(), MetricCategory::valueOf);
    setObject(to::setSubcategory, MetricSubcategory::new, getSubcategoryId());
    setObject(to::setThresholdType, getThresholdType(), ThresholdType::valueOf);
    setString(to::setUnits, getUnits());
    setInteger(to::setSortPriority, getSortPriority(), true);
    setObject(to::setNucleicAcidType, getNucleicAcidType(), NucleicAcidType::valueOf);
    setObject(to::setTissueMaterial, TissueMaterialImpl::new, getTissueMaterialId());
    setObject(to::setTissueType, TissueTypeImpl::new, getTissueTypeId());
    setBoolean(to::setNegateTissueType, isNegateTissueType(), false);
    setObject(to::setTissueOrigin, TissueOriginImpl::new, getTissueOriginId());
    setObject(to::setContainerModel, SequencingContainerModel::new, getContainerModelId());
    setInteger(to::setReadLength, getReadLength(), true);
    setInteger(to::setReadLength2, getReadLength2(), true);
    return to;
}
Also used : TissueMaterialImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.TissueMaterialImpl) SequencingContainerModel(uk.ac.bbsrc.tgac.miso.core.data.impl.SequencingContainerModel) NucleicAcidType(uk.ac.bbsrc.tgac.miso.core.data.type.NucleicAcidType) TissueOriginImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.TissueOriginImpl) Metric(uk.ac.bbsrc.tgac.miso.core.data.impl.Metric) TissueTypeImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.TissueTypeImpl) MetricSubcategory(uk.ac.bbsrc.tgac.miso.core.data.impl.MetricSubcategory) MetricCategory(uk.ac.bbsrc.tgac.miso.core.data.type.MetricCategory) ThresholdType(uk.ac.bbsrc.tgac.miso.core.data.type.ThresholdType)

Example 4 with Metric

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

the class HibernateMetricDaoIT method testGetUsage.

@Test
public void testGetUsage() throws Exception {
    Metric metric = (Metric) currentSession().get(Metric.class, 1L);
    assertEquals(2L, getTestSubject().getUsage(metric));
}
Also used : Metric(uk.ac.bbsrc.tgac.miso.core.data.impl.Metric) AbstractHibernateSaveDaoTest(uk.ac.bbsrc.tgac.miso.AbstractHibernateSaveDaoTest) Test(org.junit.Test)

Aggregations

Metric (uk.ac.bbsrc.tgac.miso.core.data.impl.Metric)4 Test (org.junit.Test)1 AbstractHibernateSaveDaoTest (uk.ac.bbsrc.tgac.miso.AbstractHibernateSaveDaoTest)1 AssayMetric (uk.ac.bbsrc.tgac.miso.core.data.impl.AssayMetric)1 MetricSubcategory (uk.ac.bbsrc.tgac.miso.core.data.impl.MetricSubcategory)1 SequencingContainerModel (uk.ac.bbsrc.tgac.miso.core.data.impl.SequencingContainerModel)1 TissueMaterialImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.TissueMaterialImpl)1 TissueOriginImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.TissueOriginImpl)1 TissueTypeImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.TissueTypeImpl)1 MetricCategory (uk.ac.bbsrc.tgac.miso.core.data.type.MetricCategory)1 NucleicAcidType (uk.ac.bbsrc.tgac.miso.core.data.type.NucleicAcidType)1 ThresholdType (uk.ac.bbsrc.tgac.miso.core.data.type.ThresholdType)1