Skip to content

Instantly share code, notes, and snippets.

@olivermt
Created March 16, 2011 18:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save olivermt/873003 to your computer and use it in GitHub Desktop.
Save olivermt/873003 to your computer and use it in GitHub Desktop.
List<Outcrop> listTouchedOutcrops(String grossDepEnv, String depEnv = null, String subDepEnv = null, String archiEleType = null, String basinType = null, String climate = null) {
def c = Outcrop.createCriteria()
def result = c.list {
section {
eq("grossDepositionalEnvironment", grossDepEnv)
depositionalSetting {
basinType ? eq("basinType", basinType) : null
climate ? eq("paleoClimate", climate) : null
}
depositionalEnvironment {
depEnv ? eq("type", depEnv) : null
subEnvironment {
subDepEnv ? eq("type", subDepEnv) : null
architecturalElement {
archiEleType ? eq("type", archiEleType) : null
}
}
}
}
}
return result
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment