use of io.nem.symbol.sdk.openapi.okhttp_gson.model.Order in project nem2-sdk-java by nemtech.
the class SecretLockRepositoryOkHttpImpl method search.
@Override
public Observable<Page<SecretLockInfo>> search(SecretLockSearchCriteria criteria) {
String address = toDto(criteria.getAddress());
String secret = criteria.getSecret();
Integer pageSize = criteria.getPageSize();
Integer pageNumber = criteria.getPageNumber();
String offset = criteria.getOffset();
Order order = toDto(criteria.getOrder());
Callable<SecretLockPage> callback = () -> getClient().searchSecretLock(address, secret, pageSize, pageNumber, offset, order);
return this.call(callback, this::toPage);
}
use of io.nem.symbol.sdk.openapi.okhttp_gson.model.Order in project nem2-sdk-java by nemtech.
the class AccountRepositoryOkHttpImpl method search.
@Override
public Observable<Page<AccountInfo>> search(AccountSearchCriteria criteria) {
Integer pageSize = criteria.getPageSize();
Integer pageNumber = criteria.getPageNumber();
String offset = criteria.getOffset();
Order order = toDto(criteria.getOrder());
AccountOrderByEnum orderBy = criteria.getOrderBy() == null ? null : AccountOrderByEnum.fromValue(criteria.getOrderBy().getValue());
String mosaicId = criteria.getMosaicId() == null ? null : criteria.getMosaicId().getIdAsHex();
Callable<AccountPage> callback = () -> getClient().searchAccounts(pageSize, pageNumber, offset, order, orderBy, mosaicId);
return exceptionHandling(call(callback).map(page -> this.toPage(page.getPagination(), page.getData().stream().map(this::toAccountInfo).collect(Collectors.toList()))));
}
use of io.nem.symbol.sdk.openapi.okhttp_gson.model.Order in project nem2-sdk-java by nemtech.
the class ReceiptRepositoryOkHttpImpl method searchAddressResolutionStatements.
@Override
public Observable<Page<AddressResolutionStatement>> searchAddressResolutionStatements(ResolutionStatementSearchCriteria criteria) {
BigInteger height = criteria.getHeight();
Integer pageSize = criteria.getPageSize();
Integer pageNumber = criteria.getPageNumber();
String offset = criteria.getOffset();
Order order = toDto(criteria.getOrder());
Callable<ResolutionStatementPage> callback = () -> getClient().searchAddressResolutionStatements(height, pageSize, pageNumber, offset, order);
return exceptionHandling(call(callback).map(page -> this.toPage(page.getPagination(), page.getData().stream().map(mapper::createAddressResolutionStatementFromDto).collect(Collectors.toList()))));
}
use of io.nem.symbol.sdk.openapi.okhttp_gson.model.Order in project nem2-sdk-java by nemtech.
the class MetadataRepositoryOkHttpImpl method search.
@Override
public Observable<Page<Metadata>> search(MetadataSearchCriteria criteria) {
String sourceAddress = toDto(criteria.getSourceAddress());
String targetAddress = toDto(criteria.getTargetAddress());
String scopedMetadataKey = toDto(criteria.getScopedMetadataKey());
String targetId = criteria.getTargetId();
MetadataTypeEnum metadataType = criteria.getMetadataType() == null ? null : MetadataTypeEnum.fromValue(criteria.getMetadataType().getValue());
String offset = criteria.getOffset();
Integer pageSize = criteria.getPageSize();
Integer pageNumber = criteria.getPageNumber();
Order order = toDto(criteria.getOrder());
Callable<MetadataPage> callback = () -> getClient().searchMetadataEntries(sourceAddress, targetAddress, scopedMetadataKey, targetId, metadataType, pageSize, pageNumber, offset, order);
return call(callback, page -> this.toPage(page.getPagination(), page.getData().stream().map(this::toMetadata).collect(Collectors.toList())));
}
use of io.nem.symbol.sdk.openapi.okhttp_gson.model.Order in project nem2-sdk-java by nemtech.
the class HashLockRepositoryOkHttpImpl 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());
Callable<HashLockPage> callback = () -> getClient().searchHashLock(address, pageSize, pageNumber, offset, order);
return this.call(callback, this::toPage);
}
Aggregations