package info.bukova.isspst.services.munits;

import info.bukova.isspst.data.MUnit;
import info.bukova.isspst.data.MUnitEmb;
import info.bukova.isspst.services.AbstractService;

import java.util.ArrayList;
import java.util.List;

import org.springframework.transaction.annotation.Transactional;

public class MUnitServiceImpl extends AbstractService<MUnit> implements MUnitService
{
	@Override
	@Transactional
	public List<MUnitEmb> getEmbAll()
	{
		List<MUnit> munitList = this.getAll();
		List<MUnitEmb> munitEmbList = new ArrayList<MUnitEmb>();

		for (MUnit m : munitList)
		{
			MUnitEmb muEmb = new MUnitEmb(m);
			munitEmbList.add(muEmb);
		}

		return munitEmbList;
	}
}
