Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.groovy.grails.commons
Class DomainClassArtefactHandler

    java.lang.Object
      org.codehaus.groovy.grails.commons.ArtefactHandlerAdapter
          org.codehaus.groovy.grails.commons.DomainClassArtefactHandler

All Implemented Interfaces:
  ArtefactHandler

    public class DomainClassArtefactHandler

extends ArtefactHandlerAdapter

Author:
  Marc Palmer (marc@anyware.co.uk)

Field Summary
`static String` | `TYPE`

Fields inherited from class org.codehaus.groovy.grails.commons.ArtefactHandlerAdapter
`log`

Constructor Summary
`DomainClassArtefactHandler()`

Method Summary
`void` | `initialize(ArtefactInfo artefacts)` Sets up the relationships between the domain classes, this has to be done after the intial creation to avoid looping
`boolean` | `isArtefactClass(Class clazz)` Checks that class's name ends in the suffix specified for this handler.
`static boolean` | `isDomainClass(Class clazz)`
`GrailsClass` | `newArtefactClass(Class artefactClass)` Creates new GrailsClass derived object using the type supplied in constructor.

Methods inherited from class org.codehaus.groovy.grails.commons.ArtefactHandlerAdapter
`getArtefactForFeature, getType, isArtefact, isArtefactGrailsClass`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### TYPE

    public static final String TYPE

See Also:
  Constant Field Values

Constructor Detail

### DomainClassArtefactHandler

    public DomainClassArtefactHandler()

Method Detail

### newArtefactClass

    public GrailsClass newArtefactClass(Class artefactClass)

  Description copied from class: `ArtefactHandlerAdapter`

  Creates new GrailsClass derived object using the type supplied in constructor. May not perform optimally but is a convenience.

  Specified by:
    `newArtefactClass` in interface `ArtefactHandler`
  Overrides:
    `newArtefactClass` in class `ArtefactHandlerAdapter`
  Parameters:
    `artefactClass` - Creates a new artefact for the given class
  Returns:
    An instance of the GrailsClass interface representing the artefact

### initialize

    public void initialize(ArtefactInfo artefacts)

  Sets up the relationships between the domain classes, this has to be done after the intial creation to avoid looping

  Specified by:
    `initialize` in interface `ArtefactHandler`
  Overrides:
    `initialize` in class `ArtefactHandlerAdapter`
  Parameters:
    `artefacts` - The collection of artefact classes for this handler

### isArtefactClass

    public boolean isArtefactClass(Class clazz)

  Description copied from class: `ArtefactHandlerAdapter`

  Checks that class's name ends in the suffix specified for this handler.

  Override for more complex criteria

  Overrides:
    `isArtefactClass` in class `ArtefactHandlerAdapter`
  Parameters:
    `clazz` - The class to check
  Returns:
    True if it is an artefact of this type

### isDomainClass

    public static boolean isDomainClass(Class clazz)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 2005-2006 The Grails project