Part 4. OpenJPA JPA Reference Guide

Table of Contents

1. Introduction
1. Intended Audience
2. Configuration
1. Introduction
2. Runtime Configuration
3. Command Line Configuration
3.1. Code Formatting
4. Plugin Configuration
5. OpenJPA Properties
5.1. openjpa.AggregateListeners
5.2. openjpa.AutoClear
5.3. openjpa.AutoDetach
5.4. openjpa.BrokerFactory
5.5. openjpa.BrokerImpl
5.6. openjpa.ClassResolver
5.7. openjpa.Compatibility
5.8. openjpa.ConnectionDriverName
5.9. openjpa.Connection2DriverName
5.10. openjpa.ConnectionFactory
5.11. openjpa.ConnectionFactory2
5.12. openjpa.ConnectionFactoryName
5.13. openjpa.ConnectionFactory2Name
5.14. openjpa.ConnectionFactoryMode
5.15. openjpa.ConnectionFactoryProperties
5.16. openjpa.ConnectionFactory2Properties
5.17. openjpa.ConnectionPassword
5.18. openjpa.Connection2Password
5.19. openjpa.ConnectionProperties
5.20. openjpa.Connection2Properties
5.21. openjpa.ConnectionURL
5.22. openjpa.Connection2URL
5.23. openjpa.ConnectionUserName
5.24. openjpa.Connection2UserName
5.25. openjpa.ConnectionRetainMode
5.26. openjpa.DataCache
5.27. openjpa.DataCacheManager
5.28. openjpa.DataCacheTimeout
5.29. openjpa.DetachState
5.30. openjpa.DynamicDataStructs
5.31. openjpa.FetchBatchSize
5.32. openjpa.FetchGroups
5.33. openjpa.FilterListeners
5.34. openjpa.FlushBeforeQueries
5.35. openjpa.IgnoreChanges
5.36. openjpa.InverseManager
5.37. openjpa.LockManager
5.38. openjpa.LockTimeout
5.39. openjpa.Log
5.40. openjpa.ManagedRuntime
5.41. openjpa.Mapping
5.42. openjpa.MetaDataFactory
5.43. openjpa.Multithreaded
5.44. openjpa.Optimistic
5.45. openjpa.OrphanedKeyAction
5.46. openjpa.NontransactionalRead
5.47. openjpa.NontransactionalWrite
5.48. openjpa.ProxyManager
5.49. openjpa.QueryCache
5.50. openjpa.QueryCompilationCache
5.51. openjpa.ReadLockLevel
5.52. openjpa.RemoteCommitProvider
5.53. openjpa.RestoreState
5.54. openjpa.RetainState
5.55. openjpa.RetryClassRegistration
5.56. openjpa.SavepointManager
5.57. openjpa.Sequence
5.58. openjpa.TransactionMode
5.59. openjpa.WriteLockLevel
6. OpenJPA JDBC Properties
6.1. openjpa.jdbc.ConnectionDecorators
6.2. openjpa.jdbc.DBDictionary
6.3. openjpa.jdbc.DriverDataSource
6.4. openjpa.jdbc.EagerFetchMode
6.5. openjpa.jdbc.FetchDirection
6.6. openjpa.jdbc.JDBCListeners
6.7. openjpa.jdbc.LRSSize
6.8. openjpa.jdbc.MappingDefaults
6.9. openjpa.jdbc.MappingFactory
6.10. openjpa.jdbc.ResultSetType
6.11. openjpa.jdbc.Schema
6.12. openjpa.jdbc.SchemaFactory
6.13. openjpa.jdbc.Schemas
6.14. openjpa.jdbc.SQLFactory
6.15. openjpa.jdbc.SubclassFetchMode
6.16. openjpa.jdbc.SynchronizeMappings
6.17. openjpa.jdbc.TransactionIsolation
6.18. openjpa.jdbc.UpdateManager
3. Logging
1. Logging Channels
2. OpenJPA Logging
3. Disabling Logging
4. Log4J
5. Apache Commons Logging
5.1. JDK 1.4 java.util.logging
6. Custom Log
4. JDBC
1. Using the OpenJPA DataSource
2. Using a Third-Party DataSource
2.1. Managed and XA DataSources
3. Runtime Access to DataSource
4. Database Support
4.1. DBDictionary Properties
4.2. MySQLDictionary Properties
4.3. OracleDictionary Properties
5. SQLFactory Properties
6. Setting the Transaction Isolation
7. Setting the SQL Join Syntax
8. Accessing Multiple Databases
9. Configuring the Use of JDBC Connections
10. Statement Batching
11. Large Result Sets
12. Default Schema
13. Schema Reflection
13.1. Schemas List
13.2. Schema Factory
14. Schema Tool
15. XML Schema Format
5. Persistent Classes
1. Persistent Class List
2. Enhancement
2.1. Enhancing at Build Time
2.2. Enhancing JPA Entities on Deployment
2.3. Enhancing at Runtime
2.4. Serializing Enhanced Types
3. Object Identity
3.1. Datastore Identity Objects
3.2. Application Identity Tool
3.3. Autoassign / Identity Strategy Caveats
4. Managed Inverses
5. Persistent Fields
5.1. Restoring State
5.2. Typing and Ordering
5.3. Calendar Fields and TimeZones
5.4. Proxies
5.4.1. Smart Proxies
5.4.2. Large Result Set Proxies
5.4.3. Custom Proxies
5.5. Externalization
5.5.1. External Values
6. Fetch Groups
6.1. Custom Fetch Groups
6.2. Custom Fetch Group Configuration
6.3. Per-field Fetch Configuration
6.4. Implementation Notes
7. Eager Fetching
7.1. Configuring Eager Fetching
7.2. Eager Fetching Considerations and Limitations
8. Lock Groups
8.1. Lock Groups and Subclasses
8.2. Lock Group Mapping
6. Metadata
1. Metadata Factory
2. Additional JPA Metadata
2.1. Datastore Identity
2.2. Surrogate Version
2.3. Persistent Field Values
2.4. Persistent Collection Fields
2.5. Persistent Map Fields
3. Metadata Extensions
3.1. Class Extensions
3.1.1. Fetch Groups
3.1.2. Data Cache
3.1.3. Detached State
3.1.4. Lock Groups
3.1.5. Auditable
3.2. Field Extensions
3.2.1. Dependent
3.2.2. LRS
3.2.3. Order-By
3.2.4. Inverse-Logical
3.2.5. Lock Group
3.2.6. Read-Only
3.2.7. Type
3.2.8. Externalizer
3.2.9. Factory
3.2.10. External Values
3.3. Example
7. Mapping
1. Forward Mapping
1.1. Using the Mapping Tool
1.2. Generating DDL SQL
1.3. Runtime Forward Mapping
2. Reverse Mapping
2.1. Customizing Reverse Mapping
3. Meet-in-the-Middle Mapping
4. Mapping Defaults
5. Mapping Factory
6. Non-Standard Joins
7. Additional JPA Mappings
7.1. Datastore Identity Mapping
7.2. Surrogate Version Mapping
7.3. Multi-Column Mappings
7.4. Join Column Attribute Targets
7.5. Embedded Mapping
7.6. Collections
7.6.1. Container Table
7.6.2. Element Columns
7.6.3. Element Join Columns
7.6.4. Element Embedded Mapping
7.6.5. Order Column
7.6.6. Examples
7.7. One-Sided One-Many Mapping
7.8. Maps
7.8.1. Key Columns
7.8.2. Key Join Columns
7.8.3. Key Embedded Mapping
7.8.4. Examples
7.9. Indexes and Constraints
7.9.1. Indexes
7.9.2. Foreign Keys
7.9.3. Unique Constraints
7.9.4. Examples
8. Mapping Limitations
8.1. Table Per Class
9. Mapping Extensions
9.1. Class Extensions
9.1.1. Subclass Fetch Mode
9.1.2. Strategy
9.1.3. Discriminator Strategy
9.1.4. Version Strategy
9.2. Field Extensions
9.2.1. Eager Fetch Mode
9.2.2. Nonpolymorphic
9.2.3. Class Criteria
9.2.4. Strategy
10. Custom Mappings
10.1. Custom Class Mapping
10.2. Custom Discriminator and Version Strategies
10.3. Custom Field Mapping
10.3.1. Value Handlers
10.3.2. Field Strategies
10.3.3. Configuration
11. Orphaned Keys
8. Deployment
1. Factory Deployment
1.1. Standalone Deployment
1.2. EntityManager Injection
1.3. OpenJPA JPA JCA Deployment
1.3.1. WebLogic 9
2. XA Transactions
2.1. Using OpenJPA with XA Transactions
9. Runtime Extensions
1. Architecture
1.1. Broker Customization
2. JPA Extensions
2.1. OpenJPAEntityManagerFactory
2.2. OpenJPAEntityManager
2.3. OpenJPAQuery
2.4. Extent
2.5. StoreCache
2.6. QueryResultCache
2.7. FetchPlan
2.8. OpenJPAPersistence
3. Object Locking
3.1. Configuring Default Locking
3.2. Configuring Lock Levels at Runtime
3.3. Object Locking APIs
3.4. Lock Manager
3.5. Rules for Locking Behavior
3.6. Known Issues and Limitations
4. Savepoints
4.1. Using Savepoints
4.2. Configuring Savepoints
5. Query Language Extensions
5.1. Filter Extensions
5.1.1. Included Filter Extensions
5.1.2. Developing Custom Filter Extensions
5.1.3. Configuring Filter Extensions
5.2. Aggregate Extensions
5.2.1. Configuring Query Aggregates
5.3. MethodQL
6. Generators
6.1. Runtime Access
7. Transaction Events
8. Non-Relational Stores
10. Caching
1. Data Cache
1.1. Data Cache Configuration
1.2. Data Cache Usage
1.3. Query Cache
1.4. The Concurrent Data Cache
1.5. Third-Party Integrations
1.5.1. Tangosol Integration
1.5.2. GemStone GemFire Integration
1.6. Cache Extension
1.7. Important Notes
1.8. Known Issues and Limitations
2. Query Compilation Cache
11. Remote and Offline Operation
1. Detach and Attach
1.1. Detach Behavior
1.2. Attach Behavior
1.3. Defining the Detached Object Graph
1.3.1. Detached State Field
2. Remote Event Notification Framework
2.1. Remote Commit Provider Configuration
2.1.1. JMS
2.1.2. TCP
2.1.3. Common Properties
2.2. Customization
12. Third Party Integration
1. Apache Ant
1.1. Common Ant Configuration Options
1.2. Enhancer Ant Task
1.3. Application Identity Tool Ant Task
1.4. Mapping Tool Ant Task
1.5. Reverse Mapping Tool Ant Task
1.6. Schema Tool Ant Task
2. Maven
13. Optimization Guidelines