Source Code Cross Referenced for BindingComponent.java in  » Database-ORM » castor » org » exolab » castor » builder » 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 » castor » org.exolab.castor.builder 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Redistribution and use of this software and associated documentation
003:         * ("Software"), with or without modification, are permitted provided
004:         * that the following conditions are met:
005:         *
006:         * 1. Redistributions of source code must retain copyright
007:         *    statements and notices.  Redistributions must also contain a
008:         *    copy of this document.
009:         *
010:         * 2. Redistributions in binary form must reproduce the
011:         *    above copyright notice, this list of conditions and the
012:         *    following disclaimer in the documentation and/or other
013:         *    materials provided with the distribution.
014:         *
015:         * 3. The name "Exolab" must not be used to endorse or promote
016:         *    products derived from this Software without prior written
017:         *    permission of Intalio, Inc.  For written permission,
018:         *    please contact info@exolab.org.
019:         *
020:         * 4. Products derived from this Software may not be called "Exolab"
021:         *    nor may "Exolab" appear in their names without prior written
022:         *    permission of Intalio, Inc. Exolab is a registered
023:         *    trademark of Intalio, Inc.
024:         *
025:         * 5. Due credit should be given to the Exolab Project
026:         *    (http://www.exolab.org/).
027:         *
028:         * THIS SOFTWARE IS PROVIDED BY INTALIO, INC. AND CONTRIBUTORS
029:         * ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
030:         * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
031:         * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
032:         * INTALIO, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
033:         * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
034:         * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
035:         * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
036:         * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
037:         * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
038:         * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
039:         * OF THE POSSIBILITY OF SUCH DAMAGE.
040:         *
041:         * Copyright 2002 (C) Intalio Inc. All Rights Reserved.
042:         *
043:         * $Id: BindingComponent.java 6919 2007-04-01 18:11:00Z wguttmn $
044:         */
045:        package org.exolab.castor.builder;
046:
047:        import org.exolab.castor.builder.binding.xml.EnumBindingType;
048:        import org.exolab.castor.builder.types.XSType;
049:
050:        /**
051:         * This interface is the abstraction of any type of source that can interact
052:         * with the Source Code Generator. From the Source Code Generator point of view,
053:         * the source document used to generate Java source code is totally transparent
054:         * and is not exposed.
055:         * <p>
056:         * Specific implementation of that class will represent the source document
057:         * used. For instance when generating source code from an XML Schema, the source
058:         * generator will interact with an
059:         * {@link org.exolab.castor.builder.binding.XMLBindingComponent} whereas when
060:         * generating source code from an UML model object model, the source generator
061:         * will interact with an UMLBindingComponent (This is obviously just an example,
062:         * no UML Object Model has been as of today integrated in Castor).
063:         * <p>
064:         * A binding component can be of three different types:
065:         * <ul>
066:         *   <li>MEMBER: this type of BindingComponent will represent a java class
067:         *       member.</li>
068:         *   <li>INTERFACE: this type of BindingComponent will represent a java
069:         *       interface.</li>
070:         *   <li>CLASS: this type of BindingComponent will represent a java class.</li>
071:         * </ul>
072:         *
073:         * @author <a href="mailto:blandin@intalio.com">Arnaud Blandin</a>
074:         * @version $Revision: 6919 $ $Date: 2005-03-05 06:42:06 -0700 (Sat, 05 Mar
075:         *          2005) $
076:         */
077:        public interface BindingComponent {
078:
079:            /** An interface binding component. */
080:            short INTERFACE = 0;
081:            /** A class binding component. */
082:            short CLASS = 1;
083:            /** A member binding component. */
084:            short MEMBER = 2;
085:            /** An enum binding component. */
086:            short ENUM_TYPE = 3;
087:            /** A content member binding component. */
088:            short CONTENT_MEMBER_TYPE = 4;
089:
090:            /**
091:             * Returns true if the given Object is equal to this instance of
092:             * BindingComponent.
093:             *
094:             * @param object the object to compare to this instance
095:             * @return true if the given Object is equal to this instance of
096:             *         BindingComponent.
097:             * @see java.lang.Object#equals(java.lang.Object)
098:             */
099:            boolean equals(Object object);
100:
101:            /**
102:             * Returns the name of collection type such as 'arraylist' in which we will
103:             * store the different occurrences of the java member generated to represent
104:             * that BindingComponent.
105:             *
106:             * @return a string that represents the collection type such as 'arraylist'
107:             *         name in which we will store the different occurrences of the java
108:             *         member generated to represent that BindingComponent.
109:             */
110:            String getCollectionType();
111:
112:            /**
113:             * Returns the name of a super class for the current BindingComponent. Null
114:             * is returned if this BindingComponent is not meant to be mapped to a java
115:             * class.
116:             *
117:             * @return the name of a super class for the current BindingComponent. Null
118:             *         is returned if this BindingComponent is not meant to be mapped to
119:             *         a java class.
120:             */
121:            String getExtends();
122:
123:            /**
124:             * Returns an array of the different interface names implemented by the
125:             * class that will represent the current BindingComponent. Null is returned
126:             * if this BindingComponent is not meant to be mapped to a java class.
127:             *
128:             * @return an array of the different interface names implemented by the
129:             *         class that will represent the current BindingComponent. Null is
130:             *         returned if this BindingComponent is not meant to be mapped to a
131:             *         java class.
132:             */
133:            String[] getImplements();
134:
135:            /**
136:             * Returns a valid Java Class Name corresponding to this BindingComponent.
137:             * This name is not qualified, this is only a local Java class name.
138:             *
139:             * @return a valid Java Class Name corresponding to this BindingComponent.
140:             *         This name is not qualified, this is only a local Java class name.
141:             * @see #getQualifiedName
142:             */
143:            String getJavaClassName();
144:
145:            /**
146:             * Returns a valid Java Member Name corresponding to this BindingComponent.
147:             * This name is not qualified, this is only a local Java Member name.
148:             *
149:             * @return a valid Java Member Name corresponding to this BindingComponent.
150:             *         This name is not qualified, this is only a local Java member
151:             *         name.
152:             * @see #getQualifiedName
153:             */
154:            String getJavaMemberName();
155:
156:            /**
157:             * Returns the java package associated with this BindingComponent.
158:             *
159:             * @return the java package associated with this BindingComponent.
160:             */
161:            String getJavaPackage();
162:
163:            /**
164:             * Returns the XSType that corresponds to the Java type chosen to represent
165:             * this BindingComponent. An XSType is an abstraction of a Java type used in
166:             * the Source Generator. It wraps a JType as well as the necessary methods
167:             * to convert to/from String.
168:             *
169:             * @return an XSType that corresponds to the Java type chosen to represent
170:             *         this BindingComponent.
171:             */
172:            XSType getJavaType();
173:
174:            /**
175:             * Returns the lower bound of the collection that is generated from this
176:             * BindingComponent. The lower bound is a positive integer.
177:             *
178:             * @return an int representing the lower bound of the collection generated
179:             *         from this BindingComponent.
180:             */
181:            int getLowerBound();
182:
183:            /**
184:             * Returns a fully qualified java class name. This name corresponds to the
185:             * class name that will be generated from this BindingComponent.
186:             *
187:             * @return a fully qualified java class name. This name corresponds to the
188:             *         class name corresponding to this BindingComponent.
189:             */
190:            String getQualifiedName();
191:
192:            /**
193:             * Returns the type of this component binding. A component binding can be of
194:             * three different types:
195:             * <ul>
196:             *   <li>Interface: it represents the binding to a java interface.</li>
197:             *   <li>Class: it represents the binding to a java class.</li>
198:             *   <li>Member: it represents the binding to a java class member.</li>
199:             * </ul>
200:             * -1 is returned if the component binding is null.
201:             *
202:             * @return the type of this component binding.
203:             */
204:            short getType();
205:
206:            /**
207:             * Returns the upper bound of the collection that is generated from this
208:             * BindingComponent. The upper bound is a positive integer. -1 is returned
209:             * to indicate that the upper bound is unbounded.
210:             *
211:             * @return an int representing the lower bound of the collection generated
212:             *         from this BindingComponent. -1 is returned to indicate that the
213:             *         upper bound is uinbounded.
214:             */
215:            int getUpperBound();
216:
217:            /**
218:             * Returns the default value of the member generated from this binding
219:             * component. The value is returned as its string representation.
220:             *
221:             * @return a string representation of default value for the member generated
222:             *         from this binding component.
223:             */
224:            String getValue();
225:
226:            /**
227:             * Returns the fully qualified name of the Validator to use.
228:             *
229:             * @return the fully qualified name of the Validator to use.
230:             */
231:            String getValidator();
232:
233:            /**
234:             * Returns the EnumBindingType instance for the active binding component.
235:             * @return The EnumBindingType instance
236:             */
237:            EnumBindingType getEnumBinding();
238:
239:            /**
240:             * Returns the fully qualified name of the XMLFieldHandler to use. This
241:             * handler will be used when generating ClassDescriptors meant to be used in
242:             * the marshalling framework.
243:             *
244:             * @return the fully qualified name of the XMLFieldHandler to use.
245:             */
246:            String getXMLFieldHandler();
247:
248:            /**
249:             * Returns true if bound properties must be generated for the class that
250:             * will represent the current BindingComponent.
251:             *
252:             * @return true if bound properties must be generated for the class the
253:             *         class that will represent the current BindingComponent.
254:             */
255:            boolean hasBoundProperties();
256:
257:            /**
258:             * Returns true if equal method must be generated for the class that will
259:             * represent the current BindingComponent.
260:             *
261:             * @return true if equal method must be generated for the class the class
262:             *         that will represent the current BindingComponent.
263:             */
264:            boolean hasEquals();
265:
266:            /**
267:             * Returns the hashCode value for this object.
268:             *
269:             * @return the hashcode value for this object.
270:             * @see java.lang.Object#hashCode()
271:             */
272:            int hashCode();
273:
274:            /**
275:             * Returns true if the class generated from the current BindingComponent
276:             * will be abstract.
277:             *
278:             * @return true if the class generated from the current BindingComponent
279:             *         will be abstract.
280:             */
281:            boolean isAbstract();
282:
283:            /**
284:             * Returns true if the class generated from the current BindingComponent
285:             * will be final.
286:             *
287:             * @return true if the class generated from the current BindingComponent
288:             *         will be final.
289:             */
290:            boolean isFinal();
291:
292:            /**
293:             * Returns true if the member represented by that BindingComponent is to be
294:             * represented by an Object wrapper. For instance an int will be represented
295:             * by a java Integer if the property is set to true.
296:             *
297:             * @return true if the member represented by that BindingComponent is to be
298:             *         represented by an Object wrapper.
299:             */
300:            boolean useWrapper();
301:
302:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.