📄 fundaccountdto.java
字号:
package com.fund.client;
import java.io.Serializable;
import com.fund.fund.FundDto;
/**
*
* <p>Title: </p>
*
* <p>Description: </p>
*
* <p>Copyright: Copyright (c) 2005</p>
*
* <p>Company: </p>
*
* @author not attributable
* @version 1.0
*/
public class FundAccountDto implements Serializable {
/**
* serialVersionUID
*/
private static final long serialVersionUID = 1L;
/**
*fundAccNo
*/
private Integer fundAccNo;
/**
*financialAccNo
*/
private Integer financialAccNo;
/**
*fundNo
*/
private Integer fundNo;
/**
*fundName
*/
private String fundName;
/**
*quantity
*/
private Integer quantity;
/**
*price
*/
private Double price;
/**
*fundDto
*/
private FundDto fundDto = new FundDto();
/**
*
* @return FundDto
*/
public FundDto getFundDto() {
return fundDto;
}
/**
*
* @param fundDto FundDto
*/
public void setFundDto(FundDto fundDto) {
this.fundDto = fundDto;
}
/**
*
* @return Integer
*/
public Integer getFundAccNo() {
return fundAccNo;
}
/**
*
* @param fundAccNo Integer
*/
public void setFundAccNo(Integer fundAccNo) {
this.fundAccNo = fundAccNo;
}
/**
*
* @return Integer
*/
public Integer getFinancialAccNo() {
return financialAccNo;
}
/**
*
* @param financialAccNo Integer
*/
public void setFinancialAccNo(Integer financialAccNo) {
this.financialAccNo = financialAccNo;
}
/**
*
* @return Integer
*/
public Integer getFundNo() {
return fundNo;
}
/**
*
* @param fundNo Integer
*/
public void setFundNo(Integer fundNo) {
this.fundNo = fundNo;
}
/**
*
* @param fundName String
*/
public void setFundName(String fundName) {
this.fundName = fundName.toUpperCase();
}
/**
*
* @return String
*/
public String getFundName() {
return this.fundName;
}
/**
*
* @return Double
*/
public Double getTotalPrice() {
double totalPrice = quantity.doubleValue() * price.doubleValue();
java.text.DecimalFormat obDF = new java.text.DecimalFormat("#.##");
return new Double(obDF.format(totalPrice));
// return new Double(totalPrice);
}
/**
*
* @return Integer
*/
public Integer getQuantity() {
return quantity;
}
/**
*
* @param quantity Integer
*/
public void setQuantity(Integer quantity) {
this.quantity = quantity;
}
/**
*
* @return Double
*/
public Double getPrice() {
if (price != null) {
java.text.DecimalFormat obDF = new java.text.DecimalFormat("#.##");
return new Double(obDF.format(price));
} else {
return price;
}
}
/**
*
* @param price Double
*/
public void setPrice(Double price) {
java.text.DecimalFormat obDF = new java.text.DecimalFormat("#.##");
this.price = new Double(obDF.format(price));
// this.price = price;
}
/**
*
* @param obj Object
* @return boolean
*/
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof FundAccountDto)) {
return false;
}
FundAccountDto that = (FundAccountDto) obj;
if (!(that.fundAccNo == null ? this.fundAccNo == null
:
that.fundAccNo.equals(this.fundAccNo))) {
return false;
}
if (!(that.financialAccNo == null ? this.financialAccNo == null
:
that.financialAccNo.equals(this.financialAccNo))) {
return false;
}
if (!(that.fundNo == null ? this.fundNo == null
:
that.fundNo.equals(this.fundNo))) {
return false;
}
if (!(that.quantity == null ? this.quantity == null
:
that.quantity.equals(this.quantity))) {
return false;
}
if (!(that.price == null ? this.price == null
:
that.price.equals(this.price))) {
return false;
}
return true;
}
/**
*
* @return int
*/
public int hashCode() {
int result = 17;
result = 37 * result + this.fundAccNo.hashCode();
result = 37 * result + this.financialAccNo.hashCode();
result = 37 * result + this.fundNo.hashCode();
result = 37 * result + this.quantity.hashCode();
result = 37 * result + this.price.hashCode();
return result;
}
/**
*
* @return String
*/
public String toString() {
String returnString = "";
//returnString += "FUND ACCOUNT NUMBER:"+fundAccNo;
returnString += " FINANCING ACCOUNT NUMBER:" + financialAccNo;
returnString += " FUND NUMBER:" + fundNo;
returnString += " QUANTITY:" + quantity;
returnString += " PRICE:" + price;
return returnString;
}
/**
*
* @param msg String
* @return String
*/
public String logData(String msg) {
String returnString = "\n[" + msg.toUpperCase() + "]\n";
returnString += toString() + "\n";
return returnString;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -