Berkeley DB Java Edition Collections Tutorial

Legal Notice

This documentation is distributed under an open source license. You may review the terms of this license at: http://www.oracle.com/technetwork/database/berkeleydb/downloads/jeoslicense-086837.html

Oracle, Berkeley DB, Berkeley DB Java Edition and Sleepycat are trademarks or registered trademarks of Oracle. All rights to these marks are reserved. No third-party use is permitted without the express prior written consent of Oracle.

Java™ and all Java-based marks are a trademark or registered trademark of Sun Microsystems, Inc, in the United States and other countries.

Other names may be trademarks of their respective owners.

To obtain a copy of this document's original source code, please submit a request to the Oracle Technology Network forum at: https://forums.oracle.com/forums/forum.jspa?forumID=273

7/25/2014


Table of Contents

Preface
Conventions Used in this Book
For More Information
Contact Us
1. Introduction
Features
Developing a JE Collections Application
Tutorial Introduction
2. The Basic Program
Defining Serialized Key and Value Classes
Opening and Closing the Database Environment
Opening and Closing the Class Catalog
Opening and Closing Databases
Creating Bindings and Collections
Implementing the Main Program
Using Transactions
Adding Database Items
Retrieving Database Items
Handling Exceptions
3. Using Secondary Indices and Foreign keys
Opening Secondary Key Indices
Opening Foreign Key Indices
Creating Indexed Collections
Retrieving Items by Index Key
4. Using Entity Classes
Defining Entity Classes
Creating Entity Bindings
Creating Collections with Entity Bindings
Using Entities with Collections
5. Using Tuples
Using the Tuple Format
Using Tuples with Key Creators
Creating Tuple Key Bindings
Creating Tuple-Serial Entity Bindings
Using Sorted Collections
6. Using Serializable Entities
Using Transient Fields in an Entity Class
Using Transient Fields in an Entity Binding
Removing the Redundant Value Classes
7. Summary
A. API Notes and Details
Using Data Bindings
Selecting Binding Formats
Selecting Data Bindings
Implementing Bindings
Using Bindings
Secondary Key Creators
Using the JE JE Collections API
Using Transactions
Transaction Rollback
Access Method Restrictions
Using Stored Collections
Stored Collection and Access Methods
Stored Collections Versus Standard Java Collections
Other Stored Collection Characteristics
Why Java Collections for Berkeley DB Java Edition
Serialized Object Storage