Groovy web console

subscribe to the feed Subscribe
to this

Map access using property notation

Published 3 weeks ago by Reiner Saddey with tags Maps
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
class ModelSelect {

private static final String GET_ALL_CONDITIONS = "getAllConditions"; 

void tryme(final Map<String, Object> parameter) {
  println "Trying GET_ALL_CONDITIONS: " + parameter.GET_ALL_CONDITIONS
  println "Trying getAllConditions: " + parameter.getAllConditions
  println "Trying [GET_ALL_CONDITIONS]: " + parameter[GET_ALL_CONDITIONS]

new ModelSelect().tryme(["getAllConditions":"Success"])