On Java Development

All things related to Java development, from the perspective of a caveman.

Archive for July, 2014

XML Anatomy

without comments

Introduction

This post presents a brief description of the parts that make up an XML file.
Read the rest of this entry »

Written by admin

July 26th, 2014 at 3:03 pm

Posted in XML

A One-To-One Association Using JPA Annotations

without comments

Introduction

This post shows how to use JPA annotations to define a one-to-one association between files that have a parent/child relationship and which share the same primary key value.
Read the rest of this entry »

Written by admin

July 22nd, 2014 at 6:48 am

Posted in JPA annotations

Java Persistence Annotations

without comments

Introduction

The set of annotations presented in this post are part of the Java Persistence API and originate from the javax.persistence package.
Read the rest of this entry »

Written by admin

July 14th, 2014 at 5:00 am

Posted in JPA annotations

Creating Summary Data using SQL Count(*) and Hibernate

without comments

Introduction

This post shows how to implement a SQL statement with a Count(*) function using Hibernate. This creates a record set that doesn’t map to an existing entity, so the coding needed to pull the data out of the resulting list and to then put them into a container class is a bit different than usual when using Hibernate and mapped entities.

This post also goes beyond being a simple presentation about an SQL statement inside a DAO. Along the way, it explains many Java development concepts that every developer should know. It also exposes forces that should cause the developer to recognize the need for a certain Java Design Pattern.

Maybe this post should have been called “How to Design an Application to use a Mini-Architecture including Services, Business Objects, Data Access and Transfer Objects while using Hibernate to summarize records.“, but the focus is still about how to use the Count(*) function with Hibernate.
Read the rest of this entry »

A ManagedBean Class Template

without comments

Introduction

This post presents what amounts to being an empty Java class designed to act as a starting template for a Managed Bean that is associated with a JSF page. This post highlights the parts that are common to classes of this nature and a few of the not-so-obvious aspects of coding Managed Bean classes.
Read the rest of this entry »

Written by admin

July 2nd, 2014 at 8:55 am