本文整理汇总了Java中nxt.db.DbClause.and方法的典型用法代码示例。如果您正苦于以下问题:Java DbClause.and方法的具体用法?Java DbClause.and怎么用?Java DbClause.and使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类nxt.db.DbClause
的用法示例。
在下文中一共展示了DbClause.and方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getOffers
import nxt.db.DbClause; //导入方法依赖的package包/类
public static DbIterator<CurrencySellOffer> getOffers(Currency currency, boolean availableOnly, int from, int to) {
DbClause dbClause = new DbClause.LongClause("currency_id", currency.getId());
if (availableOnly) {
dbClause = dbClause.and(availableOnlyDbClause);
}
return sellOfferTable.getManyBy(dbClause, from, to, " ORDER BY rate ASC, creation_height ASC, transaction_index ASC ");
}
示例2: getOffers
import nxt.db.DbClause; //导入方法依赖的package包/类
public static DbIterator<CurrencyBuyOffer> getOffers(Currency currency, boolean availableOnly, int from, int to) {
DbClause dbClause = new DbClause.LongClause("currency_id", currency.getId());
if (availableOnly) {
dbClause = dbClause.and(availableOnlyDbClause);
}
return buyOfferTable.getManyBy(dbClause, from, to, " ORDER BY rate DESC, creation_height ASC, transaction_index ASC ");
}
示例3: getOffers
import nxt.db.DbClause; //导入方法依赖的package包/类
public static DbIterator<CurrencySellOffer> getOffers(Currency currency, boolean availableOnly, int from, int to) {
DbClause dbClause = new DbClause.LongClause("currency_id", currency.getId());
if (availableOnly) {
dbClause = dbClause.and(availableOnlyDbClause);
}
return sellOfferTable.getManyBy(dbClause, from, to, " ORDER BY rate ASC, creation_height ASC, transaction_height ASC, transaction_index ASC ");
}
示例4: getOffers
import nxt.db.DbClause; //导入方法依赖的package包/类
public static DbIterator<CurrencyBuyOffer> getOffers(Currency currency, boolean availableOnly, int from, int to) {
DbClause dbClause = new DbClause.LongClause("currency_id", currency.getId());
if (availableOnly) {
dbClause = dbClause.and(availableOnlyDbClause);
}
return buyOfferTable.getManyBy(dbClause, from, to, " ORDER BY rate DESC, creation_height ASC, transaction_height ASC, transaction_index ASC ");
}
示例5: getDbClause
import nxt.db.DbClause; //导入方法依赖的package包/类
private static DbClause getDbClause(String channel, long accountId) {
DbClause dbClause = DbClause.EMPTY_CLAUSE;
if (channel != null) {
dbClause = new DbClause.StringClause("channel", channel);
}
if (accountId != 0) {
DbClause accountClause = new DbClause.LongClause("account_id", accountId);
dbClause = dbClause != DbClause.EMPTY_CLAUSE ? dbClause.and(accountClause) : accountClause;
}
return dbClause;
}
示例6: getPollsByAccount
import nxt.db.DbClause; //导入方法依赖的package包/类
public static DbIterator<Poll> getPollsByAccount(long accountId, boolean includeFinished, int from, int to) {
DbClause dbClause = new DbClause.LongClause("account_id", accountId);
if (!includeFinished) {
dbClause = dbClause.and(new DbClause.IntClause("finish_height", DbClause.Op.GT, Nxt.getBlockchain().getHeight()));
}
return pollTable.getManyBy(dbClause, from, to);
}
示例7: getTagsLike
import nxt.db.DbClause; //导入方法依赖的package包/类
public static DbIterator<Tag> getTagsLike(String prefix, boolean inStockOnly, int from, int to) {
DbClause dbClause = new DbClause.LikeClause("tag", prefix);
if (inStockOnly) {
dbClause = dbClause.and(inStockOnlyClause);
}
return tagTable.getManyBy(dbClause, from, to, " ORDER BY tag ");
}
示例8: getGoodsPurchases
import nxt.db.DbClause; //导入方法依赖的package包/类
public static DbIterator<Purchase> getGoodsPurchases(long goodsId, long buyerId, boolean withPublicFeedbacksOnly, boolean completedOnly, int from, int to) {
DbClause clause = new LongPurchasesClause("goods_id", goodsId, withPublicFeedbacksOnly, completedOnly);
if (buyerId != 0) {
clause = clause.and(new DbClause.LongClause("buyer_id", buyerId));
}
return purchaseTable.getManyBy(clause, from, to);
}