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


001:        package org.exolab.castor.mapping.loader;
002:
003:        import org.exolab.castor.mapping.ClassDescriptor;
004:        import org.exolab.castor.mapping.FieldDescriptor;
005:        import org.exolab.castor.mapping.FieldHandler;
006:
007:        public abstract class AbstractFieldDescriptor implements 
008:                FieldDescriptor {
009:            //--------------------------------------------------------------------------
010:
011:            /** A reference to the containing class descriptor (parent). */
012:            private ClassDescriptor _parent;
013:
014:            /** The name of the field. */
015:            private String _fieldName;
016:
017:            /** The type of the field. */
018:            private Class _fieldType;
019:
020:            /** The type class descriptor, if this field is of a type known by a descriptor. */
021:            private ClassDescriptor _classDescriptor;
022:
023:            /** The field handler for get/set field value. */
024:            private FieldHandler _handler;
025:
026:            /** True if the field is transient and should not be saved/stored. */
027:            private boolean _transient;
028:
029:            /** True if the described field type is immutable. */
030:            private boolean _immutable;
031:
032:            /** True if the field type is required. */
033:            private boolean _required;
034:
035:            /** True if the object described by this descriptor is multivalued. */
036:            private boolean _multivalued;
037:
038:            /** True if the field is part of the identity of the class. */
039:            private boolean _identity;
040:
041:            //--------------------------------------------------------------------------
042:
043:            /**
044:             * @see org.exolab.castor.mapping.FieldDescriptor#setContainingClassDescriptor(
045:             *      org.exolab.castor.mapping.ClassDescriptor)
046:             * {@inheritDoc}
047:             */
048:            public final void setContainingClassDescriptor(
049:                    final ClassDescriptor parent) {
050:                _parent = parent;
051:            }
052:
053:            /**
054:             * @see org.exolab.castor.mapping.FieldDescriptor#getContainingClassDescriptor()
055:             * {@inheritDoc}
056:             */
057:            public final ClassDescriptor getContainingClassDescriptor() {
058:                return _parent;
059:            }
060:
061:            /**
062:             * Set the name of the field.
063:             * 
064:             * @param fieldName Field name.
065:             */
066:            public final void setFieldName(final String fieldName) {
067:                _fieldName = fieldName;
068:            }
069:
070:            /**
071:             * @see org.exolab.castor.mapping.FieldDescriptor#getFieldName()
072:             * {@inheritDoc}
073:             */
074:            public final String getFieldName() {
075:                return _fieldName;
076:            }
077:
078:            /**
079:             * Set the type of the field.
080:             * 
081:             * @param fieldType Field type.
082:             */
083:            public final void setFieldType(final Class fieldType) {
084:                _fieldType = fieldType;
085:            }
086:
087:            /**
088:             * @see org.exolab.castor.mapping.FieldDescriptor#getFieldType()
089:             * {@inheritDoc}
090:             */
091:            public final Class getFieldType() {
092:                return _fieldType;
093:            }
094:
095:            /**
096:             * Set the ClassDescriptor for the described field.
097:             *
098:             * @param classDescriptor The ClassDescriptor for the described field.
099:             */
100:            public final void setClassDescriptor(
101:                    final ClassDescriptor classDescriptor) {
102:                _classDescriptor = classDescriptor;
103:            }
104:
105:            /**
106:             * @see org.exolab.castor.mapping.FieldDescriptor#getClassDescriptor()
107:             * {@inheritDoc}
108:             */
109:            public final ClassDescriptor getClassDescriptor() {
110:                return _classDescriptor;
111:            }
112:
113:            /**
114:             * Set the FieldHandler for the field being described by this FieldDescriptor.
115:             *
116:             * @param handler The FieldHandler for the field being described.
117:             */
118:            public final void setHandler(final FieldHandler handler) {
119:                _handler = handler;
120:            }
121:
122:            /**
123:             * @see org.exolab.castor.mapping.FieldDescriptor#getHandler()
124:             * {@inheritDoc}
125:             */
126:            public final FieldHandler getHandler() {
127:                return _handler;
128:            }
129:
130:            /**
131:             * Sets whether or not the describled field is 'transient'.
132:             * 
133:             * @param isTransient The flag indicating if the described field is 'transient'.
134:             */
135:            public final void setTransient(final boolean isTransient) {
136:                _transient = isTransient;
137:            }
138:
139:            /**
140:             * @see org.exolab.castor.mapping.FieldDescriptor#isTransient()
141:             * {@inheritDoc}
142:             */
143:            public final boolean isTransient() {
144:                return _transient;
145:            }
146:
147:            /**
148:             * Set the immutable flag which indicates that changes to this Field result in a
149:             * new Object to be created, such as java.lang.String. It serves to identify fields
150:             * which should not be constructed until all the data is available.
151:             * 
152:             * @param immutable Flag which if true indicates that the field is immutable.
153:             */
154:            public final void setImmutable(final boolean immutable) {
155:                _immutable = immutable;
156:            }
157:
158:            /**
159:             * @see org.exolab.castor.mapping.FieldDescriptor#isImmutable()
160:             * {@inheritDoc}
161:             */
162:            public final boolean isImmutable() {
163:                return _immutable;
164:            }
165:
166:            /**
167:             * Set whether or not the described field is required.
168:             * 
169:             * @param required The flag indicating whether or not the described field is required.
170:             */
171:            public final void setRequired(final boolean required) {
172:                _required = required;
173:            }
174:
175:            /**
176:             * @see org.exolab.castor.mapping.FieldDescriptor#isRequired()
177:             * {@inheritDoc}
178:             */
179:            public final boolean isRequired() {
180:                return _required;
181:            }
182:
183:            /**
184:             * Set wheter the object described by this descriptor is multivalued or not.
185:             * 
186:             * @param multivalued True if the object described by this descriptor is multivalued.
187:             */
188:            public final void setMultivalued(final boolean multivalued) {
189:                _multivalued = multivalued;
190:            }
191:
192:            /**
193:             * @see org.exolab.castor.mapping.FieldDescriptor#isMultivalued()
194:             * {@inheritDoc}
195:             */
196:            public final boolean isMultivalued() {
197:                return _multivalued;
198:            }
199:
200:            /**
201:             * Set wether the described field is part of the identity of the class it belongs to.
202:             * 
203:             * @param identity <code>true</code> if field is part of the classes identity.
204:             */
205:            public final void setIdentity(final boolean identity) {
206:                _identity = identity;
207:            }
208:
209:            /**
210:             * Is the described field is part of the identity of the class it belongs to?
211:             * 
212:             * @return <code>true</code> if field is part of the classes identity.
213:             */
214:            public final boolean isIdentity() {
215:                return _identity;
216:            }
217:
218:            //--------------------------------------------------------------------------
219:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.