qortal/src/repository/AccountRepository.java
catbref 519331f823 Work on Assets conversion
* Added AssetData transfer object
* Added IssueAssetTransactionData transfer object

* Reworked qora.assets.Asset into business layer object
* Reworked qora.transaction.IssueAssetTransaction into business layer object

* Added corresponding AssetRepository and support in TransactionRepository et al

* Fixed BlockChain in line with asset changes

* Some renaming inside GenesisTransaction to reflect use of transfer object, not business object

* Business transaction objects now take Repository param

* Moved HSQLDB transaction repositories into a sub-package
* Changed HSQLDBSaver.execute(Connection connection) to .execute(Repository repository) to fix visibility issues
and allow repository more control in the future if need be

* Changed from "return null" statements in HSQLDB repositories to throw DataException when an error occurs.
Better to throw than to silently return null?

* Added static version of PublicKeyAccount.verify() for when a repository-backed PublicKeyAccount is not needed

* Fixed getter/setter code template incorrectly producing "this.this.field = param"
2018-06-13 11:46:33 +01:00

23 lines
558 B
Java

package repository;
import data.account.AccountBalanceData;
import data.account.AccountData;
public interface AccountRepository {
// General account
public AccountData getAccount(String address) throws DataException;
public void save(AccountData accountData) throws DataException;
// Account balances
public AccountBalanceData getBalance(String address, long assetId) throws DataException;
public void save(AccountBalanceData accountBalanceData) throws DataException;
public void delete(String address, long assetId) throws DataException;
}