public class CustomEntityProvider extends Object implements ExternalTypeProvider
Constructor and Description |
---|
CustomEntityProvider() |
Modifier and Type | Method and Description |
---|---|
<T> T |
create(RecordType type,
Class<T> entityClass,
Map<String,Object> javaValues)
Creates entity.
|
<T> void |
delete(Class<T> entityClass,
Object id) |
void |
delete(Object entity) |
<T> T |
find(Class<T> entityClass,
Object id)
Returns entity.
|
<T> Collection<T> |
findAll(Class<T> entityClass) |
<T> List<T> |
findAll(Class<T> entityClass,
List<Object> ids) |
protected Field |
getField(Class<?> cls,
String name)
returns field from class or super-classes.
|
<T> T |
update(T entity) |
public <T> T create(RecordType type, Class<T> entityClass, Map<String,Object> javaValues)
ExternalTypeProvider
create
in interface ExternalTypeProvider
protected Field getField(Class<?> cls, String name) throws SecurityException, NoSuchFieldException
cls
- name
- SecurityException
NoSuchFieldException
public <T> T find(Class<T> entityClass, Object id)
ExternalTypeProvider
find
in interface ExternalTypeProvider
public <T> List<T> findAll(Class<T> entityClass, List<Object> ids)
findAll
in interface ExternalTypeProvider
public <T> Collection<T> findAll(Class<T> entityClass)
findAll
in interface ExternalTypeProvider
public <T> T update(T entity)
update
in interface ExternalTypeProvider
public void delete(Object entity)
delete
in interface ExternalTypeProvider
public <T> void delete(Class<T> entityClass, Object id)
delete
in interface ExternalTypeProvider
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.