org.unitils.orm.hibernate.util
Class HibernateAnnotationConfigLoader

java.lang.Object
  extended by org.unitils.util.AnnotationConfigLoader<HibernateSessionFactory,OrmConfig>
      extended by org.unitils.orm.hibernate.util.HibernateAnnotationConfigLoader
All Implemented Interfaces:
ResourceConfigLoader<OrmConfig>

public class HibernateAnnotationConfigLoader
extends AnnotationConfigLoader<HibernateSessionFactory,OrmConfig>


Field Summary
 
Fields inherited from class org.unitils.util.AnnotationConfigLoader
annotationClass
 
Constructor Summary
HibernateAnnotationConfigLoader()
           
 
Method Summary
protected  OrmConfig createResourceConfig(HibernateSessionFactory configuringAnnotation, Method customConfigMethod)
          Either the given configuring annotation or custom config method must not be null (may also both be not-null)
protected  boolean isConfiguringAnnotation(HibernateSessionFactory annotation)
           
protected  boolean isCustomConfigMethod(Method annotatedMethod)
           
 
Methods inherited from class org.unitils.util.AnnotationConfigLoader
getCustomConfigMethod, getResourceConfig, loadResourceConfig
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HibernateAnnotationConfigLoader

public HibernateAnnotationConfigLoader()
Method Detail

isConfiguringAnnotation

protected boolean isConfiguringAnnotation(HibernateSessionFactory annotation)
Specified by:
isConfiguringAnnotation in class AnnotationConfigLoader<HibernateSessionFactory,OrmConfig>
Parameters:
annotation - Annotation of type AnnotationConfigLoader.annotationClass
Returns:
True if for the given annotation, the necessary attributes are filled so that it can be regarded as a configuring annotation

createResourceConfig

protected OrmConfig createResourceConfig(HibernateSessionFactory configuringAnnotation,
                                         Method customConfigMethod)
Description copied from class: AnnotationConfigLoader
Either the given configuring annotation or custom config method must not be null (may also both be not-null)

Specified by:
createResourceConfig in class AnnotationConfigLoader<HibernateSessionFactory,OrmConfig>
Parameters:
configuringAnnotation - Configuring annotation, if any
customConfigMethod - Custom config method, if any
Returns:
A new resource config object, given the configuring annotation and custom configuration method

isCustomConfigMethod

protected boolean isCustomConfigMethod(Method annotatedMethod)
Specified by:
isCustomConfigMethod in class AnnotationConfigLoader<HibernateSessionFactory,OrmConfig>
Parameters:
annotatedMethod - A method annotated with AnnotationConfigLoader.annotationClass
Returns:
True if the given method is a custom configuration method


Copyright © 2011. All Rights Reserved.