Source Code Cross Referenced for NonPersistentMetaData.java in  » Database-ORM » openjpa » org » apache » openjpa » meta » 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 » openjpa » org.apache.openjpa.meta 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Licensed to the Apache Software Foundation (ASF) under one
003:         * or more contributor license agreements.  See the NOTICE file
004:         * distributed with this work for additional information
005:         * regarding copyright ownership.  The ASF licenses this file
006:         * to you under the Apache License, Version 2.0 (the
007:         * "License"); you may not use this file except in compliance
008:         * with the License.  You may obtain a copy of the License at
009:         *
010:         * http://www.apache.org/licenses/LICENSE-2.0
011:         *
012:         * Unless required by applicable law or agreed to in writing,
013:         * software distributed under the License is distributed on an
014:         * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015:         * KIND, either express or implied.  See the License for the
016:         * specific language governing permissions and limitations
017:         * under the License.    
018:         */
019:        package org.apache.openjpa.meta;
020:
021:        import java.io.File;
022:        import java.io.Serializable;
023:
024:        import org.apache.openjpa.lib.meta.SourceTracker;
025:        import org.apache.openjpa.lib.xml.Commentable;
026:
027:        /**
028:         * Metadata about a persistence-aware type.
029:         *
030:         * @author Pinaki Poddar
031:         */
032:        public class NonPersistentMetaData implements  Comparable,
033:                SourceTracker, Commentable, MetaDataContext, Serializable {
034:            public static final int TYPE_PERSISTENCE_AWARE = 1;
035:            public static final int TYPE_NON_MAPPED_INTERFACE = 2;
036:
037:            private final MetaDataRepository _repos;
038:            private final Class _class;
039:            private final int _type;
040:
041:            private File _srcFile = null;
042:            private int _srcType = SRC_OTHER;
043:            private String[] _comments = null;
044:            private int _listIndex = -1;
045:
046:            protected NonPersistentMetaData(Class cls,
047:                    MetaDataRepository repos, int type) {
048:                _repos = repos;
049:                _class = cls;
050:                _type = type;
051:            }
052:
053:            /**
054:             * Owning repository.
055:             */
056:            public MetaDataRepository getRepository() {
057:                return _repos;
058:            }
059:
060:            /**
061:             * Persistence-aware type.
062:             */
063:            public Class getDescribedType() {
064:                return _class;
065:            }
066:
067:            /**
068:             * The type of metadata.
069:             */
070:            public int getType() {
071:                return _type;
072:            }
073:
074:            /**
075:             * The index in which this class was listed in the metadata. Defaults to
076:             * <code>-1</code> if this class was not listed in the metadata.
077:             */
078:            public int getListingIndex() {
079:                return _listIndex;
080:            }
081:
082:            /**
083:             * The index in which this field was listed in the metadata. Defaults to
084:             * <code>-1</code> if this class was not listed in the metadata.
085:             */
086:            public void setListingIndex(int index) {
087:                _listIndex = index;
088:            }
089:
090:            public File getSourceFile() {
091:                return _srcFile;
092:            }
093:
094:            public Object getSourceScope() {
095:                return null;
096:            }
097:
098:            public int getSourceType() {
099:                return _srcType;
100:            }
101:
102:            public void setSource(File file, int srcType) {
103:                _srcFile = file;
104:                _srcType = srcType;
105:            }
106:
107:            public String getResourceName() {
108:                return _class.getName();
109:            }
110:
111:            public String[] getComments() {
112:                return (_comments == null) ? ClassMetaData.EMPTY_COMMENTS
113:                        : _comments;
114:            }
115:
116:            public void setComments(String[] comments) {
117:                _comments = comments;
118:            }
119:
120:            public int compareTo(Object o) {
121:                if (o == this )
122:                    return 0;
123:                if (!(o instanceof  NonPersistentMetaData))
124:                    return 1;
125:                NonPersistentMetaData other = (NonPersistentMetaData) o;
126:                if (_type != other.getType())
127:                    return _type - other.getType();
128:                return _class.getName().compareTo(
129:                        other.getDescribedType().getName());
130:            }
131:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.