blob: 4db3a4611b10a41e2909f4996aaa405fce436029 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.5.0_06) on Wed Jul 19 14:45:43 EDT 2006 -->
<TITLE>
DataPort (Apache Cayenne API Documentation - v.2.0-incubating-SNAPSHOT)
</TITLE>
<META NAME="keywords" CONTENT="org.apache.cayenne.access.DataPort class">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../apache-javadoc.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="DataPort (Apache Cayenne API Documentation - v.2.0-incubating-SNAPSHOT)";
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../org/apache/cayenne/access/DataNode.html" title="class in org.apache.cayenne.access"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/apache/cayenne/access/DataPortDelegate.html" title="interface in org.apache.cayenne.access"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?org/apache/cayenne/access/DataPort.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="DataPort.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.apache.cayenne.access</FONT>
<BR>
Class DataPort</H2>
<PRE>
java.lang.Object
<IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.cayenne.access.DataPort</B>
</PRE>
<HR>
<DL>
<DT><PRE>public class <B>DataPort</B><DT>extends java.lang.Object</DL>
</PRE>
<P>
An engine to port data between two DataNodes. These nodes can potentially connect to
databases from different vendors. The only assumption is that all of the DbEntities
(tables) being ported are present in both source and destination databases and are
adequately described by Cayenne mapping.
<p>
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.
</p>
<P>
<P>
<DL>
<DT><B>Since:</B></DT>
<DD>1.2: Prior to 1.2 DataPort classes were a part of cayenne-examples package.</DD>
<DT><B>Author:</B></DT>
<DD>Andrei Adamchik</DD>
</DL>
<HR>
<P>
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/access/DataPort.html#cleaningDestination">cleaningDestination</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../../../../org/apache/cayenne/access/DataPortDelegate.html" title="interface in org.apache.cayenne.access">DataPortDelegate</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/access/DataPort.html#delegate">delegate</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../../../../org/apache/cayenne/access/DataNode.html" title="class in org.apache.cayenne.access">DataNode</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/access/DataPort.html#destinationNode">destinationNode</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;java.util.Collection</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/access/DataPort.html#entities">entities</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/access/DataPort.html#INSERT_BATCH_SIZE">INSERT_BATCH_SIZE</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/access/DataPort.html#insertBatchSize">insertBatchSize</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../../../../org/apache/cayenne/access/DataNode.html" title="class in org.apache.cayenne.access">DataNode</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/access/DataPort.html#sourceNode">sourceNode</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/access/DataPort.html#DataPort()">DataPort</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/access/DataPort.html#DataPort(org.apache.cayenne.access.DataPortDelegate)">DataPort</A></B>(<A HREF="../../../../org/apache/cayenne/access/DataPortDelegate.html" title="interface in org.apache.cayenne.access">DataPortDelegate</A>&nbsp;delegate)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new DataPort instance, setting its delegate.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/access/DataPort.html#execute()">execute</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Runs DataPort.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../org/apache/cayenne/access/DataPortDelegate.html" title="interface in org.apache.cayenne.access">DataPortDelegate</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/access/DataPort.html#getDelegate()">getDelegate</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns previously initialized DataPortDelegate object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../org/apache/cayenne/access/DataNode.html" title="class in org.apache.cayenne.access">DataNode</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/access/DataPort.html#getDestinationNode()">getDestinationNode</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.Collection</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/access/DataPort.html#getEntities()">getEntities</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/access/DataPort.html#getInsertBatchSize()">getInsertBatchSize</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../org/apache/cayenne/access/DataNode.html" title="class in org.apache.cayenne.access">DataNode</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/access/DataPort.html#getSourceNode()">getSourceNode</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/access/DataPort.html#isCleaningDestination()">isCleaningDestination</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if a DataPort was configured to delete all data from the destination
tables.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/access/DataPort.html#processDelete(java.util.List)">processDelete</A></B>(java.util.List&nbsp;entities)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Cleans up destination tables data.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/access/DataPort.html#processInsert(java.util.List)">processInsert</A></B>(java.util.List&nbsp;entities)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads source data from source, saving it to destination.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/access/DataPort.html#setCleaningDestination(boolean)">setCleaningDestination</A></B>(boolean&nbsp;cleaningDestination)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Defines whether DataPort should delete all data from destination tables before
doing the port.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/access/DataPort.html#setDelegate(org.apache.cayenne.access.DataPortDelegate)">setDelegate</A></B>(<A HREF="../../../../org/apache/cayenne/access/DataPortDelegate.html" title="interface in org.apache.cayenne.access">DataPortDelegate</A>&nbsp;delegate)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/access/DataPort.html#setDestinationNode(org.apache.cayenne.access.DataNode)">setDestinationNode</A></B>(<A HREF="../../../../org/apache/cayenne/access/DataNode.html" title="class in org.apache.cayenne.access">DataNode</A>&nbsp;destinationNode)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the DataNode serving as a destination of the ported data.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/access/DataPort.html#setEntities(java.util.Collection)">setEntities</A></B>(java.util.Collection&nbsp;entities)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the initial list of entities to process.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/access/DataPort.html#setInsertBatchSize(int)">setInsertBatchSize</A></B>(int&nbsp;insertBatchSize)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets a parameter used for tuning insert batches.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/cayenne/access/DataPort.html#setSourceNode(org.apache.cayenne.access.DataNode)">setSourceNode</A></B>(<A HREF="../../../../org/apache/cayenne/access/DataNode.html" title="class in org.apache.cayenne.access">DataNode</A>&nbsp;sourceNode)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the DataNode serving as a source of the ported data.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Field Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="INSERT_BATCH_SIZE"><!-- --></A><H3>
INSERT_BATCH_SIZE</H3>
<PRE>
public static final int <B>INSERT_BATCH_SIZE</B></PRE>
<DL>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.cayenne.access.DataPort.INSERT_BATCH_SIZE">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="sourceNode"><!-- --></A><H3>
sourceNode</H3>
<PRE>
protected <A HREF="../../../../org/apache/cayenne/access/DataNode.html" title="class in org.apache.cayenne.access">DataNode</A> <B>sourceNode</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="destinationNode"><!-- --></A><H3>
destinationNode</H3>
<PRE>
protected <A HREF="../../../../org/apache/cayenne/access/DataNode.html" title="class in org.apache.cayenne.access">DataNode</A> <B>destinationNode</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="entities"><!-- --></A><H3>
entities</H3>
<PRE>
protected java.util.Collection <B>entities</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="cleaningDestination"><!-- --></A><H3>
cleaningDestination</H3>
<PRE>
protected boolean <B>cleaningDestination</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="delegate"><!-- --></A><H3>
delegate</H3>
<PRE>
protected <A HREF="../../../../org/apache/cayenne/access/DataPortDelegate.html" title="interface in org.apache.cayenne.access">DataPortDelegate</A> <B>delegate</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="insertBatchSize"><!-- --></A><H3>
insertBatchSize</H3>
<PRE>
protected int <B>insertBatchSize</B></PRE>
<DL>
<DL>
</DL>
</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="DataPort()"><!-- --></A><H3>
DataPort</H3>
<PRE>
public <B>DataPort</B>()</PRE>
<DL>
</DL>
<HR>
<A NAME="DataPort(org.apache.cayenne.access.DataPortDelegate)"><!-- --></A><H3>
DataPort</H3>
<PRE>
public <B>DataPort</B>(<A HREF="../../../../org/apache/cayenne/access/DataPortDelegate.html" title="interface in org.apache.cayenne.access">DataPortDelegate</A>&nbsp;delegate)</PRE>
<DL>
<DD>Creates a new DataPort instance, setting its delegate.
<P>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="execute()"><!-- --></A><H3>
execute</H3>
<PRE>
public void <B>execute</B>()
throws <A HREF="../../../../org/apache/cayenne/CayenneException.html" title="class in org.apache.cayenne">CayenneException</A></PRE>
<DL>
<DD>Runs DataPort. The instance must be fully configured by the time this method is
invoked, having its delegate, source and destinatio nodes, and a list of entities
set up.
<P>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/apache/cayenne/CayenneException.html" title="class in org.apache.cayenne">CayenneException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="processDelete(java.util.List)"><!-- --></A><H3>
processDelete</H3>
<PRE>
protected void <B>processDelete</B>(java.util.List&nbsp;entities)</PRE>
<DL>
<DD>Cleans up destination tables data.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="processInsert(java.util.List)"><!-- --></A><H3>
processInsert</H3>
<PRE>
protected void <B>processInsert</B>(java.util.List&nbsp;entities)
throws <A HREF="../../../../org/apache/cayenne/CayenneException.html" title="class in org.apache.cayenne">CayenneException</A></PRE>
<DL>
<DD>Reads source data from source, saving it to destination.
<P>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/apache/cayenne/CayenneException.html" title="class in org.apache.cayenne">CayenneException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="getEntities()"><!-- --></A><H3>
getEntities</H3>
<PRE>
public java.util.Collection <B>getEntities</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getSourceNode()"><!-- --></A><H3>
getSourceNode</H3>
<PRE>
public <A HREF="../../../../org/apache/cayenne/access/DataNode.html" title="class in org.apache.cayenne.access">DataNode</A> <B>getSourceNode</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getDestinationNode()"><!-- --></A><H3>
getDestinationNode</H3>
<PRE>
public <A HREF="../../../../org/apache/cayenne/access/DataNode.html" title="class in org.apache.cayenne.access">DataNode</A> <B>getDestinationNode</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setEntities(java.util.Collection)"><!-- --></A><H3>
setEntities</H3>
<PRE>
public void <B>setEntities</B>(java.util.Collection&nbsp;entities)</PRE>
<DL>
<DD>Sets the initial list of entities to process. This list can be later modified by
the delegate.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setSourceNode(org.apache.cayenne.access.DataNode)"><!-- --></A><H3>
setSourceNode</H3>
<PRE>
public void <B>setSourceNode</B>(<A HREF="../../../../org/apache/cayenne/access/DataNode.html" title="class in org.apache.cayenne.access">DataNode</A>&nbsp;sourceNode)</PRE>
<DL>
<DD>Sets the DataNode serving as a source of the ported data.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setDestinationNode(org.apache.cayenne.access.DataNode)"><!-- --></A><H3>
setDestinationNode</H3>
<PRE>
public void <B>setDestinationNode</B>(<A HREF="../../../../org/apache/cayenne/access/DataNode.html" title="class in org.apache.cayenne.access">DataNode</A>&nbsp;destinationNode)</PRE>
<DL>
<DD>Sets the DataNode serving as a destination of the ported data.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getDelegate()"><!-- --></A><H3>
getDelegate</H3>
<PRE>
public <A HREF="../../../../org/apache/cayenne/access/DataPortDelegate.html" title="interface in org.apache.cayenne.access">DataPortDelegate</A> <B>getDelegate</B>()</PRE>
<DL>
<DD>Returns previously initialized DataPortDelegate object.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setDelegate(org.apache.cayenne.access.DataPortDelegate)"><!-- --></A><H3>
setDelegate</H3>
<PRE>
public void <B>setDelegate</B>(<A HREF="../../../../org/apache/cayenne/access/DataPortDelegate.html" title="interface in org.apache.cayenne.access">DataPortDelegate</A>&nbsp;delegate)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="isCleaningDestination()"><!-- --></A><H3>
isCleaningDestination</H3>
<PRE>
public boolean <B>isCleaningDestination</B>()</PRE>
<DL>
<DD>Returns true if a DataPort was configured to delete all data from the destination
tables.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setCleaningDestination(boolean)"><!-- --></A><H3>
setCleaningDestination</H3>
<PRE>
public void <B>setCleaningDestination</B>(boolean&nbsp;cleaningDestination)</PRE>
<DL>
<DD>Defines whether DataPort should delete all data from destination tables before
doing the port.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getInsertBatchSize()"><!-- --></A><H3>
getInsertBatchSize</H3>
<PRE>
public int <B>getInsertBatchSize</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setInsertBatchSize(int)"><!-- --></A><H3>
setInsertBatchSize</H3>
<PRE>
public void <B>setInsertBatchSize</B>(int&nbsp;insertBatchSize)</PRE>
<DL>
<DD>Sets a parameter used for tuning insert batches. If set to a value greater than
zero, DataPort will commit every N rows. If set to value less or equal to zero,
DataPort will commit only once at the end of the insert.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../org/apache/cayenne/access/DataNode.html" title="class in org.apache.cayenne.access"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/apache/cayenne/access/DataPortDelegate.html" title="interface in org.apache.cayenne.access"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?org/apache/cayenne/access/DataPort.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="DataPort.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
<i>Copyright &#169; 2001-2006 <a href=
"http://apache.org" target="_top">Apache.org</a> All Rights Reserved.</i>
</BODY>
</HTML>