test.entity.house
Class HouseBean
test.entity.house.HouseBean
- public abstract class HouseBean
Implementation of the HouseBean. Each instance of HouseBean
maps to a table entry of "house", where house is defined as
CREATE TABLE house (
name VARCHAR(250),
points INTEGER
)
HouseBean is abstract since it's taking advantage of container-managed
persistence. Resin-EJB will create the implementation of the abstract
methods.
HouseBean extends the AbstractEntityBean implementation.
AbstractEntityBean is a stub EntityBean implementation with default
methods to make life a little more sane for simple beans.
|
Method Summary |
void |
addPoints(int delta)
Adds a number of points to the house. |
abstract java.lang.String |
getName()
Returns the house name. |
abstract int |
getPoints()
Returns the number of points for the house. |
abstract void |
setPoints(int points)
Sets the number of points for the house. |
HouseBean
public HouseBean()
getName
public abstract java.lang.String getName()
- Returns the house name. The name is the primary key.
getPoints
public abstract int getPoints()
- Returns the number of points for the house.
setPoints
public abstract void setPoints(int points)
- Sets the number of points for the house. Note, this is only called by
addPoints. Clients cannot access setPoints
method because it's not in the House interface.
addPoints
public void addPoints(int delta)
- Adds a number of points to the house.