use of com.jd.blockchain.ledger.BlockchainIdentity in project jdchain-core by blockchain-jd-com.
the class ContractLedgerQueryService method getUserEventAccounts.
@Override
public BlockchainIdentity[] getUserEventAccounts(int fromIndex, int count) {
EventAccountSet eventAccountSet = ledgerQuery.getLedgerEventSet().getEventAccountSet();
QueryArgs queryArgs = QueryUtils.calFromIndexAndCountDescend(fromIndex, count, (int) eventAccountSet.getTotal());
SkippingIterator<BlockchainIdentity> it = eventAccountSet.identityIterator();
it.skip(queryArgs.getFrom());
return it.next(queryArgs.getCount(), BlockchainIdentity.class);
}
use of com.jd.blockchain.ledger.BlockchainIdentity in project jdchain-core by blockchain-jd-com.
the class UncommittedLedgerQueryService method getUserEventAccounts.
@Override
public BlockchainIdentity[] getUserEventAccounts(int fromIndex, int count) {
EventAccountSet eventAccountSet = transactionContext.getEventSet().getEventAccountSet();
QueryArgs queryArgs = QueryUtils.calFromIndexAndCountDescend(fromIndex, count, (int) eventAccountSet.getTotal());
SkippingIterator<BlockchainIdentity> it = eventAccountSet.identityIterator();
it.skip(queryArgs.getFrom());
return it.next(queryArgs.getCount(), BlockchainIdentity.class);
}
use of com.jd.blockchain.ledger.BlockchainIdentity in project jdchain-core by blockchain-jd-com.
the class UncommittedLedgerQueryService method getContractAccounts.
@Override
public BlockchainIdentity[] getContractAccounts(int fromIndex, int count) {
ContractAccountSet contractAccountSet = transactionContext.getDataset().getContractAccountSet();
QueryArgs queryArgs = QueryUtils.calFromIndexAndCountDescend(fromIndex, count, (int) contractAccountSet.getTotal());
SkippingIterator<BlockchainIdentity> it = contractAccountSet.identityIterator();
it.skip(queryArgs.getFrom());
return it.next(queryArgs.getCount(), BlockchainIdentity.class);
}
use of com.jd.blockchain.ledger.BlockchainIdentity in project jdchain-core by blockchain-jd-com.
the class UncommittedLedgerQueryService method getDataAccounts.
@Override
public BlockchainIdentity[] getDataAccounts(int fromIndex, int count) {
DataAccountSet dataAccountSet = transactionContext.getDataset().getDataAccountSet();
QueryArgs queryArgs = QueryUtils.calFromIndexAndCountDescend(fromIndex, count, (int) dataAccountSet.getTotal());
SkippingIterator<BlockchainIdentity> it = dataAccountSet.identityIterator();
it.skip(queryArgs.getFrom());
return it.next(queryArgs.getCount(), BlockchainIdentity.class);
}
use of com.jd.blockchain.ledger.BlockchainIdentity in project jdchain-core by blockchain-jd-com.
the class ContractLedgerQueryService method getContractAccounts.
@Override
public BlockchainIdentity[] getContractAccounts(int fromIndex, int count) {
ContractAccountSet contractAccountSet = ledgerQuery.getContractAccountset();
QueryArgs queryArgs = QueryUtils.calFromIndexAndCountDescend(fromIndex, count, (int) contractAccountSet.getTotal());
SkippingIterator<BlockchainIdentity> it = contractAccountSet.identityIterator();
it.skip(queryArgs.getFrom());
return it.next(queryArgs.getCount(), BlockchainIdentity.class);
}
Aggregations