This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
When we talk about single field primary keys, we're usually refering to objects such as String, Integer, Long, Short, Character, etc. You usually won't be defining a custom class to contain just a single String since you've the option of declaring it as your primary key.
This is taken from the DTD file. The first example would be our single field primary key & the second being the multiple field primary key. Your entity bean would usually contains other fields & your compound primary key class should be made up of some of these fields.