Maps and Entities and JPA, OH MY!

Ryan McCullough Development Technology, Programming Leave a Comment

A client I’m working with has an email templating system that needs an upgrade! The current design utilizes a denormalized table that needed to grow a column every time a new unique token is needed. After a review of the offerings through JPA, I was happy to see that JPA had some support for java.util.Map through joins through a variety of the @MapKey annotation.

In this post, I’ll demonstrate the less frequently used methodology of applying and populating a Map of entities using a single table and a composite key.

JAXB – A Newcomer’s Perspective, Part 2

Mark Adelsberger Development Technology, Java Leave a Comment

Attention: The following article was published over 6 years ago, and the information provided may be aged or outdated. Please keep that in mind as you read the post.In Part 1 of this series, I discussed the basics of loading data from an XML file into a database using JAXB and JPA. (If JSON is called for instead of XML, …

The Data Access Layer, Part 2 – Using the Criteria API

Mark Adelsberger Architecture, Tutorial 3 Comments

Attention: The following article was published over 8 years ago, and the information provided may be aged or outdated. Please keep that in mind as you read the post.In Part One of this series, I reviewed the basic design goals of a Data Access Layer (DAL), those being: Contain all of the information about the persistence mechanism; and Contain none …

The Data Access Layer, Part 1 – The Basics (And When Things Aren’t So Basic)

Mark Adelsberger Architecture 5 Comments

Attention: The following article was published over 8 years ago, and the information provided may be aged or outdated. Please keep that in mind as you read the post.Today, I’d like to talk about the data access layer (DAL). I’ll start with a brief review: the motivation behind the DAL, the design principles that define a theoretically “good” DAL, and …