Class EntityIdentifierConverter


  • public class EntityIdentifierConverter
    extends Object
    Author:
    mmoquillon
    • Constructor Detail

      • EntityIdentifierConverter

        public EntityIdentifierConverter​(Class<? extends EntityIdentifier> entityIdentifierClass)
        Constructs a converter of identities with the specified class.
        Parameters:
        entityIdentifierClass - the class of the identities to convert.
    • Method Detail

      • convertToEntityIdentifier

        public <T extends EntityIdentifier> T convertToEntityIdentifier​(String idAsString)
        Converts the given String id into the right entity identifier.
        Type Parameters:
        T - the concrete type of the entity identifier.
        Parameters:
        idAsString - the String representation of the identifier.
        Returns:
        the entity identifier from its String representation.
      • convertToEntityIdentifiers

        public <T extends EntityIdentifierCollection<T> convertToEntityIdentifiers​(String... idsAsString)
        Converts the given String ids into the right entity identifiers.
        Type Parameters:
        T - the concrete type of the entity identifier.
        Parameters:
        idsAsString - one or more identifier as String value(s).
        Returns:
        a collection of entity identifiers from their String representations.
      • convertToEntityIdentifiers

        public <T extends EntityIdentifierCollection<T> convertToEntityIdentifiers​(Collection<String> idsAsString)
        Converts the given String ids into the right entity identifiers.
        Type Parameters:
        T - the concrete type of the entity identifier.
        Parameters:
        idsAsString - a collection of identifiers as String values.
        Returns:
        a collection of the entity identifiers from their String representations.