public class INTERVALYM extends Datum
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.
ojiOracleDatumWithConnection, targetDatum| Constructor and Description |
|---|
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
|
| Modifier and Type | Method and Description |
|---|---|
java.time.Period |
getPeriod()
Converts and return this object to java.time.Period 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 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.
|
static INTERVALYM |
toIntervalym(java.time.Period period)
Create an Oracle INTERVALYM object represented by given java.time.Period
|
java.lang.Object |
toJdbc()
Returns the JDBC representation of the INTERVALYM object
|
static java.time.Period |
toPeriod(byte[] bytes)
Convert Oracle INTERVALYM to java.time.Period
|
java.lang.String |
toString()
Converts a INTERVALYM to a string
|
static java.lang.String |
toString(byte[] inparray)
Converts a INTERVALYM 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 INTERVALYM()
public INTERVALYM(byte[] intervalYM)
intervalYM - byte arraypublic INTERVALYM(java.lang.String str)
str - Java String objectpublic byte[] toBytes()
public static final INTERVALYM toIntervalym(java.time.Period period)
java.time.Period - objectpublic static final java.time.Period toPeriod(byte[] bytes)
bytes - byte array of the INTERVALYM objectpublic java.time.Period getPeriod()
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 INTERVALYM objectpublic java.lang.Object toJdbc()
public java.lang.String stringValue()
stringValue in class Datumpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.Object makeJdbcArray(int arraySize)
makeJdbcArray in class DatumarraySize - size of the arraypublic boolean isConvertibleTo(java.lang.Class<?> cls)
isConvertibleTo in class Datumcls - Class to convert to