Methods Summary |
---|
public final void | clearDirty()
dirty = false;
|
public final void | dirty()
dirty = true;
|
public final java.lang.String | getEntityName()
return entityName;
|
public final org.hibernate.engine.SessionImplementor | getSession()
return session;
|
public final java.util.Set | getUninitializedFields()
return uninitializedFields;
|
protected final java.lang.Object | intercept(java.lang.Object target, java.lang.String fieldName, java.lang.Object value)
if ( initializing ) {
return value;
}
if ( uninitializedFields != null && uninitializedFields.contains( fieldName ) ) {
if ( session == null ) {
throw new LazyInitializationException( "entity with lazy properties is not associated with a session" );
}
else if ( !session.isOpen() || !session.isConnected() ) {
throw new LazyInitializationException( "session is not connected" );
}
final Object result;
initializing = true;
try {
result = ( ( LazyPropertyInitializer ) session.getFactory()
.getEntityPersister( entityName ) )
.initializeLazyProperty( fieldName, target, session );
}
finally {
initializing = false;
}
uninitializedFields = null; //let's assume that there is only one lazy fetch group, for now!
return result;
}
else {
return value;
}
|
public final boolean | isDirty()
return dirty;
|
public final boolean | isInitialized()
return uninitializedFields == null || uninitializedFields.size() == 0;
|
public final boolean | isInitialized(java.lang.String field)
return uninitializedFields == null || !uninitializedFields.contains( field );
|
public final boolean | isInitializing()
return initializing;
|
public final void | setSession(org.hibernate.engine.SessionImplementor session)
this.session = session;
|