You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by bu...@apache.org on 2014/08/16 13:45:47 UTC

svn commit: r919528 - in /websites/staging/cayenne/trunk/content: ./ docs/3.0/ docs/3.0/images/ docs/3.0/images/icons/ docs/3.0/images/icons/emoticons/

Author: buildbot
Date: Sat Aug 16 11:45:46 2014
New Revision: 919528

Log:
Staging update by buildbot for cayenne

Added:
    websites/staging/cayenne/trunk/content/docs/3.0/images/
    websites/staging/cayenne/trunk/content/docs/3.0/images/icons/
    websites/staging/cayenne/trunk/content/docs/3.0/images/icons/emoticons/
    websites/staging/cayenne/trunk/content/docs/3.0/images/icons/emoticons/information.gif   (with props)
    websites/staging/cayenne/trunk/content/docs/3.0/images/icons/emoticons/warning.gif   (with props)
Modified:
    websites/staging/cayenne/trunk/content/   (props changed)
    websites/staging/cayenne/trunk/content/docs/3.0/accessing-pk-and-fk-values.html
    websites/staging/cayenne/trunk/content/docs/3.0/flattened-relationships.html
    websites/staging/cayenne/trunk/content/docs/3.0/handling-inheritance.html
    websites/staging/cayenne/trunk/content/docs/3.0/parameterized-queries.html
    websites/staging/cayenne/trunk/content/docs/3.0/path-expressions.html
    websites/staging/cayenne/trunk/content/docs/3.0/primary-key-generation.html
    websites/staging/cayenne/trunk/content/docs/3.0/relationships.html
    websites/staging/cayenne/trunk/content/docs/3.0/using-orderings.html

Propchange: websites/staging/cayenne/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Sat Aug 16 11:45:46 2014
@@ -1 +1 @@
-1618338
+1618340

Modified: websites/staging/cayenne/trunk/content/docs/3.0/accessing-pk-and-fk-values.html
==============================================================================
--- websites/staging/cayenne/trunk/content/docs/3.0/accessing-pk-and-fk-values.html (original)
+++ websites/staging/cayenne/trunk/content/docs/3.0/accessing-pk-and-fk-values.html Sat Aug 16 11:45:46 2014
@@ -51,7 +51,7 @@
 <div id="content">
        	<P>Normally it is not advisable to map primary and foreign key columns (PK and FK) as Java class properties (ObjAttributes). When reverse engineering of the database is done using CayenneModeler, the generated mapping will reflect that PKs and FKs will not be included in the Java class. However, sometimes an application requires access to these values.</P>
 
-<DIV class="panelMacro"><TABLE class="infoMacro"><COLGROUP><COL width="24"><COL></COLGROUP><TR><TD valign="top"><IMG src="https://cwiki.apache.org/confluence/images/icons/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></TD><TD>For an easier way to obtain an object primary key or to find an object from a known PK, skip to the chapter on the <A href="dataobjectutils.html" title="DataObjectUtils">DataObjectUtils</A> class.</TD></TR></TABLE></DIV>
+<DIV class="panelMacro"><TABLE class="infoMacro"><COLGROUP><COL width="24"><COL></COLGROUP><TR><TD valign="top"><IMG src="http://cayenne.apache.org/docs/3.0/images/icons/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></TD><TD>For an easier way to obtain an object primary key or to find an object from a known PK, skip to the chapter on the <A href="dataobjectutils.html" title="DataObjectUtils">DataObjectUtils</A> class.</TD></TR></TABLE></DIV>
 
 <P>Cayenne provides a generic way to access primary and foreign keys by creating custom get* methods in the DataObject subclass. Lets take a Painting class as an example. The following code is generated by CayenneModeler:</P>
 
@@ -105,7 +105,7 @@
 
 <P>The following custom methods should be added to the Painting class to access the values of ARTIST_ID and PAINTING_ID:</P>
 
-<DIV class="panelMacro"><TABLE class="infoMacro"><COLGROUP><COL width="24"><COL></COLGROUP><TR><TD valign="top"><IMG src="https://cwiki.apache.org/confluence/images/icons/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></TD><TD>If you perform class generation using Ant, you can customize class generation templates to generate these methods for you. Eventually CayenneModeler will support this too as optional functionality.</TD></TR></TABLE></DIV>
+<DIV class="panelMacro"><TABLE class="infoMacro"><COLGROUP><COL width="24"><COL></COLGROUP><TR><TD valign="top"><IMG src="http://cayenne.apache.org/docs/3.0/images/icons/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></TD><TD>If you perform class generation using Ant, you can customize class generation templates to generate these methods for you. Eventually CayenneModeler will support this too as optional functionality.</TD></TR></TABLE></DIV>
 
 <DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent">
 <PRE class="code-java">

