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


001:        /*
002:         * Copyright 2005-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.service;
017:
018:        import java.sql.Timestamp;
019:        import java.text.ParseException;
020:        import java.util.Calendar;
021:        import java.util.Date;
022:
023:        /**
024:         * This interface defines methods that a DateTime service must provide
025:         */
026:        public interface DateTimeService {
027:            /**
028:             * Translates the specified date into a string without a time component, formatted according to "stringDateFormat" that the
029:             * service is configured with
030:             * 
031:             * @param date
032:             * @return formatted string version of the specified date
033:             */
034:            public String toDateString(Date date);
035:
036:            /**
037:             * Translates the specified date into a string with a time component, formatted according to the "stringDateTimeFormat" that the
038:             * service is configured with
039:             * 
040:             * @param date
041:             * @return formatted string version of the specified date
042:             */
043:            public String toDateTimeString(Date date);
044:
045:            /**
046:             * Translates the specified date into a string without a time component, formatted according to the specified pattern
047:             * 
048:             * @param date
049:             * @return formatted string version of the specified date
050:             */
051:            public String toString(Date date, String pattern);
052:
053:            /**
054:             * Returns the current date/time as a java.util.Date
055:             * 
056:             * @return current date/time
057:             */
058:            public Date getCurrentDate();
059:
060:            /**
061:             * Returns the current date/time as a java.sql.Timestamp
062:             * 
063:             * @return current date/time
064:             */
065:            public Timestamp getCurrentTimestamp();
066:
067:            /**
068:             * Returns the current date/time as a java.sql.Date
069:             * 
070:             * @return current date/time
071:             */
072:            public java.sql.Date getCurrentSqlDate();
073:
074:            /**
075:             * Returns the current date as a java.sql.Date rounded back to midnight. This is what the JDBC driver is supposed to do with
076:             * dates on their way to the database, so it can be convenient for comparing to dates from the database or input from the UI.
077:             * 
078:             * @return current date at the most recent midnight in the JVM's timezone
079:             */
080:            public java.sql.Date getCurrentSqlDateMidnight();
081:
082:            /**
083:             * Returns a Calendar initialized with the current Date
084:             * 
085:             * @return currennt Calendar
086:             */
087:            public Calendar getCurrentCalendar();
088:
089:            /**
090:             * Returns a Calendar initialized to the given Date
091:             * 
092:             * @return date-specific Calendar
093:             * @throws IllegalArgumentException if the given Date is null
094:             */
095:            public Calendar getCalendar(Date date);
096:
097:            /**
098:             * Translates the specified string into a date without a time component, formatted according to "stringDateFormat" that the
099:             * service is configured with
100:             * 
101:             * @param dateString
102:             * @return the date representation of the specified dateString
103:             * @throws ParseException
104:             */
105:            public Date convertToDate(String dateString) throws ParseException;
106:
107:            /**
108:             * Translates the specified string into a date with a time component, formatted according to "stringDateTimeFormat" that the
109:             * service is configured with
110:             * 
111:             * @param dateTimeString
112:             * @return the date representation of the specified dateTimeString
113:             * @throws ParseException
114:             */
115:            public Date convertToDateTime(String dateTimeString)
116:                    throws ParseException;
117:
118:            /**
119:             * Converts the given String into a java.sql.Timestamp instance according to the "stringDateTimeFormat" that the service is
120:             * configured with
121:             * 
122:             * @param timeString
123:             * @return java.sql.Timestamp
124:             * @throws IllegalArgumentException if the given string is null or blank
125:             * @throws ParseException if the string cannot be converted
126:             */
127:            public java.sql.Timestamp convertToSqlTimestamp(String timeString)
128:                    throws ParseException;
129:
130:            /**
131:             * Converts the given String into a java.sql.Date instance
132:             * 
133:             * @param dateString
134:             * @return java.sql.Date
135:             * @throws IllegalArgumentException if the given string is null or blank
136:             * @throws ParseException if the string cannot be converted
137:             */
138:            public java.sql.Date convertToSqlDate(String dateString)
139:                    throws ParseException;
140:
141:            /**
142:             * Converts a Timestamp into a sql Date.
143:             * 
144:             * @param timestamp
145:             * @return
146:             */
147:            public java.sql.Date convertToSqlDate(Timestamp timestamp)
148:                    throws ParseException;
149:
150:            /**
151:             * Returns the number of days between two days - start and end date of some arbitrary period.
152:             * 
153:             * @param date1 The first date in the period
154:             * @param date2 The second date in the period
155:             * @param inclusive Whether the result should include both the start and the end date. Otherwise it only includes one.
156:             * @return int The number of days in the period
157:             */
158:            public int dateDiff(Date date1, Date date2, boolean inclusive);
159:
160:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.