public int addNewBookmark ( Object bookmark , int iHandleType ) { if ( bookmark == null ) return - 1 ; if ( iHandleType != DBConstants . DATA_SOURCE_HANDLE ) { // The only thing that I know for sure is the bookmark is correct. DataRecord dataRecord = new DataRecord ( null ) ; dataRecord . setHandle ( bookmark , iHandleType ) ; bookmark = dataRecord ; } int iIndexAdded = m_iEndOfFileIndex ; if ( m_iEndOfFileIndex == - 1 ) { // End of file has not been reached - add this record to the "Add" buffer. // Add code here } else { // Update the record cached at this location m_gridBuffer . addElement ( m_iEndOfFileIndex , bookmark , m_gridList ) ; m_iEndOfFileIndex ++ ; } return iIndexAdded ; }
Here is a bookmark for a brand new record add it to the end of the list .