Search in sources :

Example 1 with AccountRestrictionsPage

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

the class RestrictionAccountRepositoryVertxImpl method search.

@Override
public Observable<Page<AccountRestrictions>> search(AccountRestrictionSearchCriteria 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<AccountRestrictionsPage>>> handlerConsumer = (h) -> getClient().searchAccountRestrictions(address, pageSize, pageNumber, offset, order, h);
    return this.call(handlerConsumer, this::toPage);
}
Also used : Order(io.nem.symbol.sdk.openapi.vertx.model.Order) AccountRestrictionsPage(io.nem.symbol.sdk.openapi.vertx.model.AccountRestrictionsPage) RestrictionAccountRepository(io.nem.symbol.sdk.api.RestrictionAccountRepository) MapperUtils(io.nem.symbol.core.utils.MapperUtils) ApiClient(io.nem.symbol.sdk.openapi.vertx.invoker.ApiClient) RestrictionAccountRoutesApi(io.nem.symbol.sdk.openapi.vertx.api.RestrictionAccountRoutesApi) AccountRestrictionFlags(io.nem.symbol.sdk.model.transaction.AccountRestrictionFlags) AccountRestrictionDTO(io.nem.symbol.sdk.openapi.vertx.model.AccountRestrictionDTO) Collectors(java.util.stream.Collectors) Objects(java.util.Objects) Consumer(java.util.function.Consumer) AccountRestrictionSearchCriteria(io.nem.symbol.sdk.api.AccountRestrictionSearchCriteria) AccountRestrictionsPage(io.nem.symbol.sdk.openapi.vertx.model.AccountRestrictionsPage) Order(io.nem.symbol.sdk.openapi.vertx.model.Order) AccountRestrictions(io.nem.symbol.sdk.model.account.AccountRestrictions) ObjectUtils(org.apache.commons.lang3.ObjectUtils) AccountRestriction(io.nem.symbol.sdk.model.account.AccountRestriction) MerkleStateInfo(io.nem.symbol.sdk.model.blockchain.MerkleStateInfo) Observable(io.reactivex.Observable) AccountRestrictionsInfoDTO(io.nem.symbol.sdk.openapi.vertx.model.AccountRestrictionsInfoDTO) AsyncResult(io.vertx.core.AsyncResult) Address(io.nem.symbol.sdk.model.account.Address) RestrictionAccountRoutesApiImpl(io.nem.symbol.sdk.openapi.vertx.api.RestrictionAccountRoutesApiImpl) Handler(io.vertx.core.Handler) Page(io.nem.symbol.sdk.api.Page) Handler(io.vertx.core.Handler)

Aggregations

MapperUtils (io.nem.symbol.core.utils.MapperUtils)1 AccountRestrictionSearchCriteria (io.nem.symbol.sdk.api.AccountRestrictionSearchCriteria)1 Page (io.nem.symbol.sdk.api.Page)1 RestrictionAccountRepository (io.nem.symbol.sdk.api.RestrictionAccountRepository)1 AccountRestriction (io.nem.symbol.sdk.model.account.AccountRestriction)1 AccountRestrictions (io.nem.symbol.sdk.model.account.AccountRestrictions)1 Address (io.nem.symbol.sdk.model.account.Address)1 MerkleStateInfo (io.nem.symbol.sdk.model.blockchain.MerkleStateInfo)1 AccountRestrictionFlags (io.nem.symbol.sdk.model.transaction.AccountRestrictionFlags)1 RestrictionAccountRoutesApi (io.nem.symbol.sdk.openapi.vertx.api.RestrictionAccountRoutesApi)1 RestrictionAccountRoutesApiImpl (io.nem.symbol.sdk.openapi.vertx.api.RestrictionAccountRoutesApiImpl)1 ApiClient (io.nem.symbol.sdk.openapi.vertx.invoker.ApiClient)1 AccountRestrictionDTO (io.nem.symbol.sdk.openapi.vertx.model.AccountRestrictionDTO)1 AccountRestrictionsInfoDTO (io.nem.symbol.sdk.openapi.vertx.model.AccountRestrictionsInfoDTO)1 AccountRestrictionsPage (io.nem.symbol.sdk.openapi.vertx.model.AccountRestrictionsPage)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 Objects (java.util.Objects)1