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