cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject cayenne git commit: reset 4.1 upgrade guide
Date Sat, 14 Oct 2017 14:24:23 GMT
Repository: cayenne
Updated Branches:
  refs/heads/master 0691651e6 -> 8f2435671


reset 4.1 upgrade guide


Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo
Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/8f243567
Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/8f243567
Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/8f243567

Branch: refs/heads/master
Commit: 8f2435671d91528b73a121e3c627b8111fc0012e
Parents: 0691651
Author: Andrus Adamchik <andrus@objectstyle.com>
Authored: Sat Oct 14 17:24:17 2017 +0300
Committer: Andrus Adamchik <andrus@objectstyle.com>
Committed: Sat Oct 14 17:24:17 2017 +0300

----------------------------------------------------------------------
 docs/docbook/upgrade-guide/src/docbkx/index.xml |   2 +-
 .../upgrade-guide/src/docbkx/new-features.xml   | 219 +------------------
 2 files changed, 4 insertions(+), 217 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/8f243567/docs/docbook/upgrade-guide/src/docbkx/index.xml
----------------------------------------------------------------------
diff --git a/docs/docbook/upgrade-guide/src/docbkx/index.xml b/docs/docbook/upgrade-guide/src/docbkx/index.xml
index 91b0609..e9fd95c 100644
--- a/docs/docbook/upgrade-guide/src/docbkx/index.xml
+++ b/docs/docbook/upgrade-guide/src/docbkx/index.xml
@@ -2,7 +2,7 @@
 <book xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"
version="5.0"
     xml:id="upgrade-guide" xmlns:xi="http://www.w3.org/2001/XInclude">
     <info>
-        <title>Cayenne 4.0 New Features and Upgrade Guide</title>
+        <title>Cayenne 4.1 New Features and Upgrade Guide</title>
         <copyright>
             <year>2011-<?dbtimestamp format="Y"?></year>
             <holder>Apache Software Foundation and individual authors</holder>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/8f243567/docs/docbook/upgrade-guide/src/docbkx/new-features.xml
----------------------------------------------------------------------
diff --git a/docs/docbook/upgrade-guide/src/docbkx/new-features.xml b/docs/docbook/upgrade-guide/src/docbkx/new-features.xml
index 6481ae3..78741c9 100644
--- a/docs/docbook/upgrade-guide/src/docbkx/new-features.xml
+++ b/docs/docbook/upgrade-guide/src/docbkx/new-features.xml
@@ -17,222 +17,9 @@
 <article xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"
version="5.0"
 		 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 		 xsi:schemaLocation="http://docbook.org/ns/docbook http://docbook.org/xml/5.0/xsd/docbook.xsd">
-	<title>Guide to 4.0 Features</title>
+	<title>Guide to 4.1 Features</title>
 	<para>This guide highlights the new features and changes introduced in Apache Cayenne
4.0. For a full list of changes consult
 		RELEASE-NOTES.txt included in Cayenne download. For release-specific upgrade instructions
check UPGRADE.txt.</para>
-	<section xml:id="java-version">
-		<title>Java Version</title>
-		<para>Minimum required JDK version is 1.7 or newer. Cayenne 4.0 is fully tested with
Java 1.7,
-			1.8. </para>
-		<para>The examples below often use Java 8 syntax. But those same examples should
work without lambdas just as well.</para>
-	</section>
-	<section xml:id="cayenne-configuration">
-		<title>Cayenne Configuration</title>
-		<section>
-			<title>ServerRuntimeBuilder</title>
-			<para>Cayenne 3.1 introduced dependency injection and ServerRuntime. 4.0 provides
a very convenient utility to create a custom runtime
-				with various extensions. This reduces the code needed to integrate Cayenne in your environment
to just a few lines and no
-				boilerplate.
-				E.g.:<programlisting language="java">ServerRuntime runtime = ServerRuntime.builder("myproject")
-        .addConfigs("cayenne-project1.xml", "cayenne-project2.xml")
-        .addModule(binder -> binder.bind(JdbcEventLogger.class).toInstance(myLogger))
-        .dataSource(myDataSource)
-        .build();</programlisting></para>
-		</section>
-		<section>
-			<title>Mapping-free ServerRuntime</title>
-			<para>ServerRuntime can now be started without any ORM mapping at all. This is useful
in situations when Cayenne is used as a stack to
-				execute raw SQL, in unit tests, etc.</para>
-		</section>
-		<section>
-			<title>DI Container Decorators</title>
-			<para>In addition to overriding services in DI container, Cayenne now allows to
supply
-				decorators. True to the "smallest-footprint" DI philosophy, decorator approach is
-				very simple and does not require proxies or class enhancement. Just implement the
-				decorated interface and provide a constructor that takes a delegate instance being
-				decorated:
-				<programlisting language="java">public class MyInterfaceDecorator implements MyInterface
{
-
-    private MyInterface delegate;
-
-    public MockInterface1_Decorator3(@Inject MyInterface delegate) {
-        this.delegate = delegate;
-    }
-
-    @Override
-    public String getName() {
-        return "&lt;" + delegate.getName() + ">";
-    }
-}
-
-Module module = binder ->
-        binder.decorate(MyInterface.class).before(MyInterfaceDecorator.class);</programlisting>
-			</para>
-		</section>
-	</section>
-	<section xml:id="framework-api">
-		<title>Framework API</title>
-		<section>
-			<title>Fluent Query API</title>
-			<para>Fluent Query API is one of the most exciting new features in Cayenne 4.0.
This syntax is "chainable" so you can write query
-				assembly and execution code on one line. The most useful fluent queries are ObjectSelect,
SQLSelect and SelectById:</para>
-			<section>
-				<title>ObjectSelect</title>
-				<para>A "chainable" analog of SelectQuery.
-					<programlisting language="java">Artist a = ObjectSelect
-     .query(Artist.class)
-     .where(Artist.ARTIST_NAME.eq("Picasso"))
-     .selectOne(context);</programlisting></para>
-			</section>
-			<section>
-				<title>ColumnSelect</title>
-				<para>
-					This query allows you directly access individual properties of Objects and use functions
(including aggregate)
-					via type-safe API.
-					<programlisting language="java"><![CDATA[List<String> names = ObjectSelect
-	.columnQuery(Artist.class, Artist.ARTIST_NAME)
-	.where(Artist.ARTIST_NAME.length().gt(6))
-	.select(context);]]></programlisting>
-				</para>
-			</section>
-			<section>
-				<title>SQLSelect</title>
-				<para>A "chainable" analog of SQLTemplate used specifically to run selecting raw
-					SQL:<programlisting language="java">List&lt;Long> ids = SQLSelect
-     .scalarQuery(Long.class, "SELECT ARTIST_ID FROM ARTIST ORDER BY ARTIST_ID")
-     .select(context);</programlisting></para>
-			</section>
-			<section>
-				<title>SelectById</title>
-				<para>There's really no good analog of SelectById in Cayenne prior to 4.0. Previously
available ObjectIdQuery didn't support half of
-					the features of SelectById (e.g. caching consistent with other queries, prefetches,
etc.)
-					:<programlisting language="java">Artist a = SelectById
-     .query(Artist.class, 3)
-     .useLocalCache("g1")
-     .selectOne(context)</programlisting></para>
-			</section>
-		</section>
-		<section xml:id="objectcontext">
-			<title>ObjectContext</title>
-			<section>
-				<title>Callback-based Object Iterator</title>
-				<para>ObjectContext now features a simpler way to iterate over large result sets,
based on callback interface that can be
-					implemented with a
-					lambda:<programlisting language="java">SelectQuery&lt;Artist> q = new SelectQuery&lt;Artist>(Artist.class);
-
-context.iterate(q, (Artist a) -> {
-    // do something with the object...
-    ...
-});</programlisting></para>
-			</section>
-		</section>
-		<section>
-			<title>Generics in Expressions and Queries</title>
-			<para>We finished the work of "genericizing" Cayenne APIs started in 3.1. Now all
APIs dealing with persistent objects (Expressions,
-				Queries, ObjectContext, etc.) support generics of Persistent object type or attribute
property type.</para>
-		</section>
-		<section>
-			<title>Property API</title>
-			<para>Persistent superclasses (_MyEntity) now contain a set of static Property&lt;T>
variables generated from the model. These
-				metadata objects make possible to create type-safe Expressions and other query parts.</para>
-		</section>
-		<section>
-			<title>Positional Parameter Bindings </title>
-			<para>Expressions and SQLTemplate traditionally supported binding of parameters
by name as a map. Cayenne 4.0 introduces a very easy
-				form of positional bindings. It works with the same named template format, only parameters
are bound by position, left-to-right.
-				Here we showing a more complex example with the same parameter name being used more than
once in the
-				query:<programlisting language="java">// two distinct names, 3 positional parameters.
-// "price" is set to 23, "maxPrice" - to 50
-Expression e = ExpressionFactory.exp(
-     "price = $price or averagePrice = $price and maxPrice = $maxPrice", 23, 50);</programlisting>This
-				API is supported in Expressions, SQLTemplate as well as new SQLSelect and can be used
interchnageably with named parameters with a
-				single template flavor.</para>
-		</section>
-		<section>
-			<title>Improved Transaction API</title>
-			<para>Transaction factory is now setup via DI (instead of being configured in the
Modeler). There's a utility method on ServerRuntime
-				to perform multiple operations as one
-				transaction:<programlisting language="java">runtime.performInTransaction(() ->
{
-	// ... do some changes
-	context.commitChanges();
-
-	// ... do more changes
-	context.commitChanges();
-
-	return true;
-});</programlisting></para>
-		</section>
-		<section>
-			<title>Transparent Database Cryptography with "cayenne-crypto" Module</title>
-			<para>Cayenne includes a new module called "cayenne-crypto" that enables transparent
cryptography for designated data columns. This is
-				a pretty cool feature that allows to enable encryption/decryption of your sensitive data
pretty much declaratively using your
-				regular DB storage. Encrypted values can be stored in (VAR)BINARY and (VAR)CHAR columns.
Currently "cayenne-crypto" supports
-				AES/CBC/PKCS5Padding encryption (though other cyphers can be added). It also supports
encrypted data compression. Here is an example
-				of building a crypto DI module that can be added to
-				ServerRuntime:<programlisting language="java">Module cryptoExtensions = CryptoModule.extend()
-	.keyStore("file:///mykeystore", "keystorepassword".toCharArray(), "keyalias")
-	.compress()
-	.module();</programlisting></para>
-		</section>
-	</section>
-	<section xml:id="cayenne-modeler">
-		<title>CayenneModeler</title>
-		<section>
-			<title>Improved UI</title>
-			<para>CayenneModeler features a number of UI improvements. Attributes and relationships
are now edited in the same view (no need to
-				switch between the tabs). Project tree allows to easily filter elements by type and quickly
collapse the tree.</para>
-		</section>
-		<section>
-			<title>Dropped Support for Mapping Listeners</title>
-			<para>Managing listeners in the DataMap XML model is counterproductive and confusing,
so support for listeners was removed from both
-				the XML and the Modeler. If you previously had listeners mapped in the model, annotate
their callback methods, and perform listener
-				registration in the code: <programlisting language="java">runtime.getDataDomain().addListener(myListener);</programlisting>
-				or via DI: <programlisting language="java"><![CDATA[Module module = binder ->
ServerModule.contributeDomainListeners(myListener);]]></programlisting>
-				Entity callbacks on the other hand are managed in the Modeler as before.</para>
-		</section>
-	</section>
-	<section xml:id="build-tools">
-		<title>Build Tools</title>
-		<section>
-			<title>cdbimport</title>
-			<para>"cdbimport" has evolved from an experiment to a full-featured production tool
that significantly reduces (and sometimes
-				eliminates) the need for manual maintenance of the DataMaps in CayenneModeler. Two improvements
made this possible. First, smart
-				merge algorithm will ensure that custom changes to the model are not overridden on subsequent
runs of "cdbimport". Second, the
-				mechanism for specifing DB reverse-engineering parameters, such as name filtering, is
made much more powerful with many new options.
-				E.g. we started supporting filters by catalogs and schemas, table name filters can be
added per catalog/schema or at the top level,
-				etc.
-			</para>
-		</section>
-		<section>
-			<title>cgen</title>
-			<para>As was mentioned above, cgen now includes Property&lt;T> static variables
for expression building. It is also made smarter about
-				its defaults for "destDir" and "superPkg".</para>
-		</section>
-		<section>
-			<title>Gradle Plugin</title>
-			<para>
-				Cayenne now provides it's own Gradle Plugin that allows you easily integrate <code>cdbimport</code>
-				and <code>cgen</code> tools into your build process.
-				Here is example of it's usage:
-				<programlisting language="groovy">
-buildscript {
-    repositories {
-        mavenCentral()
-    }
-    dependencies {
-        classpath group: 'org.apache.cayenne.plugins', name: 'cayenne-gradle-plugin', version:
'<?eval ${project.version}?>'
-    }
-}
-
-apply plugin: 'org.apache.cayenne'
-
-cayenne.defaultDataMap 'datamap.map.xml'
-
-dependencies {
-    compile cayenne.dependency('server')
-    compile cayenne.dependency('java8')
-}</programlisting>
-			</para>
-		</section>
-	</section>
+	
+	<para>TODO</para>
 </article>


Mime
View raw message