当前位置:编程学习 > JAVA >>

看项目源码时的疑问

我在网上下了个仓库管理系统项目在看他源码是发现里面的
货币表类有两个货币率类型的Set集合字段,我想问的是货币表类为什么有两个货币率类型的Set集合字段。一个不就可以了吗
货币类代码如下

public class Currency implements java.io.Serializable {

// Fields

private String curId;

private String curDesc;

private Set currencyratesForCurId = new HashSet(0);

private Set currencyratesForCurId1 = new HashSet(0);

// Constructors

/** default constructor */
public Currency() {
}

/** minimal constructor */
public Currency(String curId) {
this.curId = curId;
}

/** full constructor */
public Currency(String curId, String curDesc, Set currencyratesForCurId,
Set currencyratesForCurId1) {
this.curId = curId;
this.curDesc = curDesc;
this.currencyratesForCurId = currencyratesForCurId;
this.currencyratesForCurId1 = currencyratesForCurId1;
}

// Property accessors

public String getCurId() {
return this.curId;
}

public void setCurId(String curId) {
this.curId = curId;
}

public String getCurDesc() {
return this.curDesc;
}

public void setCurDesc(String curDesc) {
this.curDesc = curDesc;
}

public Set getCurrencyratesForCurId() {
return this.currencyratesForCurId;
}

public void setCurrencyratesForCurId(Set currencyratesForCurId) {
this.currencyratesForCurId = currencyratesForCurId;
}

public Set getCurrencyratesForCurId1() {
return this.currencyratesForCurId1;
}

public void setCurrencyratesForCurId1(Set currencyratesForCurId1) {
this.currencyratesForCurId1 = currencyratesForCurId1;
}

货币率类代码如下
public class Currencyrate implements java.io.Serializable {

// Fields

private CurrencyrateId id;

private Currency currencyByCurId;

private Currency currencyByCurId1;

// Constructors

/** default constructor */
public Currencyrate() {
}

/** full constructor */
public Currencyrate(CurrencyrateId id, Currency currencyByCurId,
Currency currencyByCurId1) {
this.id = id;
this.currencyByCurId = currencyByCurId;
this.currencyByCurId1 = currencyByCurId1;
}

// Property accessors

public CurrencyrateId getId() {
return this.id;
}

public void setId(CurrencyrateId id) {
this.id = id;
}

public Currency getCurrencyByCurId() {
return this.currencyByCurId;
}

public void setCurrencyByCurId(Currency currencyByCurId) {
this.currencyByCurId = currencyByCurId;
}

public Currency getCurrencyByCurId1() {
return this.currencyByCurId1;
}

public void setCurrencyByCurId1(Currency currencyByCurId1) {
this.currencyByCurId1 = currencyByCurId1;
}

--------------------编程问答-------------------- 你应该看看这两个在那些地方用的,怎么用的,分别表示的什么意思! --------------------编程问答-------------------- 从前台到后台,从Controller到service到dao到bean,这样的看,一方面了解流程上是什么意思,另一名也知道了哪个方法都是什么意思,这样一层一层的看就清晰的多
补充:Java ,  Java EE
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,