Source Code Cross Referenced for InquiryCollectionDefinition.java in  » ERP-CRM-Financial » Kuali-Financial-System » org » kuali » core » datadictionary » 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 » ERP CRM Financial » Kuali Financial System » org.kuali.core.datadictionary 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright 2007 The Kuali Foundation.
003:         * 
004:         * Licensed under the Educational Community License, Version 1.0 (the "License");
005:         * you may not use this file except in compliance with the License.
006:         * You may obtain a copy of the License at
007:         * 
008:         * http://www.opensource.org/licenses/ecl1.php
009:         * 
010:         * Unless required by applicable law or agreed to in writing, software
011:         * distributed under the License is distributed on an "AS IS" BASIS,
012:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013:         * See the License for the specific language governing permissions and
014:         * limitations under the License.
015:         */
016:        package org.kuali.core.datadictionary;
017:
018:        import java.util.Collection;
019:        import java.util.Collections;
020:        import java.util.LinkedHashMap;
021:        import java.util.Map;
022:
023:        import org.apache.commons.logging.Log;
024:        import org.apache.commons.logging.LogFactory;
025:        import org.kuali.core.datadictionary.exception.DuplicateEntryException;
026:
027:        public class InquiryCollectionDefinition extends FieldDefinition
028:                implements  CollectionDefinitionI {
029:            private static Log LOG = LogFactory
030:                    .getLog(InquiryCollectionDefinition.class);
031:
032:            private String name;
033:
034:            private Class businessObjectClass;
035:
036:            private String numberOfColumns;
037:
038:            private Map inquiryFields;
039:
040:            private Map inquiryCollections;
041:
042:            private String summaryTitle;
043:
044:            private Map summaryFields;
045:
046:            public InquiryCollectionDefinition() {
047:                this .inquiryFields = new LinkedHashMap();
048:                this .inquiryCollections = new LinkedHashMap();
049:                this .summaryFields = new LinkedHashMap();
050:            }
051:
052:            public Class getBusinessObjectClass() {
053:                return businessObjectClass;
054:            }
055:
056:            public void setBusinessObjectClass(Class businessObjectClass) {
057:                this .businessObjectClass = businessObjectClass;
058:            }
059:
060:            public Collection getInquiryFields() {
061:                return Collections.unmodifiableCollection(this .inquiryFields
062:                        .values());
063:            }
064:
065:            public void setInquiryFields(Map inquiryFields) {
066:                this .inquiryFields = inquiryFields;
067:            }
068:
069:            public String getNumberOfColumns() {
070:                return numberOfColumns;
071:            }
072:
073:            public void setNumberOfColumns(String numberOfColumns) {
074:                this .numberOfColumns = numberOfColumns;
075:            }
076:
077:            public String getName() {
078:                return name;
079:            }
080:
081:            public void setName(String name) {
082:                this .name = name;
083:            }
084:
085:            // don't like this, but need to be able get resolve the property
086:            // AttriubteName
087:            public String getAttributeName() {
088:                return this .name;
089:            }
090:
091:            public void addInquiryField(FieldDefinition inquiryField) {
092:                if (inquiryField == null) {
093:                    throw new IllegalArgumentException(
094:                            "invalid (null) inquiryField");
095:                }
096:
097:                String itemName = inquiryField.getAttributeName();
098:                if (this .inquiryFields.containsKey(itemName)) {
099:                    throw new DuplicateEntryException(
100:                            "duplicate itemName entry for item '" + itemName
101:                                    + "'");
102:                }
103:
104:                this .inquiryFields.put(itemName, inquiryField);
105:            }
106:
107:            public void addSummaryField(FieldDefinition inquiryField) {
108:                if (inquiryField == null) {
109:                    throw new IllegalArgumentException(
110:                            "invalid (null) inquiryField");
111:                }
112:
113:                String itemName = inquiryField.getAttributeName();
114:                if (this .summaryFields.containsKey(itemName)) {
115:                    throw new DuplicateEntryException(
116:                            "duplicate itemName entry for item '" + itemName
117:                                    + "'");
118:                }
119:
120:                this .summaryFields.put(itemName, inquiryField);
121:            }
122:
123:            /**
124:             * @param inquiryCollection
125:             * @throws IllegalArgumentException
126:             *             if the given maintainableCollection is null
127:             */
128:            public void addInquiryCollection(
129:                    InquiryCollectionDefinition inquiryCollection) {
130:                if (inquiryCollection == null) {
131:                    throw new IllegalArgumentException(
132:                            "invalid (null) inquiryCollection");
133:                }
134:                if (LOG.isDebugEnabled()) {
135:                    LOG.debug("calling addinquiryCollection for field '"
136:                            + inquiryCollection.getName() + "'");
137:                }
138:
139:                String fieldName = inquiryCollection.getName();
140:                if (this .inquiryCollections.containsKey(fieldName)) {
141:                    throw new DuplicateEntryException(
142:                            "duplicate fieldName entry for field '" + fieldName
143:                                    + "'");
144:                }
145:
146:                this .inquiryCollections.put(fieldName, inquiryCollection);
147:            }
148:
149:            /**
150:             * @return Collection of all lookupField MaintainableCollectionDefinitions
151:             *         associated with this MaintainableCollectionDefinition, in the
152:             *         order in which they were added
153:             */
154:            public Collection<InquiryCollectionDefinition> getInquiryCollections() {
155:                return Collections
156:                        .unmodifiableCollection(this .inquiryCollections
157:                                .values());
158:            }
159:
160:            public Collection<? extends CollectionDefinitionI> getCollections() {
161:                return this .getInquiryCollections();
162:            }
163:
164:            public Collection getFields() {
165:                // TODO Auto-generated method stub
166:                return this .getInquiryFields();
167:            }
168:
169:            public boolean getIncludeAddLine() {
170:                return false;
171:            }
172:
173:            /**
174:             * @return Collection of all SummaryFieldDefinitions associated with this
175:             *         SummaryFieldDefinition, in the order in which they were added
176:             */
177:            public Collection<? extends FieldDefinitionI> getSummaryFields() {
178:                return Collections.unmodifiableCollection(this .summaryFields
179:                        .values());
180:            }
181:
182:            public boolean hasSummaryField(String key) {
183:                return this .summaryFields.containsKey(key);
184:            }
185:
186:            public void setSummaryTitle(String summaryTitle) {
187:                this .summaryTitle = summaryTitle;
188:            }
189:
190:            public String getSummaryTitle() {
191:                return this.summaryTitle;
192:            }
193:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.