|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.samples.petclinic.util.EntityUtils
public abstract class EntityUtils
Utility methods for handling entities. Separate from the BaseEntity class mainly because of dependency on the ORM-associated ObjectRetrievalFailureException.
BaseEntity| Constructor Summary | |
|---|---|
EntityUtils()
|
|
| Method Summary | ||
|---|---|---|
static
|
getById(java.util.Collection<T> entities,
java.lang.Class<T> entityClass,
int entityId)
Look up the entity of the given class with the given id in the given collection. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EntityUtils()
| Method Detail |
|---|
public static <T extends BaseEntity> T getById(java.util.Collection<T> entities,
java.lang.Class<T> entityClass,
int entityId)
throws org.springframework.orm.ObjectRetrievalFailureException
entities - the collection to searchentityClass - the entity class to look upentityId - the entity id to look up
org.springframework.orm.ObjectRetrievalFailureException - if the entity was not found
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||