/*
 ****************************************************************************
 *
 *  (c) Copyright 2013 BOE IDM. All rights reserved.
 *
 *  This software is proprietary to and embodies the confidential
 *  technology of BOE IDM. Possession, use, or copying of this
 *  software and media is authorized only pursuant to a valid written
 *  license from BOE IDM.
 *
 ****************************************************************************
 */

package com.cim.idm.mwmsextend.transport.management.action.util;

import org.springframework.stereotype.Component;

import com.cim.idm.framework.orm.service.CommonHistoryDataAdaptor;
import com.cim.idm.mwmsextend.transport.management.data.TransportCommandDetail;
import com.cim.idm.mwmsextend.transport.management.data.TransportCommandDetailHistory;
import com.cim.idm.mwmsextend.transport.management.data.TransportCommandDetailHistoryKey;

/*
 ****************************************************************************
 *  PACKAGE : com.cim.idm.mwmsextend.transport.management.action.util
 *  NAME    : TransportCommandDetailHistoryDataAdaptor.java
 *  TYPE    : JAVA
 *  DESCRIPTION :
 *
 ****************************************************************************
 */
@Component
public class TransportCommandDetailHistoryDataAdaptor extends CommonHistoryDataAdaptor<TransportCommandDetail, TransportCommandDetailHistoryKey, TransportCommandDetailHistory>
{

	@Override
	protected TransportCommandDetailHistoryKey getHistoryKey(TransportCommandDetail dataInfo)
	{
		TransportCommandDetailHistoryKey historyKey = new TransportCommandDetailHistoryKey();
		historyKey.setTransportCommandID(dataInfo.getKey().getTransportCommandID());
		historyKey.setTimeKey(dataInfo.getLastEventTimeKey());
		return historyKey;
	}
}
