/*
 ****************************************************************************
 *
 *  (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.TransportCommand;
import com.cim.idm.mwmsextend.transport.management.data.TransportCommandHistory;
import com.cim.idm.mwmsextend.transport.management.data.TransportCommandHistoryKey;

/*
 ****************************************************************************
 *  PACKAGE : com.cim.idm.mwmsextend.transport.management.action.util
 *  NAME    : TransportCommandHistoryDataAdaptor.java
 *  TYPE    : JAVA
 *  DESCRIPTION :
 *
 ****************************************************************************
 */
@Component
public class TransportCommandHistoryDataAdaptor extends CommonHistoryDataAdaptor<TransportCommand, TransportCommandHistoryKey, TransportCommandHistory>
{

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