Example #1
0
 static Vote addVote(Transaction transaction, Attachment.MessagingVoteCasting attachment) {
   Vote vote = new Vote(transaction, attachment);
   voteTable.insert(vote);
   return vote;
 }
Example #2
0
 public static DbIterator<Vote> getVotes(long pollId, int from, int to) {
   return voteTable.getManyBy(new DbClause.LongClause("poll_id", pollId), from, to);
 }
Example #3
0
 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);
 }
Example #4
0
 public static int getCount() {
   return voteTable.getCount();
 }
Example #5
0
 public static Vote getVote(long id) {
   return voteTable.get(voteDbKeyFactory.newKey(id));
 }
Example #6
0
 static void addAsset(Transaction transaction, Attachment.ColoredCoinsAssetIssuance attachment) {
   assetTable.insert(new Asset(transaction, attachment));
 }
Example #7
0
 public static DbIterator<Asset> getAssetsIssuedBy(long accountId, int from, int to) {
   return assetTable.getManyBy(new DbClause.LongClause("account_id", accountId), from, to);
 }
Example #8
0
 public static Asset getAsset(long id) {
   return assetTable.get(assetDbKeyFactory.newKey(id));
 }
Example #9
0
 public static int getCount() {
   return assetTable.getCount();
 }
Example #10
0
 public static DbIterator<Asset> getAllAssets(int from, int to) {
   return assetTable.getAll(from, to);
 }