/********************************************************************
 * Copyright © 2004 VHA. All rights reserved
 ********************************************************************/
package gov.va.med.esr.common.builder.entity.lookup;

// Java Classes

// Library Classes

// Framework Classes
import gov.va.med.fw.model.lookup.AbstractLookup;
import gov.va.med.fw.util.builder.BuilderException;


/**
 * @author Martin Francisco
 */
public class PartiallyMappedLookupBuilder
    extends MappedLookupBuilder
{
    /**
	 * An instance of serialVersionUID
	 */
	private static final long serialVersionUID = 3437376827145585402L;

	/**
     * Default contructor.
     */
    public PartiallyMappedLookupBuilder()
    {
        super();
    }

    protected AbstractLookup doBuild(String input) throws BuilderException
    {
        String esrCode = (super.getCodeMap().containsKey(input)) ? super
            .translateInput(input) : input;

        return super.getByCode(esrCode);
    }
}