org.codehaus.groovy.grails.commons
Class AnnotationDomainClassArtefactHandler

java.lang.Object
  extended by org.codehaus.groovy.grails.commons.ArtefactHandlerAdapter
      extended by org.codehaus.groovy.grails.commons.DomainClassArtefactHandler
          extended by org.codehaus.groovy.grails.commons.AnnotationDomainClassArtefactHandler
All Implemented Interfaces:
ArtefactHandler

public class AnnotationDomainClassArtefactHandler
extends DomainClassArtefactHandler

Detects annotated domain classes for EJB3 style mappings

Since:
1.0

Created: Dec 6, 2007

Author:
Graeme Rocher

Field Summary
 
Fields inherited from class org.codehaus.groovy.grails.commons.DomainClassArtefactHandler
TYPE
 
Fields inherited from class org.codehaus.groovy.grails.commons.ArtefactHandlerAdapter
log
 
Constructor Summary
AnnotationDomainClassArtefactHandler()
           
 
Method Summary
 boolean isArtefactClass(Class clazz)
          Checks that class's name ends in the suffix specified for this handler.
static boolean isJPADomainClass(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.DomainClassArtefactHandler
initialize, isDomainClass
 
Methods inherited from class org.codehaus.groovy.grails.commons.ArtefactHandlerAdapter
getArtefactForFeature, getPluginName, getType, isArtefact, isArtefactGrailsClass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotationDomainClassArtefactHandler

public AnnotationDomainClassArtefactHandler()
Method Detail

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 DomainClassArtefactHandler
Parameters:
clazz - The class to check
Returns:
True if it is an artefact of this type

isJPADomainClass

public static boolean isJPADomainClass(Class clazz)

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 DomainClassArtefactHandler
Parameters:
artefactClass - Creates a new artefact for the given class
Returns:
An instance of the GrailsClass interface representing the artefact


Copyright (c) 2005-2009 The Grails project