Created
October 6, 2011 12:05
-
-
Save olivermt/1267248 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| static namedQueries = { | |
| searchTree { query -> | |
| section { | |
| query.modern ? isNotNull("modernDepositionalSetting") : isNotNull("depositionalSetting") | |
| eq("grossDepositionalEnvironment", query.grossDepositionalEnvironment) | |
| depositionalSetting { | |
| if(query.basinType) 'in'("basinType", query.basinType) | |
| if(query.paleoClimate)'in'("paleoClimate", query.paleoClimate) | |
| } | |
| depositionalEnvironment { | |
| if(query.depositionalEnvironment) 'in'("type", query.depositionalEnvironment) | |
| subEnvironment { | |
| if(query.subDepositionalEnvironment) 'in'("type", query.subDepositionalEnvironment) | |
| isNotEmpty("architecturalElement") //to not get back outcrops that does not have archielements | |
| architecturalElement { | |
| if(query.architecturalElementType) 'in'("type", query.architecturalElementType) | |
| isNotNull("avgGeometry") | |
| } | |
| } | |
| } | |
| } | |
| } | |
| distinctGrossDepositionalEnvironments { query -> | |
| searchTree(query) { | |
| projections { | |
| groupProperty("grossDepositionalEnvironment", "keyName") | |
| depositionalEnvironment { | |
| subEnvironment { | |
| architecturalElement { | |
| count("id", "countValue") | |
| isNotNull("avgGeometry") | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment