Added: websites/staging/cayenne/trunk/content/docs/4.0/cayenne-guide/ext-jcache.html ============================================================================== --- websites/staging/cayenne/trunk/content/docs/4.0/cayenne-guide/ext-jcache.html (added) +++ websites/staging/cayenne/trunk/content/docs/4.0/cayenne-guide/ext-jcache.html Fri Oct 6 07:49:44 2017 @@ -0,0 +1,26 @@ + + + Chapter 28. JCache integration

Chapter 28. JCache integration

Table of Contents

Description
Including in a project
Usage

Description

This module allows to integrate any JCache (JSR 107) compatible caching provider with Cayenne.

Including in a project

Maven

+

<dependency>
+    <groupId>org.apache.cayenne</groupId>
+    <artifactId>cayenne-jcache</artifactId>
+    <version>4.0.B2</version>
+</dependency>

+

Gradle

+

compile 'org.apache.cayenne:cayenne-jcache:4.0.B2'

+

Usage

+ To use JCache provider in your app you need to include this module and caching provider libs (e.g. Ehcache). + You can provide own implementation of org.apache.cayenne.jcache.JCacheConfigurationFactory + to customize cache configuration if required. +

+ For advanced configuration and management please use provider specific options and tools. +

Note

You can read about using cache in Cayenne in this chapter.

You may else be interested in cache invalidation extension.

\ No newline at end of file Added: websites/staging/cayenne/trunk/content/docs/4.0/cayenne-guide/ext-joda.html ============================================================================== --- websites/staging/cayenne/trunk/content/docs/4.0/cayenne-guide/ext-joda.html (added) +++ websites/staging/cayenne/trunk/content/docs/4.0/cayenne-guide/ext-joda.html Fri Oct 6 07:49:44 2017 @@ -0,0 +1,23 @@ + + + Chapter 29. Joda time extension

Chapter 29. Joda time extension

Table of Contents

Description
Including in a project
Usage

Description

Joda time module allows to use org.joda.time.LocalTime, org.joda.time.LocalDate, + org.joda.time.LocalDateTime and org.joda.time.DateTime types for entity attributes

Including in a project

Maven

+

<dependency>
+    <groupId>org.apache.cayenne</groupId>
+    <artifactId>cayenne-joda</artifactId>
+    <version>4.0.B2</version>
+</dependency>

+

Gradle

+

compile 'org.apache.cayenne:cayenne-joda:4.0.B2'

+

Usage

+ This module doesn't require any additional setup, you can just use new data types in your model. +

\ No newline at end of file Added: websites/staging/cayenne/trunk/content/docs/4.0/cayenne-guide/images/ext-crypto-obj-entity.png ============================================================================== Binary file - no diff available. Propchange: websites/staging/cayenne/trunk/content/docs/4.0/cayenne-guide/images/ext-crypto-obj-entity.png ------------------------------------------------------------------------------ svn:mime-type = image/png Added: websites/staging/cayenne/trunk/content/docs/4.0/cayenne-guide/images/ext-dbcp-setup.png ============================================================================== Binary file - no diff available. Propchange: websites/staging/cayenne/trunk/content/docs/4.0/cayenne-guide/images/ext-dbcp-setup.png ------------------------------------------------------------------------------ svn:mime-type = image/png Modified: websites/staging/cayenne/trunk/content/docs/4.0/cayenne-guide/implementing-rop-client.html ============================================================================== --- websites/staging/cayenne/trunk/content/docs/4.0/cayenne-guide/implementing-rop-client.html (original) +++ websites/staging/cayenne/trunk/content/docs/4.0/cayenne-guide/implementing-rop-client.html Fri Oct 6 07:49:44 2017 @@ -9,4 +9,4 @@ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); -

Chapter 16. Implementing ROP Client

\ No newline at end of file +

Chapter 16. Implementing ROP Client

\ No newline at end of file Modified: websites/staging/cayenne/trunk/content/docs/4.0/cayenne-guide/implementing-rop-server.html ============================================================================== --- websites/staging/cayenne/trunk/content/docs/4.0/cayenne-guide/implementing-rop-server.html (original) +++ websites/staging/cayenne/trunk/content/docs/4.0/cayenne-guide/implementing-rop-server.html Fri Oct 6 07:49:44 2017 @@ -9,4 +9,4 @@ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); -

