|
Fish & Chips Club 4.10.0.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object hirondelle.fish.main.rating.Rating
public final class Rating
Rating of a particular Resto
.
Ratings are a kind of "addendum" to Resto
. When a Resto
is created, its various ratings are created with initial value 0.
The user may then later edit the Ratings and change them to more appropriate values.
Constructor Summary | |
---|---|
Rating(Id aId,
SafeText aName,
Integer aFishRating,
Integer aChipsRating,
Integer aPriceRating,
Integer aLocationRating,
Integer aServiceRating,
Integer aBeerRating,
BigDecimal aOverallRating)
Constructor. |
Method Summary | |
---|---|
boolean |
equals(Object aThat)
|
Integer |
getBeerRating()
Return the beer rating passed to the constructor. |
Integer |
getChipsRating()
Return the chips rating passed to the constructor. |
Integer |
getFishRating()
Return the fish rating passed to the constructor. |
Id |
getId()
Return the Id passed to the constructor. |
Integer |
getLocationRating()
Return the location rating passed to the constructor. |
BigDecimal |
getOverallRating()
Return the overall rating passed to the constructor. |
Integer |
getPriceRating()
Return the price rating passed to the constructor. |
SafeText |
getRestaurant()
Return the name of the restaurant passed to the constructor. |
Integer |
getServiceRating()
Return the service rating passed to the constructor. |
int |
hashCode()
|
String |
toString()
Intended for debugging only. |
Methods inherited from class Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Rating(Id aId, SafeText aName, Integer aFishRating, Integer aChipsRating, Integer aPriceRating, Integer aLocationRating, Integer aServiceRating, Integer aBeerRating, BigDecimal aOverallRating) throws ModelCtorException
The overall rating is a calculated field. In this implementation, the calculation is actually done not in this class, but rather in SQL. This causes some minor repetition, but allows a simple means to alter the calculation, if needed, without needing a redeploy.
aId
- restaurant id (required), 1..50 charactersaName
- name of the restaurant (optional), 2..50 charactersaFishRating
- (required) 0..10aChipsRating
- (required) 0..10aPriceRating
- (required) 0..10aLocationRating
- (required) 0..10aServiceRating
- (required) 0..10aBeerRating
- (required) 0..10aOverallRating
- (optional) 0.00..10.00
ModelCtorException
Method Detail |
---|
public Id getId()
public SafeText getRestaurant()
public Integer getFishRating()
public Integer getChipsRating()
public Integer getPriceRating()
public Integer getLocationRating()
public Integer getServiceRating()
public Integer getBeerRating()
public BigDecimal getOverallRating()
public String toString()
toString
in class Object
public boolean equals(Object aThat)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
Fish & Chips Club 4.10.0.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |