Java Doc for AbstractMappingManager.java in  » Database-ORM » JPOX » org » jpox » store » 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 » Database ORM » JPOX » org.jpox.store.mapping 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.jpox.store.mapping.AbstractMappingManager

AbstractMappingManager
abstract public class AbstractMappingManager implements MappingManager(Code)
Base implementation of a MappingManager. Datastores should extend this to add their own specifics, and to add the initialisation of their supported types.

The idea behind a MappingManager is that at the Java side we have a series of Java type mappings, and at the datastore side we have a series of datastore type mappings. We need a link between the two to say that "this Java type can map to any of these 3 datastore types, and by default use this one".
version:
   $Revision: 1.77 $


Inner Class :protected class TypeMapping

Field Summary
final protected static  LocaliserLOCALISER
    

Constructor Summary
public  AbstractMappingManager()
     Default constructor.

Method Summary
protected  ClassgetDefaultJavaTypeMapping(TypeManager typeMgr, Class javaType)
     Method to return the default java type mapping class for a specified java type.
protected  ClassgetElementMappingClass(DatastoreContainerObject container, AbstractMemberMetaData fmd, DatastoreAdapter dba, ClassLoaderResolver clr)
     Convenience accessor for the mapping class of the element mapping for a collection/array of PC elements.
protected  ClassgetKeyMappingClass(DatastoreContainerObject container, AbstractMemberMetaData fmd, DatastoreAdapter dba, ClassLoaderResolver clr)
     Convenience accessor for the mapping class of the key mapping for a map of PC keys.
public  JavaTypeMappinggetMapping(Class c, boolean serialised, boolean embedded, StoreManager storeMgr, String fieldName)
     Accessor for the mapping for the specified class.
public  JavaTypeMappinggetMapping(Class c, boolean serialised, boolean embedded, StoreManager storeMgr, ClassLoaderResolver clr)
     Accessor for the mapping for the specified class.
public  JavaTypeMappinggetMapping(DatastoreContainerObject datastoreContainer, AbstractMemberMetaData fmd, DatastoreAdapter dba, ClassLoaderResolver clr, int roleForField)
     Accessor for the mapping for the field of the specified table. Can be used for fields of a class, elements of a collection of a class, elements of an array of a class, keys of a map of a class, values of a map of a class.
protected  ClassgetMappingClass(Class c, boolean serialised, boolean embedded, String fieldName, TypeManager typeMgr, ApiAdapter api)
     Accessor for the mapping class for the specified class.
protected  ClassgetOverrideMappingClass(Class mappingClass, AbstractMemberMetaData fmd, int roleForField)
     Convenience method to allow overriding of particular mapping classes.
protected  ClassgetValueMappingClass(DatastoreContainerObject container, AbstractMemberMetaData fmd, DatastoreAdapter dba, ClassLoaderResolver clr)
     Convenience accessor for the mapping class of the value mapping for a map of PC values.
abstract public  voidloadDatastoreMapping(PluginManager mgr, ClassLoaderResolver clr, String vendorId)
     Load all datastore mappings defined in the associated plugins.
abstract public  voidregisterDatastoreMapping(String javaTypeName, Class datastoreMappingType, String jdbcType, String sqlType, boolean dflt)
     Utility to register a datastore mapping for a java type, and the SQL/JDBC types it can be mapped to.

Field Detail
LOCALISER
final protected static Localiser LOCALISER(Code)




Constructor Detail
AbstractMappingManager
public AbstractMappingManager()(Code)
Default constructor.




Method Detail
getDefaultJavaTypeMapping
protected Class getDefaultJavaTypeMapping(TypeManager typeMgr, Class javaType)(Code)
Method to return the default java type mapping class for a specified java type.
Parameters:
  javaType - java type
Parameters:
  typeMgr - the TypeManager The mapping class to use (by default)



getElementMappingClass
protected Class getElementMappingClass(DatastoreContainerObject container, AbstractMemberMetaData fmd, DatastoreAdapter dba, ClassLoaderResolver clr)(Code)
Convenience accessor for the mapping class of the element mapping for a collection/array of PC elements. Currently only used where the collection/array elements are either serialised or embedded into a join table.
Parameters:
  container - The container
Parameters:
  fmd - MetaData for the collection field containing the collection/array of PCs
Parameters:
  dba - Database adapter
Parameters:
  clr - ClassLoader resolver The mapping class



getKeyMappingClass
protected Class getKeyMappingClass(DatastoreContainerObject container, AbstractMemberMetaData fmd, DatastoreAdapter dba, ClassLoaderResolver clr)(Code)
Convenience accessor for the mapping class of the key mapping for a map of PC keys. Currently only used where the keys are either serialised or embedded into a join table.
Parameters:
  container - The container