Chapter 15. Implementing ROP Server

\ No newline at end of file +

Chapter 15. Implementing ROP Server

\ No newline at end of file Modified: websites/staging/cayenne/trunk/content/docs/4.0/cayenne-guide/including-cayenne-in-project.html ============================================================================== --- websites/staging/cayenne/trunk/content/docs/4.0/cayenne-guide/including-cayenne-in-project.html (original) +++ websites/staging/cayenne/trunk/content/docs/4.0/cayenne-guide/including-cayenne-in-project.html Fri Oct 6 07:49:44 2017 @@ -9,16 +9,16 @@ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); -

Chapter 4. Including Cayenne in a Project

Table of Contents

Jar Files
Dependencies
Maven Projects
Gradle Projects
Ant Projects

Jar Files

This is an overview of Cayenne jars that is agnostic of the build tool used. The +

Chapter 4. Including Cayenne in a Project

Jar Files

This is an overview of Cayenne jars that is agnostic of the build tool used. The following are the important libraries:

-

  • cayenne-di-4.0.B1.jar - Cayenne +

    • cayenne-di-4.0.B2.jar - Cayenne dependency injection (DI) container library. All applications will require - this file.

    • cayenne-server-4.0.B1.jar - contains + this file.

    • cayenne-server-4.0.B2.jar - contains main Cayenne runtime (adapters, DB access classes, etc.). Most applications - will require this file.

    • cayenne-client-4.0.B1.jar - a + will require this file.

    • cayenne-client-4.0.B2.jar - a client-side runtime for ROP applications.

    • Other cayenne-* jars - various Cayenne tools extensions.

    -

Dependencies

With modern build tools like Maven and Gradle, you should not worry about tracking +

Dependencies

With modern build tools like Maven and Gradle, you should not worry about tracking dependencies. If you have one of those, you can skip this section and go straight to the Maven section below. However if your environment requires manual dependency resolution (like Ant), the distribution provides all of Cayenne jars plus a minimal set of @@ -31,7 +31,7 @@ POM:

<dependency>
    <groupId>org.apache.cayenne</groupId>
    <artifactId>cayenne-server</artifactId>
-   <version>4.0.B1</version>
+   <version>4.0.B2</version>
 </dependency>

Additionally Cayenne provides a Maven plugin with a set of goals to perform various project tasks, such as synching generated Java classes with the mapping, described in the following subsection. The full plugin name is @@ -56,7 +56,7 @@ generation. E.g. ${project.basedir}/src/main/resources/my.map.xml


-

Table 4.2. cgen optional parameters

+

Table 4.2. cgen optional parameters

@@ -162,7 +162,7 @@ package:

<plugin>
     <groupId>org.apache.cayenne.plugins</groupId>
     <artifactId>cayenne-maven-plugin</artifactId>
-    <version>4.0.B1</version>
+    <version>4.0.B2</version>
 
     <configuration>
         <map>${project.basedir}/src/main/resources/my.map.xml</map>
@@ -196,7 +196,7 @@
                             
Name Type DescriptionAn object that contains Data Source parameters


-

Table 4.4. <dataSource> parameters

+

Table 4.4. <dataSource> parameters

@@ -223,7 +223,7 @@
Name Type RequiredDatabase user password.


-

Table 4.5. cdbgen optional parameters

+

Table 4.5. cdbgen optional parameters

@@ -263,7 +263,7 @@ database:

<plugin>
     <groupId>org.apache.cayenne.plugins</groupId>
     <artifactId>cayenne-maven-plugin</artifactId>
-    <version>4.0.B1</version>
+    <version>4.0.B2</version>
     <executions>
         <execution>
             <configuration>
@@ -327,7 +327,7 @@
                                 be processed. For full information about this parameter see "DB-First Flow" chapter.
                         
Name Type Description


-

Table 4.7. <dataSource> parameters

+

Table 4.7. <dataSource> parameters

@@ -354,7 +354,7 @@
Name Type RequiredDatabase user password.


-

Table 4.8. <dbimport> parameters

+

Table 4.8. <dbimport> parameters

@@ -450,7 +450,7 @@ :

<plugin>
     <groupId>org.apache.cayenne.plugins</groupId>
     <artifactId>cayenne-maven-plugin</artifactId>
-    <version>4.0.B1</version>
+    <version>4.0.B2</version>
 
     <executions>
         <execution>
@@ -474,7 +474,7 @@
             To include Cayenne into your Gradle project you have two options:
             

  • Simply add Cayenne as a dependency: -

    compile 'org.apache.cayenne:cayenne-server:4.0.B1'

    +

    compile 'org.apache.cayenne:cayenne-server:4.0.B2'

  • Or you can use Cayenne Gradle plugin

Gradle Plugin

Cayenne Gradle plugin provides several tasks, such as synching generated Java classes with the mapping @@ -489,7 +489,7 @@ buildscript { } // add Cayenne Gradle Plugin dependencies { - classpath group: 'org.apache.cayenne.plugins', name: 'cayenne-gradle-plugin', version: '4.0.B1' + classpath group: 'org.apache.cayenne.plugins', name: 'cayenne-gradle-plugin', version: '4.0.B2' } } @@ -509,7 +509,7 @@ dependencies {

Warning

Cayenne Gradle plugin is experimental and it's API can change later.

-

cgen

+

cgen

Cgen task generates Java classes based on your DataMap, it has same configuration parameters as in Maven Plugin version, described in Table 4.1, “cgen required parameters”. @@ -530,7 +530,7 @@ cgen { task clientCgen(type: cayenne.cgen) { client = true }

-

cdbimport

+

cdbimport

This task is for creating and synchronizing your Cayenne model from database schema. Full list of parameters are same as in Maven Plugin version, described in Table 4.6, “cdbimport parameters”, with exception that Gradle version will use Groovy instead @@ -592,7 +592,7 @@ cdbimport { tableTypes 'TABLE', 'VIEW' } }

-

cdbgen

+

cdbgen

Cdbgen task drops and/or generates tables in a database on Cayenne DataMap. Full list of parameters are same as in Maven Plugin version, described in Table 4.3, “cdbgen required parameters” @@ -617,7 +617,7 @@ cdbgen { createPk true createFk true }

-

Link tasks to Gradle build lifecycle

+

Link tasks to Gradle build lifecycle

With gradle you can easily connect Cayenne tasks to default build lifecycle. Here is short example of how to connect defaut cgen and cdbimport tasks with compileJava task: Modified: websites/staging/cayenne/trunk/content/docs/4.0/cayenne-guide/index.html ============================================================================== --- websites/staging/cayenne/trunk/content/docs/4.0/cayenne-guide/index.html (original) +++ websites/staging/cayenne/trunk/content/docs/4.0/cayenne-guide/index.html Fri Oct 6 07:49:44 2017 @@ -9,7 +9,7 @@ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); -

Name Type Description
v.4.0 (4.0.B1)Cayenne Guide
   Next

Cayenne Guide

License

Licensed to the Apache Software Foundation (ASF) under one or more contributor +

Cayenne Guide

License

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in @@ -17,4 +17,4 @@ http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "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.


Table of Contents

