Update the current record.
This method has some wierd code to emulate the way behaviors are called on a write.
@param The data to update.
@exception DBException File exception.
331219
public void set(Object data, int iOpenMode) throws DBException, RemoteException
    {
        Record record = this.getMainRecord();
        int iOldOpenMode = record.getOpenMode();
        try   {
            Utility.getLogger().info("EJB Set");
            synchronized (this.getTask())
            {
                record.setOpenMode((iOldOpenMode & ~DBConstants.LOCK_TYPE_MASK) | (iOpenMode & DBConstants.LOCK_TYPE_MASK));  // Use client's lock data
                if (record.getEditMode() == Constants.EDIT_CURRENT)
                    record.edit();
                Record recordBase = record.getTable().getCurrentTable().getRecord();
                int iFieldTypes = this.getFieldTypes(recordBase);
                int iErrorCode = this.moveBufferToFields(data, iFieldTypes, recordBase);
                if (iErrorCode != DBConstants.NORMAL_RETURN)
                    ;   //?
                if (DBConstants.TRUE.equals(record.getTable().getProperty(DBParams.SUPRESSREMOTEDBMESSAGES)))
                    record.setSupressRemoteMessages(true);
                record.getTable().set(recordBase);
            }
        } catch (DBException ex)    {
            throw ex;
        } catch (Exception ex)  {
            ex.printStackTrace();
            throw new DBException(ex.getMessage());
        } finally   {
            record.setSupressRemoteMessages(false);
            this.getMainRecord().setOpenMode(iOldOpenMode);
        }
    }
1362538
public int update(DatabaseConnection databaseConnection, PreparedUpdate<T> preparedUpdate) throws SQLException {
		CompiledStatement compiledStatement = preparedUpdate.compile(databaseConnection, StatementType.UPDATE);
		try {
			int result = compiledStatement.runUpdate();
			if (dao != null && !localIsInBatchMode.get()) {
				dao.notifyChanges();
			}
			return result;
		} finally {
			IOUtils.closeThrowSqlException(compiledStatement, "compiled statement");
		}
	}
221052
public void set(Object data, int iOpenMode) throws DBException, RemoteException
    {
        synchronized(m_objSync)
        {
            m_tableRemote.set(data, iOpenMode);
        }
    }
750356
public void doSet(Record record) throws DBException
    {
        try   {
            m_pTable.set(this);
        } catch (DBException ex)    {
            throw DatabaseException.toDatabaseException(ex);
        }
    }
58747
public void setData (Collection<?> data)
    {
        _data.clear();
        _data.addAll(data);
        _model.fireTableDataChanged();
    }
1372900
public int update(DatabaseConnection databaseConnection, T data, ObjectCache objectCache) throws SQLException {
		if (mappedUpdate == null) {
			mappedUpdate = MappedUpdate.build(dao, tableInfo);
		}
		int result = mappedUpdate.update(databaseConnection, data, objectCache);
		if (dao != null && !localIsInBatchMode.get()) {
			dao.notifyChanges();
		}
		return result;
	}
498685
public void open() throws DBException
    {
        m_bIsOpen = true;
        this.getRecord().setEditMode(Constants.EDIT_NONE);
        this.setDataSource(null);
    }
1007086
@Override
	public void updateComponent(final Object data) {
		MyData myData = (MyData) data;
		name.setText("<B>" + myData.getName() + "</B>");
		count.setText(String.valueOf(myData.getCount()));
	}
1024925
public void remove() throws DBException
    {
        this.syncCurrentToBase();
        boolean[] rgbListenerState = this.getRecord().setEnableListeners(false);
        this.getRecord().handleRecordChange(DBConstants.DELETE_TYPE);   // Fake the call for the grid table
        this.getRecord().setEnableListeners(rgbListenerState);
        
        super.remove();
        this.syncCurrentToBase();

        rgbListenerState = this.getRecord().setEnableListeners(false);
        this.getRecord().handleRecordChange(DBConstants.AFTER_DELETE_TYPE);   // Fake the call for the grid table
        this.getRecord().setEnableListeners(rgbListenerState);
    }
