Package org.hibernate.intercept

Examples of org.hibernate.intercept.FieldInterceptor


  }

  private void markInterceptorDirty(final Object entity, final Object target) {
    if ( FieldInterceptionHelper.isInstrumented( entity ) ) {
      FieldInterceptor interceptor = FieldInterceptionHelper.extractFieldInterceptor( target );
      if ( interceptor != null ) {
        interceptor.dirty();
      }
    }
  }
View Full Code Here


    return id;
  }

  private void markInterceptorDirty(Object entity, EntityPersister persister, EventSource source) {
    if ( FieldInterceptionHelper.isInstrumented( entity ) ) {
      FieldInterceptor interceptor = FieldInterceptionHelper.injectFieldInterceptor(
          entity,
          persister.getEntityName(),
          null,
          source
      );
      interceptor.dirty();
    }
  }
View Full Code Here

//  }

  public void afterReassociate(Object entity, SessionImplementor session) {
    //if ( hasLazyProperties() ) {
    if ( FieldInterceptionHelper.isInstrumented( entity ) ) {
      FieldInterceptor interceptor = FieldInterceptionHelper.extractFieldInterceptor( entity );
      if ( interceptor != null ) {
        interceptor.setSession( session );
      }
      else {
        FieldInterceptor fieldInterceptor = FieldInterceptionHelper.injectFieldInterceptor(
            entity,
            getEntityName(),
            null,
            session
        );
        fieldInterceptor.dirty();
      }
    }
  }
View Full Code Here

    }
  }

  public boolean hasUninitializedLazyProperties(Object entity) {
    if ( getEntityMetamodel().hasLazyProperties() ) {
      FieldInterceptor callback = FieldInterceptionHelper.extractFieldInterceptor( entity );
      return callback != null && !callback.isInitialized();
    }
    else {
      return false;
    }
  }
View Full Code Here

  }

  private void markInterceptorDirty(final Object entity, final Object target) {
    if ( FieldInterceptionHelper.isInstrumented( entity ) ) {
      FieldInterceptor interceptor = FieldInterceptionHelper.extractFieldInterceptor( target );
      if ( interceptor != null ) {
        interceptor.dirty();
      }
    }
  }
View Full Code Here

//  }

  public void afterReassociate(Object entity, SessionImplementor session) {
    //if ( hasLazyProperties() ) {
    if ( FieldInterceptionHelper.isInstrumented( entity ) ) {
      FieldInterceptor interceptor = FieldInterceptionHelper.extractFieldInterceptor( entity );
      if ( interceptor != null ) {
        interceptor.setSession( session );
      }
      else {
        FieldInterceptor fieldInterceptor = FieldInterceptionHelper.injectFieldInterceptor(
            entity,
            getEntityName(),
            null,
            session
        );
        fieldInterceptor.dirty();
      }
    }
  }
View Full Code Here

  /**
   * {@inheritDoc}
   */
  public boolean hasUninitializedLazyProperties(Object entity) {
    if ( getEntityMetamodel().hasLazyProperties() ) {
      FieldInterceptor callback = FieldInterceptionHelper.extractFieldInterceptor( entity );
      return callback != null && !callback.isInitialized();
    }
    else {
      return false;
    }
  }
View Full Code Here

    else {
      entity = proxy;
    }

    if ( FieldInterceptionHelper.isInstrumented( entity ) ) {
      FieldInterceptor interceptor = FieldInterceptionHelper.extractFieldInterceptor( entity );
      return interceptor == null || interceptor.isInitialized( propertyName );
    }
    else {
      return true;
    }
   
View Full Code Here

//  }

  public void afterReassociate(Object entity, SessionImplementor session) {
    //if ( hasLazyProperties() ) {
    if ( FieldInterceptionHelper.isInstrumented( entity ) ) {
      FieldInterceptor interceptor = FieldInterceptionHelper.extractFieldInterceptor( entity );
      if ( interceptor != null ) {
        interceptor.setSession( session );
      }
      else {
        FieldInterceptor fieldInterceptor = FieldInterceptionHelper.injectFieldInterceptor(
            entity,
            getEntityName(),
            null,
            session
        );
        fieldInterceptor.dirty();
      }
    }
  }
View Full Code Here

  }

  private void markInterceptorDirty(final Object entity, final Object target) {
    if ( FieldInterceptionHelper.isInstrumented( entity ) ) {
      FieldInterceptor interceptor = FieldInterceptionHelper.extractFieldInterceptor( target );
      if ( interceptor != null ) {
        interceptor.dirty();
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.hibernate.intercept.FieldInterceptor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.