Class DBRelationDataProviderImpl

  • All Implemented Interfaces:
    com.im.df.api.dml.DFRelationDataProvider

    public class DBRelationDataProviderImpl
    extends Object
    implements com.im.df.api.dml.DFRelationDataProvider
    TODO - P2 [Svata]: Create subclasses for individual relationship types. Then discard the ugly IFs on relationship type and replace by abstract methods overriden by per-relation-type subclasses TODO - P1 [Svata]: the doClear method should check that all the detail rows are really linked to the prescribed master. ideally a queryForIDs plus intersection of the requested vs. actual set of detail entities. Then events would be fired that reflect the real operation.
    • Constructor Detail

      • DBRelationDataProviderImpl

        public DBRelationDataProviderImpl​(com.im.df.api.ddl.DFRelationship.Direction relationshipDir,
                                          DBSchemaDataProviderImpl sdProvider,
                                          boolean dmlEditorRole)
    • Method Detail

      • getLockable

        public com.im.commons.progress.DFLockable getLockable()
        Specified by:
        getLockable in interface com.im.df.api.dml.DFRelationDataProvider
      • getSchemaDataProvider

        public com.im.df.api.dml.DFSchemaDataProvider getSchemaDataProvider()
        Specified by:
        getSchemaDataProvider in interface com.im.df.api.dml.DFRelationDataProvider
      • getRelationshipDir

        public com.im.df.api.ddl.DFRelationship.Direction getRelationshipDir()
        Specified by:
        getRelationshipDir in interface com.im.df.api.dml.DFRelationDataProvider
      • addDFRelationDataListener

        public void addDFRelationDataListener​(com.im.df.api.support.DFRelationDataListener listener)
        Specified by:
        addDFRelationDataListener in interface com.im.df.api.dml.DFRelationDataProvider
      • removeDFRelationDataListener

        public void removeDFRelationDataListener​(com.im.df.api.support.DFRelationDataListener listener)
        Specified by:
        removeDFRelationDataListener in interface com.im.df.api.dml.DFRelationDataProvider
      • addRelation

        public void addRelation​(Comparable<?> idMaster,
                                Set<? extends Comparable<?>> idDetail,
                                com.im.commons.progress.DFEnvironmentRW env)
                         throws com.im.df.api.dml.DFRelationDataException
        Specified by:
        addRelation in interface com.im.df.api.dml.DFRelationDataProvider
        Throws:
        com.im.df.api.dml.DFRelationDataException
      • getRelatedIds

        public List<? extends Comparable<?>> getRelatedIds​(Comparable<?> srcId,
                                                           com.im.df.api.dml.DFTermExpression filter,
                                                           com.im.df.api.support.SortDirective sort)
        Specified by:
        getRelatedIds in interface com.im.df.api.dml.DFRelationDataProvider
      • removeRelation

        public void removeRelation​(Comparable<?> idMaster,
                                   Set<? extends Comparable<?>> removeIDs,
                                   com.im.commons.progress.DFEnvironmentRW env)
        Specified by:
        removeRelation in interface com.im.df.api.dml.DFRelationDataProvider