/** * Move the physical binary data to this SQL parameter row. * @param resultset The resultset to get the SQL data from. * @param iColumn the column in the resultset that has my data. * @exception SQLException From SQL calls. */ public void moveSQLToField(ResultSet resultset, int iColumn) throws SQLException { int sResult = resultset.getInt(iColumn); if (resultset.wasNull()) this.setString(Constants.BLANK, false, DBConstants.READ_MOVE); // Null value else { if ((!this.isNullable()) && (sResult == NAN)) this.setString(Constants.BLANK, false, DBConstants.READ_MOVE); // Null value else this.setValue(sResult, false, DBConstants.READ_MOVE); } } /**
/** * Move the physical binary data to this SQL parameter row. * @param resultset The resultset to get the SQL data from. * @param iColumn the column in the resultset that has my data. * @exception SQLException From SQL calls. */ public void moveSQLToField(ResultSet resultset, int iColumn) throws SQLException { int sResult = resultset.getInt(iColumn); if (resultset.wasNull()) this.setString(Constants.BLANK, false, DBConstants.READ_MOVE); // Null value else { if ((!this.isNullable()) && (sResult == NAN)) this.setString(Constants.BLANK, false, DBConstants.READ_MOVE); // Null value else this.setValue(sResult, false, DBConstants.READ_MOVE); } } /**
/** * Move the physical binary data to this SQL parameter row. * @param resultset The resultset to get the SQL data from. * @param iColumn the column in the resultset that has my data. * @exception SQLException From SQL calls. */ public void moveSQLToField(ResultSet resultset, int iColumn) throws SQLException { int sResult = resultset.getInt(iColumn); if (resultset.wasNull()) this.setString(Constants.BLANK, false, DBConstants.READ_MOVE); // Null value else { if ((!this.isNullable()) && (sResult == NAN)) this.setString(Constants.BLANK, false, DBConstants.READ_MOVE); // Null value else this.setValue(sResult, false, DBConstants.READ_MOVE); } } /**
case DBConstants.UPDATE_TYPE: IntegerField thisField = (IntegerField)this.getOwner().getField(m_UserIDFieldSeq); thisField.setValue(m_CurrentUserID, bDisplayOption, DBConstants.SCREEN_MOVE); // File written or updated, set the update date break;
/** * Set the user ID. * @param iChangeType * @param bDisplayOption The display option. * @return The error code. */ public int setUserID(int iChangeType, boolean bDisplayOption) { int iErrorCode = DBConstants.NORMAL_RETURN; IntegerField thisField = (IntegerField)this.getOwner().getField(m_iFieldSeq); int iUserID = -1; if (this.getOwner().getRecordOwner() != null) if (((BaseApplication)this.getOwner().getRecordOwner().getTask().getApplication()) != null) if (((BaseApplication)this.getOwner().getRecordOwner().getTask().getApplication()).getUserID() != null) if (((BaseApplication)this.getOwner().getRecordOwner().getTask().getApplication()).getUserID().length() > 0) iUserID = Integer.parseInt(((BaseApplication)this.getOwner().getRecordOwner().getTask().getApplication()).getUserID()); boolean bOldModified = thisField.isModified(); boolean[] rgbEnabled = null; if (iChangeType == DBConstants.INIT_MOVE) rgbEnabled = thisField.setEnableListeners(false); iErrorCode = thisField.setValue(iUserID, bDisplayOption, iChangeType); if (iChangeType == DBConstants.INIT_MOVE) { // Don't change the record on an init thisField.setEnableListeners(rgbEnabled); thisField.setModified(bOldModified); } return iErrorCode; } }
/** * Set the user ID. * @param iChangeType * @param bDisplayOption The display option. * @return The error code. */ public int setUserID(int iChangeType, boolean bDisplayOption) { int iErrorCode = DBConstants.NORMAL_RETURN; IntegerField thisField = (IntegerField)this.getOwner().getField(m_iFieldSeq); int iUserID = -1; if (this.getOwner().getRecordOwner() != null) if (((BaseApplication)this.getOwner().getRecordOwner().getTask().getApplication()) != null) if (((BaseApplication)this.getOwner().getRecordOwner().getTask().getApplication()).getUserID() != null) if (((BaseApplication)this.getOwner().getRecordOwner().getTask().getApplication()).getUserID().length() > 0) iUserID = Integer.parseInt(((BaseApplication)this.getOwner().getRecordOwner().getTask().getApplication()).getUserID()); boolean bOldModified = thisField.isModified(); boolean[] rgbEnabled = null; if (iChangeType == DBConstants.INIT_MOVE) rgbEnabled = thisField.setEnableListeners(false); iErrorCode = thisField.setValue(iUserID, bDisplayOption, iChangeType); if (iChangeType == DBConstants.INIT_MOVE) { // Don't change the record on an init thisField.setEnableListeners(rgbEnabled); thisField.setModified(bOldModified); } return iErrorCode; } }
if (((BaseApplication)this.getOwner().getRecord().getRecordOwner().getTask().getApplication()).getUserID().length() > 0) iUserID = Integer.parseInt(((BaseApplication)this.getOwner().getRecord().getRecordOwner().getTask().getApplication()).getUserID()); // File written or updated, set the user name int iErrorCode = thisField.setValue(iUserID, bDisplayOption, DBConstants.SCREEN_MOVE); if (iMoveMode == DBConstants.INIT_MOVE) thisField.setModified(false); // Don't make this record modified just because I set this field.
if (((BaseApplication)this.getOwner().getRecord().getRecordOwner().getTask().getApplication()).getUserID().length() > 0) iUserID = Integer.parseInt(((BaseApplication)this.getOwner().getRecord().getRecordOwner().getTask().getApplication()).getUserID()); // File written or updated, set the user name int iErrorCode = thisField.setValue(iUserID, bDisplayOption, DBConstants.SCREEN_MOVE); if (iMoveMode == DBConstants.INIT_MOVE) thisField.setModified(false); // Don't make this record modified just because I set this field.
if (((BaseApplication)this.getOwner().getRecord().getRecordOwner().getTask().getApplication()).getUserID().length() > 0) iUserID = Integer.parseInt(((BaseApplication)this.getOwner().getRecord().getRecordOwner().getTask().getApplication()).getUserID()); // File written or updated, set the user name int iErrorCode = thisField.setValue(iUserID, bDisplayOption, DBConstants.SCREEN_MOVE); if (iMoveMode == DBConstants.INIT_MOVE) thisField.setModified(false); // Don't make this record modified just because I set this field.