Package oracle.sql
Class INTERVALYM
java.lang.Object
oracle.sql.Datum
oracle.sql.INTERVALYM
- All Implemented Interfaces:
Serializable
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:
-
Field Summary
Fields inherited from class oracle.sql.Datum
ojiOracleDatumWithConnection, targetDatum -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a INTERVALYM object initialized with YY:MM to 0:0.INTERVALYM(byte[] intervalYM) Create an Oracle INTERVALYM object represented by the given intervalYM byte arrayINTERVALYM(String str) Create an Oracle INTERVALYM object represented by the given String -
Method Summary
Modifier and TypeMethodDescriptionConverts and return this object to java.time.Period objectbooleanisConvertibleTo(Class<?> cls) Determines if the object can be converted to a particular classmakeJdbcArray(int arraySize) Returns a JDBC array representation of the datumReturns String for this INTERVALYM objectbyte[]toBytes()Convert Oracle INTERVALYM object into a byte arraystatic byte[]Convert Java String to Oracle INTERVALYM.static final INTERVALYMtoIntervalym(Period period) Create an Oracle INTERVALYM object represented by given java.time.PeriodtoJdbc()Returns the JDBC representation of the INTERVALYM objectstatic final PeriodtoPeriod(byte[] bytes) Convert Oracle INTERVALYM to java.time.PeriodtoString()Converts a INTERVALYM to a stringstatic StringtoString(byte[] inparray) Converts a INTERVALYM to a stringMethods inherited from class oracle.sql.Datum
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, toClass
-
Constructor Details
-
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
Create an Oracle INTERVALYM object represented by the given String- Parameters:
str- Java String object
-
-
Method Details
-
toBytes
public byte[] toBytes()Convert Oracle INTERVALYM object into a byte array- Returns:
- the byte array stored in the INTERVALYM object
-
toIntervalym
Create an Oracle INTERVALYM object represented by given java.time.Period- Parameters:
java- .time.Period object- Returns:
- INTERVALYM object representing the given java.time.Period object
-
toPeriod
Convert Oracle INTERVALYM to java.time.Period- Parameters:
bytes- byte array of the INTERVALYM object- Returns:
- java.time.Period object representing the input byte array
-
getPeriod
Converts and return this object to java.time.Period object- Returns:
- Period object of this INTERVALYM object
-
toBytes
Convert Java String to Oracle INTERVALYM.- Parameters:
str- java.lang.String object to be converted.- Returns:
- the byte array representing the input string.
-
toString
Converts a INTERVALYM to a string- Parameters:
inparray- a byte array representing the INTERVALYM object- Returns:
- String representing the INTERVALYM object
-
toJdbc
Returns the JDBC representation of the INTERVALYM object -
stringValue
Returns String for this INTERVALYM object- Overrides:
stringValuein classDatum- Returns:
- a Java String value
-
toString
Converts a INTERVALYM to a string -
makeJdbcArray
Returns a JDBC array representation of the datum- Specified by:
makeJdbcArrayin classDatum- Parameters:
arraySize- size of the array- Returns:
- an object containing the JDBC array value
-
isConvertibleTo
Determines if the object can be converted to a particular class- Specified by:
isConvertibleToin classDatum- Parameters:
cls- Class to convert to- Returns:
- true, if conversion to cls is permitted false, if conversion to cls is not permitted
-