public class KittyModelCVFactory
extends java.lang.Object
Cursor.getColumnIndex(String) and instead
of them use faster allocation method of those indexes.
Created by akaish on 07.09.18.| Modifier and Type | Field and Description |
|---|---|
static int |
ROWID_INDEX |
| Constructor and Description |
|---|
KittyModelCVFactory(KittyTableConfiguration tableConfiguration) |
| Modifier and Type | Method and Description |
|---|---|
<M extends KittyModel> |
cursorToModel(android.database.Cursor cursor,
M model,
boolean rowidOn)
Sets fields of provided instance of
KittyModel (modelClass) with values from provided Cursor according to
provided with this instance's KITTY_COLUMN annotations data wrapped into KittyColumnConfiguration instance. |
void |
resetIndexesOnRowidSupportChange(boolean rowidOn) |
public static final int ROWID_INDEX
public KittyModelCVFactory(KittyTableConfiguration tableConfiguration)
public void resetIndexesOnRowidSupportChange(boolean rowidOn)
public <M extends KittyModel> M cursorToModel(android.database.Cursor cursor, M model, boolean rowidOn) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException, java.lang.reflect.InvocationTargetException, java.lang.NoSuchMethodException
KittyModel (modelClass) with values from provided Cursor according to
provided with this instance's KITTY_COLUMN annotations data wrapped into KittyColumnConfiguration instance.
Also may throw some exceptions related with reflection access to
field of provided modelClass and KittyRuntimeException if there are some errors with KITTY_COLUMN implementation.M - cursor - cursor to readmodel - blank modelClass to filljava.lang.IllegalAccessExceptionjava.lang.IllegalArgumentExceptionjava.lang.reflect.InvocationTargetExceptionjava.lang.NoSuchMethodException