|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
T - type of the object the DAO works with.public interface PersistenceManager<T>
Generic interface with basic DAO methods for objects of type <T>.
| Method Summary | ||
|---|---|---|
|
copy(T entity,
PersistenceContext persistenceContext)
Copies an entity and the entire tree of its children. |
|
T |
create(T entity,
PersistenceContext context)
Persist the given instance to the repository and return the persisted version. |
|
void |
delete(T entity,
PersistenceContext context)
Delete entity from the persistent storage. |
|
T |
find(WmId id,
PersistenceContext context)
Find one instance, with the given ID. |
|
java.util.Set<T> |
getAll(PersistenceContext context)
Get all entities served by the given PM and stored under it's node. |
|
void |
removeProperty(T entity,
java.lang.String property,
PersistenceContext context)
Remove the property from the persistent image of the given entity. |
|
void |
save(T entity,
PersistenceContext context)
Save/update persisted entity. |
|
| Method Detail |
|---|
T find(WmId id,
PersistenceContext context)
id - ID to use for lookup.context - persistence context.
null.
T create(T entity,
PersistenceContext context)
entity - entity to be created in persistent storage.context - persistence context holding session.
<T> T copy(T entity,
PersistenceContext persistenceContext)
entity - entity to be copied in persistent storage.context - persistence context holding session.
void delete(T entity,
PersistenceContext context)
throws DomainException
entity - entity to be deleted.context - persistence context.
DomainException - if the entity does not exist.
void save(T entity,
PersistenceContext context)
throws DomainException
entity - entity to be saved.context - persistence context.
DomainException - in case of entity not being properly set or repository
problems.java.util.Set<T> getAll(PersistenceContext context)
context - persistence context.
void removeProperty(T entity,
java.lang.String property,
PersistenceContext context)
throws DomainException
entity - entity for property removal.property - name of the property to remove.context - persistence context for this operation.
DomainException - in case entity has no persistent image.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||