Parameters:
  fmd - MetaData for the field containing the map that this key is for
Parameters:
  dba - Database adapter
Parameters:
  clr - ClassLoader resolver The mapping class



getMapping
public JavaTypeMapping getMapping(Class c, boolean serialised, boolean embedded, StoreManager storeMgr, String fieldName)(Code)
Accessor for the mapping for the specified class. TODO Merge this with the method below, or at least say why use this or the other
Parameters:
  c - Java type
Parameters:
  serialised - Whether the type is serialised
Parameters:
  embedded - Whether the type is embedded
Parameters:
  storeMgr - Manager for the datastore
Parameters:
  fieldName - Name of the field (for logging) The mapping for the class.



getMapping
public JavaTypeMapping getMapping(Class c, boolean serialised, boolean embedded, StoreManager storeMgr, ClassLoaderResolver clr)(Code)
Accessor for the mapping for the specified class. Usually only called by JDOQL query expressions.
Parameters:
  c - Java type
Parameters:
  serialised - Whether the type is serialised
Parameters:
  embedded - Whether the type is embedded
Parameters:
  storeMgr - Manager for the store
Parameters:
  clr - ClassLoader resolver The mapping for the class.



getMapping
public JavaTypeMapping getMapping(DatastoreContainerObject datastoreContainer, AbstractMemberMetaData fmd, DatastoreAdapter dba, ClassLoaderResolver clr, int roleForField)(Code)
Accessor for the mapping for the field of the specified table. Can be used for fields of a class, elements of a collection of a class, elements of an array of a class, keys of a map of a class, values of a map of a class. This is controlled by the final argument "roleForField".
Parameters:
  datastoreContainer - Table to add the mapping to
Parameters:
  fmd - FieldMetaData for the field to map
Parameters:
  dba - Datastore adapter
Parameters:
  clr - The ClassLoaderResolver
Parameters:
  roleForField - Role that this mapping plays for the field The mapping for the field.



getMappingClass
protected Class getMappingClass(Class c, boolean serialised, boolean embedded, String fieldName, TypeManager typeMgr, ApiAdapter api)(Code)
Accessor for the mapping class for the specified class. Provides special handling for interface types and for classes that are being embedded in a field (detected using the FieldMetaData argument). Refers others to its mapping manager lookup.
Parameters:
  c - Class to query
Parameters:
  serialised - Whether the field is serialised
Parameters:
  embedded - Whether the field is embedded
Parameters:
  fieldName - The full field name (for logging only)
Parameters:
  typeMgr - the TypeManager
Parameters:
  api - API Adapter The mapping class for the class



getOverrideMappingClass
protected Class getOverrideMappingClass(Class mappingClass, AbstractMemberMetaData fmd, int roleForField)(Code)
Convenience method to allow overriding of particular mapping classes.
Parameters:
  mappingClass - The mapping class selected
Parameters:
  fmd - Field meta data for the field (if appropriate)
Parameters:
  roleForField - Role for the field (e.g collection element) The mapping class to use



getValueMappingClass
protected Class getValueMappingClass(DatastoreContainerObject container, AbstractMemberMetaData fmd, DatastoreAdapter dba, ClassLoaderResolver clr)(Code)
Convenience accessor for the mapping class of the value mapping for a map of PC values. Currently only used where the value are either serialised or embedded into a join table.
Parameters:
  container - The container
Parameters:
  fmd - MetaData for the field containing the map that this value is for
Parameters:
  dba - Database adapter
Parameters:
  clr - ClassLoader resolver The mapping class



loadDatastoreMapping
abstract public void loadDatastoreMapping(PluginManager mgr, ClassLoaderResolver clr, String vendorId)(Code)
Load all datastore mappings defined in the associated plugins. To be implemented by the datastore mapping managers since they have the knowledge of the attributes supported by that datastore (e.g RDBMS datastores use jdbc-type, sql-type)
Parameters:
  mgr - the PluginManager
Parameters:
  clr - the ClassLoaderResolver
Parameters:
  vendorId - the datastore vendor id



registerDatastoreMapping
abstract public void registerDatastoreMapping(String javaTypeName, Class datastoreMappingType, String jdbcType, String sqlType, boolean dflt)(Code)
Utility to register a datastore mapping for a java type, and the SQL/JDBC types it can be mapped to. This can also be called to change the default setting of a mapping - just supply the same values of java/JDBC/SQL types and a different default value
Parameters:
  javaTypeName - Name of the java type
Parameters:
  datastoreMappingType - The datastore mapping
Parameters:
  jdbcType - The JDBC type that can be used
Parameters:
  sqlType - The SQL type that can be used
Parameters:
  dflt - Whether this type should be used as the default mapping for this Java type



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.