org.unitils.orm.jpa.util
Class JpaAnnotationConfigLoader
java.lang.Object
org.unitils.util.AnnotationConfigLoader<JpaEntityManagerFactory,JpaConfig>
org.unitils.orm.jpa.util.JpaAnnotationConfigLoader
- All Implemented Interfaces:
- ResourceConfigLoader<JpaConfig>
public class JpaAnnotationConfigLoader
- extends AnnotationConfigLoader<JpaEntityManagerFactory,JpaConfig>
AnnotationConfigLoader
that looks an EntityManagerFactory
configured using
JpaEntityManagerFactory
anntations.
- Author:
- Filip Neven, Tim Ducheyne
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JpaAnnotationConfigLoader
public JpaAnnotationConfigLoader()
isConfiguringAnnotation
protected boolean isConfiguringAnnotation(JpaEntityManagerFactory annotation)
- Specified by:
isConfiguringAnnotation
in class AnnotationConfigLoader<JpaEntityManagerFactory,JpaConfig>
- 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 JpaConfig createResourceConfig(JpaEntityManagerFactory 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<JpaEntityManagerFactory,JpaConfig>
- Parameters:
configuringAnnotation
- Configuring annotation, if anycustomConfigMethod
- 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<JpaEntityManagerFactory,JpaConfig>
- Parameters:
annotatedMethod
- A method annotated with AnnotationConfigLoader.annotationClass
- Returns:
- True if the given method is a custom configuration method
Copyright © 2011. All Rights Reserved.