public class INTERVALDS extends Datum
The INTERVALDS class specifies a value to be used to
measure time differences.
The internal data for this object is stored as a 11 byte array in the super class' storage area. The bytes are arranged as follows:
Byte Represents
0 High byte of day
1 2nd high byte of day
2 3rd high byte of day
3 least byte of day
4 hour val + 60
5 min + 60
6 sec + 60
7 High byte of Fractional second
8 2nd high byte of Fractional Second
9 3rd high byte of Fractional Second
10 least byte of Fractional Second
Static methods are used for conversions.
ojiOracleDatumWithConnection, targetDatum| Constructor and Description |
|---|
INTERVALDS()
Constructs a INTERVALDS object initialized with .
|
INTERVALDS(byte[] intervalDS)
Create an Oracle INTERVALDS object represented by the given
intervalDS byte array
|
INTERVALDS(java.lang.String str)
Create an Oracle INTERVALDS object represented by the given
String
|
| Modifier and Type | Method and Description |
|---|---|
java.time.Duration |
getDuration()
Converts and return this object to java.time.Duration object
|
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 INTERVALDS object
|
byte[] |
toBytes()
Convert Oracle INTERVALDS object into a byte array
|
static byte[] |
toBytes(java.lang.String str)
Convert Java String to Oracle INTERVALDS.
|
static java.time.Duration |
toDuration(byte[] bytes)
Convert byte array of oracle.sql.INTERVALDS to java.time.Duration
|
static INTERVALDS |
toIntervalds(java.time.Duration duration)
Convert java.time.Duration to oracle.sql.INTERVALDS
|
java.lang.Object |
toJdbc()
Returns the JDBC representation of the INTERVALDS object
|
java.lang.String |
toString()
Converts a INTERVALDS to a string
|
static java.lang.String |
toString(byte[] inparray)
Converts a INTERVALDS to a string
|
asciiStreamValue, bigDecimalValue, binaryStreamValue, booleanValue, bytesEqual, bytesHashCode, byteValue, characterStreamValue, compareBytes, dateValue, doubleValue, equals, floatValue, getBytes, getConnectionDuringExceptionHandling, getLength, getStream, intValue, isNull, longValue, setBytes, setShareBytes, shareBytes, stringValue, timestampValue, timestampValue, timeValue, timeValue, toClasspublic INTERVALDS()
public INTERVALDS(byte[] intervalDS)
intervalDS - byte arraypublic INTERVALDS(java.lang.String str)
str - Java String objectpublic byte[] toBytes()
public static final INTERVALDS toIntervalds(java.time.Duration duration)
duration - java.time.Duration object to be converted to INTERVALDSpublic static final java.time.Duration toDuration(byte[] bytes)
bytes - byte array of INTERVALDS objectpublic java.time.Duration getDuration()
public static byte[] toBytes(java.lang.String str)
str - java.lang.String object to be converted.public static java.lang.String toString(byte[] inparray)
inparray - a byte array representing the INTERVALDS objectpublic java.lang.Object toJdbc()
public java.lang.String stringValue()
stringValue in class Datumpublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean isConvertibleTo(java.lang.Class<?> cls)
isConvertibleTo in class Datumcls - Class to convert topublic java.lang.Object makeJdbcArray(int arraySize)
makeJdbcArray in class DatumarraySize - size of the array