public abstract class AbstractFlatFilePropertySpecificationBase extends Object implements FlatFilePropertySpecification
| Modifier and Type | Field and Description | 
|---|---|
| protected String | dateFormat | 
| protected Class<? extends org.kuali.rice.core.web.format.Formatter> | formatterClass | 
| protected boolean | formatToTimestamp | 
| protected boolean | leftTrim | 
| protected String | propertyName | 
| protected boolean | rightTrim | 
| Constructor and Description | 
|---|
| AbstractFlatFilePropertySpecificationBase() | 
| Modifier and Type | Method and Description | 
|---|---|
| protected Object | getFormattedObject(String subString,
                                    Object parsedObject)This method returns the formatted object for the given string. | 
| protected org.kuali.rice.core.web.format.Formatter | getFormatter(Object parsedObject)Builds a formatter to format the parsed substring before it is set as a property on the business object | 
| protected Class<?> | getFormatterClass(Object parsedObject)Returns the formatter class to format the substring before it is set on the business object | 
| String | getPropertyName() | 
| void | setDateFormat(String dateFormat)If the substring represents a date, then this is the format used to parse that date; it should be
 compatible with java.text.SimpleDateFormat | 
| void | setFormatterClass(Class<? extends org.kuali.rice.core.web.format.Formatter> formatterClass)Sets the formatter class to use in this proprety specification | 
| void | setFormatToTimestamp(boolean formatToTimestamp)If the formatter for this class is a BatchDateFormatter, then the formatted Date should be in the form of a timestamp | 
| void | setLeftTrim(boolean leftTrim)Determines if the substring should have all whitepsace on the left removed before setting | 
| void | setProperty(String value,
                      Object businessObject,
                      int lineNumber)Sets the property on the business object | 
| void | setPropertyName(String propertyName)Sets the name of the property this property specification will target for filling in the business object to parse into | 
| void | setRightTrim(boolean rightTrim)Determines if the substring should have all whitespace on the right removed before setting | 
protected String propertyName
protected boolean rightTrim
protected boolean leftTrim
protected Class<? extends org.kuali.rice.core.web.format.Formatter> formatterClass
protected String dateFormat
protected boolean formatToTimestamp
public AbstractFlatFilePropertySpecificationBase()
public String getPropertyName()
getPropertyName in interface FlatFilePropertySpecificationpublic void setProperty(String value, Object businessObject, int lineNumber)
setProperty in interface FlatFilePropertySpecificationvalue - the substring of the parsed line to setbusinessObject - the business object to set the parsed line onlineNumber - the parsed line numberprotected Class<?> getFormatterClass(Object parsedObject)
parsedObject - the object that is being parsed intoprotected org.kuali.rice.core.web.format.Formatter getFormatter(Object parsedObject)
parsedObject - the business object to parse intopublic void setFormatterClass(Class<? extends org.kuali.rice.core.web.format.Formatter> formatterClass)
formatterClass - the class of the formatter to useprotected Object getFormattedObject(String subString, Object parsedObject)
subString - the parsed subStringthe - object to parse intopublic void setPropertyName(String propertyName)
propertyName - the name of the target propertypublic void setRightTrim(boolean rightTrim)
rightTrim - true if all whitespace on the right should be removed, false otherwisepublic void setLeftTrim(boolean leftTrim)
leftTrim - true if all whitespace on the left should be removed, false otherwisepublic void setDateFormat(String dateFormat)
dateFormat - the date format to utilizedpublic void setFormatToTimestamp(boolean formatToTimestamp)
formatToTimestamp - true if we should format to timestamp, false (the default) if we should notCopyright © 2004–2015 The Kuali Foundation. All rights reserved.