public static class Wallet.Companion
Static Methods
Modifier and Type | Method and Description |
---|---|
Wallet |
create(DbHandler dbHandler,
java.lang.String name,
Value initialValue)
Creates a new Wallet in the database and returns the corresponding Wallet object.
If a Wallet with the same name already exists, no new partner will be created
and the existing one will be returned instead
|
Wallet |
fromResultSet(java.sql.ResultSet resultSet)
Generates a Wallet object from a ResultSet
|
Wallet |
get(DbHandler dbHandler,
int id)
Retrieves a Wallet from the database by its ID
|
Wallet |
get(DbHandler dbHandler,
java.lang.String nameOrId)
Retrieves a Wallet from the database by its name or ID
|
java.util.List<net.namibsun.papio.lib.db.models.Wallet> |
getAll(DbHandler dbHandler)
Retrieves a list of all Wallet objects in the database
|
public Wallet fromResultSet(java.sql.ResultSet resultSet)
Generates a Wallet object from a ResultSet
resultSet
- : The ResultSet to use to generate the Wallet objectpublic Wallet get(DbHandler dbHandler, int id)
Retrieves a Wallet from the database by its ID
dbHandler
- : The database handler to useid
- : The ID of the Walletpublic Wallet get(DbHandler dbHandler, java.lang.String nameOrId)
Retrieves a Wallet from the database by its name or ID
dbHandler
- : The database handler to usenameOrId
- : The name or ID of the Walletpublic java.util.List<net.namibsun.papio.lib.db.models.Wallet> getAll(DbHandler dbHandler)
Retrieves a list of all Wallet objects in the database
dbHandler
- : The database handler to usepublic Wallet create(DbHandler dbHandler, java.lang.String name, Value initialValue)
Creates a new Wallet in the database and returns the corresponding Wallet object. If a Wallet with the same name already exists, no new partner will be created and the existing one will be returned instead
dbHandler
- : The database handler to use for database callsname
- : The name of the Wallet