Hibernate - Creating Data Access Objects (DAOs)

Hibernate - Creating Data Access Objects (DAOs)

Data Access Objects – What are they?

Data Access Objects (or DAOs for short) are used as a direct line of connection and communication with our database. DAOs are used when the actual CRUD (CRUD = Create, Read, Update, Delete) operations are needed and invoked in our Java code. These data access objects also represent the "data layer" of our application.

These objects are still just plain old Java objects that incorporate the use of some Hibernate annotations to give them the functionality we need from them. Again, that functionality being the communication with the database.

Also, believe it or not, the concept of creating a file specifically for accessing the database is a design pattern. It's called the Data Access Object Pattern and you can read more about it from this nice short Wiki article.

What Hibernate Annotations Should We Use?

Okay, so now that you're somewhat familiar with DAOs, it's time to learn how to integrate these plain old Java objects with our Hibernate framework (so they actually do the work we need them to do).

There are two main annotations that you need to be familiar with:

  • @Repository
  • @Transactional

To learn more, visit our show notes page via http://howtoprogramwithjava.com/session52

Episoder(112)

EP41 - 5 Tips on Landing an Entry Level Programming Job

EP41 - 5 Tips on Landing an Entry Level Programming Job

Interested in starting your coding career? I'm now accepting students into an immersive programming Bootcamp where I guarantee you a job offer upon graduation. It is a 6 month, part-time, online Bootc...

16 Sep 201915min

EP40 - The Document Object Model (DOM)

EP40 - The Document Object Model (DOM)

Interested in starting your coding career? I'm now accepting students into an immersive programming Bootcamp where I guarantee you a job offer upon graduation. It is a 6 month, part-time, online Bootc...

4 Sep 201813min

EP39 - Arrays in JavaScript

EP39 - Arrays in JavaScript

Interested in starting your coding career? I'm now accepting students into an immersive programming Bootcamp where I guarantee you a job offer upon graduation. It is a 6 month, part-time, online Bootc...

27 Aug 201842min

EP38 - JavaScript's Built in Objects

EP38 - JavaScript's Built in Objects

Interested in starting your coding career? I'm now accepting students into an immersive programming Bootcamp where I guarantee you a job offer upon graduation. It is a 6 month, part-time, online Bootc...

20 Aug 201823min

EP37 - Null vs Undefined in JavaScript

EP37 - Null vs Undefined in JavaScript

Interested in starting your coding career? I'm now accepting students into an immersive programming Bootcamp where I guarantee you a job offer upon graduation. It is a 6 month, part-time, online Bootc...

14 Aug 201813min

EP36 - Objects in JavaScript

EP36 - Objects in JavaScript

Interested in starting your coding career? I'm now accepting students into an immersive programming Bootcamp where I guarantee you a job offer upon graduation. It is a 6 month, part-time, online Bootc...

6 Aug 201820min

EP35 - JavaScript TypeOf Keyword

EP35 - JavaScript TypeOf Keyword

Interested in starting your coding career? I'm now accepting students into an immersive programming Bootcamp where I guarantee you a job offer upon graduation. It is a 6 month, part-time, online Bootc...

30 Jul 201814min

EP 34 - Getting and Showing Data from Users

EP 34 - Getting and Showing Data from Users

Show notes for this episode are available via http://coderscampus.com/34 Don't forget to check out our current "deal" for coders campus available via http://coderscampus.com/deal

23 Jul 201813min

Populært innen Business og økonomi

stopp-verden
lydartikler-fra-aftenposten
dine-penger-pengeradet
e24-podden
rss-penger-polser-og-politikk
rss-borsmorgen-okonominyhetene
pengepodden-2
pengesnakk
finansredaksjonen
morgenkaffen-med-finansavisen
livet-pa-veien-med-jan-erik-larssen
utbytte
rss-sunn-okonomi
tid-er-penger-en-podcast-med-peter-warren
stormkast-med-valebrokk-stordalen
okonomiamatorene
lederpodden
rss-markedspuls-2
liberal-halvtime
arcticpodden