public class JPAUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static Field |
getField(Class<?> clazz,
String name) |
static Annotations |
getJPAAnnotations(Class<?> clazz)
Returns all the JPA annotations declared on the class.
|
static Annotations |
getJPAAnnotations(Field field)
Returns all the JPA annotations declared on the field.
|
static Map<Field,Annotations> |
getJPAFields(Class<?> clazz)
Returns all the JPA annotated fields on given class along with their annotations.
|
static Set<Field> |
getJPAFields(Class<?> clazz,
Class<? extends Annotation> desiredAnnotation)
Returns all the fields of given class that have the desired annotation defined.
|
static boolean |
isEntity(Class<?> clazz)
Returns true if the class is annotated with
Entity annotation. |
public static boolean isEntity(Class<?> clazz)
Entity annotation.clazz - public static Annotations getJPAAnnotations(Class<?> clazz)
clazz - public static Annotations getJPAAnnotations(Field field)
field - public static Map<Field,Annotations> getJPAFields(Class<?> clazz)
clazz - public static Set<Field> getJPAFields(Class<?> clazz, Class<? extends Annotation> desiredAnnotation)
clazz - desiredAnnotation - Copyright © 2008-2013 Red Hat, Inc.. All Rights Reserved.