|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.northwestern.at.wordhoard.model.speakers.Speech
public class Speech
A speech.
Each speech has the following attributes:
work part
in which the speech occurs.
speakers
of the speech.
gender
of all the speakers.
If all speakers in the speech have the same gender,
that is the common gender. If not all speakers
have the same gender, the common gender is set to
uncertain, mixed, or unknown.
mortality
of all the speakers.
If all speakers in the speech have the same mortality,
that is the common mortality. If not all speakers
have the same mortality, the common mortality is set to
unknown or other.
Constructor Summary | |
---|---|
Speech()
Creates a new speech. |
Method Summary | |
---|---|
void |
addSpeaker(Speaker speaker)
Adds a speaker. |
boolean |
equals(java.lang.Object obj)
Returns true if some other object is equal to this one. |
void |
export(TableExporterImporter exporterImporter)
Exports the object to a MySQL table exporter/importer. |
Gender |
getGender()
Gets the gender. |
void |
getGroupingObjects(java.lang.Class groupBy,
java.util.List list)
Gets grouping objects. |
java.lang.Long |
getId()
Gets the unique id. |
Mortality |
getMortality()
Gets the mortality. |
SearchCriterion |
getSearchDefault(java.lang.Class cls)
Gets a search criterion default value. |
java.util.Set |
getSpeakers()
Gets the speakers. |
WorkPart |
getWorkPart()
Gets the work part. |
int |
hashCode()
Returns a hash code for the object. |
void |
setGender(Gender gender)
Sets the gender. |
void |
setId(java.lang.Long id)
Sets the unique id. |
void |
setMortality(Mortality mortality)
Sets the mortality. |
void |
setWorkPart(WorkPart workPart)
Sets the work part. |
void |
updateCommonGenderAndMortality()
Updates the common gender and mortality values when a speaker is added. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Speech()
Method Detail |
---|
public java.lang.Long getId()
getId
in interface PersistentObject
public void setId(java.lang.Long id)
id
- The unique id. public WorkPart getWorkPart()
public void setWorkPart(WorkPart workPart)
workPart
- The work part. public java.util.Set getSpeakers()
public void addSpeaker(Speaker speaker)
speaker
- The new speaker. public Gender getGender()
public void setGender(Gender gender)
gender
- The gender.
Needed to make Hibernate happy.
public Mortality getMortality()
public void setMortality(Mortality mortality)
mortality
- The mortality. public void updateCommonGenderAndMortality()
If all speakers have the gender, the common gender is that gender. If the speaker genders are mixed, the common gender is set to uncertain, mixed, or unknown.
If all speakers have the mortality, the common gender is that mortality. If the speaker mortalities are mixed, the common mortality is set to unknown or other.
This method should only be used by the database build programs. It should be set protected at the earliest opportunity.
public SearchCriterion getSearchDefault(java.lang.Class cls)
getSearchDefault
in interface SearchDefaults
cls
- Model class of search criterion.
public void getGroupingObjects(java.lang.Class groupBy, java.util.List list)
groupBy
- Grouping class.list
- A list. The grouping objects are appended
to this list. public void export(TableExporterImporter exporterImporter)
exporterImporter
- MySQL table exporter/importer. public boolean equals(java.lang.Object obj)
The two speeches are equal if their ids are equal.
equals
in class java.lang.Object
obj
- The other object.
public int hashCode()
hashCode
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |