@Entity public abstract class AbstractPersistentComponent extends Object implements com.bernardomg.tabletop.dreadball.model.player.component.Component
This is a persistent JPA-Based implementation.
| Constructor and Description |
|---|
AbstractPersistentComponent()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAbility(com.bernardomg.tabletop.dreadball.model.player.stats.Ability ability)
Adds an ability.
|
void |
addRole(com.bernardomg.tabletop.dreadball.model.player.Role position)
Adds a team position role.
|
boolean |
equals(Object obj) |
Collection<com.bernardomg.tabletop.dreadball.model.player.stats.Ability> |
getAbilities() |
com.bernardomg.tabletop.dreadball.model.player.stats.Attributes |
getAttributes() |
Integer |
getId()
Returns the ID assigned to this entity.
|
com.bernardomg.tabletop.dreadball.model.player.component.ComponentLocation |
getLocation() |
String |
getName() |
Collection<com.bernardomg.tabletop.dreadball.model.player.Role> |
getRoles() |
int |
hashCode() |
void |
removeAbility(com.bernardomg.tabletop.dreadball.model.player.stats.Ability ability)
Removes an ability.
|
void |
removeRole(com.bernardomg.tabletop.dreadball.model.player.Role position)
Removes a team position role.
|
void |
setAbilities(Collection<com.bernardomg.tabletop.dreadball.model.player.stats.Ability> compAbilities)
Sets the component abilities.
|
void |
setAttributes(com.bernardomg.tabletop.dreadball.model.player.stats.Attributes attrs)
Sets the component attributes bonus.
|
void |
setComponentName(String componentName)
Sets the component name.
|
void |
setId(Integer identifier)
Sets the ID assigned to this entity.
|
void |
setLocation(PersistentComponentLocation compLocation)
Sets the component location.
|
void |
setRole(Collection<com.bernardomg.tabletop.dreadball.model.player.Role> comPositions)
Sets the component team position roles.
|
public AbstractPersistentComponent()
public final void addAbility(com.bernardomg.tabletop.dreadball.model.player.stats.Ability ability)
ability - the ability to addpublic final void addRole(com.bernardomg.tabletop.dreadball.model.player.Role position)
position - the team position role to addpublic final Collection<com.bernardomg.tabletop.dreadball.model.player.stats.Ability> getAbilities()
getAbilities in interface com.bernardomg.tabletop.dreadball.model.player.component.Componentpublic final com.bernardomg.tabletop.dreadball.model.player.stats.Attributes getAttributes()
getAttributes in interface com.bernardomg.tabletop.dreadball.model.player.component.Componentpublic final Integer getId()
public final com.bernardomg.tabletop.dreadball.model.player.component.ComponentLocation getLocation()
getLocation in interface com.bernardomg.tabletop.dreadball.model.player.component.Componentpublic final String getName()
getName in interface com.bernardomg.tabletop.dreadball.model.player.component.Componentpublic final Collection<com.bernardomg.tabletop.dreadball.model.player.Role> getRoles()
getRoles in interface com.bernardomg.tabletop.dreadball.model.player.component.Componentpublic final void removeAbility(com.bernardomg.tabletop.dreadball.model.player.stats.Ability ability)
ability - the ability to removepublic final void removeRole(com.bernardomg.tabletop.dreadball.model.player.Role position)
position - the team position role to removepublic final void setAbilities(Collection<com.bernardomg.tabletop.dreadball.model.player.stats.Ability> compAbilities)
All the abilities which the component currently has will be removed and swapped with the received ones.
compAbilities - the abilities to set on the componentpublic final void setAttributes(com.bernardomg.tabletop.dreadball.model.player.stats.Attributes attrs)
attrs - the attributes bonus for the componentpublic final void setComponentName(String componentName)
componentName - the component namepublic final void setId(Integer identifier)
identifier - the ID for the entitypublic final void setLocation(PersistentComponentLocation compLocation)
compLocation - the component locationpublic final void setRole(Collection<com.bernardomg.tabletop.dreadball.model.player.Role> comPositions)
All the team position roles which the component currently has will be removed and swapped with the received ones.
comPositions - the team position roles to set on the componentCopyright © 2015–2018 Bernardo MartÃnez Garrido. All rights reserved.