|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.informix.lang.Interval
This is the base class for the Informix data type INTERVAL. This is an Informix-specific JDBC extension. Interval qualifiers and some common methods for the IntervalYM and IntervalDF classes are in this class. Qualifier start code and end code indicators are also defined in this class.
Field Summary | |
static byte |
TU_DAY
The time unit for the DAY field in a binary qualifier. |
static byte |
TU_F1
The time unit for the FRACTION(1) field in a binary qualifier. |
static byte |
TU_F2
The time unit for the FRACTION(2) field in a binary qualifier. |
static byte |
TU_F3
The time unit for the FRACTION(3) field in a binary qualifier. |
static byte |
TU_F4
The time unit for the FRACTION(4) field in a binary qualifier. |
static byte |
TU_F5
The time unit for the FRACTION(5) field in a binary qualifier. |
static byte |
TU_FRAC
The time unit for the default FRACTION field in a binary qualifier. |
static byte |
TU_HOUR
The time unit for the HOUR field in a binary qualifier. |
static byte |
TU_MINUTE
The time unit for the MINUTE field in a binary qualifier. |
static byte |
TU_MONTH
The time unit for the MONTH field in a binary qualifier. |
static byte |
TU_SECOND
The time unit for the SECOND field in a binary qualifier. |
static byte |
TU_YEAR
The time unit for the YEAR field in a binary qualifier. |
Method Summary | |
byte |
getEndCode()
Gets the end code from the internal qualifier. |
static byte |
getEndCode(short qualifier)
Extracts the ending field code from a qualifier. |
static java.lang.String |
getFieldName(byte code)
A static method that takes the TU_XXX value of part of a DATETIME or Interval data type and returns the string value. |
static java.lang.String |
getIfxTypeName(int type,
short qual)
Returns, in string form, the entire name of the Interval or DATETIME from the qualifier. |
static byte |
getLength(short qualifier)
Extracts the length from a qualifier. |
short |
getQualifier()
Returns the qualifier for this Interval object. |
static short |
getQualifier(byte len,
byte startCode,
byte endCode)
Composes the Interval qualifier from the length, start code, and end code. |
static byte |
getScale(short qualifier)
Returns the number of digits in the FRACTION part of the Interval datatype. |
byte |
getStartCode()
Gets the start code from the internal qualifier. |
static byte |
getStartCode(short qualifier)
Extracts the start code of the qualifier. |
static byte |
getStaticEndCode(short qualifier)
A static method, similar to getEndCode, that returns the ending type of an interval (for example, the 'second' part of 'year to second'. |
static byte |
getStaticStartCode(short qualifier)
A static method, similar to getStartCode, that returns the starting type of an interval (for example, the 'year' part of 'year to second'. |
static void |
goodQualifier(byte length,
byte startCode,
byte endCode)
Verifies the length, startCode, and endCode values of the Interval qualifier. |
void |
setConnection(java.sql.Connection conn)
Sets the connection. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final byte TU_YEAR
public static final byte TU_MONTH
public static final byte TU_DAY
public static final byte TU_HOUR
public static final byte TU_MINUTE
public static final byte TU_SECOND
public static final byte TU_FRAC
public static final byte TU_F1
public static final byte TU_F2
public static final byte TU_F3
public static final byte TU_F4
public static final byte TU_F5
Method Detail |
public static byte getLength(short qualifier)
qualifier
- The qualifier from which the length is extracted.
public short getQualifier()
public static short getQualifier(byte len, byte startCode, byte endCode) throws java.sql.SQLException
len
- The leading field length.startCode
- The starting time unit field (TU_XXX).endCode
- The ending time unit field (TU_XXX).
java.sql.SQLException
public static void goodQualifier(byte length, byte startCode, byte endCode) throws java.sql.SQLException
length
- The leading field precision.startCode
- The starting time unit field (TU_XXX).endCode
- The ending time unit field (TU_XXX).
java.sql.SQLException
public static byte getScale(short qualifier)
qualifier
- The qualifier from which the scale is extracted.
public static byte getStartCode(short qualifier)
qualifier
- The qualifier.
public static byte getEndCode(short qualifier)
qualifier
- The qualifier.
public byte getStartCode()
public byte getEndCode()
public static byte getStaticStartCode(short qualifier)
qualifier
- The datetime or interval qualifier.
public static byte getStaticEndCode(short qualifier)
qualifier
- The datetime or interval qualifier.
public static java.lang.String getFieldName(byte code)
code
- The time unit (TU_XXX) value.
public static java.lang.String getIfxTypeName(int type, short qual)
type
- Indicates whether the type is interval or datetime.qual
- The qualifier.
public void setConnection(java.sql.Connection conn)
conn
- The connection object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |