Search in sources :

Example 1 with HashLockPage

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

the class HashLockRepositoryVertxImpl method search.

@Override
public Observable<Page<HashLockInfo>> search(HashLockSearchCriteria criteria) {
    String address = toDto(criteria.getAddress());
    Integer pageSize = criteria.getPageSize();
    Integer pageNumber = criteria.getPageNumber();
    String offset = criteria.getOffset();
    Order order = toDto(criteria.getOrder());
    Consumer<Handler<AsyncResult<HashLockPage>>> handlerConsumer = (h) -> getClient().searchHashLock(address, 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) ApiClient(io.nem.symbol.sdk.openapi.vertx.invoker.ApiClient) HashLockPage(io.nem.symbol.sdk.openapi.vertx.model.HashLockPage) HashLockRepository(io.nem.symbol.sdk.api.HashLockRepository) HashLockRoutesApi(io.nem.symbol.sdk.openapi.vertx.api.HashLockRoutesApi) LockStatus(io.nem.symbol.sdk.model.transaction.LockStatus) HashLockSearchCriteria(io.nem.symbol.sdk.api.HashLockSearchCriteria) HashLockRoutesApiImpl(io.nem.symbol.sdk.openapi.vertx.api.HashLockRoutesApiImpl) Collectors(java.util.stream.Collectors) HashLockInfoDTO(io.nem.symbol.sdk.openapi.vertx.model.HashLockInfoDTO) HashLockEntryDTO(io.nem.symbol.sdk.openapi.vertx.model.HashLockEntryDTO) Consumer(java.util.function.Consumer) Order(io.nem.symbol.sdk.openapi.vertx.model.Order) ObjectUtils(org.apache.commons.lang3.ObjectUtils) MerkleStateInfo(io.nem.symbol.sdk.model.blockchain.MerkleStateInfo) HashLockInfo(io.nem.symbol.sdk.model.transaction.HashLockInfo) Observable(io.reactivex.Observable) AsyncResult(io.vertx.core.AsyncResult) Handler(io.vertx.core.Handler) Page(io.nem.symbol.sdk.api.Page) HashLockPage(io.nem.symbol.sdk.openapi.vertx.model.HashLockPage) Handler(io.vertx.core.Handler)

Aggregations

MapperUtils (io.nem.symbol.core.utils.MapperUtils)1 HashLockRepository (io.nem.symbol.sdk.api.HashLockRepository)1 HashLockSearchCriteria (io.nem.symbol.sdk.api.HashLockSearchCriteria)1 Page (io.nem.symbol.sdk.api.Page)1 MerkleStateInfo (io.nem.symbol.sdk.model.blockchain.MerkleStateInfo)1 HashLockInfo (io.nem.symbol.sdk.model.transaction.HashLockInfo)1 LockStatus (io.nem.symbol.sdk.model.transaction.LockStatus)1 HashLockRoutesApi (io.nem.symbol.sdk.openapi.vertx.api.HashLockRoutesApi)1 HashLockRoutesApiImpl (io.nem.symbol.sdk.openapi.vertx.api.HashLockRoutesApiImpl)1 ApiClient (io.nem.symbol.sdk.openapi.vertx.invoker.ApiClient)1 HashLockEntryDTO (io.nem.symbol.sdk.openapi.vertx.model.HashLockEntryDTO)1 HashLockInfoDTO (io.nem.symbol.sdk.openapi.vertx.model.HashLockInfoDTO)1 HashLockPage (io.nem.symbol.sdk.openapi.vertx.model.HashLockPage)1 Order (io.nem.symbol.sdk.openapi.vertx.model.Order)1 Observable (io.reactivex.Observable)1 AsyncResult (io.vertx.core.AsyncResult)1 Handler (io.vertx.core.Handler)1 Consumer (java.util.function.Consumer)1 Collectors (java.util.stream.Collectors)1 ObjectUtils (org.apache.commons.lang3.ObjectUtils)1