public class Utilities extends Object
| Constructor | Description |
|---|---|
Utilities() |
| Modifier and Type | Method | Description |
|---|---|---|
static <T extends BaseEntity> |
getAllFields(T instance) |
|
static <T extends BaseEntity> |
getAllFields(T instance,
boolean includeForeignKeys) |
|
static <T extends BaseEntity> |
getAllFields(T instance,
Class<?> delimiter) |
|
static <T extends BaseEntity> |
getAllFields(T instance,
Class<?> delimiter,
boolean includeForeignKeys) |
Gets all fields of an entity including all base classes.
|
static void |
log(Object text) |
Prints messages to the query, while considering the
LOG_QUERIES constant. |
static void |
logf(String text,
Object... params) |
Prints formatted messages to the query, while considering the
LOG_QUERIES constant. |
public static <T extends BaseEntity> ArrayList<Field> getAllFields(T instance)
public static <T extends BaseEntity> ArrayList<Field> getAllFields(T instance, boolean includeForeignKeys)
public static <T extends BaseEntity> ArrayList<Field> getAllFields(T instance, Class<?> delimiter)
public static <T extends BaseEntity> ArrayList<Field> getAllFields(T instance, Class<?> delimiter, boolean includeForeignKeys)
T - The type of the entity.instance - The instance to get the fields of.delimiter - Up to which parent class to go to.includeForeignKeys - Decides if to include foreign key objects in this list, since they do not exist on the database.public static void log(Object text)
LOG_QUERIES constant.text - The message to print.Copyright © 2018. All rights reserved.