private final Function<WsOperationMessage, OperationLogMessage> messageFunction = new LogMessage();
@Override
public OperationLogEntry apply(WsOperationLogInstance ws) {
OperationLogEntry e = new OperationLogEntry(
new OperationId(ws.getOperationGuid()),
ws.getOperationName(),
ws.getOperationInstanceId(),
LogStatus.fromServerId(ws.getStatus()),
fromServerDateFormat(ws.getStartTimeStamp()),
fromServerDateFormat(ws.getStatusTimeStamp()),
ws.getMessage(),
getMessages(ws)
);
e.setMessageId(getOptionalLong(ws.getMsgId()));
e.setParentOpInstanceId(getOptionalLong(ws.getParentOperationInstanceId()));
e.setStats(buildOpStats(ws));
e.setFrom(ws.getFrom() == null ? "" : ws.getFrom());
e.setTimeReceived(ws.getReceivedTimeStamp() == null ? null : fromServerDateFormat(ws.getReceivedTimeStamp()));
return e;
}