|
CSVObjects Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.anupam.csv.mapping.CSVBeanMapping
public class CSVBeanMapping
Represents the CSV to Java Bean mapping for a single Java bean. Instances of this class store the bean name, the fully qualified class name, CSV header indicator, as well as individual CSV field mappings.
The bean name (which is user defined) acts as the name of the mapping as well, and is used for looking up or accessing the specificparsers
for this mapping.
CSVFieldMapping
Constructor Summary | |
---|---|
CSVBeanMapping()
Constructor for CSVBeanMapping. |
Method Summary | |
---|---|
void |
addFieldMapping(CSVFieldMapping fieldMapping)
Adds a new field mapping for this bean mapping. |
boolean |
equals(Object other)
Compares this bean mapping to another for equality. |
String |
getBeanClass()
Returns the mapped bean's fully qualified class name. |
String |
getBeanName()
Returns the user defined name of the mapped bean. |
int |
getMaxFieldPosition()
Returns the maximum (i.e. highest) field position present in this bean mapping. |
int |
hashCode()
Returns the hash code for this bean mapping. |
boolean |
isCsvHeaderPresent()
Indicates whether a header row is present in the CSV mapping. |
Iterator<CSVFieldMapping> |
iterator()
Provides an iterator over the CSV field mappings present in this bean mapping. |
void |
setBeanClass(String beanClass)
Sets the mapped bean's fully qualified class name. |
void |
setBeanName(String beanName)
Sets the mapped bean's user defined name. |
void |
setCsvHeaderPresent(boolean csvHeaderPresent)
Sets the flag which indicates whether a header row is present in the mapped CSV file or stream. |
String |
toString()
Dumps content of the bean mapping. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CSVBeanMapping()
Method Detail |
---|
public int hashCode()
hashCode
in class Object
public boolean equals(Object other)
equals
in class Object
other
- the other bean mapping to compare against
true
if equal, false
otherwisepublic String toString()
toString
in class Object
Object.toString()
public Iterator<CSVFieldMapping> iterator()
iterator
in interface Iterable<CSVFieldMapping>
Iterable.iterator()
public String getBeanClass()
public void setBeanClass(String beanClass)
beanClass
- The mapped bean's class namepublic String getBeanName()
public void setBeanName(String beanName)
beanName
- The mapped bean's user defined namepublic void addFieldMapping(CSVFieldMapping fieldMapping)
fieldMapping
- the field mapping to addpublic int getMaxFieldPosition()
public boolean isCsvHeaderPresent()
true
if the mapped CSV file or stream has a headerpublic void setCsvHeaderPresent(boolean csvHeaderPresent)
csvHeaderPresent
- The flag value to set
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |