blob: 1e95b81724ea293f86f87bfed2cb760a25493f65 [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:42:49 EDT 2006 -->
<TITLE>
DbRelationship (Cayenne API Documentation - v.1.2)
</TITLE>
<META NAME="keywords" CONTENT="org.objectstyle.cayenne.map.DbRelationship class">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../objectstyle-javadoc.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="DbRelationship (Cayenne API Documentation - v.1.2)";
}
</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/objectstyle/cayenne/map/DbKeyGenerator.html" title="class in org.objectstyle.cayenne.map"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/objectstyle/cayenne/map/DeleteRule.html" title="class in org.objectstyle.cayenne.map"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?org/objectstyle/cayenne/map/DbRelationship.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="DbRelationship.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.objectstyle.cayenne.map</FONT>
<BR>
Class DbRelationship</H2>
<PRE>
java.lang.Object
<IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../org/objectstyle/cayenne/map/Relationship.html" title="class in org.objectstyle.cayenne.map">org.objectstyle.cayenne.map.Relationship</A>
<IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.objectstyle.cayenne.map.DbRelationship</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD>java.io.Serializable, <A HREF="../../../../org/objectstyle/cayenne/util/CayenneMapEntry.html" title="interface in org.objectstyle.cayenne.util">CayenneMapEntry</A>, <A HREF="../../../../org/objectstyle/cayenne/util/XMLSerializable.html" title="interface in org.objectstyle.cayenne.util">XMLSerializable</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public class <B>DbRelationship</B><DT>extends <A HREF="../../../../org/objectstyle/cayenne/map/Relationship.html" title="class in org.objectstyle.cayenne.map">Relationship</A></DL>
</PRE>
<P>
A DbRelationship is a descriptor of a database inter-table relationship based on one or
more primary key/foreign key pairs.
<P>
<P>
<DL>
<DT><B>Author:</B></DT>
<DD>Misha Shengaout, Andrei Adamchik</DD>
<DT><B>See Also:</B><DD><A HREF="../../../../serialized-form.html#org.objectstyle.cayenne.map.DbRelationship">Serialized Form</A></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;java.util.List</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/map/DbRelationship.html#joins">joins</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;<A HREF="../../../../org/objectstyle/cayenne/event/EventSubject.html" title="class in org.objectstyle.cayenne.event">EventSubject</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/map/DbRelationship.html#PROPERTY_DID_CHANGE">PROPERTY_DID_CHANGE</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;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/map/DbRelationship.html#toDependentPK">toDependentPK</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;<A NAME="fields_inherited_from_class_org.objectstyle.cayenne.map.Relationship"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Fields inherited from class org.objectstyle.cayenne.map.<A HREF="../../../../org/objectstyle/cayenne/map/Relationship.html" title="class in org.objectstyle.cayenne.map">Relationship</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../org/objectstyle/cayenne/map/Relationship.html#name">name</A>, <A HREF="../../../../org/objectstyle/cayenne/map/Relationship.html#sourceEntity">sourceEntity</A>, <A HREF="../../../../org/objectstyle/cayenne/map/Relationship.html#targetEntityName">targetEntityName</A>, <A HREF="../../../../org/objectstyle/cayenne/map/Relationship.html#toMany">toMany</A></CODE></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/objectstyle/cayenne/map/DbRelationship.html#DbRelationship()">DbRelationship</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/objectstyle/cayenne/map/DbRelationship.html#DbRelationship(java.lang.String)">DbRelationship</A></B>(java.lang.String&nbsp;name)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</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/objectstyle/cayenne/map/DbRelationship.html#addJoin(org.objectstyle.cayenne.map.DbJoin)">addJoin</A></B>(<A HREF="../../../../org/objectstyle/cayenne/map/DbJoin.html" title="class in org.objectstyle.cayenne.map">DbJoin</A>&nbsp;join)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a join.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../org/objectstyle/cayenne/map/DbRelationship.html" title="class in org.objectstyle.cayenne.map">DbRelationship</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/map/DbRelationship.html#createReverseRelationship()">createReverseRelationship</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new relationship with the same set of joins, but going in the opposite
direction.</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/objectstyle/cayenne/map/DbRelationship.html#encodeAsXML(org.objectstyle.cayenne.util.XMLEncoder)">encodeAsXML</A></B>(<A HREF="../../../../org/objectstyle/cayenne/util/XMLEncoder.html" title="class in org.objectstyle.cayenne.util">XMLEncoder</A>&nbsp;encoder)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Prints itself as XML to the provided XMLEncoder.</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/objectstyle/cayenne/map/DbRelationship.html#firePropertyDidChange()">firePropertyDidChange</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.List</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/map/DbRelationship.html#getJoins()">getJoins</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a list of joins.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../org/objectstyle/cayenne/map/DbRelationship.html" title="class in org.objectstyle.cayenne.map">DbRelationship</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/map/DbRelationship.html#getReverseRelationship()">getReverseRelationship</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns DbRelationship that is the opposite of this DbRelationship.</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/objectstyle/cayenne/map/DbRelationship.html#getSourceAttributes()">getSourceAttributes</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a Collection of source attributes.</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/objectstyle/cayenne/map/DbRelationship.html#getTargetAttributes()">getTargetAttributes</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a Collection of target attributes.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../org/objectstyle/cayenne/map/Entity.html" title="class in org.objectstyle.cayenne.map">Entity</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/map/DbRelationship.html#getTargetEntity()">getTargetEntity</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a target of this relationship.</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/objectstyle/cayenne/map/DbRelationship.html#isToDependentPK()">isToDependentPK</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns <code>true</code> if relationship from source to target points to
dependent primary key.</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/objectstyle/cayenne/map/DbRelationship.html#isToMasterPK()">isToMasterPK</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns <code>true</code> if a method <code>isToDependentPK</code> of reverse
relationship of this relationship returns <code>true</code>.</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/objectstyle/cayenne/map/DbRelationship.html#isToPK()">isToPK</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if the relationship points to at least one of the PK columns of the
target entity.</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/objectstyle/cayenne/map/DbRelationship.html#isValidForDepPk()">isValidForDepPk</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;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/map/DbRelationship.html#removeAllJoins()">removeAllJoins</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;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/map/DbRelationship.html#removeJoin(org.objectstyle.cayenne.map.DbJoin)">removeJoin</A></B>(<A HREF="../../../../org/objectstyle/cayenne/map/DbJoin.html" title="class in org.objectstyle.cayenne.map">DbJoin</A>&nbsp;join)</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/objectstyle/cayenne/map/DbRelationship.html#setJoins(java.util.Collection)">setJoins</A></B>(java.util.Collection&nbsp;newJoins)</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/objectstyle/cayenne/map/DbRelationship.html#setToDependentPK(boolean)">setToDependentPK</A></B>(boolean&nbsp;toDependentPK)</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/objectstyle/cayenne/map/DbRelationship.html#setToMany(boolean)">setToMany</A></B>(boolean&nbsp;toMany)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets relationship multiplicity.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.Map</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/map/DbRelationship.html#srcFkSnapshotWithTargetSnapshot(java.util.Map)">srcFkSnapshotWithTargetSnapshot</A></B>(java.util.Map&nbsp;targetSnapshot)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a snapshot of foreign key attributes of a source object of this
relationship based on a snapshot of a target.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.Map</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/map/DbRelationship.html#srcPkSnapshotWithTargetSnapshot(java.util.Map)">srcPkSnapshotWithTargetSnapshot</A></B>(java.util.Map&nbsp;targetSnapshot)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a snapshot of primary key attributes of a source object of this
relationship based on a snapshot of a target.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.Map</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/objectstyle/cayenne/map/DbRelationship.html#targetPkSnapshotWithSrcSnapshot(java.util.Map)">targetPkSnapshotWithSrcSnapshot</A></B>(java.util.Map&nbsp;srcSnapshot)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a snapshot of primary key attributes of a target object of this
relationship based on a snapshot of a source.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_org.objectstyle.cayenne.map.Relationship"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class org.objectstyle.cayenne.map.<A HREF="../../../../org/objectstyle/cayenne/map/Relationship.html" title="class in org.objectstyle.cayenne.map">Relationship</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../org/objectstyle/cayenne/map/Relationship.html#getName()">getName</A>, <A HREF="../../../../org/objectstyle/cayenne/map/Relationship.html#getParent()">getParent</A>, <A HREF="../../../../org/objectstyle/cayenne/map/Relationship.html#getSourceEntity()">getSourceEntity</A>, <A HREF="../../../../org/objectstyle/cayenne/map/Relationship.html#getTargetEntityName()">getTargetEntityName</A>, <A HREF="../../../../org/objectstyle/cayenne/map/Relationship.html#isToMany()">isToMany</A>, <A HREF="../../../../org/objectstyle/cayenne/map/Relationship.html#setName(java.lang.String)">setName</A>, <A HREF="../../../../org/objectstyle/cayenne/map/Relationship.html#setParent(java.lang.Object)">setParent</A>, <A HREF="../../../../org/objectstyle/cayenne/map/Relationship.html#setSourceEntity(org.objectstyle.cayenne.map.Entity)">setSourceEntity</A>, <A HREF="../../../../org/objectstyle/cayenne/map/Relationship.html#setTargetEntity(org.objectstyle.cayenne.map.Entity)">setTargetEntity</A>, <A HREF="../../../../org/objectstyle/cayenne/map/Relationship.html#setTargetEntityName(java.lang.String)">setTargetEntityName</A>, <A HREF="../../../../org/objectstyle/cayenne/map/Relationship.html#toString()">toString</A></CODE></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, 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="PROPERTY_DID_CHANGE"><!-- --></A><H3>
PROPERTY_DID_CHANGE</H3>
<PRE>
public static final <A HREF="../../../../org/objectstyle/cayenne/event/EventSubject.html" title="class in org.objectstyle.cayenne.event">EventSubject</A> <B>PROPERTY_DID_CHANGE</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="joins"><!-- --></A><H3>
joins</H3>
<PRE>
protected java.util.List <B>joins</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="toDependentPK"><!-- --></A><H3>
toDependentPK</H3>
<PRE>
protected boolean <B>toDependentPK</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="DbRelationship()"><!-- --></A><H3>
DbRelationship</H3>
<PRE>
public <B>DbRelationship</B>()</PRE>
<DL>
</DL>
<HR>
<A NAME="DbRelationship(java.lang.String)"><!-- --></A><H3>
DbRelationship</H3>
<PRE>
public <B>DbRelationship</B>(java.lang.String&nbsp;name)</PRE>
<DL>
</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="encodeAsXML(org.objectstyle.cayenne.util.XMLEncoder)"><!-- --></A><H3>
encodeAsXML</H3>
<PRE>
public void <B>encodeAsXML</B>(<A HREF="../../../../org/objectstyle/cayenne/util/XMLEncoder.html" title="class in org.objectstyle.cayenne.util">XMLEncoder</A>&nbsp;encoder)</PRE>
<DL>
<DD>Prints itself as XML to the provided XMLEncoder.
<P>
<DD><DL>
<DT><B>Since:</B></DT>
<DD>1.1</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="getTargetEntity()"><!-- --></A><H3>
getTargetEntity</H3>
<PRE>
public <A HREF="../../../../org/objectstyle/cayenne/map/Entity.html" title="class in org.objectstyle.cayenne.map">Entity</A> <B>getTargetEntity</B>()</PRE>
<DL>
<DD>Returns a target of this relationship. If relationship is not attached to a
DbEntity, and DbEntity doesn't have a namcespace, and exception is thrown.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/objectstyle/cayenne/map/Relationship.html#getTargetEntity()">getTargetEntity</A></CODE> in class <CODE><A HREF="../../../../org/objectstyle/cayenne/map/Relationship.html" title="class in org.objectstyle.cayenne.map">Relationship</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getTargetAttributes()"><!-- --></A><H3>
getTargetAttributes</H3>
<PRE>
public java.util.Collection <B>getTargetAttributes</B>()</PRE>
<DL>
<DD>Returns a Collection of target attributes.
<P>
<DD><DL>
<DT><B>Since:</B></DT>
<DD>1.1</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="getSourceAttributes()"><!-- --></A><H3>
getSourceAttributes</H3>
<PRE>
public java.util.Collection <B>getSourceAttributes</B>()</PRE>
<DL>
<DD>Returns a Collection of source attributes.
<P>
<DD><DL>
<DT><B>Since:</B></DT>
<DD>1.1</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="createReverseRelationship()"><!-- --></A><H3>
createReverseRelationship</H3>
<PRE>
public <A HREF="../../../../org/objectstyle/cayenne/map/DbRelationship.html" title="class in org.objectstyle.cayenne.map">DbRelationship</A> <B>createReverseRelationship</B>()</PRE>
<DL>
<DD>Creates a new relationship with the same set of joins, but going in the opposite
direction.
<P>
<DD><DL>
<DT><B>Since:</B></DT>
<DD>1.0.5</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="getReverseRelationship()"><!-- --></A><H3>
getReverseRelationship</H3>
<PRE>
public <A HREF="../../../../org/objectstyle/cayenne/map/DbRelationship.html" title="class in org.objectstyle.cayenne.map">DbRelationship</A> <B>getReverseRelationship</B>()</PRE>
<DL>
<DD>Returns DbRelationship that is the opposite of this DbRelationship. This means a
relationship from this target entity to this source entity with the same join
semantics. Returns null if no such relationship exists.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="isToPK()"><!-- --></A><H3>
isToPK</H3>
<PRE>
public boolean <B>isToPK</B>()</PRE>
<DL>
<DD>Returns true if the relationship points to at least one of the PK columns of the
target entity.
<P>
<DD><DL>
<DT><B>Since:</B></DT>
<DD>1.1</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="isToMasterPK()"><!-- --></A><H3>
isToMasterPK</H3>
<PRE>
public boolean <B>isToMasterPK</B>()</PRE>
<DL>
<DD>Returns <code>true</code> if a method <code>isToDependentPK</code> of reverse
relationship of this relationship returns <code>true</code>.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="isToDependentPK()"><!-- --></A><H3>
isToDependentPK</H3>
<PRE>
public boolean <B>isToDependentPK</B>()</PRE>
<DL>
<DD>Returns <code>true</code> if relationship from source to target points to
dependent primary key. Dependent PK is a primary key column of the destination
table that is also a FK to the source column.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setToDependentPK(boolean)"><!-- --></A><H3>
setToDependentPK</H3>
<PRE>
public void <B>setToDependentPK</B>(boolean&nbsp;toDependentPK)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="isValidForDepPk()"><!-- --></A><H3>
isValidForDepPk</H3>
<PRE>
public boolean <B>isValidForDepPk</B>()</PRE>
<DL>
<DD><DL>
<DT><B>Since:</B></DT>
<DD>1.1</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="getJoins()"><!-- --></A><H3>
getJoins</H3>
<PRE>
public java.util.List <B>getJoins</B>()</PRE>
<DL>
<DD>Returns a list of joins. List is returned by reference, so any modifications of the
list will affect this relationship.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="addJoin(org.objectstyle.cayenne.map.DbJoin)"><!-- --></A><H3>
addJoin</H3>
<PRE>
public void <B>addJoin</B>(<A HREF="../../../../org/objectstyle/cayenne/map/DbJoin.html" title="class in org.objectstyle.cayenne.map">DbJoin</A>&nbsp;join)</PRE>
<DL>
<DD>Adds a join.
<P>
<DD><DL>
<DT><B>Since:</B></DT>
<DD>1.1</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="removeJoin(org.objectstyle.cayenne.map.DbJoin)"><!-- --></A><H3>
removeJoin</H3>
<PRE>
public void <B>removeJoin</B>(<A HREF="../../../../org/objectstyle/cayenne/map/DbJoin.html" title="class in org.objectstyle.cayenne.map">DbJoin</A>&nbsp;join)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="removeAllJoins()"><!-- --></A><H3>
removeAllJoins</H3>
<PRE>
public void <B>removeAllJoins</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setJoins(java.util.Collection)"><!-- --></A><H3>
setJoins</H3>
<PRE>
public void <B>setJoins</B>(java.util.Collection&nbsp;newJoins)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="targetPkSnapshotWithSrcSnapshot(java.util.Map)"><!-- --></A><H3>
targetPkSnapshotWithSrcSnapshot</H3>
<PRE>
public java.util.Map <B>targetPkSnapshotWithSrcSnapshot</B>(java.util.Map&nbsp;srcSnapshot)</PRE>
<DL>
<DD>Creates a snapshot of primary key attributes of a target object of this
relationship based on a snapshot of a source. Only "to-one" relationships are
supported. Returns null if relationship does not point to an object. Throws
CayenneRuntimeException if relationship is "to many" or if snapshot is missing id
components.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="srcFkSnapshotWithTargetSnapshot(java.util.Map)"><!-- --></A><H3>
srcFkSnapshotWithTargetSnapshot</H3>
<PRE>
public java.util.Map <B>srcFkSnapshotWithTargetSnapshot</B>(java.util.Map&nbsp;targetSnapshot)</PRE>
<DL>
<DD>Creates a snapshot of foreign key attributes of a source object of this
relationship based on a snapshot of a target. Only "to-one" relationships are
supported. Throws CayenneRuntimeException if relationship is "to many".
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="srcPkSnapshotWithTargetSnapshot(java.util.Map)"><!-- --></A><H3>
srcPkSnapshotWithTargetSnapshot</H3>
<PRE>
public java.util.Map <B>srcPkSnapshotWithTargetSnapshot</B>(java.util.Map&nbsp;targetSnapshot)</PRE>
<DL>
<DD>Creates a snapshot of primary key attributes of a source object of this
relationship based on a snapshot of a target. Only "to-many" relationships are
supported. Throws CayenneRuntimeException if relationship is "to one".
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setToMany(boolean)"><!-- --></A><H3>
setToMany</H3>
<PRE>
public void <B>setToMany</B>(boolean&nbsp;toMany)</PRE>
<DL>
<DD>Sets relationship multiplicity.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="firePropertyDidChange()"><!-- --></A><H3>
firePropertyDidChange</H3>
<PRE>
protected void <B>firePropertyDidChange</B>()</PRE>
<DL>
<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/objectstyle/cayenne/map/DbKeyGenerator.html" title="class in org.objectstyle.cayenne.map"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/objectstyle/cayenne/map/DeleteRule.html" title="class in org.objectstyle.cayenne.map"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?org/objectstyle/cayenne/map/DbRelationship.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="DbRelationship.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>
<!--@SFLOGO@--> &nbsp; <i>Copyright &#169; 2001-2006 <a href=
"http://objectstyle.org" target="_top">ObjectStyle.org</a> All Rights Reserved.</i>
</BODY>
</HTML>