Examples of UnitType


Examples of org.libreplan.business.materials.entities.UnitType

        return materialsModel.getUnitTypes();
    }

    public void selectUnitType(Component self) {
        Listitem selectedItem = ((Listbox) self).getSelectedItem();
            UnitType unitType = (UnitType) selectedItem.getValue();
            Material material = (Material) ((Row) self.getParent()).getValue();
            material.setUnitType(unitType);
    }
View Full Code Here

Examples of org.libreplan.business.materials.entities.UnitType

    private IDataBootstrap unitTypeBootstrap;

    private Material createValidMaterial() {
        MaterialCategory materialCategory = MaterialCategory.create(UUID.randomUUID().toString());
        materialCategoryDAO.save(materialCategory);
        UnitType unitType = UnitType.create("m");
        unitTypeDAO.save(unitType);
        Material material = Material.create(UUID.randomUUID().toString());
        material.setDescription("material");
        material.setCategory(materialCategory);
        material.setUnitType(unitType);
View Full Code Here

Examples of uk.ac.soton.itinnovation.pes.data.model.UnitType

    private AttributeType newCpuSpeedAttrib()
    {
        AttributeType a = new AttributeType();
        a.setName("cpuSpeed");
        a.setType(BasicType.STRING);
        a.setUnit(new UnitType("MHz", null, null, null));
        a.addAValue(new ValueType("2000", MetricType.VALUESALLOWED));
        a.addAValue(new ValueType("2200", MetricType.VALUESALLOWED));
        a.addAValue(new ValueType("2400", MetricType.VALUESALLOWED));

        return a;
View Full Code Here

Examples of uk.ac.soton.itinnovation.pes.data.model.UnitType

    private AttributeType newCPUCompAttrib(String name, int val, String unit)
    {
        AttributeType a = new AttributeType();
        a.setName(name);
        a.setType(BasicType.INT);
        a.setUnit(new UnitType(unit, null, null, null));
        a.addAValue(new ValueType(String.valueOf(val), MetricType.EXACT));

        return a;
    }
View Full Code Here

Examples of uk.ac.soton.itinnovation.pes.data.model.UnitType

    private AttributeType newCPUCompAttrib(String name, int min, int max, int step, String unit)
    {
        AttributeType a = new AttributeType();
        a.setName(name);
        a.setType(BasicType.INT);
        a.setUnit(new UnitType(unit, null, null, null));
        a.addAValue(new ValueType(String.valueOf(min), MetricType.MIN));
        a.addAValue(new ValueType(String.valueOf(max), MetricType.MAX));
        a.addAValue(new ValueType(String.valueOf(step), MetricType.STEP));

        return a;
View Full Code Here

Examples of uk.ac.soton.itinnovation.pes.data.model.UnitType

    private AttributeType newCPUCompAttrib(String name, double val, String unit)
    {
        AttributeType a = new AttributeType();
        a.setName(name);
        a.setType(BasicType.DOUBLE);
        a.setUnit(new UnitType(unit, null, null, null));
        a.addAValue(new ValueType(String.valueOf(val), MetricType.EXACT));

        return a;
    }
View Full Code Here

Examples of uk.ac.soton.itinnovation.pes.data.model.UnitType

    private AttributeType newCPUCompAttrib(String name, double min, double max, double step, String unit)
    {
        AttributeType a = new AttributeType();
        a.setName(name);
        a.setType(BasicType.DOUBLE);
        a.setUnit(new UnitType(unit, null, null, null));
        a.addAValue(new ValueType(String.valueOf(min), MetricType.MIN));
        a.addAValue(new ValueType(String.valueOf(max), MetricType.MAX));
        a.addAValue(new ValueType(String.valueOf(step), MetricType.STEP));

        return a;
View Full Code Here

Examples of uk.ac.soton.itinnovation.pes.data.model.UnitType

        res.setName("RAM");

    a.setName("ramSize");
        a.setType(BasicType.STRING);
        a.setUnit(new UnitType("MB", null, null, null));
        a.addAValue(new ValueType("2048", MetricType.EXACT));

        res.addAnAttr(a);

        return res;
View Full Code Here

Examples of uk.ac.soton.itinnovation.pes.data.model.UnitType

    res.setName("DISK");

        a.setName("DISKSPACE");
        a.setType(BasicType.STRING);
        a.setUnit(new UnitType("GB", null, null, null));
        a.addAValue(new ValueType("100", MetricType.EXACT));

        res.addAnAttr(a);
        return res;
    }
View Full Code Here

Examples of uk.ac.soton.itinnovation.pes.data.model.UnitType

    private AttributeType newBandwidthAttrib()
    {
        AttributeType a = new AttributeType();
        a.setName("bandwidth");
        a.setType(BasicType.INT);
        a.setUnit(new UnitType("bps", null, null, null));
        a.addAValue(new ValueType("1000000", MetricType.MIN));
        a.addAValue(new ValueType("10000000", MetricType.MAX));
        a.addAValue(new ValueType("1000000", MetricType.STEP));
        return a;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.