Package org.libreplan.business.materials.entities

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


    @Transactional(readOnly=true)
    public boolean existsAnotherUnitTypeWithName(String name) {
        boolean result;

        try {
            UnitType foundUnitType =
                unitTypeDAO.findByNameCaseInsensitive(name);
            result = isTheSameEntityAsState(foundUnitType) ? false : true;
        } catch (InstanceNotFoundException e) {
            result = false;
        }
View Full Code Here


    @Transactional(readOnly=true)
    public boolean existsAnotherUnitTypeWithCode(String code) {
        boolean result;

        try {
            UnitType foundUnitType =
                unitTypeDAO.findByCode(code);
            result = isTheSameEntityAsState(foundUnitType) ? false : true;
        } catch (InstanceNotFoundException e) {
            result = false;
        }
View Full Code Here

        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

    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

TOP

Related Classes of org.libreplan.business.materials.entities.UnitType

Copyright © 2018 www.massapicom. 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.