Exemplo n.º 1
0
 private long findPageIdByAssociated(Context ctx, long associatedId) {
   String sql =
       new SQLBuilder.Select()
           .select("page_id")
           .from(pageTable)
           .where("destroyed_time<>0 AND associated_id=${v(aid)}", "aid", associatedId)
           .toString();
   SQLExecutor se = getSqlExecutor();
   return se.executeIntScalar(sql, 0L);
 }
Exemplo n.º 2
0
 @Override
 public boolean hasPage(Context ctx, long pageId) {
   String sql =
       new SQLBuilder.Select()
           .select("page_id")
           .from(pageTable)
           .where("destroyed_time=0 AND page_id = ${v(page_id)}", "page_id", pageId)
           .toString();
   SQLExecutor se = getSqlExecutor();
   return se.executeIntScalar(sql, 0L) > 0L;
 }