Interface Creator<P,E>
- Type Parameters:
P- the type of the parent of the entity to create (if entity has no parent then used theVoidtype).E- the type of entity to create
public interface Creator<P,E>
A simple contract to hook the creation phase of an entity associated (or not!) to
a parent entity.
- Author:
- tchemit <chemit@codelutin.com>
-
Method Summary
Modifier and Type Method Description Ecreate(TopiaContext tx, P parent, E from)Perform the creation of an entity.
-
Method Details
-
create
Perform the creation of an entity. The givenfromentity should not have already been created in database ? it should only be here to prepare the creation of the entity. TODO Review this explanation :)- Parameters:
tx- the current available transactionparent- the parent of the entityfrom- the entity to create- Returns:
- the really created entity in database
- Throws:
TopiaException- if any db problem.
-