Source Code Cross Referenced for ReportParam.java in  » ERP-CRM-Financial » sakai » org » theospi » portfolio » reports » model » 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 » sakai » org.theospi.portfolio.reports.model 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**********************************************************************************
002:         * $URL:https://source.sakaiproject.org/svn/osp/trunk/reports/api/src/java/org/theospi/portfolio/reports/model/ReportParam.java $
003:         * $Id:ReportParam.java 9134 2006-05-08 20:28:42Z chmaurer@iupui.edu $
004:         ***********************************************************************************
005:         *
006:         * Copyright (c) 2005, 2006 The Sakai Foundation.
007:         *
008:         * Licensed under the Educational Community License, Version 1.0 (the "License");
009:         * you may not use this file except in compliance with the License.
010:         * You may obtain a copy of the License at
011:         *
012:         *      http://www.opensource.org/licenses/ecl1.php
013:         *
014:         * Unless required by applicable law or agreed to in writing, software
015:         * distributed under the License is distributed on an "AS IS" BASIS,
016:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
017:         * See the License for the specific language governing permissions and
018:         * limitations under the License.
019:         *
020:         **********************************************************************************/package org.theospi.portfolio.reports.model;
021:
022:        import org.sakaiproject.metaobj.shared.model.Id;
023:
024:        import java.util.List;
025:        import java.util.ArrayList;
026:
027:        public class ReportParam {
028:            /** the identifier to the report paramater */
029:            private Id paramId = null;
030:
031:            /** the identifier to the report definition for the paramater */
032:            private Report report = null;
033:
034:            /** the reportDefParamId for the report definition parameter */
035:            private ReportDefinitionParam reportDefinitionParam = null;
036:
037:            /** the type for the report definition Parameter 
038:             * 	This is validation rules for fillin parameters,
039:             * 	a set of strings for sets (both value and title),
040:             * and the query if the value type is a sql query
041:             */
042:            private String value = null;
043:
044:            /** true when the value passes the test and false when the value changes */
045:            private boolean validated = false;
046:
047:            /** the results of the last validation */
048:            private boolean valid = false;
049:
050:            private String reportDefParamIdMark = null;
051:
052:            private List listValue = null;
053:
054:            /**
055:             * the getter for the paramId property
056:             * @return String the unique identifier
057:             */
058:            public Id getParamId() {
059:                return paramId;
060:            }
061:
062:            /**
063:             * the setter for the paramId property.  This is set by the bean 
064:             * and by hibernate.
065:             * @param paramId String
066:             */
067:            public void setParamId(Id paramId) {
068:                this .paramId = paramId;
069:            }
070:
071:            /**
072:             * the getter for the report property
073:             * @return String the unique identifier
074:             */
075:            public Report getReport() {
076:                return report;
077:            }
078:
079:            /**
080:             * the setter for the report property.  This is set by the bean 
081:             * and by hibernate.
082:             * @param report Report
083:             */
084:            public void setReport(Report report) {
085:                this .report = report;
086:            }
087:
088:            /**
089:             * the getter for the reportDefinitionParam property
090:             * @return ReportDefinitionParam the unique identifier
091:             */
092:            public ReportDefinitionParam getReportDefinitionParam() {
093:                return reportDefinitionParam;
094:            }
095:
096:            /**
097:             * the setter for the reportDefinitionParam property.  This is set by the bean 
098:             * and by hibernate.
099:             * @param reportDefinitionParam String
100:             */
101:            public void setReportDefinitionParam(
102:                    ReportDefinitionParam reportDefinitionParam) {
103:                this .reportDefinitionParam = reportDefinitionParam;
104:            }
105:
106:            /**
107:             * This is a way of separating the report definition from the report in the database
108:             * this is a temp solution while the report definitions aren't being stored in the database
109:             * @return String
110:             */
111:            public String getReportDefParamIdMark() {
112:                if (reportDefinitionParam == null)
113:                    return reportDefParamIdMark;
114:                return reportDefinitionParam.getIdString();
115:            }
116:
117:            /**
118:             * this is the link to report definition
119:             * @param reportDefIdMark String
120:             */
121:            public void setReportDefParamIdMark(String reportDefParamIdMark) {
122:                reportDefinitionParam = null;
123:                this .reportDefParamIdMark = reportDefParamIdMark;
124:            }
125:
126:            /**
127:             * the getter for the value property
128:             * @return String the value
129:             */
130:            public String getValue() {
131:                if (value == null && getListValue() != null) {
132:                    value = getListValue().toString();
133:                }
134:                return value;
135:            }
136:
137:            /**
138:             * the setter for the value property.  This is set by the bean or the user 
139:             * and by hibernate.
140:             * @param value String
141:             */
142:            public void setValue(String value) {
143:                this .value = value;
144:                validated = false;
145:            }
146:
147:            /**
148:             * Checks to make sure that the value can be selected.
149:             * Apply validation rules, check against set, check against the sql results
150:             * @return boolean
151:             */
152:            public boolean valid() {
153:                if (value == null)
154:                    return false;
155:                if (!validated) {
156:                    valid = true;
157:
158:                    //do the check here
159:
160:                    validated = true;
161:                }
162:                return valid;
163:            }
164:
165:            public List getListValue() {
166:                if (listValue == null && this .value != null) {
167:                    initListValue(this .value);
168:                }
169:                return listValue;
170:            }
171:
172:            public void setListValue(List listValue) {
173:                this .listValue = listValue;
174:                validated = false;
175:            }
176:
177:            public void initListValue(String value) {
178:                if (value == null
179:                        || ((value.indexOf("[") < 0) || (value.indexOf("]") < 0)))
180:                    return;
181:                String strSet = value.substring(value.indexOf("[") + 1, value
182:                        .indexOf("]"));
183:                String[] set = strSet.split(",");
184:                List valueList = new ArrayList();
185:                for (int i = 0; i < set.length; i++) {
186:                    valueList.add(set[i].trim());
187:                }
188:                setListValue(valueList);
189:            }
190:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.