1 21 22 package org.apache.derby.iapi.types; 23 24 import org.apache.derby.iapi.error.StandardException; 25 26 public interface DateTimeDataValue extends DataValueDescriptor 27 { 28 public static final int YEAR_FIELD = 0; 29 public static final int MONTH_FIELD = 1; 30 public static final int DAY_FIELD = 2; 31 public static final int HOUR_FIELD = 3; 32 public static final int MINUTE_FIELD = 4; 33 public static final int SECOND_FIELD = 5; 34 35 public static final int FRAC_SECOND_INTERVAL = 0; 37 public static final int SECOND_INTERVAL = 1; 38 public static final int MINUTE_INTERVAL = 2; 39 public static final int HOUR_INTERVAL = 3; 40 public static final int DAY_INTERVAL = 4; 41 public static final int WEEK_INTERVAL = 5; 42 public static final int MONTH_INTERVAL = 6; 43 public static final int QUARTER_INTERVAL = 7; 44 public static final int YEAR_INTERVAL = 8; 45 46 56 NumberDataValue getYear(NumberDataValue result) 57 throws StandardException; 58 59 69 NumberDataValue getMonth(NumberDataValue result) 70 throws StandardException; 71 72 82 NumberDataValue getDate(NumberDataValue result) 83 throws StandardException; 84 85 95 NumberDataValue getHours(NumberDataValue result) 96 throws StandardException; 97 98 108 NumberDataValue getMinutes(NumberDataValue result) 109 throws StandardException; 110 111 121 NumberDataValue getSeconds(NumberDataValue result) 122 throws StandardException; 123 124 138 DateTimeDataValue timestampAdd( int intervalType, 139 NumberDataValue intervalCount, 140 java.sql.Date currentDate, 141 DateTimeDataValue resultHolder) 142 throws StandardException; 143 144 159 NumberDataValue timestampDiff( int intervalType, 160 DateTimeDataValue time1, 161 java.sql.Date currentDate, 162 NumberDataValue resultHolder) 163 throws StandardException; 164 } 165 166 | Popular Tags |