Interface Creator<P,E>

Type Parameters:
P - the type of the parent of the entity to create (if entity has no parent then used the Void type).
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
    create(TopiaContext tx, P parent, E from)
    Perform the creation of an entity.
  • Method Details

    • create

      E create(TopiaContext tx, P parent, E from) throws TopiaException
      Perform the creation of an entity. The given from entity 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 transaction
      parent - the parent of the entity
      from - the entity to create
      Returns:
      the really created entity in database
      Throws:
      TopiaException - if any db problem.