Hibernate Implementation
There are two primary steps to creating either orientation of a Repository. You need to define a public interface and at least one implementation.
Specifically in the case of a collection-oriented design, in the first step you define an interface that mimics a collection. The second step provides an implementation that addresses the use of the backing primary storage mechanism, such as Hibernate. The interface, like a collection, will often have common methods such as are found in the following example:
package com.saasovation.collaboration.domain.model.calendar; public interface CalendarEntryRepository { public void add(CalendarEntry aCalendarEntry); public void addAll( Collection<CalendarEntry> ...
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.
Read now
Unlock full access