Java tutorial
/* * Copyright 2002-2010 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ package org.springframework.amqp.rabbit.stocks.domain; import java.math.BigDecimal; import java.util.Date; /** * Simple trade request 'data' object. No functionality in this 'domain' class. * @author Mark Pollack * */ public class TradeResponse { private String ticker; private long quantity; private BigDecimal price; private String orderType; private String confirmationNumber; private boolean error; private String errorMessage; private String accountName; private long timestamp = new Date().getTime(); private String requestId; public String getRequestId() { return requestId; } public void setRequestId(String requestId) { this.requestId = requestId; } public String getTicker() { return ticker; } public void setTicker(String ticker) { this.ticker = ticker; } public long getQuantity() { return quantity; } public void setQuantity(long quantity) { this.quantity = quantity; } public BigDecimal getPrice() { return price; } public void setPrice(BigDecimal price) { this.price = price; } public String getOrderType() { return orderType; } public void setOrderType(String orderType) { this.orderType = orderType; } public String getConfirmationNumber() { return confirmationNumber; } public void setConfirmationNumber(String confirmationNumber) { this.confirmationNumber = confirmationNumber; } public String getAccountName() { return accountName; } public void setAccountName(String accountName) { this.accountName = accountName; } public boolean isError() { return error; } public void setError(boolean error) { this.error = error; } public String getErrorMessage() { return errorMessage; } public void setErrorMessage(String errorMessage) { this.errorMessage = errorMessage; } public long getTimestamp() { return timestamp; } public void setTimestamp(long timestamp) { this.timestamp = timestamp; } @Override public String toString() { return "TradeResponse [accountName=" + accountName + ", requestId=" + requestId + ", confirmationNumber=" + confirmationNumber + ", error=" + error + ", errorMessage=" + errorMessage + ", orderType=" + orderType + ", price=" + price + ", quantity=" + quantity + ", ticker=" + ticker + "]"; } }