package cokr.xit.ens.core.code.support;

import cokr.xit.ens.core.code.CodeMapperFactory;
import cokr.xit.ens.core.code.CodeMapperValue;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.util.List;

@Slf4j
@Component
@RequiredArgsConstructor
public class SampleCdUse {
    private final CodeMapperFactory codeMapperFactory;

    public void printSampleCds(){
        List<CodeMapperValue> sampleCdList = codeMapperFactory.get("SampleCd");
        sampleCdList.stream().forEach(row -> log.info("{} {}", row.getCode(), row.getCodeNm()));
    }
}
