📄 routeformbean.java
字号:
/* @LICENSE_COPYRIGHT@ */package net.sf.irunninglog.servlet.formbean;import org.apache.commons.logging.Log;import org.apache.commons.logging.LogFactory;import net.sf.irunninglog.canonical.Route;import net.sf.irunninglog.util.DTO;/** * Form bean representation of the <em>Route</em> business object. Used to * provide an implementation of the <em>Route</em> object within the * application's view tier. * * @author <a href="mailto:allan_e_lewis@yahoo.com">Allan Lewis</a> * @version $Revision: 1.1.1.1 $ $Date: 2005/06/23 01:49:01 $ * @since iRunningLog 1.0 */public final class RouteFormBean extends ReferenceDataFormBean { /** <code>Log</code> instance for this class. */ private static final Log LOG = LogFactory.getLog(RouteFormBean.class); /** The bean's <em>comments</em> field. */ private String mComments; /** * Create a new form bean. */ public RouteFormBean() { super(); } /** * Get the value of the bean's <em>comments</em> field. * * @return The current value of the <em>comments</em> field */ public String getComments() { return mComments; } /** * Set the value of the bean's <em>comments</em> field. * * @param value The value to be set onto the <em>comments</em> field */ public void setComments(String value) { mComments = value; } /** * Retrieve the form bean's values. * * @return A transfer object representing the for bean's state */ public DTO getValues() { DTO valueObject = super.getValues(); if (LOG.isDebugEnabled()) { LOG.debug("getValues: Contents of the value object " + " (before) " + valueObject); } valueObject.setCanonicalId(Route.CANONICAL_ID); valueObject.setValue(Route.FIELD_COMMENTS, getComments()); if (LOG.isDebugEnabled()) { LOG.debug("getValues: Contents of the value object " + " (after) " + valueObject); } return valueObject; } /** * Update the form bean's values. * * @param valueObject Value object containing the new values * to be applied to the form bean */ public void setValues(DTO valueObject) { if (LOG.isDebugEnabled()) { LOG.debug("setValues: Contents of the value object " + valueObject); } super.setValues(valueObject); setComments(valueObject.getValue(Route.FIELD_COMMENTS)); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -