use of org.jumpmind.symmetric.model.Trigger in project symmetric-ds by JumpMind.
the class DataService method insertDataAndDataEventAndOutgoingBatch.
/**
* @return The inserted batch id
*/
public long insertDataAndDataEventAndOutgoingBatch(ISqlTransaction transaction, Data data, String nodeId, String routerId, boolean isLoad, long loadId, String createBy, Status status) {
long dataId = insertData(transaction, data);
String channelId = null;
if (isLoad) {
TriggerHistory history = data.getTriggerHistory();
if (history != null && channelId == null) {
Trigger trigger = engine.getTriggerRouterService().getTriggerById(true, history.getTriggerId());
channelId = getReloadChannelIdForTrigger(trigger, engine.getConfigurationService().getChannels(false));
}
} else {
channelId = data.getChannelId();
}
return insertDataEventAndOutgoingBatch(transaction, dataId, channelId, nodeId, data.getDataEventType(), routerId, isLoad, loadId, createBy, status);
}
Aggregations