|
CSVObjects Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.anupam.csv.mapping.CSVFieldMapping
public class CSVFieldMapping
Represents a single CSV field to Java Bean attribute mapping. The mapping can be for basic data types, or point to other referenced CSV bean mappings for representing nested beans.
CSVBeanMapping
Constructor Summary | |
---|---|
CSVFieldMapping()
Constructor for CSVFieldMapping. |
Method Summary | |
---|---|
int |
compareTo(CSVFieldMapping other)
Compares this field mapping to another mapping. |
boolean |
equals(Object other)
Compares this field mapping with another for equality. |
String |
getAttributeName()
Returns the mapped POJO bean's attribute name corresponding to this field. |
CSVBeanMapping |
getBeanReference()
Returns the referenced bean mapping, if one is present. |
String |
getBeanReferenceName()
Returns the declarative name of the referenced bean mapping for this field, or null if no bean mapping if referenced by this field. |
String |
getFieldName()
Returns the user defined name of this field. |
int |
getFieldPosition()
Returns this field's position in the CSV line. |
String |
getFieldType()
Returns the fully qualified Java type name of this field. |
CSVFieldFormatter |
getFormatter()
Returns the CSV formatter attached to this field. |
String |
getReformatterName()
Returns the declarative name of the formatter attached to this field. |
int |
hashCode()
Returns the hash code for this field mapping. |
void |
setAttributeName(String attributeName)
Sets the mapped POJO's attribute name corresponding to this field. |
void |
setBeanReference(CSVBeanMapping beanReference)
Sets the referenced bean mapping for this field. |
void |
setBeanReferenceName(String beanReferenceName)
Sets the declarative name of a referenced bean mapping for this field. |
void |
setFieldName(String fieldName)
Sets the user defined name of this field. |
void |
setFieldPosition(int fieldPosition)
Sets this field's position in the CSV line. |
void |
setFieldType(String fieldType)
Sets the fully qualified Java type name of this field. |
void |
setFormatter(CSVFieldFormatter formatter)
Sets the formatter attached to this field. |
void |
setReformatterName(String reformatterName)
Sets the declarative name of the formatter attached to this field. |
String |
toString()
Dumps the contents of this field mapping as a string. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CSVFieldMapping()
Method Detail |
---|
public int hashCode()
hashCode
in class Object
Object.hashCode()
public boolean equals(Object other)
equals
in class Object
other
- the other field mapping to compare against
true
if equal, false
otherwiseObject.equals(Object)
public String toString()
toString
in class Object
Object.toString()
public int compareTo(CSVFieldMapping other)
compareTo
in interface Comparable<CSVFieldMapping>
other
- the other field mapping to compare to
0
if the two field mappings are equal, -1
if this
field mapping position is less than the other's, and +1
if this field mapping
position is higher than the others.Comparable.compareTo(T)
public String getAttributeName()
public void setAttributeName(String attributeName)
attributeName
- The mapped POJO' attribute namepublic String getFieldName()
public void setFieldName(String fieldName)
fieldName
- The name of this fieldpublic int getFieldPosition()
public void setFieldPosition(int fieldPosition)
fieldPosition
- The field's position in the CSV linepublic String getFieldType()
public void setFieldType(String fieldType)
fieldType
- The Java type name of this fieldpublic CSVFieldFormatter getFormatter()
public void setFormatter(CSVFieldFormatter formatter)
formatter
- The formatter to setpublic String getReformatterName()
public void setReformatterName(String reformatterName)
reformatterName
- The declarative formatter name to setpublic String getBeanReferenceName()
null
if no bean mapping if referenced by this field.
public void setBeanReferenceName(String beanReferenceName)
beanReferenceName
- The declarative name of the referenced beanpublic void setBeanReference(CSVBeanMapping beanReference)
beanReference
- The bean mapping reference to setpublic CSVBeanMapping getBeanReference()
null
if this field does not have any bean reference.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |