blob: 93950edaa310aa958ec6556839a777fce1c841c5 [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.6.0_24) on Sat Jun 11 11:32:52 EEST 2011 -->
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
DataObject (Cayenne Documentation 3.0.2 API)
</TITLE>
<META NAME="date" CONTENT="2011-06-11">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="DataObject (Cayenne Documentation 3.0.2 API)";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= 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="class-use/DataObject.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&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-all.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/DataChannelListener.html" title="interface in org.apache.cayenne"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../org/apache/cayenne/DataObjectUtils.html" title="class in org.apache.cayenne"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?org/apache/cayenne/DataObject.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="DataObject.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;CONSTR&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;CONSTR&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</FONT>
<BR>
Interface DataObject</H2>
<DL>
<DT><B>All Superinterfaces:</B> <DD><A HREF="../../../org/apache/cayenne/Persistent.html" title="interface in org.apache.cayenne">Persistent</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</A></DD>
</DL>
<DL>
<DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../org/apache/cayenne/CayenneDataObject.html" title="class in org.apache.cayenne">CayenneDataObject</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public interface <B>DataObject</B><DT>extends <A HREF="../../../org/apache/cayenne/Persistent.html" title="interface in org.apache.cayenne">Persistent</A></DL>
</PRE>
<P>
Defines basic methods for a persistent object in Cayenne.
<P>
<P>
<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>static&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/cayenne/DataObject.html#DEFAULT_VERSION">DEFAULT_VERSION</A></B></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/apache/cayenne/DataObject.html#addToManyTarget(java.lang.String, org.apache.cayenne.DataObject, boolean)">addToManyTarget</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;relationshipName,
<A HREF="../../../org/apache/cayenne/DataObject.html" title="interface in org.apache.cayenne">DataObject</A>&nbsp;target,
boolean&nbsp;setReverse)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds an object to a to-many relationship.</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/DataObject.html#fetchFinished()">fetchFinished</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I>since 3.0 users must use callbacks instead. This method is no longer
invoked by Cayenne runtime.</I></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/DataContext.html" title="class in org.apache.cayenne.access">DataContext</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/cayenne/DataObject.html#getDataContext()">getDataContext</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I>since 3.0 use <A HREF="../../../org/apache/cayenne/Persistent.html#getObjectContext()"><CODE>Persistent.getObjectContext()</CODE></A>.</I></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/cayenne/DataObject.html#getSnapshotVersion()">getSnapshotVersion</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a version of a DataRow snapshot that was used to create this object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/cayenne/DataObject.html#readNestedProperty(java.lang.String)">readNestedProperty</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;path)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a value of the property identified by a property path.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/cayenne/DataObject.html#readProperty(java.lang.String)">readProperty</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;propName)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a value of the property identified by propName.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/cayenne/DataObject.html#readPropertyDirectly(java.lang.String)">readPropertyDirectly</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;propertyName)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns mapped property value as curently stored in the DataObject.</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/DataObject.html#removeToManyTarget(java.lang.String, org.apache.cayenne.DataObject, boolean)">removeToManyTarget</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;relationshipName,
<A HREF="../../../org/apache/cayenne/DataObject.html" title="interface in org.apache.cayenne">DataObject</A>&nbsp;target,
boolean&nbsp;unsetReverse)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes an object from a to-many relationship.</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/DataObject.html#setDataContext(org.apache.cayenne.access.DataContext)">setDataContext</A></B>(<A HREF="../../../org/apache/cayenne/access/DataContext.html" title="class in org.apache.cayenne.access">DataContext</A>&nbsp;ctxt)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I>since 3.0 use <A HREF="../../../org/apache/cayenne/Persistent.html#setObjectContext(org.apache.cayenne.ObjectContext)"><CODE>Persistent.setObjectContext(ObjectContext)</CODE></A>.</I></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/DataObject.html#setSnapshotVersion(long)">setSnapshotVersion</A></B>(long&nbsp;snapshotVersion)</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/DataObject.html#setToOneTarget(java.lang.String, org.apache.cayenne.DataObject, boolean)">setToOneTarget</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;relationshipName,
<A HREF="../../../org/apache/cayenne/DataObject.html" title="interface in org.apache.cayenne">DataObject</A>&nbsp;value,
boolean&nbsp;setReverse)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets to-one relationship to a new value.</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/DataObject.html#writeProperty(java.lang.String, java.lang.Object)">writeProperty</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;propertyName,
<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;value)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the property to the new value.</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/DataObject.html#writePropertyDirectly(java.lang.String, java.lang.Object)">writePropertyDirectly</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;propertyName,
<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;val)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Modifies a value of a named property without altering the object state in any way,
and without triggering any database operations.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_org.apache.cayenne.Persistent"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from interface org.apache.cayenne.<A HREF="../../../org/apache/cayenne/Persistent.html" title="interface in org.apache.cayenne">Persistent</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../org/apache/cayenne/Persistent.html#getObjectContext()">getObjectContext</A>, <A HREF="../../../org/apache/cayenne/Persistent.html#getObjectId()">getObjectId</A>, <A HREF="../../../org/apache/cayenne/Persistent.html#getPersistenceState()">getPersistenceState</A>, <A HREF="../../../org/apache/cayenne/Persistent.html#setObjectContext(org.apache.cayenne.ObjectContext)">setObjectContext</A>, <A HREF="../../../org/apache/cayenne/Persistent.html#setObjectId(org.apache.cayenne.ObjectId)">setObjectId</A>, <A HREF="../../../org/apache/cayenne/Persistent.html#setPersistenceState(int)">setPersistenceState</A></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="DEFAULT_VERSION"><!-- --></A><H3>
DEFAULT_VERSION</H3>
<PRE>
static final long <B>DEFAULT_VERSION</B></PRE>
<DL>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.apache.cayenne.DataObject.DEFAULT_VERSION">Constant Field Values</A></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="getDataContext()"><!-- --></A><H3>
getDataContext</H3>
<PRE>
<FONT SIZE="-1"><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</A>
</FONT><A HREF="../../../org/apache/cayenne/access/DataContext.html" title="class in org.apache.cayenne.access">DataContext</A> <B>getDataContext</B>()</PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<I>since 3.0 use <A HREF="../../../org/apache/cayenne/Persistent.html#getObjectContext()"><CODE>Persistent.getObjectContext()</CODE></A>.</I>
<P>
<DD>Returns a data context this object is registered with, or null if this object has
no associated DataContext.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setDataContext(org.apache.cayenne.access.DataContext)"><!-- --></A><H3>
setDataContext</H3>
<PRE>
<FONT SIZE="-1"><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</A>
</FONT>void <B>setDataContext</B>(<A HREF="../../../org/apache/cayenne/access/DataContext.html" title="class in org.apache.cayenne.access">DataContext</A>&nbsp;ctxt)</PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<I>since 3.0 use <A HREF="../../../org/apache/cayenne/Persistent.html#setObjectContext(org.apache.cayenne.ObjectContext)"><CODE>Persistent.setObjectContext(ObjectContext)</CODE></A>.</I>
<P>
<DD>Sets object DataContext.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="writePropertyDirectly(java.lang.String, java.lang.Object)"><!-- --></A><H3>
writePropertyDirectly</H3>
<PRE>
void <B>writePropertyDirectly</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;propertyName,
<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;val)</PRE>
<DL>
<DD>Modifies a value of a named property without altering the object state in any way,
and without triggering any database operations. This method is intended mostly for
internal use by Cayenne framework, and shouldn't be called from the application
code.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="readPropertyDirectly(java.lang.String)"><!-- --></A><H3>
readPropertyDirectly</H3>
<PRE>
<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> <B>readPropertyDirectly</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;propertyName)</PRE>
<DL>
<DD>Returns mapped property value as curently stored in the DataObject. Returned value
maybe a fault or a real value. This method will not attempt to resolve faults, or
to read unmapped properties.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="readNestedProperty(java.lang.String)"><!-- --></A><H3>
readNestedProperty</H3>
<PRE>
<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> <B>readNestedProperty</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;path)</PRE>
<DL>
<DD>Returns a value of the property identified by a property path. Supports reading
both mapped and unmapped properties. Unmapped properties are accessed in a manner
consistent with JavaBeans specification.
<p>
Property path (or nested property) is a dot-separated path used to traverse object
relationships until the final object is found. If a null object found while
traversing path, null is returned. If a list is encountered in the middle of the
path, CayenneRuntimeException is thrown. Unlike
<A HREF="../../../org/apache/cayenne/DataObject.html#readPropertyDirectly(java.lang.String)"><CODE>readPropertyDirectly(String)</CODE></A>, this method will resolve an object if it is
HOLLOW.
<p>
Examples:
</p>
<ul>
<li>Read this object property:<br>
<code>String name = (String)artist.readNestedProperty("name");</code><br>
<br>
</li>
<li>Read an object related to this object:<br>
<code>Gallery g = (Gallery)paintingInfo.readNestedProperty("toPainting.toGallery");</code>
<br>
<br>
</li>
<li>Read a property of an object related to this object: <br>
<code>String name = (String)painting.readNestedProperty("toArtist.artistName");</code>
<br>
<br>
</li>
<li>Read to-many relationship list:<br>
<code>List exhibits = (List)painting.readNestedProperty("toGallery.exhibitArray");</code>
<br>
<br>
</li>
<li>Read to-many relationship in the middle of the path:<br>
<code>List<String> names = (List<String>)artist.readNestedProperty("paintingArray.paintingName");</code>
<br>
<br>
</li>
</ul>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Since:</B></DT>
<DD>1.0.5</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="readProperty(java.lang.String)"><!-- --></A><H3>
readProperty</H3>
<PRE>
<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> <B>readProperty</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;propName)</PRE>
<DL>
<DD>Returns a value of the property identified by propName. Resolves faults if needed.
This method can safely be used instead of or in addition to the auto-generated
property accessors in subclasses of CayenneDataObject.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="writeProperty(java.lang.String, java.lang.Object)"><!-- --></A><H3>
writeProperty</H3>
<PRE>
void <B>writeProperty</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;propertyName,
<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;value)</PRE>
<DL>
<DD>Sets the property to the new value. Resolves faults if needed. This method can be
safely used instead of or in addition to the auto-generated property modifiers to
set simple properties. Note that to set to-one relationships use
<A HREF="../../../org/apache/cayenne/DataObject.html#setToOneTarget(java.lang.String, org.apache.cayenne.DataObject, boolean)"><CODE>setToOneTarget(String, DataObject, boolean)</CODE></A>.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>propertyName</CODE> - a name of the bean property being modified.<DD><CODE>value</CODE> - a new value of the property.</DL>
</DD>
</DL>
<HR>
<A NAME="addToManyTarget(java.lang.String, org.apache.cayenne.DataObject, boolean)"><!-- --></A><H3>
addToManyTarget</H3>
<PRE>
void <B>addToManyTarget</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;relationshipName,
<A HREF="../../../org/apache/cayenne/DataObject.html" title="interface in org.apache.cayenne">DataObject</A>&nbsp;target,
boolean&nbsp;setReverse)</PRE>
<DL>
<DD>Adds an object to a to-many relationship.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="removeToManyTarget(java.lang.String, org.apache.cayenne.DataObject, boolean)"><!-- --></A><H3>
removeToManyTarget</H3>
<PRE>
void <B>removeToManyTarget</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;relationshipName,
<A HREF="../../../org/apache/cayenne/DataObject.html" title="interface in org.apache.cayenne">DataObject</A>&nbsp;target,
boolean&nbsp;unsetReverse)</PRE>
<DL>
<DD>Removes an object from a to-many relationship.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setToOneTarget(java.lang.String, org.apache.cayenne.DataObject, boolean)"><!-- --></A><H3>
setToOneTarget</H3>
<PRE>
void <B>setToOneTarget</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;relationshipName,
<A HREF="../../../org/apache/cayenne/DataObject.html" title="interface in org.apache.cayenne">DataObject</A>&nbsp;value,
boolean&nbsp;setReverse)</PRE>
<DL>
<DD>Sets to-one relationship to a new value. Resolves faults if needed. This method can
safely be used instead of or in addition to the auto-generated property modifiers
to set properties that are to-one relationships.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>relationshipName</CODE> - a name of the bean property being modified - same as the
name of ObjRelationship.<DD><CODE>value</CODE> - a new value of the property.<DD><CODE>setReverse</CODE> - whether to update the reverse relationship pointing from the old
and new values of the property to this object.</DL>
</DD>
</DL>
<HR>
<A NAME="fetchFinished()"><!-- --></A><H3>
fetchFinished</H3>
<PRE>
<FONT SIZE="-1"><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</A>
</FONT>void <B>fetchFinished</B>()</PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<I>since 3.0 users must use callbacks instead. This method is no longer
invoked by Cayenne runtime.</I>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>See Also:</B><DD><A HREF="../../../org/apache/cayenne/LifecycleListener.html" title="interface in org.apache.cayenne"><CODE>LifecycleListener</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getSnapshotVersion()"><!-- --></A><H3>
getSnapshotVersion</H3>
<PRE>
long <B>getSnapshotVersion</B>()</PRE>
<DL>
<DD>Returns a version of a DataRow snapshot that was used to create this object.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Since:</B></DT>
<DD>1.1</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="setSnapshotVersion(long)"><!-- --></A><H3>
setSnapshotVersion</H3>
<PRE>
void <B>setSnapshotVersion</B>(long&nbsp;snapshotVersion)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Since:</B></DT>
<DD>1.1</DD>
</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="class-use/DataObject.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&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-all.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/DataChannelListener.html" title="interface in org.apache.cayenne"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../org/apache/cayenne/DataObjectUtils.html" title="class in org.apache.cayenne"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?org/apache/cayenne/DataObject.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="DataObject.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;CONSTR&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;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
Copyright &#169; 2001-2011 <a href="http://cayenne.apache.org/">Apache Cayenne</a>. All Rights Reserved.
</BODY>
</HTML>