类 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.- 作者:
- Gail Badner
-
-
构造器概要
构造器 构造器 说明 NonNullableTransientDependencies()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 Iterable<Object>getNonNullableTransientEntities()Iterable<String>getNonNullableTransientPropertyPaths(Object entity)Retrieve the paths that refer to the transient entitybooleanisEmpty()Are there any paths currently tracked here?voidresolveNonNullableTransientEntity(Object entity)Clean up any tracked references for the given entity, throwing an exception if there were any paths.StringtoLoggableString(SharedSessionContractImplementor session)Build a loggable representation of the paths tracked here at the moment.
-
-
-
方法详细资料
-
getNonNullableTransientPropertyPaths
public Iterable<String> getNonNullableTransientPropertyPaths(Object entity)
Retrieve the paths that refer to the transient entity- 参数:
entity- The transient entity- 返回:
- The property paths
-
isEmpty
public boolean isEmpty()
Are there any paths currently tracked here?- 返回:
trueindicates 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.- 参数:
entity- The entity- 抛出:
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.- 参数:
session- The session (used to resolve entity names)- 返回:
- The loggable representation
-
-