Interface IdentityService


  • public interface IdentityService
    IdentityService provides the ability to generate an identity using an IdentityGenerator and inject it in the specified entity.
    See Also:
    IdentityGenerator
    • 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.