blob: 7012af1c2a87fcd31c4a1d7acb3f22b0c62b826b [file] [log] [blame]
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.3">
<link rel="apple-touch-icon" sizes="180x180" href="/img/favicon/apple-touch-icon-04cb17e028.png">
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon/favicon-32x32-12431ee8eb.png">
<link rel="icon" type="image/png" sizes="16x16" href="/img/favicon/favicon-16x16-4f316e4d55.png">
<link rel="manifest" href="/img/favicon/manifest-65e6aaa49e.json">
<link rel="mask-icon" href="/img/favicon/safari-pinned-tab-558c1991b1.svg" color="#dc5656">
<link rel="shortcut icon" href="/img/favicon/favicon-6cef91375b.ico">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="/img/favicon/mstile-144x144-34e7696278.png">
<meta name="msapplication-config" content="/img/favicon/browserconfig-82ff158058.xml">
<meta name="theme-color" content="#ffffff">
<link rel="stylesheet" href="https://cayenne.apache.org/css/styles-9ee2e6e330.css"/>
<script src="https://cayenne.apache.org/js/bundle-c0e6356367.js"></script>
<script src="https://www.apachecon.com/event-images/snippet.js"></script>
<title>Apache Cayenne</title>
</head>
<body>
<header class="page-header">
<nav id="topbar" class="bg-dark" aria-label="breadcrumb" role="navigation">
<ul class="breadcrumb breadcrumb-sm breadcrumb-dark container mb-0">
<li class="breadcrumb-item dropdown">
<a class="dropdown-toggle text-nowrap pr-1" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<img class="mw-15px mr-1" src="/img/feather-641aa69d09.svg" />Apache Software Foundation</a>
<div class="dropdown-menu rounded-0" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="https://www.apache.org">Apache Homepage</a>
<a class="dropdown-item" href="https://www.apache.org/licenses/">License</a>
<a class="dropdown-item" href="https://www.apache.org/foundation/sponsorship.html">Sponsorship</a>
<a class="dropdown-item" href="https://www.apache.org/foundation/thanks.html">Thanks</a>
<a class="dropdown-item" href="https://www.apache.org/security/">Security</a>
<a class="dropdown-item" href="https://privacy.apache.org/policies/privacy-policy-public.html">Privacy</a>
<a class="ml-1 mt-1 acevent" data-format="wide" data-mode="dark" data-width="120"></a>
</div>
</li>
</ul>
</nav>
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
<div class="container">
<a class="navbar-brand" href="https://cayenne.apache.org/">
<img src="/img/logo_mono_full-d7a19eef61.svg" alt="Apache Cayenne" />
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#mainMenu" aria-controls="mainMenu" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="mainMenu">
<ul class="navbar-nav mt-3 mt-lg-0 mr-auto">
<li class="nav-item">
<a class="nav-link" href="/download/">DOWNLOAD</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/docs/4.2/getting-started-guide/">DOCUMENTATION</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/about/support/">SUPPORT</a>
</li>
</ul>
<ul class="navbar-nav flex-row justify-content-center mt-2 mt-lg-0 mb-2 mb-lg-0 " id="social-links-menu">
<li class="nav-item d-flex">
<a class="nav-link d-flex justify-content-center align-items-center" href="https://github.com/apache/cayenne">
<img src="/img/icon_octocat_stars-c24dac94b8.svg" alt="GitHub" />
</a>
</li>
<li class="nav-item d-flex">
<a class="nav-link d-flex justify-content-center align-items-center" href="https://twitter.com/ApacheCayenne">
<img src="/img/icon_twitter-220a129d14.svg" alt="Twitter" />
</a>
</li>
</ul>
</div>
</div>
</nav>
</header>
<main class="container py-5">
<!-- Intro -->
<section id="intro" class="pb-5">
<div class="row align-items-center justify-content-center mb-4">
<div class="col-12 col-sm-10 col-md-9 col-lg-7 text-center"> <!-- text-xl-left -->
<h1 class="display-2 font-weight-normal mt-2 mx-auto mb-1 "> <!-- mb-xl-1l2 -->
<span class="font-weight-xlight">Your</span>
<span class="font-weight-semibold">ORM</span>
superpower
</h1>
<p class="d-inline-block mw-460px small font-italic mb-0">Apache Cayenne™ is an open source Java object-to-relational mapping framework</p>
<div class="embed-responsive mw-560px mt-3 mx-auto embed-responsive-16by9">
<iframe class="embed-iframe"
srcdoc="<style>*{padding:0;margin:0;overflow:hidden} img{max-width:100%;height:auto}</style>
<a href=https://www.youtube.com/embed/0H5HIA03xFc?html5=1&controls=1&autoplay=1&showinfo=0&fs=1&rel=0>
<img src=img/cayenne-tutorial-preview-62b4329689.png alt='Play Cayenne video tutorial'>
</a>"
allowfullscreen
title="Play Cayenne video tutorial"
></iframe>
</div>
<p class="xsmall">Clicking on this link will load and send data from and to Google.</p>
</div>
</div>
<!-- CTA Btn -->
<div class="text-center">
<a href="/download/" class="btn btn-xlg btn-primary text-uppercase">Download latest</a>
</div>
</section>
<!-- Features -->
<section id="key-features" class="mt-3 mb-5">
<div class="solid-heading mb-5">
<h3 class="text-center mx-3l2">Key <span class="font-weight-medium">features</span>
</h3>
</div>
<div class="row no-gutters pt-2">
<!-- Features list -->
<div class="col-lg-4 border border-left-0 border-top-0 border-bottom-0 mb-2">
<ul class="nav nav-pills justify-content-between flex-lg-column flex-nowrap">
<li class="nav-item">
<a class="nav-link active" data-toggle="tab" href="#modeler">
<div class="media">
<img class="align-self-center mr-lg-3l2" src="img/icon_modeler-a540ab5dd8.svg" alt="Modeler">
<span class="align-self-center d-none d-lg-block">Modeler</span>
</div>
</a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#db-first-flow">
<div class="media">
<img class="align-self-center mr-lg-3l2" src="img/icon_dbfirst_flow-ba82064fb3.svg" alt="DB First Flow">
<span class="align-self-center d-none d-lg-block">DB-first flow</span>
</div>
</a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#transparent-transactions">
<div class="media">
<img class="align-self-center mr-lg-3l2" src="img/icon_transp_trans-72867e066e.svg" alt="Transactions">
<span class="align-self-center d-none d-lg-block">Transparent transactions</span>
</div>
</a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#objectcontext">
<div class="media">
<img class="align-self-center mr-lg-3l2" src="img/icon_object_context-507c7eca35.svg" alt="Object Context">
<span class="align-self-center d-none d-lg-block">ObjectContext</span>
</div>
</a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#extension-api">
<div class="media">
<img class="align-self-center mr-lg-3l2" src="img/icon_extensions-0f6d8ea703.svg" alt="Extension API">
<span class="align-self-center d-none d-lg-block">Extension API</span>
</div>
</a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#generic-objects">
<div class="media">
<img class="align-self-center mr-lg-3l2" src="img/icon_generic_objects-c8204396e1.svg" alt="Generic Objects">
<span class="align-self-center d-none d-lg-block">Generic objects</span>
</div>
</a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#data-encryption">
<div class="media">
<img class="align-self-center mr-lg-3l2" src="img/icon_data_encrypt-c6d1e4c3c9.svg" alt="Data Encryption">
<span class="align-self-center d-none d-lg-block">Data Encryption</span>
</div>
</a>
</li>
</ul>
</div>
<div class="col-lg-8">
<!-- Features Desc -->
<div class="tab-content px-lg-5" id="myTabContent">
<div class="tab-pane fade show active" id="modeler" role="tabpanel" aria-labelledby="modeler-tab">
<h4>Modeler</h4>
<p>Cayenne is distributed with CayenneModeler - a complete GUI mapping tool that supports reverse-engineering of RDBMS schemas, editing object-relational mapping projects, generating Java source code for persistent objects and other functions.</p>
<img class="img-fluid mb-2" src="img/cayenne-modeler1-720ebf6dbf.png" alt="Cayenne Modeler" />
</div>
<div class="tab-pane fade" id="db-first-flow" role="tabpanel" aria-labelledby="db-first-flow-tab">
<h4>DB-first-flow</h4>
<p>Cayenne allows you to design your data model in a single place - the database. Other layers (OR mapping and Java objects) are synchronized automatically via CayenneModeler or a build script, so you don't have to repeat yourself. Such an approach is called "database-first". It saves you development time and prevents errors by ensuring that your model is in sync across multiple layers. It is also quite flexible. It works well with common DB migration frameworks like Liquibase or Flyway, allows object structure customizations and is designed for iterative schema evolution.
</p>
</div>
<div class="tab-pane fade" id="transparent-transactions" role="tabpanel" aria-labelledby="transparent-transactions-tab">
<h4>Transparent transactions</h4>
<p>
Most ORM frameworks require you to manage transactions manually or with external tools like Spring. Also you must always ensure you stay within transaction bounds when traversing relationships between objects. Cayenne takes a notably different approach, freeing you from writing lots of trivial code. Transaction management happens automatically behind the scenes. Object graphs can be expanded lazily on demand, without any special considerations.
</p>
<p>
At the same time Cayenne works well with external transaction managers. It also has its own transaction API that can be used to run multiple operations atomically in regards to DB commit/rollback. The good thing is that it is completely optional and should be used only when needed.
</p>
</div>
<div class="tab-pane fade" id="objectcontext" role="tabpanel" aria-labelledby="objectcontext-tab">
<h4>Object Context</h4>
<p>
At the heart of Cayenne's persistence API lies ObjectContext. ObjectContext can be thought of as a unit of work. It has its own copy of persistent objects. While vaguely similar to JPA EntityManager, ObjectContext is closer to a version control client. It is not connected to the database except when a read or write operation is in progress, it doesn't hold on to any resources (such as DB connections), and doesn't need to be closed.
</p>
<p>
As a result ObjectContexts are serializable and rather lightweight. Contexts can be nested (a child context can read/write from/to its parent without affecting the DB). There is even a version of ObjectContext that can run in an entirely different JVM from the main app, and communicate with the app via a binary web service.
</p>
</div>
<div class="tab-pane fade" id="extension-api" role="tabpanel" aria-labelledby="extension-api-tab">
<h4>Extension API</h4>
<p>
Cayenne stack is built around a small dependency injection (DI) container responsible for configuring and binding all framework services. It provides a simple API to define custom implementations of core services and strategies or add extensions to the existing ones (e.g. custom value types). Additionally, many things can be configured via system properties.
</p>
<p>
Cayenne is truly modular. The above-mentioned DI container supports autoloading of extra modules from the classpath. Cayenne itself takes advantage of this, isolating various optional features and integrations into optional modules. You can do the same with your own code.
</p>
</div>
<div class="tab-pane fade" id="generic-objects" role="tabpanel" aria-labelledby="generic-objects-tab">
<h4>Generic Objects</h4>
<p>
Traditional Java ORMs depend on bytecode generation or dynamic proxies to "connect" persistent objects with the framework. In constrast, Cayenne objects implement a simple API contract to interact with the ORM runtime, but otherwise can be structured arbitrarily, not requiring any annotation or "enhancement".
</p>
<p>This opens up some interesting possibilities. E.g. Cayenne provides a Map-based "generic" persistent object that can be dynamically mapped to any entity. This means that an ORM model can be created in runtime without recompiling the code. Combined with the DB reverse-engineering feature, this allows building completely generic data tools and services.
</p>
</div>
<div class="tab-pane fade" id="data-encryption" role="tabpanel" aria-labelledby="data-encryption-tab">
<h4>Data Encryption</h4>
<p>
Traditionally, protecting DB data at rest stops at encrypting entire hard drive partitions. Cayenne goes a few steps further, offering a more secure and flexible solution - the "cayenne-crypto" module with field-level data encryption.
</p>
<p>
You can designate any number of columns in multiple tables in your model as encrypted, and Cayenne will transparently encrypt and decrypt data with minimal overhead. The default encryption algorithm is AES/CBC/PKCS#5 with a 128 or 256-bit key. Other useful features are key revocation, data compression, and HMAC signatures.
</p>
<img class="img-fluid mb-2" src="img/crypto-protocol-d2cc175f70.png" alt="Cayenne Crypto Protocol" />
</div>
</div>
</div>
</div>
</section>
</main>
<img referrerpolicy="no-referrer-when-downgrade" src="https://static.scarf.sh/a.png?x-pxid=e664b65f-63c3-49ea-8815-005af1397638" />
<footer class="bg-dark">
<div class="footer-nav container text-center text-lg-left pb-3">
<div class="row pt-5 pb-3">
<div class="col-sm-6 col-lg-3">
<h4>About</h4>
<ul class="list-unstyled">
<li>
<a href="/why-cayenne.html">Why Cayenne?</a>
</li>
<li>
<a href="/download/">Download</a>
</li>
<li>
<a href="/success-stories.html">Success Stories</a>
</li>
<li>
<a href="/about/support/">Support</a>
</li>
</ul>
</div>
<div class="col-sm-6 col-lg-3">
<h4>Documentation</h4>
<ul class="list-unstyled">
<li>
<a href="/docs/4.0/getting-started-guide/">Getting Started (4.0)</a>
</li>
<li>
<a href="/docs/4.1/getting-started-guide/">Getting Started (4.1)</a>
</li>
<li>
<a href="/docs/4.2/getting-started-guide/">Getting Started (4.2)</a>
</li>
<li>
<a href="/docs/4.0/cayenne-guide/">Cayenne Guide (4.0)</a>
</li>
<li>
<a href="/docs/4.1/cayenne-guide/">Cayenne Guide (4.1)</a>
</li>
<li>
<a href="/docs/4.2/cayenne-guide/">Cayenne Guide (4.2)</a>
</li>
<li>
<a href="/docs/4.1/getting-started-db-first/">Database First tutorial (4.1)</a>
</li>
<li>
<a href="/docs/4.2/getting-started-db-first/">Database First tutorial (4.2)</a>
</li>
<li>
<a href="/legacy/legacy-docs/">Legacy Documentation</a>
</li>
</ul>
</div>
<div class="col-sm-6 col-lg-3">
<h4>Collaboration</h4>
<ul class="list-unstyled">
<li>
<a href="https://issues.apache.org/jira/browse/CAY">Bug/Feature Tracker</a>
</li>
<li>
<a href="/mailing-lists.html">Mailing Lists</a>
</li>
<li>
<a href="/dev/code-repository.html">Code Repository</a>
</li>
<li>
<a href="/dev/">Developer Guide</a>
</li>
<li>
<a href="/how-can-i-help.html">How can I help?</a>
</li>
<li>
<a href="/contributors.html">Contributors</a>
</li>
<li>
<a href="/thanks.html">Thanks</a>
</li>
</ul>
</div>
<div class="col-sm-6 col-lg-3">
<h4>News</h4>
<ul class="list-multiline-items list-unstyled mb-0">
<li>
<time datetime="2023-05-25 18:00:00 &#43;0300 &#43;0300" class="xsmall d-block">May 25, 2023</time>
<a href="/2023/05/cayenne-42-final-released/">Cayenne 4.2 Final Released</a>
</li>
<li>
<time datetime="2023-03-02 12:00:00 &#43;0300 &#43;0300" class="xsmall d-block">Mar 02, 2023</time>
<a href="/2023/03/cayenne-403-released/">Cayenne 4.0.3 Released</a>
</li>
<li>
<time datetime="2022-12-05 12:00:00 &#43;0300 &#43;0300" class="xsmall d-block">Dec 05, 2022</time>
<a href="/2022/12/cayenne-42rc2-released/">Cayenne 4.2 Release Candidate 2 Released</a>
</li>
</ul>
<a class="btn-link text-uppercase xsmall" href="https://cayenne.apache.org/news">
More news
<i class="fa fa-lg fa-long-arrow-right" aria-hidden="true"></i>
</a>
</div>
</div>
<hr class="mt-0 mb-3" />
<p class="copy xsmall text-center mw-75 mx-auto mb-0">
Copyright © 2001-2024 Apache Software Foundation. Apache Cayenne, Cayenne, Apache, the Apache feather logo, and the Apache Cayenne project logo are trademarks of The Apache Software Foundation.
<a href="https://privacy.apache.org/policies/privacy-policy-public.html">Privacy policy</a>.
<img class="d-block mx-auto mt-2" src="/img/logo_mono-3302daa3cf.svg" alt="Apache Cayenne" />
</p>
</div>
</footer>
</body>
</html>