⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 editcategory.java

📁 webwork in action 下载。
💻 JAVA
字号:
/* * Copyright (c) 2005 Manning Publications. All Rights Reserved. */package org.hibernate.auction.web.actions.categories;import com.opensymphony.xwork.Preparable;import org.hibernate.auction.model.Category;import org.hibernate.auction.web.actions.AbstractCategoryAwareAction;/** * EditCategory * * @author Jason Carreira <jcarreira@eplus.com> */public class EditCategory extends AbstractCategoryAwareAction implements Preparable {    private Long categoryId;    protected Category category;    public Long getCategoryId() {        return categoryId;    }    public void setCategoryId(Long categoryId) {        this.categoryId = categoryId;    }    public Category getCategory() {        return category;    }    public void setCategory(Category category) {        this.category = category;    }    public void prepare() throws Exception {        if (categoryId != null) {            category = categoryDAO.getCategoryById(categoryId,false);        }    }    public String saveCategory() {        if (category == null) {            return INPUT;        }        categoryDAO.makePersistent(category);        return SUCCESS;    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -