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