For this converter to match, the finder method must be static, have the signature
find[EntityName]([IdType]), and return an instance of the desired entity type.
| Modifier and Type | Field and Description |
|---|---|
| private final ConversionService |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Object | convert(Object
the source object to convert (may be source, TypeDescriptor null)the type descriptor of the field we are converting from sourceType, TypeDescriptor the type descriptor of the field we are converting to targetType)Implements org. TypeDescriptor.
|
| public Set | getConvertibleTypes()
Implements org. |
| private String | |
| private Method | |
| public boolean | matches(TypeDescriptor
the type descriptor of the field we are converting from sourceType, TypeDescriptor the type descriptor of the field we are converting to targetType)Implements org. sourceType to targetType currently under
consideration be selected?
|
| conversionService | back to summary |
|---|---|
| private final ConversionService conversionService | |
| IdToEntityConverter | back to summary |
|---|---|
| public IdToEntityConverter(ConversionService conversionService) | |
| convert | back to summary |
|---|---|
| public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) Implements org. Doc from org. Convert the source object to the targetType described by the
| |
| getConvertibleTypes | back to summary |
|---|---|
| public Set Implements org. Doc from org. Return the source and target types that this converter can convert between. Each entry is a convertible source-to-target type pair. For
| |
| getEntityName | back to summary |
|---|---|
| private String getEntityName(Class<?> entityClass) | |
| getFinder | back to summary |
|---|---|
private Method getFinder(Class<?> entityClass)
| |
| matches | back to summary |
|---|---|
| public boolean matches(TypeDescriptor sourceType, TypeDescriptor targetType) Implements org. Doc from org. Should the conversion from
| |