Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cayenne.access
Interface DataPortDelegate

    public interface DataPortDelegate

Interface for callback and delegate methods allowing implementing classes to control various aspects of data porting via DataPort. DataPort instance will invoke appropriate delegate methods during different stages of porting process.

Since:
  1.2: Prior to 1.2 DataPort classes were a part of cayenne-examples package.
Author:
  Andrus Adamchik

Method Summary
`void` | `didCleanData(DataPort portTool, DbEntity entity, int rowCount)` Invoked by DataPort right after the end of data cleanup for a given entity.
`void` | `didPortEntity(DataPort portTool, DbEntity entity, int rowCount)` Invoked by DataPort right after the end of data port for a given entity.
`Query` | `willCleanData(DataPort portTool, DbEntity entity, Query query)` Invoked by DataPort right before the start of data cleanup for a given entity.
`List` | `willCleanData(DataPort portTool, List entities)` Allows delegate to sort or otherwise alter a list of DbEntities right before data cleanup starts.
`List` | `willPortEntities(DataPort portTool, List entities)` Allows delegate to sort or otherwise alter a list of DbEntities right before the port starts.
`Query` | `willPortEntity(DataPort portTool, DbEntity entity, Query query)` Invoked by DataPort right before the start of data port for a given entity.

Method Detail

### willPortEntities

    List willPortEntities(DataPort portTool,
                          List entities)

  Allows delegate to sort or otherwise alter a list of DbEntities right before the port starts.

### willPortEntity

    Query willPortEntity(DataPort portTool,
                         DbEntity entity,
                         Query query)

  Invoked by DataPort right before the start of data port for a given entity. Allows delegate to handle such things like logging, etc. Also makes it possible to substitute or alter the select query used to fecth the source data, e.g. set a limiting qualifier.

### didPortEntity

    void didPortEntity(DataPort portTool,
                       DbEntity entity,
                       int rowCount)

  Invoked by DataPort right after the end of data port for a given entity. Allows delegate to handle such things like logging, etc.

### willCleanData

    List willCleanData(DataPort portTool,
                       List entities)

  Allows delegate to sort or otherwise alter a list of DbEntities right before data cleanup starts.

### willCleanData

    Query willCleanData(DataPort portTool,
                        DbEntity entity,
                        Query query)

  Invoked by DataPort right before the start of data cleanup for a given entity. Allows delegate to handle such things like logging, etc. Also makes it possible to substitute or alter the delete query used to cleanup the data, e.g. set a limiting qualifier.

### didCleanData

    void didCleanData(DataPort portTool,
                      DbEntity entity,
                      int rowCount)

  Invoked by DataPort right after the end of data cleanup for a given entity. Allows delegate to handle such things like logging, etc.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2007 Apache Cayenne. All Rights Reserved.