package nlib.cmm.service.impl;

import java.util.HashMap;
import java.util.List;

import javax.annotation.Resource;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl;
import nlib.cmm.service.CodeService;
import nlib.util.StringUtil;

@Service("codeService")
public class CodeServiceImpl extends EgovAbstractServiceImpl implements CodeService
{
	private static final Logger log = LoggerFactory.getLogger(CodeServiceImpl.class);
	
	@Resource(name="codeDAO")
	private CodeDAO codeDAO;

	public List<HashMap<String, String>> listCodes(String iCodeId) throws Exception {
		
		if(StringUtil.isEmpty(iCodeId)) return null;
		
		return codeDAO.listCodes(iCodeId.toUpperCase());
	}
}