Search in sources :

Example 1 with SecretLockPage

use of io.nem.symbol.sdk.openapi.vertx.model.SecretLockPage in project nem2-sdk-java by nemtech.

the class SecretLockRepositoryVertxImpl method search.

@Override
public Observable<Page<SecretLockInfo>> search(SecretLockSearchCriteria criteria) {
    String address = toDto(criteria.getAddress());
    Integer pageSize = criteria.getPageSize();
    Integer pageNumber = criteria.getPageNumber();
    String offset = criteria.getOffset();
    String secret = criteria.getSecret();
    Order order = toDto(criteria.getOrder());
    Consumer<Handler<AsyncResult<SecretLockPage>>> handlerConsumer = (h) -> getClient().searchSecretLock(address, secret, pageSize, pageNumber, offset, order, h);
    return this.call(handlerConsumer, this::toPage);
}
Also used : Order(io.nem.symbol.sdk.openapi.vertx.model.Order) MapperUtils(io.nem.symbol.core.utils.MapperUtils) SecretLockInfo(io.nem.symbol.sdk.model.transaction.SecretLockInfo) ApiClient(io.nem.symbol.sdk.openapi.vertx.invoker.ApiClient) LockHashAlgorithm(io.nem.symbol.sdk.model.transaction.LockHashAlgorithm) LockStatus(io.nem.symbol.sdk.model.transaction.LockStatus) SecretLockEntryDTO(io.nem.symbol.sdk.openapi.vertx.model.SecretLockEntryDTO) MosaicId(io.nem.symbol.sdk.model.mosaic.MosaicId) Collectors(java.util.stream.Collectors) SecretLockRoutesApiImpl(io.nem.symbol.sdk.openapi.vertx.api.SecretLockRoutesApiImpl) Consumer(java.util.function.Consumer) SecretLockSearchCriteria(io.nem.symbol.sdk.api.SecretLockSearchCriteria) SecretLockInfoDTO(io.nem.symbol.sdk.openapi.vertx.model.SecretLockInfoDTO) Order(io.nem.symbol.sdk.openapi.vertx.model.Order) SecretLockPage(io.nem.symbol.sdk.openapi.vertx.model.SecretLockPage) ObjectUtils(org.apache.commons.lang3.ObjectUtils) MerkleStateInfo(io.nem.symbol.sdk.model.blockchain.MerkleStateInfo) SecretLockRoutesApi(io.nem.symbol.sdk.openapi.vertx.api.SecretLockRoutesApi) Observable(io.reactivex.Observable) SecretLockRepository(io.nem.symbol.sdk.api.SecretLockRepository) AsyncResult(io.vertx.core.AsyncResult) Handler(io.vertx.core.Handler) Page(io.nem.symbol.sdk.api.Page) Handler(io.vertx.core.Handler) SecretLockPage(io.nem.symbol.sdk.openapi.vertx.model.SecretLockPage)

Aggregations

MapperUtils (io.nem.symbol.core.utils.MapperUtils)1 Page (io.nem.symbol.sdk.api.Page)1 SecretLockRepository (io.nem.symbol.sdk.api.SecretLockRepository)1 SecretLockSearchCriteria (io.nem.symbol.sdk.api.SecretLockSearchCriteria)1 MerkleStateInfo (io.nem.symbol.sdk.model.blockchain.MerkleStateInfo)1 MosaicId (io.nem.symbol.sdk.model.mosaic.MosaicId)1 LockHashAlgorithm (io.nem.symbol.sdk.model.transaction.LockHashAlgorithm)1 LockStatus (io.nem.symbol.sdk.model.transaction.LockStatus)1 SecretLockInfo (io.nem.symbol.sdk.model.transaction.SecretLockInfo)1 SecretLockRoutesApi (io.nem.symbol.sdk.openapi.vertx.api.SecretLockRoutesApi)1 SecretLockRoutesApiImpl (io.nem.symbol.sdk.openapi.vertx.api.SecretLockRoutesApiImpl)1 ApiClient (io.nem.symbol.sdk.openapi.vertx.invoker.ApiClient)1 Order (io.nem.symbol.sdk.openapi.vertx.model.Order)1 SecretLockEntryDTO (io.nem.symbol.sdk.openapi.vertx.model.SecretLockEntryDTO)1 SecretLockInfoDTO (io.nem.symbol.sdk.openapi.vertx.model.SecretLockInfoDTO)1 SecretLockPage (io.nem.symbol.sdk.openapi.vertx.model.SecretLockPage)1 Observable (io.reactivex.Observable)1 AsyncResult (io.vertx.core.AsyncResult)1 Handler (io.vertx.core.Handler)1 Consumer (java.util.function.Consumer)1