代码实现
系统java源代码设计按照DAO模式设计分为3个包
Cd包放一些bean类:
allorder.java类
package cdshop.cd;
/**
* <p>Title: </p>
*/
public class allorder {
private long Id; //ID序列号
private long orderId; //订单号表序列号
private long cdNo; //CD表序列号
private int Amount; //购买数量
public allorder() {
Id = 0;
orderId = 0;
cdNo = 0;
Amount = 0;
}
public long getId() {
return Id;
}
public void setId(long newId) {
this.Id = newId;
}
public long getOrderId() {
return orderId;
}
public void setOrderId(long orderId) {
this.orderId = orderId;
}
public long getcdNo() {
return cdNo;
}
public void setcdNo(long newcdNo) {
this.cdNo = newcdNo;
}
public int getAmount() {
return Amount;
}
public void setAmount(int newAmount) {
this.Amount = newAmount;
}
}
cd.java
package cdshop.cd;
/**
* <p>CD类 </p>
*/
public class cd {
private long Id; //ID序列号
private String cdName; //CD名称
private int cdClass; //CD类别
private String classname ; //CD类别名
private String Singer; //歌手
private String Publish; //发行公司
private String cdNo ; //CD编号
private String musiclist ; //歌曲列表
private float Price ; //售价
private int Amount ; //总数量
private int Leav_number ; //剩余数量
private String RegTime ; //登记时间
private String picture ; //CD封面文件的名称
/**
* 图书的初始化
*/
public cd() {
Id = 0;
cdName = "";
cdClass = 0;
classname = "";
Singer = "";
Publish = "";
cdNo = "";
musiclist = "";
Price = 0;
Amount = 0;
Leav_number = 0;
RegTime = "";
}
public void setId(long newId){
this.Id = newId;
}
public long getId(){
return Id;
}
public void setcdName(String newcdName) {
this.cdName = newcdName;
}
public String getcdName() {
return cdName;
}
public void setcdClass(int newcdClass) {
this.cdClass = newcdClass;
}
public int getcdClass() {
return cdClass;
}
public void setClassname(String cname) {
this.classname = cname;
}
public String getClassname() {
return classname;
}
public void setSinger(String newSinger) {
this.Singer = newSinger;
}
public String getSinger() {
return Singer;
}
public void setcdNo(String newcdNo) {
this.cdNo = newcdNo;
}
public String getcdNo() {
return cdNo;
}
public void setPublish(String newPublish) {
this.Publish = newPublish;
}
public String getPublish() {
return Publish;
}
public void setmusiclist(String newmusiclist) {
this.musiclist= newmusiclist;
}
public String getmusiclist() {
return musiclist;
}
public void setPrice(float newPrice) {
this.Price = newPrice;
}
public float getPrice() {
return Price;
}
public void setAmount(int newAmount) {
this.Amount = newAmount;
}
public long getAmount() {
return Amount;
}
public void setLeav_number(int newLeav_number) {
this.Leav_number = newLeav_number;
}
public int getLeav_number() {
return Leav_number;
}
public void setRegTime(String newRegTime) {
this.RegTime = newRegTime;
}
751com.cn
cdclass.java
package cdshop.cd;
/**
* <p>CD分类类</p>
*/
public class cdclass {
private int Id; //ID序列号
private String ClassName; //CD类别
public cdclass() {
Id = 0;
ClassName = "";
}
public cdclass(int newId, String newname) {
Id = newId;
ClassName = newname;
}
public int getId() {
return Id;
}
上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] ... 下一页 >>