Java Doc for FieldHandlerImpl.java in  » Database-ORM » castor » org » exolab » castor » mapping » loader » 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 » Database ORM » castor » org.exolab.castor.mapping.loader 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.exolab.castor.mapping.loader.ExtendedFieldHandler
      org.exolab.castor.mapping.AbstractFieldHandler
         org.exolab.castor.mapping.loader.FieldHandlerImpl

FieldHandlerImpl
final public class FieldHandlerImpl extends AbstractFieldHandler (Code)
A field handler that knows how to get/set the values of a field directly or through the get/set methods. Uses reflection.

Note: the field Java type is obtained from TypeInfo.getFieldType , but if the field is a collection, the actual field/accessor type is obtained from TypeInfo.getCollectionHandler and the object to create (with FieldHandlerImpl.newInstance(Object) ) is the former field type.
author:
   Assaf Arkin
version:
   $Revision: 6457 $ $Date: 2006-04-25 15:08:23 -0600 (Tue, 25 Apr 2006) $




Constructor Summary
public  FieldHandlerImpl(FieldHandler handler, TypeInfo typeInfo)
     Construct a new field handler for the specified field.
public  FieldHandlerImpl(Field field, TypeInfo typeInfo)
     Construct a new field handler for the specified field.
public  FieldHandlerImpl(String fieldName, Method[] getSequence, Method[] setSequence, Method getMethod, Method setMethod, TypeInfo typeInfo)
     Construct a new field handler for the specified field that is accessed through the accessor methods (get/set).

Method Summary
public  TypeConvertorgetConvertFrom()
    
public  StringgetConvertParam()
    
public  TypeConvertorgetConvertTo()
    
public  ObjectgetValue(Object object)
    
public  booleanisCollection()
     Return true if the field is a collection.
public  ObjectnewInstance(Object parent)
     Creates a new instance of the object described by this field.
public  ObjectnewInstance(Object parent, Object[] args)
     Creates a new instance of the object described by this field.
public  voidresetValue(Object object)
    
public  voidsetAddMethod(Method method)
     Mutator method used by org.exolab.castor.xml.Introspector .
public  voidsetConvertFrom(TypeConvertor convertor)
    
public  voidsetConvertTo(TypeConvertor convertor)
    
public  voidsetCreateMethod(Method method)
     Mutator method used by AbstractMappingLoader and org.exolab.castor.xml.Introspector .
public  voidsetEnumMethod(Method method)
     Sets the enumeration method.
public  voidsetHasDeleteMethod(Method hasMethod, Method deleteMethod)
     Mutator method used by AbstractMappingLoader and org.exolab.castor.xml.Introspector .
public  voidsetIterMethod(Method method)
     Sets the iteration method.
public  voidsetReadMethod(Method method)
     Mutator method used by org.exolab.castor.xml.Introspector .
 voidsetRequired(boolean required)
     Mutator method used by AbstractMappingLoader .
public  voidsetValue(Object object, Object value)
    
public  voidsetWriteMethod(Method method)
     Mutator method used by org.exolab.castor.xml.Introspector .
public  StringtoString()
    


Constructor Detail
FieldHandlerImpl
public FieldHandlerImpl(FieldHandler handler, TypeInfo typeInfo)(Code)
Construct a new field handler for the specified field. The field must be public, and may not be static or transient. The field name is determined from the Java field, the type from the type information.
Parameters:
  handler -
Parameters:
  typeInfo - Type information



FieldHandlerImpl
public FieldHandlerImpl(Field field, TypeInfo typeInfo) throws MappingException(Code)
Construct a new field handler for the specified field. The field must be public, and may not be static or transient. The field name is determined from the Java field, the type from the type information.
Parameters:
  field - The field being described
Parameters:
  typeInfo - Type information
throws:
  MappingException - If the field is not public, is static ortransient



FieldHandlerImpl
public FieldHandlerImpl(String fieldName, Method[] getSequence, Method[] setSequence, Method getMethod, Method setMethod, TypeInfo typeInfo) throws MappingException(Code)
Construct a new field handler for the specified field that is accessed through the accessor methods (get/set). The accessor methods must be public and not static. The field name is required for descriptive purposes. The field type must match the return value of the get method and the single parameter of the set method. Either get or set methods are optional.
Parameters:
  fieldName - The field being described
Parameters:
  getMethod - The method used to retrieve the field value,must accept no parameters and have a return type castable tothe field type
Parameters:
  setMethod - The method used to set the field value, mustaccept a single parameter that is castable to the field type
