Source Code Cross Referenced for MappingManager.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 Referenced  Class Diagram Java Document (Java Doc) 


001:        /******************************************************************
002:        Copyright (c) 2004 Andy Jefferson and others. All rights reserved. 
003:        Licensed under the Apache License, Version 2.0 (the "License");
004:        you may not use this file except in compliance with the License.
005:        You may obtain a copy of the License at
006:
007:            http://www.apache.org/licenses/LICENSE-2.0
008:
009:        Unless required by applicable law or agreed to in writing, software
010:        distributed under the License is distributed on an "AS IS" BASIS,
011:        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
012:        See the License for the specific language governing permissions and
013:        limitations under the License.
014:         
015:
016:        Contributors:
017:        2004 Erik Bengtson - added datastore mapping accessors
018:            ...
019:         *****************************************************************/package org.jpox.store.mapping;
020:
021:        import org.jpox.ClassLoaderResolver;
022:        import org.jpox.metadata.AbstractMemberMetaData;
023:        import org.jpox.metadata.ColumnMetaData;
024:        import org.jpox.plugin.PluginManager;
025:        import org.jpox.store.DatastoreAdapter;
026:        import org.jpox.store.DatastoreContainerObject;
027:        import org.jpox.store.DatastoreField;
028:        import org.jpox.store.StoreManager;
029:
030:        /**
031:         * Representation of a MappingManager, mapping a java mapping type to a datastore mapping type.
032:         * Allows a java mapping type to map to multiple datastore mapping types.
033:         * Allows a default datastore mapping type be assigned to each java mapping type.
034:         * 
035:         * @version $Revision: 1.29 $
036:         */
037:        public interface MappingManager {
038:            /**
039:             * Initialise the datastore mapping. 
040:             * @param mgr the PlyginManager
041:             * @param clr the ClassLoaderResolver
042:             * @param vendorId the datastore vendor id
043:             */
044:            void loadDatastoreMapping(PluginManager mgr,
045:                    ClassLoaderResolver clr, String vendorId);
046:
047:            // --------------------------------------------- Java Types ---------------------------------------------
048:
049:            /**
050:             * Accessor for a mapping, for a java type.
051:             * @param c The java type
052:             * @param serialised Whether the type is serialised
053:             * @param embedded Whether the type is embedded
054:             * @param storeMgr Manager for the datastore
055:             * @param fieldName Name of the field (for logging only)
056:             * @return The mapping
057:             */
058:            JavaTypeMapping getMapping(Class c, boolean serialised,
059:                    boolean embedded, StoreManager storeMgr, String fieldName);
060:
061:            /**
062:             * Accessor for a mapping, for a java type.
063:             * @param c The java type
064:             * @param serialised Whether the type is serialised
065:             * @param embedded Whether the type is embedded
066:             * @param storeMgr Manager of the store
067:             * @param clr ClassLoader resolver
068:             * @return The mapping
069:             */
070:            JavaTypeMapping getMapping(Class c, boolean serialised,
071:                    boolean embedded, StoreManager storeMgr,
072:                    ClassLoaderResolver clr);
073:
074:            /**
075:             * Accessor for a mapping for a field, mapped to a table
076:             * @param table The table
077:             * @param fmd MetaData for the field
078:             * @param dba Datastore adapter
079:             * @param clr ClassLoader resolver
080:             * @param mappingFieldType Field type for the mapping
081:             * @return The mapping
082:             */
083:            JavaTypeMapping getMapping(DatastoreContainerObject table,
084:                    AbstractMemberMetaData fmd, DatastoreAdapter dba,
085:                    ClassLoaderResolver clr, int mappingFieldType);
086:
087:            // ----------------------------------------- Datastore Types ---------------------------------------------
088:
089:            /**
090:             * Method to create the datastore mapping for a java type mapping at a particular index.
091:             * @param mapping The java mapping
092:             * @param fmd MetaData for the field
093:             * @param index Index of the datastore field
094:             * @param srm Store Manager
095:             * @param column The column
096:             * @return The datastore mapping
097:             */
098:            DatastoreMapping createDatastoreMapping(JavaTypeMapping mapping,
099:                    AbstractMemberMetaData fmd, int index, StoreManager srm,
100:                    DatastoreField column);
101:
102:            /**
103:             * Method to create the datastore mapping for a particular column and java type.
104:             * @param mapping The java mapping
105:             * @param storeMgr Store Manager
106:             * @param column The column
107:             * @param javaType The java type (isnt this stored in the java mapping ?)
108:             * @return The datastore mapping
109:             */
110:            DatastoreMapping createDatastoreMapping(JavaTypeMapping mapping,
111:                    StoreManager storeMgr, DatastoreField column,
112:                    String javaType);
113:
114:            /**
115:             * Method to create a datastore field (column) in a container (table).
116:             * @param mapping The java mapping
117:             * @param javaType The java type
118:             * @param datastoreFieldIndex The index of the datastore field to create
119:             * @return The datastore field
120:             */
121:            DatastoreField createDatastoreField(JavaTypeMapping mapping,
122:                    String javaType, int datastoreFieldIndex);
123:
124:            /**
125:             * Method to create a datastore field (column) in a container (table).
126:             * To be used for serialised PC element/key/value in a join table.
127:             * @param mapping The java mapping
128:             * @param javaType The java type
129:             * @param colmd MetaData for the column to create
130:             * @return The datastore field
131:             */
132:            DatastoreField createDatastoreField(JavaTypeMapping mapping,
133:                    String javaType, ColumnMetaData colmd);
134:
135:            /**
136:             * Method to create a datastore field for a PersistenceCapable mapping.
137:             * @param fmd MetaData for the field
138:             * @param datastoreContainer The container in the datastore
139:             * @param mapping The java mapping
140:             * @param colmd MetaData for the column to create
141:             * @param reference The field to reference
142:             * @param clr ClassLoader resolver
143:             * @return The datastore field
144:             */
145:            DatastoreField createDatastoreField(AbstractMemberMetaData fmd,
146:                    DatastoreContainerObject datastoreContainer,
147:                    JavaTypeMapping mapping, ColumnMetaData colmd,
148:                    DatastoreField reference, ClassLoaderResolver clr);
149:
150:            /**
151:             * Utility to register a datastore mapping for a java type, and the SQL/JDBC types it can be mapped to.
152:             * This can also be called to change the default setting of a mapping - just supply the same
153:             * values of java/JDBC/SQL types and a different default value
154:             * @param javaTypeName Name of the java type
155:             * @param datastoreMappingType The datastore mapping
156:             * @param jdbcType The JDBC type that can be used
157:             * @param sqlType The SQL type that can be used
158:             * @param dflt Whether this type should be used as the default mapping for this Java type
159:             */
160:            void registerDatastoreMapping(String javaTypeName,
161:                    Class datastoreMappingType, String jdbcType,
162:                    String sqlType, boolean dflt);
163:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.