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

📄 application.java

📁 具备多表组合查询组件功能。通过将表字段与表间关系映射到对象关系及属性
💻 JAVA
字号:
package cn.edu.buaa.ieguam.logmanage.pojos;

import cn.edu.buaa.ieguam.logmanage.Pojo;

public class Application implements Pojo {

	private Integer id = null;
	private Integer mainId = null;
	private String opNo = null;
	
	//private String logTypeNo = null;
	
	private String sqls = null;
	private String tableName = null;
	private String recPk = null;
	private String empId = null;
	
	
	
	public Integer getId()
	{
		return this.id;
	}
	public void setId(String id)
	{
		this.id = new Integer(id);
	}
	
	public Integer getMainId()
	{
		return this.mainId;
	}
	public void setMainId(String mainId)
	{
		this.mainId = new Integer(mainId);
	}
	
	public String getOpNo()
	{
		return this.opNo;
	}
	public void setOpNo(String opNo)
	{
		this.opNo = opNo;
	}

/**
	public String getLogTypeNo()
	{
		return this.logTypeNo;
	}
	public void setLogTypeNo(String logTypeNo)
	{
		this.logTypeNo = logTypeNo;
	}
*/	
	public String getSqls()
	{
		return this.sqls;
	}
	public void setSqls(String sqls)
	{
		this.sqls = sqls;
	}
	
	public String getTableName()
	{
		return this.tableName;
	}
	public void setTableName(String tableName)
	{
		this.tableName = tableName;
	}
	
	public String getRecPk()
	{
		return this.recPk;
	}
	public void setRecPk(String recPk)
	{
		this.recPk = recPk;
	}
	
	public String getEmpId()
	{
		return this.empId;
	}
	public void setEmpId(String empId)
	{
		this.empId = empId;
	}
	
	
	
	/**
	 * 根据属性名获得属性值
	 * @param colName
	 * @return
	 */
	public Object getColValue(String colName)
	{
		if(colName.equals("id"))
		{
			return this.getId();
		}
		
		if(colName.equals("mainId"))
		{
			return this.getMainId();
		}
		
		if(colName.equals("opNo"))
		{
			return this.getOpNo() ;
		}

/**
		if(colName.equals("logTypeNo"))
		{
			return this.getLogTypeNo() ;
		}
*/		
		if(colName.equals("sqls"))
		{
			return this.getSqls() ;
		}
		
		if(colName.equals("tableName"))
		{
			return this.getTableName() ;
		}
		
		if(colName.equals("recPk"))
		{
			return this.getRecPk() ;
		}
		
		if(colName.equals("empId"))
		{
			return this.getEmpId() ;
		}
		
		return null;
	}
	
	/**
	 * 设置属性名对应的属性值
	 * @param colName
	 * @param value
	 */
	public void setColValue(String colName,Object value)
	{
		if(value==null)
		{
			return;
		}
		if(value.toString().equals("null"))
		{
			return;
		}
		if(value.toString().trim().equals(""))
		{
			return;
			
		}
	    
	  try
	  {
		if(colName.equals("id"))
		{
			this.setId(value.toString());
		}
		
		if(colName.equals("mainId"))
		{
			this.setMainId(value.toString());
		}
		
		if(colName.equals("opNo"))
		{
			this.setOpNo(value.toString());
		}
	
/**
		if(colName.equals("logTypeNo"))
		{
			this.setLogTypeNo(value.toString());
		}
*/		
		if(colName.equals("sqls"))
		{
			this.setSqls(value.toString());
		}
		
		if(colName.equals("tableName"))
		{
			this.setTableName(value.toString());
		}
		if(colName.equals("recPk"))
		{
			this.setRecPk(value.toString());
		}
		if(colName.equals("empId"))
		{
			this.setEmpId(value.toString());
		}
	  }catch(Exception c)
	  {
		   //System.out.println(c.getStackTrace());
		   System.out.println("对Application型Pojo的属性进行非法赋值报错!");
	  }
	}

}

⌨️ 快捷键说明

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