Package org.hibernate.engine.internal
Class NonNullableTransientDependencies
- java.lang.Object
-
- org.hibernate.engine.internal.NonNullableTransientDependencies
-
public final class NonNullableTransientDependencies extends Object
Tracks non-nullable transient entities that would cause a particular entity insert to fail.
-
-
Constructor Summary
Constructors Constructor Description NonNullableTransientDependencies()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(String propertyName, Object transientEntity)
Iterable<Object>
getNonNullableTransientEntities()
Iterable<String>
getNonNullableTransientPropertyPaths(Object entity)
Retrieve the paths that refer to the transient entityboolean
isEmpty()
Are there any paths currently tracked here?void
resolveNonNullableTransientEntity(Object entity)
Clean up any tracked references for the given entity, throwing an exception if there were any paths.String
toLoggableString(SharedSessionContractImplementor session)
Build a loggable representation of the paths tracked here at the moment.
-
-
-
Method Detail
-
getNonNullableTransientPropertyPaths
public Iterable<String> getNonNullableTransientPropertyPaths(Object entity)
Retrieve the paths that refer to the transient entity- Parameters:
entity
- The transient entity- Returns:
- The property paths
-
isEmpty
public boolean isEmpty()
Are there any paths currently tracked here?- Returns:
true
indicates there are no path tracked here currently
-
resolveNonNullableTransientEntity
public void resolveNonNullableTransientEntity(Object entity)
Clean up any tracked references for the given entity, throwing an exception if there were any paths.- Parameters:
entity
- The entity- Throws:
IllegalStateException
- If the entity had tracked paths
-
toLoggableString
public String toLoggableString(SharedSessionContractImplementor session)
Build a loggable representation of the paths tracked here at the moment.- Parameters:
session
- The session (used to resolve entity names)- Returns:
- The loggable representation
-
-