Skip navigation links

Oracle® Database JDBC Java API Reference
11g Release 2

E13995-02


oracle.sql
Class INTERVALYM

java.lang.Object
  extended by oracle.sql.Datum
      extended by oracle.sql.INTERVALYM

All Implemented Interfaces:
java.io.Serializable

public class INTERVALYM
extends Datum

INTERVALYM Class


The INTERVALYM class specifies a value to be used to measure time differences.

The internal data for this object is stored as a five byte array in the super class' storage area. The bytes are arranged as follows:

      Byte       Represents
       0         High byte of year
       1         2nd high byte of year
       2         3rd high byte of year
       3         least byte of year     
       4         month val + 60     
  

Static methods are used for conversions.

See Also:
Serialized Form

Constructor Summary
INTERVALYM()
          Constructs a INTERVALYM object initialized with YY:MM to 0:0.
INTERVALYM(byte[] intervalYM)
          Create an Oracle INTERVALYM object represented by the given intervalYM byte array
INTERVALYM(java.lang.String str)
          Create an Oracle INTERVALYM object represented by the given String

 

Method Summary
 boolean isConvertibleTo(java.lang.Class cls)
          Determines if the object can be converted to a particular class
 java.lang.Object makeJdbcArray(int arraySize)
          Returns a JDBC array representation of the datum
 java.lang.String stringValue()
          Returns String for this INTERVALYM object
 byte[] toBytes()
          Convert Oracle INTERVALYM object into a byte array
static byte[] toBytes(java.lang.String str)
          Convert Java String to Oracle INTERVALYM.
 java.lang.Object toJdbc()
          Returns the JDBC representation of the INTERVALYM object
 java.lang.String toString()
          Converts a INTERVALYM to a string
static java.lang.String toString(byte[] inparray)
          Converts a INTERVALYM to a string

 

Methods inherited from class oracle.sql.Datum
asciiStreamValue, bigDecimalValue, binaryStreamValue, booleanValue, byteValue, characterStreamValue, dateValue, doubleValue, equals, floatValue, getBytes, getLength, getStream, intValue, longValue, setBytes, setShareBytes, shareBytes, timestampValue, timeValue

 

Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Constructor Detail

INTERVALYM

public INTERVALYM()
Constructs a INTERVALYM object initialized with YY:MM to 0:0.

INTERVALYM

public INTERVALYM(byte[] intervalYM)
Create an Oracle INTERVALYM object represented by the given intervalYM byte array
Parameters:
intervalYM - byte array

INTERVALYM

public INTERVALYM(java.lang.String str)
Create an Oracle INTERVALYM object represented by the given String
Parameters:
str - Java String object

Method Detail

toBytes

public byte[] toBytes()
Convert Oracle INTERVALYM object into a byte array
Returns:
the byte array stored in the INTERVALYM object

toBytes

public static byte[] toBytes(java.lang.String str)
Convert Java String to Oracle INTERVALYM.
Parameters:
str - java.lang.String object to be converted.
Returns:
the byte array representing the input string.

toString

public static java.lang.String toString(byte[] inparray)
Converts a INTERVALYM to a string
Parameters:
inparray - a byte array representing the INTERVALYM object
Returns:
String representing the INTERVALYM object

toJdbc

public java.lang.Object toJdbc()
Returns the JDBC representation of the INTERVALYM object
Specified by:
toJdbc in class Datum
Returns:
an object containing the JDBC value

stringValue

public java.lang.String stringValue()
Returns String for this INTERVALYM object
Overrides:
stringValue in class Datum
Returns:
a Java String value

toString

public java.lang.String toString()
Converts a INTERVALYM to a string
Overrides:
toString in class java.lang.Object
Returns:
String representing this INTERVALYM object

makeJdbcArray

public java.lang.Object makeJdbcArray(int arraySize)
Returns a JDBC array representation of the datum
Specified by:
makeJdbcArray in class Datum
Parameters:
arraySize - size of the array
Returns:
an object containing the JDBC array value

isConvertibleTo

public boolean isConvertibleTo(java.lang.Class cls)
Determines if the object can be converted to a particular class
Specified by:
isConvertibleTo in class Datum
Parameters:
cls - Class to convert to
Returns:
true, if conversion to cls is permitted false, if conversion to cls is not permitted

Skip navigation links

Oracle® Database JDBC Java API Reference
11g Release 2

E13995-02


Copyright © 2009, Oracle and/or its affiliates. All rights reserved.