All Packages

Class weblogic.jdbc.informix4.InformixInterval

java.lang.Object
   |
   +----weblogic.jdbc.informix4.InformixInterval

public class InformixInterval
extends Object

Constructor Index

 o InformixInterval(InformixColumnMetaData, byte[])
Constructs InformixInterval given the raw interval data and metadata info.

Method Index

 o getDay()
Gets the signed value of the DAY field of the INTERVAL.
 o getFraction()
Gets the signed value of the FRACTION field of the INTERVAL.
 o getHour()
Gets the signed value of the HOUR field of the INTERVAL.
 o getMinute()
Gets the signed value of the MINUTE field of the INTERVAL.
 o getMonth()
Gets the signed value of the MONTH field of the INTERVAL.
 o getSecond()
Gets the signed value of the SECOND field of the INTERVAL.
 o getString()
Formats an INTERVAL in the Informix INTERVAL escape format.
 o getYear()
Gets the signed value of the YEAR field of an INTERVAL.

Constructors

 o InformixInterval
 protected InformixInterval(InformixColumnMetaData metadata,
                            byte inData[]) throws SQLException
Constructs InformixInterval given the raw interval data and metadata info.

Parameters:
metadata - meta data info.
inData - the interval data. There is no checking for NULL data.
inScale - the scale of the interval as defined by Informix.
inPrecision - the precision of the interval as defined by Informix.

Methods

 o getString
 public String getString() throws SQLException
Formats an INTERVAL in the Informix INTERVAL escape format.

Examples:

   '123456789-01'           for a YEAR(9) TO MONTH       INTERVAL
   '-12345 11:12:13.14151'  for a DAY(5)  TO FRACTION(5) INTERVAL
 

Returns:
String in Informix INTERVAL escape format.
 o getYear
 public int getYear() throws SQLException
Gets the signed value of the YEAR field of an INTERVAL.

If the YEAR field is not defined in the INTERVAL, this method returns a value of zero.

 o getMonth
 public int getMonth() throws SQLException
Gets the signed value of the MONTH field of the INTERVAL.

If the MONTH field is not defined in the INTERVAL, this method returns a value of zero.

 o getDay
 public int getDay() throws SQLException
Gets the signed value of the DAY field of the INTERVAL.

If the DAY field is not defined in the INTERVAL, this method returns a value of zero.

 o getHour
 public int getHour() throws SQLException
Gets the signed value of the HOUR field of the INTERVAL.

If the HOUR field is not defined in the INTERVAL, this method returns a value of zero.

 o getMinute
 public int getMinute() throws SQLException
Gets the signed value of the MINUTE field of the INTERVAL.

If the MINUTE field is not defined in the INTERVAL, this method returns a value of zero.

 o getSecond
 public int getSecond() throws SQLException
Gets the signed value of the SECOND field of the INTERVAL.

If the SECOND field is not defined in the INTERVAL, this method returns a value of zero.

 o getFraction
 public int getFraction() throws SQLException
Gets the signed value of the FRACTION field of the INTERVAL.

Values returned by this method are all normalized to:

   (Actual Fractional Value) * (10**5)
 

Examples:

If the FRACTION field is not defined in the INTERVAL, this method returns a value of zero.


All Packages