/** * Set the Value of this field as a double. * @param value The value of this field. * @param iDisplayOption If true, display the new field. * @param iMoveMove The move mode. * @return An error code (NORMAL_RETURN for success). */ public int setValue(double value, boolean bDisplayOption, int iMoveMode) { // Set this field's value java.util.Date dateTemp = new java.util.Date((long)value); int iErrorCode = this.setData(dateTemp, bDisplayOption, iMoveMode); return iErrorCode; } /**
/** * Set the Value of this field as a double. * @param value The value of this field. * @param iDisplayOption If true, display the new field. * @param iMoveMove The move mode. * @return An error code (NORMAL_RETURN for success). */ public int setValue(double value, boolean bDisplayOption, int iMoveMode) { // Set this field's value java.util.Date dateTemp = new java.util.Date((long)value); int iErrorCode = this.setData(dateTemp, bDisplayOption, iMoveMode); return iErrorCode; } /**
/** * SetValue in current calendar. * @param value The date (as a calendar value) to set. * @param bDisplayOption Display changed fields if true. * @param iMoveMode The move mode. * @return The error code (or NORMAL_RETURN). */ public int setCalendar(Calendar value, boolean bDisplayOption, int iMoveMode) { // Set this field's value java.util.Date dateTemp = value.getTime(); int errorCode = this.setData(dateTemp, bDisplayOption, iMoveMode); return errorCode; } /**
/** * SetValue in current calendar. * @param value The date (as a calendar value) to set. * @param bDisplayOption Display changed fields if true. * @param iMoveMode The move mode. * @return The error code (or NORMAL_RETURN). */ public int setCalendar(Calendar value, boolean bDisplayOption, int iMoveMode) { // Set this field's value java.util.Date dateTemp = value.getTime(); int errorCode = this.setData(dateTemp, bDisplayOption, iMoveMode); return errorCode; } /**
/** * Set the Value of this field as a double. * @param value The value of this field. * @param iDisplayOption If true, display the new field. * @param iMoveMove The move mode. * @return An error code (NORMAL_RETURN for success). */ public int setValue(double value, boolean bDisplayOption, int iMoveMode) { // Set this field's value java.util.Date dateTemp = new java.util.Date((long)value); int iErrorCode = this.setData(dateTemp, bDisplayOption, iMoveMode); return iErrorCode; } /**
/** * SetValue in current calendar. * @param value The date (as a calendar value) to set. * @param bDisplayOption Display changed fields if true. * @param iMoveMode The move mode. * @return The error code (or NORMAL_RETURN). */ public int setCalendar(Calendar value, boolean bDisplayOption, int iMoveMode) { // Set this field's value java.util.Date dateTemp = value.getTime(); int errorCode = this.setData(dateTemp, bDisplayOption, iMoveMode); return errorCode; } /**
/** * Read the physical data from a stream file and set this field. * @param daIn Input stream to read this field's data from. * @param bFixedLength If false (default) be sure to save the length in the stream. * @return boolean Success? */ public boolean read(DataInputStream daIn, boolean bFixedLength) // Fixed length = false { try { long lData = daIn.readLong(); java.util.Date daData = null; if (lData != Long.MIN_VALUE + 1) daData = new java.util.Date(lData); int errorCode = this.setData(daData, DBConstants.DONT_DISPLAY, DBConstants.READ_MOVE); return (errorCode == DBConstants.NORMAL_RETURN); // Success } catch (IOException ex) { ex.printStackTrace(); return false; } } /**
/** * Read the physical data from a stream file and set this field. * @param daIn Input stream to read this field's data from. * @param bFixedLength If false (default) be sure to save the length in the stream. * @return boolean Success? */ public boolean read(DataInputStream daIn, boolean bFixedLength) // Fixed length = false { try { long lData = daIn.readLong(); java.util.Date daData = null; if (lData != Long.MIN_VALUE + 1) daData = new java.util.Date(lData); int errorCode = this.setData(daData, DBConstants.DONT_DISPLAY, DBConstants.READ_MOVE); return (errorCode == DBConstants.NORMAL_RETURN); // Success } catch (IOException ex) { ex.printStackTrace(); return false; } } /**
/** * Read the physical data from a stream file and set this field. * @param daIn Input stream to read this field's data from. * @param bFixedLength If false (default) be sure to save the length in the stream. * @return boolean Success? */ public boolean read(DataInputStream daIn, boolean bFixedLength) // Fixed length = false { try { long lData = daIn.readLong(); java.util.Date daData = null; if (lData != Long.MIN_VALUE + 1) daData = new java.util.Date(lData); int errorCode = this.setData(daData, DBConstants.DONT_DISPLAY, DBConstants.READ_MOVE); return (errorCode == DBConstants.NORMAL_RETURN); // Success } catch (IOException ex) { ex.printStackTrace(); return false; } } /**
/** * Change the date and time of day. * @param date The date to set. * @param bDisplayOption Display changed fields if true. * @param iMoveMode The move mode. * @return The error code (or NORMAL_RETURN). */ public int setDateTime(java.util.Date date, boolean bDisplayOption, int iMoveMode) { if (date != null) return this.setValue(date.getTime(), bDisplayOption, iMoveMode); else return this.setData(null, bDisplayOption, iMoveMode); } /**
/** * Change the date and time of day. * @param date The date to set. * @param bDisplayOption Display changed fields if true. * @param iMoveMode The move mode. * @return The error code (or NORMAL_RETURN). */ public int setDateTime(java.util.Date date, boolean bDisplayOption, int iMoveMode) { if (date != null) return this.setValue(date.getTime(), bDisplayOption, iMoveMode); else return this.setData(null, bDisplayOption, iMoveMode); } /**
/** * Change the date and time of day. * @param date The date to set. * @param bDisplayOption Display changed fields if true. * @param iMoveMode The move mode. * @return The error code (or NORMAL_RETURN). */ public int setDateTime(java.util.Date date, boolean bDisplayOption, int iMoveMode) { if (date != null) return this.setValue(date.getTime(), bDisplayOption, iMoveMode); else return this.setData(null, bDisplayOption, iMoveMode); } /**
((DateTimeField)this.getOwner().getField(MessageLog.kTimeoutTime)).setData(null, bDisplayOption, DBConstants.SCREEN_MOVE);