• 大小: 13.6MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-06-26
  • 语言: Java
  • 标签: Java  Web  

资源简介

分布式宠物商店(EJB3+JPA+Struts2) 宠物商店(petstore)是个比较经典的demo案例, 以宠物商店充分演示EJB3与Java Web程序,Java图形界面程序的结合 主要模块:会员模块 宠物类别模块 宠物模块 购物模块

资源截图

代码片段和文件信息

package com.helloweenvsfei.petstore.entity;

import java.io.Serializable;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
@Table(name = “tb_cart“)
public class CartEO implements Serializable {

private static final long serialVersionUID = -8704512710489090477L;

@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Integer id;

@ManyToOne
@JoinColumn(name = “user_id“)
private UserEO user;

private String name;

@Temporal(TemporalType.TIMESTAMP)
private Date date;

@OneToMany(cascade = CascadeType.ALL fetch = FetchType.EAGER mappedBy = “cart“)
private Set cartItems = new HashSet();

private boolean payed;

public boolean isPayed() {
return payed;
}

public void setPayed(boolean payed) {
this.payed = payed;
}

public Set getCartItems() {
return cartItems;
}

public void setCartItems(Set cartItems) {
this.cartItems = cartItems;
}

public Date getDate() {
return date;
}

public void setDate(Date date) {
this.date = date;
}

public Integer getId() {
return id;
}

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

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}

public UserEO getUser() {
return user;
}

public void setUser(UserEO user) {
this.user = user;
}

}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        478  2008-12-14 21:17  petstoreframe\.classpath

     文件        389  2008-12-14 21:07  petstoreframe\.project

     文件        941  2008-12-14 22:35  petstoreframe\bin\com\helloweenvsfei\petstore\action\AddCategoryAction.class

     文件       1028  2008-12-14 22:36  petstoreframe\bin\com\helloweenvsfei\petstore\action\AddPetAction.class

     文件        944  2008-12-14 22:36  petstoreframe\bin\com\helloweenvsfei\petstore\action\EditCategoryAction.class

     文件       3186  2008-12-14 22:35  petstoreframe\bin\com\helloweenvsfei\petstore\action\RemoveCategoryAction.class

     文件        944  2008-12-14 22:36  petstoreframe\bin\com\helloweenvsfei\petstore\action\ViewCartAction.class

     文件       3269  2008-12-14 22:35  petstoreframe\bin\com\helloweenvsfei\petstore\dialog\AddCartItemDialog$1.class

     文件        935  2008-12-14 22:35  petstoreframe\bin\com\helloweenvsfei\petstore\dialog\AddCartItemDialog$2.class

     文件       2942  2008-12-14 22:35  petstoreframe\bin\com\helloweenvsfei\petstore\dialog\AddCartItemDialog.class

     文件       4019  2008-12-14 22:35  petstoreframe\bin\com\helloweenvsfei\petstore\dialog\AddCategoryDialog$1.class

     文件        873  2008-12-14 22:35  petstoreframe\bin\com\helloweenvsfei\petstore\dialog\AddCategoryDialog$2.class

     文件       3154  2008-12-14 22:35  petstoreframe\bin\com\helloweenvsfei\petstore\dialog\AddCategoryDialog.class

     文件       3667  2008-12-14 22:36  petstoreframe\bin\com\helloweenvsfei\petstore\dialog\AddPetDialog$1.class

     文件        863  2008-12-14 22:36  petstoreframe\bin\com\helloweenvsfei\petstore\dialog\AddPetDialog$2.class

     文件       3122  2008-12-14 22:36  petstoreframe\bin\com\helloweenvsfei\petstore\dialog\AddPetDialog.class

     文件       2903  2008-12-14 22:35  petstoreframe\bin\com\helloweenvsfei\petstore\dialog\LoginDialog$1.class

     文件        806  2008-12-14 22:35  petstoreframe\bin\com\helloweenvsfei\petstore\dialog\LoginDialog$2.class

     文件       3932  2008-12-14 22:35  petstoreframe\bin\com\helloweenvsfei\petstore\dialog\LoginDialog$3.class

     文件        806  2008-12-14 22:35  petstoreframe\bin\com\helloweenvsfei\petstore\dialog\LoginDialog$4.class

     文件       3669  2008-12-14 22:35  petstoreframe\bin\com\helloweenvsfei\petstore\dialog\LoginDialog.class

     文件       1150  2008-12-14 22:36  petstoreframe\bin\com\helloweenvsfei\petstore\dialog\Petstoreframe$1.class

     文件       3190  2008-12-14 22:36  petstoreframe\bin\com\helloweenvsfei\petstore\dialog\Petstoreframe$2.class

     文件       1855  2008-12-14 22:36  petstoreframe\bin\com\helloweenvsfei\petstore\dialog\Petstoreframe$3.class

     文件       8674  2008-12-14 22:36  petstoreframe\bin\com\helloweenvsfei\petstore\dialog\Petstoreframe.class

     文件       2816  2008-12-14 22:36  petstoreframe\bin\com\helloweenvsfei\petstore\dialog\ViewCartDialog$1.class

     文件       5302  2008-12-14 22:36  petstoreframe\bin\com\helloweenvsfei\petstore\dialog\ViewCartDialog.class

     文件       2221  2008-12-14 22:35  petstoreframe\bin\com\helloweenvsfei\petstore\model\CartTableModel.class

     文件       2448  2008-12-14 22:35  petstoreframe\bin\com\helloweenvsfei\petstore\model\PetTableModel.class

     文件        671  2008-12-14 22:36  petstoreframe\bin\com\helloweenvsfei\petstore\run\RunPetstore.class

............此处省略153个文件信息

评论

共有 条评论