package ossj.common.cbe;

import javax.xml.bind.annotation.adapters.XmlAdapter;

import javax.oss.cbe.EntityKey;

/**
 *
 * @author pm200800
 */
public class EntityKeyAdapter extends XmlAdapter<EntityKeyImpl,EntityKey>{
    
    public EntityKey unmarshal(EntityKeyImpl p) throws Exception {
        try {
            EntityKey r = p;
            return r;
        }
        catch (Exception e)
        {
            e.printStackTrace();
            String msg = "Unable to unmarshall EntityKey : "+p;
            throw new Exception(msg+" due to "+e);   
        }                
    }

    public EntityKeyImpl marshal(EntityKey p) throws Exception {
        try {
            EntityKeyImpl r = (EntityKeyImpl)p;
            return r;
        }
        catch (Exception e)
        {
            e.printStackTrace();
            String msg = "Unable to marshall EntityKeyImpl : "+p;
            throw new Exception(msg+" due to "+e);   
        } 
    }
    
}
