EntityUtils.java⚓︎
Overview⚓︎
The EntityUtils.java file contains utility methods for handling entities in a software project. It is separate from the BaseEntity class due to its dependency on the ORM-associated ObjectRetrievalFailureException. This file provides a method to look up an entity of a given class with a given id in a collection.
Table of Contents⚓︎
Prerequisites⚓︎
There are no specific dependencies or prerequisites required to use this file.
Usage⚓︎
To utilize the EntityUtils class in a project, it can be instantiated and used to look up entities in a collection using the provided method.
Collection<BaseEntity> entities = // populate collection with entities
EntityUtils.getById(entities, BaseEntity.class, entityId);
Methods⚓︎
getById⚓︎
public static <T extends BaseEntity> T getById(Collection<T> entities, Class<T> entityClass, int entityId)
throws ObjectRetrievalFailureException
Useful details⚓︎
- Version: 29.10.2003
- Frameworks: Spring Framework
- Dependencies: Spring ORM, ObjectRetrievalFailureException