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

📄 operation.java

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

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

import java.lang.Integer;
import java.lang.String;

/**
 * Pojo for table OPERATION
 * @author tongxiaodong
 * Creation time:Nov 14, 2006 10:48:20 PM
 */

public class Operation implements Pojo{
	
	private Integer id = null;//PK
	private Integer appId = null;//FK
	private String columnName = null;
	private String oldValue = null;
	private String newValue = null;
	
	
	public Integer getId()
	{
		return this.id;
	}
	public void setId(String id )
	{
		this.id = new Integer(id);
	}
	
	public Integer getAppId()
	{
		return this.appId;
	}
	public void setAppId(String appId )
	{
		this.appId = new Integer(appId);
	}
	
	public String getColumnName()
	{
		return this.columnName;
	}
	public void setColumnName(String columnName)
	{
		this.columnName = columnName;
	}
	
	public String getOldValue()
	{
		return this.oldValue;
	}
	public void setOldValue(String oldValue)
	{
		this.oldValue = oldValue;
	}
	
	public String getNewValue()
	{
		return this.newValue;
	}
	public void setNewValue(String newValue)
	{
		this.newValue = newValue;
	}
	
	/**
	 * 根据属性名获得属性值
	 * @param colName
	 * @return
	 */
	public Object getColValue(String colName)
	{
		
		
		if(colName.equals("id"))
		{
			return this.getId();
		}
		
		if(colName.equals("appId"))
		{
			return this.getAppId();
		}
		
		if(colName.equals("columnName"))
		{
			return this.getColumnName();
		}
		
		if(colName.equals("oldValue"))
		{
			return this.getOldValue();
		}
		
		if(colName.equals("newValue"))
		{
			return this.getNewValue();
		}
		
		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("appId"))
		{
			this.setAppId(value.toString());
		}
		
		if(colName.equals("columnName"))
		{
			this.setColumnName(value.toString());
		}
		
		if(colName.equals("oldValue"))
		{
			this.setOldValue(value.toString());
		}
		
		if(colName.equals("newValue"))
		{
			this.setNewValue(value.toString());
		}
	  }catch(Exception c)
	  {
		   //System.out.println(c.getStackTrace());
		   System.out.println("对Operation型Pojo的属性进行非法赋值报错!");
	  }
		
	}
		

}

⌨️ 快捷键说明

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