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

// Java Classes

// Library Classes

// Framework Classes

// Common Classes
import gov.va.med.esr.common.builder.entity.NameMetaData;
import gov.va.med.esr.common.model.person.Name;
import gov.va.med.esr.service.external.person.RelationInfo;

// Messaging Classes

public class NameMetaDataFromIVM
    extends AbstractMetaData
    implements NameMetaData
{
    private Name entity;

    private RelationInfo ivmRelationInfo;

    public NameMetaDataFromIVM(RelationInfo ivmRelationInfo)
    {
        super();

        this.ivmRelationInfo = ivmRelationInfo;
    }

    /*
     * (non-Javadoc)
     * 
     * @see gov.va.med.esr.messaging.builder.entity.NameMetaData#getEntity()
     */
    public Name getEntity()
    {
        return this.entity;
    }

    /*
     * (non-Javadoc)
     * 
     * @see gov.va.med.esr.messaging.builder.entity.NameMetaData#setEntity(gov.va.med.esr.common.model.person.Name)
     */
    public void setEntity(Name entity)
    {
        this.entity = entity;
    }

    /*
     * (non-Javadoc)
     * 
     * @see gov.va.med.esr.messaging.builder.entity.NameMetaData#getDegree()
     */
    public String getDegree()
    {
        return null;
    }

    /*
     * (non-Javadoc)
     * 
     * @see gov.va.med.esr.messaging.builder.entity.NameMetaData#getFamilyName()
     */
    public String getFamilyName()
    {
        return (this.ivmRelationInfo == null) ? null :this.ivmRelationInfo
            .getFamilyName();
    }

    /*
     * (non-Javadoc)
     * 
     * @see gov.va.med.esr.messaging.builder.entity.NameMetaData#getGivenName()
     */
    public String getGivenName()
    {
        return (this.ivmRelationInfo == null) ? null : this.ivmRelationInfo.getGivenName();
    }

    /*
     * (non-Javadoc)
     * 
     * @see gov.va.med.esr.messaging.builder.entity.NameMetaData#getMiddleName()
     */
    public String getMiddleName()
    {
        return (this.ivmRelationInfo == null) ? null :this.ivmRelationInfo.getMiddleName();
    }

    /*
     * (non-Javadoc)
     * 
     * @see gov.va.med.esr.messaging.builder.entity.NameMetaData#getPrefix()
     */
    public String getPrefix()
    {
        return (this.ivmRelationInfo == null) ? null : this.ivmRelationInfo.getPrefix();
    }

    /*
     * (non-Javadoc)
     * 
     * @see gov.va.med.esr.messaging.builder.entity.NameMetaData#getSuffix()
     */
    public String getSuffix()
    {
        return (this.ivmRelationInfo == null) ? null : this.ivmRelationInfo.getSuffix();
    }

    /*
     * (non-Javadoc)
     * 
     * @see gov.va.med.esr.messaging.builder.entity.NameMetaData#getType()
     */
    public String getType()
    {
        return null;
    }
}