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