📄 editcategory.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 + -