getRestrictions()), or the Criteria object itself has a public property called
restrictionswhich you can use rather easily. We prefer the latter approach. Now, please understand that the ColdBox Criteria Builder masks all this complexity and in very rare cases will you be going to our restrictions class directly. Most of the time you will just be happily concatenating methods on the Criteria Builder.
add()method to add a manual restriction or array of restrictions to the criteria you are building.
when( test, target )function that will evaluate the
testargument or expression. If it evaluates to true then the target closure is called for you with the criteria object so you can do your criterias: