Maps and Entities and JPA, OH MY!

Ryan McCullough Articles, Development Technologies & Tools, 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 Articles, Development Technologies & Tools, Java Leave a Comment

Attention: This article was published over 11 years ago, and the information provided may be aged or outdated. While some topics are evergreen, technology moves fast, so 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. …

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

Mark Adelsberger API Development, Architecture, Articles, Tutorial 3 Comments

Attention: This article was published over 13 years ago, and the information provided may be aged or outdated. While some topics are evergreen, technology moves fast, so 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 …

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

Mark Adelsberger Architecture, Articles 5 Comments

Attention: This article was published over 13 years ago, and the information provided may be aged or outdated. While some topics are evergreen, technology moves fast, so 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 …