@Entity
public abstract class AbstractPersistentComponent
extends java.lang.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 role)
Adds a team role role.
|
boolean |
equals(java.lang.Object obj) |
java.util.Collection<com.bernardomg.tabletop.dreadball.model.player.stats.Ability> |
getAbilities() |
com.bernardomg.tabletop.dreadball.model.player.stats.Attributes |
getAttributes() |
java.lang.Integer |
getId()
Returns the ID assigned to this entity.
|
com.bernardomg.tabletop.dreadball.model.player.component.ComponentLocation |
getLocation() |
java.lang.String |
getName() |
java.util.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 role)
Removes a team role role.
|
void |
setAbilities(java.util.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(java.lang.String componentName)
Sets the component name.
|
void |
setId(java.lang.Integer identifier)
Sets the ID assigned to this entity.
|
void |
setLocation(PersistentComponentLocation compLocation)
Sets the component location.
|
void |
setRole(java.util.Collection<com.bernardomg.tabletop.dreadball.model.player.Role> comRoles)
Sets the component team role 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 role)
role - the team role role to addpublic final boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic final java.util.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 java.lang.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 java.lang.String getName()
getName in interface com.bernardomg.tabletop.dreadball.model.player.component.Componentpublic final java.util.Collection<com.bernardomg.tabletop.dreadball.model.player.Role> getRoles()
getRoles in interface com.bernardomg.tabletop.dreadball.model.player.component.Componentpublic final int hashCode()
hashCode in class java.lang.Objectpublic 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 role)
role - the team role role to removepublic final void setAbilities(java.util.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(java.lang.String componentName)
componentName - the component namepublic final void setId(java.lang.Integer identifier)
identifier - the ID for the entitypublic final void setLocation(PersistentComponentLocation compLocation)
compLocation - the component locationpublic final void setRole(java.util.Collection<com.bernardomg.tabletop.dreadball.model.player.Role> comRoles)
All the team role roles which the component currently has will be removed and swapped with the received ones.
comRoles - the team role roles to set on the componentCopyright © 2015–2018 Bernardo MartÃnez Garrido. All rights reserved.