Parameters:
  typeInfo - Type information
throws:
  MappingException - If the get or set method are not public,are static, or do not specify the proper types




Method Detail
getConvertFrom
public TypeConvertor getConvertFrom()(Code)



getConvertParam
public String getConvertParam()(Code)



getConvertTo
public TypeConvertor getConvertTo()(Code)



getValue
public Object getValue(Object object)(Code)



isCollection
public boolean isCollection()(Code)
Return true if the field is a collection.



newInstance
public Object newInstance(Object parent) throws IllegalStateException(Code)
Creates a new instance of the object described by this field.
Parameters:
  parent - The object for which the field is created A new instance of the field's value
throws:
  IllegalStateException - This field is a simple type andcannot be instantiated



newInstance
public Object newInstance(Object parent, Object[] args) throws IllegalStateException(Code)
Creates a new instance of the object described by this field.
Parameters:
  parent - The object for which the field is created
Parameters:
  args - the set of constructor arguments A new instance of the field's value
throws:
  IllegalStateException - This field is a simple type andcannot be instantiated



resetValue
public void resetValue(Object object)(Code)



setAddMethod
public void setAddMethod(Method method) throws MappingException(Code)
Mutator method used by org.exolab.castor.xml.Introspector . Please understand how this method is used before you start playing with it! :-)



setConvertFrom
public void setConvertFrom(TypeConvertor convertor)(Code)
Sets the TypeConvertor used during calls to getValue
Parameters:
  convertor - the TypeConvertor to use during callsto getValue



setConvertTo
public void setConvertTo(TypeConvertor convertor)(Code)
Sets the TypeConvertor used during calls to setValue
Parameters:
  convertor - the TypeConvertor to use during callsto setValue



setCreateMethod
public void setCreateMethod(Method method) throws MappingException(Code)
Mutator method used by AbstractMappingLoader and org.exolab.castor.xml.Introspector . Please understand how this method is used before you start playing with it! :-)



setEnumMethod
public void setEnumMethod(Method method) throws MappingException(Code)
Sets the enumeration method.



setHasDeleteMethod
public void setHasDeleteMethod(Method hasMethod, Method deleteMethod) throws MappingException(Code)
Mutator method used by AbstractMappingLoader and org.exolab.castor.xml.Introspector . Please understand how this method is used before you start playing with it! :-)



setIterMethod
public void setIterMethod(Method method) throws MappingException(Code)
Sets the iteration method.



setReadMethod
public void setReadMethod(Method method) throws MappingException(Code)
Mutator method used by org.exolab.castor.xml.Introspector . Please understand how this method is used before you start playing with it! :-)



setRequired
void setRequired(boolean required)(Code)
Mutator method used by AbstractMappingLoader .



setValue
public void setValue(Object object, Object value)(Code)



setWriteMethod
public void setWriteMethod(Method method) throws MappingException(Code)
Mutator method used by org.exolab.castor.xml.Introspector . Please understand how this method is used before you start playing with it! :-)



toString
public String toString()(Code)



Methods inherited from org.exolab.castor.mapping.AbstractFieldHandler
final protected FieldDescriptor getFieldDescriptor()(Code)(Java Doc)
abstract public Object getValue(Object object) throws IllegalStateException(Code)(Java Doc)
public boolean hasValue(Object object)(Code)(Java Doc)
abstract public Object newInstance(Object parent) throws IllegalStateException(Code)(Java Doc)
abstract public Object newInstance(Object parent, Object[] args) throws IllegalStateException(Code)(Java Doc)
abstract public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException(Code)(Java Doc)
final public void setFieldDescriptor(FieldDescriptor fieldDesc)(Code)(Java Doc)
abstract public void setValue(Object object, Object value) throws IllegalStateException, IllegalArgumentException(Code)(Java Doc)

Methods inherited from org.exolab.castor.mapping.loader.ExtendedFieldHandler
final public void checkValidity(Object object) throws ValidityException, IllegalStateException(Code)(Java Doc)
abstract protected FieldDescriptor getFieldDescriptor()(Code)(Java Doc)
abstract public Object getValue(Object object) throws IllegalStateException(Code)(Java Doc)
abstract public Object newInstance(Object parent) throws IllegalStateException(Code)(Java Doc)
abstract public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException(Code)(Java Doc)
abstract protected void setFieldDescriptor(FieldDescriptor fieldDesc)(Code)(Java Doc)
abstract public void setValue(Object object, Object value) throws IllegalStateException, IllegalArgumentException(Code)(Java Doc)

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.