public class CommonQueriesImplementation extends java.lang.Object implements CommonQueries
Modifier and Type | Method and Description |
---|---|
boolean |
doesDBHaveTable(java.lang.String table) |
boolean |
doesDBHaveTableColumn(java.lang.String table,
java.lang.String column) |
long |
fetchCurrentSessionPlaytime(java.util.UUID playerUUID)
Get playtime of current online session.
|
long |
fetchLastSeen(java.util.UUID playerUUID,
java.util.UUID serverUUID)
Fetch last seen Epoch ms for a player on a server.
|
java.util.Optional<java.lang.String> |
fetchNameOf(java.util.UUID playerUUID) |
long |
fetchPlaytime(java.util.UUID playerUUID,
java.util.UUID serverUUID,
long after,
long before)
Fetch playtime of a player on a server.
|
java.util.Set<java.util.UUID> |
fetchServerUUIDs() |
java.util.Optional<java.util.UUID> |
fetchUUIDOf(java.lang.String playerName) |
public long fetchPlaytime(java.util.UUID playerUUID, java.util.UUID serverUUID, long after, long before)
CommonQueries
Returns 0 for any non existing players or servers.
fetchPlaytime
in interface CommonQueries
playerUUID
- UUID of the player.serverUUID
- UUID of the Plan server.after
- Data after this Epoch ms should be fetchedbefore
- Data before this Epoch ms should be fetchedpublic long fetchCurrentSessionPlaytime(java.util.UUID playerUUID)
CommonQueries
Requires Capability QUERY_API_ACTIVE_SESSION_PLAYTIME
fetchCurrentSessionPlaytime
in interface CommonQueries
playerUUID
- UUID of the player.public long fetchLastSeen(java.util.UUID playerUUID, java.util.UUID serverUUID)
CommonQueries
fetchLastSeen
in interface CommonQueries
playerUUID
- UUID of the player.serverUUID
- UUID of the Plan server.public java.util.Set<java.util.UUID> fetchServerUUIDs()
fetchServerUUIDs
in interface CommonQueries
public java.util.Optional<java.util.UUID> fetchUUIDOf(java.lang.String playerName)
fetchUUIDOf
in interface CommonQueries
public java.util.Optional<java.lang.String> fetchNameOf(java.util.UUID playerUUID)
fetchNameOf
in interface CommonQueries
public boolean doesDBHaveTable(java.lang.String table)
doesDBHaveTable
in interface CommonQueries
public boolean doesDBHaveTableColumn(java.lang.String table, java.lang.String column)
doesDBHaveTableColumn
in interface CommonQueries