net.vz.mongodb.jackson
Class DBQuery.AbstractBuilder<Q extends DBQuery.AbstractBuilder>

java.lang.Object
  extended by net.vz.mongodb.jackson.DBQuery.AbstractBuilder<Q>
Direct Known Subclasses:
DBCursor, DBQuery.Query
Enclosing class:
DBQuery

public abstract static class DBQuery.AbstractBuilder<Q extends DBQuery.AbstractBuilder>
extends Object


Field Summary
protected  com.mongodb.DBObject query
           
 
Constructor Summary
protected DBQuery.AbstractBuilder(com.mongodb.DBObject query)
           
 
Method Summary
 Q all(String field, Collection<?> values)
          The array field contains all of the given values
 Q all(String field, Object... values)
          The array field contains all of the given values
 Q and(DBQuery.Query... expressions)
          All of the given expressions matches
 Q elemMatch(String field, DBQuery.Query query)
          An element in the given array field matches the given query
 Q exists(String field)
          The given field exists
 Q greaterThan(String field, Object value)
          The field is greater than the given value
 Q greaterThanEquals(String field, Object value)
          The field is greater than or equal to the given value
 Q in(String field, Collection<?> values)
          The field is in the given set of values
 Q in(String field, Object... values)
          The field is in the given set of values
 Q is(String field, Object value)
          The field is equal to the given value
 Q lessThan(String field, Object value)
          The field is less than the given value
 Q lessThanEquals(String field, Object value)
          The field is less than or equal to the given value
 Q mod(String field, Number mod, Number value)
          The field, modulo the given mod argument, is equal to the value
 Q nor(DBQuery.Query... expressions)
          None of the given expressions matches
 Q notEquals(String field, Object value)
          The field is not equal to the given value
 Q notExists(String field)
          The given field doesn't exist
 Q notIn(String field, Collection<?> values)
          The field is not in the given set of values
 Q notIn(String field, Object... values)
          The field is not in the given set of values
 Q or(DBQuery.Query... expressions)
          One of the given expressions matches
protected  Q put(String field, String op, Object value)
           
protected  Q putGroup(String op, Object... expressions)
           
 Q regex(String field, Pattern regex)
          The given field matches the regular expression
 Q size(String field, int size)
          The array field is of the given size
 Q where(String code)
          Execute the given JavaScript code as part of the query
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

query

protected final com.mongodb.DBObject query
Constructor Detail

DBQuery.AbstractBuilder

protected DBQuery.AbstractBuilder(com.mongodb.DBObject query)
Method Detail

is

public Q is(String field,
            Object value)
The field is equal to the given value

Parameters:
field - The field to compare
value - The value to compare to
Returns:
the query

lessThan

public Q lessThan(String field,
                  Object value)
The field is less than the given value

Parameters:
field - The field to compare
value - The value to compare to
Returns:
the query

lessThanEquals

public Q lessThanEquals(String field,
                        Object value)
The field is less than or equal to the given value

Parameters:
field - The field to compare
value - The value to compare to
Returns:
the query

greaterThan

public Q greaterThan(String field,
                     Object value)
The field is greater than the given value

Parameters:
field - The field to compare
value - The value to compare to
Returns:
the query

greaterThanEquals

public Q greaterThanEquals(String field,
                           Object value)
The field is greater than or equal to the given value

Parameters:
field - The field to compare
value - The value to compare to
Returns:
the query

notEquals

public Q notEquals(String field,
                   Object value)
The field is not equal to the given value

Parameters:
field - The field to compare
value - The value to compare to
Returns:
the query

in

public Q in(String field,
            Object... values)
The field is in the given set of values

Parameters:
field - The field to compare
values - The value to compare to
Returns:
the query

in

public Q in(String field,
            Collection<?> values)
The field is in the given set of values

Parameters:
field - The field to compare
values - The value to compare to
Returns:
the query

notIn

public Q notIn(String field,
               Object... values)
The field is not in the given set of values

Parameters:
field - The field to compare
values - The value to compare to
Returns:
the query

notIn

public Q notIn(String field,
               Collection<?> values)
The field is not in the given set of values

Parameters:
field - The field to compare
values - The value to compare to
Returns:
the query

mod

public Q mod(String field,
             Number mod,
             Number value)
The field, modulo the given mod argument, is equal to the value

Parameters:
field - The field to compare
mod - The modulo
value - The value to compare to
Returns:
the query

all

public Q all(String field,
             Collection<?> values)
The array field contains all of the given values

Parameters:
field - The field to compare
values - The values to compare to
Returns:
the query

all

public Q all(String field,
             Object... values)
The array field contains all of the given values

Parameters:
field - The field to compare
values - The values to compare to
Returns:
the query

size

public Q size(String field,
              int size)
The array field is of the given size

Parameters:
field - The field to compare
size - The value to compare
Returns:
the query

exists

public Q exists(String field)
The given field exists

Parameters:
field - The field to check
Returns:
the query

notExists

public Q notExists(String field)
The given field doesn't exist

Parameters:
field - The field to check
Returns:
the query

or

public Q or(DBQuery.Query... expressions)
One of the given expressions matches

Parameters:
expressions - The expressions to test
Returns:
the query

and

public Q and(DBQuery.Query... expressions)
All of the given expressions matches

Parameters:
expressions - The expressions to test
Returns:
the query

nor

public Q nor(DBQuery.Query... expressions)
None of the given expressions matches

Parameters:
expressions - The expressions to test
Returns:
the query

regex

public Q regex(String field,
               Pattern regex)
The given field matches the regular expression

Parameters:
field - The field to comare
regex - The regular expression to match with
Returns:
the query

elemMatch

public Q elemMatch(String field,
                   DBQuery.Query query)
An element in the given array field matches the given query

Parameters:
field - the array field
query - The query to attempt to match against the elements of the array field
Returns:
the query

where

public Q where(String code)
Execute the given JavaScript code as part of the query

Parameters:
code - the JavaScript code
Returns:
the query

put

protected Q put(String field,
                String op,
                Object value)

putGroup

protected Q putGroup(String op,
                     Object... expressions)


Copyright © 2011-2012 VZ Netzwerke. All Rights Reserved.