Java Doc for DateTimeUtils.java in  » Database-DBMS » axion » org » axiondb » util » 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 DBMS » axion » org.axiondb.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.axiondb.util.DateTimeUtils

DateTimeUtils
final public class DateTimeUtils (Code)
Methods to support manipulation and conversion of date, time and timestamp values.
version:
   $Revision: 1.11 $ $Date: 2005/12/20 18:32:42 $
author:
   Jonathan Giron
author:
   Ahimanikya Satapathy


Field Summary
final public static  intDAY
    
final public static  intHOUR
    
final public static  intMILLISECOND
    
final public static  intMINUTE
    
final public static  intMONTH
    
final public static  intQUARTER
    
final public static  intSECOND
    
final public static  intWEEK
    
final public static  intYEAR
    


Method Summary
public static  StringconvertToChar(Timestamp timestamp, String formatStr)
     Creates a String representation of the given Timestamp object, using the given format string as a template and the current Axion time zone.
public static  StringconvertToChar(Timestamp timestamp, String formatStr, TimeZone timezone)
     Creates a String representation of the given Timestamp object, using the given format string as a template, the given time zone, and the current default Locale.
public static  StringconvertToChar(Timestamp timestamp, String formatStr, TimeZone timezone, Locale locale)
     Creates a String representation of the given Timestamp object, using the given format string as a template, the given time zone, and the given Locale.
public static  TimestampconvertToTimestamp(String dateStr, String formatStr)
     Creates a String representation of the given Timestamp object, using the given format string as a template and the current Axion time zone.
public static  TimestampconvertToTimestamp(String dateStr, String formatStr, TimeZone timezone)
     Creates a String representation of the given Timestamp object, using the given format string as a template and the given time zone.
public static  TimestampconvertToTimestamp(String dateStr, String formatStr, TimeZone timezone, Locale locale)
    
public static  StringgetDatePart(Timestamp t, String partIdent)
     Extracts the specified date/time element from the given Timestamp, using the default Locale.
Parameters:
  t - timestamp from which date/time element will be extracted
Parameters:
  partIdent - date part to extract, e.g., 'yyyy', 'mm', etc.
public static  StringgetDatePart(Timestamp t, String partIdent, Locale locale)
     Extracts the specified date/time element from the given Timestamp, using the given Locale.
public static  StringgetPartMnemonicFor(String partString)
    
public static  intlabelToCode(String value)
     Converts the given value, which represents a date or time interval, to its corresponding constant value.
static  StringprocessFormatString(String rawFormat)
     Converts the given Axion date format string into a format usable with java.util.SimpleDateFormat.

Field Detail
DAY
final public static int DAY(Code)
Constant representing day interval



HOUR
final public static int HOUR(Code)
Constant representing hour time interval



MILLISECOND
final public static int MILLISECOND(Code)
Constant representing millisecond time interval



MINUTE
final public static int MINUTE(Code)
Constant representing minute time interval



MONTH
final public static int MONTH(Code)
Constant representing month interval



QUARTER
final public static int QUARTER(Code)
Constant representing quarter interval



SECOND
final public static int SECOND(Code)
Constant representing second time interval



WEEK
final public static int WEEK(Code)
Constant representing week interval



YEAR
final public static int YEAR(Code)
Constant representing year interval





Method Detail
convertToChar
public static String convertToChar(Timestamp timestamp, String formatStr) throws AxionException(Code)
Creates a String representation of the given Timestamp object, using the given format string as a template and the current Axion time zone.
Parameters:
  timestamp - Timestamp object to be converted to a String representation
Parameters:
  formatStr - template describing the desired format for the Stringrepresentation of timestamp formatted String representation of timestamp
throws:
  AxionException - if format is invalid
See Also:   DateTimeUtils.convertToChar(Timestamp,String,java.util.TimeZone)



convertToChar
public static String convertToChar(Timestamp timestamp, String formatStr, TimeZone timezone) throws AxionException(Code)
Creates a String representation of the given Timestamp object, using the given format string as a template, the given time zone, and the current default Locale.
Parameters:
  timestamp - Timestamp object to be converted to a String representation
Parameters:
  formatStr - template describing the desired format for the Stringrepresentation of timestamp
Parameters:
  timezone - TimeZone to use in interpreting the value of timestamp to the desired String representation formatted String representation of timestamp
throws:
  AxionException - if format is invalid
See Also:   DateTimeUtils.convertToChar(Timestamp,String)
See Also:   DateTimeUtils.convertToChar(Timestamp,String,TimeZone,Locale)



