public class EntityIdPropertyResolver extends Object implements IdPropertyResolver
This class will use all the magic implemented in the other ID property resolvers to find out the ID property for an entity.
The order in which conditions are considered is:
After all the above are considered, if nothing is found, a NoIdPropertyException
is thrown to show that the promised ID property was not found on the entity class.
| Constructor and Description |
|---|
EntityIdPropertyResolver() |
| Modifier and Type | Method and Description |
|---|---|
String |
resolve(Class<?> entityType,
Class<? extends Serializable> idType)
Resolves the name of the ID property.
|
public String resolve(Class<?> entityType, Class<? extends Serializable> idType)
IdPropertyResolverresolve in interface IdPropertyResolverentityType - the type of the entity on which the key is definedidType - the expected type (or supertype) for the ID propertyCopyright © 2014–2016. All rights reserved.