public interface CrudControllerRemote
CrudControllerBean
.Modifier and Type | Method and Description |
---|---|
<T> T |
findById(Class<T> type,
Number primaryKey)
Finds a persisted entity by its primary key.
|
<T> List<T> |
findByNamedQuery(Class<T> type,
String queryName,
Map<String,Object> queryParameters)
Finds entities using a named query with the supplied queryName.
|
<T> T |
merge(T entity)
Merges the supplied entity with the persisted state of the supplied entity.
|
<T> T |
persist(T entity)
Persists (creates) the supplied entity.
|
<T> void |
remove(Class<T> type,
Number primaryKey)
Removes a previously persisted entity.
|
String |
testRemote()
Simple test method to verify this controller works using a remote call.
|
String testRemote()
<T> T persist(T entity)
T
- The type of entity to persist.entity
- The entity to persist.NullPointerException
- When the supplied entity is null.<T> T findById(Class<T> type, Number primaryKey)
T
- The type of the entity to find.type
- The class type of the entity to find.primaryKey
- The primary key of the entity to find.NullPointerException
- When either the supplied type or the supplied primaryKey is null.<T> T merge(T entity)
T
- The type of the entity to merge.entity
- The entity to merge.NullPointerException
- When the supplied entity is null.<T> void remove(Class<T> type, Number primaryKey)
T
- The type of the entity to remove.type
- The class type of the entity to remove.primaryKey
- The primary key of the entity to remove.NullPointerException
- When either the supplied type or primaryKey is null.<T> List<T> findByNamedQuery(Class<T> type, String queryName, Map<String,Object> queryParameters)
T
- The type of the entities to find.type
- The class type of the entities to find.queryName
- Name of the named query.queryParameters
- Query parameters of the named query or null when no query parameters exist.NullPointerException
- When the supplied type is null.Copyright © 2008–2018. All rights reserved.