HHH-7304 Minor cleanup

This commit is contained in:
Brett Meyer 2013-01-17 14:23:43 -05:00
parent 213ce0d060
commit c12766a82b
4 changed files with 6 additions and 8 deletions

View File

@ -195,12 +195,12 @@ public abstract class AbstractEntityInsertAction extends EntityAction {
/** /**
* Handle sending notifications needed for natural-id after saving * Handle sending notifications needed for natural-id after saving
*/ */
public void handleNaturalIdPostSaveNotifications(Serializable id) { public void handleNaturalIdPostSaveNotifications(Serializable generatedId) {
if (isEarlyInsert()) { if (isEarlyInsert()) {
// with early insert, we still need to add a local (transactional) natural id cross-reference // with early insert, we still need to add a local (transactional) natural id cross-reference
getSession().getPersistenceContext().getNaturalIdHelper().manageLocalNaturalIdCrossReference( getSession().getPersistenceContext().getNaturalIdHelper().manageLocalNaturalIdCrossReference(
getPersister(), getPersister(),
id, generatedId,
state, state,
null, null,
CachedNaturalIdValueSource.INSERT CachedNaturalIdValueSource.INSERT

View File

@ -26,8 +26,6 @@ package org.hibernate.event.internal;
import java.io.Serializable; import java.io.Serializable;
import java.util.Map; import java.util.Map;
import org.jboss.logging.Logger;
import org.hibernate.LockMode; import org.hibernate.LockMode;
import org.hibernate.NonUniqueObjectException; import org.hibernate.NonUniqueObjectException;
import org.hibernate.action.internal.AbstractEntityInsertAction; import org.hibernate.action.internal.AbstractEntityInsertAction;
@ -51,6 +49,7 @@ import org.hibernate.persister.entity.EntityPersister;
import org.hibernate.pretty.MessageHelper; import org.hibernate.pretty.MessageHelper;
import org.hibernate.type.Type; import org.hibernate.type.Type;
import org.hibernate.type.TypeHelper; import org.hibernate.type.TypeHelper;
import org.jboss.logging.Logger;
/** /**
* A convenience bas class for listeners responding to save events. * A convenience bas class for listeners responding to save events.

View File

@ -23,14 +23,13 @@
*/ */
package org.hibernate.test.jpa.naturalid; package org.hibernate.test.jpa.naturalid;
import org.junit.Test; import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import org.hibernate.Session; import org.hibernate.Session;
import org.hibernate.test.jpa.AbstractJPATest; import org.hibernate.test.jpa.AbstractJPATest;
import org.hibernate.testing.TestForIssue; import org.hibernate.testing.TestForIssue;
import org.junit.Test;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
/** /**
* @author Steve Ebersole * @author Steve Ebersole