@Deprecated public class DataPort extends Object
DataPort implements a Cayenne-based algorithm to read data from source DataNode and write to destination DataNode. It uses DataPortDelegate interface to externalize various things, such as determining what entities to port (include/exclude from port based on some criteria), logging the progress of port operation, qualifying the queries, etc.
Modifier and Type | Field and Description |
---|---|
protected boolean |
cleaningDestination
Deprecated.
|
protected DataPortDelegate |
delegate
Deprecated.
|
protected DataNode |
destinationNode
Deprecated.
|
protected Collection |
entities
Deprecated.
|
static int |
INSERT_BATCH_SIZE
Deprecated.
|
protected int |
insertBatchSize
Deprecated.
|
protected DataNode |
sourceNode
Deprecated.
|
Constructor and Description |
---|
DataPort()
Deprecated.
|
DataPort(DataPortDelegate delegate)
Deprecated.
Creates a new DataPort instance, setting its delegate.
|
Modifier and Type | Method and Description |
---|---|
void |
execute()
Deprecated.
Runs DataPort.
|
DataPortDelegate |
getDelegate()
Deprecated.
Returns previously initialized DataPortDelegate object.
|
DataNode |
getDestinationNode()
Deprecated.
|
Collection |
getEntities()
Deprecated.
|
int |
getInsertBatchSize()
Deprecated.
|
DataNode |
getSourceNode()
Deprecated.
|
boolean |
isCleaningDestination()
Deprecated.
Returns true if a DataPort was configured to delete all data from the
destination tables.
|
protected void |
processDelete(List entities)
Deprecated.
Cleans up destination tables data.
|
protected void |
processInsert(List entities)
Deprecated.
Reads source data from source, saving it to destination.
|
void |
setCleaningDestination(boolean cleaningDestination)
Deprecated.
Defines whether DataPort should delete all data from destination tables
before doing the port.
|
void |
setDelegate(DataPortDelegate delegate)
Deprecated.
|
void |
setDestinationNode(DataNode destinationNode)
Deprecated.
Sets the DataNode serving as a destination of the ported data.
|
void |
setEntities(Collection entities)
Deprecated.
Sets the initial list of entities to process.
|
void |
setInsertBatchSize(int insertBatchSize)
Deprecated.
Sets a parameter used for tuning insert batches.
|
void |
setSourceNode(DataNode sourceNode)
Deprecated.
Sets the DataNode serving as a source of the ported data.
|
public static final int INSERT_BATCH_SIZE
protected DataNode sourceNode
protected DataNode destinationNode
protected Collection entities
protected boolean cleaningDestination
protected DataPortDelegate delegate
protected int insertBatchSize
public DataPort()
public DataPort(DataPortDelegate delegate)
public void execute() throws CayenneException
CayenneException
protected void processDelete(List entities)
protected void processInsert(List entities) throws CayenneException
CayenneException
public Collection getEntities()
public DataNode getSourceNode()
public DataNode getDestinationNode()
public void setEntities(Collection entities)
public void setSourceNode(DataNode sourceNode)
public void setDestinationNode(DataNode destinationNode)
public DataPortDelegate getDelegate()
public void setDelegate(DataPortDelegate delegate)
public boolean isCleaningDestination()
public void setCleaningDestination(boolean cleaningDestination)
public int getInsertBatchSize()
public void setInsertBatchSize(int insertBatchSize)
Copyright © 2001–2023 Apache Cayenne. All rights reserved.