@Entity(name="Unit") public abstract class AbstractPersistentUnit extends Object implements com.bernardomg.tabletop.dreadball.model.unit.Unit
This is a persistent JPA-Based implementation.
| Constructor and Description |
|---|
AbstractPersistentUnit()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAbility(com.bernardomg.tabletop.dreadball.model.unit.stats.Ability ability)
Adds an ability to the unit.
|
boolean |
equals(Object obj) |
Collection<com.bernardomg.tabletop.dreadball.model.unit.stats.Ability> |
getAbilities() |
com.bernardomg.tabletop.dreadball.model.unit.stats.Attributes |
getAttributes() |
Integer |
getCost() |
Boolean |
getGiant() |
Integer |
getId()
Returns the ID assigned to this unit.
|
Boolean |
getMvp() |
String |
getName() |
com.bernardomg.tabletop.dreadball.model.unit.Role |
getRole() |
String |
getTemplateName() |
int |
hashCode() |
void |
removeAbility(com.bernardomg.tabletop.dreadball.model.unit.stats.Ability ability)
Removes an ability from the unit.
|
void |
setAbilities(Collection<com.bernardomg.tabletop.dreadball.model.unit.stats.Ability> unitAbilities)
Sets the unit abilities.
|
void |
setAttributes(com.bernardomg.tabletop.dreadball.model.unit.stats.Attributes attrs)
Sets the unit attributes.
|
void |
setCost(Integer costUnit)
Sets the unit's cost.
|
void |
setGiant(Boolean giantFlag)
Sets the unit giant flag.
|
void |
setId(Integer identifier)
Sets the ID assigned to this entity.
|
void |
setName(String unitName)
Sets the unit name.
|
void |
setPosition(com.bernardomg.tabletop.dreadball.model.unit.Role pos)
Sets the unit team position.
|
void |
setTemplateName(String name)
Sets the unit's template name.
|
String |
toString() |
public final void addAbility(com.bernardomg.tabletop.dreadball.model.unit.stats.Ability ability)
ability - the ability to addpublic final Collection<com.bernardomg.tabletop.dreadball.model.unit.stats.Ability> getAbilities()
getAbilities in interface com.bernardomg.tabletop.dreadball.model.unit.Unitpublic final com.bernardomg.tabletop.dreadball.model.unit.stats.Attributes getAttributes()
getAttributes in interface com.bernardomg.tabletop.dreadball.model.unit.Unitpublic final Integer getCost()
getCost in interface com.bernardomg.tabletop.dreadball.model.unit.Unitpublic final Boolean getGiant()
getGiant in interface com.bernardomg.tabletop.dreadball.model.unit.Unitpublic final Integer getId()
public final Boolean getMvp()
getMvp in interface com.bernardomg.tabletop.dreadball.model.unit.Unitpublic final String getName()
getName in interface com.bernardomg.tabletop.dreadball.model.unit.Unitpublic final com.bernardomg.tabletop.dreadball.model.unit.Role getRole()
getRole in interface com.bernardomg.tabletop.dreadball.model.unit.Unitpublic final String getTemplateName()
getTemplateName in interface com.bernardomg.tabletop.dreadball.model.unit.Unitpublic final void removeAbility(com.bernardomg.tabletop.dreadball.model.unit.stats.Ability ability)
ability - the ability to removepublic final void setAbilities(Collection<com.bernardomg.tabletop.dreadball.model.unit.stats.Ability> unitAbilities)
All the abilities which the unit currently has will be removed and swapped with the received ones.
unitAbilities - the abilities to set on the unitpublic final void setAttributes(com.bernardomg.tabletop.dreadball.model.unit.stats.Attributes attrs)
attrs - the attributes for the unitpublic final void setCost(Integer costUnit)
costUnit - the unit's costpublic final void setGiant(Boolean giantFlag)
giantFlag - the flag indicating if the unit is a giantpublic final void setId(Integer identifier)
identifier - the ID for the entitypublic final void setName(String unitName)
unitName - the unit namepublic final void setPosition(com.bernardomg.tabletop.dreadball.model.unit.Role pos)
pos - the team position for the unitpublic final void setTemplateName(String name)
name - the template nameCopyright © 2015–2017 Bernardo MartÃnez Garrido. All rights reserved.