public class PlayerDataRepository extends DataBaseRepository<com.github.shynixn.petblocks.api.persistence.entity.PlayerMeta> implements com.github.shynixn.petblocks.api.persistence.controller.PlayerMetaController
| Constructor and Description |
|---|
PlayerDataRepository(ExtensionHikariConnectionContext connectionContext) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this resource, relinquishing any underlying resources.
|
<T> com.github.shynixn.petblocks.api.persistence.entity.PlayerMeta |
create(T player)
Creates a new playerData from the given player
|
void |
delete(com.github.shynixn.petblocks.api.persistence.entity.PlayerMeta item)
Deletes the item from the database
|
PlayerData |
from(ResultSet resultSet)
Generates the entity from the given resultSet
|
com.github.shynixn.petblocks.api.persistence.entity.PlayerMeta |
getById(long id)
Returns the item of the given id
|
com.github.shynixn.petblocks.api.persistence.entity.PlayerMeta |
getByUUID(UUID uuid)
Returns the playerMeta of the given uuid
|
boolean |
hasId(com.github.shynixn.petblocks.api.persistence.entity.PlayerMeta item)
Checks if the item has got an valid databaseId
|
void |
insert(com.github.shynixn.petblocks.api.persistence.entity.PlayerMeta item)
Inserts the item into the database and sets the id
|
List<com.github.shynixn.petblocks.api.persistence.entity.PlayerMeta> |
select()
Selects all items from the database into the list
|
int |
size()
Returns the amount of items in the repository
|
void |
update(com.github.shynixn.petblocks.api.persistence.entity.PlayerMeta item)
Updates the item inside of the database
|
getAll, remove, storepublic PlayerDataRepository(ExtensionHikariConnectionContext connectionContext)
public <T> com.github.shynixn.petblocks.api.persistence.entity.PlayerMeta create(T player)
create in interface com.github.shynixn.petblocks.api.persistence.controller.PlayerMetaControllerplayer - playerpublic com.github.shynixn.petblocks.api.persistence.entity.PlayerMeta getByUUID(UUID uuid)
getByUUID in interface com.github.shynixn.petblocks.api.persistence.controller.PlayerMetaControlleruuid - uuidpublic com.github.shynixn.petblocks.api.persistence.entity.PlayerMeta getById(long id)
getById in interface com.github.shynixn.petblocks.api.persistence.controller.IDatabaseController<com.github.shynixn.petblocks.api.persistence.entity.PlayerMeta>id - idpublic boolean hasId(com.github.shynixn.petblocks.api.persistence.entity.PlayerMeta item)
hasId in class DataBaseRepository<com.github.shynixn.petblocks.api.persistence.entity.PlayerMeta>item - itempublic List<com.github.shynixn.petblocks.api.persistence.entity.PlayerMeta> select()
select in class DataBaseRepository<com.github.shynixn.petblocks.api.persistence.entity.PlayerMeta>public void update(com.github.shynixn.petblocks.api.persistence.entity.PlayerMeta item)
update in class DataBaseRepository<com.github.shynixn.petblocks.api.persistence.entity.PlayerMeta>item - itempublic void delete(com.github.shynixn.petblocks.api.persistence.entity.PlayerMeta item)
delete in class DataBaseRepository<com.github.shynixn.petblocks.api.persistence.entity.PlayerMeta>item - itempublic void insert(com.github.shynixn.petblocks.api.persistence.entity.PlayerMeta item)
insert in class DataBaseRepository<com.github.shynixn.petblocks.api.persistence.entity.PlayerMeta>item - itempublic PlayerData from(ResultSet resultSet) throws SQLException
from in class DataBaseRepository<com.github.shynixn.petblocks.api.persistence.entity.PlayerMeta>resultSet - resultSetSQLException - exceptionpublic int size()
size in interface com.github.shynixn.petblocks.api.persistence.controller.IController<com.github.shynixn.petblocks.api.persistence.entity.PlayerMeta>public void close()
throws Exception
try-with-resources statement.close in interface AutoCloseableException - if this resource cannot be closedCopyright © 2017. All rights reserved.