public class GenderDataBean extends Object
Constructor and Description |
---|
GenderDataBean() |
Modifier and Type | Method and Description |
---|---|
double |
averageAge(Gender gender)
Returns the average age of people of the specified gender.
|
int |
countGender(Gender gender)
Returns the number of people of the specified gender.
|
public int countGender(Gender gender)
This is calculated using the NamedQuery
specified by Person.COUNT_GENDERS
.
gender
- the gender to be countedpublic double averageAge(Gender gender)
This is calculated using the database's AVG()
function.
gender
- the gender to be calculatedCopyright © 2015 Joseph Hendrix