![]() |
SudokuFX
|
Represents a player in the SudokuFX application. More...
Collaboration diagram for fr.softsf.sudokufx.model.Player:Classes | |
| class | PlayerBuilder |
Builder class for creating Player instances with fluent API. More... | |
Public Member Functions | |
| Player (Long playerid, @Nonnull @NotNull PlayerLanguage playerlanguageid, @Nonnull @NotNull Options optionsid, @Nonnull @NotNull Menu menuid, Set< Game > games, @Nonnull @NotNull String name, boolean selected, @Nonnull @NotNull Instant createdat, @Nonnull @NotNull Instant updatedat) | |
| Full constructor to initialize all fields of Player. | |
| boolean | equals (Object o) |
| Compares two Player objects for equality based on all fields. | |
| Instant | getCreatedat () |
| Returns the creation timestamp. | |
| Set< Game > | getGames () |
| Returns the games played by the player. | |
| Menu | getMenuid () |
| Returns the menu associated with the player. | |
| String | getName () |
| Returns the name of the player. | |
| Options | getOptionsid () |
| Returns the options associated with the player. | |
| Long | getPlayerid () |
| Returns the unique ID of the player. | |
| PlayerLanguage | getPlayerlanguageid () |
| Returns the language of the player. | |
| boolean | getSelected () |
| Returns whether the player is selected. | |
| Instant | getUpdatedat () |
| Returns the update timestamp. | |
| int | hashCode () |
| Computes the hash code based on all fields. | |
| void | setGames (Set< Game > games) |
| Sets the games. | |
| void | setMenuid (@Nonnull Menu menuid) |
| Sets the menu after validation. | |
| void | setName (@Nonnull String name) |
| Sets the name after validation. | |
| void | setOptionsid (@Nonnull Options optionsid) |
| Sets the options after validation. | |
| void | setPlayerlanguageid (@Nonnull PlayerLanguage playerlanguageid) |
| Sets the language after validation. | |
| void | setSelected (boolean selected) |
| Sets the selection flag. | |
| void | setUpdatedat (@Nonnull Instant updatedat) |
| Sets the update timestamp after validation. | |
| String | toString () |
| Returns a string representation of the Player object. | |
Static Public Member Functions | |
| static PlayerBuilder | builder () |
Returns a new PlayerBuilder instance for fluent construction. | |
Protected Member Functions | |
| Player () | |
| Protected default constructor for JPA. | |
Static Private Member Functions | |
| static Instant | validateCreatedAt (Instant createdat) |
| Validates that the creation date is not null. | |
| static Menu | validateMenu (Menu menuid) |
| Validates that the menu is not null. | |
| static String | validateName (String name) |
| Validates that the name is not null. | |
| static Options | validateOptions (Options optionsid) |
| Validates that the options are not null. | |
| static PlayerLanguage | validatePlayerLanguage (PlayerLanguage playerlanguageid) |
| Validates that the player language is not null. | |
| static Instant | validateUpdatedAt (Instant updatedat) |
| Validates that the update date is not null. | |
Private Attributes | |
| Instant | createdat = Instant.now() |
| Creation timestamp of the player. | |
| Set< Game > | games = new LinkedHashSet<>() |
| Games played by the player. | |
| Menu | menuid |
| Menu associated with the player. | |
| String | name = "" |
| Name of the player. | |
| Options | optionsid |
| Options associated with the player. | |
| Long | playerid |
| Unique identifier of the player (primary key). | |
| PlayerLanguage | playerlanguageid |
| Language of the player. | |
| boolean | selected = false |
| Flag indicating whether this player is selected. | |
| Instant | updatedat = Instant.now() |
| Last update timestamp of the player. | |
Static Private Attributes | |
| static final String | CREATEDAT_MUST_NOT_BE_NULL = "createdat must not be null" |
| static final String | MENU_MUST_NOT_BE_NULL = "menu must not be null" |
| static final String | NAME_MUST_NOT_BE_NULL = "name must not be null" |
| static final String | OPTIONSID_MUST_NOT_BE_NULL = "optionsid must not be null" |
| static final String | PLAYERLANGUAGEID_MUST_NOT_BE_NULL |
| static final String | UPDATEDAT_MUST_NOT_BE_NULL = "updatedat must not be null" |
Represents a player in the SudokuFX application.
Includes the player's language, options, menu, games, name, selection status, and timestamps. Provides fluent builder, validation, and standard object methods.
|
protected |
Protected default constructor for JPA.
Here is the call graph for this function:| fr.softsf.sudokufx.model.Player.Player | ( | Long | playerid, |
| @Nonnull @NotNull PlayerLanguage | playerlanguageid, | ||
| @Nonnull @NotNull Options | optionsid, | ||
| @Nonnull @NotNull Menu | menuid, | ||
| Set< Game > | games, | ||
| @Nonnull @NotNull String | name, | ||
| boolean | selected, | ||
| @Nonnull @NotNull Instant | createdat, | ||
| @Nonnull @NotNull Instant | updatedat ) |
Full constructor to initialize all fields of Player.
| playerid | unique ID |
| playerlanguageid | language of the player |
| optionsid | player's options |
| menuid | player's menu |
| games | games associated with the player |
| name | name of the player |
| selected | whether the player is selected |
| createdat | creation timestamp |
| updatedat | update timestamp |
Here is the call graph for this function:
|
static |
Returns a new PlayerBuilder instance for fluent construction.
| boolean fr.softsf.sudokufx.model.Player.equals | ( | Object | o | ) |
Compares two Player objects for equality based on all fields.
Here is the call graph for this function:| Instant fr.softsf.sudokufx.model.Player.getCreatedat | ( | ) |
Returns the creation timestamp.
| Set< Game > fr.softsf.sudokufx.model.Player.getGames | ( | ) |
Returns the games played by the player.
| Menu fr.softsf.sudokufx.model.Player.getMenuid | ( | ) |
Returns the menu associated with the player.
| String fr.softsf.sudokufx.model.Player.getName | ( | ) |
Returns the name of the player.
| Options fr.softsf.sudokufx.model.Player.getOptionsid | ( | ) |
Returns the options associated with the player.
| Long fr.softsf.sudokufx.model.Player.getPlayerid | ( | ) |
Returns the unique ID of the player.
| PlayerLanguage fr.softsf.sudokufx.model.Player.getPlayerlanguageid | ( | ) |
Returns the language of the player.
| boolean fr.softsf.sudokufx.model.Player.getSelected | ( | ) |
Returns whether the player is selected.
| Instant fr.softsf.sudokufx.model.Player.getUpdatedat | ( | ) |
Returns the update timestamp.
| int fr.softsf.sudokufx.model.Player.hashCode | ( | ) |
Computes the hash code based on all fields.
| void fr.softsf.sudokufx.model.Player.setGames | ( | Set< Game > | games | ) |
Sets the games.
| void fr.softsf.sudokufx.model.Player.setMenuid | ( | @Nonnull Menu | menuid | ) |
Sets the menu after validation.
Here is the call graph for this function:| void fr.softsf.sudokufx.model.Player.setName | ( | @Nonnull String | name | ) |
Sets the name after validation.
Here is the call graph for this function:| void fr.softsf.sudokufx.model.Player.setOptionsid | ( | @Nonnull Options | optionsid | ) |
Sets the options after validation.
Here is the call graph for this function:| void fr.softsf.sudokufx.model.Player.setPlayerlanguageid | ( | @Nonnull PlayerLanguage | playerlanguageid | ) |
Sets the language after validation.
Here is the call graph for this function:| void fr.softsf.sudokufx.model.Player.setSelected | ( | boolean | selected | ) |
Sets the selection flag.
| void fr.softsf.sudokufx.model.Player.setUpdatedat | ( | @Nonnull Instant | updatedat | ) |
Sets the update timestamp after validation.
Here is the call graph for this function:| String fr.softsf.sudokufx.model.Player.toString | ( | ) |
Returns a string representation of the Player object.
|
staticprivate |
Validates that the creation date is not null.
Validates that the menu is not null.
|
staticprivate |
Validates that the name is not null.
Validates that the options are not null.
|
staticprivate |
Validates that the player language is not null.
|
staticprivate |
Validates that the update date is not null.
|
private |
Creation timestamp of the player.
|
staticprivate |
|
private |
Games played by the player.
|
staticprivate |
|
private |
Name of the player.
|
staticprivate |
|
staticprivate |
|
private |
Unique identifier of the player (primary key).
|
private |
Language of the player.
|
staticprivate |
|
private |
Flag indicating whether this player is selected.
|
private |
Last update timestamp of the player.
|
staticprivate |