blob: 0d21acf2ec734f60b3bc05a90f2d5252cf8bae81 [file] [log] [blame]
Title: DataObjects
<P>DataObjects (Cayenne persistent objects) are composed of attributes and relationships. Attributes are the simplest object properties (as in &quot;java bean properties&quot;) that can be stored in the columns in the database. Those are usually string, numeric, binary or date values. Another type of properties is relationships. They represent related DataObjects (to-one relationships) or collections of DataObjects (to-many relationships). To read and modify attributes and relationships, application code would simply invoke corresponding get or set methods. In case of to-many relationships represented by collections there are also add and remove methods.</P>
<P>Queries discussed in the previous chapter are used to obtain the initial sets of DataObjects. After that a graph of persistent objects is navigated and modified via relationship methods, thus hiding the underlying relational storage complexity and giving application a nice object view of the relevant subset of the database data.</P>
<P>Examples of working with attributes and relationships are given later in this chapter.</P>
<H3><A name="DataObjects-Sections"></A>Sections</H3>
<OL>
<LI><A href="relationships.html" title="Relationships">Relationships</A></LI>
<LI><A href="flattened-relationships.html" title="Flattened Relationships">Flattened Relationships</A></LI>
<LI><A href="dataobjects-example.html" title="DataObjects Example">DataObjects Example</A></LI>
<LI><A href="accessing-pk-and-fk-values.html" title="Accessing PK and FK values">Accessing PK and FK values</A></LI>
<LI><A href="dataobjectutils.html" title="DataObjectUtils">DataObjectUtils</A></LI>
<LI><A href="dataobject-validation.html" title="DataObject Validation">DataObject Validation</A></LI>
<LI><A href="handling-inheritance.html" title="Handling Inheritance">Handling Inheritance</A></LI>
<LI><A href="deleting-objects.html" title="Deleting Objects">Deleting Objects</A></LI>
<LI><A href="generic-persistent-class.html" title="Generic Persistent Class">Generic Persistent Class</A></LI>
</OL>