T - The Persistable to maintain.@Status(stage=DEVELOPMENT, unitTests=ABSENT) @Review(by="Kees Schotanus",at="2009-09-24") @Review(by="Kees Schotanus",at="2010-06-17",reason="Updated exception handling") public abstract class AbstractCrudControllerBean<T extends Persistable> extends Object
| Constructor and Description |
|---|
AbstractCrudControllerBean() |
| Modifier and Type | Method and Description |
|---|---|
T |
findById(Long id)
Finds an Entity with the supplied id.
|
javax.persistence.EntityManager |
getEntityManager()
Gets the Entity Manager.
|
abstract Class<T> |
getItemType()
Gets the type of the Entity to maintain.
|
T |
merge(T entity)
Merges the supplied entity.
|
void |
persist(T entity)
Persists the supplied entity.
|
void |
remove(T entity)
Removes the Entity with the supplied id.
|
public abstract Class<T> getItemType()
public javax.persistence.EntityManager getEntityManager()
public void persist(T entity)
entity - The Entity to persist.NullPointerException - When the supplied entity is null.javax.persistence.PersistenceException - When the persist operation
failed.public T merge(T entity)
entity - The Entity to merge.NullPointerException - When the supplied entity is null.javax.persistence.PersistenceException - when the merge operation
failed.public void remove(T entity)
entity - The Entity to remove.NullPointerException - When the supplied entity is null.javax.persistence.PersistenceException - when the remove operation
failed.public T findById(Long id)
id - The ID of the Entity to find.NullPointerException - When the supplied id is null.Copyright © 2008–2017. All rights reserved.