com.j256.ormlite.misc
Class JavaxPersistence

java.lang.Object
  extended by com.j256.ormlite.misc.JavaxPersistence

public class JavaxPersistence
extends Object

Class for isolating the detection of the javax.persistence annotations. This used to be a hard dependency but it has become optinal/test since we use reflection here.

Author:
graywatson

Constructor Summary
JavaxPersistence()
           
 
Method Summary
static DatabaseFieldConfig createFieldConfig(DatabaseType databaseType, Field field)
          Create a field config from the javax.persistence annotations associated with the field argument.
static String getEntityName(Class<?> clazz)
          Return the javax.persistence.Entity annotation name for the class argument or null if none or if there was no entity name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaxPersistence

public JavaxPersistence()
Method Detail

createFieldConfig

public static DatabaseFieldConfig createFieldConfig(DatabaseType databaseType,
                                                    Field field)
                                             throws SQLException
Create a field config from the javax.persistence annotations associated with the field argument. Returns null if none.

Throws:
SQLException

getEntityName

public static String getEntityName(Class<?> clazz)
Return the javax.persistence.Entity annotation name for the class argument or null if none or if there was no entity name.



Copyright © 2011. All Rights Reserved.