Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Hibernate Basics!
You have completed Hibernate Basics!
Preview
As a step up from the last exercise of saving individual parts of a contact to a database, you will now explore how we might store a contact object into the database.
This video doesn't have any notes.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
If we're writing a contact
manager application,
0:00
one of the obvious objects we'd want
to work with would be a contact object.
0:01
We can write a POJO.
0:07
Remember, that's plain old Java object.
0:08
That models a contact by creating a class
that includes an instance field for
0:10
each of the database columns we define.
0:14
Then, when we have a new contact object,
0:18
we should be able to simply
save it to the database.
0:20
Let's write a first draft of
what that might look like.
0:23
What I'd like to do here is write a save
method that allows us to quickly save
0:27
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up