Source Code Cross Referenced for SufficientFundRebuildDaoOjb.java in  » ERP-CRM-Financial » Kuali-Financial-System » org » kuali » module » gl » dao » ojb » 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.module.gl.dao.ojb 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright 2006-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.module.gl.dao.ojb;
017:
018:        import java.util.Collection;
019:
020:        import org.apache.ojb.broker.query.Criteria;
021:        import org.apache.ojb.broker.query.QueryByCriteria;
022:        import org.apache.ojb.broker.query.QueryFactory;
023:        import org.kuali.core.dao.ojb.PlatformAwareDaoBaseOjb;
024:        import org.kuali.kfs.KFSPropertyConstants;
025:        import org.kuali.module.gl.bo.SufficientFundRebuild;
026:        import org.kuali.module.gl.dao.SufficientFundRebuildDao;
027:
028:        /**
029:         * An OJB implementation of the SufficientFundRebuildDao
030:         */
031:        public class SufficientFundRebuildDaoOjb extends
032:                PlatformAwareDaoBaseOjb implements  SufficientFundRebuildDao {
033:            private static org.apache.log4j.Logger LOG = org.apache.log4j.Logger
034:                    .getLogger(SufficientFundRebuildDaoOjb.class);
035:
036:            /**
037:             * Constructs a SufficientFundRebuildDaoOjb instance
038:             */
039:            public SufficientFundRebuildDaoOjb() {
040:                super ();
041:            }
042:
043:            /**
044:             * Returns all sufficient fund rebuild balances in the database
045:             * 
046:             * @return a Collection with all sufficient fund rebuild balances
047:             * @see org.kuali.module.gl.dao.SufficientFundRebuildDao#getAll()
048:             */
049:            public Collection getAll() {
050:                QueryByCriteria qbc = QueryFactory.newQuery(
051:                        SufficientFundRebuild.class, (Criteria) null);
052:                qbc
053:                        .addOrderByAscending(KFSPropertyConstants.CHART_OF_ACCOUNTS_CODE);
054:                qbc
055:                        .addOrderByAscending(KFSPropertyConstants.ACCOUNT_FINANCIAL_OBJECT_TYPE_CODE);
056:                qbc
057:                        .addOrderByAscending(KFSPropertyConstants.ACCOUNT_NUMBER_FINANCIAL_OBJECT_CODE);
058:
059:                return getPersistenceBrokerTemplate().getCollectionByQuery(qbc);
060:            }
061:
062:            /**
063:             * Returns all sufficient fund rebuild balances with a given object type code
064:             * 
065:             * @param accountFinancialObjectTypeCode the object type code of sufficient fund balances to return
066:             * @return a Collection of qualifying sufficient fund balances
067:             * @see org.kuali.module.gl.dao.SufficientFundRebuildDao#getByType(java.lang.String)
068:             */
069:            public Collection getByType(String accountFinancialObjectTypeCode) {
070:                Criteria criteria = new Criteria();
071:                criteria
072:                        .addEqualTo(
073:                                KFSPropertyConstants.ACCOUNT_FINANCIAL_OBJECT_TYPE_CODE,
074:                                accountFinancialObjectTypeCode);
075:
076:                QueryByCriteria qbc = QueryFactory.newQuery(
077:                        SufficientFundRebuild.class, criteria);
078:                return getPersistenceBrokerTemplate().getCollectionByQuery(qbc);
079:            }
080:
081:            /**
082:             * Returns the sufficient fund rebuild balance by chart and account number/object code
083:             * 
084:             * @param chartOfAccountsCode the chart of the rebuild balance to return
085:             * @param accountNumberFinancialObjectCode the account number or object code of the rebuild balance to returnd
086:             * @return a qualifying sufficient fund rebuild record if found in the database, or null
087:             * @see org.kuali.module.gl.dao.SufficientFundRebuildDao#getByAccount(java.lang.String, java.lang.String)
088:             */
089:            public SufficientFundRebuild getByAccount(
090:                    String chartOfAccountsCode,
091:                    String accountNumberFinancialObjectCode) {
092:                Criteria criteria = new Criteria();
093:                criteria.addEqualTo(
094:                        KFSPropertyConstants.CHART_OF_ACCOUNTS_CODE,
095:                        chartOfAccountsCode);
096:                criteria
097:                        .addEqualTo(
098:                                KFSPropertyConstants.ACCOUNT_NUMBER_FINANCIAL_OBJECT_CODE,
099:                                accountNumberFinancialObjectCode);
100:
101:                QueryByCriteria qbc = QueryFactory.newQuery(
102:                        SufficientFundRebuild.class, criteria);
103:                return (SufficientFundRebuild) getPersistenceBrokerTemplate()
104:                        .getObjectByQuery(qbc);
105:            }
106:
107:            /**
108:             * Returns the sufficient fund rebuild balance with the primary key given by the parameters 
109:             * 
110:             * @param chartOfAccountsCode the chart of the rebuild balance to return
111:             * @param accountFinancialObjectTypeCode the object type code of the rebuild balance to return
112:             * @param accountNumberFinancialObjectCode the account number or fiscal object of the rebuild balance to return
113:             * @return the qualifying rebuild balance, or null if not found in the database
114:             * @see org.kuali.module.gl.dao.SufficientFundRebuildDao#get(java.lang.String, java.lang.String, java.lang.String)
115:             */
116:            public SufficientFundRebuild get(String chartOfAccountsCode,
117:                    String accountFinancialObjectTypeCode,
118:                    String accountNumberFinancialObjectCode) {
119:                Criteria criteria = new Criteria();
120:                criteria.addEqualTo(
121:                        KFSPropertyConstants.CHART_OF_ACCOUNTS_CODE,
122:                        chartOfAccountsCode);
123:                criteria
124:                        .addEqualTo(
125:                                KFSPropertyConstants.ACCOUNT_FINANCIAL_OBJECT_TYPE_CODE,
126:                                accountFinancialObjectTypeCode);
127:                criteria
128:                        .addEqualTo(
129:                                KFSPropertyConstants.ACCOUNT_NUMBER_FINANCIAL_OBJECT_CODE,
130:                                accountNumberFinancialObjectCode);
131:
132:                QueryByCriteria qbc = QueryFactory.newQuery(
133:                        SufficientFundRebuild.class, criteria);
134:                return (SufficientFundRebuild) getPersistenceBrokerTemplate()
135:                        .getObjectByQuery(qbc);
136:            }
137:
138:            /**
139:             * Saves a sufficient fund rebuild record to the database
140:             * 
141:             * @param sfrb the sufficient fund rebuild balance to save
142:             * @see org.kuali.module.gl.dao.SufficientFundRebuildDao#save(org.kuali.module.gl.bo.SufficientFundRebuild)
143:             */
144:            public void save(SufficientFundRebuild sfrb) {
145:                LOG.debug("save() started");
146:                getPersistenceBrokerTemplate().store(sfrb);
147:            }
148:
149:            /**
150:             * Deletes a sufficient fund rebuild record from the database
151:             * @param sfrb the sufficient fund rebuild balance to delete
152:             * @see org.kuali.module.gl.dao.SufficientFundRebuildDao#delete(org.kuali.module.gl.bo.SufficientFundRebuild)
153:             */
154:            public void delete(SufficientFundRebuild sfrb) {
155:                getPersistenceBrokerTemplate().delete(sfrb);
156:            }
157:
158:            /**
159:             * This method should only be used in unit tests. It loads all the gl_sf_rebuild_t rows in memory into a collection. This won't
160:             * sace for production.
161:             * 
162:             * Note, though, we're warned not to use this method outside unit tests but running the getAll() method, which
163:             * is basically equivalent, is just fine.  So you can probably run this one too.
164:             * 
165:             * @return a Collection of all sufficient fund rebuild records currently in the database
166:             */
167:            public Collection testingGetAllEntries() {
168:                LOG.debug("testingGetAllEntries() started");
169:
170:                Criteria criteria = new Criteria();
171:                QueryByCriteria qbc = QueryFactory.newQuery(
172:                        SufficientFundRebuild.class, criteria);
173:                qbc
174:                        .addOrderByAscending(KFSPropertyConstants.CHART_OF_ACCOUNTS_CODE);
175:                qbc
176:                        .addOrderByAscending(KFSPropertyConstants.ACCOUNT_FINANCIAL_OBJECT_TYPE_CODE);
177:                qbc
178:                        .addOrderByAscending(KFSPropertyConstants.ACCOUNT_NUMBER_FINANCIAL_OBJECT_CODE);
179:                return getPersistenceBrokerTemplate().getCollectionByQuery(qbc);
180:            }
181:
182:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.