Class MongoSmartContractDao
java.lang.Object
dev.getelements.elements.dao.mongo.blockchain.MongoSmartContractDao
- All Implemented Interfaces:
SmartContractDao
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateSmartContract(SmartContract smartContract) Creates aSmartContractin the database.voiddeleteContract(String contractId) Deletes aSmartContract.findSmartContractById(String contractNameOrId) Finds a specificSmartContract.findSmartContractByNameOrId(String contractNameOrId) Finds a specificSmartContract.dev.morphia.DatastoregetSmartContracts(int offset, int count, BlockchainApi blockchainApi, List<BlockchainNetwork> blockchainNetworks) Gets the smart contracts in the database.voidsetDatastore(dev.morphia.Datastore datastore) voidsetMapper(MapperRegistry mapperRegistry) voidsetMongoDBUtils(MongoDBUtils mongoDBUtils) voidsetMongoVaultDao(MongoVaultDao mongoVaultDao) voidsetValidationHelper(ValidationHelper validationHelper) updateSmartContract(SmartContract smartContract) Updates aSmartContractin the database.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.SmartContractDao
getSmartContractById, getSmartContractByNameOrId, getSmartContractsForSingleNetwork
-
Constructor Details
-
MongoSmartContractDao
public MongoSmartContractDao()
-
-
Method Details
-
getSmartContracts
public Pagination<SmartContract> getSmartContracts(int offset, int count, BlockchainApi blockchainApi, List<BlockchainNetwork> blockchainNetworks) Description copied from interface:SmartContractDaoGets the smart contracts in the database.- Specified by:
getSmartContractsin interfaceSmartContractDao- Parameters:
offset- the offsetcount- the countblockchainApi- the blockchain API, or nullblockchainNetworks- the networks associated, or null- Returns:
- a
Pagination<SmartContract>
-
findSmartContractById
Description copied from interface:SmartContractDaoFinds a specificSmartContract.- Specified by:
findSmartContractByIdin interfaceSmartContractDao- Parameters:
contractNameOrId-- Returns:
- the
Optional<SmartContract>
-
findSmartContractByNameOrId
Description copied from interface:SmartContractDaoFinds a specificSmartContract.- Specified by:
findSmartContractByNameOrIdin interfaceSmartContractDao- Parameters:
contractNameOrId- the contract unique name or id- Returns:
- the
Optional<SmartContract>
-
updateSmartContract
Description copied from interface:SmartContractDaoUpdates aSmartContractin the database.- Specified by:
updateSmartContractin interfaceSmartContractDao- Parameters:
smartContract- theSmartContract- Returns:
- the
SmartContract
-
createSmartContract
Description copied from interface:SmartContractDaoCreates aSmartContractin the database.- Specified by:
createSmartContractin interfaceSmartContractDao- Parameters:
smartContract- theSmartContract- Returns:
- the
SmartContract
-
deleteContract
Description copied from interface:SmartContractDaoDeletes aSmartContract.- Specified by:
deleteContractin interfaceSmartContractDao- Parameters:
contractId- the contract ID.
-
getMapper
-
setMapper
-
getDatastore
public dev.morphia.Datastore getDatastore() -
setDatastore
@Inject public void setDatastore(dev.morphia.Datastore datastore) -
getMongoDBUtils
-
setMongoDBUtils
-
getValidationHelper
-
setValidationHelper
-
getMongoVaultDao
-
setMongoVaultDao
-