Class EntityIdentifierConverter
- java.lang.Object
-
- org.silverpeas.core.persistence.datasource.model.EntityIdentifierConverter
-
public class EntityIdentifierConverter extends Object
- Author:
- mmoquillon
-
-
Constructor Summary
Constructors Constructor Description EntityIdentifierConverter(Class<? extends EntityIdentifier> entityIdentifierClass)
Constructs a converter of identities with the specified class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends EntityIdentifier>
TconvertToEntityIdentifier(String idAsString)
Converts the given String id into the right entity identifier.<T extends EntityIdentifier>
Collection<T>convertToEntityIdentifiers(String... idsAsString)
Converts the given String ids into the right entity identifiers.<T extends EntityIdentifier>
Collection<T>convertToEntityIdentifiers(Collection<String> idsAsString)
Converts the given String ids into the right entity identifiers.
-
-
-
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 EntityIdentifier> Collection<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 EntityIdentifier> Collection<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.
-
-