public class ConvertEmptyOrBlankStringsToNull extends Object implements StringProcessor
A sample of this can be found in the unit test ProcessorTestBean and is annotated as follows.
@PreAssignmentProcessor(processor = ConvertEmptyOrBlankStringsToNull.class) @CsvBindByName(column = "name") private String beanName;
Constructor and Description |
---|
ConvertEmptyOrBlankStringsToNull()
Default Constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
processString(String value)
Method that contains the code that will transform a string into the
value that will be validated and converted into the bean field.
|
void |
setParameterString(String value)
This method is unused in this implementation as we are converting to null.
|
public ConvertEmptyOrBlankStringsToNull()
public String processString(String value)
StringProcessor
processString
in interface StringProcessor
value
- String
to be processedString
public void setParameterString(String value)
setParameterString
in interface StringProcessor
value
- Information used by the processor to process the stringCopyright © 2005–2023. All rights reserved.