1022575
public void doOpen() throws DBException
    {
        if (this.lockOnDBTrxType(null, DBConstants.AFTER_REQUERY_TYPE, false))  // AFTER_REQUERY_TYPE = Open since there is no close
            this.unlockIfLocked(this.getRecord(), null);    // Release any locks

        super.doOpen();

        m_iLastOrder = this.getRecord().getDefaultOrder();
        m_iRow = -1;
        m_iEOFRow = Integer.MAX_VALUE;
    }
299433
public int executeUpdate() throws SQLException {
        return executeUpdate(new Updater() {
            
            @Override
            public int executeUpdate(final Statement statement, final String sql) throws SQLException {
                return statement.executeUpdate(sql);
            }
        });
    }
10934
@Override
    public void update(Object pData) throws APPErrorException {
        valid(pData);
        mDao.updateByPrimaryKey(pData);
    }
400332
public void doAddNew() throws DBException
    {
        if (this.lockOnDBTrxType(null, DBConstants.ADD_TYPE, false))  // ADD_TYPE = Add new; Should I do the unlock in my code?
            this.unlockIfLocked(this.getRecord(), null);    // Release any locks
    }
839869
@Override
	public synchronized void update(long paramId, int used, String flags,
			String values) throws DatabaseException {
    	SqlPreparedStatementWrapper psUpdate = null;
        try {
        	psUpdate = DbSQL.getSingleton().getPreparedStatement("param.ps.update");
			psUpdate.getPs().setInt(1, used);
			psUpdate.getPs().setString(2, flags);
			psUpdate.getPs().setString(3, values);
			psUpdate.getPs().setLong(4, paramId);
			psUpdate.getPs().executeUpdate();
		} catch (SQLException e) {
			throw new DatabaseException(e);
		} finally {
			DbSQL.getSingleton().releasePreparedStatement(psUpdate);
		}
    }
144062
public void doAdd(Record record) throws DBException
    {
        record = this.moveRecordToBase(record);

        int iOpenMode = record.getOpenMode();
        RecordChangedHandler recordChangeListener = (RecordChangedHandler)record.getListener(RecordChangedHandler.class);
        Object[] rgobjEnabledFields = record.setEnableFieldListeners(false);
        boolean[] rgbEnabled = record.setEnableListeners(false);
        if (recordChangeListener != null)
        	recordChangeListener.setEnabledListener(true);	// I may need this listener (for an update) to do the update =ID AND =LastChangeDate
        
        try {
            record.setOpenMode(0);  // Normal add
            this.getNextTable().add(record);
        } catch (DBException ex) {
            throw ex;
        } finally {
            record.setOpenMode(iOpenMode);
            record.setEnableListeners(rgbEnabled);
            record.setEnableFieldListeners(rgobjEnabledFields);
        }
    }
941856
public void doAdd(Record record) throws DBException
    {
        m_LastModifiedBookmark = null;
        try   {
            BaseBuffer buffer = (BaseBuffer)m_dataSource;
            Object data = buffer.getPhysicalData();
            synchronized (this.getSyncObject())
            {   // In case this is called from another task
                m_LastModifiedBookmark = m_tableRemote.add(data, this.getRecord().getOpenMode());
            }
        } catch (Exception ex) {
            throw DatabaseException.toDatabaseException(ex);
        }
    }
114838
public void doAdd(Record record) throws DBException
    {
        if (this.lockOnDBTrxType(null, DBConstants.AFTER_ADD_TYPE, false))  // Should I do the unlock in my code?
            this.unlockIfLocked(this.getRecord(), null);    // Release any locks
        m_LastModifiedBookmark = null;
        CounterField fldID = (CounterField)record.getCounterField();
        if (fldID != null)
            if (!fldID.isNull())
                if (DBConstants.FALSE.equalsIgnoreCase(this.getProperty(SQLParams.AUTO_SEQUENCE_ENABLED)))
                    fldID = null;   // Special case - autosequence is disabled, so write the field.
        if (fldID != null)
            fldID.setModified(false); // Never set a counter field
        if (fldID != null)
            if (!this.getDatabase().isAutosequenceSupport())
        { // If the db does not support identity, you must get the next larger key by doing a select desc on the primary key
            this.doAddAutosequence(record);     // Special code to get next sequence
            return;
        }
        String strRecordset = record.getSQLInsert(SQLParams.USE_INSERT_UPDATE_LITERALS);
        int iType = DBConstants.SQL_INSERT_TABLE_TYPE;
        this.executeUpdate(strRecordset, iType);
    }