com.j256.ormlite.android
Class DatabaseTableConfigUtil
java.lang.Object
com.j256.ormlite.android.DatabaseTableConfigUtil
public class DatabaseTableConfigUtil
- extends Object
Class which uses reflection to make the job of processing the DatabaseField
annotation more efficient. In
current (as of 11/2011) versions of Android, Annotations are ghastly slow. This uses reflection on the Android
classes to work around this issue. Gross and a hack but a significant (~20x) performance improvement.
Thanks much go to Josh Guilfoyle for the idea and the code framework to make this happen.
- Author:
- joshguilfoyle, graywatson
Method Summary |
static
<T> com.j256.ormlite.table.DatabaseTableConfig<T> |
|
fromClass(com.j256.ormlite.support.ConnectionSource connectionSource,
Class<T> clazz)
Build our list table config from a class using some annotation fu around. |
static int |
getWorkedC()
Return the number of fields configured using our reflection hack. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DatabaseTableConfigUtil
public DatabaseTableConfigUtil()
fromClass
public static <T> com.j256.ormlite.table.DatabaseTableConfig<T> fromClass(com.j256.ormlite.support.ConnectionSource connectionSource,
Class<T> clazz)
throws SQLException
- Build our list table config from a class using some annotation fu around.
- Throws:
SQLException
getWorkedC
public static int getWorkedC()
- Return the number of fields configured using our reflection hack. This is for testing.
This content is licensed by Gray Watson under the Creative Commons Attribution-Share Alike 3.0 License.