You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by aa...@apache.org on 2014/11/30 16:23:54 UTC

cayenne git commit: 4.0.M2 docs

Repository: cayenne
Updated Branches:
  refs/heads/master 4cca7a8b0 -> 32e5d9f90


4.0.M2 docs


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

Branch: refs/heads/master
Commit: 32e5d9f90ffbf5557dd29058b175580b396a29b6
Parents: 4cca7a8
Author: aadamchik <aa...@apache.org>
Authored: Sun Nov 30 16:07:31 2014 +0300
Committer: aadamchik <aa...@apache.org>
Committed: Sun Nov 30 18:22:00 2014 +0300

----------------------------------------------------------------------
 .../upgrade-guide/src/docbkx/new-features.xml   | 62 +++++++++++++++++++-
 1 file changed, 60 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/32e5d9f9/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 5826d51..fc8f711 100644
--- a/docs/docbook/upgrade-guide/src/docbkx/new-features.xml
+++ b/docs/docbook/upgrade-guide/src/docbkx/new-features.xml
@@ -23,7 +23,9 @@
     <section xml:id="java-version">
         <title>Java Version</title>
         <para>Minimal required JDK verision is 1.6 or newer. Cayenne 4.0 is fully tested with Java
-            1.6,  1.7, 1.8.</para>
+            1.6, 1.7, 1.8. </para>
+        <para>The examples below often use Java 8 syntax. But those same examples should work
+            withour lambdas just as well.</para>
     </section>
     <section xml:id="cayenne-configuration">
         <title>Cayenne Configuration</title>
@@ -39,6 +41,12 @@
         .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
+                e.g. in situations when Cayenne is used as a stack to execute raw SQL, in unit
+                tests, etc.</para>
+        </section>
     </section>
     <section xml:id="framework-api">
         <title>Framework API</title>
@@ -90,6 +98,47 @@
                 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 always 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 left-to-right,
+                disregarding the
+                names:<programlisting>// two distinct names, 3 positional parameters
+Expression e = ExpressionFactory.exp(
+     "price = $price or averagePrice = $price and maxPrice = $maxPrice", 23, 25, 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>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>Module cryptoExtensions = new CryptoModuleBuilder()
+	.keyStore("file:///mykeystore", "keystorepassword".toCharArray(), "keyalias")
+	.compress()
+	.build();</programlisting></para>
+        </section>
     </section>
     <section xml:id="cayenne-modeler">
         <title>CayenneModeler</title>
@@ -113,7 +162,16 @@
         <title>Build Tools</title>
         <section>
             <title>cdbimport</title>
-            <para>"cdbimport" has evolved from </para>
+            <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. The two improvements made it possible. First, smart
+                merge algorithm that will ensure that custom chnages 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. Also
+                configuration can be "inlined" in a Maven pom.xml or specified as a separate
+                file.</para>
         </section>
         <section>
             <title>cgen</title>