Skip to Main Content
Java Persistence with Hibernate
book

Java Persistence with Hibernate

by Gavin King, Christian Bauer
October 2006
Intermediate to advanced content levelIntermediate to advanced
880 pages
22h 11m
English
Manning Publications
Content preview from Java Persistence with Hibernate

9.1. The persistence lifecycle

Because Hibernate is a transparent persistence mechanism—classes are unaware of their own persistence capability—it's possible to write application logic that is unaware whether the objects it operates on represent persistent state or temporary state that exists only in memory. The application shouldn't necessarily need to care that an object is persistent when invoking its methods. You can, for example, invoke the calculateTotalPrice() business method on an instance of the Item class without having to consider persistence at all; e.g., in a unit test.

Any application with persistent state must interact with the persistence service whenever it needs to propagate state held in memory to the database (or vice versa). ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Java Persistence with Hibernate, Second Edition

Java Persistence with Hibernate, Second Edition

Christian Bauer, Gary Gregory
Pro JPA 2 in Java EE 8: An In-Depth Guide to Java Persistence APIs

Pro JPA 2 in Java EE 8: An In-Depth Guide to Java Persistence APIs

Mike Keith, Merrick Schincariol, Massimo Nardone
Beginning Hibernate 6: Java Persistence from Beginner to Pro

Beginning Hibernate 6: Java Persistence from Beginner to Pro

Joseph B. Ottinger, Jeff Linwood, Dave Minter

Publisher Resources

ISBN: 9781932394887Publisher SupportOtherPublisher WebsiteSupplemental ContentPurchase Link