blob: 929d1e3136305d2ef180554f8d42d096cdc0af88 [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:40 EDT 2006 -->
<TITLE>
DataObject (Cayenne API Documentation - v.1.2)
</TITLE>
<META NAME="keywords" CONTENT="org.objectstyle.cayenne.DataObject interface">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../objectstyle-javadoc.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="DataObject (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/DataChannelListener.html" title="interface in org.objectstyle.cayenne"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../org/objectstyle/cayenne/DataObjectUtils.html" title="class in org.objectstyle.cayenne"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?org/objectstyle/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.objectstyle.cayenne</FONT>
<BR>
Interface DataObject</H2>
<DL>
<DT><B>All Superinterfaces:</B> <DD><A HREF="../../../org/objectstyle/cayenne/Persistent.html" title="interface in org.objectstyle.cayenne">Persistent</A>, java.io.Serializable</DD>
</DL>
<DL>
<DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../org/objectstyle/cayenne/CayenneDataObject.html" title="class in org.objectstyle.cayenne">CayenneDataObject</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public interface <B>DataObject</B><DT>extends <A HREF="../../../org/objectstyle/cayenne/Persistent.html" title="interface in org.objectstyle.cayenne">Persistent</A></DL>
</PRE>
<P>
Defines basic methods for a persistent object in Cayenne.
<P>
<P>
<DL>
<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>static&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/objectstyle/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/objectstyle/cayenne/DataObject.html#addToManyTarget(java.lang.String, org.objectstyle.cayenne.DataObject, boolean)">addToManyTarget</A></B>(java.lang.String&nbsp;relName,
<A HREF="../../../org/objectstyle/cayenne/DataObject.html" title="interface in org.objectstyle.cayenne">DataObject</A>&nbsp;val,
boolean&nbsp;setReverse)</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/DataObject.html#fetchFinished()">fetchFinished</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Notification method called by DataContext after the object was read from the
database.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../org/objectstyle/cayenne/access/DataContext.html" title="class in org.objectstyle.cayenne.access">DataContext</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/objectstyle/cayenne/DataObject.html#getDataContext()">getDataContext</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a data context this object is registered with, or null if this object has
no associated DataContext.</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/objectstyle/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;java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/objectstyle/cayenne/DataObject.html#readNestedProperty(java.lang.String)">readNestedProperty</A></B>(java.lang.String&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;java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/objectstyle/cayenne/DataObject.html#readProperty(java.lang.String)">readProperty</A></B>(java.lang.String&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;java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/objectstyle/cayenne/DataObject.html#readPropertyDirectly(java.lang.String)">readPropertyDirectly</A></B>(java.lang.String&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/objectstyle/cayenne/DataObject.html#removeToManyTarget(java.lang.String, org.objectstyle.cayenne.DataObject, boolean)">removeToManyTarget</A></B>(java.lang.String&nbsp;relName,
<A HREF="../../../org/objectstyle/cayenne/DataObject.html" title="interface in org.objectstyle.cayenne">DataObject</A>&nbsp;val,
boolean&nbsp;setReverse)</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/DataObject.html#resolveFault()">resolveFault</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I>since 1.2 use 'getObjectContext().prepareForAccess(object)'</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/objectstyle/cayenne/DataObject.html#setDataContext(org.objectstyle.cayenne.access.DataContext)">setDataContext</A></B>(<A HREF="../../../org/objectstyle/cayenne/access/DataContext.html" title="class in org.objectstyle.cayenne.access">DataContext</A>&nbsp;ctxt)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets object DataContext.</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/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/objectstyle/cayenne/DataObject.html#setToOneTarget(java.lang.String, org.objectstyle.cayenne.DataObject, boolean)">setToOneTarget</A></B>(java.lang.String&nbsp;relationshipName,
<A HREF="../../../org/objectstyle/cayenne/DataObject.html" title="interface in org.objectstyle.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/objectstyle/cayenne/DataObject.html#validateForDelete(org.objectstyle.cayenne.validation.ValidationResult)">validateForDelete</A></B>(<A HREF="../../../org/objectstyle/cayenne/validation/ValidationResult.html" title="class in org.objectstyle.cayenne.validation">ValidationResult</A>&nbsp;validationResult)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Performs property validation of the DELETED object, appending any validation
failures to the provided validationResult object.</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/DataObject.html#validateForInsert(org.objectstyle.cayenne.validation.ValidationResult)">validateForInsert</A></B>(<A HREF="../../../org/objectstyle/cayenne/validation/ValidationResult.html" title="class in org.objectstyle.cayenne.validation">ValidationResult</A>&nbsp;validationResult)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Performs property validation of the NEW object, appending any validation failures
to the provided validationResult object.</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/DataObject.html#validateForUpdate(org.objectstyle.cayenne.validation.ValidationResult)">validateForUpdate</A></B>(<A HREF="../../../org/objectstyle/cayenne/validation/ValidationResult.html" title="class in org.objectstyle.cayenne.validation">ValidationResult</A>&nbsp;validationResult)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Performs property validation of the MODIFIED object, appending any validation
failures to the provided validationResult object.</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/DataObject.html#writeProperty(java.lang.String, java.lang.Object)">writeProperty</A></B>(java.lang.String&nbsp;propertyName,
java.lang.Object&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/objectstyle/cayenne/DataObject.html#writePropertyDirectly(java.lang.String, java.lang.Object)">writePropertyDirectly</A></B>(java.lang.String&nbsp;propertyName,
java.lang.Object&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.objectstyle.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.objectstyle.cayenne.<A HREF="../../../org/objectstyle/cayenne/Persistent.html" title="interface in org.objectstyle.cayenne">Persistent</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../org/objectstyle/cayenne/Persistent.html#getObjectContext()">getObjectContext</A>, <A HREF="../../../org/objectstyle/cayenne/Persistent.html#getObjectId()">getObjectId</A>, <A HREF="../../../org/objectstyle/cayenne/Persistent.html#getPersistenceState()">getPersistenceState</A>, <A HREF="../../../org/objectstyle/cayenne/Persistent.html#setObjectContext(org.objectstyle.cayenne.ObjectContext)">setObjectContext</A>, <A HREF="../../../org/objectstyle/cayenne/Persistent.html#setObjectId(org.objectstyle.cayenne.ObjectId)">setObjectId</A>, <A HREF="../../../org/objectstyle/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.objectstyle.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>
<A HREF="../../../org/objectstyle/cayenne/access/DataContext.html" title="class in org.objectstyle.cayenne.access">DataContext</A> <B>getDataContext</B>()</PRE>
<DL>
<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.objectstyle.cayenne.access.DataContext)"><!-- --></A><H3>
setDataContext</H3>
<PRE>
void <B>setDataContext</B>(<A HREF="../../../org/objectstyle/cayenne/access/DataContext.html" title="class in org.objectstyle.cayenne.access">DataContext</A>&nbsp;ctxt)</PRE>
<DL>
<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>(java.lang.String&nbsp;propertyName,
java.lang.Object&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>
java.lang.Object <B>readPropertyDirectly</B>(java.lang.String&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>
java.lang.Object <B>readNestedProperty</B>(java.lang.String&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/objectstyle/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 <b>(throws exception)</b>:<br>
<code>String name = (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>
java.lang.Object <B>readProperty</B>(java.lang.String&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>(java.lang.String&nbsp;propertyName,
java.lang.Object&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/objectstyle/cayenne/DataObject.html#setToOneTarget(java.lang.String, org.objectstyle.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.objectstyle.cayenne.DataObject, boolean)"><!-- --></A><H3>
addToManyTarget</H3>
<PRE>
void <B>addToManyTarget</B>(java.lang.String&nbsp;relName,
<A HREF="../../../org/objectstyle/cayenne/DataObject.html" title="interface in org.objectstyle.cayenne">DataObject</A>&nbsp;val,
boolean&nbsp;setReverse)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="removeToManyTarget(java.lang.String, org.objectstyle.cayenne.DataObject, boolean)"><!-- --></A><H3>
removeToManyTarget</H3>
<PRE>
void <B>removeToManyTarget</B>(java.lang.String&nbsp;relName,
<A HREF="../../../org/objectstyle/cayenne/DataObject.html" title="interface in org.objectstyle.cayenne">DataObject</A>&nbsp;val,
boolean&nbsp;setReverse)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setToOneTarget(java.lang.String, org.objectstyle.cayenne.DataObject, boolean)"><!-- --></A><H3>
setToOneTarget</H3>
<PRE>
void <B>setToOneTarget</B>(java.lang.String&nbsp;relationshipName,
<A HREF="../../../org/objectstyle/cayenne/DataObject.html" title="interface in org.objectstyle.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>
void <B>fetchFinished</B>()</PRE>
<DL>
<DD>Notification method called by DataContext after the object was read from the
database.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</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>
<HR>
<A NAME="resolveFault()"><!-- --></A><H3>
resolveFault</H3>
<PRE>
void <B>resolveFault</B>()</PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<I>since 1.2 use 'getObjectContext().prepareForAccess(object)'</I>
<P>
<DD>Initializes object with data from cache or from the database, if this object is not
fully resolved.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Since:</B></DT>
<DD>1.1</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="validateForInsert(org.objectstyle.cayenne.validation.ValidationResult)"><!-- --></A><H3>
validateForInsert</H3>
<PRE>
void <B>validateForInsert</B>(<A HREF="../../../org/objectstyle/cayenne/validation/ValidationResult.html" title="class in org.objectstyle.cayenne.validation">ValidationResult</A>&nbsp;validationResult)</PRE>
<DL>
<DD>Performs property validation of the NEW object, appending any validation failures
to the provided validationResult object. This method is invoked by DataContext
before committing a NEW object to the database.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Since:</B></DT>
<DD>1.1</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="validateForUpdate(org.objectstyle.cayenne.validation.ValidationResult)"><!-- --></A><H3>
validateForUpdate</H3>
<PRE>
void <B>validateForUpdate</B>(<A HREF="../../../org/objectstyle/cayenne/validation/ValidationResult.html" title="class in org.objectstyle.cayenne.validation">ValidationResult</A>&nbsp;validationResult)</PRE>
<DL>
<DD>Performs property validation of the MODIFIED object, appending any validation
failures to the provided validationResult object. This method is invoked by
DataContext before committing a MODIFIED object to the database.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Since:</B></DT>
<DD>1.1</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="validateForDelete(org.objectstyle.cayenne.validation.ValidationResult)"><!-- --></A><H3>
validateForDelete</H3>
<PRE>
void <B>validateForDelete</B>(<A HREF="../../../org/objectstyle/cayenne/validation/ValidationResult.html" title="class in org.objectstyle.cayenne.validation">ValidationResult</A>&nbsp;validationResult)</PRE>
<DL>
<DD>Performs property validation of the DELETED object, appending any validation
failures to the provided validationResult object. This method is invoked by
DataContext before committing a DELETED object to the database.
<P>
<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="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/DataChannelListener.html" title="interface in org.objectstyle.cayenne"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../org/objectstyle/cayenne/DataObjectUtils.html" title="class in org.objectstyle.cayenne"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?org/objectstyle/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>
<!--@SFLOGO@--> &nbsp; <i>Copyright &#169; 2001-2006 <a href=
"http://objectstyle.org" target="_top">ObjectStyle.org</a> All Rights Reserved.</i>
</BODY>
</HTML>