package com.acme.vcutil.supplier;

import com.acme.model.domain.ad.entity.UnitGroup;
import com.acme.structure.util.ConversionUtil;
import com.acme.structure.util.datalist.SimpleStaticListSupplier;
import com.acme.structure.util.datalist.StaticData;

public class StaticUnitGroupSupplier extends SimpleStaticListSupplier
{
    @Override
    public void loadList()
    {
        clearList();

        list.add(new StaticData(UnitGroup.unitGroups.get(UnitGroup.WEIGHT), UnitGroup.WEIGHT));
        list.add(new StaticData(UnitGroup.unitGroups.get(UnitGroup.COUNTABLE), UnitGroup.COUNTABLE));
        list.add(new StaticData(UnitGroup.unitGroups.get(UnitGroup.TIME), UnitGroup.TIME));
        list.add(new StaticData(UnitGroup.unitGroups.get(UnitGroup.DISTANCE), UnitGroup.DISTANCE));
        list.add(new StaticData(UnitGroup.unitGroups.get(UnitGroup.LIQUID), UnitGroup.LIQUID));
        
        itemList.addAll(ConversionUtil.getConvertedToSelectItemListWithStaticData(list, false));
    }

    public String getListName()
    {
        return "staticunitgroups";
    }
}