Class MongoWalletDao
java.lang.Object
dev.getelements.elements.dao.mongo.blockchain.MongoWalletDao
- All Implemented Interfaces:
WalletDao
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateWallet(Wallet wallet) Creates a new Wallet.voiddeleteWallet(String walletId) Deletes theWalletwith the supplied wallet ID.voiddeleteWalletForUser(String walletId, String userId) Deletes a wallet for the supplied user.voiddeleteWalletForVault(String walletId, String vaultId) Deletes a wallet for the supplied user and vault.longfindMongoWallet(String walletId) findMongoWalletForUser(String walletId, String userId) findMongoWalletInVault(String walletId, String vaultId) findWallet(String walletId) Finds aWalletbased on wallet id.findWalletForUser(String walletId, String userId) Finds a wallet belonging to the specified user..findWalletInVault(String walletId, String vaultId) Finds a wallet in the specified vault.dev.morphia.DatastoregetSingleWalletFromVaultForNetwork(String vaultId, BlockchainNetwork blockchainNetwork) Attempts to find a single wallet for the supplied vault ID and blockchain network.getWallets(int offset, int count, String vaultId, String userId, BlockchainApi protocol, List<BlockchainNetwork> networks) Lists allWalletinstances, specifying a search query.voidsetDatastore(dev.morphia.Datastore datastore) voidsetMapper(MapperRegistry mapperRegistry) voidsetMongoDBUtils(MongoDBUtils mongoDBUtils) voidsetMongoUserDao(MongoUserDao mongoUserDao) voidsetMongoVaultDao(MongoVaultDao mongoVaultDao) voidsetValidationHelper(ValidationHelper validationHelper) updateWallet(Wallet wallet) Updates the suppliedWallet.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.getelements.elements.sdk.dao.WalletDao
getWallet, getWalletForUser, getWalletInVault
-
Constructor Details
-
MongoWalletDao
public MongoWalletDao()
-
-
Method Details
-
getWallets
public Pagination<Wallet> getWallets(int offset, int count, String vaultId, String userId, BlockchainApi protocol, List<BlockchainNetwork> networks) Description copied from interface:WalletDaoLists allWalletinstances, specifying a search query.- Specified by:
getWalletsin interfaceWalletDao- Parameters:
offset- the offsetcount- the countvaultId-userId- the userId, or nullprotocol- the protocol, or nullnetworks- the network, or null- Returns:
- a
PaginationofWalletinstances
-
findWallet
Description copied from interface:WalletDaoFinds aWalletbased on wallet id.- Specified by:
findWalletin interfaceWalletDao- Parameters:
walletId- the wallet id- Returns:
- the
Optional<Wallet>
-
findMongoWallet
-
findWalletInVault
Description copied from interface:WalletDaoFinds a wallet in the specified vault.- Specified by:
findWalletInVaultin interfaceWalletDao- Parameters:
walletId- the wallet idvaultId- the vault id- Returns:
- the
Optional<Wallet>
-
findMongoWalletInVault
-
findWalletForUser
Description copied from interface:WalletDaoFinds a wallet belonging to the specified user..- Specified by:
findWalletForUserin interfaceWalletDao- Parameters:
walletId- the wallet iduserId- the user id- Returns:
- the
Optional<Wallet>
-
findMongoWalletForUser
-
getSingleWalletFromVaultForNetwork
public Wallet getSingleWalletFromVaultForNetwork(String vaultId, BlockchainNetwork blockchainNetwork) Description copied from interface:WalletDaoAttempts to find a single wallet for the supplied vault ID and blockchain network.- Specified by:
getSingleWalletFromVaultForNetworkin interfaceWalletDao- Parameters:
vaultId- the vault idblockchainNetwork- the network- Returns:
- the wallet
-
updateWallet
Description copied from interface:WalletDaoUpdates the suppliedWallet.- Specified by:
updateWalletin interfaceWalletDao- Parameters:
wallet-- Returns:
- the
Walletas it was changed by the service.
-
createWallet
Description copied from interface:WalletDaoCreates a new Wallet.- Specified by:
createWalletin interfaceWalletDao- Parameters:
wallet- theWalletwith the information to create- Returns:
- the
Walletas it was created by the service.
-
deleteWallet
Description copied from interface:WalletDaoDeletes theWalletwith the supplied wallet ID.- Specified by:
deleteWalletin interfaceWalletDao- Parameters:
walletId- the template ID.
-
deleteWalletForUser
Description copied from interface:WalletDaoDeletes a wallet for the supplied user.- Specified by:
deleteWalletForUserin interfaceWalletDao- Parameters:
walletId- the wallet iduserId- the user id
-
deleteWalletForVault
Description copied from interface:WalletDaoDeletes a wallet for the supplied user and vault.- Specified by:
deleteWalletForVaultin interfaceWalletDao- Parameters:
walletId- the wallet IDvaultId- the vault ID
-
deleteWalletsInMongoVault
-
getMapper
-
setMapper
-
getDatastore
public dev.morphia.Datastore getDatastore() -
setDatastore
@Inject public void setDatastore(dev.morphia.Datastore datastore) -
getMongoUserDao
-
setMongoUserDao
-
getMongoVaultDao
-
setMongoVaultDao
-
getMongoDBUtils
-
setMongoDBUtils
-
getValidationHelper
-
setValidationHelper
-