220221222223224225226227228229230
{ // Ignore, means that no publisher with the given name already exists. } if (publisher == null) publisher = publisherHome.create(publisherName); attributes.put("publisherId", publisher.getPrimaryKey()); return addBook(attributes); }
273274275276277278279280281282283
{ // Ignore, means we need to create the Publisher } if (publisher == null) publisher = publisherHome.create(publisherName); // Don't duplicate all that other code! attributes.put("publisherId", publisher.getPrimaryKey());
261262263264265266267268269270271
314315316317318319320321322323324
210211212213214215216217218219220
267268269270271272273274275276277
260261262263264265266267268269270
{ // Ignore, means that no publisher with the given name already // exists. } if (publisher == null) publisher = publisherHome.create(publisherName); attributes.put("publisherId", publisher.getPrimaryKey()); return addBook(attributes); }
317318319320321322323324325326327
catch (FinderException e) { // Ignore, means we need to create the Publisher } if (publisher == null) publisher = publisherHome.create(publisherName); // Don't duplicate all that other code! attributes.put("publisherId", publisher.getPrimaryKey());