public interface TransferPolicy
Given the source DBObjectProvider, target DBObjectProvider and array of source object descriptors it has to:
Modifier and Type | Method and Description |
---|---|
boolean |
canTransfer(TransferDescriptor transferDescriptor, SystemObject systemObject)
Check that it is OK to transfer the object.
|
void |
checkSourceAndTargetCompatability(TransferDescriptor td, boolean allowChange)
Check that the databases in the transfer are compatible.
|
SystemObject[] |
copyForTransfer(TransferDescriptor td, SystemObject[] existingObjects)
Copy the objects for transfer.
|
Difference |
filterDiff(TransferDescriptor td, Difference diff)
Filter the differences to remove any which are not applicable to the transfer policy.
|
SystemObject[] |
findExistingObjects(TransferDescriptor td)
Find any existing objects in the transfer target.
|
ResultSet |
getDifferences(TransferDescriptor td, SystemObject[] existingObjects, SystemObject[] copiedObjects)
Get a ResultSet describing the differences between any existing objects and the objects which have been copied for transfer.
|
SystemObject[] findExistingObjects(TransferDescriptor td) throws TransferFailedException
td
- the descriptor for the transferTransferFailedException
- if there is a problem finding the existing objects that is unrecoverableSystemObject[] copyForTransfer(TransferDescriptor td, SystemObject[] existingObjects) throws TransferFailedException
td
- the descriptor for the transferexistingObjects
- the objects that exist in the target as discovered by findExistingObjectsTransferFailedException
- if the copy operation failsResultSet getDifferences(TransferDescriptor td, SystemObject[] existingObjects, SystemObject[] copiedObjects)
existingObjects
- the objects already in the transfer targetcopiedObjects
- the objects that have been prepared to be transfered to the targetDifference filterDiff(TransferDescriptor td, Difference diff)
td
-diff
- a ResultSet containing the differences between the two sets of objectsvoid checkSourceAndTargetCompatability(TransferDescriptor td, boolean allowChange) throws TransferFailedException
TransferFailedException
is thrown.td
-allowChange
- - if false, no attempt is made to make the database compatible.TransferFailedException
boolean canTransfer(TransferDescriptor transferDescriptor, SystemObject systemObject)
transferDescriptor
-systemObject
- the object to transfer