Modified: websites/staging/cayenne/trunk/content/docs/3.0/flattened-relationships.html
==============================================================================
--- websites/staging/cayenne/trunk/content/docs/3.0/flattened-relationships.html (original)
+++ websites/staging/cayenne/trunk/content/docs/3.0/flattened-relationships.html Sat Aug 16 11:45:46 2014
@@ -66,7 +66,7 @@ artist.getExhibits()
 </DIV></DIV>
 
 <P>From the application point of view there is no difference in working with flattened relationships compared to the &quot;normal&quot; ones. Cayenne internally figures out how to build the needed query joins to retrieve related objects. On adding or removing an object to/from a flattened relationship via a corresponding &quot;addTo...&quot; / &quot;removeFrom...&quot; method an appropriate join record is created or removed.</P>
-<DIV class="panelMacro"><TABLE class="infoMacro"><COLGROUP><COL width="24"><COL></COLGROUP><TR><TD valign="top"><IMG src="https://cwiki.apache.org/confluence/images/icons/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></TD><TD><B>Flattened Relationships Limitations</B><BR>Only many-to-many flattened relatationships with a single join table can be modified. All other types of flattened relationships can be used as &quot;read-only&quot;. This is reflected in the DataObject code generated for such relationships - no set/addTo/RemoveFrom methods are created for read-only relationships.</TD></TR></TABLE></DIV>
+<DIV class="panelMacro"><TABLE class="infoMacro"><COLGROUP><COL width="24"><COL></COLGROUP><TR><TD valign="top"><IMG src="http://cayenne.apache.org/docs/3.0/images/icons/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></TD><TD><B>Flattened Relationships Limitations</B><BR>Only many-to-many flattened relatationships with a single join table can be modified. All other types of flattened relationships can be used as &quot;read-only&quot;. This is reflected in the DataObject code generated for such relationships - no set/addTo/RemoveFrom methods are created for read-only relationships.</TD></TR></TABLE></DIV>
 
 <P>See this documentation on how to <A href="cayennemodeler-flattened-relationships.html" title="CayenneModeler Flattened Relationships">create flattened relationships in Cayenne Modeler</A></P>
 

Modified: websites/staging/cayenne/trunk/content/docs/3.0/handling-inheritance.html
==============================================================================
--- websites/staging/cayenne/trunk/content/docs/3.0/handling-inheritance.html (original)
+++ websites/staging/cayenne/trunk/content/docs/3.0/handling-inheritance.html Sat Aug 16 11:45:46 2014
@@ -59,7 +59,7 @@
 
 <P>Cayenne 3.0 has an ability to inject values of designator columns in new objects automatically. In the example above, if ObjEntity Employee has declared qualifier &quot;personType='EMPLOYEE'&quot;, a new Employee instance, created using &quot;context.newObject(Employee.class)&quot; will already have a personType attribute set to &quot;EMPLOYEE&quot;.</P>
 
-<DIV class="panelMacro"><TABLE class="infoMacro"><COLGROUP><COL width="24"><COL></COLGROUP><TR><TD valign="top"><IMG src="https://cwiki.apache.org/confluence/images/icons/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></TD><TD><B>Auto-Injection Limitations</B><BR>The mechanism of injecting values of class designator columns currently supports qualifiers of form &quot;attr=value [AND attr=value]*&quot;. Thus, flattened paths, db-paths and other than equality comparisons are not supported. Cayenne will try inject as much as possible, e.g. if ObjEntity &quot;GoodEmployee&quot; has qualifier &quot;personType='EMPLOYEE' and salary&gt;10000&quot;, only personType attribute value will be injected.</TD></TR></TABLE></DIV>
+<DIV class="panelMacro"><TABLE class="infoMacro"><COLGROUP><COL width="24"><COL></COLGROUP><TR><TD valign="top"><IMG src="http://cayenne.apache.org/docs/3.0/images/icons/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></TD><TD><B>Auto-Injection Limitations</B><BR>The mechanism of injecting values of class designator columns currently supports qualifiers of form &quot;attr=value [AND attr=value]*&quot;. Thus, flattened paths, db-paths and other than equality comparisons are not supported. Cayenne will try inject as much as possible, e.g. if ObjEntity &quot;GoodEmployee&quot; has qualifier &quot;personType='EMPLOYEE' and salary&gt;10000&quot;, only personType attribute value will be injected.</TD></TR></TABLE></DIV>
 
 <P>Whenever manual injecting is required, it is a good practice to perform such operations <A href="lifecycle-callbacks.html" title="Lifecycle Callbacks">in PrePersist lifecycle listeners or callbacks</A></P>
 
