Guest User

Untitled

a guest
Jul 17th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. class PSPlacement{
  2. static transients = [
  3. "categoryHierarchy"
  4. }
  5.  
  6. def String getCategoryHierarchy(){
  7. return this.getCategoriesForPlacement()?.join('>')
  8. }
  9.  
  10. def getCategoriesForPlacement(){
  11. if(category)
  12. return Category.executeQuery("SELECT ......")
  13.  
  14. return []
  15. }
  16.  
  17. static searchable = {
  18.  
  19. all false
  20. categoryHierarchy index: "not_analyzed", name: "categoryHierarchy", store: "no"
  21. categoryHierarchy index: "not_analyzed", name: "categoryHierarchySort", store: "no"
  22. }
  23. }
Add Comment
Please, Sign In to add comment