Class SequenceDBWrapper

All Implemented Interfaces:
Serializable, SequenceDB, SequenceDBLite, Changeable
Direct Known Subclasses:
CachingSequenceDB, SubSequenceDB, ViewingSequenceDB

public abstract class SequenceDBWrapper extends AbstractSequenceDB implements Serializable
An abstract implementation of SequenceDB that wraps up another database.
Author:
Matthew Pocock
See Also:
  • Constructor Details

  • Method Details

    • getChangeSupport

      Description copied from class: AbstractChangeable
      Called to retrieve the ChangeSupport for this object.

      Your implementation of this method should have the following structure:

       ChangeSupport cs = super.getChangeSupport(ct);
      
       if(someForwarder == null invalid input: '&'invalid input: '&' ct.isMatching(SomeInterface.SomeChangeType)) {
         someForwarder = new ChangeForwarder(...
      
         this.stateVariable.addChangeListener(someForwarder, VariableInterface.AChange);
       }
      
       return cs;
       
      It is usual for the forwarding listeners (someForwarder in this example) to be transient and lazily instantiated. Be sure to register invalid input: '&' unregister the forwarder in the code that does the ChangeEvent handling in setter methods.
      Overrides:
      getChangeSupport in class AbstractChangeable
    • getParent

      Return the parent SequenceDB.
      Returns:
      the parent SequenceDB