package gov.va.med.esr.common.builder.entity;

import gov.va.med.esr.common.model.financials.RelationFinancials;
import gov.va.med.fw.util.builder.BuilderException;

/**
 * 
 * @author Rajiv Patnaik
 * Created on Sep 13, 2005
 * @version 1.0
 * 
 * Copyright © 2005 VHA. All rights reserved
 */
public class RelationFinancialsBuilder extends FinancialInformationBuilder 
{

    /**
	 * An instance of serialVersionUID
	 */
	private static final long serialVersionUID = -335252060885145567L;

	public RelationFinancialsBuilder()
    {
        super();
    }

    protected boolean shouldKeep(RelationFinancials pRelationFinancials)
    {
        return true;
    }

    protected void transfer(RelationFinancials pRelationFinancials,
            RelationFinancialsMetaData pRelationFinancialsMetaData) throws BuilderException
    { 
        super.transfer(pRelationFinancials,pRelationFinancialsMetaData);
        
        pRelationFinancials.setLivedWithPatient(super.build(pRelationFinancials.getLivedWithPatient(),
                pRelationFinancialsMetaData.getLivedWithPatient()));
        
        //pRelationFinancials.setValidDependent()- Set by Rules.
                
    }
}
