Advertisement
Guest User

Untitled

a guest
Jul 30th, 2016
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. @Validatable
  2. class FooCommand extends BarCommand{
  3. @BindUsing({obj, source -> return source['foo'].collect{it['id']}})
  4. List<Long> foo
  5.  
  6. static constraints = {foo(nullable:true)}
  7. }
  8.  
  9. JSONData = {"foo":[
  10. {'id':5},
  11. {'id':4}
  12. ]
  13. }
  14. FooCommand fooCommand = FooCommand(JSONData)
  15. fooCommand.validate()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement