cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r1424360 - in /cayenne/main/branches/STABLE-3.1/docs/docbook: cayenne-guide/src/docbkx/ css/ getting-started-rop/src/docbkx/ getting-started/src/docbkx/ stylesheets/ upgrade-guide/src/docbkx/
Date Thu, 20 Dec 2012 08:07:43 GMT
Author: aadamchik
Date: Thu Dec 20 08:07:42 2012
New Revision: 1424360

URL: http://svn.apache.org/viewvc?rev=1424360&view=rev
Log:
CAY-1733  update docs

patch by Ilya Drabenia

(cherry picked from commit 3f18e73fa8a5077c9be9c00f69695dcf3603ba94)

Added:
    cayenne/main/branches/STABLE-3.1/docs/docbook/css/highlight.css
    cayenne/main/branches/STABLE-3.1/docs/docbook/stylesheets/highlight.xsl
Modified:
    cayenne/main/branches/STABLE-3.1/docs/docbook/cayenne-guide/src/docbkx/customizing-cayenne-runtime.xml
    cayenne/main/branches/STABLE-3.1/docs/docbook/cayenne-guide/src/docbkx/expressions.xml
    cayenne/main/branches/STABLE-3.1/docs/docbook/cayenne-guide/src/docbkx/including-cayenne-in-project.xml
    cayenne/main/branches/STABLE-3.1/docs/docbook/cayenne-guide/src/docbkx/orderings.xml
    cayenne/main/branches/STABLE-3.1/docs/docbook/cayenne-guide/src/docbkx/performance-tuning.xml
    cayenne/main/branches/STABLE-3.1/docs/docbook/cayenne-guide/src/docbkx/persistent-objects-objectcontext.xml
    cayenne/main/branches/STABLE-3.1/docs/docbook/cayenne-guide/src/docbkx/queries.xml
    cayenne/main/branches/STABLE-3.1/docs/docbook/cayenne-guide/src/docbkx/starting-cayenne.xml
    cayenne/main/branches/STABLE-3.1/docs/docbook/css/cayenne-doc.css
    cayenne/main/branches/STABLE-3.1/docs/docbook/getting-started-rop/src/docbkx/authentification.xml
    cayenne/main/branches/STABLE-3.1/docs/docbook/getting-started-rop/src/docbkx/client-code.xml
    cayenne/main/branches/STABLE-3.1/docs/docbook/getting-started/src/docbkx/delete.xml
    cayenne/main/branches/STABLE-3.1/docs/docbook/getting-started/src/docbkx/object-context.xml
    cayenne/main/branches/STABLE-3.1/docs/docbook/getting-started/src/docbkx/persistent-objects.xml
    cayenne/main/branches/STABLE-3.1/docs/docbook/getting-started/src/docbkx/select-query.xml
    cayenne/main/branches/STABLE-3.1/docs/docbook/stylesheets/common-customizations.xsl
    cayenne/main/branches/STABLE-3.1/docs/docbook/stylesheets/html.xsl
    cayenne/main/branches/STABLE-3.1/docs/docbook/upgrade-guide/src/docbkx/new-features.xml

Modified: cayenne/main/branches/STABLE-3.1/docs/docbook/cayenne-guide/src/docbkx/customizing-cayenne-runtime.xml
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-3.1/docs/docbook/cayenne-guide/src/docbkx/customizing-cayenne-runtime.xml?rev=1424360&r1=1424359&r2=1424360&view=diff
==============================================================================
--- cayenne/main/branches/STABLE-3.1/docs/docbook/cayenne-guide/src/docbkx/customizing-cayenne-runtime.xml (original)
+++ cayenne/main/branches/STABLE-3.1/docs/docbook/cayenne-guide/src/docbkx/customizing-cayenne-runtime.xml Thu Dec 20 08:07:42 2012
@@ -34,13 +34,13 @@
 			<para>To have a working DI container, we need three things: service interfaces and
 				classes, a module that describes service bindings, a container that loads the
 				module, and resolves the depedencies. Let's start with service interfaces and
