Exemplo n.º 1
0
 private void addNeedsFuture(NeedsFutureClause clause) {
   if (needsFuture != null) {
     throw new IllegalStateException(
         needsFuture + " is already waiting for a future clause, can't add: " + clause);
   }
   needsFuture = clause;
   push(clause);
 }
Exemplo n.º 2
0
 private void addClause(Clause clause) {
   if (needsFuture == null) {
     push(clause);
   } else {
     // we have a binary statement which was called before the right clause was defined
     needsFuture.setMissingClause(clause);
     needsFuture = null;
   }
 }
Exemplo n.º 3
0
 /** OR operation which takes the previous clause and the next clause and OR's them together. */
 public Where<T, ID> or() {
   ManyClause clause = new ManyClause(pop("OR"), ManyClause.OR_OPERATION);
   push(clause);
   addNeedsFuture(clause);
   return this;
 }
Exemplo n.º 4
0
 /** AND operation which takes the previous clause and the next clause and AND's them together. */
 public Where<T, ID> and() {
   ManyClause clause = new ManyClause(pop("AND"), ManyClause.AND_OPERATION);
   push(clause);
   addNeedsFuture(clause);
   return this;
 }