convertToChar
public static String convertToChar(Timestamp timestamp, String formatStr, TimeZone timezone, Locale locale) throws AxionException(Code)
Creates a String representation of the given Timestamp object, using the given format string as a template, the given time zone, and the given Locale.
Parameters:
  timestamp - Timestamp object to be converted to a String representation
Parameters:
  formatStr - template describing the desired format for the Stringrepresentation of timestamp
Parameters:
  timezone - TimeZone to use in interpreting the value oftimestamp to the desired String representation
Parameters:
  locale - Locale to use in resolving date components formatted String representation of timestamp
throws:
  AxionException - if format is invalid
See Also:   DateTimeUtils.convertToChar(Timestamp,String)
See Also:   DateTimeUtils.convertToChar(Timestamp,String,TimeZone)



convertToTimestamp
public static Timestamp convertToTimestamp(String dateStr, String formatStr) throws AxionException(Code)
Creates a String representation of the given Timestamp object, using the given format string as a template and the current Axion time zone.
Parameters:
  dateStr - String representation of Timestamp to be returned
Parameters:
  formatStr - template describing the format of dateStr Timestamp containing date represented by dateStr
throws:
  AxionException - if format is invalid
See Also:   DateTimeUtils.convertToTimestamp(String,String,java.util.TimeZone)
See Also:   DateTimeUtils.convertToTimestamp(String,String,java.util.TimeZone,java.util.Locale)



convertToTimestamp
public static Timestamp convertToTimestamp(String dateStr, String formatStr, TimeZone timezone) throws AxionException(Code)
Creates a String representation of the given Timestamp object, using the given format string as a template and the given time zone.
Parameters:
  dateStr - String representation of Timestamp to be returned
Parameters:
  formatStr - template describing the format of dateStr
Parameters:
  timezone - TimeZone to use in interpreting the value of dateStr Timestamp containing date represented by dateStr
throws:
  AxionException - if format is invalid
See Also:   DateTimeUtils.convertToTimestamp(String,String)
See Also:   
See Also:   DateTimeUtils.convertToTimestamp(String,String,java.util.TimeZone,java.util.Locale)



convertToTimestamp
public static Timestamp convertToTimestamp(String dateStr, String formatStr, TimeZone timezone, Locale locale) throws AxionException(Code)
Creates a String representation of the given Timestamp object, using the given format string as a template, the given time zone, and the given Locale
Parameters:
  dateStr - String representation of Timestamp to be returned
Parameters:
  formatStr - template describing the format of dateStr
Parameters:
  timezone - TimeZone to use in interpreting the value of dateStr
Parameters:
  locale - Locale to use in resolving date components Timestamp containing date represented by dateStr
throws:
  AxionException - if format is invalid
See Also:   DateTimeUtils.convertToTimestamp(String,String)
See Also:   DateTimeUtils.convertToTimestamp(String,String,java.util.TimeZone)



getDatePart
public static String getDatePart(Timestamp t, String partIdent) throws AxionException(Code)
Extracts the specified date/time element from the given Timestamp, using the default Locale.
Parameters:
  t - timestamp from which date/time element will be extracted
Parameters:
  partIdent - date part to extract, e.g., 'yyyy', 'mm', etc. String representation of extracted date/time element
throws:
  AxionException - if error occurs during extraction
See Also:   DateTimeUtils.getDatePart(Timestamp,String,Locale)



getDatePart
public static String getDatePart(Timestamp t, String partIdent, Locale locale) throws AxionException(Code)
Extracts the specified date/time element from the given Timestamp, using the given Locale.
Parameters:
  t - timestamp from which date/time element will be extracted
Parameters:
  partIdent - date part to extract, e.g., 'yyyy', 'mm', etc.
Parameters:
  locale - Locale to use in resolving date components String representation of extracted date/time element
throws:
  AxionException - if error occurs during extraction
See Also:   DateTimeUtils.getDatePart(Timestamp,String)



getPartMnemonicFor
public static String getPartMnemonicFor(String partString) throws AxionException(Code)

Parameters:
  partCode -



labelToCode
public static int labelToCode(String value) throws AxionException(Code)
Converts the given value, which represents a date or time interval, to its corresponding constant value.
Parameters:
  value - String representation of date or time interval constant value corresponding to value
throws:
  AxionException - if value does not have a corresponding constant.



processFormatString
static String processFormatString(String rawFormat) throws AxionException(Code)
Converts the given Axion date format string into a format usable with java.util.SimpleDateFormat.
Parameters:
  rawFormat - format string using Axion date/time mnemonics format string using SimpleDateFormat date/time mnemonics
throws:
  AxionException - if rawFormat could not be successfullyconverted to the appropriate SimpleDateFormat version



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.