By using the JPA style queries, as described in previous sections, we can quickly write database-centric applications using Seam. Seam adds to the JPA framework by providing a few extension classes that make writing database-centric applications even easier. The Seam application framework provides a couple of objects to enable this easier development:
Home objects
Query objects
Let's take a look at each of these types of objects and see how they can be used to help us when accessing the database.
Home objects provide database persistence methods for entity classes. Each entity has its own specific home object, which is responsible for performing create, read, update, and delete (CRUD) functionality.
If we have an entity class, it is easy to create a home object for that entity. Consider the following VacationType
entity.
@Entity @Name("vacationType") public class VacationType implements Serializable { private Long id; private Integer version; private...