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

📄 movietypeaction.java

📁 j2ee,struts2 hibernate spring2.5的电影系统简单的
💻 JAVA
字号:
package com.movie.action.movietype;

import java.util.Iterator;
import java.util.List;
import java.util.Map;

import org.apache.struts2.interceptor.SessionAware;

import com.movie.dojo.Movietype;
import com.movie.manager.MovietypeManager;
import com.opensymphony.xwork2.ActionSupport;

public class MovietypeAction extends ActionSupport implements SessionAware {

	private int id;
	private MovietypeManager movietypeManager;
	private Movietype movietype;
	private List MovietypeList;
	private Map session;

	public Map getSession() {
		return session;
	}

	public void setSession(Map session) {
		this.session = session;
	}

	public List getMovietypeList() {
		return MovietypeList;
	}

	public void setMovietypeList(List movietypeList) {
		MovietypeList = movietypeList;
	}

	public String delMovietype() throws Exception {
		movietypeManager.delMovietype(movietype);
		System.out.println("movietype is del!!!");
		return SUCCESS;
	}

	public String addMovietype() throws Exception {
		/* movietypeManager.addMovietype(movietype); */
		System.out.println("addmovietype");
		System.out.println(movietype.getTypename());
		movietypeManager.addMovietype(movietype);
		return SUCCESS;
	}

	public String modifyMovietype() throws Exception {
		System.out.println(movietype.getTypeid());
		System.out.println(movietype.getTypename());
		movietypeManager.modifyMovietype(movietype);

		return SUCCESS;
	}

	public String getMovieType() throws Exception {
		movietypeManager.getMovieType(id);
		return SUCCESS;
	}

	public String ListMovieType() throws Exception {
		MovietypeList = movietypeManager.getlistMovieType();
		session.put("list", MovietypeList);

		return SUCCESS;
	}

	public int getId() {
		return id;
	}

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

	public MovietypeManager getMovietypeManager() {
		return movietypeManager;
	}

	public void setMovietypeManager(MovietypeManager movietypeManager) {
		this.movietypeManager = movietypeManager;
	}

	public Movietype getMovietype() {
		return movietype;
	}

	public void setMovietype(Movietype movietype) {
		this.movietype = movietype;
	}

}

⌨️ 快捷键说明

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