---
title: "List of all domain classes in BootStrap "
author: "boogie"
date: "2008-06-14T22:02:46Z"
tags: []
slug: "list-of-all-domain-classes-in-bootstrap"
draft: false
lastmod: "2008-06-14T22:02:46Z"
id: 203328
url: "https://boogie.iteye.com/blog/203328"
---

import org.codehaus.groovy.grails.commons.ApplicationHolder

class BootStrap {

    def init = {servletContext -&gt;  
        ApplicationHolder.application.domainClasses.each() {  
            println it.fullName // full name with package  
            println it.name // simple class name

            it.metaClass.delete = {-&gt;  
                throw new RuntimeException("Don't delete!")  
            }

        }

 

http://www.nabble.com/List-of-all-domain-classes-td16243551.html#a16243801

http://www.nabble.com/flag-for-deletion-%28how-do-I-do-that%29-td13556641.html#a13561051

http://www.nabble.com/before-after-interceptor-for-domain-class-td10028732.html#a10032495