/********************************************************************
 * Copyright © 2006 VHA. All rights reserved
 ********************************************************************/

package gov.va.med.esr.common.model.lookup;

import gov.va.med.fw.model.lookup.AbstractCode;
import gov.va.med.fw.model.lookup.AbstractNamedActiveLookup;

/**
 * Registry Type.
 * 
 * @author Muddaiah Ranga
 * @version 3.0
 */
public class RegistryType extends AbstractNamedActiveLookup {

    private static final long serialVersionUID = 2471271693602000220L;

    public static final Code CODE_POW_REGISTRY = new Code("1");
    
    public static final Code CODE_PH_REGISTRY = new Code("2");

	public static final Code CODE_SHAD_REGISTRY = new Code("3");

	public static class Code extends AbstractCode {
		
		/**
		 * An instance of serialVersionUID
		 */
		private static final long serialVersionUID = 379787004445318271L;

		private Code(String code) {
			super(code);
		}

		public static Code getByCode(String code) {
			return (Code) getCode(Code.class, code);
		}
	}

	/**
	 * Default constructor.
	 */
	public RegistryType() {
		super();
	}
    
    public boolean isPurpleHeart() {
        return CODE_PH_REGISTRY.getCode().equals(this.getCode());
    }
    
    public boolean isPrisonerOfWar() {
        return CODE_POW_REGISTRY.getCode().equals(this.getCode());
    }
    
    public boolean isSHAD() {
        return CODE_SHAD_REGISTRY.getCode().equals(this.getCode());
    }
}
