Package org.nuiton.topia.persistence
Class TopiaEntities
java.lang.Object
org.nuiton.topia.persistence.TopiaEntities
Utility class that provides useful methods for
TopiaEntity manipulation.- Since:
- 3.0
- Author:
- Brendan Le Ny : leny@codelutin.com, Arnaud Thimel (Code Lutin)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <E extends TopiaEntity>
com.google.common.base.Predicate<E>entityHasId(String id) static <E extends TopiaEntity>
EfindByTopiaId(Iterable<E> entities, String id) static <E extends TopiaEntity>
com.google.common.base.Function<E,String> Function to obtainTopiaEntity.getTopiaId()from any entity.
-
Constructor Details
-
TopiaEntities
public TopiaEntities()
-
-
Method Details
-
entityHasId
- Type Parameters:
E- type of entity- Parameters:
id- the expected topiaId- Returns:
- the created Predicate
-
findByTopiaId
- Type Parameters:
E- the type ofTopiaEntityof the given Iterable- Parameters:
entities- theIterableinstance to iterate throughid- the expectedtopiaId- Returns:
- the found
TopiaEntityor null
-
getTopiaIdFunction
public static <E extends TopiaEntity> com.google.common.base.Function<E,String> getTopiaIdFunction()Function to obtainTopiaEntity.getTopiaId()from any entity.- Type Parameters:
E- type of entity- Returns:
- FIXME
- Since:
- 2.6.12
-