org.apache.derby.iapi.types
Interface DateTimeDataValue

All Superinterfaces:
DataValueDescriptor, java.io.Externalizable, Formatable, Orderable, java.io.Serializable, Storable, TypedFormat
All Known Implementing Classes:
SQLDate, SQLTime, SQLTimestamp

public interface DateTimeDataValue
extends DataValueDescriptor


Field Summary
static int DAY_FIELD
           
static int HOUR_FIELD
           
static int MINUTE_FIELD
           
static int MONTH_FIELD
           
static int SECOND_FIELD
           
static int YEAR_FIELD
           
 
Fields inherited from interface org.apache.derby.iapi.types.Orderable
ORDER_OP_EQUALS, ORDER_OP_GREATEROREQUALS, ORDER_OP_GREATERTHAN, ORDER_OP_LESSOREQUALS, ORDER_OP_LESSTHAN
 
Method Summary
 NumberDataValue getDate(NumberDataValue result)
          Get the day of the month.
 NumberDataValue getHours(NumberDataValue result)
          Get the hour of the day out of a time or timestamp.
 NumberDataValue getMinutes(NumberDataValue result)
          Get the minute of the hour out of a time or timestamp.
 NumberDataValue getMonth(NumberDataValue result)
          Get the month number out of a date.
 NumberDataValue getSeconds(NumberDataValue result)
          Get the second of the minute out of a time or timestamp.
 NumberDataValue getYear(NumberDataValue result)
          Get the year number out of a date.
 
Methods inherited from interface org.apache.derby.iapi.types.DataValueDescriptor
checkHostVariable, coalesce, compare, compare, equals, estimateMemoryUsage, getBigDecimal, getBoolean, getByte, getBytes, getClone, getDate, getDouble, getFloat, getInt, getLength, getLong, getNewNull, getObject, getShort, getStream, getString, getTime, getTimestamp, getTypeName, greaterOrEquals, greaterThan, in, isNotNull, isNullOp, lessOrEquals, lessThan, normalize, notEquals, readExternalFromArray, setInto, setInto, setObjectForCast, setToNull, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueFromResultSet, typePrecedence
 
Methods inherited from interface org.apache.derby.iapi.services.io.Storable
isNull, restoreToNull
 
Methods inherited from interface java.io.Externalizable
readExternal, writeExternal
 
Methods inherited from interface org.apache.derby.iapi.services.io.TypedFormat
getTypeFormatId
 

Field Detail

YEAR_FIELD

public static final int YEAR_FIELD
See Also:
Constant Field Values

MONTH_FIELD

public static final int MONTH_FIELD
See Also:
Constant Field Values

DAY_FIELD

public static final int DAY_FIELD
See Also:
Constant Field Values

HOUR_FIELD

public static final int HOUR_FIELD
See Also:
Constant Field Values

MINUTE_FIELD

public static final int MINUTE_FIELD
See Also:
Constant Field Values

SECOND_FIELD

public static final int SECOND_FIELD
See Also:
Constant Field Values
Method Detail

getYear

public NumberDataValue getYear(NumberDataValue result)
                        throws StandardException
Get the year number out of a date.

Parameters:
result - The result of the previous call to this method, null if not called yet.
Returns:
A NumberDataValue containing the year number.
Throws:
StandardException - Thrown on error

getMonth

public NumberDataValue getMonth(NumberDataValue result)
                         throws StandardException
Get the month number out of a date.

Parameters:
result - The result of the previous call to this method, null if not called yet.
Returns:
A NumberDataValue containing the month number.
Throws:
StandardException - Thrown on error

getDate

public NumberDataValue getDate(NumberDataValue result)
                        throws StandardException
Get the day of the month.

Parameters:
result - The result of the previous call to this method, null if not called yet.
Returns:
A NumberDataValue containing the day of the month.
Throws:
StandardException - Thrown on error

getHours

public NumberDataValue getHours(NumberDataValue result)
                         throws StandardException
Get the hour of the day out of a time or timestamp.

Parameters:
result - The result of the previous call to this method, null if not called yet.
Returns:
A NumberDataValue containing the hour of the day.
Throws:
StandardException - Thrown on error

getMinutes

public NumberDataValue getMinutes(NumberDataValue result)
                           throws StandardException
Get the minute of the hour out of a time or timestamp.

Parameters:
result - The result of the previous call to this method, null if not called yet.
Returns:
A NumberDataValue containing the minute of the hour.
Throws:
StandardException - Thrown on error

getSeconds

public NumberDataValue getSeconds(NumberDataValue result)
                           throws StandardException
Get the second of the minute out of a time or timestamp.

Parameters:
result - The result of the previous call to this method, null if not called yet.
Returns:
A NumberDataValue containing the second of the minute.
Throws:
StandardException - Thrown on error


Apache Derby V10.0 Engine Documentation - Copyright © 1997,2004 The Apache Software Foundation or its licensors, as applicable.