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

📄 permission.java

📁 JSP常用模块源代码之用户管理模块的全部源代码
💻 JAVA
字号:
package entity;

import java.util.ArrayList;
import java.util.List;

import service.DBManager;

/**
 * @author myte
 *
 * 实体类:权限
 */
public class Permission {
	private Integer intPID;
	private String strPName="";
	private Integer intResID;
	private String setOperation="";
	private Integer intIsAnonymous;
	private static class PermissionDB extends DBManager {

		private String tableName="Permission";
		private PermissionDB() {
		}

		protected String getTableName() {
			return tableName;
		}

		protected String[] getFields() {
			return new String[] { "intPID", "strPName",
					"intResID", "setOperation", "intIsAnonymous"};
		}

		protected Object[] getFieldValues(Object o) {
			Permission u = (Permission) o;
			return new Object[] {u.getIntPID(),u.getStrPName(),u.getIntResID()
					,u.getSetOperation(),u.getIntIsAnonymous()};
		}

		protected String getKeyFields() {
			return KEY_FIELD_NAME;
		}

		protected Object[] getKeyValues(Object o) {
			return new Object[] { ((Permission) o).getIntPID() };
		}
	}
	private static final String KEY_FIELD_NAME = "intPID";
	private static PermissionDB entityDB = new PermissionDB();
	public void insert(){
		try {
			entityDB.insert(this);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	public void update(){
		try {
			entityDB.update(this);			
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	public void delete(){
		try {
			entityDB.delete(this);			
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	public List select(String sql){
		try {
			return entityDB.executeSelect(sql);			
		} catch (Exception e) {
			e.printStackTrace();
		}
		return new ArrayList();
	}
	
	/**
	 * @return Returns the intIsAnonymous.
	 */
	public Integer getIntIsAnonymous() {
		return intIsAnonymous;
	}
	/**
	 * @param intIsAnonymous The intIsAnonymous to set.
	 */
	public void setIntIsAnonymous(Integer intIsAnonymous) {
		this.intIsAnonymous = intIsAnonymous;
	}
	/**
	 * @return Returns the intPID.
	 */
	public Integer getIntPID() {
		return intPID;
	}
	/**
	 * @param intPID The intPID to set.
	 */
	public void setIntPID(Integer intPID) {
		this.intPID = intPID;
	}
	/**
	 * @return Returns the intResID.
	 */
	public Integer getIntResID() {
		return intResID;
	}
	/**
	 * @param intResID The intResID to set.
	 */
	public void setIntResID(Integer intResID) {
		this.intResID = intResID;
	}
	/**
	 * @return Returns the setOperation.
	 */
	public String getSetOperation() {
		return setOperation;
	}
	/**
	 * @param setOperation The setOperation to set.
	 */
	public void setSetOperation(String setOperation) {
		this.setOperation = setOperation;
	}
	/**
	 * @return Returns the strPName.
	 */
	public String getStrPName() {
		return strPName;
	}
	/**
	 * @param strPName The strPName to set.
	 */
	public void setStrPName(String strPName) {
		this.strPName = strPName;
	}
}

⌨️ 快捷键说明

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