Package org.hibernate.service.instrumentation.spi

Examples of org.hibernate.service.instrumentation.spi.InstrumentationService


//    }
//  }

  public void afterReassociate(Object entity, SessionImplementor session) {
    //if ( hasLazyProperties() ) {
    InstrumentationService instrumentationService = session.getFactory()
        .getServiceRegistry()
        .getService( InstrumentationService.class );
    if ( instrumentationService.isInstrumented( entity ) ) {
      FieldInterceptor interceptor = FieldInterceptionHelper.extractFieldInterceptor( entity );
      if ( interceptor != null ) {
        interceptor.setSession( session );
      }
      else {
View Full Code Here


      dirtyCheck(event);
      if ( isUpdateNecessary(event) ) {
        return true;
      }
      else {
        InstrumentationService instrumentationService = event.getSession()
            .getFactory()
            .getServiceRegistry()
            .getService( InstrumentationService.class );
        if ( instrumentationService.isInstrumented( event.getEntity() ) ) {
          FieldInterceptionHelper.clearDirty( event.getEntity() );
        }
        return false;
      }
    }
View Full Code Here

            sessionFactory.getIdentifierGenerator( rootName )
      );

    versioned = persistentClass.isVersioned();

    InstrumentationService instrumentationService = sessionFactory.getServiceRegistry().getService( InstrumentationService.class );
    lazyAvailable = persistentClass.hasPojoRepresentation() &&
                            instrumentationService.isInstrumented( persistentClass.getMappedClass() );
    boolean hasLazy = false;

    propertySpan = persistentClass.getPropertyClosureSpan();
    properties = new StandardProperty[propertySpan];
    List naturalIdNumbers = new ArrayList();
View Full Code Here

    lazyAvailable = false;
    if ( entityBinding.getEntity().getClassReferenceUnresolved() != null ) {
      hasPojoRepresentation = true;
      mappedClass = entityBinding.getEntity().getClassReference();
      proxyInterfaceClass = entityBinding.getProxyInterfaceType().getValue();
      InstrumentationService instrumentationService = sessionFactory.getServiceRegistry()
          .getService( InstrumentationService.class );
      lazyAvailable = instrumentationService.isInstrumented( mappedClass );
    }

    boolean hasLazy = false;

    // TODO: Fix after HHH-6337 is fixed; for now assume entityBinding is the root binding
View Full Code Here

    }

  }

  private void markInterceptorDirty(final Object entity, final Object target, SessionFactoryImplementor factory) {
    InstrumentationService instrumentationService = factory
        .getServiceRegistry()
        .getService( InstrumentationService.class );
    if ( instrumentationService.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) {
    InstrumentationService instrumentationService = persister.getFactory()
        .getServiceRegistry()
        .getService( InstrumentationService.class );
    if ( instrumentationService.isInstrumented( entity ) ) {
      FieldInterceptor interceptor = FieldInterceptionHelper.injectFieldInterceptor(
          entity,
          persister.getEntityName(),
          null,
          source
View Full Code Here

    return id;
  }

  private void markInterceptorDirty(Object entity, EntityPersister persister, EventSource source) {
    InstrumentationService instrumentationService = persister.getFactory()
        .getServiceRegistry()
        .getService( InstrumentationService.class );
    if ( instrumentationService.isInstrumented( entity ) ) {
      FieldInterceptor interceptor = FieldInterceptionHelper.injectFieldInterceptor(
          entity,
          persister.getEntityName(),
          null,
          source
View Full Code Here

TOP

Related Classes of org.hibernate.service.instrumentation.spi.InstrumentationService

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.