com.im.df.api 5.8

com.im.df.api.dml
Interface DFSchemaDataProvider


public interface DFSchemaDataProvider

The root object for providing data in DIF. Using this object you can get to data providers for entities and for relationships. This class is also used for creating new DFResultSets.


Field Summary
static String XATTR_TURN_INIT_LOAD
          property in schema schema for turning of initial data loading
 
Method Summary
 DFResultSet getDefaultResultSet(DFDataTree dataTree, boolean showAll, DFEnvironmentRO env)
          Get a default DFResultSet for the given DFDataTree.
 DFEntityDataProvider getEntityDataProvider(DFEntity entity)
          Get the EDP (entity data provider) for the specified entity
 DFRelationDataProvider getRelationshipDataProvider(DFRelationship.Direction relationshipDir)
          Get the RDP (relation data provider) for the specified relationship direction.
 DFSchema getSchema()
          Get the schema which this data provider belongs to
 DFUndoManager getUndoManager()
          Get the data modifications undo/redo manager for this schema.
 boolean hasDefaultResultSet(DFDataTree dataTree)
          Test if there is default result set already created.
 DFUpdateInfo insert(DFInsertDescription data, DFEnvironmentRO env)
          Inserts complex data into one or more Entities.
 

Field Detail

XATTR_TURN_INIT_LOAD

static final String XATTR_TURN_INIT_LOAD
property in schema schema for turning of initial data loading

See Also:
Constant Field Values
Method Detail

getSchema

DFSchema getSchema()
Get the schema which this data provider belongs to


getEntityDataProvider

DFEntityDataProvider getEntityDataProvider(DFEntity entity)
Get the EDP (entity data provider) for the specified entity


getRelationshipDataProvider

DFRelationDataProvider getRelationshipDataProvider(DFRelationship.Direction relationshipDir)
Get the RDP (relation data provider) for the specified relationship direction.


getDefaultResultSet

DFResultSet getDefaultResultSet(DFDataTree dataTree,
                                boolean showAll,
                                DFEnvironmentRO env)
Get a default DFResultSet for the given DFDataTree. Current DIF implementation creates only one result set for each DFDataTree in the system. So all views share it now. In the future this can change, but this method will probably remain. Just a new API method will be created - e.g. createNewResultSet(...).

Parameters:
dataTree - The DFDataTree
showAll - If true result set will contain all id of the master entity, if false it will contain no rows (means returned result set will be in state like after applyIds(EMPTY_LIST). Important: This parameter has only reason when new result set is created during this call. If someone else call getDefaultResultSet for the same DFDataTree before it has no effect.

hasDefaultResultSet

boolean hasDefaultResultSet(DFDataTree dataTree)
Test if there is default result set already created. This method can change in the future as well as getDefaultResultSet() method, when DIF will support more result sets for one datatree.

Parameters:
dataTree - The datatree which should be tested
Returns:
True if DFResultSet was already created by seme previous getDefaultResultSet() method call. Otherwise false.

insert

DFUpdateInfo insert(DFInsertDescription data,
                    DFEnvironmentRO env)
Inserts complex data into one or more Entities. It is possible to specify values for different Entities connected by relationships in order to satisfy integrity constraints. For simple insertions, use the DFEntityDataProvider. See DFInsertDescription documentation for more details

Parameters:
data - The i nstructions what to insert
env - The environment

getUndoManager

DFUndoManager getUndoManager()
Get the data modifications undo/redo manager for this schema. There is only one DFUndoManager per one DFSchema. It's possible to obtain it from DFSchemaDataProvider as only data modification operations are now undoable.


com.im.df.api 5.8