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

📄 actionqueryallcmd.java

📁 一个java权限系统.主要使用j2ee框架实现.
💻 JAVA
字号:
package com.wxd.common.popedom.domain.command.popedom;

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

import com.wxd.common.popedom.domain.command.*;
import com.wxd.common.popedom.domain.entity.Action;
import com.wxd.common.popedom.persistence.ActionDao;

public class ActionQueryAllCmd extends AbstractCommand {
	private ActionDao actionDao;

	public ActionQueryAllCmd(ActionDao actionDao) {
		super();
		this.actionDao = actionDao;
		initContextAction();
	}

	public ActionQueryAllCmd() {
	}

	public CommandContext getContext() {
		return context;
	}

	public void setContext(CommandContext commandContext){
		this.context = commandContext;
		this.actionDao=(ActionDao)context.getParamObject();
	}
	
	
	public void execute(){
		System.out.println("Query ALL Action is executed!");
		setContextResultObject((new ActionSet(actionDao)).getAllActions());//(new ActionSet(actionDao)).getAllActions());
	}

	private void initContextAction() {
		List list = actionDao.getActionFromName(ActionQueryAllCmd.class.getName());
		this.context=new CommandContext();
		if (list.size() == 1) {
			this.context.setAction((Action) list.get(0));
		} else {
			// throw CommandNoFoundException();
		}
	}

	private void setContextResultObject(Map resultObject) {
		this.context.setResultObject(resultObject);
	}

}

⌨️ 快捷键说明

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