@Override public void resetFilters() { this.walletContactsTable = walletContactsMiddlewareDao.getWalletContactsTable(); walletContactsTable.setStringFilter( WalletContactsMiddlewareDatabaseConstants.WALLET_CONTACTS_WALLET_PUBLIC_KEY_COLUMN_NAME, walletPublicKey, DatabaseFilterType.EQUAL); }
public WalletContactsMiddlewareSearch( ErrorManager errorManager, WalletContactsMiddlewareDao walletContactsMiddlewareDao, String walletPublicKey) { this.errorManager = errorManager; this.walletContactsMiddlewareDao = walletContactsMiddlewareDao; this.walletContactsTable = walletContactsMiddlewareDao.getWalletContactsTable(); this.walletPublicKey = walletPublicKey; this.resetFilters(); }
@Override public List<WalletContactRecord> getResult() throws CantGetAllWalletContactsException { try { return walletContactsMiddlewareDao.listWalletContactRecords(walletContactsTable); } catch (CantGetAllWalletContactsException e) { errorManager.reportUnexpectedPluginException( Plugins.BITDUBAI_CCP_WALLET_CONTACTS_MIDDLEWARE, UnexpectedPluginExceptionSeverity.DISABLES_SOME_FUNCTIONALITY_WITHIN_THIS_PLUGIN, e); throw e; } catch (Exception e) { throw new CantGetAllWalletContactsException( CantGetAllWalletContactsException.DEFAULT_MESSAGE, FermatException.wrapException(e)); } }