Package gofer :: Package rmi :: Module criteria :: Class Builder
[hide private]
[frames] | no frames]

Class Builder

source code


Build a criteria object graph based on dictionary representations.
These representations can be nested.
Examples:
  {'eq':10}
  {'neq':10}
  {'in':[1,2]}
  {'gt':10}
  {'lt':10}
  {'and':({'gt':1},{'lt':10})}
  {'or':({'eq':10},{'in':[1,2]})}
  {'or':({'eq':10},{'or':({'eq':1},{'eq':2})}

Instance Methods [hide private]
Criteria @raise Exception, on invalid criteria.
build(self, criteria)
Build a Criteria object based on the specified dict representation.
source code
 
_resolve(self, object) source code
 
_criteria(self, object) source code
Class Variables [hide private]
  METHODS = {'eq': Equal, 'neq': NotEqual, 'in': In, 'gt': Great...
Method Details [hide private]

build(self, criteria)

source code 

Build a Criteria object based on the specified dict representation.

Parameters:
  • criteria (dict) - The criteria to build.
Returns: Criteria @raise Exception, on invalid criteria.

Class Variable Details [hide private]

METHODS

Value:
{'eq': Equal, 'neq': NotEqual, 'in': In, 'gt': Greater, 'lt': Less, 'a\
nd': And, 'or': Or,}