static Vote addVote(Transaction transaction, Attachment.MessagingVoteCasting attachment) { Vote vote = new Vote(transaction, attachment); voteTable.insert(vote); return vote; }
public static DbIterator<Vote> getVotes(long pollId, int from, int to) { return voteTable.getManyBy(new DbClause.LongClause("poll_id", pollId), from, to); }
public static Vote getVote(long pollId, long voterId) { DbClause clause = new DbClause.LongClause("poll_id", pollId) .and(new DbClause.LongClause("voter_id", voterId)); return voteTable.getBy(clause); }
public static int getCount() { return voteTable.getCount(); }
public static Vote getVote(long id) { return voteTable.get(voteDbKeyFactory.newKey(id)); }
static void addAsset(Transaction transaction, Attachment.ColoredCoinsAssetIssuance attachment) { assetTable.insert(new Asset(transaction, attachment)); }
public static DbIterator<Asset> getAssetsIssuedBy(long accountId, int from, int to) { return assetTable.getManyBy(new DbClause.LongClause("account_id", accountId), from, to); }
public static Asset getAsset(long id) { return assetTable.get(assetDbKeyFactory.newKey(id)); }
public static int getCount() { return assetTable.getCount(); }
public static DbIterator<Asset> getAllAssets(int from, int to) { return assetTable.getAll(from, to); }