Chapter 12. Modifying objects efficiently

This chapter shows you how to make data manipulations more efficient. We optimize and reduce the amount of code that is necessary to store objects and discuss the most efficient processing options. You should be familiar with the basic object states and the persistence interfaces; the previous chapters are required reading to understand this chapter.

First we'll show you how transitive persistence can make your work with complex object networks easier. The cascading options you can enable in Hibernate and Java Persistence applications significantly reduce the amount of code that's otherwise needed to insert, update, or delete several objects at the same time.

We then discuss how large datasets are best handled, with batch operations in your application or with bulk operations that execute directly in the database.

Finally, we show you data filtering and interception, both of which offer transparent hooks into the loading and storing process inside Hibernate's engine. These features let you influence or participate in the lifecycle of your objects without writing complex application code and without binding your domain model to the persistence mechanism.

Let's start with transitive persistence and store more than one object at a time.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.143.4.181