in messages/src/main/java/com/epam/deltix/timebase/messages/universal/TradeEntry.java [737:823]
public TradeEntry copyFrom(RecordInfo template) {
super.copyFrom(template);
if (template instanceof TradeEntryInfo) {
TradeEntryInfo t = (TradeEntryInfo)template;
if (t.hasPrice()) {
setPrice(t.getPrice());
} else {
nullifyPrice();
}
if (t.hasSize()) {
setSize(t.getSize());
} else {
nullifySize();
}
if (t.hasCondition()) {
if (hasCondition() && getCondition() instanceof StringBuilder) {
((StringBuilder)getCondition()).setLength(0);
} else {
setCondition(new StringBuilder());
}
((StringBuilder)getCondition()).append(t.getCondition());
} else {
nullifyCondition();
}
if (t.hasTradeType()) {
setTradeType(t.getTradeType());
} else {
nullifyTradeType();
}
if (t.hasSellerNumberOfOrders()) {
setSellerNumberOfOrders(t.getSellerNumberOfOrders());
} else {
nullifySellerNumberOfOrders();
}
if (t.hasBuyerNumberOfOrders()) {
setBuyerNumberOfOrders(t.getBuyerNumberOfOrders());
} else {
nullifyBuyerNumberOfOrders();
}
if (t.hasSellerOrderId()) {
if (!(hasSellerOrderId() && getSellerOrderId() instanceof BinaryAsciiString)) {
setSellerOrderId(new BinaryAsciiString());
}
((BinaryAsciiString)getSellerOrderId()).assign(t.getSellerOrderId());
} else {
nullifySellerOrderId();
}
if (t.hasBuyerOrderId()) {
if (!(hasBuyerOrderId() && getBuyerOrderId() instanceof BinaryAsciiString)) {
setBuyerOrderId(new BinaryAsciiString());
}
((BinaryAsciiString)getBuyerOrderId()).assign(t.getBuyerOrderId());
} else {
nullifyBuyerOrderId();
}
if (t.hasSellerParticipantId()) {
if (!(hasSellerParticipantId() && getSellerParticipantId() instanceof BinaryAsciiString)) {
setSellerParticipantId(new BinaryAsciiString());
}
((BinaryAsciiString)getSellerParticipantId()).assign(t.getSellerParticipantId());
} else {
nullifySellerParticipantId();
}
if (t.hasBuyerParticipantId()) {
if (!(hasBuyerParticipantId() && getBuyerParticipantId() instanceof BinaryAsciiString)) {
setBuyerParticipantId(new BinaryAsciiString());
}
((BinaryAsciiString)getBuyerParticipantId()).assign(t.getBuyerParticipantId());
} else {
nullifyBuyerParticipantId();
}
if (t.hasSide()) {
setSide(t.getSide());
} else {
nullifySide();
}
if (t.hasMatchId()) {
if (!(hasMatchId() && getMatchId() instanceof BinaryAsciiString)) {
setMatchId(new BinaryAsciiString());
}
((BinaryAsciiString)getMatchId()).assign(t.getMatchId());
} else {
nullifyMatchId();
}
}
return this;
}