Java Doc for CSVFieldMapping.java in  » Development » CSVObjects » net » sf » anupam » csv » mapping » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Development » CSVObjects » net.sf.anupam.csv.mapping 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   net.sf.anupam.csv.mapping.CSVFieldMapping

CSVFieldMapping
public class CSVFieldMapping implements Comparable<CSVFieldMapping>(Code)
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.
author:
   Anupam Sengupta
version:
   $Revision: 1.3 $
See Also:   CSVBeanMapping
since:
   1.5



Constructor Summary
public  CSVFieldMapping()
     Constructor for CSVFieldMapping.

Method Summary
public  intcompareTo(CSVFieldMapping other)
     Compares this field mapping to another mapping.
public  booleanequals(Object other)
     Compares this field mapping with another for equality.
public  StringgetAttributeName()
     Returns the mapped POJO bean's attribute name corresponding to this field.
public  CSVBeanMappinggetBeanReference()
     Returns the referenced bean mapping, if one is present.
public  StringgetBeanReferenceName()
     Returns the declarative name of the referenced bean mapping for this field, or null if no bean mapping if referenced by this field.
public  StringgetFieldName()
     Returns the user defined name of this field.
public  intgetFieldPosition()
     Returns this field's position in the CSV line.
public  StringgetFieldType()
     Returns the fully qualified Java type name of this field.
public  CSVFieldFormattergetFormatter()
     Returns the CSV formatter attached to this field.
public  StringgetReformatterName()
     Returns the declarative name of the formatter attached to this field.
public  inthashCode()
     Returns the hash code for this field mapping.
public  voidsetAttributeName(String attributeName)
     Sets the mapped POJO's attribute name corresponding to this field.
public  voidsetBeanReference(CSVBeanMapping beanReference)
     Sets the referenced bean mapping for this field.
public  voidsetBeanReferenceName(String beanReferenceName)
     Sets the declarative name of a referenced bean mapping for this field.
public  voidsetFieldName(String fieldName)
     Sets the user defined name of this field.
public  voidsetFieldPosition(int fieldPosition)
     Sets this field's position in the CSV line.
public  voidsetFieldType(String fieldType)
     Sets the fully qualified Java type name of this field.
public  voidsetFormatter(CSVFieldFormatter formatter)
     Sets the formatter attached to this field.
public  voidsetReformatterName(String reformatterName)
     Sets the declarative name of the formatter attached to this field.
public  StringtoString()
     Dumps the contents of this field mapping as a string.


Constructor Detail
CSVFieldMapping
public CSVFieldMapping()(Code)
Constructor for CSVFieldMapping.




Method Detail
compareTo
public int compareTo(CSVFieldMapping other)(Code)
Compares this field mapping to another mapping. The comparision is based on the field position.
Parameters:
  other - the other field mapping to compare to 0 if the two field mappings are equal, -1 if thisfield mapping position is less than the other's, and +1 if this field mappingposition is higher than the others.
See Also:   Comparable.compareTo



equals
public boolean equals(Object other)(Code)
Compares this field mapping with another for equality. Field mappings are compared for the name and the field position.
Parameters:
  other - the other field mapping to compare against true if equal, false otherwise
See Also:   Object.equals(Object)



getAttributeName
public String getAttributeName()(Code)
Returns the mapped POJO bean's attribute name corresponding to this field. Returns the mapped POJO attribute name



getBeanReference
public CSVBeanMapping getBeanReference()(Code)
Returns the referenced bean mapping, if one is present. Returns null if this field does not have any bean reference. Returns the bean mapping reference



getBeanReferenceName
public String getBeanReferenceName()(Code)
Returns the declarative name of the referenced bean mapping for this field, or null if no bean mapping if referenced by this field. Returns name of the referenced bean mapping



getFieldName
public String getFieldName()(Code)
Returns the user defined name of this field. Returns the name of this field.



getFieldPosition
public int getFieldPosition()(Code)
Returns this field's position in the CSV line. Field positions start at 0. Returns the field's position



getFieldType
public String getFieldType()(Code)
Returns the fully qualified Java type name of this field. Returns the Java type name of this field



getFormatter
public CSVFieldFormatter getFormatter()(Code)
Returns the CSV formatter attached to this field. Returns the formatter



getReformatterName
public String getReformatterName()(Code)
Returns the declarative name of the formatter attached to this field. Returns the declarative formatter name



hashCode
public int hashCode()(Code)
Returns the hash code for this field mapping. The hash code is based on the field name and the field position. the hash code
See Also:   Object.hashCode



setAttributeName
public void setAttributeName(String attributeName)(Code)
Sets the mapped POJO's attribute name corresponding to this field. The name has to exactly match the attribute name (including the case).
Parameters:
  attributeName - The mapped POJO' attribute name



setBeanReference
public void setBeanReference(CSVBeanMapping beanReference)(Code)
Sets the referenced bean mapping for this field.
Parameters:
  beanReference - The bean mapping reference to set



setBeanReferenceName
public void setBeanReferenceName(String beanReferenceName)(Code)
Sets the declarative name of a referenced bean mapping for this field.
Parameters:
  beanReferenceName - The declarative name of the referenced bean



setFieldName
public void setFieldName(String fieldName)(Code)
Sets the user defined name of this field. This need not be same as the CSV field name (if defined on the CSV header row).
Parameters:
  fieldName - The name of this field



setFieldPosition
public void setFieldPosition(int fieldPosition)(Code)
Sets this field's position in the CSV line. Field positions start at 0.
Parameters:
  fieldPosition - The field's position in the CSV line



setFieldType
public void setFieldType(String fieldType)(Code)
Sets the fully qualified Java type name of this field.
Parameters:
  fieldType - The Java type name of this field



setFormatter
public void setFormatter(CSVFieldFormatter formatter)(Code)
Sets the formatter attached to this field.
Parameters:
  formatter - The formatter to set



setReformatterName
public void setReformatterName(String reformatterName)(Code)
Sets the declarative name of the formatter attached to this field.
Parameters:
  reformatterName - The declarative formatter name to set



toString
public String toString()(Code)
Dumps the contents of this field mapping as a string. This is meant for debugging only. the string representation
See Also:   Object.toString



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.