Java Doc for AbstractMappingLoader.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.AbstractMappingLoader2
      org.exolab.castor.mapping.loader.AbstractMappingLoader

All known Subclasses:   org.exolab.castor.xml.XMLMappingLoader,
AbstractMappingLoader
abstract public class AbstractMappingLoader extends AbstractMappingLoader2 (Code)
Assists in the construction of descriptors. Can be used as a mapping resolver to the engine. Engines will implement their own mapping scheme typically by extending this class.
author:
   Assaf Arkin
author:
   Keith Visco
version:
   $Revision: 6784 $ $Date: 2006-04-10 16:39:24 -0600 (Mon, 10 Apr 2006) $

Inner Class :public class TypeInfoReference

Field Summary
final protected static  Class[]EMPTY_ARGS
     Empty array of class types used for reflection.
final protected static  Class[]STRING_ARG
     The string argument for the valueOf method, used for introspection when searching for type-safe enumeration style classes.
final protected static  StringVALUE_OF
     Factory method name for type-safe enumerations.

Constructor Summary
protected  AbstractMappingLoader(ClassLoader loader)
     Constructs a new mapping helper.

Method Summary
final protected  voidcheckFieldNameDuplicates(FieldDescriptor[] fields, Class cls)
     Checks all given fields for name equality and throws a MappingException if at least two fields have the same name.
abstract protected  ClassDescriptorcreateClassDescriptor(ClassMapping clsMap)
    
final protected  voidcreateClassDescriptors(MappingRoot mapping)
    
protected  AbstractFieldDescriptorcreateFieldDesc(Class javaClass, FieldMapping fieldMap)
     Creates a single field descriptor.
final protected  AbstractFieldDescriptor[]createFieldDescriptors(ClassMapping clsMap, Class javaClass)
     Create field descriptors.
final protected  FieldHandlercreateFieldHandler(Class javaClass, Class fldType, FieldMapping fldMap, TypeInfoReference typeInfoRef)
     Creates the FieldHandler for the given FieldMapping.
Parameters:
  javaClass - the class type of the parent of the field.
Parameters:
  fldType - the Java class type for the field.
Parameters:
  fldMap - the field mapping.
final protected  FieldDescriptor[]divideFieldDescriptors(FieldDescriptor[] fields, String[] ids, FieldDescriptor[] identities)
    
final public static  MethodfindAccessor(Class javaClass, String methodName, Class fieldType, boolean getMethod)
     Returns the named accessor.
final protected  ClassDescriptorgetDepended(ClassMapping clsMap, Class javaClass)
     Gets the ClassDescriptor the given classMapping depends on.
Parameters:
  clsMap - The ClassMapping to find the required ClassDescriptor for.
Parameters:
  javaClass - The name of the class that is checked (this is used forgenerating the exception).
final protected  ClassDescriptorgetExtended(ClassMapping clsMap, Class javaClass)
     Gets the ClassDescriptor the given classMapping extends.
Parameters:
  clsMap - The ClassMapping to find the required descriptor for.
Parameters:
  javaClass - The name of the class that is checked (this is used forgenerating the exception).
protected  intgetIdColumnIndex(FieldDescriptor field, String[] ids)
     Finds the index in the given idColumnNames that has the same name as the given field.
Parameters:
  field - The FieldDescriptor to find the column index for.
Parameters:
  ids - The id columnNames available.
final public static  String[]getIdentityColumnNames(String[] ids, ClassMapping clsMap)
     Returns a list of column names that are part of the identity.
Parameters:
  ids - Known identity names.
Parameters:
  clsMap - Class mapping.
