Source Code Cross Referenced for InvalidMetaDataException.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) 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:        2003 Kikucho Kousuke - org.jpox.enhancer.conf.InvalidMetaDataException
018:        2005 Andy Jefferson - changed to extend JDOFatalUserException
019:            ...
020:         **********************************************************************/package org.jpox.metadata;
021:
022:        import java.io.PrintStream;
023:        import java.io.PrintWriter;
024:
025:        import org.jpox.exceptions.JPOXUserException;
026:        import org.jpox.util.Localiser;
027:
028:        /**
029:         * Representation of an exception thrown when an error occurs in Meta-Data definition.
030:         * Provides a series of convenience constructors to accomodate the typical numbers
031:         * of parameters embodies in messages.
032:         *
033:         * @version $Revision: 1.5 $
034:         */
035:        public class InvalidMetaDataException extends JPOXUserException {
036:            /** Message resources key */
037:            protected String messageKey;
038:
039:            /** Cause of the exception */
040:            protected Throwable cause;
041:
042:            /**
043:             * Default Constructor
044:             */
045:            public InvalidMetaDataException() {
046:                super ();
047:                setFatal();
048:            }
049:
050:            /**
051:             * Constructor with message resource and cause exception
052:             * @param localiser message resources
053:             * @param key message resources key
054:             * @param cause cause exception
055:             */
056:            public InvalidMetaDataException(Localiser localiser, String key,
057:                    Throwable cause) {
058:                this (localiser, key, "", "", "");
059:                this .cause = cause;
060:                setFatal();
061:            }
062:
063:            /**
064:             * Constructor with message resource, message param and cause exception
065:             * @param localiser message resources
066:             * @param key message resources key
067:             * @param param1 message resources param0
068:             * @param cause cause exception
069:             */
070:            public InvalidMetaDataException(Localiser localiser, String key,
071:                    Object param1, Throwable cause) {
072:                this (localiser, key, param1, "", "");
073:                this .cause = cause;
074:                setFatal();
075:            }
076:
077:            /**
078:             * Constructor with message resource, message params and cause exception
079:             * @param localiser message resources
080:             * @param key message resources key
081:             * @param param1 message resources param0
082:             * @param param2 message resources param1
083:             * @param cause cause exception
084:             */
085:            public InvalidMetaDataException(Localiser localiser, String key,
086:                    Object param1, Object param2, Throwable cause) {
087:                this (localiser, key, param1, param2, "");
088:                this .cause = cause;
089:                setFatal();
090:            }
091:
092:            /**
093:             * Constructor with message resource, message params and cause exception
094:             * @param localiser message resources
095:             * @param key message resources key
096:             * @param param1 message resources param0
097:             * @param param2 message resources param1
098:             * @param param3 message resources param2
099:             * @param cause cause exception
100:             */
101:            public InvalidMetaDataException(Localiser localiser, String key,
102:                    Object param1, Object param2, Object param3, Throwable cause) {
103:                super (localiser.msg(key, param1, param2, param3));
104:                this .messageKey = key;
105:                this .cause = cause;
106:                setFatal();
107:            }
108:
109:            /**
110:             * Constructor with message resource 
111:             * @param localiser message resources
112:             * @param key message resources key
113:             */
114:            public InvalidMetaDataException(Localiser localiser, String key) {
115:                this (localiser, key, "", "", "");
116:                setFatal();
117:            }
118:
119:            /**
120:             * Constructor with message resource, message param
121:             * @param localiser message resources
122:             * @param key message resources key
123:             * @param param1 message resources param0
124:             */
125:            public InvalidMetaDataException(Localiser localiser, String key,
126:                    Object param1) {
127:                this (localiser, key, param1, "", "");
128:                setFatal();
129:            }
130:
131:            /**
132:             * Constructor with message resource, message params
133:             * @param localiser message resources
134:             * @param key message resources key
135:             * @param param1 message resources param0
136:             * @param param2 message resources param1
137:             */
138:            public InvalidMetaDataException(Localiser localiser, String key,
139:                    Object param1, Object param2) {
140:                this (localiser, key, param1, param2, "");
141:                setFatal();
142:            }
143:
144:            /**
145:             * Constructor with message resource, message params
146:             * @param localiser message resources
147:             * @param key message resources key
148:             * @param param1 message resources param0
149:             * @param param2 message resources param1
150:             * @param param3 message resources param2
151:             */
152:            public InvalidMetaDataException(Localiser localiser, String key,
153:                    Object param1, Object param2, Object param3) {
154:                super (localiser.msg(key, param1, param2, param3));
155:                this .messageKey = key;
156:                setFatal();
157:            }
158:
159:            /**
160:             * Constructor with message resource, message params
161:             * @param localiser message resources
162:             * @param key message resources key
163:             * @param param1 message resources param1
164:             * @param param2 message resources param2
165:             * @param param3 message resources param3
166:             * @param param4 message resources param4
167:             */
168:            public InvalidMetaDataException(Localiser localiser, String key,
169:                    Object param1, Object param2, Object param3, Object param4) {
170:                super (localiser.msg(key, param1, param2, param3, param4));
171:                this .messageKey = key;
172:                setFatal();
173:            }
174:
175:            /**
176:             * Constructor with message resource, message params
177:             * @param localiser message resources
178:             * @param key message resources key
179:             * @param param1 message resources param1
180:             * @param param2 message resources param2
181:             * @param param3 message resources param3
182:             * @param param4 message resources param4
183:             * @param param5 message resources param5
184:             */
185:            public InvalidMetaDataException(Localiser localiser, String key,
186:                    Object param1, Object param2, Object param3, Object param4,
187:                    Object param5) {
188:                super (localiser
189:                        .msg(key, param1, param2, param3, param4, param5));
190:                this .messageKey = key;
191:                setFatal();
192:            }
193:
194:            /**
195:             * Return message resource key
196:             * @return Message resource key
197:             */
198:            public String getMessageKey() {
199:                return messageKey;
200:            }
201:
202:            /* (non-Javadoc)
203:             * @see java.lang.Throwable#printStackTrace()
204:             */
205:            public void printStackTrace() {
206:                super .printStackTrace();
207:                if (cause != null) {
208:                    cause.printStackTrace();
209:                }
210:            }
211:
212:            /* (non-Javadoc)
213:             * @see java.lang.Throwable#printStackTrace(java.io.PrintStream)
214:             */
215:            public void printStackTrace(PrintStream s) {
216:                super .printStackTrace(s);
217:                if (cause != null) {
218:                    cause.printStackTrace(s);
219:                }
220:            }
221:
222:            /* (non-Javadoc)
223:             * @see java.lang.Throwable#printStackTrace(java.io.PrintWriter)
224:             */
225:            public void printStackTrace(PrintWriter s) {
226:                super.printStackTrace(s);
227:                if (cause != null) {
228:                    cause.printStackTrace(s);
229:                }
230:            }
231:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.