-				classes:<programlisting>public interface Service1 {
+				classes:<programlisting language="java">public interface Service1 {
 	public String getString();
-}</programlisting><programlisting>public interface Service2 {
+}</programlisting><programlisting language="java">public interface Service2 {
 	public int getInt();
 }</programlisting></para>
 			<para>A service implementation using instance variable
-				injection:<programlisting>public class Service1Impl implements Service1 {
+				injection:<programlisting language="java">public class Service1Impl implements Service1 {
 	@Inject
 	private Service2 service2;
 	
@@ -49,7 +49,7 @@
 	}
 }</programlisting>Same
 				thing, but using constructor
-				injection:<programlisting>public class Service1Impl implements Service1 {
+				injection:<programlisting language="java">public class Service1Impl implements Service1 {
 
 	private Service2 service2;
 
@@ -61,7 +61,7 @@
 		return service2.getInt() + "_Service1Impl";
 	}
 }
-</programlisting><programlisting>public class Service2Impl implements Service2 {
+</programlisting><programlisting language="java">public class Service2Impl implements Service2 {
 	private int i;
 
 	public int getInt() {
@@ -77,7 +77,7 @@
 				object representing service interface. Here is a module that binds Service1 and
 				Service2 to corresponding default implementations:</para>
 			<para>
-				<programlisting>public class Module1 implements Module {
+				<programlisting language="java">public class Module1 implements Module {
 
 	public void configure(Binder binder) {
 		binder.bind(Service1.class).to(Service1Impl.class);
@@ -87,22 +87,22 @@
 			</para>
 			<para>Once we have at least one module, we can create a DI container.
 					<code>org.apache.cayenne.di.Injector</code> is the container class in
-				Cayenne:<programlisting>Injector injector = DIBootstrap.createInjector(new Module1());</programlisting></para>
+				Cayenne:<programlisting language="java">Injector injector = DIBootstrap.createInjector(new Module1());</programlisting></para>
 			<para>Now that we have created the container, we can obtain services from it and call
 				their
-				methods:<programlisting>Service1 s1 = injector.getInstance(Service1.class);
+				methods:<programlisting language="java">Service1 s1 = injector.getInstance(Service1.class);
 for (int i = 0; i &lt; 5; i++) {
 	System.out.println("S1 String: " + s1.getString());
 }</programlisting></para>
 			<para>This outputs the following lines, demonstrating that s1 was Service1Impl and
 				Service2 injected into it was
-				Service2Impl:<programlisting>0_Service1Impl
+				Service2Impl:<programlisting language="java">0_Service1Impl
 1_Service1Impl
 2_Service1Impl
 3_Service1Impl
 4_Service1Impl</programlisting></para>
 			<para>There are more flavors of bindings:
-				<programlisting>// binding to instance - allowing user to create and configure instance
+				<programlisting language="java">// binding to instance - allowing user to create and configure instance
 // inside the module class
 binder.bind(Service2.class).toInstance(new Service2Impl());
 
@@ -140,7 +140,7 @@ binder.bind(Key.get(Service2.class, "i2"
 				etc.</para>
 			<para>Another useful scope is "no scope", meaning that every time a container is asked to provide
 				a service instance for a given key, a new instance will be created and
-				returned:<programlisting>binder.bind(Service2.class).to(Service2Impl.class).withoutScope();</programlisting>Users
+				returned:<programlisting language="java">binder.bind(Service2.class).to(Service2Impl.class).withoutScope();</programlisting>Users
 				can also create their own scopes, e.g. a web application request scope or a session
 				scope. Most often than not custom scopes can be created as instances of
 					<code>org.apache.cayenne.di.spi.DefaultScope</code> with startup and shutdown
@@ -173,7 +173,7 @@ binder.bind(Key.get(Service2.class, "i2"
 	public void configure(Binder binder) {
 		// customizations go here...
 	}	
-}</programlisting><programlisting>Module extensions = new MyExtensionsModule();
+}</programlisting><programlisting language="java">Module extensions = new MyExtensionsModule();
 ServerRuntime runtime = 
 	new ServerRuntime("com/example/cayenne-mydomain.xml", extensions);</programlisting>
 		<section xml:id="changing-properties-of-existing-services">
@@ -206,13 +206,13 @@ ServerRuntime runtime = 
 				may contribute an instance of custom DbAdapterDetector to a
 					<code>org.apache.cayenne.configuration.server.DefaultDbAdapterFactory.detectors</code>
 				list:</para>
-			<programlisting>public class MyDbAdapterDetector implements DbAdapterDetector {
+			<programlisting language="java">public class MyDbAdapterDetector implements DbAdapterDetector {
 	public DbAdapter createAdapter(DatabaseMetaData md) throws SQLException {
 		// check if we support this database and retun custom adapter
 		...
 	}
 }</programlisting>
-			<programlisting>// since build-in list for this key is a singleton, repeated
+			<programlisting language="java">// since build-in list for this key is a singleton, repeated
 // calls to 'bindList' will return the same instance 
 binder.bindList(DefaultDbAdapterFactory.DETECTORS_LIST)
        .add(MyDbAdapterDetector.class);</programlisting>
@@ -233,7 +233,7 @@ binder.bindList(DefaultDbAdapterFactory.
 				implementation of this service is provided by <code>MapQueryCacheProvider</code>.
 				But if we want to use <code>EhCacheQueryCache</code> (a Cayenne wrapper for the
 				EhCache framework), we can define it like
-				this:<programlisting>binder.bind(QueryCache.class).to(EhCacheQueryCache.class);</programlisting></para>
+				this:<programlisting language="java">binder.bind(QueryCache.class).to(EhCacheQueryCache.class);</programlisting></para>
 		</section>
 	</section>
 	<section xml:id="noteworthy-runtime-components">

Modified: cayenne/main/branches/STABLE-3.1/docs/docbook/cayenne-guide/src/docbkx/expressions.xml
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-3.1/docs/docbook/cayenne-guide/src/docbkx/expressions.xml?rev=1424360&r1=1424359&r2=1424360&view=diff
==============================================================================
--- cayenne/main/branches/STABLE-3.1/docs/docbook/cayenne-guide/src/docbkx/expressions.xml (original)
+++ cayenne/main/branches/STABLE-3.1/docs/docbook/cayenne-guide/src/docbkx/expressions.xml Thu Dec 20 08:07:42 2012
@@ -195,7 +195,7 @@ Expression qualifier1 = template.expWith
 			general examples and some gotchas. </para>
 		<para>The following code recreates the expression from the previous chapter, but now using
 			expression
-			API:<programlisting>// String expression: name like 'A%' and price &lt; 1000
+			API:<programlisting language="java">// String expression: name like 'A%' and price &lt; 1000
 Expression e1 = ExpressionFactory.likeExp(Painting.NAME_PROPERTY, "A%");
 Expression e2 = ExpressionFactory.lessExp(Painting.PRICE_PROPERTY, 1000);
 Expression finalExp = e1.andExp(e2); </programlisting>This
@@ -211,7 +211,7 @@ Expression finalExp = e1.andExp(e2); </p
 			control how SQL joins are generated if the same path is encountered more than once in
 			the same Expression. Two ExpressionFactory methods allow to implicitly generate aliases
 			to "split" match paths into individual joins if
-			needed:<programlisting>Expression matchAllExp(String path, Collection values)
+			needed:<programlisting language="java">Expression matchAllExp(String path, Collection values)
 Expression matchAllExp(String path, Object... values)</programlisting></para>
 		<para>"Path" argument to both of these methods can use a split character (a pipe symbol '|')
 			instead of dot to indicate that relationship following a path should be split into a
@@ -227,16 +227,16 @@ Expression matchAllExp(String path, Obje
 			is done by the database engine. However the same expressions can also be used for
 			accessing object properties, calculating values, in-memory filtering. </para>
 		<para>Checking whether an object satisfies an
-			expression:<programlisting>Expression e = ExpressionFactory.inExp(User.NAME_PROPERTY, "John", "Bob");
+			expression:<programlisting language="java">Expression e = ExpressionFactory.inExp(User.NAME_PROPERTY, "John", "Bob");
 User user = ...
 if(e.match(user)) {
    ...
 }</programlisting>Reading
 			property
-			value:<programlisting>Expression e = Expression.fromString(User.NAME_PROPERTY);
+			value:<programlisting language="java">Expression e = Expression.fromString(User.NAME_PROPERTY);
 String name = e.evaluate(user);</programlisting></para>
 		<para>Filtering a list of
-			objects:<programlisting>Expression e = ExpressionFactory.inExp(User.NAME_PROPERTY, "John", "Bob");
+			objects:<programlisting language="java">Expression e = ExpressionFactory.inExp(User.NAME_PROPERTY, "John", "Bob");
 List&lt;User> unfiltered = ...
 List&lt;User> filtered = e.filterObjects(unfiltered);</programlisting></para>
 		<para>

Modified: cayenne/main/branches/STABLE-3.1/docs/docbook/cayenne-guide/src/docbkx/including-cayenne-in-project.xml
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-3.1/docs/docbook/cayenne-guide/src/docbkx/including-cayenne-in-project.xml?rev=1424360&r1=1424359&r2=1424360&view=diff
==============================================================================
--- cayenne/main/branches/STABLE-3.1/docs/docbook/cayenne-guide/src/docbkx/including-cayenne-in-project.xml (original)
+++ cayenne/main/branches/STABLE-3.1/docs/docbook/cayenne-guide/src/docbkx/including-cayenne-in-project.xml Thu Dec 20 08:07:42 2012
@@ -65,6 +65,7 @@
 			<para>By creating custom templates, you can use cgen to generate other output (such as
 				web pages, reports, specialized code templates) based on DataMap information.</para>
 			<para>
+                <div class="table">
 				<table frame="void">
 					<caption>cgen required parameters</caption>
 					<col width="14%"/>
@@ -94,6 +95,8 @@
 						</tr>
 					</tbody>
 				</table>
+                </div>
+                <div class="table">
 				<table frame="void">
 					<caption>cgen optional parameters</caption>
 					<col width="33%"/>
@@ -210,7 +213,9 @@
 								package.</td>
 						</tr>
 					</tbody>
-				</table>Example - a typical class generation scenario, where pairs of classes are
+				</table>
+                </div>
+                Example - a typical class generation scenario, where pairs of classes are
 				generated, and superclasses are placed in a separate package:
 				<programlisting>&lt;plugin>
 	&lt;groupId>org.apache.cayenne.plugins&lt;/groupId>

Modified: cayenne/main/branches/STABLE-3.1/docs/docbook/cayenne-guide/src/docbkx/orderings.xml
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-3.1/docs/docbook/cayenne-guide/src/docbkx/orderings.xml?rev=1424360&r1=1424359&r2=1424360&view=diff
==============================================================================
--- cayenne/main/branches/STABLE-3.1/docs/docbook/cayenne-guide/src/docbkx/orderings.xml (original)
+++ cayenne/main/branches/STABLE-3.1/docs/docbook/cayenne-guide/src/docbkx/orderings.xml Thu Dec 20 08:07:42 2012
@@ -4,11 +4,11 @@
 	<title>Orderings</title>
 		<para>An Ordering object defines how a list of objects should be ordered. Orderings are
 			essentially path expressions combined with a sorting strategy. Creating an Ordering:
-			<programlisting>Ordering o = new Ordering(Painting.NAME_PROPERTY, SortOrder.ASENDING);</programlisting></para>
+			<programlisting language="java">Ordering o = new Ordering(Painting.NAME_PROPERTY, SortOrder.ASENDING);</programlisting></para>
 		<para>Like expressions, orderings are translated into SQL as parts of queries (and the sorting
 		occurs in the database). Also like expressions, orderings can be used in memory, naturally -
 		to sort
-		objects:<programlisting>Ordering o = new Ordering(Painting.NAME_PROPERTY, SortOrder.ASCENDING_INSENSITIVE);
+		objects:<programlisting language="java">Ordering o = new Ordering(Painting.NAME_PROPERTY, SortOrder.ASCENDING_INSENSITIVE);
 List&lt;Painting> list = ...
 o.orderList(list);</programlisting>Note
 		that unlike filtering with Expressions, ordering is performed in-place. This list object is

Modified: cayenne/main/branches/STABLE-3.1/docs/docbook/cayenne-guide/src/docbkx/performance-tuning.xml
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-3.1/docs/docbook/cayenne-guide/src/docbkx/performance-tuning.xml?rev=1424360&r1=1424359&r2=1424360&view=diff
==============================================================================
--- cayenne/main/branches/STABLE-3.1/docs/docbook/cayenne-guide/src/docbkx/performance-tuning.xml (original)
+++ cayenne/main/branches/STABLE-3.1/docs/docbook/cayenne-guide/src/docbkx/performance-tuning.xml Thu Dec 20 08:07:42 2012
@@ -10,7 +10,7 @@
 			chapter, as it is a powerful performance optimization method. Another common application
 			of prefetching is for refreshing stale object relationships.</para>
 		<para>Prefetching example:
-			<programlisting>SelectQuery query = new SelectQuery(Artist.class);
+			<programlisting language="java">SelectQuery query = new SelectQuery(Artist.class);
 
 // this instructs Cayenne to prefetch one of Artist's relationships
 query.addPrefetch("paintings");
@@ -20,9 +20,9 @@ query.addPrefetch("paintings");
 List&lt;Artist> artists = context.performQuery(query);</programlisting>
 			All types of relationships can be preftetched - to-one, to-many, flattened. </para>
 		<para>A prefetch can span multiple relationships:
-			<programlisting> query.addPrefetch("paintings.gallery");</programlisting></para>
+			<programlisting language="java"> query.addPrefetch("paintings.gallery");</programlisting></para>
 		<para>A query can have multiple
-			prefetches:<programlisting>query.addPrefetch("paintings"); 
+			prefetches:<programlisting language="java">query.addPrefetch("paintings");
 query.addPrefetch("paintings.gallery"); </programlisting></para>
 		<para>If a query is fetching DataRows, all "disjoint" prefetches are ignored, only "joint"
 			prefetches are executed (see prefetching semantics discussion below for what disjoint and
@@ -35,14 +35,14 @@ query.addPrefetch("paintings.gallery"); 
 				query root objects with related objects fully resolved. However semantics can affect
 				preformance, in some cases significantly. There are 3 types of prefetch semantics,
 				all defined as constants in
-				org.apache.cayenne.query.PrefetchTreeNode:<programlisting>PrefetchTreeNode.JOINT_PREFETCH_SEMANTICS
+				org.apache.cayenne.query.PrefetchTreeNode:<programlisting language="java">PrefetchTreeNode.JOINT_PREFETCH_SEMANTICS
 PrefetchTreeNode.DISJOINT_PREFETCH_SEMANTICS
 PrefetchTreeNode.DISJOINT_BY_ID_PREFETCH_SEMANTICS</programlisting></para>
 			<para>Each query has a default prefetch semantics, so generally users do not have to
 				worry about changing it, except when performance is a concern, or a few special
 				cases when a default sematics can't produce the correct result. SelectQuery uses
 				DISJOINT_PREFETCH_SEMANTICS by default. Semantics can be changed as
-				follows:<programlisting>SelectQuery query = new SelectQuery(Artist.class); 
+				follows:<programlisting language="java">SelectQuery query = new SelectQuery(Artist.class);
 query.addPrefetch("paintings").setSemantics(
                 PrefetchTreeNode.JOINT_PREFETCH_SEMANTICS); </programlisting></para>
 			<para>There's no limitation on mixing different types of semantics in the same

Modified: cayenne/main/branches/STABLE-3.1/docs/docbook/cayenne-guide/src/docbkx/persistent-objects-objectcontext.xml
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-3.1/docs/docbook/cayenne-guide/src/docbkx/persistent-objects-objectcontext.xml?rev=1424360&r1=1424359&r2=1424360&view=diff
==============================================================================
--- cayenne/main/branches/STABLE-3.1/docs/docbook/cayenne-guide/src/docbkx/persistent-objects-objectcontext.xml (original)
+++ cayenne/main/branches/STABLE-3.1/docs/docbook/cayenne-guide/src/docbkx/persistent-objects-objectcontext.xml Thu Dec 20 08:07:42 2012
@@ -7,7 +7,7 @@
 		<para>ObjectContext is an interface that users normally work with to access the database. It
 			provides the API to execute database operations and to manage persistent objects. A
 			context is obtained from the
-			ServerRuntime:<programlisting>ObjectContext context = runtime.getContext();</programlisting></para>
+			ServerRuntime:<programlisting language="java">ObjectContext context = runtime.getContext();</programlisting></para>
 		<para>The call above creates a new instance of ObjectContext that can access the database via this
 			runtime. ObjectContext is a single "work area" in Cayenne, storing persistent objects.
 			ObjectContext guarantees that for each database row with a unique ID it will contain at
@@ -94,7 +94,7 @@
 		<para>One of the first things users usually want to do with an ObjectContext is to select
 			some objects from a database. This is done by calling "<emphasis role="italic"
 				>performQuery</emphasis>"
-			method:<programlisting>SelectQuery query = new SelectQuery(Artist.class);
+			method:<programlisting language="java">SelectQuery query = new SelectQuery(Artist.class);
 List&lt;Artist> artists = context.performQuery(query);</programlisting>We'll
 			discuss queries in some detail in the following chapters. The example above is
 			self-explanatory - we create a SelectQuery that matches all Artist objects present in
@@ -103,34 +103,34 @@ List&lt;Artist> artists = context.perfor
 			database. For such queries ObjectContext provides "<emphasis role="italic"
 				>performGenericQuery</emphasis>"method. While not nearly as commonly-used as
 			"performQuery", it is nevertheless important in some situations.
-			E.g.:<programlisting>Collection&lt;Query> queries = ... // multiple queries that need to be run together
+			E.g.:<programlisting language="java">Collection&lt;Query> queries = ... // multiple queries that need to be run together
 QueryChain query = new QueryChain(queries);
 
 QueryResponse response = context.performGenericQuery(query);</programlisting></para>
 		<para>An application might modify selected objects. E.g.:</para>
-		<programlisting>Artist selectedArtist = artists.get(0);
+		<programlisting language="java">Artist selectedArtist = artists.get(0);
 selectedArtist.setName("Dali");</programlisting>
 		<para>The first time the object property is changed, the object's state is automatically set
 			to "MODIFIED" by Cayenne. Cayenne tracks all in-memory changes until a user calls
 				"<emphasis role="italic"
-			>commitChanges</emphasis>":<programlisting>context.commitChanges();</programlisting>At
+			>commitChanges</emphasis>":<programlisting language="java">context.commitChanges();</programlisting>At
 			this point all in-memory changes are analyzed and a minimal set of SQL statements is
 			issued in a single transaction to synchronize the database with the in-memory state. In
 			our example "commitChanges" commits just one object, but generally it can be any number
 			of objects. </para>
 		<para>If instead of commit, we wanted to reset all changed objects to the previously
 			committed state, we'd call <emphasis>rollbackChanges</emphasis>
-			instead:<programlisting>context.rollbackChanges();</programlisting></para>
+			instead:<programlisting language="java">context.rollbackChanges();</programlisting></para>
 		<para>"<emphasis role="italic">newObject</emphasis>" method call creates a persistent object
 			and sets its state to
-			"NEW":<programlisting>Artist newArtist = context.newObject(Artist.class);
+			"NEW":<programlisting language="java">Artist newArtist = context.newObject(Artist.class);
 newArtist.setName("Picasso");</programlisting></para>
 		<para>It will only exist in memory until "commitChanges" is issued. On commit Cayenne might
 			generate a new primary key (unless a user set it explicitly, or a PK was inferred from a
 			relationship) and issue an INSERT SQL statement to permanently store the object.</para>
 		<para><emphasis>deleteObjects</emphasis> method takes one or more Persistent objects and
 			marks them as
-			"DELETED":<programlisting>context.deleteObjects(artist1);
+			"DELETED":<programlisting language="java">context.deleteObjects(artist1);
 context.deleteObjects(artist2, artist3, artist4);</programlisting>Additionally
 			"deleteObjects" processes all  delete rules modeled for the affected objects. This may
 			result in implicitly deleting or modifying extra related objects. Same as insert and
@@ -143,11 +143,11 @@ context.deleteObjects(artist2, artist3, 
 			common operation. E.g. to improve performance a user might utilize a single shared
 			context to select and cache data, and then occasionally transfer some selected objects
 			to another context to modify and commit
-			them:<programlisting>ObjectContext editingContext = runtime.getContext();
+			them:<programlisting language="java">ObjectContext editingContext = runtime.getContext();
 Artist localArtist = editingContext.localObject(artist);</programlisting></para>
 		<para>Often an appliction needs to inspect mapping metadata. This information is stored in
 			the EntityResolver object, accessible via the
-			ObjectContext:<programlisting>EntityResolver resolver = objectContext.getEntityResolver();</programlisting></para>
+			ObjectContext:<programlisting language="java">EntityResolver resolver = objectContext.getEntityResolver();</programlisting></para>
 		<para>Here we discussed the most commonly used subset of the ObjectContext API. There are
 			other useful methods, e.g. those allowing to inspect registered objects state en bulk,
 			etc. Check the latest JavaDocs for details.</para>
@@ -158,12 +158,12 @@ Artist localArtist = editingContext.loca
 				<code>"org.apache.cayenne.Cayenne"</code>) that builds on ObjectContext API to
 			provide a number of very common operations. E.g. get a primary key (most entities do not
 			model PK as an object property)
-			:<programlisting>long pk = Cayenne.longPKForObject(artist);</programlisting></para>
+			:<programlisting language="java">long pk = Cayenne.longPKForObject(artist);</programlisting></para>
 		<para>It also provides the reverse operation - finding an object given a known
-			PK:<programlisting>Artist artist = Cayenne.objectForPK(context, Artist.class, 34579);</programlisting></para>
+			PK:<programlisting language="java">Artist artist = Cayenne.objectForPK(context, Artist.class, 34579);</programlisting></para>
 		<para>If a query is expected to return 0 or 1 object, Cayenne helper class can be used to find
 			this object. It throws an exception if more than one object matched the
-			query:<programlisting>Artist artist = (Artist) Cayenne.objectForQuery(context, new SelectQuery(Artist.class));</programlisting></para>
+			query:<programlisting language="java">Artist artist = (Artist) Cayenne.objectForQuery(context, new SelectQuery(Artist.class));</programlisting></para>
 		<para>Feel free to explore Cayenne class API for other useful methods.</para>
 	</section>
 	<section xml:id="objectcontext-nesting">
@@ -185,18 +185,18 @@ Artist localArtist = editingContext.loca
 			separate JVM and communicates with its parent via a web service. ROP is discussed in
 			details in the following chapters. Here we concentrate on the same-VM nesting.</para>
 		<para>To create a nested context, use an instance of ServerRuntime, passing it the desired
-			parent:<programlisting>ObjectContext parent = runtime.getContext();
+			parent:<programlisting language="java">ObjectContext parent = runtime.getContext();
 ObjectContext nested = runtime.getContext((DataChannel) parent);</programlisting>From
 			here a nested context operates just like a regular context (you can perform queries,
 			create and delete objects, etc.). The only difference is that commit and rollback
 			operations can either be limited to synchronization with the parent, or cascade all the
 			way to the
-			database:<programlisting>// merges nested context changes into the parent context
+			database:<programlisting language="java">// merges nested context changes into the parent context
 nested.commitChangesToParent();
 
 // regular 'commitChanges' cascades commit through the chain 
 // of parent contexts all the way to the database
-nested.commitChanges();</programlisting><programlisting>// unrolls all local changes, getting context in a state identical to parent
+nested.commitChanges();</programlisting><programlisting language="java">// unrolls all local changes, getting context in a state identical to parent
 nested.rollbackChangesLocally();
 
 // regular 'rollbackChanges' cascades rollback through the chain of contexts 
@@ -215,17 +215,17 @@ nested.rollbackChanges();</programlistin
 			below.</para>
 		<para>When creating a new generic object, either cast your ObjectContext to DataContext
 			(that provides "newObject(String)" API), or provide your object with an explicit
-			ObjectId:<programlisting>DataObject generic = ((DataContext) context).newObject("GenericEntity");</programlisting><programlisting>DataObject generic = new CayenneDataObject();
+			ObjectId:<programlisting language="java">DataObject generic = ((DataContext) context).newObject("GenericEntity");</programlisting><programlisting language="java">DataObject generic = new CayenneDataObject();
 generic.setObjectId(new ObjectId("GenericEntity"));
 context.registerNewObject(generic);</programlisting>SelectQuery
 			for generic object should be created passing entity name String in constructor, instead
 			of a Java
-			class:<programlisting>SelectQuery query = new SelectQuery("GenericEntity");</programlisting>Use
+			class:<programlisting language="java">SelectQuery query = new SelectQuery("GenericEntity");</programlisting>Use
 			DataObject API to access and modify properties of a generic
-			object:<programlisting>String name = (String) generic.readProperty("name");
+			object:<programlisting language="java">String name = (String) generic.readProperty("name");
 generic.writeProperty("name", "New Name");</programlisting>This
 			is how an application can obtain entity name of a generic
-			object:<programlisting>String entityName = generic.getObjectId().getEntityName();</programlisting></para>
+			object:<programlisting language="java">String entityName = generic.getObjectId().getEntityName();</programlisting></para>
 	</section>
 	<section xml:id="transactions">
 		<title>Transactions</title>
@@ -243,7 +243,7 @@ generic.writeProperty("name", "New Name"
 		<para>If you are using an EJB container (or some other JTA environment), you'll likely need
 			to switch Cayenne runtime into "external transactions mode".  This is either done in the
 			Modeler (check DataDomain > 'Container-Managed Transactions' checkbox), or in the
-			code:<programlisting>runtime.getDataDomain().setUsingExternalTransactions(true);</programlisting>In
+			code:<programlisting language="java">runtime.getDataDomain().setUsingExternalTransactions(true);</programlisting>In
 			this case Cayenne assumes that JDBC Connections obtained by runtime whenever that might
 			happen are all coming from a transactional DataSource managed by the container. In this
 			case Cayenne does not attempt to commit or rollback the connections, leaving it up to
@@ -253,7 +253,7 @@ generic.writeProperty("name", "New Name"
 			rolled back together in case of failure. This can be done with an explicit thread-bound
 			transaction that surrounds a set of operations. Application is responsible for
 			committing or rolling it
-			back:<programlisting>Transaction tx = runtime.getDataDomain().createTransaction();
+			back:<programlisting language="java">Transaction tx = runtime.getDataDomain().createTransaction();
 Transaction.bindThreadTransaction(tx);
 
 try {

Modified: cayenne/main/branches/STABLE-3.1/docs/docbook/cayenne-guide/src/docbkx/queries.xml
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-3.1/docs/docbook/cayenne-guide/src/docbkx/queries.xml?rev=1424360&r1=1424359&r2=1424360&view=diff
==============================================================================
--- cayenne/main/branches/STABLE-3.1/docs/docbook/cayenne-guide/src/docbkx/queries.xml (original)
+++ cayenne/main/branches/STABLE-3.1/docs/docbook/cayenne-guide/src/docbkx/queries.xml Thu Dec 20 08:07:42 2012
@@ -25,7 +25,7 @@
 		<title>SelectQuery</title>
 		<para>SelectQuery is the most commonly used query in user applications. It returns a list of
 			persistent objects of a certain type specified in the
-			query:<programlisting>SelectQuery query = new SelectQuery(Artist.class);
+			query:<programlisting language="java">SelectQuery query = new SelectQuery(Artist.class);
 List&lt;Artist> objects = context.performQuery(query);</programlisting>This
 			returned all rows in the "ARTIST" table. If the logs were turned on, you might see the
 			following SQL
@@ -35,7 +35,7 @@ INFO: === returned 5 row. - took 5 ms.</
 			qualifier to select only the data that you care about. Qualifier is simply an Expression
 			(Expressions where discussed in the previous chapter). If you only want artists whose
 			name begins with 'Pablo', you might use the following qualifier expression:
-			<programlisting>SelectQuery query = new SelectQuery(Artist.class, 
+			<programlisting language="java">SelectQuery query = new SelectQuery(Artist.class,
         ExpressionFactory.likeExp(Artist.NAME_PROPERTY, "Pablo%"));
 List&lt;Artist> objects = context.performQuery(query);</programlisting>The
 			SQL will look different this

Modified: cayenne/main/branches/STABLE-3.1/docs/docbook/cayenne-guide/src/docbkx/starting-cayenne.xml
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-3.1/docs/docbook/cayenne-guide/src/docbkx/starting-cayenne.xml?rev=1424360&r1=1424359&r2=1424360&view=diff
==============================================================================
--- cayenne/main/branches/STABLE-3.1/docs/docbook/cayenne-guide/src/docbkx/starting-cayenne.xml (original)
+++ cayenne/main/branches/STABLE-3.1/docs/docbook/cayenne-guide/src/docbkx/starting-cayenne.xml Thu Dec 20 08:07:42 2012
@@ -7,7 +7,7 @@
 		<para>In runtime Cayenne is accessed via
 				<code>org.apache.cayenne.configuration.server.ServerRuntime</code>. ServerRuntime is
 			created simply by calling a
-			constructor:<programlisting>ServerRuntime runtime = 
+			constructor:<programlisting language="java">ServerRuntime runtime =
 	new ServerRuntime("com/example/cayenne-project.xml");</programlisting></para>
 		<para>The parameter you pass to the constructor is a location of the main project file. Location
 			is a '/'-separated path (same path separator is used on UNIX and Windows) that is
@@ -21,15 +21,15 @@
 			discussed in "Customizing Cayenne Runtime" chapter. Here we'll just show an example of
 			how an application might replace a default implementation of a built-in Cayenne service
 			(in this case - QueryCache) with a different
-			class:<programlisting>public class MyExtensionsModule implements Module {
+			class:<programlisting language="java">public class MyExtensionsModule implements Module {
 	public void configure(Binder binder) {
 		binder.bind(QueryCache.class).to(EhCacheQueryCache.class);
 	}	
-}</programlisting><programlisting>Module extensions = new MyExtensionsModule();
+}</programlisting><programlisting language="java">Module extensions = new MyExtensionsModule();
 ServerRuntime runtime = 
 	new ServerRuntime("com/example/cayenne-project.xml", extensions);</programlisting></para>
 		<para>It is a good idea to shut down the runtime when it is no longer needed, usually before the
-			application itself is shutdown: <programlisting>runtime.shutdown();</programlisting>When
+			application itself is shutdown: <programlisting language="java">runtime.shutdown();</programlisting>When
 			a runtime object has the same scope as the application, this may not be always
 			necessary, however in some cases it is essential, and is generally considered a good
 			practice. E.g. in a web container hot redeploy of a webapp will cause resource leaks and
@@ -41,7 +41,7 @@ ServerRuntime runtime = 
 			projects and merge them together in a single configuration. This way different parts of
 			a database can be mapped independenlty from each other (even by different software
 			providers), and combined in runtime when assembling an application. Doing it is as easy
-			as passing multiple project locations to ServerRuntime constructor:</para><programlisting>ServerRuntime runtime = 
+			as passing multiple project locations to ServerRuntime constructor:</para><programlisting language="java">ServerRuntime runtime =
 	new ServerRuntime(new String[] {
 		"com/example/cayenne-project.xml",
 		"org/foo/cayenne-library1.xml",
@@ -121,7 +121,7 @@ ServerRuntime runtime = 
 			parameter.</para>
 		<para>When the application runs, all HTTP requests matching the filter url-pattern will have
 			access to a session-scoped ObjectContext like
-			this:<programlisting>ObjectContext context = BaseContext.getThreadObjectContext();</programlisting>Of
+			this:<programlisting language="java">ObjectContext context = BaseContext.getThreadObjectContext();</programlisting>Of
 			course the ObjectContext scope, and other behavior of the Cayenne runtime can be
 			customized via dependency injection. For this another filter init parameter called
 			"extra-modules" is used. "extra-modules" is a comma or space-separated list of class

Modified: cayenne/main/branches/STABLE-3.1/docs/docbook/css/cayenne-doc.css
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-3.1/docs/docbook/css/cayenne-doc.css?rev=1424360&r1=1424359&r2=1424360&view=diff
==============================================================================
--- cayenne/main/branches/STABLE-3.1/docs/docbook/css/cayenne-doc.css (original)
+++ cayenne/main/branches/STABLE-3.1/docs/docbook/css/cayenne-doc.css Thu Dec 20 08:07:42 2012
@@ -0,0 +1,113 @@
+@IMPORT url("highlight.css");
+
+html {
+    padding:       0pt;
+    margin:        0pt;
+}
+
+body {
+    margin-left:   10%;
+    margin-right:  10%;
+    font-family:   Arial, Sans-serif;
+}
+
+div {
+    margin:        0pt;
+}
+
+p {
+    text-align:    justify;
+}
+
+hr {
+    border:        1px solid gray;
+    background:    gray;
+}
+
+h1,h2,h3,h4 {
+    color:         #234623;
+    font-family:   Arial, Sans-serif;
+}
+
+pre {
+    line-height:   1.0;
+    color:         black;
+
+    -moz-tab-size: 4;
+    -o-tab-size:   4;
+    tab-size:      4;
+}
+
+pre.programlisting {
+    font-size:     10pt;
+    padding:       7pt 3pt;
+    border:        1pt solid black;
+    background:    #eeeeee;
+    clear:         both;
+}
+
+div.table {
+    margin:        1em;
+    padding:       0.5em;
+    text-align:    center;
+}
+
+table[frame=void] {
+    display:       table;
+    width:         100%;
+    border:        1px black solid;
+    border-collapse: collapse;
+    border-spacing: 0;
+}
+
+table[frame=void] td {
+    padding-left:  7px;
+    padding-right: 7px;
+    border:        1px black solid;
+}
+
+table[frame=void] th {
+    padding-left:  7px;
+    padding-right: 7px;
+    border:        1px black solid;
+}
+
+.sidebar {
+    float: right;
+    margin: 10px 0 10px 30px;
+    padding: 10px 20px 20px 20px;
+    width: 33%;
+    border: 1px solid black;
+    background-color: #F4F4F4;
+    font-size: 14px;
+}
+
+.mediaobject {
+    padding-top: 30px;
+    padding-bottom: 30px;
+}
+
+.legalnotice {
+    font-family: Verdana, Arial, helvetica, sans-serif;
+    font-size: 12px;
+    font-style: italic;
+}
+
+p.releaseinfo {
+    font-size: 100%;
+    font-weight: bold;
+    font-family: Verdana, Arial, helvetica, sans-serif;
+    padding-top: 10px;
+}
+
+p.pubdate {
+    font-size: 120%;
+    font-weight: bold;
+    font-family: Verdana, Arial, helvetica, sans-serif;
+}
+
+span.productname {
+    font-size: 200%;
+    font-weight: bold;
+    font-family: Verdana, Arial, helvetica, sans-serif;
+}
\ No newline at end of file

Added: cayenne/main/branches/STABLE-3.1/docs/docbook/css/highlight.css
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-3.1/docs/docbook/css/highlight.css?rev=1424360&view=auto
==============================================================================
--- cayenne/main/branches/STABLE-3.1/docs/docbook/css/highlight.css (added)
+++ cayenne/main/branches/STABLE-3.1/docs/docbook/css/highlight.css Thu Dec 20 08:07:42 2012
@@ -0,0 +1,35 @@
+/*
+   code highlight CSS resemblign the Eclipse IDE default color schema
+   @author Costin Leau
+*/
+
+.hl-keyword {
+    color: #7F0055;
+    font-weight: bold;
+}
+
+.hl-comment {
+    color: #3F5F5F;
+    font-style: italic;
+}
+
+.hl-multiline-comment {
+    color: #3F5FBF;
+    font-style: italic;
+}
+
+.hl-tag {
+    color: #3F7F7F;
+}
+
+.hl-attribute {
+    color: #7F007F;
+}
+
+.hl-value {
+    color: #2A00FF;
+}
+
+.hl-string {
+    color: #2A00FF !important;
+}
\ No newline at end of file

Modified: cayenne/main/branches/STABLE-3.1/docs/docbook/getting-started-rop/src/docbkx/authentification.xml
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-3.1/docs/docbook/getting-started-rop/src/docbkx/authentification.xml?rev=1424360&r1=1424359&r2=1424360&view=diff
==============================================================================
--- cayenne/main/branches/STABLE-3.1/docs/docbook/getting-started-rop/src/docbkx/authentification.xml (original)
+++ cayenne/main/branches/STABLE-3.1/docs/docbook/getting-started-rop/src/docbkx/authentification.xml Thu Dec 20 08:07:42 2012
@@ -83,7 +83,7 @@
     <section xml:id="running-client">
         <title>Running Client with Basic Authentication</title>
         <para>If you run the client without any changes, you'll get the following error:</para>
-        <programlisting>org.apache.cayenne.remote.hessian.HessianConnection connect
+        <programlisting language="java">org.apache.cayenne.remote.hessian.HessianConnection connect
 INFO: Connecting to [http://localhost:8080/tutorial/cayenne-service] - dedicated session.
 org.apache.cayenne.remote.hessian.HessianConnection connect
 INFO: Error establishing remote session. URL - http://localhost:8080/tutorial/cayenne-service; 
@@ -115,7 +115,7 @@ Caused by: java.net.HttpRetryException: 
 	... 4 more</programlisting>
         <para>Which is exactly what you'd expect, as the client is not authenticating itself. So
             change the line in Main.java where we obtained an ROP connection to this:</para>
-        <programlisting>ClientConnection connection = new HessianConnection(
+        <programlisting language="java">ClientConnection connection = new HessianConnection(
         "http://localhost:8080/tutorial/cayenne-service",
         "cayenne-user", "secret", null);</programlisting>
         <para>Try running again, and everything should work as before. Obviously in production

Modified: cayenne/main/branches/STABLE-3.1/docs/docbook/getting-started-rop/src/docbkx/client-code.xml
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-3.1/docs/docbook/getting-started-rop/src/docbkx/client-code.xml?rev=1424360&r1=1424359&r2=1424360&view=diff
==============================================================================
--- cayenne/main/branches/STABLE-3.1/docs/docbook/getting-started-rop/src/docbkx/client-code.xml (original)
+++ cayenne/main/branches/STABLE-3.1/docs/docbook/getting-started-rop/src/docbkx/client-code.xml Thu Dec 20 08:07:42 2012
@@ -11,7 +11,7 @@
             ObjectContext.</para>
         <para>Let's start by creating an empty Main class with the standard main() method in the
             client project:</para>
-        <programlisting>package org.example.cayenne.persistent.client;
+        <programlisting language="java">package org.example.cayenne.persistent.client;
 
 public class Main {
 
@@ -21,7 +21,7 @@ public class Main {
 }</programlisting>
         <para>Now the part that is actually different from regular Cayenne - establishing the server
             connection and obtaining the ObjectContext:</para>
-        <programlisting>ClientConnection connection = new HessianConnection("http://localhost:8080/tutorial/cayenne-service");
+        <programlisting language="java">ClientConnection connection = new HessianConnection("http://localhost:8080/tutorial/cayenne-service");
 DataChannel channel = new ClientChannel(connection, false, new DefaultEventManager(), false);
 ObjectContext context = new CayenneContext(channel);</programlisting>
         <para>Note that the "channel" can be used to create as many peer ObjectContexts as needed
@@ -31,7 +31,7 @@ ObjectContext context = new CayenneConte
             connection (or channel, or context).</para>
         <para>So now let's do the same persistent operaions that we did in the first tutorial "Main"
             class. Let's start by creating and saving some objects:</para>
-        <programlisting>// creating new Artist
+        <programlisting language="java">// creating new Artist
 Artist picasso = context.newObject(Artist.class);
 picasso.setName("Pablo Picasso");
 
@@ -55,7 +55,7 @@ stein.setGallery(metropolitan);
 // saving all the changes above
 context.commitChanges();</programlisting>
         <para>Now let's select them back:</para>
-        <programlisting>// SelectQuery examples
+        <programlisting language="java">// SelectQuery examples
 SelectQuery select1 = new SelectQuery(Painting.class);
 List&lt;Painting&gt; paintings1 = context.performQuery(select1);
 
@@ -64,7 +64,7 @@ Expression qualifier2 = ExpressionFactor
 SelectQuery select2 = new SelectQuery(Painting.class, qualifier2);
 List&lt;Painting&gt; paintings2 = context.performQuery(select2);</programlisting>
         <para>Now, delete:</para>
-        <programlisting>Expression qualifier = ExpressionFactory.matchExp(Artist.NAME_PROPERTY,
+        <programlisting language="java">Expression qualifier = ExpressionFactory.matchExp(Artist.NAME_PROPERTY,
                 "Pablo Picasso");
 SelectQuery selectToDelete = new SelectQuery(Artist.class, qualifier);
 Artist picasso = (Artist) DataObjectUtils.objectForQuery(context,

Modified: cayenne/main/branches/STABLE-3.1/docs/docbook/getting-started/src/docbkx/delete.xml
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-3.1/docs/docbook/getting-started/src/docbkx/delete.xml?rev=1424360&r1=1424359&r2=1424360&view=diff
==============================================================================
--- cayenne/main/branches/STABLE-3.1/docs/docbook/getting-started/src/docbkx/delete.xml (original)
+++ cayenne/main/branches/STABLE-3.1/docs/docbook/getting-started/src/docbkx/delete.xml Thu Dec 20 08:07:42 2012
@@ -37,11 +37,11 @@
             more common way in Cayenne (or ORM in general) is to get a hold of the object first, and
             then delete it via the context. Let's use utility class Cayenne to find an
             artist:</para>
-        <programlisting>Expression qualifier = ExpressionFactory.matchExp(Artist.NAME_PROPERTY, "Pablo Picasso");
+        <programlisting language="java">Expression qualifier = ExpressionFactory.matchExp(Artist.NAME_PROPERTY, "Pablo Picasso");
 SelectQuery select = new SelectQuery(Artist.class, qualifier);
 Artist picasso = (Artist) Cayenne.objectForQuery(context, select);</programlisting>
         <para>Now let's delete the artist:</para>
-        <programlisting>if (picasso != null) {
+        <programlisting language="java">if (picasso != null) {
     context.deleteObject(picasso);
     context.commitChanges();
 }</programlisting>

Modified: cayenne/main/branches/STABLE-3.1/docs/docbook/getting-started/src/docbkx/object-context.xml
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-3.1/docs/docbook/getting-started/src/docbkx/object-context.xml?rev=1424360&r1=1424359&r2=1424360&view=diff
==============================================================================
--- cayenne/main/branches/STABLE-3.1/docs/docbook/getting-started/src/docbkx/object-context.xml (original)
+++ cayenne/main/branches/STABLE-3.1/docs/docbook/getting-started/src/docbkx/object-context.xml Thu Dec 20 08:07:42 2012
@@ -14,7 +14,7 @@
             </listitem>
             <listitem>
                 <para>Create a standard "main" method to make it a runnable
-                    class:<programlisting>package org.example.cayenne;
+                    class:<programlisting language="java">package org.example.cayenne;
 
 public class Main {
 
@@ -27,7 +27,7 @@ public class Main {
                 <para>The first thing you need to be able to access the database is to create a
                     ServerRuntime object (which is essentially a wrapper around Cayenne stack) and
                     use it to obtain an instance of an
-                    ObjectContext.<programlisting>package org.example.cayenne;
+                    ObjectContext.<programlisting language="java">package org.example.cayenne;
 
 import org.apache.cayenne.ObjectContext;
 import org.apache.cayenne.configuration.server.ServerRuntime;

Modified: cayenne/main/branches/STABLE-3.1/docs/docbook/getting-started/src/docbkx/persistent-objects.xml
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-3.1/docs/docbook/getting-started/src/docbkx/persistent-objects.xml?rev=1424360&r1=1424359&r2=1424360&view=diff
==============================================================================
--- cayenne/main/branches/STABLE-3.1/docs/docbook/getting-started/src/docbkx/persistent-objects.xml (original)
+++ cayenne/main/branches/STABLE-3.1/docs/docbook/getting-started/src/docbkx/persistent-objects.xml Thu Dec 20 08:07:42 2012
@@ -18,7 +18,7 @@
         <para>Let's for instance add a utility method to the Artist class that sets Artist date of
             birth, taking a string argument for the date. It will be preserved even if the model
             changes later:</para>
-        <programlisting>package org.example.cayenne.persistent;
+        <programlisting language="java">package org.example.cayenne.persistent;
 
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
@@ -60,13 +60,13 @@ public class Artist extends _Artist {
                 role="bold">must</emphasis> be registered with DataContext to be persisted and to
             allow setting relationships with other objects. Add this code to the "main" method of
             the Main class:</para>
-        <programlisting>Artist picasso = context.newObject(Artist.class);
+        <programlisting language="java">Artist picasso = context.newObject(Artist.class);
 picasso.setName("Pablo Picasso");
 picasso.setDateOfBirthString("18811025");</programlisting>
         <para>Note that at this point "picasso" object is only stored in memory and is not saved in
             the database. Let's continue by adding a Metropolitan Museum "Gallery" object and a few
             Picasso "Paintings":</para>
-        <programlisting>Gallery metropolitan = context.newObject(Gallery.class);
+        <programlisting language="java">Gallery metropolitan = context.newObject(Gallery.class);
 metropolitan.setName("Metropolitan Museum of Art"); 
 
 Painting girl = context.newObject(Painting.class);
@@ -78,13 +78,13 @@ stein.setName("Gertrude Stein");</progra
             case below relationships are automatically estabslished in both directions (e.g.
             picasso.addToPaintings(girl) has exactly the same effect as
             girl.setToArtist(picasso)).</para>
-        <programlisting>picasso.addToPaintings(girl);
+        <programlisting language="java">picasso.addToPaintings(girl);
 picasso.addToPaintings(stein);
         
 girl.setGallery(metropolitan);
 stein.setGallery(metropolitan);</programlisting>
         <para>Now lets save all five new objects, in a single method call:</para>
-        <programlisting>context.commitChanges();</programlisting>
+        <programlisting language="java">context.commitChanges();</programlisting>
         <para>Now you can run the application again as described in the previous chapter. The new
             output will show a few actual DB operations:</para>
         <programlisting>org.apache.cayenne.configuration.XMLDataChannelDescriptorLoader load

Modified: cayenne/main/branches/STABLE-3.1/docs/docbook/getting-started/src/docbkx/select-query.xml
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-3.1/docs/docbook/getting-started/src/docbkx/select-query.xml?rev=1424360&r1=1424359&r2=1424360&view=diff
==============================================================================
--- cayenne/main/branches/STABLE-3.1/docs/docbook/getting-started/src/docbkx/select-query.xml (original)
+++ cayenne/main/branches/STABLE-3.1/docs/docbook/getting-started/src/docbkx/select-query.xml Thu Dec 20 08:07:42 2012
@@ -16,7 +16,7 @@
                 <para>Select all paintings (the code, and the log output it generates):</para>
             </listitem>
         </itemizedlist>
-        <programlisting>SelectQuery select1 = new SelectQuery(Painting.class);
+        <programlisting language="java">SelectQuery select1 = new SelectQuery(Painting.class);
 List paintings1 = context.performQuery(select1);</programlisting>
         <programlisting>INFO: SELECT t0.GALLERY_ID, t0.ARTIST_ID, t0.NAME, t0.ID FROM PAINTING t0
 INFO: === returned 2 rows. - took 18 ms.</programlisting>
@@ -25,7 +25,7 @@ INFO: === returned 2 rows. - took 18 ms.
                 <para>Select paintings that start with "gi", ignoring case:</para>
             </listitem>
         </itemizedlist>
-        <programlisting>Expression qualifier2 = ExpressionFactory.likeIgnoreCaseExp(
+        <programlisting language="java">Expression qualifier2 = ExpressionFactory.likeIgnoreCaseExp(
                 Painting.NAME_PROPERTY,
                 "gi%");
 SelectQuery select2 = new SelectQuery(Painting.class, qualifier2);
@@ -40,7 +40,7 @@ INFO: === returned 1 row. - took 18 ms.<
                     ExpressionFactory):</para>
             </listitem>
         </itemizedlist>
-        <programlisting>Calendar c = new GregorianCalendar();
+        <programlisting language="java">Calendar c = new GregorianCalendar();
 c.set(c.get(Calendar.YEAR) - 100, 0, 1, 0, 0, 0);
 
 Expression qualifier3 = Expression.fromString("artist.dateOfBirth &lt; $date");

Modified: cayenne/main/branches/STABLE-3.1/docs/docbook/stylesheets/common-customizations.xsl
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-3.1/docs/docbook/stylesheets/common-customizations.xsl?rev=1424360&r1=1424359&r2=1424360&view=diff
==============================================================================
--- cayenne/main/branches/STABLE-3.1/docs/docbook/stylesheets/common-customizations.xsl (original)
+++ cayenne/main/branches/STABLE-3.1/docs/docbook/stylesheets/common-customizations.xsl Thu Dec 20 08:07:42 2012
@@ -21,7 +21,9 @@
 
 	<!-- The next line is needed to work with maven injecting the docbook stylesheets -->
 	<xsl:import href="urn:docbkx:stylesheet" />
-	<xsl:import href="urn:docbkx:stylesheet/highlight.xsl"/> 
+	<!-- <xsl:import href="urn:docbkx:stylesheet/highlight.xsl"/> -->
+
+    <xsl:import href="highlight.xsl" />
 
 	<xsl:param name="keep.relative.image.uris" select="1"/>
 	<xsl:param name="toc.section.depth">1</xsl:param>

Added: cayenne/main/branches/STABLE-3.1/docs/docbook/stylesheets/highlight.xsl
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-3.1/docs/docbook/stylesheets/highlight.xsl?rev=1424360&view=auto
==============================================================================
--- cayenne/main/branches/STABLE-3.1/docs/docbook/stylesheets/highlight.xsl (added)
+++ cayenne/main/branches/STABLE-3.1/docs/docbook/stylesheets/highlight.xsl Thu Dec 20 08:07:42 2012
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--This file was created automatically by html2xhtml-->
+<!--from the HTML stylesheets.-->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:d="http://docbook.org/ns/docbook"
+                xmlns:xslthl="http://xslthl.sf.net" xmlns="http://www.w3.org/1999/xhtml" exclude-result-prefixes="xslthl d" version="1.0">
+
+    <xsl:import href="urn:docbkx:stylesheet/highlight.xsl"/>
+    <!-- ********************************************************************
+   $Id: highlight.xsl 8911 2010-09-28 17:02:06Z abdelazer $
+   ********************************************************************
+
+   This file is part of the XSL DocBook Stylesheet distribution.
+   See ../README or http://docbook.sf.net/release/xsl/current/ for
+   and other information.
+
+   ******************************************************************** -->
+    <!-- <xsl:import href="urn:/highlighting/common.xsl"/> -->
+    <xsl:template match="xslthl:keyword" mode="xslthl">
+        <span class="hl-keyword">
+            <xsl:apply-templates mode="xslthl"/>
+        </span>
+    </xsl:template>
+    <xsl:template match="xslthl:string" mode="xslthl">
+        <span class="hl-string">
+            <xsl:apply-templates mode="xslthl"/>
+        </span>
+    </xsl:template>
+    <xsl:template match="xslthl:comment" mode="xslthl">
+        <span class="hl-comment">
+            <xsl:apply-templates mode="xslthl"/>
+        </span>
+    </xsl:template>
+    <xsl:template match="xslthl:directive" mode="xslthl">
+        <span class="hl-directive">
+            <xsl:apply-templates mode="xslthl"/>
+        </span>
+    </xsl:template>
+    <xsl:template match="xslthl:tag" mode="xslthl">
+        <span class="hl-tag">
+            <xsl:apply-templates mode="xslthl"/>
+        </span>
+    </xsl:template>
+    <xsl:template match="xslthl:attribute" mode="xslthl">
+        <span class="hl-attribute">
+            <xsl:apply-templates mode="xslthl"/>
+        </span>
+    </xsl:template>
+    <xsl:template match="xslthl:value" mode="xslthl">
+        <span class="hl-value">
+            <xsl:apply-templates mode="xslthl"/>
+        </span>
+    </xsl:template>
+    <xsl:template match="xslthl:html" mode="xslthl">
+        <strong>
+            <span>
+                <xsl:apply-templates mode="xslthl"/>
+            </span>
+        </strong>
+    </xsl:template>
+    <xsl:template match="xslthl:xslt" mode="xslthl">
+        <span>
+            <xsl:apply-templates mode="xslthl"/>
+        </span>
+    </xsl:template>
+    <!-- Not emitted since XSLTHL 2.0 -->
+    <xsl:template match="xslthl:section" mode="xslthl">
+        <span>
+            <xsl:apply-templates mode="xslthl"/>
+        </span>
+    </xsl:template>
+    <xsl:template match="xslthl:number" mode="xslthl">
+        <span class="hl-number">
+            <xsl:apply-templates mode="xslthl"/>
+        </span>
+    </xsl:template>
+    <xsl:template match="xslthl:annotation" mode="xslthl">
+        <span class="hl-annotation">
+            <xsl:apply-templates mode="xslthl"/>
+        </span>
+    </xsl:template>
+    <!-- Not sure which element will be in final XSLTHL 2.0 -->
+    <xsl:template match="xslthl:doccomment|xslthl:doctype" mode="xslthl">
+        <strong class="hl-tag">
+            <xsl:apply-templates mode="xslthl"/>
+        </strong>
+    </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file

Modified: cayenne/main/branches/STABLE-3.1/docs/docbook/stylesheets/html.xsl
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-3.1/docs/docbook/stylesheets/html.xsl?rev=1424360&r1=1424359&r2=1424360&view=diff
==============================================================================
--- cayenne/main/branches/STABLE-3.1/docs/docbook/stylesheets/html.xsl (original)
+++ cayenne/main/branches/STABLE-3.1/docs/docbook/stylesheets/html.xsl Thu Dec 20 08:07:42 2012
@@ -15,22 +15,29 @@
 	"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 	KIND, either express or implied.  See the License for the
 	specific language governing permissions and limitations
-	under the License.   
+	under the License.
 -->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 
-  <xsl:include href="common-customizations.xsl"/>
+        version="1.0">
+    <!--  xmlns:xslthl="http://xslthl.sf.net"
+        exclude-result-prefixes="xslthl" -->
+    <xsl:include href="common-customizations.xsl"/>
 
-  <xsl:param name="html.stylesheet" select="'css/cayenne-doc.css'"/>
-  <xsl:param name="chunker.output.encoding">UTF-8</xsl:param>
+    <!--<xsl:param name="highlight.source" select="1"/>-->
+    <xsl:param name="html.stylesheet" select="'css/cayenne-doc.css'"/>
+    <xsl:param name="chunker.output.encoding">UTF-8</xsl:param>
+
+    <!-- Only chapters start a new page -->
+    <xsl:param name="chunk.section.depth">0</xsl:param>
+
+    <!-- Don't add any embedded styles -->
+    <xsl:param name="css.decoration">0</xsl:param>
+
+    <xsl:param name="ignore.image.scaling">1</xsl:param>
+
+    <xsl:param name="use.id.as.filename">1</xsl:param>
 
-  <!-- Only chapters start a new page -->
-  <xsl:param name="chunk.section.depth">0</xsl:param>
 
-  <!-- Don't add any embedded styles -->
-  <xsl:param name="css.decoration">0</xsl:param>
-  
-  <xsl:param name="ignore.image.scaling">1</xsl:param>
 
-  <xsl:param name="use.id.as.filename">1</xsl:param>
 </xsl:stylesheet>

Modified: cayenne/main/branches/STABLE-3.1/docs/docbook/upgrade-guide/src/docbkx/new-features.xml
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-3.1/docs/docbook/upgrade-guide/src/docbkx/new-features.xml?rev=1424360&r1=1424359&r2=1424360&view=diff
==============================================================================
--- cayenne/main/branches/STABLE-3.1/docs/docbook/upgrade-guide/src/docbkx/new-features.xml (original)
+++ cayenne/main/branches/STABLE-3.1/docs/docbook/upgrade-guide/src/docbkx/new-features.xml Thu Dec 20 08:07:42 2012
@@ -64,7 +64,7 @@
         <section>
             <title>Bootstrapping Cayenne in Various Environments</title>
             <para> Here is a simple example of starting a server-side Cayenne stack:</para>
-            <programlisting>ServerRuntime runtime = new ServerRuntime("cayenne-UntitledDomain.xml");</programlisting>
+            <programlisting language="java">ServerRuntime runtime = new ServerRuntime("cayenne-UntitledDomain.xml");</programlisting>
             <para>For more detailed examples check the tutorials and other documentation.</para>
         </section>
         <section>
@@ -95,7 +95,7 @@
                 scale well to complex applications, and 3.0 API for mapping the listeners is hard to
                 use. In 3.1 you can annotate listener methods and register multiple callback methods
                 with a single call. </para>
-            <programlisting>// declare a listener with annotated methods
+            <programlisting language="java">// declare a listener with annotated methods
 class MyListener {
     @PostLoad(Entity1.class)
     @PostPersist(Entity1.class)
@@ -111,7 +111,7 @@ runtime.getChannel().getEntityResolver()
             <para>Moreover, unlike JPA annotations, Cayenne allows to attach a listener to a set of
                 entities not known to the listener upfront, but that are all annotated with some
                 custom annotation:</para>
-            <programlisting>class MyListener {
+            <programlisting language="java">class MyListener {
     @PostLoad(entityAnnotations = CustomAnnotation.class)
     void postLoad(Object object) {
         ....
@@ -126,7 +126,7 @@ runtime.getChannel().getEntityResolver()
                 Filters are widely used by "cayenne-lifecyle" extensions and allow to build powerful
                 custom object lifecycle-aware code. To install a filter, the following API is
                 used:</para>
-            <programlisting>class MyFilter implement DataChannelFilter { .. }
+            <programlisting language="java">class MyFilter implement DataChannelFilter { .. }
 
 MyFilter filter = new MyFilter();
 ServerRuntime runtime = ..
@@ -135,7 +135,7 @@ runtime.getDataDomain().addFilter(filter
                 that certain operations can be triggered by Cayenne inside the scope of filter's
                 onQuery() or onSync() methods. To ensure annotated methods are invoked, filter
                 registration should be combined with listener registration:</para>
-            <programlisting>MyFilter filter = new MyFilter();
+            <programlisting language="java">MyFilter filter = new MyFilter();
 ServerRuntime runtime = ..
 runtime.getDataDomain().addFilter(filter);
 runtime.getDataDomain().getEntityResolver().getCallbackRegistry().addListener(filter);



Mime
View raw message