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

📄 recordlistbean.java

📁 一个ssh结构组成 的BS开发
💻 JAVA
字号:
package cn.hxex.library.view.bean;

import java.util.List;

import cn.hxex.library.exception.LibraryException;
import cn.hxex.library.model.Product;
import cn.hxex.library.view.util.FacesUtils;
import cn.hxex.library.view.util.ViewUtils;

public class RecordListBean extends BaseBean
{
	private String productId;
	
	private Product product;
	
	private List records;

	
	/**
	 * @return Returns the records.
	 */
	public List getRecords()
	{
		return records;
	}

	/**
	 * @param records The records to set.
	 */
	public void setRecords(List records)
	{
		this.records = records;
	}

	/**
	 * @return Returns the productId.
	 */
	public String getProductId()
	{
		return productId;
	}

	/**
	 * @param productId The productId to set.
	 */
	public void setProductId(String productId)
	{
		this.productId = productId;
	}

	/**
	 * @return Returns the product.
	 */
	public Product getProduct()
	{
		return product;
	}

	/**
	 * @param product The product to set.
	 */
	public void setProduct(Product product)
	{
		this.product = product;
	}

	public void init()
	{
		this.logger.info( "Initialize the RecordListBean!" );
		
		if( this.productId!=null )
		{
			try
			{
				this.product = this.getServiceLocator().getProductService().getProduct( this.productId );
				
				this.records = ViewUtils.convertToList( product.getRecords() );
			}
			catch( LibraryException ex )
			{
				
			}
		}
	}
	
	public String listAction()
	{
		this.logger.info( "The method listAction in RecordListBean was invoked!");
		
		return NavigationResults.RECORD_LIST;
	}
}

⌨️ 快捷键说明

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