Package org.seedstack.business.domain
Interface IdentityService
-
public interface IdentityServiceIdentityService provides the ability to generate an identity using anIdentityGeneratorand inject it in the specified entity.- See Also:
IdentityGenerator
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <E extends Entity<I>,I>
Eidentify(E entity)Identifies the given entity.
-
-
-
Method Detail
-
identify
<E extends Entity<I>,I> E identify(E entity) throws IdentityExistsException
Identifies the given entity.- Type Parameters:
E- the entity type.I- the entity key type.- Parameters:
entity- the entity to identify.- Returns:
- the identified entity.
- Throws:
IdentityExistsException- if the entity already has an identity.
-
-