I. Object Relational Mapping with Cayenne
1. Setup
System Requirements
Running CayenneModeler
2. Cayenne Mapping Structure
Cayenne Project
DataMap
DataNode
DbEntity
ObjEntity
Embeddable
Procedure
Query
3. CayenneModeler Application
Working with Mapping Projects
Reverse Engineering Database
Generating Database Schema
Migrations
Generating Java Classes
Modeling Inheritance
Modeling Generic Persistent Classes
Mapping ObjAttributes to Custom Classes
Modeling Primary Key Generation Strategy
II. Cayenne Framework
4. Including Cayenne in a Project
Jar Files
Dependencies
Maven Projects
Gradle Projects
Ant Projects
5. Starting Cayenne
Starting and Stopping ServerRuntime
Merging Multiple Projects
Web Applications
6. Persistent Objects and ObjectContext
ObjectContext
Persistent Object and its Lifecycle
ObjectContext Persistence API
Cayenne Helper Class
ObjectContext Nest ing
Generic Persistent Objects
Transactions
7. Expressions
Expressions Overview
Path Expressions
Creating Expressions from Strings
Creating Expressions via API
Evaluating Expressions in Memory
Translating Expressions to EJBQL
8. Orderings
9. Queries
ObjectSelect
EJBQLQuery
SQLTemplate
ProcedureQuery
NamedQuery
Custom Queries
10. Lifecycle Events
Types of Lifecycle Events
Callbacks on Persistent Objects
Callbacks on Non-Persistent Listeners
Combining Listeners with DataChannelFilters
11. Performance Tuning
Prefetching
Data Rows
Specific Attributes and Relationships with EJBQL
Iterated Queries
Paginated Queries
Caching and Fresh Data
Turning off Synchronization of ObjectContexts
12. Customizing Cayenne Runtime
Dependency Injection Container
Customization Strategies
Extended Types
Noteworthy Built-in Services
III. Cayenne Framework - Remote Object Persistence
13. Introduction to ROP
What is ROP
Main Features
14. ROP Setup
System Requirements
Jar Files and Dependencies
15. Impleme nting ROP Server
16. Implementing ROP Client
17. ROP Deployment
Deploying ROP Server
Deploying ROP Client
Security
18. Current Limitations
IV. DB-First Flow
19. Introduction
"DB-first" Flow
Introduction to "cdbimport"
20. Filtering
Process everything from schema/catalog
Combine Schema and Catalog filters
Including and Excluding tables, columns and procedures
Complete filtering example
Ant configuration example
21. Other Settings
Skip Relationships Loading
Skip Primary Keys Loading
Table Types
22. Reverse Engineering in Cayenne Modeler
DataSource selection
Reverse engineering options
A. Configuration Properties
B. Service Collections
C. Expressions BNF
\ No newline at end of file Modified: websites/staging/cayenne/trunk/content/docs/4.0/cayenne-guide/introduction-to-rop.html ============================================================================== --- websites/staging/cayenne/trunk/content/docs/4.0/cayenne-guide/introduction-to-rop.html (original) +++ websites/staging/cayenne/trunk/content/docs/4.0/cayenne-guide/introduction-to-rop.html Fri Oct 6 07:49:44 2017 @@ -9,7 +9,7 @@ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); -

Chapter 13. Introduction to ROP

Table of Contents

What is ROP
Main Features

What is ROP

"Remote Object Persistence" is a low-overhead web services-based technology that +

Chapter 13. Introduction to ROP

Table of Contents

What is ROP
Main Features

What is ROP

"Remote Object Persistence" is a low-overhead web services-based technology that provides lightweight object persistence and query functionality to 'remote' applications. In other words it provides familiar Cayenne API to applications that do not have direct access to the database. Instead such applications would access Cayenne Modified: websites/staging/cayenne/trunk/content/docs/4.0/cayenne-guide/lifecycle-events.html ============================================================================== --- websites/staging/cayenne/trunk/content/docs/4.0/cayenne-guide/lifecycle-events.html (original) +++ websites/staging/cayenne/trunk/content/docs/4.0/cayenne-guide/lifecycle-events.html Fri Oct 6 07:49:44 2017 @@ -9,7 +9,7 @@ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); -

Chapter 10. Lifecycle Events

An application might be interested in getting notified when a Persistent object moves +

Chapter 10. Lifecycle Events

An application might be interested in getting notified when a Persistent object moves through its lifecycle (i.e. fetched from DB, created, modified, committed). E.g. when a new object is created, the application may want to initialize its default properties (this can't be done in constructor, as constructor is also called when an object is fetched from DB). @@ -25,7 +25,7 @@ evnironment outside Cayenne. This power comes from such features as filtering which entity events are sent to a given listener and the ability to create a common operation context for multiple callback invocations. All of these are discussed later in this chapter.

Types of Lifecycle Events

Cayenne defines the following 8 types of lifecycle events for which callbacks can be - regsitered:

Table 10.1. Lifecycle Event Types

+ regsitered:

Table 10.1. Lifecycle Event Types

Modified: websites/staging/cayenne/trunk/content/docs/4.0/cayenne-guide/orderings.html ============================================================================== --- websites/staging/cayenne/trunk/content/docs/4.0/cayenne-guide/orderings.html (original) +++ websites/staging/cayenne/trunk/content/docs/4.0/cayenne-guide/orderings.html Fri Oct 6 07:49:44 2017 @@ -9,7 +9,7 @@ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); -
Event Occurs...
v.4.0 (4.0.B1)Chapter 8. Orderings
Prev Part II. Cayenne Framework Next

Chapter 8. Orderings

An Ordering object defines how a list of objects should be ordered. Orderings are +

Chapter 8. Orderings

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:

Ordering o = new Ordering(Painting.NAME_PROPERTY, SortOrder.ASCENDING);

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 -