Guest User

Untitled

a guest
Apr 26th, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. package com.huydung.demo
  2.  
  3. def class VOUtil{
  4. static def toVO( entity ){
  5. def vo = [:]
  6. vo.id = entity.key.id
  7. vo.putAll( entity.getProperties() )
  8. return vo
  9. }
  10. static def toVOs( entities ){
  11. return entities.collect{ entity ->
  12. VOUtil.toVO( entity )
  13. }
  14. }
  15. }
Add Comment
Please, Sign In to add comment