Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 312247 - Make the behaviour of INVALID objects configurable
Summary: Make the behaviour of INVALID objects configurable
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 7
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Eike Stepper CLA
QA Contact: Eike Stepper CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-10 08:52 EDT by Eike Stepper CLA
Modified: 2010-06-29 09:22 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eike Stepper CLA 2010-05-10 08:52:56 EDT
Currently all access to INVALID objects (except equals/hashCode) throw an InvalidObjectException. This can be a problem, e.g., for databinding that keep handles to objects internally.
Comment 1 Eike Stepper CLA 2010-05-10 08:55:25 EDT
I added new API:

CDOView.Options.setInvalidationPolicy(CDOInvalidationPolicy policy)

And new SPI:

public interface CDOInvalidationPolicy
{
  public static final CDOInvalidationPolicy DEFAULT = new CDOInvalidationPolicy()...
  public static final CDOInvalidationPolicy RELAXED = new CDOInvalidationPolicy()...

  public void handleInvalidation(CDOObject object);
  public void handleInvalidObject(CDOObject object);
}
Comment 2 Eike Stepper CLA 2010-05-10 08:56:10 EDT
Committed to HEAD
Comment 3 Eike Stepper CLA 2010-06-29 04:40:57 EDT
Available in 3.0 GA:
http://download.eclipse.org/modeling/emf/cdo/updates/3.0-releases/