BEA Systems, Inc.

WebLogic Server 6.1 API Reference

weblogic.jdbc.informix4
Class InformixInterval

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

public class InformixInterval
extends java.lang.Object
implements weblogic.jdbc.common.InformixInterval

Author:
Copyright © 2001 BEA Systems, Inc. All Rights Reserved.

Constructor Summary
protected InformixInterval(InformixColumnMetaData metadata, byte[] inData)
          Constructs InformixInterval given the raw interval data and metadata info.
 
Method Summary
 int getDay()
          Gets the signed value of the DAY field of the INTERVAL.
 int getFraction()
          Gets the signed value of the FRACTION field of the INTERVAL.
 int getHour()
          Gets the signed value of the HOUR field of the INTERVAL.
 int getMinute()
          Gets the signed value of the MINUTE field of the INTERVAL.
 int getMonth()
          Gets the signed value of the MONTH field of the INTERVAL.
 int getSecond()
          Gets the signed value of the SECOND field of the INTERVAL.
 java.lang.String getString()
          Formats an INTERVAL in the Informix INTERVAL escape format.
 int getYear()
          Gets the signed value of the YEAR field of an INTERVAL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InformixInterval

protected InformixInterval(InformixColumnMetaData metadata,
                           byte[] inData)
                    throws java.sql.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.
Method Detail

getString

public java.lang.String getString()
                           throws java.sql.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
 
Specified by:
getString in interface weblogic.jdbc.common.InformixInterval

Returns:
String in Informix INTERVAL escape format.

getYear

public int getYear()
            throws java.sql.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.

Specified by:
getYear in interface weblogic.jdbc.common.InformixInterval


getMonth

public int getMonth()
             throws java.sql.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.

Specified by:
getMonth in interface weblogic.jdbc.common.InformixInterval


getDay

public int getDay()
           throws java.sql.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.

Specified by:
getDay in interface weblogic.jdbc.common.InformixInterval


getHour

public int getHour()
            throws java.sql.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.

Specified by:
getHour in interface weblogic.jdbc.common.InformixInterval


getMinute

public int getMinute()
              throws java.sql.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.

Specified by:
getMinute in interface weblogic.jdbc.common.InformixInterval


getSecond

public int getSecond()
              throws java.sql.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.

Specified by:
getSecond in interface weblogic.jdbc.common.InformixInterval


getFraction

public int getFraction()
                throws java.sql.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.

Specified by:
getFraction in interface weblogic.jdbc.common.InformixInterval


Documentation is available at
http://download.oracle.com/docs/cd/E13222_01/wls/docs61

WebLogic classes and methods that do not appear in this reference are not public and are not supported.