📄 ibusinessobject.java
字号:
/* @LICENSE_COPYRIGHT@ */package net.sf.irunninglog.businessobject;import java.io.Serializable;import net.sf.irunninglog.util.DTO;import net.sf.irunninglog.validation.ValidationException;/** * Base interface for business objects (BOs) within the application. This * interface exposes the two methods that all BOs must provide. The * <code>getValues</code> method provides a 'snapshot' of a BO's * values, and <code>setValues</code> allows for the updating of a * BO's values. * * @author <a href="mailto:allan_e_lewis@yahoo.com">Allan Lewis</a> * @version $Revision: 1.1.1.1 $ $Date: 2005/06/23 01:48:54 $ * @since iRunningLog 1.0 */public interface IBusinessObject extends Serializable { /** * Get a string representing the primary key value of a business object. * It is up to subclasses to implement this method to return the value that * uniquely idententifies the object. * * @return The primary key of the business object */ String getPrimaryKey(); /** * Update the object's primary key value based on the values contained * in a transfer object. * * @param valueObject The transfer object containing values to be used in * formulating the primary key value */ void setPrimaryKey(DTO valueObject); /** * Retrieve the BO's values. This will return a <code>DTO</code> * populated with <code>String</code> representations of any values that * the BO wishes to expose. * * @return A transfer object representing the BO's state */ DTO getValues(); /** * Update the BO's values. This will pass the supplied * transfer object to the BO, which is then responsible for * updating any internal values based on the contents of the * transfer object. * * @param valueObject Value object containing the new values * to be applied to the BO * @throws ValidationException If the transfer object contains invalid * values that the BO is unable to * use */ void setValues(DTO valueObject) throws ValidationException;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -