@Singleton @Named public class ValueConverterEtoToEntity extends AbstractValueConverterToSimilarPojo<EntityTo,PersistenceEntity>
AbstractValueConverterToCompatiblePojo for conversion from ETO to
PersistenceEntity.| Constructor and Description |
|---|
ValueConverterEtoToEntity()
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Class<EntityTo> |
getSourceType()
This the type of the value accepted by this converter.
|
Class<PersistenceEntity> |
getTargetType()
Is the guaranteed return-type of the
conversion. |
protected void |
handleNoGetterForSetter(PojoPropertyAccessorOneArg setter,
Class<?> targetClass,
Object sourceObject,
Class<?> sourceClass)
Called if the target object of the conversion has a setter that has no corresponding getter in the source
object to convert.
|
convert, doInitialize, getPojoDescriptorBuilder, getPojoDescriptorBuilderFactory, setPojoDescriptorBuilder, setPojoDescriptorBuilderFactory, setPojoFactorygetComposedValueConverter, setComposedValueConverterconvert, getReflectionUtil, setReflectionUtilcreateLogger, getLoggerdoInitialized, getInitializationState, initializepublic Class<EntityTo> getSourceType()
ValueConverterObject if you want to accept any
value. A very common source-type is String.public Class<PersistenceEntity> getTargetType()
ValueConverterconversion. This
information is used externally to choose the most specific ValueConverter that is
appropriate for the conversion. Object as target-type while a specific
converter may have Collection as target-type. Now if an object
(compliant with the source-type) needs to be converted to a
Collection or List, the specific converter is used while for other
objects the generic converter is chosen. target-type is often more general than the actual
returned result. So a ValueConverter that converts
a comma-separated String to an ArrayList will typically declare
List as target-type.protected void handleNoGetterForSetter(PojoPropertyAccessorOneArg setter, Class<?> targetClass, Object sourceObject, Class<?> sourceClass)
AbstractValueConverterToCompatiblePojohandleNoGetterForSetter in class AbstractValueConverterToSimilarPojo<EntityTo,PersistenceEntity>setter - is the existing setter.targetClass - is the Class reflecting the target object to convert to.sourceObject - is the source object to convert that has no corresponding getter.sourceClass - is the Class reflecting the source object.Copyright © 2001–2016 mmm-Team. All rights reserved.