void disconnect(boolean valid) { Assert.assertTrue( getSession() != null, "Session is null" );  if (isDisconnected()) { return; }  if (isModified()) { valid = false; }  m_valid = valid; m_disconnected = true;   m_data.sync();  for (Iterator it = m_data.getDataAssociations(); it.hasNext(); ) { DataAssociationImpl da = (DataAssociationImpl) it.next(); if (da != null) { da.sync(); } }
public void disconnect() { disconnect(true);
    void disconnect(boolean valid) {        Assert.assertTrue(            getSession() != null,            "Session is null"            );        if (isDisconnected()) {            return;        }        if (isModified()) {            valid = false;        }        m_valid = valid;        m_disconnected = true;        // This will clear out any data objects held onto by associations.        m_data.sync();        for (Iterator it = m_data.getDataAssociations(); it.hasNext(); ) {            DataAssociationImpl da = (DataAssociationImpl) it.next();            if (da != null) {                da.sync();            }        }    }