Source Code Cross Referenced for DefaultMetaDataFactory.java in  » Database-ORM » JPOX » org » jpox » metadata » 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.metadata 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**********************************************************************
002:        Copyright (c) 2007 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:        Contributors:
016:            ...
017:         **********************************************************************/package org.jpox.metadata;
018:
019:        /**
020:         * Default implementation of MetaDataFactory.
021:         *
022:         * @version $Revision: 1.4 $
023:         */
024:        public class DefaultMetaDataFactory implements  MetaDataFactory {
025:            /**
026:             * Constructor for a ClassMetaData.
027:             * Takes the basic string information found in the XML/annotations.
028:             * @param pmd MetaData for the package that this class belongs to
029:             * @param name Name of class
030:             * @param identityType Type of identity
031:             * @param objectidClass Class of the object id
032:             * @param requiresExtent Whether the class requires an extent
033:             * @param detachable Whether this is detachable
034:             * @param embeddedOnly embedded-only tag
035:             * @param modifier persistence modifier for the class
036:             * @param persistenceCapableSuperclass PC superclass (optional)
037:             * @param catalog Name for catalog
038:             * @param schema Name for schema
039:             * @param table Name of the table where to persist objects of this type
040:             * @param entityName the entity name required by JPA §4.3.1
041:             */
042:            public ClassMetaData newClassObject(PackageMetaData pmd,
043:                    String name, String identityType, String objectidClass,
044:                    String requiresExtent, String detachable,
045:                    String embeddedOnly, String modifier,
046:                    String persistenceCapableSuperclass, String catalog,
047:                    String schema, String table, String entityName) {
048:                ClassMetaData cmd = new ClassMetaData(pmd, name, identityType,
049:                        objectidClass, requiresExtent, detachable,
050:                        embeddedOnly, modifier, persistenceCapableSuperclass,
051:                        catalog, schema, table, entityName);
052:                return cmd;
053:            }
054:
055:            /**
056:             * Constructor for a FieldMetaData.
057:             * @param md MetaData for the class that this field belongs to
058:             * @param name Name of the field
059:             * @param pk Whether it is a part of the PK
060:             * @param modifier persistence-modifier
061:             * @param defaultFetchGroup Whether it is in the DFG
062:             * @param nullValue Action on null value inserts
063:             * @param embedded Whether it is embedded
064:             * @param serialized Whether it is serialised
065:             * @param dependent Whether it is dependent for deletes
066:             * @param mappedBy Field in other class that it is mapped using
067:             * @param column Column name to store it
068:             * @param table Table where it is stored
069:             * @param catalog Catalog that the table is in
070:             * @param schema Schema that the table is in
071:             * @param deleteAction Any FK delete action
072:             * @param indexed Whether it is indexed
073:             * @param unique Whether it is unique
074:             * @param recursionDepth Recursion depth to apply on fetch-plan operations
075:             * @param loadFetchGroup Whether to load the fetch group
076:             * @param valueStrategy Strategy for generating values for this field
077:             * @param sequence Sequence name if the strategy is "sequence"
078:             * @param fieldType Type of the field
079:             * @return MetaData for the field
080:             */
081:            public FieldMetaData newFieldObject(MetaData md, String name,
082:                    String pk, String modifier, String defaultFetchGroup,
083:                    String nullValue, String embedded, String serialized,
084:                    String dependent, String mappedBy, String column,
085:                    String table, String catalog, String schema,
086:                    String deleteAction, String indexed, String unique,
087:                    String recursionDepth, String loadFetchGroup,
088:                    String valueStrategy, String sequence, String fieldType) {
089:                FieldMetaData fmd = new FieldMetaData(md, name, pk, modifier,
090:                        defaultFetchGroup, nullValue, embedded, serialized,
091:                        dependent, mappedBy, column, table, catalog, schema,
092:                        deleteAction, indexed, unique, recursionDepth,
093:                        loadFetchGroup, valueStrategy, sequence, fieldType);
094:                return fmd;
095:            }
096:
097:            /**
098:             * Method to create a new field object copying from the supplied field
099:             * @param md Parent metadata
100:             * @param referenceFmd The reference field
101:             * @return FieldMetaData object
102:             */
103:            public FieldMetaData newFieldObject(MetaData md,
104:                    AbstractMemberMetaData referenceFmd) {
105:                FieldMetaData fmd = new FieldMetaData(md, referenceFmd);
106:                return fmd;
107:            }
108:
109:            /**
110:             * Constructor for a PropertyMetaData.
111:             * @param md MetaData for the interface that this property belongs to
112:             * @param name Name of the field
113:             * @param pk Whether it is a part of the PK
114:             * @param modifier persistence-modifier
115:             * @param defaultFetchGroup Whether it is in the DFG
116:             * @param nullValue Action on null value inserts
117:             * @param embedded Whether it is embedded
118:             * @param serialized Whether it is serialised
119:             * @param dependent Whether it is dependent for deletes
120:             * @param mappedBy Field in other class that it is mapped using
121:             * @param column Column name to store it
122:             * @param table Table where it is stored
123:             * @param catalog Catalog that the table is in
124:             * @param schema Schema that the table is in
125:             * @param deleteAction Any FK delete action
126:             * @param indexed Whether it is indexed
127:             * @param unique Whether it is unique
128:             * @param recursionDepth Recursion depth to apply on fetch-plan operations
129:             * @param loadFetchGroup Whether to load the fetch group
130:             * @param valueStrategy Strategy for generating values for this field
131:             * @param sequence Sequence name if the strategy is "sequence"
132:             * @param fieldType Type of the field
133:             * @param fieldName Name of the field (relates to the implementation of this)
134:             * @return MetaData for the field
135:             */
136:            public PropertyMetaData newPropertyObject(MetaData md, String name,
137:                    String pk, String modifier, String defaultFetchGroup,
138:                    String nullValue, String embedded, String serialized,
139:                    String dependent, String mappedBy, String column,
140:                    String table, String catalog, String schema,
141:                    String deleteAction, String indexed, String unique,
142:                    String recursionDepth, String loadFetchGroup,
143:                    String valueStrategy, String sequence, String fieldType,
144:                    String fieldName) {
145:                PropertyMetaData pmd = new PropertyMetaData(md, name, pk,
146:                        modifier, defaultFetchGroup, nullValue, embedded,
147:                        serialized, dependent, mappedBy, column, table,
148:                        catalog, schema, deleteAction, indexed, unique,
149:                        recursionDepth, loadFetchGroup, valueStrategy,
150:                        sequence, fieldType, fieldName);
151:                return pmd;
152:            }
153:
154:            /**
155:             * Method to create a new property object copying from the supplied object.
156:             * @param md Parent metadata
157:             * @param referencePmd Property to copy from
158:             * @return PropertyMetaData object
159:             */
160:            public PropertyMetaData newPropertyObject(MetaData md,
161:                    PropertyMetaData referencePmd) {
162:                PropertyMetaData pmd = new PropertyMetaData(md, referencePmd);
163:                return pmd;
164:            }
165:
166:            /**
167:             * Constructor for an InterfaceMetaData.
168:             * Takes the basic string information found in the XML/annotations.
169:             * @param pmd MetaData for the package that this class belongs to
170:             * @param name Name of class
171:             * @param identityType Type of identity
172:             * @param objectidClass Class of the object id
173:             * @param requiresExtent Whether the class requires an extent
174:             * @param detachable Whether this is detachable
175:             * @param embeddedOnly embedded-only tag
176:             * @param catalog Name for catalog
177:             * @param schema Name for schema
178:             * @param table Name of the table where to persist objects of this type
179:             * @param entityName the entity name required by JPA §4.3.1
180:             */
181:            public InterfaceMetaData newInterfaceObject(
182:                    final PackageMetaData pmd, final String name,
183:                    final String identityType, final String objectidClass,
184:                    final String requiresExtent, final String detachable,
185:                    final String embeddedOnly, final String catalog,
186:                    final String schema, final String table,
187:                    final String entityName) {
188:                InterfaceMetaData imd = new InterfaceMetaData(pmd, name,
189:                        identityType, objectidClass, requiresExtent,
190:                        detachable, embeddedOnly, catalog, schema, table,
191:                        entityName);
192:                return imd;
193:            }
194:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.