forked from Qortal/qortal
Improved comments, variable names, etc. for some repository interfaces
This commit is contained in:
parent
53112709fe
commit
9e0001c4f6
@ -82,7 +82,8 @@ public interface AccountRepository {
|
|||||||
*/
|
*/
|
||||||
public void setMintedBlockCount(AccountData accountData) throws DataException;
|
public void setMintedBlockCount(AccountData accountData) throws DataException;
|
||||||
|
|
||||||
/** Modifies account's minted block count only.
|
/**
|
||||||
|
* Modifies account's minted block count only.
|
||||||
* <p>
|
* <p>
|
||||||
* @return 2 if minted block count updated, 1 if block count set to delta, 0 if address not found.
|
* @return 2 if minted block count updated, 1 if block count set to delta, 0 if address not found.
|
||||||
*/
|
*/
|
||||||
@ -96,18 +97,32 @@ public interface AccountRepository {
|
|||||||
|
|
||||||
// Account balances
|
// Account balances
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns account's balance for specific assetID.
|
||||||
|
* <p>
|
||||||
|
* Note: returns <tt>null</tt> if account has no/zero balance for
|
||||||
|
* <i>that specific assetID</i>. This does not mean
|
||||||
|
* the account itself does not exist.
|
||||||
|
*/
|
||||||
public AccountBalanceData getBalance(String address, long assetId) throws DataException;
|
public AccountBalanceData getBalance(String address, long assetId) throws DataException;
|
||||||
|
|
||||||
|
/** How to order results when fetching asset balances. */
|
||||||
public enum BalanceOrdering {
|
public enum BalanceOrdering {
|
||||||
|
/** assetID first, then balance, then account address */
|
||||||
ASSET_BALANCE_ACCOUNT,
|
ASSET_BALANCE_ACCOUNT,
|
||||||
|
/** account address first, then assetID */
|
||||||
ACCOUNT_ASSET,
|
ACCOUNT_ASSET,
|
||||||
|
/** assetID first, then account address */
|
||||||
ASSET_ACCOUNT
|
ASSET_ACCOUNT
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Returns all account balances for given assetID, optionally excluding zero balances. */
|
||||||
public List<AccountBalanceData> getAssetBalances(long assetId, Boolean excludeZero) throws DataException;
|
public List<AccountBalanceData> getAssetBalances(long assetId, Boolean excludeZero) throws DataException;
|
||||||
|
|
||||||
|
/** Returns account balances for matching addresses / assetIDs, optionally excluding zero balances, with pagination, used by API. */
|
||||||
public List<AccountBalanceData> getAssetBalances(List<String> addresses, List<Long> assetIds, BalanceOrdering balanceOrdering, Boolean excludeZero, Integer limit, Integer offset, Boolean reverse) throws DataException;
|
public List<AccountBalanceData> getAssetBalances(List<String> addresses, List<Long> assetIds, BalanceOrdering balanceOrdering, Boolean excludeZero, Integer limit, Integer offset, Boolean reverse) throws DataException;
|
||||||
|
|
||||||
|
/** Modifies account's asset balance by <tt>deltaBalance</tt>. */
|
||||||
public void modifyAssetBalance(String address, long assetId, long deltaBalance) throws DataException;
|
public void modifyAssetBalance(String address, long assetId, long deltaBalance) throws DataException;
|
||||||
|
|
||||||
public void save(AccountBalanceData accountBalanceData) throws DataException;
|
public void save(AccountBalanceData accountBalanceData) throws DataException;
|
||||||
|
@ -25,7 +25,7 @@ public interface AssetRepository {
|
|||||||
return getAllAssets(null, null, null);
|
return getAllAssets(null, null, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Long> getRecentAssetIds(long start) throws DataException;
|
public List<Long> getRecentAssetIds(long startTimestamp) throws DataException;
|
||||||
|
|
||||||
// For a list of asset holders, see AccountRepository.getAssetBalances
|
// For a list of asset holders, see AccountRepository.getAssetBalances
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ public interface NameRepository {
|
|||||||
return getNamesByOwner(address, null, null, null);
|
return getNamesByOwner(address, null, null, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<String> getRecentNames(long start) throws DataException;
|
public List<String> getRecentNames(long startTimestamp) throws DataException;
|
||||||
|
|
||||||
public void save(NameData nameData) throws DataException;
|
public void save(NameData nameData) throws DataException;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user