@@ -102,7 +102,7 @@ List employees = context.performQuery(qu
 </PRE>
 </DIV></DIV>
 
-<DIV class="panelMacro"><TABLE class="infoMacro"><COLGROUP><COL width="24"><COL></COLGROUP><TR><TD valign="top"><IMG src="https://cwiki.apache.org/confluence/images/icons/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></TD><TD>Whenever an object is obtained via a relationship, it is always fully resolved to the lowest possible subclass in an entity inheritance tree.</TD></TR></TABLE></DIV>
+<DIV class="panelMacro"><TABLE class="infoMacro"><COLGROUP><COL width="24"><COL></COLGROUP><TR><TD valign="top"><IMG src="http://cayenne.apache.org/docs/3.0/images/icons/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></TD><TD>Whenever an object is obtained via a relationship, it is always fully resolved to the lowest possible subclass in an entity inheritance tree.</TD></TR></TABLE></DIV>
 
 <DIV class="panelMacro"><TABLE class="warningMacro"><COLGROUP><COL width="24"><COL></COLGROUP><TR><TD valign="top"><IMG src="https://cwiki.apache.org/confluence/images/icons/emoticons/forbidden.gif" width="16" height="16" align="absmiddle" alt="" border="0"></TD><TD>Use <TT>setResolvingInherited(false)</TT> with caution, and only if you never plan to work with subclasses. The downside of it is that the DataContext may end up with two objects pointing to the same database row, thus violating uniquing principle. With the above example, this may happen if at a later time user decides to fetch Managers directly, or if a Manager object is obtained via a relationship.</TD></TR></TABLE></DIV>
 

Added: websites/staging/cayenne/trunk/content/docs/3.0/images/icons/emoticons/information.gif
==============================================================================
Binary file - no diff available.

Propchange: websites/staging/cayenne/trunk/content/docs/3.0/images/icons/emoticons/information.gif
------------------------------------------------------------------------------
    svn:mime-type = image/gif

Added: websites/staging/cayenne/trunk/content/docs/3.0/images/icons/emoticons/warning.gif
==============================================================================
Binary file - no diff available.

Propchange: websites/staging/cayenne/trunk/content/docs/3.0/images/icons/emoticons/warning.gif
------------------------------------------------------------------------------
    svn:mime-type = image/gif

Modified: websites/staging/cayenne/trunk/content/docs/3.0/parameterized-queries.html
==============================================================================
--- websites/staging/cayenne/trunk/content/docs/3.0/parameterized-queries.html (original)
+++ websites/staging/cayenne/trunk/content/docs/3.0/parameterized-queries.html Sat Aug 16 11:45:46 2014
@@ -50,7 +50,7 @@
 <hr>
 <div id="content">
        	<P>SelectQuery objects can be rather complex. They may contain long qualifiers and lots of tuning parameters. Parameterized Queries feature addresses reusability of complex queries. With this feature, for each group of queries that differ only in the values used in the qualifier, a developer may create a single shared &quot;prototype&quot; or &quot;template&quot; query, and use it later as a factory for other queries. All settings configured in the prototype object will be passed to the final queries. Qualifier of the prototype query may use named parameters that are substituted for real values when a final query is created from the prototype.</P>
-<DIV class="panelMacro"><TABLE class="infoMacro"><COLGROUP><COL width="24"><COL></COLGROUP><TR><TD valign="top"><IMG src="https://cwiki.apache.org/confluence/images/icons/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></TD><TD>&quot;Prototype&quot; queries are normally created in CayenneModeler and stored in the DataMap XML file. &quot;Queries Stored in DataMap&quot; chapter describes how to use such templates. This chapter shows how to create them on the spot using the API calls.</TD></TR></TABLE></DIV>
+<DIV class="panelMacro"><TABLE class="infoMacro"><COLGROUP><COL width="24"><COL></COLGROUP><TR><TD valign="top"><IMG src="http://cayenne.apache.org/docs/3.0/images/icons/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></TD><TD>&quot;Prototype&quot; queries are normally created in CayenneModeler and stored in the DataMap XML file. &quot;Queries Stored in DataMap&quot; chapter describes how to use such templates. This chapter shows how to create them on the spot using the API calls.</TD></TR></TABLE></DIV>
 
 <P>Building a prototype query using <TT>Expression.fromString(..)</TT>:</P>
 

Modified: websites/staging/cayenne/trunk/content/docs/3.0/path-expressions.html
==============================================================================
--- websites/staging/cayenne/trunk/content/docs/3.0/path-expressions.html (original)
+++ websites/staging/cayenne/trunk/content/docs/3.0/path-expressions.html Sat Aug 16 11:45:46 2014
@@ -72,7 +72,7 @@
 </UL>
 
 
-<DIV class="panelMacro"><TABLE class="infoMacro"><COLGROUP><COL width="24"><COL></COLGROUP><TR><TD valign="top"><IMG src="https://cwiki.apache.org/confluence/images/icons/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></TD><TD><B>What Does 'navigation' Means</B><BR>The term &quot;navigation&quot; in the description above could mean different things depending on the context. For instance, when evaluating an expression in memory, &quot;navigating&quot; an object path would simply return the value of a corresponding object property. When the same expression is used in a select query qualifier, it resolves to the name of a table column used in a WHERE clause of a generated SQL statement.</TD></TR></TABLE></DIV>
+<DIV class="panelMacro"><TABLE class="infoMacro"><COLGROUP><COL width="24"><COL></COLGROUP><TR><TD valign="top"><IMG src="http://cayenne.apache.org/docs/3.0/images/icons/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></TD><TD><B>What Does 'navigation' Means</B><BR>The term &quot;navigation&quot; in the description above could mean different things depending on the context. For instance, when evaluating an expression in memory, &quot;navigating&quot; an object path would simply return the value of a corresponding object property. When the same expression is used in a select query qualifier, it resolves to the name of a table column used in a WHERE clause of a generated SQL statement.</TD></TR></TABLE></DIV>
 
 <H3><A name="PathExpressions-DatabasePathExpressions"></A>Database Path Expressions</H3>
 <P>Database Path Expressions provide an easy way to navigate through DB table joins. Instead of complex join semantics such expressions utilize the names of DbRelationships defined in Cayenne DataMap. Translating the above object path examples into the DB realm, database path expressions might look like this:</P>

Modified: websites/staging/cayenne/trunk/content/docs/3.0/primary-key-generation.html
==============================================================================
--- websites/staging/cayenne/trunk/content/docs/3.0/primary-key-generation.html (original)
+++ websites/staging/cayenne/trunk/content/docs/3.0/primary-key-generation.html Sat Aug 16 11:45:46 2014
@@ -117,7 +117,7 @@
 
 <P>To generate the necessary database objects for the primary key autogeneration, use CayenneModeler and follow the instructions given <A href="generate-primary-key-support.html" title="Generate Primary Key Support">here</A>.</P>
 
-<DIV class="panelMacro"><TABLE class="infoMacro"><COLGROUP><COL width="24"><COL></COLGROUP><TR><TD valign="top"><IMG src="https://cwiki.apache.org/confluence/images/icons/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></TD><TD>Cayenne only supports automatic PK generation for a single column per table.</TD></TR></TABLE></DIV>
+<DIV class="panelMacro"><TABLE class="infoMacro"><COLGROUP><COL width="24"><COL></COLGROUP><TR><TD valign="top"><IMG src="http://cayenne.apache.org/docs/3.0/images/icons/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></TD><TD>Cayenne only supports automatic PK generation for a single column per table.</TD></TR></TABLE></DIV>
 
 <H3><A name="PrimaryKeyGeneration-Sections"></A>Sections</H3>
 

Modified: websites/staging/cayenne/trunk/content/docs/3.0/relationships.html
==============================================================================
--- websites/staging/cayenne/trunk/content/docs/3.0/relationships.html (original)
+++ websites/staging/cayenne/trunk/content/docs/3.0/relationships.html Sat Aug 16 11:45:46 2014
@@ -69,7 +69,7 @@ painting.setToArtist(newArtist);
 </SPAN><SPAN class="code-comment">// painting.setToArtist(<SPAN class="code-keyword">null</SPAN>);</SPAN>
 </PRE>
 </DIV></DIV>
-<DIV class="panelMacro"><TABLE class="infoMacro"><COLGROUP><COL width="24"><COL></COLGROUP><TR><TD valign="top"><IMG src="https://cwiki.apache.org/confluence/images/icons/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></TD><TD>When adding or removing an object from any kind of relationship, Cayenne will locate and modify an existing reverse relationship as appropriate.</TD></TR></TABLE></DIV>
+<DIV class="panelMacro"><TABLE class="infoMacro"><COLGROUP><COL width="24"><COL></COLGROUP><TR><TD valign="top"><IMG src="http://cayenne.apache.org/docs/3.0/images/icons/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></TD><TD>When adding or removing an object from any kind of relationship, Cayenne will locate and modify an existing reverse relationship as appropriate.</TD></TR></TABLE></DIV>
 
 <H3><A name="Relationships-ToManyRelationships"></A>To-Many Relationships</H3>
 

Modified: websites/staging/cayenne/trunk/content/docs/3.0/using-orderings.html
==============================================================================
--- websites/staging/cayenne/trunk/content/docs/3.0/using-orderings.html (original)
+++ websites/staging/cayenne/trunk/content/docs/3.0/using-orderings.html Sat Aug 16 11:45:46 2014
@@ -75,7 +75,7 @@ SelectQuery query = <SPAN class="code-ke
 </PRE>
 </DIV></DIV>
 
-<DIV class="panelMacro"><TABLE class="infoMacro"><COLGROUP><COL width="24"><COL></COLGROUP><TR><TD valign="top"><IMG src="https://cwiki.apache.org/confluence/images/icons/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></TD><TD><B>Legacy Information</B><BR>In Cayenne versions prior to 3.0, the addOrdering() call in the above example would appear as <TT>query.addOrdering(&quot;artistName&quot;, true)</TT>. A boolean parameter of true meant to order ascending (false descending).</TD></TR></TABLE></DIV>
+<DIV class="panelMacro"><TABLE class="infoMacro"><COLGROUP><COL width="24"><COL></COLGROUP><TR><TD valign="top"><IMG src="http://cayenne.apache.org/docs/3.0/images/icons/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></TD><TD><B>Legacy Information</B><BR>In Cayenne versions prior to 3.0, the addOrdering() call in the above example would appear as <TT>query.addOrdering(&quot;artistName&quot;, true)</TT>. A boolean parameter of true meant to order ascending (false descending).</TD></TR></TABLE></DIV>
 
 <P>Orderings also support in-memory sorting of lists of Java Beans (all DataObjects are normally Java Beans, since they has set/get method pairs for all the properties). For instance to sort with a single ordering, the following code might be used:</P>
 
@@ -95,7 +95,7 @@ SelectQuery query = <SPAN class="code-ke
 </PRE>
 </DIV></DIV>
 
-<DIV class="panelMacro"><TABLE class="infoMacro"><COLGROUP><COL width="24"><COL></COLGROUP><TR><TD valign="top"><IMG src="https://cwiki.apache.org/confluence/images/icons/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></TD><TD><B>Legacy Information</B><BR>In Cayenne versions prior to 3.0, the Ordering() constructor in the above example would appear as: <TT>new Ordering(&quot;artistName&quot;, true)</TT>. A boolean parameter of true meant to order ascending (false descending).</TD></TR></TABLE></DIV>
+<DIV class="panelMacro"><TABLE class="infoMacro"><COLGROUP><COL width="24"><COL></COLGROUP><TR><TD valign="top"><IMG src="http://cayenne.apache.org/docs/3.0/images/icons/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></TD><TD><B>Legacy Information</B><BR>In Cayenne versions prior to 3.0, the Ordering() constructor in the above example would appear as: <TT>new Ordering(&quot;artistName&quot;, true)</TT>. A boolean parameter of true meant to order ascending (false descending).</TD></TR></TABLE></DIV>
 
 <P>If there is a need to sort on more than one object property, multiple Orderings can be passed as a List to a static method <TT>orderList(List, List)</TT>. The cost of adding new Orderings decreases, as the list of objects ends up being sorted by the first Ordering, then, if any two objects are equal for first Ordering, by the second, and so on.</P>