January 20 2014 by Kevin Bowersox

The following tutorial details how to model a self-referencing relationship using JPA.  The tutorial briefly discusses self-referencing relationships and then continues to provide a complete example of modeling the relationship in JPA.

To follow along, download the base code used for this tutorial from this GitHub repository. Source code for the completed project can be downloaded by clicking the GitHub logo below.

Continue Reading
December 31 2013 by Kevin Bowersox

   When beginning to learn Java, early in your journey you will most likely encounter a discussion of the primitive data types.  An investigation of the primitive numeric data types will expose you to the primitives byte, short, int and long.  From their definitions, most individuals with no programming background can discern the following about these types:

These primitive data types only represent whole numbers (including negative numbers) aka Integers.

 

Each of these primitives can store a specific range of values with byte having the smallest range and long having the largest range.

Continue Reading

December 08 2013 by Kevin Bowersox

The following tutorial details how to use the @Inheritance annotation in combination with the table per class strategy to map an inheritance relationship in an object model.  The tutorial discusses the differences between the table per class strategy and the single table strategy explored in the previous tutorial Inheritance with @Inheritance.  Also discussed are the limitations of the table per class strategy.


To follow along, download the base code used for this tutorial from this GitHub repository. Source code for the completed project can be downloaded by clicking the GitHub logo below.
Continue Reading

November 26 2013 by Kevin Bowersox

The following tutorial details how to use the @Inheritance annotation in JPA to map an inheritance relationship in an object model.  The tutorial discusses the capabilities provided by @Inheritance that are absent when utilizing the @MappedSuperClass annotation.  Appropriate use of both annotations is further discussed.

 

To follow along, download the base code used for this tutorial from this GitHub repository. Source code for the completed project can be downloaded by clicking the GitHub logo below.

Continue Reading
May 31 2013 by Kevin Bowersox

The following tutorial details how to use the Spring Data to query against an object model. The tutorial explains how to define various interface methods on Spring Data Repositories that account for specific criteria and ordering. To follow along download the base code used for this tutorial from this Git Hub Repository. Source code for the completed project can be downloaded by clicking the GitHub logo below.

Continue Reading
Next 5 Entries