Top Description Fields Constructors Methods
org.hibernate.engine.internal

public final Class NonNullableTransientDependencies

extends Object
Class Inheritance
Imports
java.util.Collections, .HashSet, .IdentityHashMap, .Map, .Set, org.hibernate.engine.spi.SharedSessionContractImplementor

Tracks non-nullable transient entities that would cause a particular entity insert to fail.
Author
Gail Badner

Field Summary

Modifier and TypeField and Description
private Map<Object, Set<String>>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
add(String propertyName, Object transientEntity)

public Iterable<Object>
public Iterable<String>

Returns:

The property paths
getNonNullableTransientPropertyPaths
(final Object
The transient entity
entity
)

Retrieve the paths that refer to the transient entity

public boolean

Returns:

true indicates there are no path tracked here currently
isEmpty
()

Are there any paths currently tracked here?

public void
resolveNonNullableTransientEntity(Object
The entity
entity
)

Clean up any tracked references for the given entity, throwing an exception if there were any paths.

public String

Returns:

The loggable representation
toLoggableString
(SharedSessionContractImplementor
The session (used to resolve entity names)
session
)

Build a loggable representation of the paths tracked here at the moment.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

propertyPathsByTransientEntityback to summary
private Map<Object, Set<String>> propertyPathsByTransientEntity

Constructor Detail

NonNullableTransientDependenciesback to summary
public NonNullableTransientDependencies()

Method Detail

addback to summary
public void add(String propertyName, Object transientEntity)
getNonNullableTransientEntitiesback to summary
public Iterable<Object> getNonNullableTransientEntities()
getNonNullableTransientPropertyPathsback to summary
public Iterable<String> getNonNullableTransientPropertyPaths(final Object entity)

Retrieve the paths that refer to the transient entity

Parameters
entity:Object

The transient entity

Returns:Iterable<String>

The property paths

isEmptyback to summary
public boolean isEmpty()

Are there any paths currently tracked here?

Returns:boolean

true indicates there are no path tracked here currently

resolveNonNullableTransientEntityback to summary
public void resolveNonNullableTransientEntity(Object entity)

Clean up any tracked references for the given entity, throwing an exception if there were any paths.

Parameters
entity:Object

The entity

Exceptions
IllegalStateException:
If the entity had tracked paths
toLoggableStringback to summary
public String toLoggableString(SharedSessionContractImplementor session)

Build a loggable representation of the paths tracked here at the moment.

Parameters
session:SharedSessionContractImplementor

The session (used to resolve entity names)

Returns:String

The loggable representation