public Object add(Object data, int iOpenMode) throws DBException, RemoteException
    {
        Object key = this.getKey(data);
        if (key == null)
        {   // If autosequence, bump key
            try   {
                key = m_mDataMap.lastKey();
            } catch (NoSuchElementException ex)   {
                key = new Integer(0);
            }
            if (key instanceof Integer)   // Always
                key = new Integer(((Integer)key).intValue() + 1);
            ((Vector)data).set(0, key);
        }
        if (m_mDataMap.get(key) != null)
            throw new DBException("Duplicate record");
        m_mDataMap.put(key, data);
        m_objCurrentKey = null;
        m_iterator = null;
        
        return key;
    }
public Object add ( Object data , int iOpenMode ) throws DBException , RemoteException { Object key = this . getKey ( data ) ; if ( key == null ) { try { key = m_mDataMap . lastKey ( ) ; } catch ( NoSuchElementException ex ) { key = new Integer ( 0 ) ; } if ( key instanceof Integer ) key = new Integer ( ( ( Integer ) key ) . intValue ( ) + 1 ) ; ( ( Vector ) data ) . set ( 0 , key ) ; } if ( m_mDataMap . get ( key ) != null ) throw new DBException ( "Duplicate record" ) ; m_mDataMap . put ( key , data ) ; m_objCurrentKey = null ; m_iterator = null ; return key ; }
Add add this data to the file.
@param data A vector object containing the raw data for the record.
@exception Exception File exception.