public class JPAModelLoader extends Object implements Model.Factory
| Constructor and Description |
|---|
JPAModelLoader(Class<? extends Model> clazz) |
| Modifier and Type | Method and Description |
|---|---|
Long |
count(List<String> searchFields,
String keywords,
String where) |
void |
deleteAll() |
List<Model> |
fetch(int offset,
int size,
String orderBy,
String order,
List<String> searchFields,
String keywords,
String where)
Retrieve a list of result
|
Model |
findById(Object id)
Find object by ID
|
static Set<Field> |
getModelFields(Class<?> clazz) |
String |
keyName() |
String[] |
keyNames() |
Class<?> |
keyType() |
Class<?>[] |
keyTypes() |
Object |
keyValue(Model m) |
List<Model.Property> |
listProperties()
List of all properties
|
public Model findById(Object id)
findById in interface Model.Factoryid - : the id of the entitypublic List<Model> fetch(int offset, int size, String orderBy, String order, List<String> searchFields, String keywords, String where)
fetch in interface Model.Factoryoffset - position of the first result, numbered from 0size - maximum number of results to retrieveorderBy - Order by fieldorder - Sorting ordersearchFields - (page length)keywords - (page length)where - (page length)public Long count(List<String> searchFields, String keywords, String where)
count in interface Model.Factorypublic void deleteAll()
deleteAll in interface Model.Factorypublic List<Model.Property> listProperties()
listProperties in interface Model.Factorypublic String keyName()
keyName in interface Model.Factorypublic Class<?> keyType()
keyType in interface Model.Factorypublic Class<?>[] keyTypes()
public String[] keyNames()
public Object keyValue(Model m)
keyValue in interface Model.FactoryGuillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly