Package com.im.df.impl.db
Class DBRelationDataProviderImpl
- java.lang.Object
-
- com.im.df.impl.db.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 Summary
Constructors Constructor Description DBRelationDataProviderImpl(com.im.df.api.ddl.DFRelationship.Direction relationshipDir, DBSchemaDataProviderImpl sdProvider, boolean dmlEditorRole)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addDFRelationDataListener(com.im.df.api.support.DFRelationDataListener listener)
void
addRelation(Comparable<?> idMaster, Set<? extends Comparable<?>> idDetail, com.im.commons.progress.DFEnvironmentRW env)
com.im.commons.progress.DFLockable
getLockable()
List<? extends Comparable<?>>
getRelatedIds(Comparable<?> srcId, com.im.df.api.dml.DFTermExpression filter, com.im.df.api.support.SortDirective sort)
com.im.df.api.ddl.DFRelationship.Direction
getRelationshipDir()
com.im.df.api.dml.DFSchemaDataProvider
getSchemaDataProvider()
void
removeDFRelationDataListener(com.im.df.api.support.DFRelationDataListener listener)
void
removeRelation(Comparable<?> idMaster, Set<? extends Comparable<?>> removeIDs, com.im.commons.progress.DFEnvironmentRW env)
-
-
-
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 interfacecom.im.df.api.dml.DFRelationDataProvider
-
getSchemaDataProvider
public com.im.df.api.dml.DFSchemaDataProvider getSchemaDataProvider()
- Specified by:
getSchemaDataProvider
in interfacecom.im.df.api.dml.DFRelationDataProvider
-
getRelationshipDir
public com.im.df.api.ddl.DFRelationship.Direction getRelationshipDir()
- Specified by:
getRelationshipDir
in interfacecom.im.df.api.dml.DFRelationDataProvider
-
addDFRelationDataListener
public void addDFRelationDataListener(com.im.df.api.support.DFRelationDataListener listener)
- Specified by:
addDFRelationDataListener
in interfacecom.im.df.api.dml.DFRelationDataProvider
-
removeDFRelationDataListener
public void removeDFRelationDataListener(com.im.df.api.support.DFRelationDataListener listener)
- Specified by:
removeDFRelationDataListener
in interfacecom.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 interfacecom.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 interfacecom.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 interfacecom.im.df.api.dml.DFRelationDataProvider
-
-