playactoraction.java

来自「spring+webwork+iBatis做的VOD系统web端代码。值得学习M」· Java 代码 · 共 51 行

JAVA
51
字号
package com.hintsoft.vod.action;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.hintsoft.vod.action.root.ActionRoot;
import com.hintsoft.vod.business.IPlayactorBusiness;
import com.hintsoft.vod.entities.Playactor;
import com.hintsoft.vod.entities.Associate;

public class PlayactorAction extends ActionRoot {
	private static final Log logger = LogFactory.getLog(PlayactorAction.class);
	
	private static final long serialVersionUID = 1L;
	private IPlayactorBusiness playactorBusiness;
	
	public String listPlayactors() throws Exception {
		if (logger.isDebugEnabled())
			logger.debug("执行Action方法.");
		
		playactorBusiness.getPlayactors();
		
		return SUCCESS;
	}
	
	public String createPlayactor() throws Exception {
		Playactor playactor = new Playactor();
		playactor.setCategoryId(1);
		playactor.setName("Twins");
		playactor.setRemark("影视歌");
		
		int id = playactorBusiness.createPlayactor(playactor);
		
		Associate pm = new Associate();
		pm.setMainId(id);
		pm.setSecondId(0);
		
		playactorBusiness.setMovieAssociate(pm);
		
		return SUCCESS;
	}

	public IPlayactorBusiness getPlayactorBusiness() {
		return playactorBusiness;
	}

	public void setPlayactorBusiness(IPlayactorBusiness playactorBusiness) {
		this.playactorBusiness = playactorBusiness;
	}
}

⌨️ 快捷键说明

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