Java Doc for PGInterval.java in  » Database-JDBC-Connection-Pool » postgresql » org » postgresql » 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 JDBC Connection Pool » postgresql » org.postgresql.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.postgresql.util.PGobject
      org.postgresql.util.PGInterval

PGInterval
public class PGInterval extends PGobject implements Serializable,Cloneable(Code)
This implements a class that handles the PostgreSQL interval type



Constructor Summary
public  PGInterval()
    
public  PGInterval(String value)
     Initialize a interval with a given interval string representation
Parameters:
  value - String representated interval (e.g.
public  PGInterval(int years, int months, int days, int hours, int minutes, double seconds)
    

Method Summary
public  voidadd(Calendar cal)
    
public  voidadd(Date date)
    
public  voidadd(PGInterval interval)
     Add this interval's value to the passed interval.
public  booleanequals(Object obj)
    
public  intgetDays()
    
public  intgetHours()
    
public  intgetMinutes()
    
public  intgetMonths()
    
public  doublegetSeconds()
    
public  StringgetValue()
    
public  intgetYears()
    
public  inthashCode()
    
public  voidscale(int factor)
     Scale this interval by an integer factor.
public  voidsetDays(int days)
    
public  voidsetHours(int hours)
    
public  voidsetMinutes(int minutes)
    
public  voidsetMonths(int months)
    
public  voidsetSeconds(double seconds)
    
public  voidsetValue(String value)
     Sets a interval string represented value to this instance. This method only recognize the format, that Postgres returns - not all input formats are supported (e.g.
public  voidsetValue(int years, int months, int days, int hours, int minutes, double seconds)
    
public  voidsetYears(int years)
    


Constructor Detail
PGInterval
public PGInterval()(Code)
required by the driver



PGInterval
public PGInterval(String value) throws SQLException(Code)
Initialize a interval with a given interval string representation
Parameters:
  value - String representated interval (e.g. '3 years 2 mons')
throws:
  SQLException - Is thrown if the string representation has an unknown format
See Also:   PGInterval.setValue(String)



PGInterval
public PGInterval(int years, int months, int days, int hours, int minutes, double seconds)(Code)
Initializes all values of this interval to the specified values
See Also:   PGInterval.setValue(int,int,int,int,int,double)




Method Detail
add
public void add(Calendar cal)(Code)
Rolls this interval on a given calendar
Parameters:
  cal - Calendar instance to add to



add
public void add(Date date)(Code)
Rolls this interval on a given date
Parameters:
  date - Date instance to add to



add
public void add(PGInterval interval)(Code)
Add this interval's value to the passed interval. This is backwards to what I would expect, but this makes it match the other existing add methods.



equals
public boolean equals(Object obj)(Code)
Returns whether an object is equal to this one or not
Parameters:
  obj - Object to compare with true if the two intervals are identical



getDays
public int getDays()(Code)
Returns the days represented by this interval



getHours
public int getHours()(Code)
Returns the hours represented by this interval



getMinutes
public int getMinutes()(Code)
Returns the minutes represented by this interval



getMonths
public int getMonths()(Code)
Returns the months represented by this interval



getSeconds
public double getSeconds()(Code)
Returns the seconds represented by this interval



getValue
public String getValue()(Code)
Returns the stored interval information as a string String represented interval



getYears
public int getYears()(Code)
Returns the years represented by this interval



hashCode
public int hashCode()(Code)
Returns a hashCode for this object hashCode



scale
public void scale(int factor)(Code)
Scale this interval by an integer factor. The server can scale by arbitrary factors, but that would require adjusting the call signatures for all the existing methods like getDays() or providing our own justification of fractional intervals. Neither of these seem like a good idea without a strong use case.



setDays
public void setDays(int days)(Code)
Set the days of this interval to the specified value



setHours
public void setHours(int hours)(Code)
Set the hours of this interval to the specified value



setMinutes
public void setMinutes(int minutes)(Code)
Set the minutes of this interval to the specified value



setMonths
public void setMonths(int months)(Code)
Set the months of this interval to the specified value



setSeconds
public void setSeconds(double seconds)(Code)
Set the seconds of this interval to the specified value



setValue
public void setValue(String value) throws SQLException(Code)
Sets a interval string represented value to this instance. This method only recognize the format, that Postgres returns - not all input formats are supported (e.g. '1 yr 2 m 3 s')!
Parameters:
  value - String representated interval (e.g. '3 years 2 mons')
throws:
  SQLException - Is thrown if the string representation has an unknown format



setValue
public void setValue(int years, int months, int days, int hours, int minutes, double seconds)(Code)
Set all values of this interval to the specified values



setYears
public void setYears(int years)(Code)
Set the years of this interval to the specified value



Fields inherited from org.postgresql.util.PGobject
protected String type(Code)(Java Doc)
protected String value(Code)(Java Doc)

Methods inherited from org.postgresql.util.PGobject
public Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
final public String getType()(Code)(Java Doc)
public String getValue()(Code)(Java Doc)
final public void setType(String type)(Code)(Java Doc)
public void setValue(String value) throws SQLException(Code)(Java Doc)
public String toString()(Code)(Java Doc)

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.