final protected  ClassMappinggetOrigin(ClassMapping clsMap)
     Gets the top-most (i.e.
final public  StringgetSourceType()
    
protected  TypeInfogetTypeInfo(Class fieldType, CollectionHandler colHandler, FieldMapping fieldMap)
    
final protected static  booleanisPrimitive(Class type)
    
abstract public  voidloadMapping(MappingRoot mapping, Object param)
     Loads the mapping from the specified mapping object if not loaded previously.
abstract protected  voidresolveRelations(ClassDescriptor clsDesc)
    
final protected  ClassresolveType(String typeName)
     Returns the Java class for the named type.

Field Detail
EMPTY_ARGS
final protected static Class[] EMPTY_ARGS(Code)
Empty array of class types used for reflection.



STRING_ARG
final protected static Class[] STRING_ARG(Code)
The string argument for the valueOf method, used for introspection when searching for type-safe enumeration style classes.



VALUE_OF
final protected static String VALUE_OF(Code)
Factory method name for type-safe enumerations.




Constructor Detail
AbstractMappingLoader
protected AbstractMappingLoader(ClassLoader loader)(Code)
Constructs a new mapping helper. This constructor is used by a derived class.
Parameters:
  loader - The class loader to use, null for the default




Method Detail
checkFieldNameDuplicates
final protected void checkFieldNameDuplicates(FieldDescriptor[] fields, Class cls) throws MappingException(Code)
Checks all given fields for name equality and throws a MappingException if at least two fields have the same name.
Parameters:
  fields - The fields to be checked.
Parameters:
  cls - Class that is checked (this is used for generating the exception).
throws:
  MappingException - If at least two fields have the same name.



createClassDescriptor
abstract protected ClassDescriptor createClassDescriptor(ClassMapping clsMap) throws MappingException(Code)



createClassDescriptors
final protected void createClassDescriptors(MappingRoot mapping) throws MappingException(Code)



createFieldDesc
protected AbstractFieldDescriptor createFieldDesc(Class javaClass, FieldMapping fieldMap) throws MappingException(Code)
Creates a single field descriptor. The field mapping is used to create a new stock FieldDescriptor . Implementations may extend this class to create a more suitable descriptor.
Parameters:
  javaClass - The class to which the field belongs.
Parameters:
  fieldMap - The field mapping information. The field descriptor.
throws:
  MappingException - The field or its accessor methods are notfound, not accessible, not of the specified type, etc.



createFieldDescriptors
final protected AbstractFieldDescriptor[] createFieldDescriptors(ClassMapping clsMap, Class javaClass) throws MappingException(Code)
Create field descriptors. The class mapping information is used to create descriptors for all the fields in the class, except for container fields. Implementations may extend this method to create more suitable descriptors, or create descriptors only for a subset of the fields.
Parameters:
  clsMap - The class to which the fields belong.
Parameters:
  javaClass - The field mappings.
throws:
  MappingException - An exception indicating why mapping for the class cannotbe created.



createFieldHandler
final protected FieldHandler createFieldHandler(Class javaClass, Class fldType, FieldMapping fldMap, TypeInfoReference typeInfoRef) throws MappingException(Code)
Creates the FieldHandler for the given FieldMapping.
Parameters:
  javaClass - the class type of the parent of the field.
Parameters:
  fldType - the Java class type for the field.
Parameters:
  fldMap - the field mapping. the newly created FieldHandler.



divideFieldDescriptors
final protected FieldDescriptor[] divideFieldDescriptors(FieldDescriptor[] fields, String[] ids, FieldDescriptor[] identities)(Code)



findAccessor
final public static Method findAccessor(Class javaClass, String methodName, Class fieldType, boolean getMethod) throws MappingException(Code)
Returns the named accessor. Uses reflection to return the named accessor and check the return value or parameter type, if specified.
Parameters:
  javaClass - The class to which the field belongs.
Parameters:
  methodName - The name of the accessor method.
Parameters:
  fieldType - The type of the field if known, or null.
Parameters:
  getMethod - True if get method, false if set method. The method, null if not found.
throws:
  MappingException - The method is not accessible or is not of thespecified type.



getDepended
final protected ClassDescriptor getDepended(ClassMapping clsMap, Class javaClass) throws MappingException(Code)
Gets the ClassDescriptor the given classMapping depends on.
Parameters:
  clsMap - The ClassMapping to find the required ClassDescriptor for.
Parameters:
  javaClass - The name of the class that is checked (this is used forgenerating the exception). The ClassDescriptor the given ClassMapping depends on ornull if the given ClassMapping does not depend onany.
throws:
  MappingException - If the given ClassMapping depends on anotherClassMapping but its descriptor could not be found.



getExtended
final protected ClassDescriptor getExtended(ClassMapping clsMap, Class javaClass) throws MappingException(Code)
Gets the ClassDescriptor the given classMapping extends.
Parameters:
  clsMap - The ClassMapping to find the required descriptor for.
Parameters:
  javaClass - The name of the class that is checked (this is used forgenerating the exception). The ClassDescriptor the given ClassMapping extends ornull if the given ClassMapping does not extendany.
throws:
  MappingException - If the given ClassMapping extends anotherClassMapping but its descriptor could not be found.



getIdColumnIndex
protected int getIdColumnIndex(FieldDescriptor field, String[] ids)(Code)
Finds the index in the given idColumnNames that has the same name as the given field.
Parameters:
  field - The FieldDescriptor to find the column index for.
Parameters:
  ids - The id columnNames available. The index of the id column name that matches the given field's name or-1 if no such id column name exists.



getIdentityColumnNames
final public static String[] getIdentityColumnNames(String[] ids, ClassMapping clsMap)(Code)
Returns a list of column names that are part of the identity.
Parameters:
  ids - Known identity names.
Parameters:
  clsMap - Class mapping. List of identity column names.



getOrigin
final protected ClassMapping getOrigin(ClassMapping clsMap)(Code)
Gets the top-most (i.e. without any further 'extends') extends of the given classMapping.
Parameters:
  clsMap - The ClassMapping to get the origin for. The top-most extends of the given ClassMapping or the ClassMapping itselfif it does not extend any other ClassMapping.



getSourceType
final public String getSourceType()(Code)



getTypeInfo
protected TypeInfo getTypeInfo(Class fieldType, CollectionHandler colHandler, FieldMapping fieldMap) throws MappingException(Code)



isPrimitive
final protected static boolean isPrimitive(Class type)(Code)
Returns true if the given class should be treated as a primitive type true if the given class should be treated as a primitivetype



loadMapping
abstract public void loadMapping(MappingRoot mapping, Object param) throws MappingException(Code)
Loads the mapping from the specified mapping object if not loaded previously.
Parameters:
  mapping - The mapping information.
Parameters:
  param - Arbitrary parameter that can be used by subclasses.
throws:
  MappingException - The mapping file is invalid.



resolveRelations
abstract protected void resolveRelations(ClassDescriptor clsDesc)(Code)



resolveType
final protected Class resolveType(String typeName) throws MappingException(Code)
Returns the Java class for the named type. The type name can be one of the accepted short names (e.g. integer) or the full Java class name (e.g. java.lang.Integer). If the short name is used, the primitive type might be returned.



Methods inherited from org.exolab.castor.mapping.loader.AbstractMappingLoader2
final protected void addDescriptor(ClassDescriptor descriptor) throws MappingException(Code)(Java Doc)
final public void clear()(Code)(Java Doc)
final public Iterator descriptorIterator()(Code)(Java Doc)
final public ClassLoader getClassLoader()(Code)(Java Doc)
final public ClassDescriptor getDescriptor(String classname)(Code)(Java Doc)
final public boolean isAllowRedefinition()(Code)(Java Doc)
final protected boolean loadMapping()(Code)(Java Doc)
final public void setAllowRedefinitions(boolean allow)(Code)(Java Doc)
final public void setClassLoader(ClassLoader loader)(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.