package ossj.common;

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

import javax.oss.ManagedEntityKey;

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

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