com.projectnine.csvmapper
Class CsvMappingDefinition

java.lang.Object
  extended by com.projectnine.csvmapper.CsvMappingDefinition

public class CsvMappingDefinition
extends java.lang.Object

This class is a simple construct for holding a List of CsvFieldMappings and generating new instances of the Class that the CSV record is declared to represent.

Author:
robweber

Constructor Summary
CsvMappingDefinition()
           
 
Method Summary
 java.lang.String getBeanVariableName()
           
 int getExpectedNumberOfFields()
           
 java.util.Map<java.lang.String,java.lang.String> getExtendedContext()
           
 java.util.List<CsvFieldMapping> getFieldMappings()
          Get the list of CsvFieldMappings.
 java.lang.Object getNewBeanInstance()
          Get a new instance of the Class represented by beanClassName.
 void setBeanClassName(java.lang.String beanClassName)
           
 void setBeanVariableName(java.lang.String beanVariableName)
           
 void setExpectedNumberOfFields(int expectedNumberOfFields)
           
 void setExtendedContext(java.util.Map<java.lang.String,java.lang.String> extendedContext)
           
 void setFieldMappings(java.util.List<CsvFieldMapping> fieldMappings)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CsvMappingDefinition

public CsvMappingDefinition()
Method Detail

getNewBeanInstance

public java.lang.Object getNewBeanInstance()
Get a new instance of the Class represented by beanClassName. This method assumes that the default constructor is defined for the class represented by beanClassName.

Returns:

getFieldMappings

public java.util.List<CsvFieldMapping> getFieldMappings()
Get the list of CsvFieldMappings.

Returns:

setFieldMappings

public void setFieldMappings(java.util.List<CsvFieldMapping> fieldMappings)
Parameters:
fieldMappings - the fieldMappings to set

setBeanClassName

public void setBeanClassName(java.lang.String beanClassName)
Parameters:
beanClassName - the beanClassName to set

setExpectedNumberOfFields

public void setExpectedNumberOfFields(int expectedNumberOfFields)
Parameters:
expectedNumberOfFields - the expectedNumberOfFields to set

getExpectedNumberOfFields

public int getExpectedNumberOfFields()
Returns:
the expectedNumberOfFields

getBeanVariableName

public java.lang.String getBeanVariableName()
Returns:
the beanVariableName

setBeanVariableName

public void setBeanVariableName(java.lang.String beanVariableName)
Parameters:
beanVariableName - the beanVariableName to set

getExtendedContext

public java.util.Map<java.lang.String,java.lang.String> getExtendedContext()
Returns:
the perLinePreProcessingInstructions

setExtendedContext

public void setExtendedContext(java.util.Map<java.lang.String,java.lang.String> extendedContext)
Parameters:
perLinePreProcessingInstructions - the perLinePreProcessingInstructions to set


Copyright © 2008. All Rights Reserved.