@Component class JpaEntityConverter extends Object implements org.springframework.core.convert.converter.ConditionalGenericConverter
Converter
that can convert String
s into JPA managed domain types. We expect the identifier types to
have a constructor that takes a String
as arguments.Constructor and Description |
---|
JpaEntityConverter(SalespointIdentifierConverter identifierConverter,
javax.persistence.EntityManager em)
Creates a new
JpaEntityConverter using the given SalespointIdentifierConverter . |
Modifier and Type | Method and Description |
---|---|
Object |
convert(Object source,
org.springframework.core.convert.TypeDescriptor sourceType,
org.springframework.core.convert.TypeDescriptor targetType) |
Set<org.springframework.core.convert.converter.GenericConverter.ConvertiblePair> |
getConvertibleTypes() |
boolean |
matches(org.springframework.core.convert.TypeDescriptor sourceType,
org.springframework.core.convert.TypeDescriptor targetType) |
@Autowired public JpaEntityConverter(SalespointIdentifierConverter identifierConverter, javax.persistence.EntityManager em)
JpaEntityConverter
using the given SalespointIdentifierConverter
.identifierConverter
- must not be null.em
- must not be null.public Set<org.springframework.core.convert.converter.GenericConverter.ConvertiblePair> getConvertibleTypes()
getConvertibleTypes
in interface org.springframework.core.convert.converter.GenericConverter
public boolean matches(org.springframework.core.convert.TypeDescriptor sourceType, org.springframework.core.convert.TypeDescriptor targetType)
matches
in interface org.springframework.core.convert.converter.ConditionalConverter
Copyright © 2014 Pivotal Software, Inc.. All rights reserved.