/** * Move the data source buffer to all the fields. * <p /><pre> * Make sure you do the following steps: * 1) Move the data fields to the correct record data fields, with mode DBConstants.READ_MOVE. * 2) Save the data source or set to null, so I can cache the source if necessary. * 3) Save the objectID if it is not an Integer type, so I can serialize the source of this object. * </pre> * @return The error code. * @exception DBException File exception. */ public int dataToFields(Rec record) throws DBException { return super.dataToFields(record); } /**
/** * Move the data source buffer to all the fields. * <p /><pre> * Make sure you do the following steps: * 1) Move the data fields to the correct record data fields, with mode DBConstants.READ_MOVE. * 2) Save the data source or set to null, so I can cache the source if necessary. * 3) Save the objectID if it is not an Integer type, so I can serialize the source of this object. * </pre> * @return The error code. * @exception DBException File exception. */ public int dataToFields(Rec record) throws DBException { return super.dataToFields(record); } /**
/** * Move the data source buffer to all the fields. * <p /><pre> * Make sure you do the following steps: * 1) Move the data fields to the correct record data fields, with mode DBConstants.READ_MOVE. * 2) Save the data source or set to null, so I can cache the source if necessary. * 3) Save the objectID if it is not an Integer type, so I can serialize the source of this object. * </pre> * @return The error code. * @exception DBException File exception. */ public int dataToFields(Rec record) throws DBException { return super.dataToFields(record); } /**
/** * Move the data source buffer to all the fields. * <br /><pre> * Make sure you do the following steps: * 1) Move the data fields to the correct record data fields, with mode Constants.READ_MOVE. * 2) Set the data source or set to null, so I can cache the source if necessary. * 3) Save the objectID if it is not an Integer type, so I can serialize the source of this object. * </pre> * Note: This is synchronized because VectorBuffer is not thread safe. * @exception Exception File exception. * @return Any error encountered moving the data. */ public synchronized int dataToFields(Rec record) throws DBException { if (this.getDataSource() == null) throw new DBException(Constants.INVALID_RECORD); ((BaseBuffer)this.getDataSource()).resetPosition(); return super.dataToFields(record); } /**
this.dataToFields(this.getRecord());
/** * Read the record that matches this record's current key. * <p>NOTE: You do not need to Open to do a seek or addNew. * @param strSeekSign - Seek sign: * @return true if successful, false if not found. * @exception FILE_NOT_OPEN. * @exception KEY_NOT_FOUND - The key was not found on read. */ public boolean seek(String strSeekSign) throws DBException { this.getRecord().setEditMode(Constants.EDIT_NONE); if (strSeekSign == null) strSeekSign = Constants.EQUALS; boolean bSuccess = this.doSeek(strSeekSign); if (bSuccess) { this.dataToFields(this.getRecord()); this.setDataSource(null); this.getRecord().setEditMode(Constants.EDIT_CURRENT); return true; } else return false; // Not found } /**
/** * Get the next record (return a null at EOF). * @param iRelPosition The relative records to move. * @return next FieldList or null if EOF. */ public FieldList move(int iRelPosition) throws DBException { if (!m_bIsOpen) this.open(); // This will requery the table the first time this.getRecord().setEditMode(Constants.EDIT_NONE); int iRecordStatus = this.doMove(iRelPosition); if (iRecordStatus == Constants.NORMAL_RETURN) { this.dataToFields(this.getRecord()); // Usually, you would setDataSource(null), but if in hasNext(), you will need the dataSource. this.getRecord().setEditMode(Constants.EDIT_CURRENT); return m_record; } else return null; // Usually EOF } /**